@ourtrip/ui 1.0.17 → 1.0.19

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/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports["@ourtrip/ui"]=t(require("react"),require("react-dom")):e["@ourtrip/ui"]=t(e.react,e["react-dom"])}(this,((e,t)=>(()=>{var n,r,o={155:t=>{"use strict";t.exports=e},514:e=>{"use strict";e.exports=t},698:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o},848:(e,t,n)=>{"use strict";e.exports=n(698)},942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return o[e](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var o=Object.create(null);a.r(o);var i={};n=n||[null,r({}),r([]),r(r)];for(var s=2&t&&e;"object"==typeof s&&!~n.indexOf(s);s=r(s))Object.getOwnPropertyNames(s).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,a.d(o,i),o},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nc=void 0;var s={};return(()=>{"use strict";a.r(s),a.d(s,{Accordion:()=>r,Alert:()=>Q,Badge:()=>ee,Breadcrumbs:()=>ue,Button:()=>Oe,Card:()=>je,Checkbox:()=>Ze,Collapse:()=>at,Divider:()=>ut,Input:()=>ht,Modal:()=>ft,Pagination:()=>At,PhoneInput:()=>Ot,Popover:()=>ji,PopoverContent:()=>Di,PopoverTrigger:()=>Ri,Radio:()=>Li,Range:()=>Hi,Select:()=>hs,SelectContent:()=>xs,SelectGroup:()=>fs,SelectItem:()=>ws,SelectLabel:()=>bs,SelectScrollDownButton:()=>ys,SelectScrollUpButton:()=>vs,SelectSeparator:()=>Es,SelectTrigger:()=>gs,SelectValue:()=>ms,Sheet:()=>bl,SheetClose:()=>El,SheetContent:()=>Al,SheetDescription:()=>jl,SheetFooter:()=>Ol,SheetHeader:()=>Tl,SheetOverlay:()=>Sl,SheetPortal:()=>Pl,SheetTitle:()=>Ml,SheetTrigger:()=>wl,Stars:()=>_e,StepMarker:()=>Rl,Switch:()=>fg,Tag:()=>mg,Tooltip:()=>Ug,TooltipContent:()=>Kg,TooltipProvider:()=>zg,TooltipTrigger:()=>Hg});var e=a(155),t=a.t(e,2),n=a.n(e);const r=function(t){var r=t.title,o=t.text,i=(0,e.useState)(!1),a=i[0],s=i[1];return n().createElement("div",{className:"w-full flex flex-col p-6 border border-gray-200 rounded-default cursor-pointer",onClick:function(){return s((function(e){return!e}))}},n().createElement("div",{className:"flex items-center gap-6"},n().createElement("div",{className:"relative w-10 h-10 rounded-full flex justify-center items-center transition-colors duration-300 ".concat(a?"bg-primary-900":"bg-gray-100")},n().createElement("div",{className:"absolute w-4 h-0.5 rounded transition-transform duration-300 ".concat(a?"bg-primary-900 transform rotate-[-90deg]":"bg-primary-900 transform rotate-[-180deg]")}),n().createElement("div",{className:"absolute w-4 h-0.5 rounded transition-transform duration-300 ".concat(a?"bg-white transform rotate-0":"bg-primary-900 transform rotate-[-90deg]")})),n().createElement("h2",{className:"font-medium text-lg text-primary-900"},r)),n().createElement("div",{className:"pl-16 overflow-hidden transition-max-height duration-500 ease-in-out ".concat(a?"max-h-56":"max-h-0")},n().createElement("p",{className:"pt-2.5 text-base text-gray-500 leading-7"},o)))},o=(0,e.createContext)({color:"currentColor",size:"1em",weight:"regular",mirrored:!1});var i=Object.defineProperty,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p=(e,t)=>{for(var n in t||(t={}))c.call(t,n)&&d(e,n,t[n]);if(l)for(var n of l(t))u.call(t,n)&&d(e,n,t[n]);return e},h=(e,t)=>{var n={};for(var r in e)c.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&l)for(var r of l(e))t.indexOf(r)<0&&u.call(e,r)&&(n[r]=e[r]);return n};const f=(0,e.forwardRef)(((t,n)=>{const r=t,{alt:i,color:a,size:s,weight:l,mirrored:c,children:u,weights:d}=r,f=h(r,["alt","color","size","weight","mirrored","children","weights"]),m=(0,e.useContext)(o),{color:g="currentColor",size:v,weight:y="regular",mirrored:x=!1}=m,b=h(m,["color","size","weight","mirrored"]);return e.createElement("svg",p(p({ref:n,xmlns:"http://www.w3.org/2000/svg",width:null!=s?s:v,height:null!=s?s:v,fill:null!=a?a:g,viewBox:"0 0 256 256",transform:c||x?"scale(-1, 1)":void 0},b),f),!!i&&e.createElement("title",null,i),u,d.get(null!=l?l:y))}));f.displayName="IconBase";const m=f,g=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z"}))]]);var v=Object.defineProperty,y=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,P=(e,t,n)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const S=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>y(e,x(t)))(((e,t)=>{for(var n in t||(t={}))w.call(t,n)&&P(e,n,t[n]);if(b)for(var n of b(t))E.call(t,n)&&P(e,n,t[n]);return e})({ref:n},t),{weights:g}))));S.displayName="WarningCircle";const C=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),e.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]);var A=Object.defineProperty,T=Object.defineProperties,O=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,D=(e,t,n)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const N=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>T(e,O(t)))(((e,t)=>{for(var n in t||(t={}))j.call(t,n)&&D(e,n,t[n]);if(M)for(var n of M(t))R.call(t,n)&&D(e,n,t[n]);return e})({ref:n},t),{weights:C}))));N.displayName="Check";const k=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),e.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]);var L=Object.defineProperty,V=Object.defineProperties,F=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,Z=(e,t,n)=>t in e?L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const W=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>V(e,F(t)))(((e,t)=>{for(var n in t||(t={}))B.call(t,n)&&Z(e,n,t[n]);if(I)for(var n of I(t))_.call(t,n)&&Z(e,n,t[n]);return e})({ref:n},t),{weights:k}))));W.displayName="Info";const z=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),e.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]);var U=Object.defineProperty,H=Object.defineProperties,K=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,q=(e,t,n)=>t in e?U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const G=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>H(e,K(t)))(((e,t)=>{for(var n in t||(t={}))Y.call(t,n)&&q(e,n,t[n]);if($)for(var n of $(t))X.call(t,n)&&q(e,n,t[n]);return e})({ref:n},t),{weights:z}))));G.displayName="Warning";var J={danger:n().createElement(S,{size:24}),success:n().createElement(N,{size:24}),info:n().createElement(W,{size:24}),warning:n().createElement(G,{size:24})};const Q=function(e){var t=e.type,r=e.variant,o=e.children,i="".concat("rounded-default p-4 flex items-start gap-4"," ").concat({info:{fill:"bg-info-500 text-white",outline:"border border-info-500 text-info-500"},success:{fill:"bg-success-500 text-white",outline:"border border-success-500 text-success-500"},danger:{fill:"bg-danger-500 text-white",outline:"border border-danger-500 text-danger-500"},warning:{fill:"bg-warning-500 text-white",outline:"border border-warning-500 text-warning-500"}}[t][r]);return n().createElement("div",{className:i},J[t],n().createElement("div",null,o))},ee=function(e){var t=e.children,r=e.icon,o=e.type,i=e.size,a=void 0===i?"normal":i,s=e.mobile,l=e.className,c="flex items-center rounded-inner ".concat(s?"lg:hidden md:flex":""," ").concat(l||""),u="",d={small:"px-2 py-1 gap-0",normal:"py-2 px-3 gap-2",large:"py-3 px-4 gap-3"}[a],p={small:"text-xs font-normal",normal:"text-sm font-semibold",large:"text-base font-semibold"}[a];switch(o){case"success":u="bg-success-100 text-success-600";break;case"warning":u="bg-warning-100 text-warning-600";break;case"danger":u="bg-danger-100 text-danger-600";break;case"info":u="bg-info-100 text-info-900";break;case"white":u="bg-white text-gray-900";break;case"primary":u="bg-primary-500 text-white";break;case"secondary":u="bg-gray-100 text-primary-500";break;default:u=""}var h="font-semibold whitespace-nowrap ".concat(p);return n().createElement("div",{className:"".concat(c," ").concat(u," ").concat(d)},r&&n().createElement("span",{className:"mr-2"},r),n().createElement("p",{className:h},t))},te=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),e.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]);var ne=Object.defineProperty,re=Object.defineProperties,oe=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,le=(e,t,n)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const ce=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>re(e,oe(t)))(((e,t)=>{for(var n in t||(t={}))ae.call(t,n)&&le(e,n,t[n]);if(ie)for(var n of ie(t))se.call(t,n)&&le(e,n,t[n]);return e})({ref:n},t),{weights:te}))));ce.displayName="CaretRight";const ue=function(e){var t=e.items;return n().createElement("div",{className:"flex items-center gap-2.5"},null==t?void 0:t.map((function(e,r){var o=r!==t.length-1;return n().createElement("div",{key:e.id,className:"flex items-center gap-2.5"},n().createElement("a",{onClick:function(){o&&window.open(e.href,"_blank")},className:"no-underline text-blue-900 text-sm ".concat(o?"hover:text-blue-500 hover:cursor-pointer":"cursor-text")},e.text),o&&n().createElement(ce,null))})))},de=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),e.createElement("path",{d:"M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,176A72,72,0,0,1,92,65.64a8,8,0,0,1,8,13.85,56,56,0,1,0,56,0,8,8,0,0,1,8-13.85A72,72,0,0,1,128,200Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z"}))]]);var pe=Object.defineProperty,he=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,ye=(e,t,n)=>t in e?pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const xe=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>he(e,fe(t)))(((e,t)=>{for(var n in t||(t={}))ge.call(t,n)&&ye(e,n,t[n]);if(me)for(var n of me(t))ve.call(t,n)&&ye(e,n,t[n]);return e})({ref:n},t),{weights:de}))));function be(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=be(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}xe.displayName="CircleNotch";const we=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Ee=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=be(e))&&(r&&(r+=" "),r+=t);return r},Pe=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Ee(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map((e=>{const t=null==n?void 0:n[e],r=null==i?void 0:i[e];if(null===t)return null;const a=we(t)||we(r);return o[e][a]})),s=n&&Object.entries(n).reduce(((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e}),{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce(((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every((e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...s}[t]):{...i,...s}[t]===n}))?[...e,n,r]:e}),[]);return Ee(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)};var Se=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(" ")},Ce=function(){return Ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ce.apply(this,arguments)},Ae=Pe("flex items-center justify-center gap-2 whitespace-nowrap transition-colors focus:outline-hidden",{variants:{variant:{fill:"",outline:"bg-transparent border"},color:{primary:"",secondary:"",danger:"",gray:"",white:""},size:{small:"h-[32px] px-4 text-sm",normal:"h-[40px] px-6 text-base",large:"h-[48px] px-8 text-lg",icon:"h-[40px] w-[40px] p-0"},shape:{default:"rounded-inner",rounded:"rounded-full"},fontWeight:{normal:"font-normal",bold:"font-medium"},fullWidth:{true:"w-full",false:""},fullHeight:{true:"h-full",false:""},disabled:{true:"bg-gray-200 text-gray-900 border-none cursor-not-allowed hover:bg-gray-200 hover:text-gray-900",false:""}},compoundVariants:[{variant:"fill",color:"primary",disabled:!1,className:"bg-primary-500 text-white hover:bg-primary-400 active:bg-primary-600"},{variant:"fill",color:"secondary",disabled:!1,className:"bg-secondary-500 text-white hover:bg-secondary-400 active:bg-secondary-600"},{variant:"fill",color:"danger",disabled:!1,className:"bg-red-500 text-white hover:bg-red-400 active:bg-red-600"},{variant:"fill",color:"gray",disabled:!1,className:"bg-gray-100 text-gray-700 hover:bg-gray-200 active:bg-gray-300"},{variant:"fill",color:"white",disabled:!1,className:"bg-white text-black hover:bg-gray-200"},{variant:"outline",color:"primary",disabled:!1,className:"text-primary-500 border-primary-500 hover:text-primary-400 hover:border-primary-400"},{variant:"outline",color:"secondary",disabled:!1,className:"text-secondary-500 border-secondary-500 hover:text-secondary-400 hover:border-secondary-400"},{variant:"outline",color:"danger",disabled:!1,className:"text-red-500 border-red-500 hover:text-red-400 hover:border-red-400"},{variant:"outline",color:"gray",disabled:!1,className:"text-gray-300 border-gray-300 hover:text-gray-500 hover:border-gray-400"},{variant:"outline",color:"white",disabled:!1,className:"text-white border-white hover:text-gray-200 hover:border-gray-200"}],defaultVariants:{variant:"fill",color:"primary",size:"normal",shape:"default",fontWeight:"normal",fullWidth:!1,fullHeight:!1,disabled:!1}}),Te=e.forwardRef((function(t,n){var r=t.className,o=t.variant,i=t.color,a=t.size,s=t.shape,l=t.fontWeight,c=t.fullWidth,u=t.fullHeight,d=t.disabled,p=t.loading,h=void 0!==p&&p,f=t.children,m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["className","variant","color","size","shape","fontWeight","fullWidth","fullHeight","disabled","loading","children"]);return e.createElement("button",Ce({className:Se(Ae({variant:o,color:i,size:a,shape:s,fontWeight:l,fullWidth:c,fullHeight:u,disabled:d||h}),r),ref:n,disabled:d||h},m),h?e.createElement(xe,{className:"animate-spin",weight:"bold"}):f)}));Te.displayName="Button";const Oe=Te;var Me=function(){return Me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Me.apply(this,arguments)};const je=function(e){var t=e.children,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children"]);return n().createElement("div",Me({className:"p-4 rounded-default border bg-white border-gray-200"},r),t)},Re=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M243,96a20.33,20.33,0,0,0-17.74-14l-56.59-4.57L146.83,24.62a20.36,20.36,0,0,0-37.66,0L87.35,77.44,30.76,82A20.45,20.45,0,0,0,19.1,117.88l43.18,37.24-13.2,55.7A20.37,20.37,0,0,0,79.57,233L128,203.19,176.43,233a20.39,20.39,0,0,0,30.49-22.15l-13.2-55.7,43.18-37.24A20.43,20.43,0,0,0,243,96ZM172.53,141.7a12,12,0,0,0-3.84,11.86L181.58,208l-47.29-29.08a12,12,0,0,0-12.58,0L74.42,208l12.89-54.4a12,12,0,0,0-3.84-11.86L41.2,105.24l55.4-4.47a12,12,0,0,0,10.13-7.38L128,41.89l21.27,51.5a12,12,0,0,0,10.13,7.38l55.4,4.47Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z",opacity:"0.2"}),e.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M237.28,97.87A14.18,14.18,0,0,0,224.76,88l-60.25-4.87-23.22-56.2a14.37,14.37,0,0,0-26.58,0L91.49,83.11,31.24,88a14.18,14.18,0,0,0-12.52,9.89A14.43,14.43,0,0,0,23,113.32L69,152.93l-14,59.25a14.4,14.4,0,0,0,5.59,15,14.1,14.1,0,0,0,15.91.6L128,196.12l51.58,31.71a14.1,14.1,0,0,0,15.91-.6,14.4,14.4,0,0,0,5.59-15l-14-59.25L233,113.32A14.43,14.43,0,0,0,237.28,97.87Zm-12.14,6.37-48.69,42a6,6,0,0,0-1.92,5.92l14.88,62.79a2.35,2.35,0,0,1-.95,2.57,2.24,2.24,0,0,1-2.6.1L131.14,184a6,6,0,0,0-6.28,0L70.14,217.61a2.24,2.24,0,0,1-2.6-.1,2.35,2.35,0,0,1-1-2.57l14.88-62.79a6,6,0,0,0-1.92-5.92l-48.69-42a2.37,2.37,0,0,1-.73-2.65,2.28,2.28,0,0,1,2.07-1.65l63.92-5.16a6,6,0,0,0,5.06-3.69l24.63-59.6a2.35,2.35,0,0,1,4.38,0l24.63,59.6a6,6,0,0,0,5.06,3.69l63.92,5.16a2.28,2.28,0,0,1,2.07,1.65A2.37,2.37,0,0,1,225.14,104.24Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M235.36,98.49A12.21,12.21,0,0,0,224.59,90l-61.47-5L139.44,27.67a12.37,12.37,0,0,0-22.88,0L92.88,85,31.41,90a12.45,12.45,0,0,0-7.07,21.84l46.85,40.41L56.87,212.64a12.35,12.35,0,0,0,18.51,13.49L128,193.77l52.62,32.36a12.12,12.12,0,0,0,13.69-.51,12.28,12.28,0,0,0,4.82-13l-14.32-60.42,46.85-40.41A12.29,12.29,0,0,0,235.36,98.49Zm-8.93,7.26-48.68,42a4,4,0,0,0-1.28,3.95l14.87,62.79a4.37,4.37,0,0,1-1.72,4.65,4.24,4.24,0,0,1-4.81.18L130.1,185.67a4,4,0,0,0-4.2,0L71.19,219.32a4.24,4.24,0,0,1-4.81-.18,4.37,4.37,0,0,1-1.72-4.65L79.53,151.7a4,4,0,0,0-1.28-3.95l-48.68-42A4.37,4.37,0,0,1,28.25,101a4.31,4.31,0,0,1,3.81-3L96,92.79a4,4,0,0,0,3.38-2.46L124,30.73a4.35,4.35,0,0,1,8.08,0l24.62,59.6A4,4,0,0,0,160,92.79l63.9,5.15a4.31,4.31,0,0,1,3.81,3A4.37,4.37,0,0,1,226.43,105.75Z"}))]]);var De=Object.defineProperty,Ne=Object.defineProperties,ke=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,Ie=(e,t,n)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const Be=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>Ne(e,ke(t)))(((e,t)=>{for(var n in t||(t={}))Ve.call(t,n)&&Ie(e,n,t[n]);if(Le)for(var n of Le(t))Fe.call(t,n)&&Ie(e,n,t[n]);return e})({ref:n},t),{weights:Re}))));Be.displayName="Star";const _e=function(e){var t=e.rate;return n().createElement("div",{className:"flex items-center gap-0.5"},Array.from({length:5}).map((function(e,r){return n().createElement(Be,{key:"".concat(t).concat(r),weight:t>r?"fill":"light",className:"text-yellow-300 ".concat(t>r?"text-yellow-300":""," ").concat(r>0?"hidden md:block":""),size:12})})),n().createElement("p",{className:"text-sm text-primary-900 font-medium block md:hidden"},t))},Ze=(0,e.memo)((function(t){var r=t.value,o=t.onChange,i=t.label,a=t.trailing,s=t.textColor,l=t.type,c=(0,e.useState)(r||!1),u=c[0],d=c[1];return(0,e.useEffect)((function(){void 0!==r&&d(r)}),[r]),n().createElement("div",{className:"w-full flex items-center justify-between cursor-pointer gap-2 select-none",onClick:function(){d((function(e){return!e})),null==o||o(!u)}},n().createElement("div",{className:"flex items-center gap-2"},n().createElement("div",{className:"w-5 h-5 flex items-center justify-center border border-primary-500 rounded-md flex-none mt-[3px] hover:bg-primary-500 ".concat(u?"bg-primary-500":"")},u&&n().createElement(N,{size:12,color:"white",weight:"bold"})),i&&n().createElement("p",{className:"flex items-center gap-1 text-sm mt-1 ".concat("primary"===s?"text-primary-900":"text-gray-500")},"stars"===l?n().createElement(_e,{rate:parseFloat(i.toString())}):i)),void 0!==a&&n().createElement("p",{className:"text-sm text-gray-500"},a))}),(function(e,t){return e.value===t.value&&e.label===t.label})),We=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),e.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]);var ze=Object.defineProperty,Ue=Object.defineProperties,He=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,Xe=(e,t,n)=>t in e?ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const qe=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>Ue(e,He(t)))(((e,t)=>{for(var n in t||(t={}))$e.call(t,n)&&Xe(e,n,t[n]);if(Ke)for(var n of Ke(t))Ye.call(t,n)&&Xe(e,n,t[n]);return e})({ref:n},t),{weights:We}))));qe.displayName="CaretUp";const Ge=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),e.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]);var Je=Object.defineProperty,Qe=Object.defineProperties,et=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,ot=(e,t,n)=>t in e?Je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const it=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>Qe(e,et(t)))(((e,t)=>{for(var n in t||(t={}))nt.call(t,n)&&ot(e,n,t[n]);if(tt)for(var n of tt(t))rt.call(t,n)&&ot(e,n,t[n]);return e})({ref:n},t),{weights:Ge}))));it.displayName="CaretDown";const at=function(t){var r=t.title,o=t.content,i=t.showPreview,a=void 0!==i&&i,s=t.togglePosition,l=void 0===s?"right":s,c=t.toggleText,u=(0,e.useState)(!1),d=u[0],p=u[1];return n().createElement("div",{className:"relative flex items-start ".concat("right"===l?"flex-row":"flex-col"," gap-3"),onClick:function(){return p((function(e){return!e}))}},n().createElement("div",{className:"mt-1"},n().createElement("h3",{className:"text-sm text-primary-900"},r),n().createElement("div",{className:"overflow-hidden transition-max-height duration-300 ease-in-out ".concat(d?"max-h-[1000px]":a?"max-h-12":"max-h-0")},n().createElement("p",{className:"mt-1 text-gray-500"},o))),n().createElement("div",{className:"flex items-center gap-2"},c&&n().createElement("span",null,d?c.close:c.open),n().createElement("div",{className:"w-7 h-7 rounded-full bg-gray-100 flex items-center justify-center"},d?n().createElement(qe,{size:18}):n().createElement(it,{size:18}))))};var st=a(942),lt=a.n(st),ct=function(){return ct=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ct.apply(this,arguments)};const ut=function(e){var t,r=e.orientation,o=void 0===r?"vertical":r,i=e.fullHeight,a=e.className,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["orientation","fullHeight","className"]),l=lt()(((t={"w-px h-10 bg-gray-200":"vertical"===o&&!i,"w-full h-px bg-gray-200":"horizontal"===o,"w-px h-full bg-gray-200":"vertical"===o&&i})[a]=a,t));return n().createElement("div",ct({},s,{className:l}))};var dt=function(){return dt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},dt.apply(this,arguments)},pt=(0,e.forwardRef)((function(t,r){var o=t.id,i=t.label,a=t.placeholder,s=t.color,l=void 0===s?"white":s,c=(t.dense,t.floating,t.border,t.onChange),u=t.onFocus,d=t.onBlur,p=t.focus,h=t.error,f=t.disabled,m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["id","label","placeholder","color","dense","floating","border","onChange","onFocus","onBlur","focus","error","disabled"]),g=(0,e.useRef)(null);return n().createElement("div",{"aria-labelledby":o,onClick:function(){var e;return null===(e=g.current)||void 0===e?void 0:e.focus()},className:"flex flex-col w-full ".concat(m.className)},n().createElement("div",{onClick:function(){var e;(null==r?void 0:r.current)?null===(e=r.current)||void 0===e||e.focus():null==p||p()}},i&&n().createElement("label",{htmlFor:o,className:"mb-2 text-sm text-gray-500"},i),n().createElement("input",dt({id:o,ref:function(e){"function"==typeof r?r(e):r&&"object"==typeof r&&(r.current=e),g.current=e},placeholder:a,autoComplete:"off"},m,{disabled:f,onChange:function(e){null==c||c(e)},onFocus:function(e){null==u||u(e)},onBlur:function(e){null==d||d(e)},className:"".concat("white"===l?"bg-white disabled:bg-white":"bg-gray-100 disabled:bg-gray-100"," w-full rounded-inner h-[50px] px-4 disabled:cursor-not-allowed placeholder-gray-500 text-primary-900 ").concat(m.className)}))),h&&n().createElement("span",{className:"text-sm text-red-600"},h))}));const ht=pt,ft=function(e){var t=e.isOpen,r=e.children,o=e.onClose,i=e.showCloseButton,a=void 0!==i&&i;return t?n().createElement("div",{className:"fixed top-0 left-0 w-full h-full bg-black/50 flex justify-center items-center"},n().createElement("div",{className:"bg-white rounded-default shadow-lg min-w-[350px] relative"},a?n().createElement("button",{type:"button",className:"absolute top-[10px] right-[10px] cursor-pointer",onClick:function(){return null==o?void 0:o()}},"Fechar"):null,n().createElement("div",{className:"modal-content"},r))):null},mt=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),e.createElement("path",{d:"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"}))]]);var gt=Object.defineProperty,vt=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,Et=(e,t,n)=>t in e?gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const Pt=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>vt(e,yt(t)))(((e,t)=>{for(var n in t||(t={}))bt.call(t,n)&&Et(e,n,t[n]);if(xt)for(var n of xt(t))wt.call(t,n)&&Et(e,n,t[n]);return e})({ref:n},t),{weights:mt}))));Pt.displayName="CaretLeft";var St=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Ct=Pe("w-10 h-10 flex items-center justify-center rounded-inner text-primary-900 transition-colors cursor-pointer",{variants:{selected:{true:"bg-primary-900 text-white hover:bg-primary-900",false:""},disabled:{true:"hover:text-primary-900",false:""},prevOrNext:{true:"bg-white hover:bg-primary-500 hover:text-white",false:"hover:bg-gray-200"}},defaultVariants:{selected:!1,disabled:!1,prevOrNext:!1}});const At=function(t){var r=t.page,o=t.total,i=t.loading,a=void 0!==i&&i,s=t.onChange,l=(0,e.useState)([]),c=l[0],u=l[1];return(0,e.useEffect)((function(){if(r&&o){u([1]);var e=r-2>1?r-2:1,t=r+1<o?r+1:o-1;1!==e&&u((function(e){return St(St([],e,!0),[0],!1)}));for(var n=function(e){u((function(t){return St(St([],t,!0),[e+1],!1)}))},i=e;i<t;i++)n(i);t+1!==o&&u((function(e){return St(St([],e,!0),[0],!1)})),u((function(e){return St(St([],e,!0),[o],!1)}))}}),[r,o]),n().createElement("div",{className:"w-full flex items-center justify-between"},n().createElement("div",{className:Se(Ct({disabled:a||1===r,prevOrNext:!0})),onClick:function(){return!a&&1!==r&&(null==s?void 0:s(r-1))}},n().createElement(Pt,{weight:"bold"})),n().createElement("div",{className:"flex items-center justify-between gap-2.5"},c.map((function(e,t){return n().createElement("div",{key:t,className:Se(Ct({selected:e===r,disabled:a||!e,prevOrNext:!1})),onClick:function(){return!a&&e&&(null==s?void 0:s(e))}},e||"...")}))),n().createElement("div",{className:Se(Ct({disabled:a||r===o,prevOrNext:!0})),onClick:function(){return!a&&r!==o&&(null==s?void 0:s(r+1))}},n().createElement(ce,{weight:"bold"})))};var Tt=function(){return Tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Tt.apply(this,arguments)};const Ot=function(e){var t,r,o,i,a,s,l,c,u,d,p,h,f=e.DDI,m=e.phoneDDIKey,g=e.phoneAreaCodeKey,v=e.phoneNumberKey,y=e.registerWithMask,x=e.setFocus,b=e.errors,w=e.ddiClassName,E=e.areaCodeClassName,P=e.phoneClassName,S=e.requiredMessage,C=e.ddiLabel,A=e.areaCodeLabel,T=e.numberLabel,O=(e.invalidAreaCodeMessage,e.invalidPhoneNumberMessage,"undefined"!=typeof window?window.location.host:"");return n().createElement("div",{className:"w-full flex flex-col gap-1"},n().createElement("div",{className:"flex flex-col md:flex-row gap-0.5"},n().createElement(ht,Tt({className:"flex-2 rounded-b-none md:rounded-r-none md:rounded-l-button ".concat(w),placeholder:C},y(m,["+9","+99","+999"],{value:f,required:S}),{defaultValue:(null==O?void 0:O.includes(".br"))?"+55":"",color:"gray"})),n().createElement(ht,Tt({className:"flex-2 rounded-none ".concat(E),placeholder:A},y(g,"+55"===f?"(99)":"",{required:S,validate:function(e){return"+55"!==f||(t=e,[11,12,13,14,15,16,17,18,19,21,22,24,27,28,31,32,33,34,35,37,38,41,42,43,44,45,46,47,48,49,51,53,54,55,61,62,64,63,65,66,67,68,69,71,73,74,75,77,79,81,82,83,84,85,86,87,88,89,91,92,93,94,95,96,97,98,99].includes(parseFloat(null==t?void 0:t.replace(/\D/g,""))));var t},oncomplete:function(){"+55"===f&&x(v)}}),{color:"gray"})),n().createElement(ht,Tt({className:"flex-5 rounded-t-none md:rounded-l-none md:rounded-r-button ".concat(P),placeholder:T},y(v,"+55"===f?"99999-9999":"",{required:S,validate:function(e){return"+55"!==f||function(e){var t=e.replace("-","");return/^\d{8}$/.test(t)||/^\d{9}$/.test(t)}(e)}}),{color:"gray"}))),((null===(r=null===(t=null==b?void 0:b.phone)||void 0===t?void 0:t.ddi)||void 0===r?void 0:r.message)||(null===(i=null===(o=null==b?void 0:b.phone)||void 0===o?void 0:o.areaCode)||void 0===i?void 0:i.message)||(null===(s=null===(a=null==b?void 0:b.phone)||void 0===a?void 0:a.number)||void 0===s?void 0:s.message))&&n().createElement("span",{className:"text-red-600 text-sm"},(null===(c=null===(l=null==b?void 0:b.phone)||void 0===l?void 0:l.ddi)||void 0===c?void 0:c.message)||(null===(d=null===(u=null==b?void 0:b.phone)||void 0===u?void 0:u.areaCode)||void 0===d?void 0:d.message)||(null===(h=null===(p=null==b?void 0:b.phone)||void 0===p?void 0:p.number)||void 0===h?void 0:h.message)))};function Mt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function jt(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Rt(...e){return t=>{let n=!1;const r=e.map((e=>{const r=jt(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():jt(e[t],null)}}}}function Dt(...t){return e.useCallback(Rt(...t),t)}var Nt=a(848);function kt(t,n=[]){let r=[];const o=()=>{const n=r.map((t=>e.createContext(t)));return function(r){const o=r?.[t]||n;return e.useMemo((()=>({[`__scope${t}`]:{...r,[t]:o}})),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[t]?.[a]||i,c=e.useMemo((()=>s),Object.values(s));return(0,Nt.jsx)(l.Provider,{value:c,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const l=s?.[t]?.[a]||i,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Lt(o,...n)]}function Lt(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=r.reduce(((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return r.scopeName=n.scopeName,r}var Vt=a(514),Ft=e.forwardRef(((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(_t);if(a){const t=a.props.children,r=i.map((n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n));return(0,Nt.jsx)(It,{...o,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,r):null})}return(0,Nt.jsx)(It,{...o,ref:n,children:r})}));Ft.displayName="Slot";var It=e.forwardRef(((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(r),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?Rt(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null}));It.displayName="SlotClone";var Bt=({children:e})=>(0,Nt.jsx)(Nt.Fragment,{children:e});function _t(t){return e.isValidElement(t)&&t.type===Bt}var Zt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,n)=>{const r=e.forwardRef(((e,t)=>{const{asChild:r,...o}=e,i=r?Ft:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,Nt.jsx)(i,{...o,ref:t})}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});function Wt(t){const n=e.useRef(t);return e.useEffect((()=>{n.current=t})),e.useMemo((()=>(...e)=>n.current?.(...e)),[])}var zt,Ut="dismissableLayer.update",Ht=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kt=e.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=t,u=e.useContext(Ht),[d,p]=e.useState(null),h=d?.ownerDocument??globalThis?.document,[,f]=e.useState({}),m=Dt(n,(e=>p(e))),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),x=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,w=x>=y,E=function(t,n=globalThis?.document){const r=Wt(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){Yt("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}else n.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}}),[n,r]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));w&&!n&&(i?.(e),s?.(e),e.defaultPrevented||l?.())}),h),P=function(t,n=globalThis?.document){const r=Wt(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{e.target&&!o.current&&Yt("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(a?.(e),s?.(e),e.defaultPrevented||l?.())}),h);return function(t,n=globalThis?.document){const r=Wt(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})}),[r,n])}((e=>{x===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),h),e.useEffect((()=>{if(d)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(zt=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),$t(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=zt)}}),[d,h,r,u]),e.useEffect((()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),$t())}),[d,u]),e.useEffect((()=>{const e=()=>f({});return document.addEventListener(Ut,e),()=>document.removeEventListener(Ut,e)}),[]),(0,Nt.jsx)(Zt.div,{...c,ref:m,style:{pointerEvents:b?w?"auto":"none":void 0,...t.style},onFocusCapture:Mt(t.onFocusCapture,P.onFocusCapture),onBlurCapture:Mt(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Mt(t.onPointerDownCapture,E.onPointerDownCapture)})}));function $t(){const e=new CustomEvent(Ut);document.dispatchEvent(e)}function Yt(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&Vt.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}Kt.displayName="DismissableLayer",e.forwardRef(((t,n)=>{const r=e.useContext(Ht),o=e.useRef(null),i=Dt(n,o);return e.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),(0,Nt.jsx)(Zt.div,{...t,ref:i})})).displayName="DismissableLayerBranch";var Xt=0;function qt(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Gt()),document.body.insertAdjacentElement("beforeend",e[1]??Gt()),Xt++,()=>{1===Xt&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Xt--}}),[])}function Gt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Jt="focusScope.autoFocusOnMount",Qt="focusScope.autoFocusOnUnmount",en={bubbles:!1,cancelable:!0},tn=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[l,c]=e.useState(null),u=Wt(i),d=Wt(a),p=e.useRef(null),h=Dt(n,(e=>c(e))),f=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(f.paused||!l)return;const t=e.target;l.contains(t)?p.current=t:an(p.current,{select:!0})},t=function(e){if(f.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||an(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&an(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,l,f.paused]),e.useEffect((()=>{if(l){sn.add(f);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(Jt,en);l.addEventListener(Jt,u),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(an(r,{select:t}),document.activeElement!==n)return}(nn(l).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&an(l))}return()=>{l.removeEventListener(Jt,u),setTimeout((()=>{const t=new CustomEvent(Qt,en);l.addEventListener(Qt,d),l.dispatchEvent(t),t.defaultPrevented||an(e??document.body,{select:!0}),l.removeEventListener(Qt,d),sn.remove(f)}),0)}}}),[l,u,d,f]);const m=e.useCallback((e=>{if(!r&&!o)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=nn(e);return[rn(t,e),rn(t.reverse(),e)]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&an(i,{select:!0})):(e.preventDefault(),r&&an(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,f.paused]);return(0,Nt.jsx)(Zt.div,{tabIndex:-1,...s,ref:h,onKeyDown:m})}));function nn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rn(e,t){for(const n of e)if(!on(n,{upTo:t}))return n}function on(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function an(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}tn.displayName="FocusScope";var sn=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ln(e,t),e.unshift(t)},remove(t){e=ln(e,t),e[0]?.resume()}}}();function ln(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var cn=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{},un=t["useId".toString()]||(()=>{}),dn=0;function pn(t){const[n,r]=e.useState(un());return cn((()=>{t||r((e=>e??String(dn++)))}),[t]),t||(n?`radix-${n}`:"")}const hn=["top","right","bottom","left"],fn=Math.min,mn=Math.max,gn=Math.round,vn=Math.floor,yn=e=>({x:e,y:e}),xn={left:"right",right:"left",bottom:"top",top:"bottom"},bn={start:"end",end:"start"};function wn(e,t,n){return mn(e,fn(t,n))}function En(e,t){return"function"==typeof e?e(t):e}function Pn(e){return e.split("-")[0]}function Sn(e){return e.split("-")[1]}function Cn(e){return"x"===e?"y":"x"}function An(e){return"y"===e?"height":"width"}function Tn(e){return["top","bottom"].includes(Pn(e))?"y":"x"}function On(e){return Cn(Tn(e))}function Mn(e){return e.replace(/start|end/g,(e=>bn[e]))}function jn(e){return e.replace(/left|right|bottom|top/g,(e=>xn[e]))}function Rn(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Dn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Nn(e,t,n){let{reference:r,floating:o}=e;const i=Tn(t),a=On(t),s=An(a),l=Pn(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Sn(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function kn(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=En(t,e),f=Rn(h),m=s[p?"floating"===d?"reference":"floating":d],g=Dn(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),x=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=Dn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-b.top+f.top)/x.y,bottom:(b.bottom-g.bottom+f.bottom)/x.y,left:(g.left-b.left+f.left)/x.x,right:(b.right-g.right+f.right)/x.x}}function Ln(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vn(e){return hn.some((t=>e[t]>=0))}function Fn(){return"undefined"!=typeof window}function In(e){return Zn(e)?(e.nodeName||"").toLowerCase():"#document"}function Bn(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _n(e){var t;return null==(t=(Zn(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Zn(e){return!!Fn()&&(e instanceof Node||e instanceof Bn(e).Node)}function Wn(e){return!!Fn()&&(e instanceof Element||e instanceof Bn(e).Element)}function zn(e){return!!Fn()&&(e instanceof HTMLElement||e instanceof Bn(e).HTMLElement)}function Un(e){return!(!Fn()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Bn(e).ShadowRoot)}function Hn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Gn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Kn(e){return["table","td","th"].includes(In(e))}function $n(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Yn(e){const t=Xn(),n=Wn(e)?Gn(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Xn(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function qn(e){return["html","body","#document"].includes(In(e))}function Gn(e){return Bn(e).getComputedStyle(e)}function Jn(e){return Wn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qn(e){if("html"===In(e))return e;const t=e.assignedSlot||e.parentNode||Un(e)&&e.host||_n(e);return Un(t)?t.host:t}function er(e){const t=Qn(e);return qn(t)?e.ownerDocument?e.ownerDocument.body:e.body:zn(t)&&Hn(t)?t:er(t)}function tr(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=er(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Bn(o);if(i){const e=nr(a);return t.concat(a,a.visualViewport||[],Hn(o)?o:[],e&&n?tr(e):[])}return t.concat(o,tr(o,[],n))}function nr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rr(e){const t=Gn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=zn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=gn(n)!==i||gn(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function or(e){return Wn(e)?e:e.contextElement}function ir(e){const t=or(e);if(!zn(t))return yn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=rr(t);let a=(i?gn(n.width):n.width)/r,s=(i?gn(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const ar=yn(0);function sr(e){const t=Bn(e);return Xn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ar}function lr(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=or(e);let a=yn(1);t&&(r?Wn(r)&&(a=ir(r)):a=ir(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Bn(e))&&t}(i,n,r)?sr(i):yn(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=Bn(i),t=r&&Wn(r)?Bn(r):r;let n=e,o=nr(n);for(;o&&r&&t!==n;){const e=ir(o),t=o.getBoundingClientRect(),r=Gn(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=Bn(o),o=nr(n)}}return Dn({width:u,height:d,x:l,y:c})}function cr(e,t){const n=Jn(e).scrollLeft;return t?t.left+n:lr(_n(e)).left+n}function ur(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:cr(e,r)),y:r.top+t.scrollTop}}function dr(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Bn(e),r=_n(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Xn();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=_n(e),n=Jn(e),r=e.ownerDocument.body,o=mn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=mn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+cr(e);const s=-n.scrollTop;return"rtl"===Gn(r).direction&&(a+=mn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(_n(e));else if(Wn(t))r=function(e,t){const n=lr(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=zn(e)?ir(e):yn(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=sr(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Dn(r)}function pr(e,t){const n=Qn(e);return!(n===t||!Wn(n)||qn(n))&&("fixed"===Gn(n).position||pr(n,t))}function hr(e,t,n){const r=zn(t),o=_n(t),i="fixed"===n,a=lr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=yn(0);if(r||!r&&!i)if(("body"!==In(t)||Hn(o))&&(s=Jn(t)),r){const e=lr(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=cr(o));const c=!o||r||i?yn(0):ur(o,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function fr(e){return"static"===Gn(e).position}function mr(e,t){if(!zn(e)||"fixed"===Gn(e).position)return null;if(t)return t(e);let n=e.offsetParent;return _n(e)===n&&(n=n.ownerDocument.body),n}function gr(e,t){const n=Bn(e);if($n(e))return n;if(!zn(e)){let t=Qn(e);for(;t&&!qn(t);){if(Wn(t)&&!fr(t))return t;t=Qn(t)}return n}let r=mr(e,t);for(;r&&Kn(r)&&fr(r);)r=mr(r,t);return r&&qn(r)&&fr(r)&&!Yn(r)?n:r||function(e){let t=Qn(e);for(;zn(t)&&!qn(t);){if(Yn(t))return t;if($n(t))return null;t=Qn(t)}return null}(e)||n}const vr={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=_n(r),s=!!t&&$n(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=yn(1);const u=yn(0),d=zn(r);if((d||!d&&!i)&&(("body"!==In(r)||Hn(a))&&(l=Jn(r)),zn(r))){const e=lr(r);c=ir(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?yn(0):ur(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:_n,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?$n(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=tr(e,[],!1).filter((e=>Wn(e)&&"body"!==In(e))),o=null;const i="fixed"===Gn(e).position;let a=i?Qn(e):e;for(;Wn(a)&&!qn(a);){const t=Gn(a),n=Yn(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Hn(a)&&!n&&pr(e,a))?r=r.filter((e=>e!==a)):o=t,a=Qn(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=dr(t,n,o);return e.top=mn(r.top,e.top),e.right=fn(r.right,e.right),e.bottom=fn(r.bottom,e.bottom),e.left=mn(r.left,e.left),e}),dr(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:gr,getElementRects:async function(e){const t=this.getOffsetParent||gr,n=this.getDimensions,r=await n(e.floating);return{reference:hr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=rr(e);return{width:t,height:n}},getScale:ir,isElement:Wn,isRTL:function(e){return"rtl"===Gn(e).direction}};function yr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}const xr=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Pn(n),s=Sn(n),l="y"===Tn(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=En(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},br=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=En(e,t),c={x:n,y:r},u=await kn(t,l),d=Tn(Pn(o)),p=Cn(d);let h=c[p],f=c[d];if(i){const e="y"===p?"bottom":"right";h=wn(h+u["y"===p?"top":"left"],h,h-u[e])}if(a){const e="y"===d?"bottom":"right";f=wn(f+u["y"===d?"top":"left"],f,f-u[e])}const m=s.fn({...t,[p]:h,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[d]:a}}}}}},wr=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=En(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=Pn(o),y=Tn(s),x=Pn(s)===s,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(x||!m?[jn(s)]:function(e){const t=jn(e);return[Mn(e),t,Mn(t)]}(s)),E="none"!==f;!p&&E&&w.push(...function(e,t,n,r){const o=Sn(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(Pn(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Mn)))),i}(s,m,f,b));const P=[s,...w],S=await kn(t,g),C=[];let A=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&C.push(S[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Sn(e),o=On(e),i=An(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=jn(a)),[a,jn(a)]}(o,a,b);C.push(S[e[0]],S[e[1]])}if(A=[...A,{placement:o,overflows:C}],!C.every((e=>e<=0))){var T,O;const e=((null==(T=i.flip)?void 0:T.index)||0)+1,t=P[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(O=A.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:O.placement;if(!n)switch(h){case"bestFit":{var M;const e=null==(M=A.filter((e=>{if(E){const t=Tn(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:M[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Er=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=En(e,t),u=await kn(t,c),d=Pn(o),p=Sn(o),h="y"===Tn(o),{width:f,height:m}=i.floating;let g,v;"top"===d||"bottom"===d?(g=d,v=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,g="end"===p?"top":"bottom");const y=m-u.top-u.bottom,x=f-u.left-u.right,b=fn(m-u[g],y),w=fn(f-u[v],x),E=!t.middlewareData.shift;let P=b,S=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=x),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(P=y),E&&!p){const e=mn(u.left,0),t=mn(u.right,0),n=mn(u.top,0),r=mn(u.bottom,0);h?S=f-2*(0!==e||0!==t?e+t:mn(u.left,u.right)):P=m-2*(0!==n||0!==r?n+r:mn(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:P});const C=await a.getDimensions(s.floating);return f!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}},Pr=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=En(e,t);switch(r){case"referenceHidden":{const e=Ln(await kn(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Vn(e)}}}case"escaped":{const e=Ln(await kn(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Vn(e)}}}default:return{}}}}},Sr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=En(e,t)||{};if(null==c)return{};const d=Rn(u),p={x:n,y:r},h=On(o),f=An(h),m=await a.getDimensions(c),g="y"===h,v=g?"top":"left",y=g?"bottom":"right",x=g?"clientHeight":"clientWidth",b=i.reference[f]+i.reference[h]-p[h]-i.floating[f],w=p[h]-i.reference[h],E=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let P=E?E[x]:0;P&&await(null==a.isElement?void 0:a.isElement(E))||(P=s.floating[x]||i.floating[f]);const S=b/2-w/2,C=P/2-m[f]/2-1,A=fn(d[v],C),T=fn(d[y],C),O=A,M=P-m[f]-T,j=P/2-m[f]/2+S,R=wn(O,j,M),D=!l.arrow&&null!=Sn(o)&&j!==R&&i.reference[f]/2-(j<O?A:T)-m[f]/2<0,N=D?j<O?j-O:j-M:0;return{[h]:p[h]+N,data:{[h]:R,centerOffset:j-R-N,...D&&{alignmentOffset:N}},reset:D}}}),Cr=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=En(e,t),u={x:n,y:r},d=Tn(o),p=Cn(d);let h=u[p],f=u[d];const m=En(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+g.mainAxis,n=i.reference[p]+i.reference[e]-g.mainAxis;h<t?h=t:h>n&&(h=n)}if(c){var v,y;const e="y"===p?"width":"height",t=["top","left"].includes(Pn(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?g.crossAxis:0);f<n?f=n:f>r&&(f=r)}return{[p]:h,[d]:f}}}},Ar=(e,t,n)=>{const r=new Map,o={platform:vr,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Nn(c,r,l),p=r,h={},f=0;for(let n=0;n<s.length;n++){const{name:i,fn:m}=s[n],{x:g,y:v,data:y,reset:x}=await m({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,h={...h,[i]:{...h[i],...y}},x&&f<=50&&(f++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(c=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:u,y:d}=Nn(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var Tr="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Or(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Or(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Or(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Mr(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jr(e,t){const n=Mr(e);return Math.round(t*n)/n}function Rr(t){const n=e.useRef(t);return Tr((()=>{n.current=t})),n}const Dr=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Sr({element:n.current,padding:r}).fn(t):{}:n?Sr({element:n,padding:r}).fn(t):{};var o}}),Nr=(e,t)=>({...xr(e),options:[e,t]}),kr=(e,t)=>({...br(e),options:[e,t]}),Lr=(e,t)=>({...Cr(e),options:[e,t]}),Vr=(e,t)=>({...wr(e),options:[e,t]}),Fr=(e,t)=>({...Er(e),options:[e,t]}),Ir=(e,t)=>({...Pr(e),options:[e,t]}),Br=(e,t)=>({...Dr(e),options:[e,t]});var _r=e.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return(0,Nt.jsx)(Zt.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,Nt.jsx)("polygon",{points:"0,0 30,0 15,10"})})}));_r.displayName="Arrow";var Zr=_r,Wr="Popper",[zr,Ur]=kt(Wr),[Hr,Kr]=zr(Wr),$r=t=>{const{__scopePopper:n,children:r}=t,[o,i]=e.useState(null);return(0,Nt.jsx)(Hr,{scope:n,anchor:o,onAnchorChange:i,children:r})};$r.displayName=Wr;var Yr="PopperAnchor",Xr=e.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:o,...i}=t,a=Kr(Yr,r),s=e.useRef(null),l=Dt(n,s);return e.useEffect((()=>{a.onAnchorChange(o?.current||s.current)})),o?null:(0,Nt.jsx)(Zt.div,{...i,ref:l})}));Xr.displayName=Yr;var qr="PopperContent",[Gr,Jr]=zr(qr),Qr=e.forwardRef(((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:f="optimized",onPlaced:m,...g}=t,v=Kr(qr,r),[y,x]=e.useState(null),b=Dt(n,(e=>x(e))),[w,E]=e.useState(null),P=function(t){const[n,r]=e.useState(void 0);return cn((()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;r({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)}),[t]),n}(w),S=P?.width??0,C=P?.height??0,A=o+("center"!==a?"-"+a:""),T="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(u)?u:[u],M=O.length>0,j={padding:T,boundary:O.filter(ro),altBoundary:M},{refs:R,floatingStyles:D,placement:N,isPositioned:k,middlewareData:L}=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,p]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[h,f]=e.useState(o);Or(h,o)||f(o);const[m,g]=e.useState(null),[v,y]=e.useState(null),x=e.useCallback((e=>{e!==P.current&&(P.current=e,g(e))}),[]),b=e.useCallback((e=>{e!==S.current&&(S.current=e,y(e))}),[]),w=a||m,E=s||v,P=e.useRef(null),S=e.useRef(null),C=e.useRef(d),A=null!=c,T=Rr(c),O=Rr(i),M=Rr(u),j=e.useCallback((()=>{if(!P.current||!S.current)return;const e={placement:n,strategy:r,middleware:h};O.current&&(e.platform=O.current),Ar(P.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==M.current};R.current&&!Or(C.current,t)&&(C.current=t,Vt.flushSync((()=>{p(t)})))}))}),[h,n,r,O,M]);Tr((()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[u]);const R=e.useRef(!1);Tr((()=>(R.current=!0,()=>{R.current=!1})),[]),Tr((()=>{if(w&&(P.current=w),E&&(S.current=E),w&&E){if(T.current)return T.current(w,E,j);j()}}),[w,E,j,T,A]);const D=e.useMemo((()=>({reference:P,floating:S,setReference:x,setFloating:b})),[x,b]),N=e.useMemo((()=>({reference:w,floating:E})),[w,E]),k=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!N.floating)return e;const t=jr(N.floating,d.x),n=jr(N.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Mr(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,l,N.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:j,refs:D,elements:N,floatingStyles:k})),[d,j,D,N,k])}({strategy:"fixed",placement:A,whileElementsMounted:(...e)=>function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=or(e),u=o||i?[...c?tr(c):[],...tr(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=_n(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(s||t(),!p||!h)return;const f={rootMargin:-vn(d)+"px "+-vn(o.clientWidth-(u+p))+"px "+-vn(o.clientHeight-(d+h))+"px "+-vn(u)+"px",threshold:mn(0,fn(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||yr(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let m=l?lr(e):null;return l&&function t(){const r=lr(e);m&&!yr(m,r)&&n(),m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}(...e,{animationFrame:"always"===f}),elements:{reference:v.anchor},middleware:[Nr({mainAxis:i+C,alignmentAxis:s}),c&&kr({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?Lr():void 0,...j}),c&&Vr({...j}),Fr({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),w&&Br({element:w,padding:l}),oo({arrowWidth:S,arrowHeight:C}),h&&Ir({strategy:"referenceHidden",...j})]}),[V,F]=io(N),I=Wt(m);cn((()=>{k&&I?.()}),[k,I]);const B=L.arrow?.x,_=L.arrow?.y,Z=0!==L.arrow?.centerOffset,[W,z]=e.useState();return cn((()=>{y&&z(window.getComputedStyle(y).zIndex)}),[y]),(0,Nt.jsx)("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:k?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,Nt.jsx)(Gr,{scope:r,placedSide:V,onArrowChange:E,arrowX:B,arrowY:_,shouldHideArrow:Z,children:(0,Nt.jsx)(Zt.div,{"data-side":V,"data-align":F,...g,ref:b,style:{...g.style,animation:k?void 0:"none"}})})})}));Qr.displayName=qr;var eo="PopperArrow",to={top:"bottom",right:"left",bottom:"top",left:"right"},no=e.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=Jr(eo,n),i=to[o.placedSide];return(0,Nt.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,Nt.jsx)(Zr,{...r,ref:t,style:{...r.style,display:"block"}})})}));function ro(e){return null!==e}no.displayName=eo;var oo=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=io(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+s/2;let h="",f="";return"bottom"===l?(h=i?u:`${d}px`,f=-s+"px"):"top"===l?(h=i?u:`${d}px`,f=`${r.floating.height+s}px`):"right"===l?(h=-s+"px",f=i?u:`${p}px`):"left"===l&&(h=`${r.floating.width+s}px`,f=i?u:`${p}px`),{data:{x:h,y:f}}}});function io(e){const[t,n="center"]=e.split("-");return[t,n]}var ao=$r,so=Xr,lo=Qr,co=no,uo=e.forwardRef(((t,n)=>{const{container:r,...o}=t,[i,a]=e.useState(!1);cn((()=>a(!0)),[]);const s=r||i&&globalThis?.document?.body;return s?Vt.createPortal((0,Nt.jsx)(Zt.div,{...o,ref:n}),s):null}));uo.displayName="Portal";var po=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer(((e,t)=>n[e][t]??e),t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=ho(o.current);a.current="mounted"===l?e:"none"}),[l]),cn((()=>{const e=o.current,n=i.current;if(n!==t){const r=a.current,o=ho(e);c(t?"MOUNT":"none"===o||"none"===e?.display?"UNMOUNT":n&&r!==o?"ANIMATION_OUT":"UNMOUNT"),i.current=t}}),[t,c]),cn((()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const a=ho(o.current).includes(r.animationName);if(r.target===n&&a&&(c("ANIMATION_END"),!i.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)}))}},s=e=>{e.target===n&&(a.current=ho(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")}),[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(n),i="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),a=Dt(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(i));return"function"==typeof r||o.isPresent?e.cloneElement(i,{ref:a}):null};function ho(e){return e?.animationName||"none"}function fo({prop:t,defaultProp:n,onChange:r=()=>{}}){const[o,i]=function({defaultProp:t,onChange:n}){const r=e.useState(t),[o]=r,i=e.useRef(o),a=Wt(n);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==t,s=a?t:o,l=Wt(r);return[s,e.useCallback((e=>{if(a){const n="function"==typeof e?e(t):e;n!==t&&l(n)}else i(e)}),[a,t,i,l])]}po.displayName="Presence";var mo=new WeakMap,go=new WeakMap,vo={},yo=0,xo=function(e){return e&&(e.host||xo(e.parentNode))},bo=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=xo(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);vo[n]||(vo[n]=new WeakMap);var i=vo[n],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(mo.get(e)||0)+1,c=(i.get(e)||0)+1;mo.set(e,l),i.set(e,c),a.push(e),1===l&&o&&go.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),s.clear(),yo++,function(){a.forEach((function(e){var t=mo.get(e)-1,o=i.get(e)-1;mo.set(e,t),i.set(e,o),t||(go.has(e)||e.removeAttribute(r),go.delete(e)),o||e.removeAttribute(n)})),--yo||(mo=new WeakMap,mo=new WeakMap,go=new WeakMap,vo={})}}(r,o,n,"aria-hidden")):function(){return null}},wo=function(){return wo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},wo.apply(this,arguments)};function Eo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var Po="right-scroll-bar-position",So="width-before-scroll-bar";function Co(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Ao="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,To=new WeakMap;function Oo(e){return e}var Mo=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Oo);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}};return o}(null);return t.options=wo({async:!0,ssr:!1},e),t}(),jo=function(){},Ro=e.forwardRef((function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:jo,onWheelCapture:jo,onTouchMoveCapture:jo}),i=o[0],a=o[1],s=t.forwardProps,l=t.children,c=t.className,u=t.removeScrollBar,d=t.enabled,p=t.shards,h=t.sideCar,f=t.noIsolation,m=t.inert,g=t.allowPinchZoom,v=t.as,y=void 0===v?"div":v,x=t.gapMode,b=Eo(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,E=function(t,n){var r,o,i,a=(r=n||null,o=function(e){return t.forEach((function(t){return Co(t,e)}))},(i=(0,e.useState)((function(){return{value:r,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade);return Ao((function(){var e=To.get(a);if(e){var n=new Set(e),r=new Set(t),o=a.current;n.forEach((function(e){r.has(e)||Co(e,null)})),r.forEach((function(e){n.has(e)||Co(e,o)}))}To.set(a,t)}),[t]),a}([r,n]),P=wo(wo({},b),i);return e.createElement(e.Fragment,null,d&&e.createElement(w,{sideCar:Mo,removeScrollBar:u,shards:p,noIsolation:f,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:x}),s?e.cloneElement(e.Children.only(l),wo(wo({},P),{ref:E})):e.createElement(y,wo({},P,{className:c,ref:E}),l))}));Ro.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ro.classNames={fullWidth:So,zeroRight:Po};var Do=function(t){var n=t.sideCar,r=Eo(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,wo({},r))};Do.isSideCarExport=!0;var No=function(){var e=0,t=null;return{add:function(n){0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=a.nc;return t&&e.setAttribute("nonce",t),e}())&&(function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ko=function(){var t,n=(t=No(),function(n,r){e.useEffect((function(){return t.add(n),function(){t.remove()}}),[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},Lo={left:0,top:0,right:0,gap:0},Vo=function(e){return parseInt(e||"",10)||0},Fo=ko(),Io="data-scroll-locked",Bo=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Io,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Po," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(So," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Po," .").concat(Po," {\n right: 0 ").concat(r,";\n }\n \n .").concat(So," .").concat(So," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Io,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},_o=function(){var e=parseInt(document.body.getAttribute(Io)||"0",10);return isFinite(e)?e:0},Zo=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(Io,(_o()+1).toString()),function(){var e=_o()-1;e<=0?document.body.removeAttribute(Io):document.body.setAttribute(Io,e.toString())}}),[]);var a=e.useMemo((function(){return function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Lo;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Vo(n),Vo(r),Vo(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}}(i)}),[i]);return e.createElement(Fo,{styles:Bo(a,!n,i,r?"":"!important")})},Wo=!1;if("undefined"!=typeof window)try{var zo=Object.defineProperty({},"passive",{get:function(){return Wo=!0,!0}});window.addEventListener("test",zo,zo),window.removeEventListener("test",zo,zo)}catch(e){Wo=!1}var Uo=!!Wo&&{passive:!1},Ho=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Ko=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),$o(e,r)){var o=Yo(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$o=function(e,t){return"v"===e?function(e){return Ho(e,"overflowY")}(t):function(e){return Ho(e,"overflowX")}(t)},Yo=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Xo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qo=function(e){return[e.deltaX,e.deltaY]},Go=function(e){return e&&"current"in e?e.current:e},Jo=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Qo=0,ei=[];function ti(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ni=(ri=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),i=e.useState(Qo++)[0],a=e.useState(ko)[0],s=e.useRef(t);e.useEffect((function(){s.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([t.lockRef.current],(t.shards||[]).map(Go),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var l=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,i=Xo(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=Ko(d,u);if(!p)return!0;if(p?n=d:(n="v"===d?"h":"v",p=Ko(d,u)),!p)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var h=o.current||n;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,s=t.contains(a),l=!1,c=i>0,u=0,d=0;do{var p=Yo(e,a),h=p[0],f=p[1]-p[2]-o*h;(h||f)&&$o(e,a)&&(u+=f,d+=h),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!s&&a!==document.body||s&&(t.contains(a)||t===a));return(c&&(Math.abs(u)<1||!1)||!c&&(Math.abs(d)<1||!1))&&(l=!0),l}(h,t,e,"h"===h?l:c)}),[]),c=e.useCallback((function(e){var t=e;if(ei.length&&ei[ei.length-1]===a){var r="deltaY"in t?qo(t):Xo(t),o=n.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(s.current.shards||[]).map(Go).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?l(t,i[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,r,o){var i={name:e,delta:t,target:r,should:o,shadowParent:ti(r)};n.current.push(i),setTimeout((function(){n.current=n.current.filter((function(e){return e!==i}))}),1)}),[]),d=e.useCallback((function(e){r.current=Xo(e),o.current=void 0}),[]),p=e.useCallback((function(e){u(e.type,qo(e),e.target,l(e,t.lockRef.current))}),[]),h=e.useCallback((function(e){u(e.type,Xo(e),e.target,l(e,t.lockRef.current))}),[]);e.useEffect((function(){return ei.push(a),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Uo),document.addEventListener("touchmove",c,Uo),document.addEventListener("touchstart",d,Uo),function(){ei=ei.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,Uo),document.removeEventListener("touchmove",c,Uo),document.removeEventListener("touchstart",d,Uo)}}),[]);var f=t.removeScrollBar,m=t.inert;return e.createElement(e.Fragment,null,m?e.createElement(a,{styles:Jo(i)}):null,f?e.createElement(Zo,{gapMode:t.gapMode}):null)},Mo.useMedium(ri),Do);var ri,oi=e.forwardRef((function(t,n){return e.createElement(Ro,wo({},t,{ref:n,sideCar:ni}))}));oi.classNames=Ro.classNames;const ii=oi;var ai="Popover",[si,li]=kt(ai,[Ur]),ci=Ur(),[ui,di]=si(ai),pi=t=>{const{__scopePopover:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!1}=t,l=ci(n),c=e.useRef(null),[u,d]=e.useState(!1),[p=!1,h]=fo({prop:o,defaultProp:i,onChange:a});return(0,Nt.jsx)(ao,{...l,children:(0,Nt.jsx)(ui,{scope:n,contentId:pn(),triggerRef:c,open:p,onOpenChange:h,onOpenToggle:e.useCallback((()=>h((e=>!e))),[h]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback((()=>d(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>d(!1)),[]),modal:s,children:r})})};pi.displayName=ai;var hi="PopoverAnchor";e.forwardRef(((t,n)=>{const{__scopePopover:r,...o}=t,i=di(hi,r),a=ci(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return e.useEffect((()=>(s(),()=>l())),[s,l]),(0,Nt.jsx)(so,{...a,...o,ref:n})})).displayName=hi;var fi="PopoverTrigger",mi=e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=di(fi,n),i=ci(n),a=Dt(t,o.triggerRef),s=(0,Nt.jsx)(Zt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ai(o.open),...r,ref:a,onClick:Mt(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:(0,Nt.jsx)(so,{asChild:!0,...i,children:s})}));mi.displayName=fi;var gi="PopoverPortal",[vi,yi]=si(gi,{forceMount:void 0}),xi=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=di(gi,t);return(0,Nt.jsx)(vi,{scope:t,forceMount:n,children:(0,Nt.jsx)(po,{present:n||i.open,children:(0,Nt.jsx)(uo,{asChild:!0,container:o,children:r})})})};xi.displayName=gi;var bi="PopoverContent",wi=e.forwardRef(((e,t)=>{const n=yi(bi,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=di(bi,e.__scopePopover);return(0,Nt.jsx)(po,{present:r||i.open,children:i.modal?(0,Nt.jsx)(Ei,{...o,ref:t}):(0,Nt.jsx)(Pi,{...o,ref:t})})}));wi.displayName=bi;var Ei=e.forwardRef(((t,n)=>{const r=di(bi,t.__scopePopover),o=e.useRef(null),i=Dt(n,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return bo(e)}),[]),(0,Nt.jsx)(ii,{as:Ft,allowPinchZoom:!0,children:(0,Nt.jsx)(Si,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Mt(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()})),onPointerDownOutside:Mt(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:Mt(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),Pi=e.forwardRef(((t,n)=>{const r=di(bi,t.__scopePopover),o=e.useRef(!1),i=e.useRef(!1);return(0,Nt.jsx)(Si,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),Si=e.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,p=di(bi,n),h=ci(n);return qt(),(0,Nt.jsx)(tn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:(0,Nt.jsx)(Kt,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:(0,Nt.jsx)(lo,{"data-state":Ai(p.open),role:"dialog",id:p.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),Ci="PopoverClose";function Ai(e){return e?"open":"closed"}e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=di(Ci,n);return(0,Nt.jsx)(Zt.button,{type:"button",...r,ref:t,onClick:Mt(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=Ci,e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=ci(n);return(0,Nt.jsx)(co,{...o,...r,ref:t})})).displayName="PopoverArrow";var Ti=xi,Oi=wi,Mi=function(){return Mi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Mi.apply(this,arguments)},ji=pi,Ri=mi,Di=e.forwardRef((function(t,n){var r=t.className,o=t.align,i=void 0===o?"center":o,a=t.sideOffset,s=void 0===a?4:a,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["className","align","sideOffset"]);return e.createElement(Ti,null,e.createElement(Oi,Mi({ref:n,align:i,sideOffset:s,className:Se("z-50 w-72 rounded-default bg-white p-4 text-popover-foreground shadow-xl outline-hidden data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r)},l)))}));Di.displayName=Oi.displayName;var Ni=function(){return Ni=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ni.apply(this,arguments)},ki=(0,e.forwardRef)((function(e,t){var r=e.id,o=e.label,i=(e.onChange,e.size),a=void 0===i?"normal":i,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["id","label","onChange","size"]),l={small:"w-3 h-3 text-xs",normal:"w-4 h-4 text-base",large:"w-6 h-6 text-lg"},c=l[a];return n().createElement("div",{className:"flex items-center gap-4 ".concat(l[a])},n().createElement("input",Ni({},s,{id:r,ref:t,type:"radio",className:"".concat(c," border-green-500")})),n().createElement("label",{htmlFor:r,className:"cursor-pointer"},o))}));ki.displayName="Radio";const Li=ki;function Vi(e,t){return Vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vi(e,t)}function Fi(e){return e&&e.stopPropagation&&e.stopPropagation(),e&&e.preventDefault&&e.preventDefault(),!1}function Ii(e){return null==e?[]:Array.isArray(e)?e.slice():[e]}function Bi(e){return null!==e&&1===e.length?e[0]:e.slice()}function _i(e){Object.keys(e).forEach((t=>{"undefined"!=typeof document&&document.addEventListener(t,e[t],!1)}))}function Zi(e,t){return Wi(function(e,t){let n=e;return n<=t.min&&(n=t.min),n>=t.max&&(n=t.max),n}(e,t),t)}function Wi(e,t){const n=(e-t.min)%t.step;let r=e-n;return 2*Math.abs(n)>=t.step&&(r+=n>0?t.step:-t.step),parseFloat(r.toFixed(5))}let zi=function(t){function n(n){var r;(r=t.call(this,n)||this).onKeyUp=()=>{r.onEnd()},r.onMouseUp=()=>{r.onEnd(r.getMouseEventMap())},r.onTouchEnd=e=>{e.preventDefault(),r.onEnd(r.getTouchEventMap())},r.onBlur=()=>{r.setState({index:-1},r.onEnd(r.getKeyDownEventMap()))},r.onMouseMove=e=>{r.setState({pending:!0});const t=r.getMousePosition(e),n=r.getDiffPosition(t[0]),o=r.getValueFromPosition(n);r.move(o)},r.onTouchMove=e=>{if(e.touches.length>1)return;r.setState({pending:!0});const t=r.getTouchPosition(e);if(void 0===r.isScrolling){const e=t[0]-r.startPosition[0],n=t[1]-r.startPosition[1];r.isScrolling=Math.abs(n)>Math.abs(e)}if(r.isScrolling)return void r.setState({index:-1});const n=r.getDiffPosition(t[0]),o=r.getValueFromPosition(n);r.move(o)},r.onKeyDown=e=>{if(!(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey))switch(r.setState({pending:!0}),e.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":e.preventDefault(),r.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":e.preventDefault(),r.moveUpByStep();break;case"Home":e.preventDefault(),r.move(r.props.min);break;case"End":e.preventDefault(),r.move(r.props.max);break;case"PageDown":e.preventDefault(),r.moveDownByStep(r.props.pageFn(r.props.step));break;case"PageUp":e.preventDefault(),r.moveUpByStep(r.props.pageFn(r.props.step))}},r.onSliderMouseDown=e=>{if(!r.props.disabled&&2!==e.button){if(r.setState({pending:!0}),!r.props.snapDragDisabled){const t=r.getMousePosition(e);r.forceValueFromPosition(t[0],(e=>{r.start(e,t[0]),_i(r.getMouseEventMap())}))}Fi(e)}},r.onSliderClick=e=>{if(!r.props.disabled&&r.props.onSliderClick&&!r.hasMoved){const t=r.getMousePosition(e),n=Zi(r.calcValue(r.calcOffsetFromPosition(t[0])),r.props);r.props.onSliderClick(n)}},r.createOnKeyDown=e=>t=>{r.props.disabled||(r.start(e),_i(r.getKeyDownEventMap()),Fi(t))},r.createOnMouseDown=e=>t=>{if(r.props.disabled||2===t.button)return;r.setState({pending:!0});const n=r.getMousePosition(t);r.start(e,n[0]),_i(r.getMouseEventMap()),Fi(t)},r.createOnTouchStart=e=>t=>{if(r.props.disabled||t.touches.length>1)return;r.setState({pending:!0});const n=r.getTouchPosition(t);r.startPosition=n,r.isScrolling=void 0,r.start(e,n[0]),_i(r.getTouchEventMap()),function(e){e.stopPropagation&&e.stopPropagation()}(t)},r.handleResize=()=>{const e=window.setTimeout((()=>{r.pendingResizeTimeouts.shift(),r.resize()}),0);r.pendingResizeTimeouts.push(e)},r.renderThumb=(e,t)=>{const n=r.props.thumbClassName+" "+r.props.thumbClassName+"-"+t+" "+(r.state.index===t?r.props.thumbActiveClassName:""),o={ref:e=>{r["thumb"+t]=e},key:r.props.thumbClassName+"-"+t,className:n,style:e,onMouseDown:r.createOnMouseDown(t),onTouchStart:r.createOnTouchStart(t),onFocus:r.createOnKeyDown(t),tabIndex:0,role:"slider","aria-orientation":r.props.orientation,"aria-valuenow":r.state.value[t],"aria-valuemin":r.props.min,"aria-valuemax":r.props.max,"aria-label":Array.isArray(r.props.ariaLabel)?r.props.ariaLabel[t]:r.props.ariaLabel,"aria-labelledby":Array.isArray(r.props.ariaLabelledby)?r.props.ariaLabelledby[t]:r.props.ariaLabelledby,"aria-disabled":r.props.disabled},i={index:t,value:Bi(r.state.value),valueNow:r.state.value[t]};return r.props.ariaValuetext&&(o["aria-valuetext"]="string"==typeof r.props.ariaValuetext?r.props.ariaValuetext:r.props.ariaValuetext(i)),r.props.renderThumb(o,i)},r.renderTrack=(e,t,n)=>{const o={key:r.props.trackClassName+"-"+e,className:r.props.trackClassName+" "+r.props.trackClassName+"-"+e,style:r.buildTrackStyle(t,r.state.upperBound-n)},i={index:e,value:Bi(r.state.value)};return r.props.renderTrack(o,i)};let o=Ii(n.value);o.length||(o=Ii(n.defaultValue)),r.pendingResizeTimeouts=[];const i=[];for(let e=0;e<o.length;e+=1)o[e]=Zi(o[e],n),i.push(e);return r.resizeObserver=null,r.resizeElementRef=e.createRef(),r.state={index:-1,upperBound:0,sliderLength:0,value:o,zIndices:i},r}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Vi(e,t)}(n,t);var r=n.prototype;return r.componentDidMount=function(){"undefined"!=typeof window&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.resizeElementRef.current),this.resize())},n.getDerivedStateFromProps=function(e,t){const n=Ii(e.value);return n.length?t.pending?null:{value:n.map((t=>Zi(t,e)))}:null},r.componentDidUpdate=function(){0===this.state.upperBound&&this.resize()},r.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},r.onEnd=function(e){e&&function(e){Object.keys(e).forEach((t=>{"undefined"!=typeof document&&document.removeEventListener(t,e[t],!1)}))}(e),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},r.getValue=function(){return Bi(this.state.value)},r.getClosestIndex=function(e){let t=Number.MAX_VALUE,n=-1;const{value:r}=this.state,o=r.length;for(let i=0;i<o;i+=1){const o=this.calcOffset(r[i]),a=Math.abs(e-o);a<t&&(t=a,n=i)}return n},r.getMousePosition=function(e){return[e["page"+this.axisKey()],e["page"+this.orthogonalAxisKey()]]},r.getTouchPosition=function(e){const t=e.touches[0];return[t["page"+this.axisKey()],t["page"+this.orthogonalAxisKey()]]},r.getKeyDownEventMap=function(){return{keydown:this.onKeyDown,keyup:this.onKeyUp,focusout:this.onBlur}},r.getMouseEventMap=function(){return{mousemove:this.onMouseMove,mouseup:this.onMouseUp}},r.getTouchEventMap=function(){return{touchmove:this.onTouchMove,touchend:this.onTouchEnd}},r.getValueFromPosition=function(e){const t=e/(this.state.sliderLength-this.state.thumbSize)*(this.props.max-this.props.min);return Zi(this.state.startValue+t,this.props)},r.getDiffPosition=function(e){let t=e-this.state.startPosition;return this.props.invert&&(t*=-1),t},r.resize=function(){const{slider:e,thumb0:t}=this;if(!e||!t)return;const n=this.sizeKey(),r=e.getBoundingClientRect(),o=e[n],i=r[this.posMaxKey()],a=r[this.posMinKey()],s=t.getBoundingClientRect()[n.replace("client","").toLowerCase()],l=o-s,c=Math.abs(i-a);this.state.upperBound===l&&this.state.sliderLength===c&&this.state.thumbSize===s||this.setState({upperBound:l,sliderLength:c,thumbSize:s})},r.calcOffset=function(e){const t=this.props.max-this.props.min;return 0===t?0:(e-this.props.min)/t*this.state.upperBound},r.calcValue=function(e){return e/this.state.upperBound*(this.props.max-this.props.min)+this.props.min},r.calcOffsetFromPosition=function(e){const{slider:t}=this,n=t.getBoundingClientRect(),r=n[this.posMaxKey()],o=n[this.posMinKey()];let i=e-(window["page"+this.axisKey()+"Offset"]+(this.props.invert?r:o));return this.props.invert&&(i=this.state.sliderLength-i),i-=this.state.thumbSize/2,i},r.forceValueFromPosition=function(e,t){const n=this.calcOffsetFromPosition(e),r=this.getClosestIndex(n),o=Zi(this.calcValue(n),this.props),i=this.state.value.slice();i[r]=o;for(let e=0;e<i.length-1;e+=1)if(i[e+1]-i[e]<this.props.minDistance)return;this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0,this.setState({value:i},(()=>{t(r),this.fireChangeEvent("onChange")}))},r.clearPendingResizeTimeouts=function(){do{const e=this.pendingResizeTimeouts.shift();clearTimeout(e)}while(this.pendingResizeTimeouts.length)},r.start=function(e,t){const n=this["thumb"+e];n&&n.focus();const{zIndices:r}=this.state;r.splice(r.indexOf(e),1),r.push(e),this.setState((n=>({startValue:n.value[e],startPosition:void 0!==t?t:n.startPosition,index:e,zIndices:r})))},r.moveUpByStep=function(e){void 0===e&&(e=this.props.step);const t=this.state.value[this.state.index],n=Zi(this.props.invert&&"horizontal"===this.props.orientation?t-e:t+e,this.props);this.move(Math.min(n,this.props.max))},r.moveDownByStep=function(e){void 0===e&&(e=this.props.step);const t=this.state.value[this.state.index],n=Zi(this.props.invert&&"horizontal"===this.props.orientation?t+e:t-e,this.props);this.move(Math.max(n,this.props.min))},r.move=function(e){const t=this.state.value.slice(),{index:n}=this.state,{length:r}=t,o=t[n];if(e===o)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:i,max:a,min:s,minDistance:l}=this.props;if(!i){if(n>0){const r=t[n-1];e<r+l&&(e=r+l)}if(n<r-1){const r=t[n+1];e>r-l&&(e=r-l)}}t[n]=e,i&&r>1&&(e>o?(this.pushSucceeding(t,l,n),function(e,t,n,r){for(let o=0;o<e;o+=1){const i=r-o*n;t[e-1-o]>i&&(t[e-1-o]=i)}}(r,t,l,a)):e<o&&(this.pushPreceding(t,l,n),function(e,t,n,r){for(let o=0;o<e;o+=1){const e=r+o*n;t[o]<e&&(t[o]=e)}}(r,t,l,s))),this.setState({value:t},this.fireChangeEvent.bind(this,"onChange"))},r.pushSucceeding=function(e,t,n){let r,o;for(r=n,o=e[r]+t;null!==e[r+1]&&o>e[r+1];r+=1,o=e[r]+t)e[r+1]=Wi(o,this.props)},r.pushPreceding=function(e,t,n){for(let r=n,o=e[r]-t;null!==e[r-1]&&o<e[r-1];r-=1,o=e[r]-t)e[r-1]=Wi(o,this.props)},r.axisKey=function(){return"vertical"===this.props.orientation?"Y":"X"},r.orthogonalAxisKey=function(){return"vertical"===this.props.orientation?"X":"Y"},r.posMinKey=function(){return"vertical"===this.props.orientation?this.props.invert?"bottom":"top":this.props.invert?"right":"left"},r.posMaxKey=function(){return"vertical"===this.props.orientation?this.props.invert?"top":"bottom":this.props.invert?"left":"right"},r.sizeKey=function(){return"vertical"===this.props.orientation?"clientHeight":"clientWidth"},r.fireChangeEvent=function(e){this.props[e]&&this.props[e](Bi(this.state.value),this.state.index)},r.buildThumbStyle=function(e,t){const n={position:"absolute",touchAction:"none",willChange:this.state.index>=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(t)+1};return n[this.posMinKey()]=e+"px",n},r.buildTrackStyle=function(e,t){const n={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return n[this.posMinKey()]=e,n[this.posMaxKey()]=t,n},r.buildMarkStyle=function(e){var t;return(t={position:"absolute"})[this.posMinKey()]=e,t},r.renderThumbs=function(e){const{length:t}=e,n=[];for(let r=0;r<t;r+=1)n[r]=this.buildThumbStyle(e[r],r);const r=[];for(let e=0;e<t;e+=1)r[e]=this.renderThumb(n[e],e);return r},r.renderTracks=function(e){const t=[],n=e.length-1;t.push(this.renderTrack(0,0,e[0]));for(let r=0;r<n;r+=1)t.push(this.renderTrack(r+1,e[r],e[r+1]));return t.push(this.renderTrack(n+1,e[n],this.state.upperBound)),t},r.renderMarks=function(){let{marks:e}=this.props;const t=this.props.max-this.props.min+1;return"boolean"==typeof e?e=Array.from({length:t}).map(((e,t)=>t)):"number"==typeof e&&(e=Array.from({length:t}).map(((e,t)=>t)).filter((t=>t%e==0))),e.map(parseFloat).sort(((e,t)=>e-t)).map((e=>{const t=this.calcOffset(e),n={key:e,className:this.props.markClassName,style:this.buildMarkStyle(t)};return this.props.renderMark(n)}))},r.render=function(){const t=[],{value:n}=this.state,r=n.length;for(let e=0;e<r;e+=1)t[e]=this.calcOffset(n[e],e);const o=this.props.withTracks?this.renderTracks(t):null,i=this.renderThumbs(t),a=this.props.marks?this.renderMarks():null;return e.createElement("div",{ref:e=>{this.slider=e,this.resizeElementRef.current=e},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},o,i,a)},n}(e.Component);zi.displayName="ReactSlider",zi.defaultProps={min:0,max:100,step:1,pageFn:e=>10*e,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:t=>e.createElement("div",t),renderTrack:t=>e.createElement("div",t),renderMark:t=>e.createElement("span",t)};var Ui=zi;const Hi=(0,e.memo)((function(t){var r=t.min,o=t.max,i=t.onChange,a=t.disabled,s=void 0!==a&&a,l=t.initialValues,c=(0,e.useState)(null!=l?l:[r||0,o||1e3]),u=c[0],d=c[1];return n().createElement("div",{className:"w-full flex flex-col gap-[5px]"},n().createElement("p",{className:"text-primary-900 text-sm select-none"},"".concat(u[0]," - ").concat(u[1])),n().createElement(Ui,{className:"slider",disabled:s,min:r||1,max:o||1e3,value:l,onChange:function(e){return d(e)},ariaLabel:["Lower thumb","Upper thumb"],onAfterChange:function(e){null==i||i(e)},minDistance:10,pearling:!0}))}),(function(e,t){return e.min===t.min&&e.max===t.max&&e.disabled===t.disabled&&e.initialValues===t.initialValues}));function Ki(e,[t,n]){return Math.min(n,Math.max(t,e))}var $i=e.createContext(void 0),Yi=e.forwardRef(((e,t)=>(0,Nt.jsx)(Zt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));Yi.displayName="VisuallyHidden";var Xi=Yi,qi=[" ","Enter","ArrowUp","ArrowDown"],Gi=[" ","Enter"],Ji="Select",[Qi,ea,ta]=function(t){const n=t+"CollectionProvider",[r,o]=kt(n),[i,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=t=>{const{scope:n,children:r}=t,o=e.useRef(null),a=e.useRef(new Map).current;return(0,Nt.jsx)(i,{scope:n,itemMap:a,collectionRef:o,children:r})};s.displayName=n;const l=t+"CollectionSlot",c=e.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Dt(t,a(l,n).collectionRef);return(0,Nt.jsx)(Ft,{ref:o,children:r})}));c.displayName=l;const u=t+"CollectionItemSlot",d="data-radix-collection-item",p=e.forwardRef(((t,n)=>{const{scope:r,children:o,...i}=t,s=e.useRef(null),l=Dt(n,s),c=a(u,r);return e.useEffect((()=>(c.itemMap.set(s,{ref:s,...i}),()=>{c.itemMap.delete(s)}))),(0,Nt.jsx)(Ft,{[d]:"",ref:l,children:o})}));return p.displayName=u,[{Provider:s,Slot:c,ItemSlot:p},function(n){const r=a(t+"CollectionConsumer",n),o=e.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`)),n=Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)));return n}),[r.collectionRef,r.itemMap]);return o},o]}(Ji),[na,ra]=kt(Ji,[ta,Ur]),oa=Ur(),[ia,aa]=na(Ji),[sa,la]=na(Ji),ca=t=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:i,onOpenChange:a,value:s,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:p,disabled:h,required:f,form:m}=t,g=oa(n),[v,y]=e.useState(null),[x,b]=e.useState(null),[w,E]=e.useState(!1),P=function(t){const n=e.useContext($i);return t||n||"ltr"}(u),[S=!1,C]=fo({prop:o,defaultProp:i,onChange:a}),[A,T]=fo({prop:s,defaultProp:l,onChange:c}),O=e.useRef(null),M=!v||m||!!v.closest("form"),[j,R]=e.useState(new Set),D=Array.from(j).map((e=>e.props.value)).join(";");return(0,Nt.jsx)(ao,{...g,children:(0,Nt.jsxs)(ia,{required:f,scope:n,trigger:v,onTriggerChange:y,valueNode:x,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:E,contentId:pn(),value:A,onValueChange:T,open:S,onOpenChange:C,dir:P,triggerPointerDownPosRef:O,disabled:h,children:[(0,Nt.jsx)(Qi.Provider,{scope:n,children:(0,Nt.jsx)(sa,{scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback((e=>{R((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:e.useCallback((e=>{R((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:r})}),M?(0,Nt.jsxs)(qa,{"aria-hidden":!0,required:f,tabIndex:-1,name:d,autoComplete:p,value:A,onChange:e=>T(e.target.value),disabled:h,form:m,children:[void 0===A?(0,Nt.jsx)("option",{value:""}):null,Array.from(j)]},D):null]})})};ca.displayName=Ji;var ua="SelectTrigger",da=e.forwardRef(((t,n)=>{const{__scopeSelect:r,disabled:o=!1,...i}=t,a=oa(r),s=aa(ua,r),l=s.disabled||o,c=Dt(n,s.onTriggerChange),u=ea(r),d=e.useRef("touch"),[p,h,f]=Ga((e=>{const t=u().filter((e=>!e.disabled)),n=t.find((e=>e.value===s.value)),r=Ja(t,e,n);void 0!==r&&s.onValueChange(r.value)})),m=e=>{l||(s.onOpenChange(!0),f()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,Nt.jsx)(so,{asChild:!0,...a,children:(0,Nt.jsx)(Zt.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Xa(s.value)?"":void 0,...i,ref:c,onClick:Mt(i.onClick,(e=>{e.currentTarget.focus(),"mouse"!==d.current&&m(e)})),onPointerDown:Mt(i.onPointerDown,(e=>{d.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(m(e),e.preventDefault())})),onKeyDown:Mt(i.onKeyDown,(e=>{const t=""!==p.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),t&&" "===e.key||qi.includes(e.key)&&(m(),e.preventDefault())}))})})}));da.displayName=ua;var pa="SelectValue",ha=e.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...s}=e,l=aa(pa,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==i,d=Dt(t,l.onValueNodeChange);return cn((()=>{c(u)}),[c,u]),(0,Nt.jsx)(Zt.span,{...s,ref:d,style:{pointerEvents:"none"},children:Xa(l.value)?(0,Nt.jsx)(Nt.Fragment,{children:a}):i})}));ha.displayName=pa;var fa=e.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return(0,Nt.jsx)(Zt.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})}));fa.displayName="SelectIcon";var ma=e=>(0,Nt.jsx)(uo,{asChild:!0,...e});ma.displayName="SelectPortal";var ga="SelectContent",va=e.forwardRef(((t,n)=>{const r=aa(ga,t.__scopeSelect),[o,i]=e.useState();if(cn((()=>{i(new DocumentFragment)}),[]),!r.open){const e=o;return e?Vt.createPortal((0,Nt.jsx)(xa,{scope:t.__scopeSelect,children:(0,Nt.jsx)(Qi.Slot,{scope:t.__scopeSelect,children:(0,Nt.jsx)("div",{children:t.children})})}),e):null}return(0,Nt.jsx)(wa,{...t,ref:n})}));va.displayName=ga;var ya=10,[xa,ba]=na(ga),wa=e.forwardRef(((t,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:h,collisionPadding:f,sticky:m,hideWhenDetached:g,avoidCollisions:v,...y}=t,x=aa(ga,r),[b,w]=e.useState(null),[E,P]=e.useState(null),S=Dt(n,(e=>w(e))),[C,A]=e.useState(null),[T,O]=e.useState(null),M=ea(r),[j,R]=e.useState(!1),D=e.useRef(!1);e.useEffect((()=>{if(b)return bo(b)}),[b]),qt();const N=e.useCallback((e=>{const[t,...n]=M().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&E&&(E.scrollTop=0),n===r&&E&&(E.scrollTop=E.scrollHeight),n?.focus(),document.activeElement!==o)return}}),[M,E]),k=e.useCallback((()=>N([C,b])),[N,C,b]);e.useEffect((()=>{j&&k()}),[j,k]);const{onOpenChange:L,triggerPointerDownPosRef:V}=x;e.useEffect((()=>{if(b){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(V.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(V.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),V.current=null};return null!==V.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[b,L,V]),e.useEffect((()=>{const e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[L]);const[F,I]=Ga((e=>{const t=M().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=Ja(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),B=e.useCallback(((e,t,n)=>{const r=!D.current&&!n;(void 0!==x.value&&x.value===t||r)&&(A(e),r&&(D.current=!0))}),[x.value]),_=e.useCallback((()=>b?.focus()),[b]),Z=e.useCallback(((e,t,n)=>{const r=!D.current&&!n;(void 0!==x.value&&x.value===t||r)&&O(e)}),[x.value]),W="popper"===o?Pa:Ea,z=W===Pa?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:h,collisionPadding:f,sticky:m,hideWhenDetached:g,avoidCollisions:v}:{};return(0,Nt.jsx)(xa,{scope:r,content:b,viewport:E,onViewportChange:P,itemRefCallback:B,selectedItem:C,onItemLeave:_,itemTextRefCallback:Z,focusSelectedItem:k,selectedItemText:T,position:o,isPositioned:j,searchRef:F,children:(0,Nt.jsx)(ii,{as:Ft,allowPinchZoom:!0,children:(0,Nt.jsx)(tn,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Mt(i,(e=>{x.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:(0,Nt.jsx)(Kt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:(0,Nt.jsx)(W,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:e=>e.preventDefault(),...y,...z,onPlaced:()=>R(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Mt(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||I(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=M().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>N(t))),e.preventDefault()}}))})})})})})}));wa.displayName="SelectContentImpl";var Ea=e.forwardRef(((t,n)=>{const{__scopeSelect:r,onPlaced:o,...i}=t,a=aa(ga,r),s=ba(ga,r),[l,c]=e.useState(null),[u,d]=e.useState(null),p=Dt(n,(e=>d(e))),h=ea(r),f=e.useRef(!1),m=e.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:y,focusSelectedItem:x}=s,b=e.useCallback((()=>{if(a.trigger&&a.valueNode&&l&&u&&g&&v&&y){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),r=y.getBoundingClientRect();if("rtl"!==a.dir){const o=r.left-t.left,i=n.left-o,a=e.left-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-ya,d=Ki(i,[ya,Math.max(ya,u-c)]);l.style.minWidth=s+"px",l.style.left=d+"px"}else{const o=t.right-r.right,i=window.innerWidth-n.right-o,a=window.innerWidth-e.right-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-ya,d=Ki(i,[ya,Math.max(ya,u-c)]);l.style.minWidth=s+"px",l.style.right=d+"px"}const i=h(),s=window.innerHeight-2*ya,c=g.scrollHeight,d=window.getComputedStyle(u),p=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),x=parseInt(d.borderBottomWidth,10),b=p+m+c+parseInt(d.paddingBottom,10)+x,w=Math.min(5*v.offsetHeight,b),E=window.getComputedStyle(g),P=parseInt(E.paddingTop,10),S=parseInt(E.paddingBottom,10),C=e.top+e.height/2-ya,A=s-C,T=v.offsetHeight/2,O=p+m+(v.offsetTop+T),M=b-O;if(O<=C){const e=i.length>0&&v===i[i.length-1].ref.current;l.style.bottom="0px";const t=u.clientHeight-g.offsetTop-g.offsetHeight,n=O+Math.max(A,T+(e?S:0)+t+x);l.style.height=n+"px"}else{const e=i.length>0&&v===i[0].ref.current;l.style.top="0px";const t=Math.max(C,p+g.offsetTop+(e?P:0)+T)+M;l.style.height=t+"px",g.scrollTop=O-C+g.offsetTop}l.style.margin=`${ya}px 0`,l.style.minHeight=w+"px",l.style.maxHeight=s+"px",o?.(),requestAnimationFrame((()=>f.current=!0))}}),[h,a.trigger,a.valueNode,l,u,g,v,y,a.dir,o]);cn((()=>b()),[b]);const[w,E]=e.useState();cn((()=>{u&&E(window.getComputedStyle(u).zIndex)}),[u]);const P=e.useCallback((e=>{e&&!0===m.current&&(b(),x?.(),m.current=!1)}),[b,x]);return(0,Nt.jsx)(Sa,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:f,onScrollButtonChange:P,children:(0,Nt.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,Nt.jsx)(Zt.div,{...i,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})}));Ea.displayName="SelectItemAlignedPosition";var Pa=e.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ya,...i}=e,a=oa(n);return(0,Nt.jsx)(lo,{...a,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));Pa.displayName="SelectPopperPosition";var[Sa,Ca]=na(ga,{}),Aa="SelectViewport",Ta=e.forwardRef(((t,n)=>{const{__scopeSelect:r,nonce:o,...i}=t,a=ba(Aa,r),s=Ca(Aa,r),l=Dt(n,a.onViewportChange),c=e.useRef(0);return(0,Nt.jsxs)(Nt.Fragment,{children:[(0,Nt.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),(0,Nt.jsx)(Qi.Slot,{scope:r,children:(0,Nt.jsx)(Zt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Mt(i.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){const e=Math.abs(c.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*ya,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),s=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop}))})})]})}));Ta.displayName=Aa;var Oa="SelectGroup",[Ma,ja]=na(Oa),Ra=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=pn();return(0,Nt.jsx)(Ma,{scope:n,id:o,children:(0,Nt.jsx)(Zt.div,{role:"group","aria-labelledby":o,...r,ref:t})})}));Ra.displayName=Oa;var Da="SelectLabel",Na=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=ja(Da,n);return(0,Nt.jsx)(Zt.div,{id:o.id,...r,ref:t})}));Na.displayName=Da;var ka="SelectItem",[La,Va]=na(ka),Fa=e.forwardRef(((t,n)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:a,...s}=t,l=aa(ka,r),c=ba(ka,r),u=l.value===o,[d,p]=e.useState(a??""),[h,f]=e.useState(!1),m=Dt(n,(e=>c.itemRefCallback?.(e,o,i))),g=pn(),v=e.useRef("touch"),y=()=>{i||(l.onValueChange(o),l.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,Nt.jsx)(La,{scope:r,value:o,disabled:i,textId:g,isSelected:u,onItemTextChange:e.useCallback((e=>{p((t=>t||(e?.textContent??"").trim()))}),[]),children:(0,Nt.jsx)(Qi.ItemSlot,{scope:r,value:o,disabled:i,textValue:d,children:(0,Nt.jsx)(Zt.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:m,onFocus:Mt(s.onFocus,(()=>f(!0))),onBlur:Mt(s.onBlur,(()=>f(!1))),onClick:Mt(s.onClick,(()=>{"mouse"!==v.current&&y()})),onPointerUp:Mt(s.onPointerUp,(()=>{"mouse"===v.current&&y()})),onPointerDown:Mt(s.onPointerDown,(e=>{v.current=e.pointerType})),onPointerMove:Mt(s.onPointerMove,(e=>{v.current=e.pointerType,i?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Mt(s.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()})),onKeyDown:Mt(s.onKeyDown,(e=>{""!==c.searchRef?.current&&" "===e.key||(Gi.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));Fa.displayName=ka;var Ia="SelectItemText",Ba=e.forwardRef(((t,n)=>{const{__scopeSelect:r,className:o,style:i,...a}=t,s=aa(Ia,r),l=ba(Ia,r),c=Va(Ia,r),u=la(Ia,r),[d,p]=e.useState(null),h=Dt(n,(e=>p(e)),c.onItemTextChange,(e=>l.itemTextRefCallback?.(e,c.value,c.disabled))),f=d?.textContent,m=e.useMemo((()=>(0,Nt.jsx)("option",{value:c.value,disabled:c.disabled,children:f},c.value)),[c.disabled,c.value,f]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return cn((()=>(g(m),()=>v(m))),[g,v,m]),(0,Nt.jsxs)(Nt.Fragment,{children:[(0,Nt.jsx)(Zt.span,{id:c.textId,...a,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Vt.createPortal(a.children,s.valueNode):null]})}));Ba.displayName=Ia;var _a="SelectItemIndicator",Za=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return Va(_a,n).isSelected?(0,Nt.jsx)(Zt.span,{"aria-hidden":!0,...r,ref:t}):null}));Za.displayName=_a;var Wa="SelectScrollUpButton",za=e.forwardRef(((t,n)=>{const r=ba(Wa,t.__scopeSelect),o=Ca(Wa,t.__scopeSelect),[i,a]=e.useState(!1),s=Dt(n,o.onScrollButtonChange);return cn((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?(0,Nt.jsx)(Ka,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));za.displayName=Wa;var Ua="SelectScrollDownButton",Ha=e.forwardRef(((t,n)=>{const r=ba(Ua,t.__scopeSelect),o=Ca(Ua,t.__scopeSelect),[i,a]=e.useState(!1),s=Dt(n,o.onScrollButtonChange);return cn((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?(0,Nt.jsx)(Ka,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));Ha.displayName=Ua;var Ka=e.forwardRef(((t,n)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=t,a=ba("SelectScrollButton",r),s=e.useRef(null),l=ea(r),c=e.useCallback((()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)}),[]);return e.useEffect((()=>()=>c()),[c]),cn((()=>{const e=l().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[l]),(0,Nt.jsx)(Zt.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:Mt(i.onPointerDown,(()=>{null===s.current&&(s.current=window.setInterval(o,50))})),onPointerMove:Mt(i.onPointerMove,(()=>{a.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(o,50))})),onPointerLeave:Mt(i.onPointerLeave,(()=>{c()}))})})),$a=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return(0,Nt.jsx)(Zt.div,{"aria-hidden":!0,...r,ref:t})}));$a.displayName="SelectSeparator";var Ya="SelectArrow";function Xa(e){return""===e||void 0===e}e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=oa(n),i=aa(Ya,n),a=ba(Ya,n);return i.open&&"popper"===a.position?(0,Nt.jsx)(co,{...o,...r,ref:t}):null})).displayName=Ya;var qa=e.forwardRef(((t,n)=>{const{value:r,...o}=t,i=e.useRef(null),a=Dt(n,i),s=function(t){const n=e.useRef({value:t,previous:t});return e.useMemo((()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous)),[t])}(r);return e.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(s!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}}),[s,r]),(0,Nt.jsx)(Yi,{asChild:!0,children:(0,Nt.jsx)("select",{...o,ref:a,defaultValue:r})})}));function Ga(t){const n=Wt(t),r=e.useRef(""),o=e.useRef(0),i=e.useCallback((e=>{const t=r.current+e;n(t),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(t)}),[n]),a=e.useCallback((()=>{r.current="",window.clearTimeout(o.current)}),[]);return e.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[r,i,a]}function Ja(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=(a=e,s=Math.max(o,0),a.map(((e,t)=>a[(s+t)%a.length])));var a,s;1===r.length&&(i=i.filter((e=>e!==n)));const l=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}qa.displayName="BubbleSelect";var Qa=da,es=fa,ts=ma,ns=va,rs=Ta,os=Na,is=Fa,as=Ba,ss=Za,ls=za,cs=Ha,us=$a,ds=function(){return ds=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ds.apply(this,arguments)},ps=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},hs=ca,fs=Ra,ms=ha,gs=e.forwardRef((function(t,n){var r=t.className,o=t.children,i=ps(t,["className","children"]);return e.createElement(Qa,ds({ref:n,className:Se("flex h-[50px] w-full items-center justify-between rounded-inner bg-gray-100 px-4 placeholder:text-muted-foreground focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r)},i),o,e.createElement(es,{asChild:!0},e.createElement(it,{className:"h-4 w-4 opacity-50"})))}));gs.displayName=Qa.displayName;var vs=e.forwardRef((function(t,n){var r=t.className,o=ps(t,["className"]);return e.createElement(ls,ds({ref:n,className:Se("flex cursor-default items-center justify-center py-1",r)},o),e.createElement(qe,{className:"h-4 w-4"}))}));vs.displayName=ls.displayName;var ys=e.forwardRef((function(t,n){var r=t.className,o=ps(t,["className"]);return e.createElement(cs,ds({ref:n,className:Se("flex cursor-default items-center justify-center py-1",r)},o),e.createElement(it,{className:"h-4 w-4"}))}));ys.displayName=cs.displayName;var xs=e.forwardRef((function(t,n){var r=t.className,o=t.children,i=t.position,a=void 0===i?"popper":i,s=ps(t,["className","children","position"]);return e.createElement(ts,null,e.createElement(ns,ds({ref:n,className:Se("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-inner bg-white text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===a?"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1":"",r),position:a},s),e.createElement(vs,null),e.createElement(rs,{className:Se("p-1","popper"===a?"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]":"")},o),e.createElement(ys,null)))}));xs.displayName=ns.displayName;var bs=e.forwardRef((function(t,n){var r=t.className,o=ps(t,["className"]);return e.createElement(os,ds({ref:n,className:Se("py-1.5 pl-8 pr-2 text-sm font-semibold",r)},o))}));bs.displayName=os.displayName;var ws=e.forwardRef((function(t,n){var r=t.className,o=t.children,i=ps(t,["className","children"]);return e.createElement(is,ds({ref:n,className:Se("relative flex w-full cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",r)},i),e.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},e.createElement(ss,null,e.createElement(N,{className:"h-4 w-4"}))),e.createElement(as,null,o))}));ws.displayName=is.displayName;var Es=e.forwardRef((function(t,n){var r=t.className,o=ps(t,["className"]);return e.createElement(us,ds({ref:n,className:Se("-mx-1 my-1 h-px bg-muted",r)},o))}));Es.displayName=us.displayName;var Ps="Dialog",[Ss,Cs]=kt(Ps),[As,Ts]=Ss(Ps),Os=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[u=!1,d]=fo({prop:o,defaultProp:i,onChange:a});return(0,Nt.jsx)(As,{scope:n,triggerRef:l,contentRef:c,contentId:pn(),titleId:pn(),descriptionId:pn(),open:u,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:s,children:r})};Os.displayName=Ps;var Ms="DialogTrigger",js=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ts(Ms,n),i=Dt(t,o.triggerRef);return(0,Nt.jsx)(Zt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xs(o.open),...r,ref:i,onClick:Mt(e.onClick,o.onOpenToggle)})}));js.displayName=Ms;var Rs="DialogPortal",[Ds,Ns]=Ss(Rs,{forceMount:void 0}),ks=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=t,a=Ts(Rs,n);return(0,Nt.jsx)(Ds,{scope:n,forceMount:r,children:e.Children.map(o,(e=>(0,Nt.jsx)(po,{present:r||a.open,children:(0,Nt.jsx)(uo,{asChild:!0,container:i,children:e})})))})};ks.displayName=Rs;var Ls="DialogOverlay",Vs=e.forwardRef(((e,t)=>{const n=Ns(Ls,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Ts(Ls,e.__scopeDialog);return i.modal?(0,Nt.jsx)(po,{present:r||i.open,children:(0,Nt.jsx)(Fs,{...o,ref:t})}):null}));Vs.displayName=Ls;var Fs=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ts(Ls,n);return(0,Nt.jsx)(ii,{as:Ft,allowPinchZoom:!0,shards:[o.contentRef],children:(0,Nt.jsx)(Zt.div,{"data-state":Xs(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),Is="DialogContent",Bs=e.forwardRef(((e,t)=>{const n=Ns(Is,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Ts(Is,e.__scopeDialog);return(0,Nt.jsx)(po,{present:r||i.open,children:i.modal?(0,Nt.jsx)(_s,{...o,ref:t}):(0,Nt.jsx)(Zs,{...o,ref:t})})}));Bs.displayName=Is;var _s=e.forwardRef(((t,n)=>{const r=Ts(Is,t.__scopeDialog),o=e.useRef(null),i=Dt(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return bo(e)}),[]),(0,Nt.jsx)(Ws,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Mt(t.onCloseAutoFocus,(e=>{e.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:Mt(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Mt(t.onFocusOutside,(e=>e.preventDefault()))})})),Zs=e.forwardRef(((t,n)=>{const r=Ts(Is,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return(0,Nt.jsx)(Ws,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),Ws=e.forwardRef(((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=Ts(Is,r),c=e.useRef(null),u=Dt(n,c);return qt(),(0,Nt.jsxs)(Nt.Fragment,{children:[(0,Nt.jsx)(tn,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,Nt.jsx)(Kt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Xs(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),(0,Nt.jsxs)(Nt.Fragment,{children:[(0,Nt.jsx)(Qs,{titleId:l.titleId}),(0,Nt.jsx)(el,{contentRef:c,descriptionId:l.descriptionId})]})]})})),zs="DialogTitle",Us=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ts(zs,n);return(0,Nt.jsx)(Zt.h2,{id:o.titleId,...r,ref:t})}));Us.displayName=zs;var Hs="DialogDescription",Ks=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ts(Hs,n);return(0,Nt.jsx)(Zt.p,{id:o.descriptionId,...r,ref:t})}));Ks.displayName=Hs;var $s="DialogClose",Ys=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ts($s,n);return(0,Nt.jsx)(Zt.button,{type:"button",...r,ref:t,onClick:Mt(e.onClick,(()=>o.onOpenChange(!1)))})}));function Xs(e){return e?"open":"closed"}Ys.displayName=$s;var qs="DialogTitleWarning",[Gs,Js]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,i=e.useMemo((()=>o),Object.values(o));return(0,Nt.jsx)(r.Provider,{value:i,children:n})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(r);if(i)return i;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(qs,{contentName:Is,titleName:zs,docsSlug:"dialog"}),Qs=({titleId:t})=>{const n=Js(qs),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect((()=>{t&&(document.getElementById(t)||console.error(r))}),[r,t]),null},el=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Js("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=t.current?.getAttribute("aria-describedby");n&&e&&(document.getElementById(n)||console.warn(r))}),[r,t,n]),null},tl=Os,nl=js,rl=ks,ol=Vs,il=Bs,al=Us,sl=Ks,ll=Ys;const cl=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),e.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]);var ul=Object.defineProperty,dl=Object.defineProperties,pl=Object.getOwnPropertyDescriptors,hl=Object.getOwnPropertySymbols,fl=Object.prototype.hasOwnProperty,ml=Object.prototype.propertyIsEnumerable,gl=(e,t,n)=>t in e?ul(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const vl=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>dl(e,pl(t)))(((e,t)=>{for(var n in t||(t={}))fl.call(t,n)&&gl(e,n,t[n]);if(hl)for(var n of hl(t))ml.call(t,n)&&gl(e,n,t[n]);return e})({ref:n},t),{weights:cl}))));vl.displayName="X";var yl=function(){return yl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},yl.apply(this,arguments)},xl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},bl=tl,wl=nl,El=ll,Pl=rl,Sl=e.forwardRef((function(t,n){var r=t.className,o=xl(t,["className"]);return e.createElement(ol,yl({className:lt()("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r)},o,{ref:n}))}));Sl.displayName=ol.displayName;var Cl=Pe("fixed z-50 gap-4 bg-white p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Al=e.forwardRef((function(t,n){var r=t.side,o=void 0===r?"right":r,i=t.className,a=t.children,s=xl(t,["side","className","children"]);return e.createElement(Pl,null,e.createElement(Sl,null),e.createElement(il,yl({ref:n,className:lt()(Cl({side:o}),i),onOpenAutoFocus:function(e){return e.preventDefault()}},s),a,e.createElement(ll,{className:"absolute right-4 top-4 rounded-default opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-white"},e.createElement(vl,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Close"))))}));Al.displayName=il.displayName;var Tl=function(t){var n=t.className,r=xl(t,["className"]);return e.createElement("div",yl({className:lt()("flex flex-col space-y-2 text-center sm:text-left",n)},r))};Tl.displayName="SheetHeader";var Ol=function(t){var n=t.className,r=xl(t,["className"]);return e.createElement("div",yl({className:lt()("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n)},r))};Ol.displayName="SheetFooter";var Ml=e.forwardRef((function(t,n){var r=t.className,o=xl(t,["className"]);return e.createElement(al,yl({ref:n,className:lt()("text-lg font-semibold text-foreground",r)},o))}));Ml.displayName=al.displayName;var jl=e.forwardRef((function(t,n){var r=t.className,o=xl(t,["className"]);return e.createElement(sl,yl({ref:n,className:lt()("text-sm text-muted-foreground",r)},o))}));jl.displayName=sl.displayName;const Rl=function(e){var t=e.step,r=e.title,o=e.subtitle,i=e.checked,a=e.active,s=e.onClick,l=lt()("w-full md:w-12 h-12 flex-none rounded-default flex justify-center items-center font-medium",{"bg-green-500 text-white":i,"bg-white text-gray-500":!i,"border-2 bg-gray-100 border-primary-500":a});return n().createElement("div",{className:"w-full flex flex-col items-center text-center gap-3 md:flex-row md:items-center md:text-left",onClick:s},n().createElement("div",{className:l},i?n().createElement(N,{size:22}):t),n().createElement("div",null,n().createElement("h3",{className:"text-sm md:text-base whitespace-nowrap"},r),o&&n().createElement("p",{className:"text-sm text-gray-500 whitespace-nowrap"},o)))};function Dl(e,t){-1===e.indexOf(t)&&e.push(t)}function Nl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const kl=e=>e;let Ll=kl,Vl=kl;function Fl(e){let t;return()=>(void 0===t&&(t=e()),t)}const Il=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class Bl{constructor(){this.subscriptions=[]}add(e){return Dl(this.subscriptions,e),()=>Nl(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _l=e=>1e3*e,Zl=e=>e/1e3;function Wl(e,t){return t?e*(1e3/t):0}function zl(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function Ul(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function Hl(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Kl(e,t,n,r){if("function"==typeof t){const[o,i]=Hl(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=Hl(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function $l(e,t,n){const r=e.getProps();return Kl(r,t,void 0!==n?n:r.custom,e)}new Set;const Yl=Fl((()=>void 0!==window.ScrollTimeline));class Xl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map((e=>"finished"in e?e.finished:e)))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map((n=>Yl()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0));return()=>{n.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ql extends Xl{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function Gl(e,t){return e?e[t]||e.default||e:void 0}const Jl=2e4;function Ql(e){let t=0,n=e.next(t);for(;!n.done&&t<Jl;)t+=50,n=e.next(t);return t>=Jl?1/0:t}function ec(e){return"function"==typeof e}function tc(e,t){e.timeline=t,e.onfinish=null}const nc=e=>Array.isArray(e)&&"number"==typeof e[0],rc={linearEasing:void 0};function oc(e,t){const n=Fl(e);return()=>{var e;return null!==(e=rc[t])&&void 0!==e?e:n()}}const ic=oc((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),"linearEasing"),ac=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let t=0;t<o;t++)r+=e(Il(0,o-1,t))+", ";return`linear(${r.substring(0,r.length-2)})`};function sc(e){return Boolean("function"==typeof e&&ic()||!e||"string"==typeof e&&(e in cc||ic())||nc(e)||Array.isArray(e)&&e.every(sc))}const lc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,cc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:lc([0,.65,.55,1]),circOut:lc([.55,0,1,.45]),backIn:lc([.31,.01,.66,-.59]),backOut:lc([.33,1.53,.69,.99])};function uc(e,t){return e?"function"==typeof e&&ic()?ac(e,t):nc(e)?lc(e):Array.isArray(e)?e.map((e=>uc(e,t)||cc.easeOut)):cc[e]:void 0}const dc=["read","resolveKeyframes","update","preRender","render","postRender"],pc={value:null,addProjectionMetrics:null};function hc(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=dc.reduce(((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1},l=0;function c(t){a.has(t)&&(u.schedule(t),e()),l++,t(s)}const u={schedule:(e,t=!1,i=!1)=>{const s=i&&o?n:r;return t&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),a.delete(e)},process:e=>{s=e,o?i=!0:(o=!0,[n,r]=[r,n],n.forEach(c),t&&pc.value&&pc.value.frameloop[t].push(l),l=0,n.clear(),o=!1,i&&(i=!1,u.process(e)))}};return u}(i,t?n:void 0),e)),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,h=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))};return{schedule:dc.reduce(((t,i)=>{const s=a[i];return t[i]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(h)),s.schedule(t,i,a)),t}),{}),cancel:e=>{for(let t=0;t<dc.length;t++)a[dc[t]].cancel(e)},state:o,steps:a}}const{schedule:fc,cancel:mc,state:gc,steps:vc}=hc("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:kl,!0),{schedule:yc,cancel:xc}=hc(queueMicrotask,!1);let bc;function wc(){bc=void 0}const Ec={now:()=>(void 0===bc&&Ec.set(gc.isProcessing?gc.timestamp:performance.now()),bc),set:e=>{bc=e,queueMicrotask(wc)}},Pc={x:!1,y:!1};function Sc(){return Pc.x||Pc.y}function Cc(e,t){const n=function(e){if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const n=t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ac(e){return!("touch"===e.pointerType||Sc())}function Tc(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&void 0!==e.pointerId)try{e.target[n](e.pointerId)}catch(e){}}const Oc=(e,t)=>!!t&&(e===t||Oc(e,t.parentElement)),Mc=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,jc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),Rc=new WeakSet;function Dc(e){return t=>{"Enter"===t.key&&e(t)}}function Nc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function kc(e){return Mc(e)&&!Sc()}const Lc={layout:0,mainThread:0,waapi:0},Vc={current:void 0};class Fc{constructor(e,t={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=Ec.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Ec.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Bl);const n=this.events[e].add(t);return"change"===e?()=>{n(),fc.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Vc.current&&Vc.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Ec.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Wl(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ic(e,t){return new Fc(e,t)}const Bc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_c=new Set(Bc),Zc=new Set(["width","height","top","left","right","bottom",...Bc]),Wc=e=>Array.isArray(e);function zc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ic(n))}const Uc=e=>Boolean(e&&e.getVelocity);function Hc(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Uc(r)&&r.add))return n.add(t);var r}const Kc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),$c="data-"+Kc("framerAppearId");function Yc(e){return e.props[$c]}const Xc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function qc(e,t,n,r){if(e===t&&n===r)return kl;return o=>0===o||1===o?o:Xc(function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Xc(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(o,0,1,e,n),t,r)}const Gc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Jc=e=>t=>1-e(1-t),Qc=qc(.33,1.53,.69,.99),eu=Jc(Qc),tu=Gc(eu),nu=e=>(e*=2)<1?.5*eu(e):.5*(2-Math.pow(2,-10*(e-1))),ru=e=>1-Math.sin(Math.acos(e)),ou=Jc(ru),iu=Gc(ru),au=e=>/^0[^.\s]+$/u.test(e),su=(e,t,n)=>n>t?t:n<e?e:n,lu={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},cu={...lu,transform:e=>su(0,1,e)},uu={...lu,default:1},du=e=>Math.round(1e5*e)/1e5,pu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,hu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fu=(e,t)=>n=>Boolean("string"==typeof n&&hu.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),mu=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,a,s]=r.match(pu);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},gu={...lu,transform:e=>Math.round((e=>su(0,255,e))(e))},vu={test:fu("rgb","red"),parse:mu("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+gu.transform(e)+", "+gu.transform(t)+", "+gu.transform(n)+", "+du(cu.transform(r))+")"},yu={test:fu("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:vu.transform},xu=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),bu=xu("deg"),wu=xu("%"),Eu=xu("px"),Pu=xu("vh"),Su=xu("vw"),Cu={...wu,parse:e=>wu.parse(e)/100,transform:e=>wu.transform(100*e)},Au={test:fu("hsl","hue"),parse:mu("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+wu.transform(du(t))+", "+wu.transform(du(n))+", "+du(cu.transform(r))+")"},Tu={test:e=>vu.test(e)||yu.test(e)||Au.test(e),parse:e=>vu.test(e)?vu.parse(e):Au.test(e)?Au.parse(e):yu.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?vu.transform(e):Au.transform(e)},Ou=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Mu="number",ju="color",Ru=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Du(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(Ru,(e=>(Tu.test(e)?(r.color.push(i),o.push(ju),n.push(Tu.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(Mu),n.push(parseFloat(e))),++i,"${}"))).split("${}");return{values:n,split:a,indexes:r,types:o}}function Nu(e){return Du(e).values}function ku(e){const{split:t,types:n}=Du(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Mu?du(e[i]):t===ju?Tu.transform(e[i]):e[i]}return o}}const Lu=e=>"number"==typeof e?0:e,Vu={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(pu))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Ou))||void 0===n?void 0:n.length)||0)>0},parse:Nu,createTransformer:ku,getAnimatableNone:function(e){const t=Nu(e);return ku(e)(t.map(Lu))}},Fu=new Set(["brightness","contrast","saturate","opacity"]);function Iu(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(pu)||[];if(!r)return e;const o=n.replace(r,"");let i=Fu.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Bu=/\b([a-z-]*)\(.*?\)/gu,_u={...Vu,getAnimatableNone:e=>{const t=e.match(Bu);return t?t.map(Iu).join(" "):e}},Zu={borderWidth:Eu,borderTopWidth:Eu,borderRightWidth:Eu,borderBottomWidth:Eu,borderLeftWidth:Eu,borderRadius:Eu,radius:Eu,borderTopLeftRadius:Eu,borderTopRightRadius:Eu,borderBottomRightRadius:Eu,borderBottomLeftRadius:Eu,width:Eu,maxWidth:Eu,height:Eu,maxHeight:Eu,top:Eu,right:Eu,bottom:Eu,left:Eu,padding:Eu,paddingTop:Eu,paddingRight:Eu,paddingBottom:Eu,paddingLeft:Eu,margin:Eu,marginTop:Eu,marginRight:Eu,marginBottom:Eu,marginLeft:Eu,backgroundPositionX:Eu,backgroundPositionY:Eu},Wu={rotate:bu,rotateX:bu,rotateY:bu,rotateZ:bu,scale:uu,scaleX:uu,scaleY:uu,scaleZ:uu,skew:bu,skewX:bu,skewY:bu,distance:Eu,translateX:Eu,translateY:Eu,translateZ:Eu,x:Eu,y:Eu,z:Eu,perspective:Eu,transformPerspective:Eu,opacity:cu,originX:Cu,originY:Cu,originZ:Eu},zu={...lu,transform:Math.round},Uu={...Zu,...Wu,zIndex:zu,size:Eu,fillOpacity:cu,strokeOpacity:cu,numOctaves:zu},Hu={...Uu,color:Tu,backgroundColor:Tu,outlineColor:Tu,fill:Tu,stroke:Tu,borderColor:Tu,borderTopColor:Tu,borderRightColor:Tu,borderBottomColor:Tu,borderLeftColor:Tu,filter:_u,WebkitFilter:_u},Ku=e=>Hu[e];function $u(e,t){let n=Ku(e);return n!==_u&&(n=Vu),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Yu=new Set(["auto","none","0"]),Xu=e=>180*e/Math.PI,qu=e=>{const t=Xu(Math.atan2(e[1],e[0]));return Ju(t)},Gu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qu,rotateZ:qu,skewX:e=>Xu(Math.atan(e[1])),skewY:e=>Xu(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ju=e=>((e%=360)<0&&(e+=360),e),Qu=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ed=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),td={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Qu,scaleY:ed,scale:e=>(Qu(e)+ed(e))/2,rotateX:e=>Ju(Xu(Math.atan2(e[6],e[5]))),rotateY:e=>Ju(Xu(Math.atan2(-e[2],e[0]))),rotateZ:qu,rotate:qu,skewX:e=>Xu(Math.atan(e[4])),skewY:e=>Xu(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function nd(e){return e.includes("scale")?1:0}function rd(e,t){if(!e||"none"===e)return nd(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=td,o=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Gu,o=t}if(!o)return nd(t);const i=r[t],a=o[1].split(",").map(od);return"function"==typeof i?i(a):a[i]}function od(e){return parseFloat(e.trim())}const id=e=>e===lu||e===Eu,ad=new Set(["x","y","z"]),sd=Bc.filter((e=>!ad.has(e))),ld={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>rd(t,"x"),y:(e,{transform:t})=>rd(t,"y")};ld.translateX=ld.x,ld.translateY=ld.y;const cd=new Set;let ud=!1,dd=!1;function pd(){if(dd){const e=Array.from(cd).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return sd.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}dd=!1,ud=!1,cd.forEach((e=>e.complete())),cd.clear()}function hd(){cd.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(dd=!0)}))}class fd{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(cd.add(this),ud||(ud=!0,fc.read(hd),fc.resolveKeyframes(pd))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),cd.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,cd.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const md=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),gd=e=>t=>"string"==typeof t&&t.startsWith(e),vd=gd("--"),yd=gd("var(--"),xd=e=>!!yd(e)&&bd.test(e.split("/*")[0].trim()),bd=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,wd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ed(e,t,n=1){Vl(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=wd.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return md(e)?parseFloat(e):e}return xd(o)?Ed(o,t,n+1):o}const Pd=e=>t=>t.test(e),Sd=[lu,Eu,wu,bu,Su,Pu,{test:e=>"auto"===e,parse:e=>e}],Cd=e=>Sd.find(Pd(e));class Ad extends fd{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),xd(r))){const o=Ed(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Zc.has(n)||2!==e.length)return;const[r,o]=e,i=Cd(r),a=Cd(o);if(i!==a)if(id(i)&&id(a))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||au(r))&&n.push(t);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!Yu.has(t)&&Du(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=$u(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ld[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=ld[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const Td=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!Vu.test(e)&&"0"!==e||e.startsWith("url(")));function Od(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=Td(o,t),s=Td(i,t);return Ll(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!a||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||ec(n))&&r)}const Md=e=>null!==e;function jd(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Md),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}class Rd{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ec.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(hd(),pd()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=Ec.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:a,onUpdate:s,isGenerator:l}=this.options;if(!l&&!Od(e,n,r,o)){if(!i)return s&&s(jd(e,this.options,t)),a&&a(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}const Dd=(e,t,n)=>e+(t-e)*n;function Nd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function kd(e,t){return n=>n>0?t:e}const Ld=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Vd=[yu,vu,Au];function Fd(e){const t=(n=e,Vd.find((e=>e.test(n))));var n;if(Ll(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let r=t.parse(e);return t===Au&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=Nd(s,r,e+1/3),i=Nd(s,r,e),a=Nd(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(r)),r}const Id=(e,t)=>{const n=Fd(e),r=Fd(t);if(!n||!r)return kd(e,t);const o={...n};return e=>(o.red=Ld(n.red,r.red,e),o.green=Ld(n.green,r.green,e),o.blue=Ld(n.blue,r.blue,e),o.alpha=Dd(n.alpha,r.alpha,e),vu.transform(o))},Bd=(e,t)=>n=>t(e(n)),_d=(...e)=>e.reduce(Bd),Zd=new Set(["none","hidden"]);function Wd(e,t){return n=>Dd(e,t,n)}function zd(e){return"number"==typeof e?Wd:"string"==typeof e?xd(e)?kd:Tu.test(e)?Id:Kd:Array.isArray(e)?Ud:"object"==typeof e?Tu.test(e)?Id:Hd:kd}function Ud(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>zd(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function Hd(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=zd(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Kd=(e,t)=>{const n=Vu.createTransformer(t),r=Du(e),o=Du(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Zd.has(e)&&!o.values.length||Zd.has(t)&&!r.values.length?function(e,t){return Zd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):_d(Ud(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=null!==(n=e.values[s])&&void 0!==n?n:0;r[i]=l,o[a]++}return r}(r,o),o.values),n):(Ll(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),kd(e,t))};function $d(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Dd(e,t,n):zd(e)(e,t)}function Yd(e,t,n){const r=Math.max(t-5,0);return Wl(n-e(r),t-r)}const Xd=.01,qd=2,Gd=.005,Jd=.5;const Qd=12;function ep(e,t){return e*Math.sqrt(1-t*t)}const tp=["duration","bounce"],np=["stiffness","damping","mass"];function rp(e,t){return t.some((t=>void 0!==e[t]))}function op(e=.3,t=.3){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:h}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!rp(e,np)&&rp(e,tp))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,i=2*su(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:1,stiffness:o,damping:i}}else{const n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:r=1}){let o,i;Ll(e<=_l(10),"Spring duration must be 10 seconds or less");let a=1-t;a=su(.05,1,a),e=su(.01,10,Zl(e)),a<1?(o=t=>{const r=t*a,o=r*e;return.001-(r-n)/ep(t,a)*Math.exp(-o)},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=ep(Math.pow(t,2),a);return(.001-o(t)>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<Qd;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=_l(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...n,velocity:-Zl(n.velocity||0)}),f=p||0,m=c/(2*Math.sqrt(l*u)),g=a-i,v=Zl(Math.sqrt(l/u)),y=Math.abs(g)<5;let x;if(r||(r=y?Xd:qd),o||(o=y?Gd:Jd),m<1){const e=ep(v,m);x=t=>{const n=Math.exp(-m*v*t);return a-n*((f+m*v*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)x=e=>a-Math.exp(-v*e)*(g+(f+v*g)*e);else{const e=v*Math.sqrt(m*m-1);x=t=>{const n=Math.exp(-m*v*t),r=Math.min(e*t,300);return a-n*((f+m*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const b={calculatedDuration:h&&d||null,next:e=>{const t=x(e);if(h)s.done=e>=d;else{let n=0;m<1&&(n=0===e?_l(f):Yd(x,e,t));const i=Math.abs(n)<=r,l=Math.abs(a-t)<=o;s.done=i&&l}return s.value=s.done?a:t,s},toString:()=>{const e=Math.min(Ql(b),Jl),t=ac((t=>b.next(e*t).value),e,30);return e+"ms "+t}};return b}function ip({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},h=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let f=n*t;const m=d+f,g=void 0===a?m:a(m);g!==m&&(f=g-d);const v=e=>-f*Math.exp(-e/r),y=e=>g+v(e),x=e=>{const t=v(e),n=y(e);p.done=Math.abs(t)<=c,p.value=p.done?g:n};let b,w;const E=e=>{var t;t=p.value,(void 0!==s&&t<s||void 0!==l&&t>l)&&(b=e,w=op({keyframes:[p.value,h(p.value)],velocity:Yd(y,e,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==b||(t=!0,x(e),E(e)),void 0!==b&&e>=b?w.next(e-b):(!t&&x(e),p)}}}const ap=qc(.42,0,1,1),sp=qc(0,0,.58,1),lp=qc(.42,0,.58,1),cp={linear:kl,easeIn:ap,easeInOut:lp,easeOut:sp,circIn:ru,circInOut:iu,circOut:ou,backIn:eu,backInOut:tu,backOut:Qc,anticipate:nu},up=e=>{if(nc(e)){Vl(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return qc(t,n,r,o)}return"string"==typeof e?(Vl(void 0!==cp[e],`Invalid easing type '${e}'`),cp[e]):e};function dp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(up):up(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Il(0,t,r);e.push(Dd(n,1,o))}}(t,e.length-1),t}(t),e),s=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Vl(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||$d,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||kl:t;i=_d(e,i)}r.push(i)}return r}(t,r,o),l=s.length,c=n=>{if(a&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const o=Il(e[r],e[r+1],n);return s[r](o)};return n?t=>c(su(e[0],e[i-1],t)):c}(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||lp)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}const pp=e=>{const t=({timestamp:t})=>e(t);return{start:()=>fc.update(t,!0),stop:()=>mc(t),now:()=>gc.isProcessing?gc.timestamp:Ec.now()}},hp={decay:ip,inertia:ip,tween:dp,keyframes:dp,spring:op},fp=e=>e/100;class mp extends Rd{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options,i=(null==r?void 0:r.KeyframeResolver)||fd;this.resolver=new i(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,a=ec(t)?t:hp[t]||dp;let s,l;a!==dp&&"number"!=typeof e[0]&&(s=_d(fp,$d(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});"mirror"===o&&(l=a({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=Ql(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;Lc.mainThread++,this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:s,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:p,repeatType:h,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let y=this.currentTime,x=o;if(p){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,p+1),Boolean(t%2)&&("reverse"===h?(n=1-n,f&&(n-=f/u)):"mirror"===h&&(x=i)),y=su(0,1,n)*u}const b=v?{done:!1,value:s[0]}:x.next(y);a&&(b.value=a(b.value));let{done:w}=b;v||null===l||(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return E&&void 0!==r&&(b.value=jd(s,this.options,r)),m&&m(b.value),E&&this.finish(),b}get duration(){const{resolved:e}=this;return e?Zl(e.calculatedDuration):0}get time(){return Zl(this.currentTime)}set time(e){e=_l(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Zl(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=pp,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel(),Lc.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const gp=new Set(["opacity","clipPath","filter","transform"]),vp=Fl((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),yp={anticipate:nu,backInOut:tu,circInOut:iu};class xp extends Rd{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new Ad(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:o,type:i,motionValue:a,name:s,startTime:l}=this.options;if(!a.owner||!a.owner.current)return!1;if("string"==typeof o&&ic()&&o in yp&&(o=yp[o]),function(e){return ec(e.type)||"spring"===e.type||!sc(e.ease)}(this.options)){const{onComplete:t,onUpdate:a,motionValue:s,element:l,...c}=this.options,u=function(e,t){const n=new mp({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,r=u.times,o=u.ease,i="keyframes"}const c=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=uc(s,o);Array.isArray(u)&&(c.easing=u),pc.value&&Lc.waapi++;const d=e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"});return pc.value&&d.finished.finally((()=>{Lc.waapi--})),d}(a.owner.current,s,e,{...this.options,duration:n,times:r,ease:o});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(tc(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;a.set(jd(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:r,type:i,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return Zl(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Zl(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=_l(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return kl;const{animation:n}=t;tc(n,e)}else this.pendingTimeline=e;return kl}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:a}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:s,element:l,...c}=this.options,u=new mp({...c,keyframes:n,duration:r,type:o,ease:i,times:a,isGenerator:!0}),d=_l(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:s}=this.options;s&&s(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return vp()&&n&&gp.has(n)&&!s&&!l&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}}const bp={type:"spring",stiffness:500,damping:25,restSpeed:10},wp={type:"keyframes",duration:.8},Ep={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Pp=(e,{keyframes:t})=>t.length>2?wp:_c.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:bp:Ep,Sp=(e,t,n,r={},o,i)=>a=>{const s=Gl(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=_l(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(s)||(u={...u,...Pp(e,u)}),u.duration&&(u.duration=_l(u.duration)),u.repeatDelay&&(u.repeatDelay=_l(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&void 0!==t.get()){const e=jd(u.keyframes,s);if(void 0!==e)return fc.update((()=>{u.onUpdate(e),u.onComplete()})),new ql([])}return!i&&xp.supports(u)?new xp(u):new mp(u)};function Cp({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Ap(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||u&&Cp(u,t))continue;const s={delay:n,...Gl(a||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=Yc(e);if(n){const e=window.MotionHandoffAnimation(n,t,fc);null!==e&&(s.startTime=e,d=!0)}}Hc(e,t),r.start(Sp(t,r,o,e.shouldReduceMotion&&Zc.has(t)?{type:!1}:s,e,d));const p=r.animation;p&&c.push(p)}return s&&Promise.all(c).then((()=>{fc.update((()=>{s&&function(e,t){const n=$l(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)zc(e,t,(a=i[t],Wc(a)?a[a.length-1]||0:a));var a}(e,s)}))})),c}function Tp(e,t,n={}){var r;const o=$l(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(Ap(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(Op).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(Tp(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,o+r,a,s,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then((()=>t()))}return Promise.all([a(),s(n.delay)])}function Op(e,t){return e.sortNodePosition(t)}function Mp(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function jp(e){return"string"==typeof e||Array.isArray(e)}const Rp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dp=["initial",...Rp],Np=Dp.length;function kp(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&kp(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Np;n++){const r=Dp[n],o=e.props[r];(jp(o)||!1===o)&&(t[r]=o)}return t}const Lp=[...Rp].reverse(),Vp=Rp.length;function Fp(e){let t=function(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>Tp(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Tp(e,t,n);else{const o="function"==typeof t?$l(e,t,n.custom):t;r=Promise.all(Ap(e,o,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}(e),n=Bp(),r=!0;const o=t=>(n,r)=>{var o;const i=$l(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const{props:a}=e,s=kp(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Vp;t++){const f=Lp[t],m=n[f],g=void 0!==a[f]?a[f]:s[f],v=jp(g),y=f===i?m.isActive:null;!1===y&&(d=t);let x=g===s[f]&&g!==a[f]&&v;if(x&&r&&e.manuallyAnimateOnMount&&(x=!1),m.protectedKeys={...u},!m.isActive&&null===y||!g&&!m.prevProp||Ul(g)||"boolean"==typeof g)continue;const b=(p=m.prevProp,"string"==typeof(h=g)?h!==p:!!Array.isArray(h)&&!Mp(h,p));let w=b||f===i&&m.isActive&&!x&&v||t>d&&v,E=!1;const P=Array.isArray(g)?g:[g];let S=P.reduce(o(f),{});!1===y&&(S={});const{prevResolvedValues:C={}}=m,A={...C,...S},T=t=>{w=!0,c.has(t)&&(E=!0,c.delete(t)),m.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in A){const t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=Wc(t)&&Wc(n)?!Mp(t,n):t!==n,r?null!=t?T(e):c.add(e):void 0!==t&&c.has(e)?T(e):m.protectedKeys[e]=!0}m.prevProp=g,m.prevResolvedValues=S,m.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(w=!1),w&&(!x||!b||E)&&l.push(...P.map((e=>({animation:e,options:{type:f}}))))}var p,h;if(c.size){const t={};if("boolean"!=typeof a.initial){const n=$l(e,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach((n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let f=Boolean(l.length);return!r||!1!==a.initial&&a.initial!==a.animate||e.manuallyAnimateOnMount||(f=!1),r=!1,f?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Bp(),r=!0}}}function Ip(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Bp(){return{animate:Ip(!0),whileInView:Ip(),whileHover:Ip(),whileTap:Ip(),whileDrag:Ip(),whileFocus:Ip(),exit:Ip()}}class _p{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Zp=0;const Wp={animation:{Feature:class extends _p{constructor(e){super(e),e.animationState||(e.animationState=Fp(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ul(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends _p{constructor(){super(...arguments),this.id=Zp++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>{t(this.id)}))}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function zp(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Up(e){return{point:{x:e.pageX,y:e.pageY}}}function Hp(e,t,n,r){return zp(e,t,(e=>t=>Mc(t)&&e(t,Up(t)))(n),r)}function Kp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $p(e){return e.max-e.min}function Yp(e,t,n,r=.5){e.origin=r,e.originPoint=Dd(t.min,t.max,e.origin),e.scale=$p(n)/$p(t),e.translate=Dd(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Xp(e,t,n,r){Yp(e.x,t.x,n.x,r?r.originX:void 0),Yp(e.y,t.y,n.y,r?r.originY:void 0)}function qp(e,t,n){e.min=n.min+t.min,e.max=e.min+$p(t)}function Gp(e,t,n){e.min=t.min-n.min,e.max=e.min+$p(t)}function Jp(e,t,n){Gp(e.x,t.x,n.x),Gp(e.y,t.y,n.y)}const Qp=()=>({x:{min:0,max:0},y:{min:0,max:0}});function eh(e){return[e("x"),e("y")]}function th(e){return void 0===e||1===e}function nh({scale:e,scaleX:t,scaleY:n}){return!th(e)||!th(t)||!th(n)}function rh(e){return nh(e)||oh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function oh(e){return ih(e.x)||ih(e.y)}function ih(e){return e&&"0%"!==e}function ah(e,t,n){return n+t*(e-n)}function sh(e,t,n,r,o){return void 0!==o&&(e=ah(e,o,r)),ah(e,n,r)+t}function lh(e,t=0,n=1,r,o){e.min=sh(e.min,t,n,r,o),e.max=sh(e.max,t,n,r,o)}function ch(e,{x:t,y:n}){lh(e.x,t.translate,t.scale,t.originPoint),lh(e.y,n.translate,n.scale,n.originPoint)}const uh=.999999999999,dh=1.0000000000001;function ph(e,t){e.min=e.min+t,e.max=e.max+t}function hh(e,t,n,r,o=.5){lh(e,t,n,Dd(e.min,e.max,o),r)}function fh(e,t){hh(e.x,t.x,t.scaleX,t.scale,t.originX),hh(e.y,t.y,t.scaleY,t.scale,t.originY)}function mh(e,t){return Kp(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const gh=({current:e})=>e?e.ownerDocument.defaultView:null;function vh(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}const yh=(e,t)=>Math.abs(e-t);class xh{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Eh(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=yh(e.x,t.x),r=yh(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=gc;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=bh(t,this.transformPagePoint),fc.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=Eh("pointercancel"===e.type?this.lastMoveEventInfo:bh(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Mc(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=bh(Up(e),this.transformPagePoint),{point:a}=i,{timestamp:s}=gc;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,Eh(i,this.history)),this.removeListeners=_d(Hp(this.contextWindow,"pointermove",this.handlePointerMove),Hp(this.contextWindow,"pointerup",this.handlePointerUp),Hp(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),mc(this.updatePoint)}}function bh(e,t){return t?{point:t(e.point)}:e}function wh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Eh({point:e},t){return{point:e,delta:wh(e,Sh(t)),offset:wh(e,Ph(t)),velocity:Ch(t,.1)}}function Ph(e){return e[0]}function Sh(e){return e[e.length-1]}function Ch(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Sh(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>_l(t)));)n--;if(!r)return{x:0,y:0};const i=Zl(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Ah(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Th(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Oh=.35;function Mh(e,t,n){return{min:jh(e,t),max:jh(e,n)}}function jh(e,t){return"number"==typeof e?e:e[t]||0}const Rh=new WeakMap;class Dh{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new xh(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Up(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?Pc[i]?null:(Pc[i]=!0,()=>{Pc[i]=!1}):Pc.x||Pc.y?null:(Pc.x=Pc.y=!0,()=>{Pc.x=Pc.y=!1}),!this.openDragLock))return;var i;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eh((e=>{let t=this.getAxisMotionValue(e).get()||0;if(wu.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=$p(r)*(parseFloat(t)/100))}}this.originPoint[e]=t})),o&&fc.postRender((()=>o(e,t))),Hc(this.visualElement,"transform");const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>eh((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:gh(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&fc.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Nh(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Dd(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Dd(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&vh(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:Ah(e.x,n,o),y:Ah(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Oh){return!1===e?e=0:!0===e&&(e=Oh),{x:Mh(e,"left","right"),y:Mh(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&eh((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!vh(e))return!1;const n=e.current;Vl(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=mh(e,n),{scroll:o}=t;return o&&(ph(r.x,o.offset.x),ph(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:Th(e.x,t.x),y:Th(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=Kp(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=eh((a=>{if(!Nh(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Hc(this.visualElement,e),n.start(Sp(e,n,0,t,this.visualElement,!1))}stopAnimation(){eh((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){eh((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){eh((t=>{const{drag:n}=this.getProps();if(!Nh(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-Dd(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!vh(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};eh((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=$p(e),o=$p(t);return o>r?n=Il(t.min,t.max-r,e.min):r>o&&(n=Il(e.min,e.max-o,t.min)),su(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),eh((t=>{if(!Nh(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Dd(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Rh.set(this.visualElement,this);const e=Hp(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();vh(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),fc.read(t);const o=zp(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(eh((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Oh,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function Nh(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const kh=e=>(t,n)=>{e&&fc.postRender((()=>e(t,n)))},Lh=(0,e.createContext)(null),Vh=(0,e.createContext)({}),Fh=(0,e.createContext)({}),Ih={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Bh(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const _h={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Eu.test(e))return e;e=parseFloat(e)}return`${Bh(e,t.target.x)}% ${Bh(e,t.target.y)}%`}},Zh={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Vu.parse(e);if(o.length>5)return r;const i=Vu.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=Dd(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}},Wh={};class zh extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;!function(e){for(const t in e)Wh[t]=e[t],vd(t)&&(Wh[t].isCSSVariable=!0)}(Hh),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ih.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t||e.isPresent!==o?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||fc.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),yc.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Uh(t){const[n,r]=function(t=!0){const n=(0,e.useContext)(Lh);if(null===n)return[!0,null];const{isPresent:r,onExitComplete:o,register:i}=n,a=(0,e.useId)();(0,e.useEffect)((()=>{if(t)return i(a)}),[t]);const s=(0,e.useCallback)((()=>t&&o&&o(a)),[a,o,t]);return!r&&o?[!1,s]:[!0]}(),o=(0,e.useContext)(Vh);return(0,Nt.jsx)(zh,{...t,layoutGroup:o,switchLayoutGroup:(0,e.useContext)(Fh),isPresent:n,safeToRemove:r})}const Hh={borderRadius:{..._h,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_h,borderTopRightRadius:_h,borderBottomLeftRadius:_h,borderBottomRightRadius:_h,boxShadow:Zh},Kh=(e,t)=>e.depth-t.depth;class $h{constructor(){this.children=[],this.isDirty=!1}add(e){Dl(this.children,e),this.isDirty=!0}remove(e){Nl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Kh),this.isDirty=!1,this.children.forEach(e)}}function Yh(e){const t=Uc(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const Xh=["TopLeft","TopRight","BottomLeft","BottomRight"],qh=Xh.length,Gh=e=>"string"==typeof e?parseFloat(e):e,Jh=e=>"number"==typeof e||Eu.test(e);function Qh(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const ef=nf(0,.5,ou),tf=nf(.5,.95,kl);function nf(e,t,n){return r=>r<e?0:r>t?1:n(Il(e,t,r))}function rf(e,t){e.min=t.min,e.max=t.max}function of(e,t){rf(e.x,t.x),rf(e.y,t.y)}function af(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function sf(e,t,n,r,o){return e=ah(e-=t,1/n,r),void 0!==o&&(e=ah(e,1/o,r)),e}function lf(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){if(wu.test(t)&&(t=parseFloat(t),t=Dd(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=Dd(i.min,i.max,r);e===i&&(s-=t),e.min=sf(e.min,t,n,s,o),e.max=sf(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const cf=["x","scaleX","originX"],uf=["y","scaleY","originY"];function df(e,t,n,r){lf(e.x,t,cf,n?n.x:void 0,r?r.x:void 0),lf(e.y,t,uf,n?n.y:void 0,r?r.y:void 0)}function pf(e){return 0===e.translate&&1===e.scale}function hf(e){return pf(e.x)&&pf(e.y)}function ff(e,t){return e.min===t.min&&e.max===t.max}function mf(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gf(e,t){return mf(e.x,t.x)&&mf(e.y,t.y)}function vf(e){return $p(e.x)/$p(e.y)}function yf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class xf{constructor(){this.members=[]}add(e){Dl(this.members,e),e.scheduleRender()}remove(e){if(Nl(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const bf={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},wf=["","X","Y","Z"],Ef={visibility:"hidden"};let Pf=0;function Sf(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Cf(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Yc(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",fc,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Cf(r)}function Af({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Pf++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,pc.value&&(bf.nodes=bf.calculatedTargetDeltas=bf.calculatedProjections=0),this.nodes.forEach(Mf),this.nodes.forEach(Vf),this.nodes.forEach(Ff),this.nodes.forEach(jf),pc.addProjectionMetrics&&pc.addProjectionMetrics(bf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new $h)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Bl),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Ec.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(mc(r),e(i-t))};return fc.read(r,!0),()=>mc(r)}(r,250),Ih.hasAnimatedSinceResize&&(Ih.hasAnimatedSinceResize=!1,this.nodes.forEach(Lf))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||zf,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!gf(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Gl(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Lf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,mc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(If),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Cf(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Df);this.isUpdating||this.nodes.forEach(Nf),this.isUpdating=!1,this.nodes.forEach(kf),this.nodes.forEach(Tf),this.nodes.forEach(Of),this.clearAllSnapshots();const e=Ec.now();gc.delta=su(0,1e3/60,e-gc.timestamp),gc.timestamp=e,gc.isProcessing=!0,vc.update.process(gc),vc.preRender.process(gc),vc.render.process(gc),gc.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Rf),this.sharedNodes.forEach(Bf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,fc.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){fc.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||$p(this.snapshot.measuredBox.x)||$p(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!hf(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||rh(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Kf((r=n).x),Kf(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(Yf)){const{scroll:e}=this.root;e&&(ph(n.x,e.offset.x),ph(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(of(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const r=this.path[t],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&of(n,e),ph(n.x,o.offset.x),ph(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};of(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&fh(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),rh(r.latestValues)&&fh(n,r.latestValues)}return rh(this.latestValues)&&fh(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};of(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!rh(n.latestValues))continue;nh(n.latestValues)&&n.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};of(r,n.measurePageBox()),df(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return rh(this.latestValues)&&df(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==gc.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=gc.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Jp(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),of(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var a,s,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,qp(a.x,s.x,l.x),qp(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):of(this.target,this.layout.layoutBox),ch(this.target,this.targetDelta)):of(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Jp(this.relativeTargetOrigin,this.target,e.target),of(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}pc.value&&bf.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!nh(this.parent.latestValues)&&!oh(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===gc.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;of(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&fh(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,ch(e,a)),r&&rh(i.latestValues)&&fh(e,i.latestValues))}t.x<dh&&t.x>uh&&(t.x=1),t.y<dh&&t.y>uh&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(af(this.prevProjectionDelta.x,this.projectionDelta.x),af(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Xp(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===a&&this.treeScale.y===s&&yf(this.projectionDelta.x,this.prevProjectionDelta.x)&&yf(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),pc.value&&bf.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(Wf));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;_f(i.x,e.x,n),_f(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jp(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Zf(e.x,t.x,n.x,r),Zf(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&function(e,t){return ff(e.x,t.x)&&ff(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),of(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=Dd(0,void 0!==n.opacity?n.opacity:1,ef(r)),e.opacityExit=Dd(void 0!==t.opacity?t.opacity:1,0,tf(r))):i&&(e.opacity=Dd(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<qh;o++){const i=`border${Xh[o]}Radius`;let a=Qh(t,i),s=Qh(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Jh(a)===Jh(s)?(e[i]=Math.max(Dd(Gh(a),Gh(s),r),0),(wu.test(s)||wu.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Dd(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(mc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=fc.update((()=>{Ih.hasAnimatedSinceResize=!0,Lc.layout++,this.currentAnimation=function(e,t,n){const r=Uc(0)?0:Ic(0);return r.start(Sp("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Lc.layout--},onComplete:()=>{Lc.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&$f(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=$p(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=$p(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}of(t,n),fh(t,o),Xp(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new xf),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Sf("z",e,r,this.animationValues);for(let t=0;t<wf.length;t++)Sf(`rotate${wf[t]}`,e,r,this.animationValues),Sf(`skew${wf[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Ef;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Yh(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Yh(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!rh(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(null==n?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const e in Wh){if(void 0===a[e])continue;const{correct:t,applyTo:n,isCSSVariable:o}=Wh[e],s="none"===r.transform?a[e]:t(a[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=s}else o?this.options.visualElement.renderState.vars[e]=s:r[e]=s}return this.options.layoutId&&(r.pointerEvents=i===this?Yh(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Df),this.root.sharedNodes.clear()}}}function Tf(e){e.updateLayout()}function Of(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?eh((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=$p(r);r.min=t[e].min,r.max=r.min+o})):$f(o,n.layoutBox,t)&&eh((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=$p(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Xp(a,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?Xp(s,e.applyTransform(r,!0),n.measuredBox):Xp(s,t,n.layoutBox);const l=!hf(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a={x:{min:0,max:0},y:{min:0,max:0}};Jp(a,n.layoutBox,o.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};Jp(s,t,i.layoutBox),gf(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Mf(e){pc.value&&bf.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function jf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Rf(e){e.clearSnapshot()}function Df(e){e.clearMeasurements()}function Nf(e){e.isLayoutDirty=!1}function kf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Lf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Vf(e){e.resolveTargetDelta()}function Ff(e){e.calcProjection()}function If(e){e.resetSkewAndRotation()}function Bf(e){e.removeLeadSnapshot()}function _f(e,t,n){e.translate=Dd(t.translate,0,n),e.scale=Dd(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Zf(e,t,n,r){e.min=Dd(t.min,n.min,r),e.max=Dd(t.max,n.max,r)}function Wf(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const zf={duration:.45,ease:[.4,0,.1,1]},Uf=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Hf=Uf("applewebkit/")&&!Uf("chrome/")?Math.round:kl;function Kf(e){e.min=Hf(e.min),e.max=Hf(e.max)}function $f(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=vf(t),o=vf(n),!(Math.abs(r-o)<=.2));var r,o}function Yf(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Xf=Af({attachResizeListener:(e,t)=>zp(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),qf={current:void 0},Gf=Af({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qf.current){const e=new Xf({});e.mount(window),e.setOptions({layoutScroll:!0}),qf.current=e}return qf.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Jf={pan:{Feature:class extends _p{constructor(){super(...arguments),this.removePointerDownListener=kl}onPointerDown(e){this.session=new xh(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:gh(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:kh(e),onStart:kh(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&fc.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Hp(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends _p{constructor(e){super(e),this.removeGroupControls=kl,this.removeListeners=kl,this.controls=new Dh(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||kl}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Gf,MeasureLayout:Uh}};function Qf(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&fc.postRender((()=>o(t,Up(t))))}function em(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&fc.postRender((()=>o(t,Up(t))))}const tm=new WeakMap,nm=new WeakMap,rm=e=>{const t=tm.get(e.target);t&&t(e)},om=e=>{e.forEach(rm)};const im={some:0,all:1},am={inView:{Feature:class extends _p{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:im[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;nm.has(n)||nm.set(n,{});const r=nm.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(om,{root:e,...t})),r[o]}(t);return tm.set(e,n),r.observe(e),()=>{tm.delete(e),r.unobserve(e)}}(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends _p{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=Cc(e,n),a=e=>{const n=e.currentTarget;if(!n||!kc(e)||Rc.has(n))return;Rc.add(n),Tc(e,"set");const r=t(n,e),i=(e,t)=>{n.removeEventListener("pointerup",a),n.removeEventListener("pointercancel",s),Tc(e,"release"),kc(e)&&Rc.has(n)&&(Rc.delete(n),"function"==typeof r&&r(e,{success:t}))},a=e=>{const t=!!e.isTrusted&&(r=e,o=n instanceof Element?n.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight},r.clientX<o.left||r.clientX>o.right||r.clientY<o.top||r.clientY>o.bottom);var r,o;i(e,!t&&(!(n instanceof Element)||Oc(n,e.target)))},s=e=>{i(e,!1)};n.addEventListener("pointerup",a,o),n.addEventListener("pointercancel",s,o),n.addEventListener("lostpointercapture",s,o)};return r.forEach((e=>{let t=!1;var r;(e=n.useGlobalTarget?window:e)instanceof HTMLElement&&(t=!0,r=e,jc.has(r.tagName)||-1!==r.tabIndex||null!==e.getAttribute("tabindex")||(e.tabIndex=0)),e.addEventListener("pointerdown",a,o),t&&e.addEventListener("focus",(e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Dc((()=>{if(Rc.has(n))return;Nc(n,"down");const e=Dc((()=>{Nc(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>Nc(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)})(e,o)),o)})),i}(e,((e,t)=>(em(this.node,t,"Start"),(e,{success:t})=>em(this.node,e,t?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends _p{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_d(zp(this.node.current,"focus",(()=>this.onFocus())),zp(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends _p{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=Cc(e,n),a=e=>{if(!Ac(e))return;const{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;const i=e=>{Ac(e)&&(r(e),n.removeEventListener("pointerleave",i))};n.addEventListener("pointerleave",i,o)};return r.forEach((e=>{e.addEventListener("pointerenter",a,o)})),i}(e,((e,t)=>(Qf(this.node,t,"Start"),e=>Qf(this.node,e,"End")))))}unmount(){}}}},sm={layout:{ProjectionNode:Gf,MeasureLayout:Uh}},lm=(0,e.createContext)({strict:!1}),cm=(0,e.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),um=(0,e.createContext)({});function dm(e){return Ul(e.animate)||Dp.some((t=>jp(e[t])))}function pm(e){return Boolean(dm(e)||e.variants)}function hm(e){return Array.isArray(e)?e.join(" "):e}const fm="undefined"!=typeof window,mm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},gm={};for(const e in mm)gm[e]={isEnabled:t=>mm[e].some((e=>!!t[e]))};const vm=Symbol.for("motionComponentSymbol");function ym(t,n,r){return(0,e.useCallback)((e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),r&&("function"==typeof r?r(e):vh(r)&&(r.current=e))}),[n])}const xm=fm?e.useLayoutEffect:e.useEffect;function bm(t,n,r,o,i){var a,s;const{visualElement:l}=(0,e.useContext)(um),c=(0,e.useContext)(lm),u=(0,e.useContext)(Lh),d=(0,e.useContext)(cm).reducedMotion,p=(0,e.useRef)(null);o=o||c.renderer,!p.current&&o&&(p.current=o(t,{visualState:n,parent:l,props:r,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const h=p.current,f=(0,e.useContext)(Fh);!h||h.projection||!i||"html"!==h.type&&"svg"!==h.type||function(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:wm(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(a)||s&&vh(s),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(p.current,r,i,f);const m=(0,e.useRef)(!1);(0,e.useInsertionEffect)((()=>{h&&m.current&&h.update(r,u)}));const g=r[$c],v=(0,e.useRef)(Boolean(g)&&!(null===(a=window.MotionHandoffIsComplete)||void 0===a?void 0:a.call(window,g))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,g)));return xm((()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),yc.render(h.render),v.current&&h.animationState&&h.animationState.animateChanges())})),(0,e.useEffect)((()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&(queueMicrotask((()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,g)})),v.current=!1))})),h}function wm(e){if(e)return!1!==e.options.allowProjection?e.projection:wm(e.parent)}function Em({preloadedFeatures:t,createVisualElement:n,useRender:r,useVisualState:o,Component:i}){var a,s;function l(t,a){let s;const l={...(0,e.useContext)(cm),...t,layoutId:Pm(t)},{isStatic:c}=l,u=function(t){const{initial:n,animate:r}=function(e,t){if(dm(e)){const{initial:t,animate:n}=e;return{initial:!1===t||jp(t)?t:void 0,animate:jp(n)?n:void 0}}return!1!==e.inherit?t:{}}(t,(0,e.useContext)(um));return(0,e.useMemo)((()=>({initial:n,animate:r})),[hm(n),hm(r)])}(t),d=o(t,c);if(!c&&fm){(0,e.useContext)(lm).strict;const t=function(e){const{drag:t,layout:n}=gm;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(l);s=t.MeasureLayout,u.visualElement=bm(i,d,l,n,t.ProjectionNode)}return(0,Nt.jsxs)(um.Provider,{value:u,children:[s&&u.visualElement?(0,Nt.jsx)(s,{visualElement:u.visualElement,...l}):null,r(i,t,ym(d,u.visualElement,a),d,c,u.visualElement)]})}t&&function(e){for(const t in e)gm[t]={...gm[t],...e[t]}}(t),l.displayName=`motion.${"string"==typeof i?i:`create(${null!==(s=null!==(a=i.displayName)&&void 0!==a?a:i.name)&&void 0!==s?s:""})`}`;const c=(0,e.forwardRef)(l);return c[vm]=i,c}function Pm({layoutId:t}){const n=(0,e.useContext)(Vh).id;return n&&void 0!==t?n+"-"+t:t}function Sm(e,{layout:t,layoutId:n}){return _c.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Wh[e]||"opacity"===e)}const Cm=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Am={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Tm=Bc.length;function Om(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const e in t){const n=t[e];if(_c.has(e))a=!0;else if(vd(e))o[e]=n;else{const t=Cm(n,Uu[e]);e.startsWith("origin")?(s=!0,i[e]=t):r[e]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<Tm;i++){const a=Bc[i],s=e[a];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!l||n){const e=Cm(s,Uu[a]);l||(o=!1,r+=`${Am[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}function Mm(e,t,n){for(const r in t)Uc(t[r])||Sm(r,n)||(e[r]=t[r])}function jm(t,n){const r={},o=function(t,n){const r={};return Mm(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n){return(0,e.useMemo)((()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Om(e,n,t),Object.assign({},e.vars,e.style)}),[n])}(t,n)),r}(t,n);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=o,r}const Rm=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Dm(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Rm.has(e)}let Nm=e=>!Dm(e);try{(km=require("@emotion/is-prop-valid").default)&&(Nm=e=>e.startsWith("on")?!Dm(e):km(e))}catch(e){}var km;const Lm=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Vm(e){return"string"==typeof e&&!e.includes("-")&&!!(Lm.indexOf(e)>-1||/[A-Z]/u.test(e))}const Fm={offset:"stroke-dashoffset",array:"stroke-dasharray"},Im={offset:"strokeDashoffset",array:"strokeDasharray"};function Bm(e,t,n){return"string"==typeof e?e:Eu.transform(t+n*e)}function _m(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Om(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:f}=e;p.transform&&(f&&(h.transform=p.transform),delete p.transform),f&&(void 0!==o||void 0!==i||h.transform)&&(h.transformOrigin=function(e,t,n){return`${Bm(t,e.x,e.width)} ${Bm(n,e.y,e.height)}`}(f,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(p.x=t),void 0!==n&&(p.y=n),void 0!==r&&(p.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Fm:Im;e[i.offset]=Eu.transform(-r);const a=Eu.transform(t),s=Eu.transform(n);e[i.array]=`${a} ${s}`}(p,a,s,l,!1)}const Zm=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Wm(t,n,r,o){const i=(0,e.useMemo)((()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return _m(e,n,Zm(o),t.transformTemplate),{...e.attrs,style:{...e.style}}}),[n]);if(t.style){const e={};Mm(e,t.style,t),i.style={...e,...i.style}}return i}function zm(t=!1){return(n,r,o,{latestValues:i},a)=>{const s=(Vm(n)?Wm:jm)(r,i,a,n),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(Nm(o)||!0===n&&Dm(o)||!t&&!Dm(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(r,"string"==typeof n,t),c=n!==e.Fragment?{...l,...s,ref:o}:{},{children:u}=r,d=(0,e.useMemo)((()=>Uc(u)?u.get():u),[u]);return(0,e.createElement)(n,{...c,children:d})}}const Um=t=>(n,r)=>{const o=(0,e.useContext)(um),i=(0,e.useContext)(Lh),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:Hm(r,o,i,e),renderState:t()};return n&&(a.onMount=e=>n({props:r,current:e,...a}),a.onUpdate=e=>n(e)),a}(t,n,o,i);return r?a():function(t){const n=(0,e.useRef)(null);return null===n.current&&(n.current=t()),n.current}(a)};function Hm(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Yh(i[e]);let{initial:a,animate:s}=e;const l=dm(e),c=pm(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!Ul(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Kl(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}function Km(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Uc(o[a])||t.style&&Uc(t.style[a])||Sm(a,e)||void 0!==(null===(r=null==n?void 0:n.getValue(a))||void 0===r?void 0:r.liveStyle))&&(i[a]=o[a]);return i}const $m={useVisualState:Um({scrapeMotionValuesFromProps:Km,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function Ym(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(e){t.dimensions={x:0,y:0,width:0,height:0}}}function Xm(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const qm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Gm(e,t,n,r){Xm(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(qm.has(n)?n:Kc(n),t.attrs[n])}function Jm(e,t,n){const r=Km(e,t,n);for(const n in e)(Uc(e[n])||Uc(t[n]))&&(r[-1!==Bc.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}const Qm=["x","y","width","height","cx","cy","r"],eg={useVisualState:Um({scrapeMotionValuesFromProps:Jm,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i)for(const e in o)if(_c.has(e)){i=!0;break}if(!i)return;let a=!t;if(t)for(let n=0;n<Qm.length;n++){const r=Qm[n];e[r]!==t[r]&&(a=!0)}a&&fc.read((()=>{Ym(n,r),fc.render((()=>{_m(r,o,Zm(n.tagName),e.transformTemplate),Gm(n,r)}))}))}})};function tg(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return Em({...Vm(n)?eg:$m,preloadedFeatures:e,useRender:zm(r),createVisualElement:t,Component:n})}}const ng={current:null},rg={current:!1},og=[...Sd,Tu,Vu],ig=new WeakMap,ag=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class sg{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=Ec.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,fc.render(this.render,!1,!0))};const{latestValues:s,renderState:l,onUpdate:c}=i;this.onUpdate=c,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=dm(t),this.isVariantNode=pm(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==s[e]&&Uc(t)&&t.set(s[e],!1)}}mount(e){this.current=e,ig.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),rg.current||function(){if(rg.current=!0,fm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ng.current=e.matches;e.addListener(t),t()}else ng.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ng.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),mc(this.notifyUpdate),mc(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=_c.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&fc.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),o(),i&&i(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in gm){const t=gm[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ag.length;t++){const n=ag[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Uc(o))e.addValue(r,o);else if(Uc(i))e.addValue(r,Ic(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,Ic(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Ic(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var o;return null!=r&&("string"==typeof r&&(md(r)||au(r))?r=parseFloat(r):(o=r,!og.find(Pd(o))&&Vu.test(t)&&(r=$u(e,t))),this.setBaseTarget(e,Uc(r)?r.get():r)),Uc(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=Kl(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Uc(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Bl),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class lg extends sg{constructor(){super(...arguments),this.KeyframeResolver=Ad}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Uc(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class cg extends lg{constructor(){super(...arguments),this.type="html",this.renderInstance=Xm}readValueFromInstance(e,t){if(_c.has(t))return((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return rd(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),o=(vd(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return mh(e,t)}build(e,t,n){Om(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Km(e,t,n)}}class ug extends lg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Qp,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Ym(this.current,this.renderState)}}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(_c.has(t)){const e=Ku(t);return e&&e.default||0}return t=qm.has(t)?t:Kc(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Jm(e,t,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&fc.postRender(this.updateDimensions)}build(e,t,n){_m(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Gm(e,t,0,r)}mount(e){this.isSVGTag=Zm(e.tagName),super.mount(e)}}const dg=(t,n)=>Vm(t)?new ug(n):new cg(n,{allowProjection:t!==e.Fragment}),pg=zl(tg({...Wp,...am,...Jf,...sm},dg));var hg={type:"spring",stiffness:700,damping:30};const fg=function(e){var t=e.on,r=e.onChange,o=e.disabled,i=e.label;return n().createElement("button",{className:"flex flex-row items-center cursor-pointer select-none border-none bg-transparent",disabled:o,onClick:function(){return null==r?void 0:r(!t)},"aria-label":i},n().createElement("div",{className:"w-[35px] h-[20px] flex flex-row items-center p-[5px] rounded-[50px] transition-colors duration-200 ".concat(t?"bg-primary-500 justify-end":"bg-gray-200 justify-start")},n().createElement(pg.div,{className:"w-[10px] h-[10px] rounded-full ".concat(t?"bg-white":"bg-gray-500"),transition:hg})))},mg=function(e){var t=e.color,r=e.children,o=e.onClick,i=e.iconLeft,a=e.iconRight;return n().createElement("button",{onClick:function(){return null==o?void 0:o()},className:"".concat("rounded-inner px-4 py-2 flex items-center justify-between border-0 cursor-pointer transition-all duration-300 ease-in-out font-medium"," ").concat({primary:"text-primary-900 bg-white hover:bg-gray-200",secondary:"text-secondary-800 bg-secondary-100 hover:text-white hover:bg-secondary-800",white:"text-primary-900 bg-white hover:bg-gray-200"}[t])},i&&n().createElement("span",{className:"flex items-center justify-center mr-2"},i),r,a&&n().createElement("span",{className:"flex items-center justify-center ml-2"},a))};var[gg,vg]=kt("Tooltip",[Ur]),yg=Ur(),xg="TooltipProvider",bg=700,wg="tooltip.open",[Eg,Pg]=gg(xg),Sg=t=>{const{__scopeTooltip:n,delayDuration:r=bg,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:a}=t,[s,l]=e.useState(!0),c=e.useRef(!1),u=e.useRef(0);return e.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),(0,Nt.jsx)(Eg,{scope:n,isOpenDelayed:s,delayDuration:r,onOpen:e.useCallback((()=>{window.clearTimeout(u.current),l(!1)}),[]),onClose:e.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),o)}),[o]),isPointerInTransitRef:c,onPointerInTransitChange:e.useCallback((e=>{c.current=e}),[]),disableHoverableContent:i,children:a})};Sg.displayName=xg;var Cg="Tooltip",[Ag,Tg]=gg(Cg),Og=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:i=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=t,c=Pg(Cg,t.__scopeTooltip),u=yg(n),[d,p]=e.useState(null),h=pn(),f=e.useRef(0),m=s??c.disableHoverableContent,g=l??c.delayDuration,v=e.useRef(!1),[y=!1,x]=fo({prop:o,defaultProp:i,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(wg))):c.onClose(),a?.(e)}}),b=e.useMemo((()=>y?v.current?"delayed-open":"instant-open":"closed"),[y]),w=e.useCallback((()=>{window.clearTimeout(f.current),f.current=0,v.current=!1,x(!0)}),[x]),E=e.useCallback((()=>{window.clearTimeout(f.current),f.current=0,x(!1)}),[x]),P=e.useCallback((()=>{window.clearTimeout(f.current),f.current=window.setTimeout((()=>{v.current=!0,x(!0),f.current=0}),g)}),[g,x]);return e.useEffect((()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)}),[]),(0,Nt.jsx)(ao,{...u,children:(0,Nt.jsx)(Ag,{scope:n,contentId:h,open:y,stateAttribute:b,trigger:d,onTriggerChange:p,onTriggerEnter:e.useCallback((()=>{c.isOpenDelayed?P():w()}),[c.isOpenDelayed,P,w]),onTriggerLeave:e.useCallback((()=>{m?E():(window.clearTimeout(f.current),f.current=0)}),[E,m]),onOpen:w,onClose:E,disableHoverableContent:m,children:r})})};Og.displayName=Cg;var Mg="TooltipTrigger",jg=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,...o}=t,i=Tg(Mg,r),a=Pg(Mg,r),s=yg(r),l=Dt(n,e.useRef(null),i.onTriggerChange),c=e.useRef(!1),u=e.useRef(!1),d=e.useCallback((()=>c.current=!1),[]);return e.useEffect((()=>()=>document.removeEventListener("pointerup",d)),[d]),(0,Nt.jsx)(so,{asChild:!0,...s,children:(0,Nt.jsx)(Zt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:l,onPointerMove:Mt(t.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||a.isPointerInTransitRef.current||(i.onTriggerEnter(),u.current=!0))})),onPointerLeave:Mt(t.onPointerLeave,(()=>{i.onTriggerLeave(),u.current=!1})),onPointerDown:Mt(t.onPointerDown,(()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})})),onFocus:Mt(t.onFocus,(()=>{c.current||i.onOpen()})),onBlur:Mt(t.onBlur,i.onClose),onClick:Mt(t.onClick,i.onClose)})})}));jg.displayName=Mg;var Rg="TooltipPortal",[Dg,Ng]=gg(Rg,{forceMount:void 0}),kg="TooltipContent",Lg=e.forwardRef(((e,t)=>{const n=Ng(kg,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Tg(kg,e.__scopeTooltip);return(0,Nt.jsx)(po,{present:r||a.open,children:a.disableHoverableContent?(0,Nt.jsx)(Bg,{side:o,...i,ref:t}):(0,Nt.jsx)(Vg,{side:o,...i,ref:t})})})),Vg=e.forwardRef(((t,n)=>{const r=Tg(kg,t.__scopeTooltip),o=Pg(kg,t.__scopeTooltip),i=e.useRef(null),a=Dt(n,i),[s,l]=e.useState(null),{trigger:c,onClose:u}=r,d=i.current,{onPointerInTransitChange:p}=o,h=e.useCallback((()=>{l(null),p(!1)}),[p]),f=e.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...o,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);l(i),p(!0)}),[p]);return e.useEffect((()=>()=>h()),[h]),e.useEffect((()=>{if(c&&d){const e=e=>f(e,d),t=e=>f(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[c,d,f,h]),e.useEffect((()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||d?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-a)*(r-s)/(c-s)+a&&(o=!o)}return o}(n,s);r?h():o&&(h(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,d,s,u,h]),(0,Nt.jsx)(Bg,{...t,ref:a})})),[Fg,Ig]=gg(Cg,{isInside:!1}),Bg=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,children:o,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=t,c=Tg(kg,r),u=yg(r),{onClose:d}=c;return e.useEffect((()=>(document.addEventListener(wg,d),()=>document.removeEventListener(wg,d))),[d]),e.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;t?.contains(c.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,d]),(0,Nt.jsx)(Kt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,Nt.jsxs)(lo,{"data-state":c.stateAttribute,...u,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,Nt.jsx)(Bt,{children:o}),(0,Nt.jsx)(Fg,{scope:r,isInside:!0,children:(0,Nt.jsx)(Xi,{id:c.contentId,role:"tooltip",children:i||o})})]})})}));Lg.displayName=kg;var _g="TooltipArrow";e.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=yg(n);return Ig(_g,n).isInside?null:(0,Nt.jsx)(co,{...o,...r,ref:t})})).displayName=_g;var Zg=Lg,Wg=function(){return Wg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Wg.apply(this,arguments)},zg=Sg,Ug=Og,Hg=jg,Kg=e.forwardRef((function(t,n){var r=t.className,o=t.sideOffset,i=void 0===o?4:o,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["className","sideOffset"]);return e.createElement(Zg,Wg({ref:n,sideOffset:i,className:Se("z-50 overflow-hidden rounded-inner bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",r)},a))}));Kg.displayName=Zg.displayName})(),s})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports["@ourtrip/ui"]=t(require("react"),require("react-dom")):e["@ourtrip/ui"]=t(e.react,e["react-dom"])}(this,((e,t)=>(()=>{var n,r,o={155:t=>{"use strict";t.exports=e},514:e=>{"use strict";e.exports=t},698:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o},848:(e,t,n)=>{"use strict";e.exports=n(698)},942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return o[e](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var o=Object.create(null);a.r(o);var i={};n=n||[null,r({}),r([]),r(r)];for(var s=2&t&&e;"object"==typeof s&&!~n.indexOf(s);s=r(s))Object.getOwnPropertyNames(s).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,a.d(o,i),o},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nc=void 0;var s={};return(()=>{"use strict";a.r(s),a.d(s,{Accordion:()=>r,Alert:()=>Q,Badge:()=>ee,Breadcrumbs:()=>ue,Button:()=>Oe,Card:()=>je,Checkbox:()=>Ze,Collapse:()=>at,Divider:()=>ut,Input:()=>ht,Modal:()=>ft,Pagination:()=>At,PhoneInput:()=>Ot,Popover:()=>ji,PopoverContent:()=>Di,PopoverTrigger:()=>Ri,Radio:()=>Li,Range:()=>Hi,Select:()=>hs,SelectContent:()=>xs,SelectGroup:()=>fs,SelectItem:()=>ws,SelectLabel:()=>bs,SelectScrollDownButton:()=>ys,SelectScrollUpButton:()=>vs,SelectSeparator:()=>Es,SelectTrigger:()=>gs,SelectValue:()=>ms,Sheet:()=>bl,SheetClose:()=>El,SheetContent:()=>Al,SheetDescription:()=>jl,SheetFooter:()=>Ol,SheetHeader:()=>Tl,SheetOverlay:()=>Sl,SheetPortal:()=>Pl,SheetTitle:()=>Ml,SheetTrigger:()=>wl,Stars:()=>_e,StepMarker:()=>Rl,Switch:()=>fg,Tag:()=>mg,Tooltip:()=>Ug,TooltipContent:()=>Kg,TooltipProvider:()=>zg,TooltipTrigger:()=>Hg});var e=a(155),t=a.t(e,2),n=a.n(e);const r=function(t){var r=t.title,o=t.text,i=(0,e.useState)(!1),a=i[0],s=i[1];return n().createElement("div",{className:"w-full flex flex-col p-6 border border-gray-200 rounded-default cursor-pointer",onClick:function(){return s((function(e){return!e}))}},n().createElement("div",{className:"flex items-center gap-6"},n().createElement("div",{className:"relative w-10 h-10 rounded-full flex justify-center items-center transition-colors duration-300 ".concat(a?"bg-primary-900":"bg-gray-100")},n().createElement("div",{className:"absolute w-4 h-0.5 rounded transition-transform duration-300 ".concat(a?"bg-primary-900 transform rotate-[-90deg]":"bg-primary-900 transform rotate-[-180deg]")}),n().createElement("div",{className:"absolute w-4 h-0.5 rounded transition-transform duration-300 ".concat(a?"bg-white transform rotate-0":"bg-primary-900 transform rotate-[-90deg]")})),n().createElement("h2",{className:"font-medium text-lg text-primary-900"},r)),n().createElement("div",{className:"pl-16 overflow-hidden transition-max-height duration-500 ease-in-out ".concat(a?"max-h-56":"max-h-0")},n().createElement("p",{className:"pt-2.5 text-base text-gray-500 leading-7"},o)))},o=(0,e.createContext)({color:"currentColor",size:"1em",weight:"regular",mirrored:!1});var i=Object.defineProperty,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p=(e,t)=>{for(var n in t||(t={}))c.call(t,n)&&d(e,n,t[n]);if(l)for(var n of l(t))u.call(t,n)&&d(e,n,t[n]);return e},h=(e,t)=>{var n={};for(var r in e)c.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&l)for(var r of l(e))t.indexOf(r)<0&&u.call(e,r)&&(n[r]=e[r]);return n};const f=(0,e.forwardRef)(((t,n)=>{const r=t,{alt:i,color:a,size:s,weight:l,mirrored:c,children:u,weights:d}=r,f=h(r,["alt","color","size","weight","mirrored","children","weights"]),m=(0,e.useContext)(o),{color:g="currentColor",size:v,weight:y="regular",mirrored:x=!1}=m,b=h(m,["color","size","weight","mirrored"]);return e.createElement("svg",p(p({ref:n,xmlns:"http://www.w3.org/2000/svg",width:null!=s?s:v,height:null!=s?s:v,fill:null!=a?a:g,viewBox:"0 0 256 256",transform:c||x?"scale(-1, 1)":void 0},b),f),!!i&&e.createElement("title",null,i),u,d.get(null!=l?l:y))}));f.displayName="IconBase";const m=f,g=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z"}))]]);var v=Object.defineProperty,y=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,P=(e,t,n)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const S=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>y(e,x(t)))(((e,t)=>{for(var n in t||(t={}))w.call(t,n)&&P(e,n,t[n]);if(b)for(var n of b(t))E.call(t,n)&&P(e,n,t[n]);return e})({ref:n},t),{weights:g}))));S.displayName="WarningCircle";const C=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),e.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]);var A=Object.defineProperty,T=Object.defineProperties,O=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,D=(e,t,n)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const N=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>T(e,O(t)))(((e,t)=>{for(var n in t||(t={}))j.call(t,n)&&D(e,n,t[n]);if(M)for(var n of M(t))R.call(t,n)&&D(e,n,t[n]);return e})({ref:n},t),{weights:C}))));N.displayName="Check";const k=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),e.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]);var L=Object.defineProperty,V=Object.defineProperties,F=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,Z=(e,t,n)=>t in e?L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const W=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>V(e,F(t)))(((e,t)=>{for(var n in t||(t={}))B.call(t,n)&&Z(e,n,t[n]);if(I)for(var n of I(t))_.call(t,n)&&Z(e,n,t[n]);return e})({ref:n},t),{weights:k}))));W.displayName="Info";const z=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),e.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]);var U=Object.defineProperty,H=Object.defineProperties,K=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,q=(e,t,n)=>t in e?U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const G=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>H(e,K(t)))(((e,t)=>{for(var n in t||(t={}))Y.call(t,n)&&q(e,n,t[n]);if($)for(var n of $(t))X.call(t,n)&&q(e,n,t[n]);return e})({ref:n},t),{weights:z}))));G.displayName="Warning";var J={danger:n().createElement(S,{size:24}),success:n().createElement(N,{size:24}),info:n().createElement(W,{size:24}),warning:n().createElement(G,{size:24})};const Q=function(e){var t=e.type,r=e.variant,o=e.children,i="".concat("rounded-default p-4 flex items-start gap-4"," ").concat({info:{fill:"bg-info-500 text-white",outline:"border border-info-500 text-info-500"},success:{fill:"bg-success-500 text-white",outline:"border border-success-500 text-success-500"},danger:{fill:"bg-danger-500 text-white",outline:"border border-danger-500 text-danger-500"},warning:{fill:"bg-warning-500 text-white",outline:"border border-warning-500 text-warning-500"}}[t][r]);return n().createElement("div",{className:i},J[t],n().createElement("div",null,o))},ee=function(e){var t=e.children,r=e.icon,o=e.type,i=e.size,a=void 0===i?"normal":i,s=e.mobile,l=e.className,c="flex items-center rounded-inner ".concat(s?"lg:hidden md:flex":""," ").concat(l||""),u="",d={small:"px-2 py-1 gap-0",normal:"py-2 px-3 gap-2",large:"py-3 px-4 gap-3"}[a],p={small:"text-xs",normal:"text-sm",large:"text-base"}[a];switch(o){case"success":u="bg-success-100 text-success-600";break;case"warning":u="bg-warning-100 text-warning-600";break;case"danger":u="bg-danger-100 text-danger-600";break;case"info":u="bg-info-100 text-info-900";break;case"white":u="bg-white text-gray-900";break;case"primary":u="bg-primary-500 text-white";break;case"secondary":u="bg-gray-100 text-primary-500";break;default:u=""}var h="font-medium whitespace-nowrap ".concat(p);return n().createElement("div",{className:"".concat(c," ").concat(u," ").concat(d)},r&&n().createElement("span",{className:"mr-2"},r),n().createElement("p",{className:h},t))},te=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),e.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]);var ne=Object.defineProperty,re=Object.defineProperties,oe=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,le=(e,t,n)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const ce=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>re(e,oe(t)))(((e,t)=>{for(var n in t||(t={}))ae.call(t,n)&&le(e,n,t[n]);if(ie)for(var n of ie(t))se.call(t,n)&&le(e,n,t[n]);return e})({ref:n},t),{weights:te}))));ce.displayName="CaretRight";const ue=function(e){var t=e.items;return n().createElement("div",{className:"flex items-center gap-2.5"},null==t?void 0:t.map((function(e,r){var o=r!==t.length-1;return n().createElement("div",{key:e.id,className:"flex items-center gap-2.5"},n().createElement("a",{onClick:function(){o&&window.open(e.href,"_blank")},className:"no-underline text-blue-900 text-sm ".concat(o?"hover:text-blue-500 hover:cursor-pointer":"cursor-text")},e.text),o&&n().createElement(ce,null))})))},de=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),e.createElement("path",{d:"M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,176A72,72,0,0,1,92,65.64a8,8,0,0,1,8,13.85,56,56,0,1,0,56,0,8,8,0,0,1,8-13.85A72,72,0,0,1,128,200Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z"}))]]);var pe=Object.defineProperty,he=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,ye=(e,t,n)=>t in e?pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const xe=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>he(e,fe(t)))(((e,t)=>{for(var n in t||(t={}))ge.call(t,n)&&ye(e,n,t[n]);if(me)for(var n of me(t))ve.call(t,n)&&ye(e,n,t[n]);return e})({ref:n},t),{weights:de}))));function be(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=be(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}xe.displayName="CircleNotch";const we=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Ee=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=be(e))&&(r&&(r+=" "),r+=t);return r},Pe=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Ee(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map((e=>{const t=null==n?void 0:n[e],r=null==i?void 0:i[e];if(null===t)return null;const a=we(t)||we(r);return o[e][a]})),s=n&&Object.entries(n).reduce(((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e}),{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce(((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every((e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...s}[t]):{...i,...s}[t]===n}))?[...e,n,r]:e}),[]);return Ee(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)};var Se=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(" ")},Ce=function(){return Ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ce.apply(this,arguments)},Ae=Pe("flex items-center justify-center gap-2 whitespace-nowrap transition-colors focus:outline-hidden",{variants:{variant:{fill:"",outline:"bg-transparent border"},color:{primary:"",secondary:"",danger:"",gray:"",white:""},size:{small:"h-[32px] px-4 text-sm",normal:"h-[40px] px-6 text-base",large:"h-[48px] px-8 text-lg",icon:"h-[40px] w-[40px] p-0"},shape:{default:"rounded-inner",rounded:"rounded-full"},fontWeight:{normal:"font-normal",bold:"font-medium"},fullWidth:{true:"w-full",false:""},fullHeight:{true:"h-full",false:""},disabled:{true:"bg-gray-200 text-gray-900 border-none cursor-not-allowed hover:bg-gray-200 hover:text-gray-900",false:""}},compoundVariants:[{variant:"fill",color:"primary",disabled:!1,className:"bg-primary-500 text-white hover:bg-primary-400 active:bg-primary-600"},{variant:"fill",color:"secondary",disabled:!1,className:"bg-secondary-500 text-white hover:bg-secondary-400 active:bg-secondary-600"},{variant:"fill",color:"danger",disabled:!1,className:"bg-red-500 text-white hover:bg-red-400 active:bg-red-600"},{variant:"fill",color:"gray",disabled:!1,className:"bg-gray-100 text-gray-700 hover:bg-gray-200 active:bg-gray-300"},{variant:"fill",color:"white",disabled:!1,className:"bg-white text-black hover:bg-gray-200"},{variant:"outline",color:"primary",disabled:!1,className:"text-primary-500 border-primary-500 hover:text-primary-400 hover:border-primary-400"},{variant:"outline",color:"secondary",disabled:!1,className:"text-secondary-500 border-secondary-500 hover:text-secondary-400 hover:border-secondary-400"},{variant:"outline",color:"danger",disabled:!1,className:"text-red-500 border-red-500 hover:text-red-400 hover:border-red-400"},{variant:"outline",color:"gray",disabled:!1,className:"text-gray-300 border-gray-300 hover:text-gray-500 hover:border-gray-400"},{variant:"outline",color:"white",disabled:!1,className:"text-white border-white hover:text-gray-200 hover:border-gray-200"}],defaultVariants:{variant:"fill",color:"primary",size:"normal",shape:"default",fontWeight:"normal",fullWidth:!1,fullHeight:!1,disabled:!1}}),Te=e.forwardRef((function(t,n){var r=t.className,o=t.variant,i=t.color,a=t.size,s=t.shape,l=t.fontWeight,c=t.fullWidth,u=t.fullHeight,d=t.disabled,p=t.loading,h=void 0!==p&&p,f=t.children,m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["className","variant","color","size","shape","fontWeight","fullWidth","fullHeight","disabled","loading","children"]);return e.createElement("button",Ce({className:Se(Ae({variant:o,color:i,size:a,shape:s,fontWeight:l,fullWidth:c,fullHeight:u,disabled:d||h}),r),ref:n,disabled:d||h},m),h?e.createElement(xe,{className:"animate-spin",weight:"bold"}):f)}));Te.displayName="Button";const Oe=Te;var Me=function(){return Me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Me.apply(this,arguments)};const je=function(e){var t=e.children,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children"]);return n().createElement("div",Me({className:"p-4 rounded-default border bg-white border-gray-200"},r),t)},Re=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M243,96a20.33,20.33,0,0,0-17.74-14l-56.59-4.57L146.83,24.62a20.36,20.36,0,0,0-37.66,0L87.35,77.44,30.76,82A20.45,20.45,0,0,0,19.1,117.88l43.18,37.24-13.2,55.7A20.37,20.37,0,0,0,79.57,233L128,203.19,176.43,233a20.39,20.39,0,0,0,30.49-22.15l-13.2-55.7,43.18-37.24A20.43,20.43,0,0,0,243,96ZM172.53,141.7a12,12,0,0,0-3.84,11.86L181.58,208l-47.29-29.08a12,12,0,0,0-12.58,0L74.42,208l12.89-54.4a12,12,0,0,0-3.84-11.86L41.2,105.24l55.4-4.47a12,12,0,0,0,10.13-7.38L128,41.89l21.27,51.5a12,12,0,0,0,10.13,7.38l55.4,4.47Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z",opacity:"0.2"}),e.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M237.28,97.87A14.18,14.18,0,0,0,224.76,88l-60.25-4.87-23.22-56.2a14.37,14.37,0,0,0-26.58,0L91.49,83.11,31.24,88a14.18,14.18,0,0,0-12.52,9.89A14.43,14.43,0,0,0,23,113.32L69,152.93l-14,59.25a14.4,14.4,0,0,0,5.59,15,14.1,14.1,0,0,0,15.91.6L128,196.12l51.58,31.71a14.1,14.1,0,0,0,15.91-.6,14.4,14.4,0,0,0,5.59-15l-14-59.25L233,113.32A14.43,14.43,0,0,0,237.28,97.87Zm-12.14,6.37-48.69,42a6,6,0,0,0-1.92,5.92l14.88,62.79a2.35,2.35,0,0,1-.95,2.57,2.24,2.24,0,0,1-2.6.1L131.14,184a6,6,0,0,0-6.28,0L70.14,217.61a2.24,2.24,0,0,1-2.6-.1,2.35,2.35,0,0,1-1-2.57l14.88-62.79a6,6,0,0,0-1.92-5.92l-48.69-42a2.37,2.37,0,0,1-.73-2.65,2.28,2.28,0,0,1,2.07-1.65l63.92-5.16a6,6,0,0,0,5.06-3.69l24.63-59.6a2.35,2.35,0,0,1,4.38,0l24.63,59.6a6,6,0,0,0,5.06,3.69l63.92,5.16a2.28,2.28,0,0,1,2.07,1.65A2.37,2.37,0,0,1,225.14,104.24Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M235.36,98.49A12.21,12.21,0,0,0,224.59,90l-61.47-5L139.44,27.67a12.37,12.37,0,0,0-22.88,0L92.88,85,31.41,90a12.45,12.45,0,0,0-7.07,21.84l46.85,40.41L56.87,212.64a12.35,12.35,0,0,0,18.51,13.49L128,193.77l52.62,32.36a12.12,12.12,0,0,0,13.69-.51,12.28,12.28,0,0,0,4.82-13l-14.32-60.42,46.85-40.41A12.29,12.29,0,0,0,235.36,98.49Zm-8.93,7.26-48.68,42a4,4,0,0,0-1.28,3.95l14.87,62.79a4.37,4.37,0,0,1-1.72,4.65,4.24,4.24,0,0,1-4.81.18L130.1,185.67a4,4,0,0,0-4.2,0L71.19,219.32a4.24,4.24,0,0,1-4.81-.18,4.37,4.37,0,0,1-1.72-4.65L79.53,151.7a4,4,0,0,0-1.28-3.95l-48.68-42A4.37,4.37,0,0,1,28.25,101a4.31,4.31,0,0,1,3.81-3L96,92.79a4,4,0,0,0,3.38-2.46L124,30.73a4.35,4.35,0,0,1,8.08,0l24.62,59.6A4,4,0,0,0,160,92.79l63.9,5.15a4.31,4.31,0,0,1,3.81,3A4.37,4.37,0,0,1,226.43,105.75Z"}))]]);var De=Object.defineProperty,Ne=Object.defineProperties,ke=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,Ie=(e,t,n)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const Be=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>Ne(e,ke(t)))(((e,t)=>{for(var n in t||(t={}))Ve.call(t,n)&&Ie(e,n,t[n]);if(Le)for(var n of Le(t))Fe.call(t,n)&&Ie(e,n,t[n]);return e})({ref:n},t),{weights:Re}))));Be.displayName="Star";const _e=function(e){var t=e.rate;return n().createElement("div",{className:"flex items-center gap-0.5"},Array.from({length:5}).map((function(e,r){return n().createElement(Be,{key:"".concat(t).concat(r),weight:t>r?"fill":"light",className:"text-yellow-300 ".concat(t>r?"text-yellow-300":""," ").concat(r>0?"hidden md:block":""),size:12})})),n().createElement("p",{className:"text-sm text-primary-900 font-medium block md:hidden"},t))},Ze=(0,e.memo)((function(t){var r=t.value,o=t.onChange,i=t.label,a=t.trailing,s=t.textColor,l=t.type,c=(0,e.useState)(r||!1),u=c[0],d=c[1];return(0,e.useEffect)((function(){void 0!==r&&d(r)}),[r]),n().createElement("div",{className:"w-full flex items-center justify-between cursor-pointer gap-2 select-none",onClick:function(){d((function(e){return!e})),null==o||o(!u)}},n().createElement("div",{className:"flex items-center gap-2"},n().createElement("div",{className:"w-5 h-5 flex items-center justify-center border border-primary-500 rounded-md flex-none mt-[3px] hover:bg-primary-500 ".concat(u?"bg-primary-500":"")},u&&n().createElement(N,{size:12,color:"white",weight:"bold"})),i&&n().createElement("p",{className:"flex items-center gap-1 text-sm mt-1 ".concat("primary"===s?"text-primary-900":"text-gray-500")},"stars"===l?n().createElement(_e,{rate:parseFloat(i.toString())}):i)),void 0!==a&&n().createElement("p",{className:"text-sm text-gray-500"},a))}),(function(e,t){return e.value===t.value&&e.label===t.label})),We=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),e.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]);var ze=Object.defineProperty,Ue=Object.defineProperties,He=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,Xe=(e,t,n)=>t in e?ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const qe=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>Ue(e,He(t)))(((e,t)=>{for(var n in t||(t={}))$e.call(t,n)&&Xe(e,n,t[n]);if(Ke)for(var n of Ke(t))Ye.call(t,n)&&Xe(e,n,t[n]);return e})({ref:n},t),{weights:We}))));qe.displayName="CaretUp";const Ge=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),e.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]);var Je=Object.defineProperty,Qe=Object.defineProperties,et=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,ot=(e,t,n)=>t in e?Je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const it=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>Qe(e,et(t)))(((e,t)=>{for(var n in t||(t={}))nt.call(t,n)&&ot(e,n,t[n]);if(tt)for(var n of tt(t))rt.call(t,n)&&ot(e,n,t[n]);return e})({ref:n},t),{weights:Ge}))));it.displayName="CaretDown";const at=function(t){var r=t.title,o=t.content,i=t.showPreview,a=void 0!==i&&i,s=t.togglePosition,l=void 0===s?"right":s,c=t.toggleText,u=(0,e.useState)(!1),d=u[0],p=u[1];return n().createElement("div",{className:"relative flex items-start ".concat("right"===l?"flex-row":"flex-col"," gap-3"),onClick:function(){return p((function(e){return!e}))}},n().createElement("div",{className:"mt-1"},n().createElement("h3",{className:"text-sm text-primary-900"},r),n().createElement("div",{className:"overflow-hidden transition-max-height duration-300 ease-in-out ".concat(d?"max-h-[1000px]":a?"max-h-12":"max-h-0")},n().createElement("p",{className:"mt-1 text-gray-500"},o))),n().createElement("div",{className:"flex items-center gap-2"},c&&n().createElement("span",null,d?c.close:c.open),n().createElement("div",{className:"w-7 h-7 rounded-full bg-gray-100 flex items-center justify-center"},d?n().createElement(qe,{size:18}):n().createElement(it,{size:18}))))};var st=a(942),lt=a.n(st),ct=function(){return ct=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ct.apply(this,arguments)};const ut=function(e){var t,r=e.orientation,o=void 0===r?"vertical":r,i=e.fullHeight,a=e.className,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["orientation","fullHeight","className"]),l=lt()(((t={"w-px h-10 bg-gray-200":"vertical"===o&&!i,"w-full h-px bg-gray-200":"horizontal"===o,"w-px h-full bg-gray-200":"vertical"===o&&i})[a]=a,t));return n().createElement("div",ct({},s,{className:l}))};var dt=function(){return dt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},dt.apply(this,arguments)},pt=(0,e.forwardRef)((function(t,r){var o=t.id,i=t.label,a=t.placeholder,s=t.color,l=void 0===s?"white":s,c=(t.dense,t.floating,t.border,t.onChange),u=t.onFocus,d=t.onBlur,p=t.focus,h=t.error,f=t.disabled,m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["id","label","placeholder","color","dense","floating","border","onChange","onFocus","onBlur","focus","error","disabled"]),g=(0,e.useRef)(null);return n().createElement("div",{"aria-labelledby":o,onClick:function(){var e;return null===(e=g.current)||void 0===e?void 0:e.focus()},className:"flex flex-col w-full ".concat(m.className)},n().createElement("div",{onClick:function(){var e;(null==r?void 0:r.current)?null===(e=r.current)||void 0===e||e.focus():null==p||p()}},i&&n().createElement("label",{htmlFor:o,className:"mb-2 text-sm text-gray-500"},i),n().createElement("input",dt({id:o,ref:function(e){"function"==typeof r?r(e):r&&"object"==typeof r&&(r.current=e),g.current=e},placeholder:a,autoComplete:"off"},m,{disabled:f,onChange:function(e){null==c||c(e)},onFocus:function(e){null==u||u(e)},onBlur:function(e){null==d||d(e)},className:"".concat("white"===l?"bg-white disabled:bg-white":"bg-gray-100 disabled:bg-gray-100"," w-full rounded-inner h-[50px] px-4 disabled:cursor-not-allowed placeholder-gray-500 text-primary-900 ").concat(m.className)}))),h&&n().createElement("span",{className:"text-sm text-red-600"},h))}));const ht=pt,ft=function(e){var t=e.isOpen,r=e.children,o=e.onClose,i=e.showCloseButton,a=void 0!==i&&i;return t?n().createElement("div",{className:"fixed top-0 left-0 w-full h-full bg-black/50 flex justify-center items-center"},n().createElement("div",{className:"bg-white rounded-default shadow-lg min-w-[350px] relative"},a?n().createElement("button",{type:"button",className:"absolute top-[10px] right-[10px] cursor-pointer",onClick:function(){return null==o?void 0:o()}},"Fechar"):null,n().createElement("div",{className:"modal-content"},r))):null},mt=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),e.createElement("path",{d:"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"}))]]);var gt=Object.defineProperty,vt=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,Et=(e,t,n)=>t in e?gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const Pt=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>vt(e,yt(t)))(((e,t)=>{for(var n in t||(t={}))bt.call(t,n)&&Et(e,n,t[n]);if(xt)for(var n of xt(t))wt.call(t,n)&&Et(e,n,t[n]);return e})({ref:n},t),{weights:mt}))));Pt.displayName="CaretLeft";var St=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Ct=Pe("w-10 h-10 flex items-center justify-center rounded-inner text-primary-900 transition-colors cursor-pointer",{variants:{selected:{true:"bg-primary-900 text-white hover:bg-primary-900",false:""},disabled:{true:"hover:text-primary-900",false:""},prevOrNext:{true:"bg-white hover:bg-primary-500 hover:text-white",false:"hover:bg-gray-200"}},defaultVariants:{selected:!1,disabled:!1,prevOrNext:!1}});const At=function(t){var r=t.page,o=t.total,i=t.loading,a=void 0!==i&&i,s=t.onChange,l=(0,e.useState)([]),c=l[0],u=l[1];return(0,e.useEffect)((function(){if(r&&o){u([1]);var e=r-2>1?r-2:1,t=r+1<o?r+1:o-1;1!==e&&u((function(e){return St(St([],e,!0),[0],!1)}));for(var n=function(e){u((function(t){return St(St([],t,!0),[e+1],!1)}))},i=e;i<t;i++)n(i);t+1!==o&&u((function(e){return St(St([],e,!0),[0],!1)})),u((function(e){return St(St([],e,!0),[o],!1)}))}}),[r,o]),n().createElement("div",{className:"w-full flex items-center justify-between"},n().createElement("div",{className:Se(Ct({disabled:a||1===r,prevOrNext:!0})),onClick:function(){return!a&&1!==r&&(null==s?void 0:s(r-1))}},n().createElement(Pt,{weight:"bold"})),n().createElement("div",{className:"flex items-center justify-between gap-2.5"},c.map((function(e,t){return n().createElement("div",{key:t,className:Se(Ct({selected:e===r,disabled:a||!e,prevOrNext:!1})),onClick:function(){return!a&&e&&(null==s?void 0:s(e))}},e||"...")}))),n().createElement("div",{className:Se(Ct({disabled:a||r===o,prevOrNext:!0})),onClick:function(){return!a&&r!==o&&(null==s?void 0:s(r+1))}},n().createElement(ce,{weight:"bold"})))};var Tt=function(){return Tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Tt.apply(this,arguments)};const Ot=function(e){var t,r,o,i,a,s,l,c,u,d,p,h,f=e.DDI,m=e.phoneDDIKey,g=e.phoneAreaCodeKey,v=e.phoneNumberKey,y=e.registerWithMask,x=e.setFocus,b=e.errors,w=e.ddiClassName,E=e.areaCodeClassName,P=e.phoneClassName,S=e.requiredMessage,C=e.ddiLabel,A=e.areaCodeLabel,T=e.numberLabel,O=(e.invalidAreaCodeMessage,e.invalidPhoneNumberMessage,"undefined"!=typeof window?window.location.host:"");return n().createElement("div",{className:"w-full flex flex-col gap-1"},n().createElement("div",{className:"flex flex-col md:flex-row gap-0.5"},n().createElement(ht,Tt({className:"flex-2 rounded-b-none md:rounded-r-none md:rounded-l-inner ".concat(w),placeholder:C},y(m,["+9","+99","+999"],{value:f,required:S}),{defaultValue:(null==O?void 0:O.includes(".br"))?"+55":"",color:"gray"})),n().createElement(ht,Tt({className:"flex-2 rounded-none ".concat(E),placeholder:A},y(g,"+55"===f?"(99)":"",{required:S,validate:function(e){return"+55"!==f||(t=e,[11,12,13,14,15,16,17,18,19,21,22,24,27,28,31,32,33,34,35,37,38,41,42,43,44,45,46,47,48,49,51,53,54,55,61,62,64,63,65,66,67,68,69,71,73,74,75,77,79,81,82,83,84,85,86,87,88,89,91,92,93,94,95,96,97,98,99].includes(parseFloat(null==t?void 0:t.replace(/\D/g,""))));var t},oncomplete:function(){"+55"===f&&x(v)}}),{color:"gray"})),n().createElement(ht,Tt({className:"flex-5 rounded-t-none md:rounded-l-none md:rounded-r-inner ".concat(P),placeholder:T},y(v,"+55"===f?"99999-9999":"",{required:S,validate:function(e){return"+55"!==f||function(e){var t=e.replace("-","");return/^\d{8}$/.test(t)||/^\d{9}$/.test(t)}(e)}}),{color:"gray"}))),((null===(r=null===(t=null==b?void 0:b.phone)||void 0===t?void 0:t.ddi)||void 0===r?void 0:r.message)||(null===(i=null===(o=null==b?void 0:b.phone)||void 0===o?void 0:o.areaCode)||void 0===i?void 0:i.message)||(null===(s=null===(a=null==b?void 0:b.phone)||void 0===a?void 0:a.number)||void 0===s?void 0:s.message))&&n().createElement("span",{className:"text-red-600 text-sm"},(null===(c=null===(l=null==b?void 0:b.phone)||void 0===l?void 0:l.ddi)||void 0===c?void 0:c.message)||(null===(d=null===(u=null==b?void 0:b.phone)||void 0===u?void 0:u.areaCode)||void 0===d?void 0:d.message)||(null===(h=null===(p=null==b?void 0:b.phone)||void 0===p?void 0:p.number)||void 0===h?void 0:h.message)))};function Mt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function jt(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Rt(...e){return t=>{let n=!1;const r=e.map((e=>{const r=jt(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():jt(e[t],null)}}}}function Dt(...t){return e.useCallback(Rt(...t),t)}var Nt=a(848);function kt(t,n=[]){let r=[];const o=()=>{const n=r.map((t=>e.createContext(t)));return function(r){const o=r?.[t]||n;return e.useMemo((()=>({[`__scope${t}`]:{...r,[t]:o}})),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[t]?.[a]||i,c=e.useMemo((()=>s),Object.values(s));return(0,Nt.jsx)(l.Provider,{value:c,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const l=s?.[t]?.[a]||i,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Lt(o,...n)]}function Lt(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=r.reduce(((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return r.scopeName=n.scopeName,r}var Vt=a(514),Ft=e.forwardRef(((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(_t);if(a){const t=a.props.children,r=i.map((n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n));return(0,Nt.jsx)(It,{...o,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,r):null})}return(0,Nt.jsx)(It,{...o,ref:n,children:r})}));Ft.displayName="Slot";var It=e.forwardRef(((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(r),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?Rt(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null}));It.displayName="SlotClone";var Bt=({children:e})=>(0,Nt.jsx)(Nt.Fragment,{children:e});function _t(t){return e.isValidElement(t)&&t.type===Bt}var Zt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,n)=>{const r=e.forwardRef(((e,t)=>{const{asChild:r,...o}=e,i=r?Ft:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,Nt.jsx)(i,{...o,ref:t})}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});function Wt(t){const n=e.useRef(t);return e.useEffect((()=>{n.current=t})),e.useMemo((()=>(...e)=>n.current?.(...e)),[])}var zt,Ut="dismissableLayer.update",Ht=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kt=e.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=t,u=e.useContext(Ht),[d,p]=e.useState(null),h=d?.ownerDocument??globalThis?.document,[,f]=e.useState({}),m=Dt(n,(e=>p(e))),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),x=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,w=x>=y,E=function(t,n=globalThis?.document){const r=Wt(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){Yt("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}else n.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}}),[n,r]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));w&&!n&&(i?.(e),s?.(e),e.defaultPrevented||l?.())}),h),P=function(t,n=globalThis?.document){const r=Wt(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{e.target&&!o.current&&Yt("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(a?.(e),s?.(e),e.defaultPrevented||l?.())}),h);return function(t,n=globalThis?.document){const r=Wt(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})}),[r,n])}((e=>{x===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),h),e.useEffect((()=>{if(d)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(zt=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),$t(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=zt)}}),[d,h,r,u]),e.useEffect((()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),$t())}),[d,u]),e.useEffect((()=>{const e=()=>f({});return document.addEventListener(Ut,e),()=>document.removeEventListener(Ut,e)}),[]),(0,Nt.jsx)(Zt.div,{...c,ref:m,style:{pointerEvents:b?w?"auto":"none":void 0,...t.style},onFocusCapture:Mt(t.onFocusCapture,P.onFocusCapture),onBlurCapture:Mt(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Mt(t.onPointerDownCapture,E.onPointerDownCapture)})}));function $t(){const e=new CustomEvent(Ut);document.dispatchEvent(e)}function Yt(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&Vt.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}Kt.displayName="DismissableLayer",e.forwardRef(((t,n)=>{const r=e.useContext(Ht),o=e.useRef(null),i=Dt(n,o);return e.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),(0,Nt.jsx)(Zt.div,{...t,ref:i})})).displayName="DismissableLayerBranch";var Xt=0;function qt(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Gt()),document.body.insertAdjacentElement("beforeend",e[1]??Gt()),Xt++,()=>{1===Xt&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Xt--}}),[])}function Gt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Jt="focusScope.autoFocusOnMount",Qt="focusScope.autoFocusOnUnmount",en={bubbles:!1,cancelable:!0},tn=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[l,c]=e.useState(null),u=Wt(i),d=Wt(a),p=e.useRef(null),h=Dt(n,(e=>c(e))),f=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(f.paused||!l)return;const t=e.target;l.contains(t)?p.current=t:an(p.current,{select:!0})},t=function(e){if(f.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||an(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&an(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,l,f.paused]),e.useEffect((()=>{if(l){sn.add(f);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(Jt,en);l.addEventListener(Jt,u),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(an(r,{select:t}),document.activeElement!==n)return}(nn(l).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&an(l))}return()=>{l.removeEventListener(Jt,u),setTimeout((()=>{const t=new CustomEvent(Qt,en);l.addEventListener(Qt,d),l.dispatchEvent(t),t.defaultPrevented||an(e??document.body,{select:!0}),l.removeEventListener(Qt,d),sn.remove(f)}),0)}}}),[l,u,d,f]);const m=e.useCallback((e=>{if(!r&&!o)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=nn(e);return[rn(t,e),rn(t.reverse(),e)]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&an(i,{select:!0})):(e.preventDefault(),r&&an(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,f.paused]);return(0,Nt.jsx)(Zt.div,{tabIndex:-1,...s,ref:h,onKeyDown:m})}));function nn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rn(e,t){for(const n of e)if(!on(n,{upTo:t}))return n}function on(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function an(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}tn.displayName="FocusScope";var sn=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ln(e,t),e.unshift(t)},remove(t){e=ln(e,t),e[0]?.resume()}}}();function ln(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var cn=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{},un=t["useId".toString()]||(()=>{}),dn=0;function pn(t){const[n,r]=e.useState(un());return cn((()=>{t||r((e=>e??String(dn++)))}),[t]),t||(n?`radix-${n}`:"")}const hn=["top","right","bottom","left"],fn=Math.min,mn=Math.max,gn=Math.round,vn=Math.floor,yn=e=>({x:e,y:e}),xn={left:"right",right:"left",bottom:"top",top:"bottom"},bn={start:"end",end:"start"};function wn(e,t,n){return mn(e,fn(t,n))}function En(e,t){return"function"==typeof e?e(t):e}function Pn(e){return e.split("-")[0]}function Sn(e){return e.split("-")[1]}function Cn(e){return"x"===e?"y":"x"}function An(e){return"y"===e?"height":"width"}function Tn(e){return["top","bottom"].includes(Pn(e))?"y":"x"}function On(e){return Cn(Tn(e))}function Mn(e){return e.replace(/start|end/g,(e=>bn[e]))}function jn(e){return e.replace(/left|right|bottom|top/g,(e=>xn[e]))}function Rn(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Dn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Nn(e,t,n){let{reference:r,floating:o}=e;const i=Tn(t),a=On(t),s=An(a),l=Pn(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Sn(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function kn(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=En(t,e),f=Rn(h),m=s[p?"floating"===d?"reference":"floating":d],g=Dn(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),x=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=Dn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-b.top+f.top)/x.y,bottom:(b.bottom-g.bottom+f.bottom)/x.y,left:(g.left-b.left+f.left)/x.x,right:(b.right-g.right+f.right)/x.x}}function Ln(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vn(e){return hn.some((t=>e[t]>=0))}function Fn(){return"undefined"!=typeof window}function In(e){return Zn(e)?(e.nodeName||"").toLowerCase():"#document"}function Bn(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _n(e){var t;return null==(t=(Zn(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Zn(e){return!!Fn()&&(e instanceof Node||e instanceof Bn(e).Node)}function Wn(e){return!!Fn()&&(e instanceof Element||e instanceof Bn(e).Element)}function zn(e){return!!Fn()&&(e instanceof HTMLElement||e instanceof Bn(e).HTMLElement)}function Un(e){return!(!Fn()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Bn(e).ShadowRoot)}function Hn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Gn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Kn(e){return["table","td","th"].includes(In(e))}function $n(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Yn(e){const t=Xn(),n=Wn(e)?Gn(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Xn(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function qn(e){return["html","body","#document"].includes(In(e))}function Gn(e){return Bn(e).getComputedStyle(e)}function Jn(e){return Wn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qn(e){if("html"===In(e))return e;const t=e.assignedSlot||e.parentNode||Un(e)&&e.host||_n(e);return Un(t)?t.host:t}function er(e){const t=Qn(e);return qn(t)?e.ownerDocument?e.ownerDocument.body:e.body:zn(t)&&Hn(t)?t:er(t)}function tr(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=er(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Bn(o);if(i){const e=nr(a);return t.concat(a,a.visualViewport||[],Hn(o)?o:[],e&&n?tr(e):[])}return t.concat(o,tr(o,[],n))}function nr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rr(e){const t=Gn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=zn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=gn(n)!==i||gn(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function or(e){return Wn(e)?e:e.contextElement}function ir(e){const t=or(e);if(!zn(t))return yn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=rr(t);let a=(i?gn(n.width):n.width)/r,s=(i?gn(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const ar=yn(0);function sr(e){const t=Bn(e);return Xn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ar}function lr(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=or(e);let a=yn(1);t&&(r?Wn(r)&&(a=ir(r)):a=ir(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Bn(e))&&t}(i,n,r)?sr(i):yn(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=Bn(i),t=r&&Wn(r)?Bn(r):r;let n=e,o=nr(n);for(;o&&r&&t!==n;){const e=ir(o),t=o.getBoundingClientRect(),r=Gn(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=Bn(o),o=nr(n)}}return Dn({width:u,height:d,x:l,y:c})}function cr(e,t){const n=Jn(e).scrollLeft;return t?t.left+n:lr(_n(e)).left+n}function ur(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:cr(e,r)),y:r.top+t.scrollTop}}function dr(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Bn(e),r=_n(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Xn();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=_n(e),n=Jn(e),r=e.ownerDocument.body,o=mn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=mn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+cr(e);const s=-n.scrollTop;return"rtl"===Gn(r).direction&&(a+=mn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(_n(e));else if(Wn(t))r=function(e,t){const n=lr(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=zn(e)?ir(e):yn(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=sr(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Dn(r)}function pr(e,t){const n=Qn(e);return!(n===t||!Wn(n)||qn(n))&&("fixed"===Gn(n).position||pr(n,t))}function hr(e,t,n){const r=zn(t),o=_n(t),i="fixed"===n,a=lr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=yn(0);if(r||!r&&!i)if(("body"!==In(t)||Hn(o))&&(s=Jn(t)),r){const e=lr(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=cr(o));const c=!o||r||i?yn(0):ur(o,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function fr(e){return"static"===Gn(e).position}function mr(e,t){if(!zn(e)||"fixed"===Gn(e).position)return null;if(t)return t(e);let n=e.offsetParent;return _n(e)===n&&(n=n.ownerDocument.body),n}function gr(e,t){const n=Bn(e);if($n(e))return n;if(!zn(e)){let t=Qn(e);for(;t&&!qn(t);){if(Wn(t)&&!fr(t))return t;t=Qn(t)}return n}let r=mr(e,t);for(;r&&Kn(r)&&fr(r);)r=mr(r,t);return r&&qn(r)&&fr(r)&&!Yn(r)?n:r||function(e){let t=Qn(e);for(;zn(t)&&!qn(t);){if(Yn(t))return t;if($n(t))return null;t=Qn(t)}return null}(e)||n}const vr={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=_n(r),s=!!t&&$n(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=yn(1);const u=yn(0),d=zn(r);if((d||!d&&!i)&&(("body"!==In(r)||Hn(a))&&(l=Jn(r)),zn(r))){const e=lr(r);c=ir(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?yn(0):ur(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:_n,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?$n(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=tr(e,[],!1).filter((e=>Wn(e)&&"body"!==In(e))),o=null;const i="fixed"===Gn(e).position;let a=i?Qn(e):e;for(;Wn(a)&&!qn(a);){const t=Gn(a),n=Yn(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Hn(a)&&!n&&pr(e,a))?r=r.filter((e=>e!==a)):o=t,a=Qn(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=dr(t,n,o);return e.top=mn(r.top,e.top),e.right=fn(r.right,e.right),e.bottom=fn(r.bottom,e.bottom),e.left=mn(r.left,e.left),e}),dr(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:gr,getElementRects:async function(e){const t=this.getOffsetParent||gr,n=this.getDimensions,r=await n(e.floating);return{reference:hr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=rr(e);return{width:t,height:n}},getScale:ir,isElement:Wn,isRTL:function(e){return"rtl"===Gn(e).direction}};function yr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}const xr=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Pn(n),s=Sn(n),l="y"===Tn(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=En(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},br=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=En(e,t),c={x:n,y:r},u=await kn(t,l),d=Tn(Pn(o)),p=Cn(d);let h=c[p],f=c[d];if(i){const e="y"===p?"bottom":"right";h=wn(h+u["y"===p?"top":"left"],h,h-u[e])}if(a){const e="y"===d?"bottom":"right";f=wn(f+u["y"===d?"top":"left"],f,f-u[e])}const m=s.fn({...t,[p]:h,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[d]:a}}}}}},wr=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=En(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=Pn(o),y=Tn(s),x=Pn(s)===s,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(x||!m?[jn(s)]:function(e){const t=jn(e);return[Mn(e),t,Mn(t)]}(s)),E="none"!==f;!p&&E&&w.push(...function(e,t,n,r){const o=Sn(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(Pn(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Mn)))),i}(s,m,f,b));const P=[s,...w],S=await kn(t,g),C=[];let A=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&C.push(S[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Sn(e),o=On(e),i=An(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=jn(a)),[a,jn(a)]}(o,a,b);C.push(S[e[0]],S[e[1]])}if(A=[...A,{placement:o,overflows:C}],!C.every((e=>e<=0))){var T,O;const e=((null==(T=i.flip)?void 0:T.index)||0)+1,t=P[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(O=A.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:O.placement;if(!n)switch(h){case"bestFit":{var M;const e=null==(M=A.filter((e=>{if(E){const t=Tn(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:M[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Er=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=En(e,t),u=await kn(t,c),d=Pn(o),p=Sn(o),h="y"===Tn(o),{width:f,height:m}=i.floating;let g,v;"top"===d||"bottom"===d?(g=d,v=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,g="end"===p?"top":"bottom");const y=m-u.top-u.bottom,x=f-u.left-u.right,b=fn(m-u[g],y),w=fn(f-u[v],x),E=!t.middlewareData.shift;let P=b,S=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=x),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(P=y),E&&!p){const e=mn(u.left,0),t=mn(u.right,0),n=mn(u.top,0),r=mn(u.bottom,0);h?S=f-2*(0!==e||0!==t?e+t:mn(u.left,u.right)):P=m-2*(0!==n||0!==r?n+r:mn(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:P});const C=await a.getDimensions(s.floating);return f!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}},Pr=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=En(e,t);switch(r){case"referenceHidden":{const e=Ln(await kn(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Vn(e)}}}case"escaped":{const e=Ln(await kn(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Vn(e)}}}default:return{}}}}},Sr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=En(e,t)||{};if(null==c)return{};const d=Rn(u),p={x:n,y:r},h=On(o),f=An(h),m=await a.getDimensions(c),g="y"===h,v=g?"top":"left",y=g?"bottom":"right",x=g?"clientHeight":"clientWidth",b=i.reference[f]+i.reference[h]-p[h]-i.floating[f],w=p[h]-i.reference[h],E=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let P=E?E[x]:0;P&&await(null==a.isElement?void 0:a.isElement(E))||(P=s.floating[x]||i.floating[f]);const S=b/2-w/2,C=P/2-m[f]/2-1,A=fn(d[v],C),T=fn(d[y],C),O=A,M=P-m[f]-T,j=P/2-m[f]/2+S,R=wn(O,j,M),D=!l.arrow&&null!=Sn(o)&&j!==R&&i.reference[f]/2-(j<O?A:T)-m[f]/2<0,N=D?j<O?j-O:j-M:0;return{[h]:p[h]+N,data:{[h]:R,centerOffset:j-R-N,...D&&{alignmentOffset:N}},reset:D}}}),Cr=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=En(e,t),u={x:n,y:r},d=Tn(o),p=Cn(d);let h=u[p],f=u[d];const m=En(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+g.mainAxis,n=i.reference[p]+i.reference[e]-g.mainAxis;h<t?h=t:h>n&&(h=n)}if(c){var v,y;const e="y"===p?"width":"height",t=["top","left"].includes(Pn(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?g.crossAxis:0);f<n?f=n:f>r&&(f=r)}return{[p]:h,[d]:f}}}},Ar=(e,t,n)=>{const r=new Map,o={platform:vr,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Nn(c,r,l),p=r,h={},f=0;for(let n=0;n<s.length;n++){const{name:i,fn:m}=s[n],{x:g,y:v,data:y,reset:x}=await m({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,h={...h,[i]:{...h[i],...y}},x&&f<=50&&(f++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(c=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:u,y:d}=Nn(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var Tr="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Or(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Or(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Or(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Mr(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jr(e,t){const n=Mr(e);return Math.round(t*n)/n}function Rr(t){const n=e.useRef(t);return Tr((()=>{n.current=t})),n}const Dr=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Sr({element:n.current,padding:r}).fn(t):{}:n?Sr({element:n,padding:r}).fn(t):{};var o}}),Nr=(e,t)=>({...xr(e),options:[e,t]}),kr=(e,t)=>({...br(e),options:[e,t]}),Lr=(e,t)=>({...Cr(e),options:[e,t]}),Vr=(e,t)=>({...wr(e),options:[e,t]}),Fr=(e,t)=>({...Er(e),options:[e,t]}),Ir=(e,t)=>({...Pr(e),options:[e,t]}),Br=(e,t)=>({...Dr(e),options:[e,t]});var _r=e.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return(0,Nt.jsx)(Zt.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,Nt.jsx)("polygon",{points:"0,0 30,0 15,10"})})}));_r.displayName="Arrow";var Zr=_r,Wr="Popper",[zr,Ur]=kt(Wr),[Hr,Kr]=zr(Wr),$r=t=>{const{__scopePopper:n,children:r}=t,[o,i]=e.useState(null);return(0,Nt.jsx)(Hr,{scope:n,anchor:o,onAnchorChange:i,children:r})};$r.displayName=Wr;var Yr="PopperAnchor",Xr=e.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:o,...i}=t,a=Kr(Yr,r),s=e.useRef(null),l=Dt(n,s);return e.useEffect((()=>{a.onAnchorChange(o?.current||s.current)})),o?null:(0,Nt.jsx)(Zt.div,{...i,ref:l})}));Xr.displayName=Yr;var qr="PopperContent",[Gr,Jr]=zr(qr),Qr=e.forwardRef(((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:f="optimized",onPlaced:m,...g}=t,v=Kr(qr,r),[y,x]=e.useState(null),b=Dt(n,(e=>x(e))),[w,E]=e.useState(null),P=function(t){const[n,r]=e.useState(void 0);return cn((()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;r({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)}),[t]),n}(w),S=P?.width??0,C=P?.height??0,A=o+("center"!==a?"-"+a:""),T="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(u)?u:[u],M=O.length>0,j={padding:T,boundary:O.filter(ro),altBoundary:M},{refs:R,floatingStyles:D,placement:N,isPositioned:k,middlewareData:L}=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,p]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[h,f]=e.useState(o);Or(h,o)||f(o);const[m,g]=e.useState(null),[v,y]=e.useState(null),x=e.useCallback((e=>{e!==P.current&&(P.current=e,g(e))}),[]),b=e.useCallback((e=>{e!==S.current&&(S.current=e,y(e))}),[]),w=a||m,E=s||v,P=e.useRef(null),S=e.useRef(null),C=e.useRef(d),A=null!=c,T=Rr(c),O=Rr(i),M=Rr(u),j=e.useCallback((()=>{if(!P.current||!S.current)return;const e={placement:n,strategy:r,middleware:h};O.current&&(e.platform=O.current),Ar(P.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==M.current};R.current&&!Or(C.current,t)&&(C.current=t,Vt.flushSync((()=>{p(t)})))}))}),[h,n,r,O,M]);Tr((()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[u]);const R=e.useRef(!1);Tr((()=>(R.current=!0,()=>{R.current=!1})),[]),Tr((()=>{if(w&&(P.current=w),E&&(S.current=E),w&&E){if(T.current)return T.current(w,E,j);j()}}),[w,E,j,T,A]);const D=e.useMemo((()=>({reference:P,floating:S,setReference:x,setFloating:b})),[x,b]),N=e.useMemo((()=>({reference:w,floating:E})),[w,E]),k=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!N.floating)return e;const t=jr(N.floating,d.x),n=jr(N.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Mr(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,l,N.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:j,refs:D,elements:N,floatingStyles:k})),[d,j,D,N,k])}({strategy:"fixed",placement:A,whileElementsMounted:(...e)=>function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=or(e),u=o||i?[...c?tr(c):[],...tr(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=_n(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(s||t(),!p||!h)return;const f={rootMargin:-vn(d)+"px "+-vn(o.clientWidth-(u+p))+"px "+-vn(o.clientHeight-(d+h))+"px "+-vn(u)+"px",threshold:mn(0,fn(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||yr(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let m=l?lr(e):null;return l&&function t(){const r=lr(e);m&&!yr(m,r)&&n(),m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}(...e,{animationFrame:"always"===f}),elements:{reference:v.anchor},middleware:[Nr({mainAxis:i+C,alignmentAxis:s}),c&&kr({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?Lr():void 0,...j}),c&&Vr({...j}),Fr({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),w&&Br({element:w,padding:l}),oo({arrowWidth:S,arrowHeight:C}),h&&Ir({strategy:"referenceHidden",...j})]}),[V,F]=io(N),I=Wt(m);cn((()=>{k&&I?.()}),[k,I]);const B=L.arrow?.x,_=L.arrow?.y,Z=0!==L.arrow?.centerOffset,[W,z]=e.useState();return cn((()=>{y&&z(window.getComputedStyle(y).zIndex)}),[y]),(0,Nt.jsx)("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:k?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,Nt.jsx)(Gr,{scope:r,placedSide:V,onArrowChange:E,arrowX:B,arrowY:_,shouldHideArrow:Z,children:(0,Nt.jsx)(Zt.div,{"data-side":V,"data-align":F,...g,ref:b,style:{...g.style,animation:k?void 0:"none"}})})})}));Qr.displayName=qr;var eo="PopperArrow",to={top:"bottom",right:"left",bottom:"top",left:"right"},no=e.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=Jr(eo,n),i=to[o.placedSide];return(0,Nt.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,Nt.jsx)(Zr,{...r,ref:t,style:{...r.style,display:"block"}})})}));function ro(e){return null!==e}no.displayName=eo;var oo=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=io(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+s/2;let h="",f="";return"bottom"===l?(h=i?u:`${d}px`,f=-s+"px"):"top"===l?(h=i?u:`${d}px`,f=`${r.floating.height+s}px`):"right"===l?(h=-s+"px",f=i?u:`${p}px`):"left"===l&&(h=`${r.floating.width+s}px`,f=i?u:`${p}px`),{data:{x:h,y:f}}}});function io(e){const[t,n="center"]=e.split("-");return[t,n]}var ao=$r,so=Xr,lo=Qr,co=no,uo=e.forwardRef(((t,n)=>{const{container:r,...o}=t,[i,a]=e.useState(!1);cn((()=>a(!0)),[]);const s=r||i&&globalThis?.document?.body;return s?Vt.createPortal((0,Nt.jsx)(Zt.div,{...o,ref:n}),s):null}));uo.displayName="Portal";var po=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer(((e,t)=>n[e][t]??e),t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=ho(o.current);a.current="mounted"===l?e:"none"}),[l]),cn((()=>{const e=o.current,n=i.current;if(n!==t){const r=a.current,o=ho(e);c(t?"MOUNT":"none"===o||"none"===e?.display?"UNMOUNT":n&&r!==o?"ANIMATION_OUT":"UNMOUNT"),i.current=t}}),[t,c]),cn((()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const a=ho(o.current).includes(r.animationName);if(r.target===n&&a&&(c("ANIMATION_END"),!i.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)}))}},s=e=>{e.target===n&&(a.current=ho(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")}),[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(n),i="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),a=Dt(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(i));return"function"==typeof r||o.isPresent?e.cloneElement(i,{ref:a}):null};function ho(e){return e?.animationName||"none"}function fo({prop:t,defaultProp:n,onChange:r=()=>{}}){const[o,i]=function({defaultProp:t,onChange:n}){const r=e.useState(t),[o]=r,i=e.useRef(o),a=Wt(n);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==t,s=a?t:o,l=Wt(r);return[s,e.useCallback((e=>{if(a){const n="function"==typeof e?e(t):e;n!==t&&l(n)}else i(e)}),[a,t,i,l])]}po.displayName="Presence";var mo=new WeakMap,go=new WeakMap,vo={},yo=0,xo=function(e){return e&&(e.host||xo(e.parentNode))},bo=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=xo(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);vo[n]||(vo[n]=new WeakMap);var i=vo[n],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(mo.get(e)||0)+1,c=(i.get(e)||0)+1;mo.set(e,l),i.set(e,c),a.push(e),1===l&&o&&go.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),s.clear(),yo++,function(){a.forEach((function(e){var t=mo.get(e)-1,o=i.get(e)-1;mo.set(e,t),i.set(e,o),t||(go.has(e)||e.removeAttribute(r),go.delete(e)),o||e.removeAttribute(n)})),--yo||(mo=new WeakMap,mo=new WeakMap,go=new WeakMap,vo={})}}(r,o,n,"aria-hidden")):function(){return null}},wo=function(){return wo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},wo.apply(this,arguments)};function Eo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var Po="right-scroll-bar-position",So="width-before-scroll-bar";function Co(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Ao="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,To=new WeakMap;function Oo(e){return e}var Mo=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Oo);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}};return o}(null);return t.options=wo({async:!0,ssr:!1},e),t}(),jo=function(){},Ro=e.forwardRef((function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:jo,onWheelCapture:jo,onTouchMoveCapture:jo}),i=o[0],a=o[1],s=t.forwardProps,l=t.children,c=t.className,u=t.removeScrollBar,d=t.enabled,p=t.shards,h=t.sideCar,f=t.noIsolation,m=t.inert,g=t.allowPinchZoom,v=t.as,y=void 0===v?"div":v,x=t.gapMode,b=Eo(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,E=function(t,n){var r,o,i,a=(r=n||null,o=function(e){return t.forEach((function(t){return Co(t,e)}))},(i=(0,e.useState)((function(){return{value:r,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade);return Ao((function(){var e=To.get(a);if(e){var n=new Set(e),r=new Set(t),o=a.current;n.forEach((function(e){r.has(e)||Co(e,null)})),r.forEach((function(e){n.has(e)||Co(e,o)}))}To.set(a,t)}),[t]),a}([r,n]),P=wo(wo({},b),i);return e.createElement(e.Fragment,null,d&&e.createElement(w,{sideCar:Mo,removeScrollBar:u,shards:p,noIsolation:f,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:x}),s?e.cloneElement(e.Children.only(l),wo(wo({},P),{ref:E})):e.createElement(y,wo({},P,{className:c,ref:E}),l))}));Ro.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ro.classNames={fullWidth:So,zeroRight:Po};var Do=function(t){var n=t.sideCar,r=Eo(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,wo({},r))};Do.isSideCarExport=!0;var No=function(){var e=0,t=null;return{add:function(n){0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=a.nc;return t&&e.setAttribute("nonce",t),e}())&&(function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ko=function(){var t,n=(t=No(),function(n,r){e.useEffect((function(){return t.add(n),function(){t.remove()}}),[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},Lo={left:0,top:0,right:0,gap:0},Vo=function(e){return parseInt(e||"",10)||0},Fo=ko(),Io="data-scroll-locked",Bo=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Io,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Po," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(So," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Po," .").concat(Po," {\n right: 0 ").concat(r,";\n }\n \n .").concat(So," .").concat(So," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Io,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},_o=function(){var e=parseInt(document.body.getAttribute(Io)||"0",10);return isFinite(e)?e:0},Zo=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(Io,(_o()+1).toString()),function(){var e=_o()-1;e<=0?document.body.removeAttribute(Io):document.body.setAttribute(Io,e.toString())}}),[]);var a=e.useMemo((function(){return function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Lo;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Vo(n),Vo(r),Vo(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}}(i)}),[i]);return e.createElement(Fo,{styles:Bo(a,!n,i,r?"":"!important")})},Wo=!1;if("undefined"!=typeof window)try{var zo=Object.defineProperty({},"passive",{get:function(){return Wo=!0,!0}});window.addEventListener("test",zo,zo),window.removeEventListener("test",zo,zo)}catch(e){Wo=!1}var Uo=!!Wo&&{passive:!1},Ho=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Ko=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),$o(e,r)){var o=Yo(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$o=function(e,t){return"v"===e?function(e){return Ho(e,"overflowY")}(t):function(e){return Ho(e,"overflowX")}(t)},Yo=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Xo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qo=function(e){return[e.deltaX,e.deltaY]},Go=function(e){return e&&"current"in e?e.current:e},Jo=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Qo=0,ei=[];function ti(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ni=(ri=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),i=e.useState(Qo++)[0],a=e.useState(ko)[0],s=e.useRef(t);e.useEffect((function(){s.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([t.lockRef.current],(t.shards||[]).map(Go),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var l=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,i=Xo(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=Ko(d,u);if(!p)return!0;if(p?n=d:(n="v"===d?"h":"v",p=Ko(d,u)),!p)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var h=o.current||n;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,s=t.contains(a),l=!1,c=i>0,u=0,d=0;do{var p=Yo(e,a),h=p[0],f=p[1]-p[2]-o*h;(h||f)&&$o(e,a)&&(u+=f,d+=h),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!s&&a!==document.body||s&&(t.contains(a)||t===a));return(c&&(Math.abs(u)<1||!1)||!c&&(Math.abs(d)<1||!1))&&(l=!0),l}(h,t,e,"h"===h?l:c)}),[]),c=e.useCallback((function(e){var t=e;if(ei.length&&ei[ei.length-1]===a){var r="deltaY"in t?qo(t):Xo(t),o=n.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(s.current.shards||[]).map(Go).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?l(t,i[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,r,o){var i={name:e,delta:t,target:r,should:o,shadowParent:ti(r)};n.current.push(i),setTimeout((function(){n.current=n.current.filter((function(e){return e!==i}))}),1)}),[]),d=e.useCallback((function(e){r.current=Xo(e),o.current=void 0}),[]),p=e.useCallback((function(e){u(e.type,qo(e),e.target,l(e,t.lockRef.current))}),[]),h=e.useCallback((function(e){u(e.type,Xo(e),e.target,l(e,t.lockRef.current))}),[]);e.useEffect((function(){return ei.push(a),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Uo),document.addEventListener("touchmove",c,Uo),document.addEventListener("touchstart",d,Uo),function(){ei=ei.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,Uo),document.removeEventListener("touchmove",c,Uo),document.removeEventListener("touchstart",d,Uo)}}),[]);var f=t.removeScrollBar,m=t.inert;return e.createElement(e.Fragment,null,m?e.createElement(a,{styles:Jo(i)}):null,f?e.createElement(Zo,{gapMode:t.gapMode}):null)},Mo.useMedium(ri),Do);var ri,oi=e.forwardRef((function(t,n){return e.createElement(Ro,wo({},t,{ref:n,sideCar:ni}))}));oi.classNames=Ro.classNames;const ii=oi;var ai="Popover",[si,li]=kt(ai,[Ur]),ci=Ur(),[ui,di]=si(ai),pi=t=>{const{__scopePopover:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!1}=t,l=ci(n),c=e.useRef(null),[u,d]=e.useState(!1),[p=!1,h]=fo({prop:o,defaultProp:i,onChange:a});return(0,Nt.jsx)(ao,{...l,children:(0,Nt.jsx)(ui,{scope:n,contentId:pn(),triggerRef:c,open:p,onOpenChange:h,onOpenToggle:e.useCallback((()=>h((e=>!e))),[h]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback((()=>d(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>d(!1)),[]),modal:s,children:r})})};pi.displayName=ai;var hi="PopoverAnchor";e.forwardRef(((t,n)=>{const{__scopePopover:r,...o}=t,i=di(hi,r),a=ci(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return e.useEffect((()=>(s(),()=>l())),[s,l]),(0,Nt.jsx)(so,{...a,...o,ref:n})})).displayName=hi;var fi="PopoverTrigger",mi=e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=di(fi,n),i=ci(n),a=Dt(t,o.triggerRef),s=(0,Nt.jsx)(Zt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ai(o.open),...r,ref:a,onClick:Mt(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:(0,Nt.jsx)(so,{asChild:!0,...i,children:s})}));mi.displayName=fi;var gi="PopoverPortal",[vi,yi]=si(gi,{forceMount:void 0}),xi=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=di(gi,t);return(0,Nt.jsx)(vi,{scope:t,forceMount:n,children:(0,Nt.jsx)(po,{present:n||i.open,children:(0,Nt.jsx)(uo,{asChild:!0,container:o,children:r})})})};xi.displayName=gi;var bi="PopoverContent",wi=e.forwardRef(((e,t)=>{const n=yi(bi,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=di(bi,e.__scopePopover);return(0,Nt.jsx)(po,{present:r||i.open,children:i.modal?(0,Nt.jsx)(Ei,{...o,ref:t}):(0,Nt.jsx)(Pi,{...o,ref:t})})}));wi.displayName=bi;var Ei=e.forwardRef(((t,n)=>{const r=di(bi,t.__scopePopover),o=e.useRef(null),i=Dt(n,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return bo(e)}),[]),(0,Nt.jsx)(ii,{as:Ft,allowPinchZoom:!0,children:(0,Nt.jsx)(Si,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Mt(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()})),onPointerDownOutside:Mt(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:Mt(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),Pi=e.forwardRef(((t,n)=>{const r=di(bi,t.__scopePopover),o=e.useRef(!1),i=e.useRef(!1);return(0,Nt.jsx)(Si,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),Si=e.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,p=di(bi,n),h=ci(n);return qt(),(0,Nt.jsx)(tn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:(0,Nt.jsx)(Kt,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:(0,Nt.jsx)(lo,{"data-state":Ai(p.open),role:"dialog",id:p.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),Ci="PopoverClose";function Ai(e){return e?"open":"closed"}e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=di(Ci,n);return(0,Nt.jsx)(Zt.button,{type:"button",...r,ref:t,onClick:Mt(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=Ci,e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=ci(n);return(0,Nt.jsx)(co,{...o,...r,ref:t})})).displayName="PopoverArrow";var Ti=xi,Oi=wi,Mi=function(){return Mi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Mi.apply(this,arguments)},ji=pi,Ri=mi,Di=e.forwardRef((function(t,n){var r=t.className,o=t.align,i=void 0===o?"center":o,a=t.sideOffset,s=void 0===a?4:a,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["className","align","sideOffset"]);return e.createElement(Ti,null,e.createElement(Oi,Mi({ref:n,align:i,sideOffset:s,className:Se("z-50 w-72 rounded-default bg-white p-4 text-popover-foreground shadow-xl outline-hidden data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r)},l)))}));Di.displayName=Oi.displayName;var Ni=function(){return Ni=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ni.apply(this,arguments)},ki=(0,e.forwardRef)((function(e,t){var r=e.id,o=e.label,i=(e.onChange,e.size),a=void 0===i?"normal":i,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["id","label","onChange","size"]),l={small:"w-3 h-3 text-xs",normal:"w-4 h-4 text-base",large:"w-6 h-6 text-lg"},c=l[a];return n().createElement("div",{className:"flex items-center gap-4 ".concat(l[a])},n().createElement("input",Ni({},s,{id:r,ref:t,type:"radio",className:"".concat(c," border-green-500")})),n().createElement("label",{htmlFor:r,className:"cursor-pointer"},o))}));ki.displayName="Radio";const Li=ki;function Vi(e,t){return Vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vi(e,t)}function Fi(e){return e&&e.stopPropagation&&e.stopPropagation(),e&&e.preventDefault&&e.preventDefault(),!1}function Ii(e){return null==e?[]:Array.isArray(e)?e.slice():[e]}function Bi(e){return null!==e&&1===e.length?e[0]:e.slice()}function _i(e){Object.keys(e).forEach((t=>{"undefined"!=typeof document&&document.addEventListener(t,e[t],!1)}))}function Zi(e,t){return Wi(function(e,t){let n=e;return n<=t.min&&(n=t.min),n>=t.max&&(n=t.max),n}(e,t),t)}function Wi(e,t){const n=(e-t.min)%t.step;let r=e-n;return 2*Math.abs(n)>=t.step&&(r+=n>0?t.step:-t.step),parseFloat(r.toFixed(5))}let zi=function(t){function n(n){var r;(r=t.call(this,n)||this).onKeyUp=()=>{r.onEnd()},r.onMouseUp=()=>{r.onEnd(r.getMouseEventMap())},r.onTouchEnd=e=>{e.preventDefault(),r.onEnd(r.getTouchEventMap())},r.onBlur=()=>{r.setState({index:-1},r.onEnd(r.getKeyDownEventMap()))},r.onMouseMove=e=>{r.setState({pending:!0});const t=r.getMousePosition(e),n=r.getDiffPosition(t[0]),o=r.getValueFromPosition(n);r.move(o)},r.onTouchMove=e=>{if(e.touches.length>1)return;r.setState({pending:!0});const t=r.getTouchPosition(e);if(void 0===r.isScrolling){const e=t[0]-r.startPosition[0],n=t[1]-r.startPosition[1];r.isScrolling=Math.abs(n)>Math.abs(e)}if(r.isScrolling)return void r.setState({index:-1});const n=r.getDiffPosition(t[0]),o=r.getValueFromPosition(n);r.move(o)},r.onKeyDown=e=>{if(!(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey))switch(r.setState({pending:!0}),e.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":e.preventDefault(),r.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":e.preventDefault(),r.moveUpByStep();break;case"Home":e.preventDefault(),r.move(r.props.min);break;case"End":e.preventDefault(),r.move(r.props.max);break;case"PageDown":e.preventDefault(),r.moveDownByStep(r.props.pageFn(r.props.step));break;case"PageUp":e.preventDefault(),r.moveUpByStep(r.props.pageFn(r.props.step))}},r.onSliderMouseDown=e=>{if(!r.props.disabled&&2!==e.button){if(r.setState({pending:!0}),!r.props.snapDragDisabled){const t=r.getMousePosition(e);r.forceValueFromPosition(t[0],(e=>{r.start(e,t[0]),_i(r.getMouseEventMap())}))}Fi(e)}},r.onSliderClick=e=>{if(!r.props.disabled&&r.props.onSliderClick&&!r.hasMoved){const t=r.getMousePosition(e),n=Zi(r.calcValue(r.calcOffsetFromPosition(t[0])),r.props);r.props.onSliderClick(n)}},r.createOnKeyDown=e=>t=>{r.props.disabled||(r.start(e),_i(r.getKeyDownEventMap()),Fi(t))},r.createOnMouseDown=e=>t=>{if(r.props.disabled||2===t.button)return;r.setState({pending:!0});const n=r.getMousePosition(t);r.start(e,n[0]),_i(r.getMouseEventMap()),Fi(t)},r.createOnTouchStart=e=>t=>{if(r.props.disabled||t.touches.length>1)return;r.setState({pending:!0});const n=r.getTouchPosition(t);r.startPosition=n,r.isScrolling=void 0,r.start(e,n[0]),_i(r.getTouchEventMap()),function(e){e.stopPropagation&&e.stopPropagation()}(t)},r.handleResize=()=>{const e=window.setTimeout((()=>{r.pendingResizeTimeouts.shift(),r.resize()}),0);r.pendingResizeTimeouts.push(e)},r.renderThumb=(e,t)=>{const n=r.props.thumbClassName+" "+r.props.thumbClassName+"-"+t+" "+(r.state.index===t?r.props.thumbActiveClassName:""),o={ref:e=>{r["thumb"+t]=e},key:r.props.thumbClassName+"-"+t,className:n,style:e,onMouseDown:r.createOnMouseDown(t),onTouchStart:r.createOnTouchStart(t),onFocus:r.createOnKeyDown(t),tabIndex:0,role:"slider","aria-orientation":r.props.orientation,"aria-valuenow":r.state.value[t],"aria-valuemin":r.props.min,"aria-valuemax":r.props.max,"aria-label":Array.isArray(r.props.ariaLabel)?r.props.ariaLabel[t]:r.props.ariaLabel,"aria-labelledby":Array.isArray(r.props.ariaLabelledby)?r.props.ariaLabelledby[t]:r.props.ariaLabelledby,"aria-disabled":r.props.disabled},i={index:t,value:Bi(r.state.value),valueNow:r.state.value[t]};return r.props.ariaValuetext&&(o["aria-valuetext"]="string"==typeof r.props.ariaValuetext?r.props.ariaValuetext:r.props.ariaValuetext(i)),r.props.renderThumb(o,i)},r.renderTrack=(e,t,n)=>{const o={key:r.props.trackClassName+"-"+e,className:r.props.trackClassName+" "+r.props.trackClassName+"-"+e,style:r.buildTrackStyle(t,r.state.upperBound-n)},i={index:e,value:Bi(r.state.value)};return r.props.renderTrack(o,i)};let o=Ii(n.value);o.length||(o=Ii(n.defaultValue)),r.pendingResizeTimeouts=[];const i=[];for(let e=0;e<o.length;e+=1)o[e]=Zi(o[e],n),i.push(e);return r.resizeObserver=null,r.resizeElementRef=e.createRef(),r.state={index:-1,upperBound:0,sliderLength:0,value:o,zIndices:i},r}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Vi(e,t)}(n,t);var r=n.prototype;return r.componentDidMount=function(){"undefined"!=typeof window&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.resizeElementRef.current),this.resize())},n.getDerivedStateFromProps=function(e,t){const n=Ii(e.value);return n.length?t.pending?null:{value:n.map((t=>Zi(t,e)))}:null},r.componentDidUpdate=function(){0===this.state.upperBound&&this.resize()},r.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},r.onEnd=function(e){e&&function(e){Object.keys(e).forEach((t=>{"undefined"!=typeof document&&document.removeEventListener(t,e[t],!1)}))}(e),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},r.getValue=function(){return Bi(this.state.value)},r.getClosestIndex=function(e){let t=Number.MAX_VALUE,n=-1;const{value:r}=this.state,o=r.length;for(let i=0;i<o;i+=1){const o=this.calcOffset(r[i]),a=Math.abs(e-o);a<t&&(t=a,n=i)}return n},r.getMousePosition=function(e){return[e["page"+this.axisKey()],e["page"+this.orthogonalAxisKey()]]},r.getTouchPosition=function(e){const t=e.touches[0];return[t["page"+this.axisKey()],t["page"+this.orthogonalAxisKey()]]},r.getKeyDownEventMap=function(){return{keydown:this.onKeyDown,keyup:this.onKeyUp,focusout:this.onBlur}},r.getMouseEventMap=function(){return{mousemove:this.onMouseMove,mouseup:this.onMouseUp}},r.getTouchEventMap=function(){return{touchmove:this.onTouchMove,touchend:this.onTouchEnd}},r.getValueFromPosition=function(e){const t=e/(this.state.sliderLength-this.state.thumbSize)*(this.props.max-this.props.min);return Zi(this.state.startValue+t,this.props)},r.getDiffPosition=function(e){let t=e-this.state.startPosition;return this.props.invert&&(t*=-1),t},r.resize=function(){const{slider:e,thumb0:t}=this;if(!e||!t)return;const n=this.sizeKey(),r=e.getBoundingClientRect(),o=e[n],i=r[this.posMaxKey()],a=r[this.posMinKey()],s=t.getBoundingClientRect()[n.replace("client","").toLowerCase()],l=o-s,c=Math.abs(i-a);this.state.upperBound===l&&this.state.sliderLength===c&&this.state.thumbSize===s||this.setState({upperBound:l,sliderLength:c,thumbSize:s})},r.calcOffset=function(e){const t=this.props.max-this.props.min;return 0===t?0:(e-this.props.min)/t*this.state.upperBound},r.calcValue=function(e){return e/this.state.upperBound*(this.props.max-this.props.min)+this.props.min},r.calcOffsetFromPosition=function(e){const{slider:t}=this,n=t.getBoundingClientRect(),r=n[this.posMaxKey()],o=n[this.posMinKey()];let i=e-(window["page"+this.axisKey()+"Offset"]+(this.props.invert?r:o));return this.props.invert&&(i=this.state.sliderLength-i),i-=this.state.thumbSize/2,i},r.forceValueFromPosition=function(e,t){const n=this.calcOffsetFromPosition(e),r=this.getClosestIndex(n),o=Zi(this.calcValue(n),this.props),i=this.state.value.slice();i[r]=o;for(let e=0;e<i.length-1;e+=1)if(i[e+1]-i[e]<this.props.minDistance)return;this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0,this.setState({value:i},(()=>{t(r),this.fireChangeEvent("onChange")}))},r.clearPendingResizeTimeouts=function(){do{const e=this.pendingResizeTimeouts.shift();clearTimeout(e)}while(this.pendingResizeTimeouts.length)},r.start=function(e,t){const n=this["thumb"+e];n&&n.focus();const{zIndices:r}=this.state;r.splice(r.indexOf(e),1),r.push(e),this.setState((n=>({startValue:n.value[e],startPosition:void 0!==t?t:n.startPosition,index:e,zIndices:r})))},r.moveUpByStep=function(e){void 0===e&&(e=this.props.step);const t=this.state.value[this.state.index],n=Zi(this.props.invert&&"horizontal"===this.props.orientation?t-e:t+e,this.props);this.move(Math.min(n,this.props.max))},r.moveDownByStep=function(e){void 0===e&&(e=this.props.step);const t=this.state.value[this.state.index],n=Zi(this.props.invert&&"horizontal"===this.props.orientation?t+e:t-e,this.props);this.move(Math.max(n,this.props.min))},r.move=function(e){const t=this.state.value.slice(),{index:n}=this.state,{length:r}=t,o=t[n];if(e===o)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:i,max:a,min:s,minDistance:l}=this.props;if(!i){if(n>0){const r=t[n-1];e<r+l&&(e=r+l)}if(n<r-1){const r=t[n+1];e>r-l&&(e=r-l)}}t[n]=e,i&&r>1&&(e>o?(this.pushSucceeding(t,l,n),function(e,t,n,r){for(let o=0;o<e;o+=1){const i=r-o*n;t[e-1-o]>i&&(t[e-1-o]=i)}}(r,t,l,a)):e<o&&(this.pushPreceding(t,l,n),function(e,t,n,r){for(let o=0;o<e;o+=1){const e=r+o*n;t[o]<e&&(t[o]=e)}}(r,t,l,s))),this.setState({value:t},this.fireChangeEvent.bind(this,"onChange"))},r.pushSucceeding=function(e,t,n){let r,o;for(r=n,o=e[r]+t;null!==e[r+1]&&o>e[r+1];r+=1,o=e[r]+t)e[r+1]=Wi(o,this.props)},r.pushPreceding=function(e,t,n){for(let r=n,o=e[r]-t;null!==e[r-1]&&o<e[r-1];r-=1,o=e[r]-t)e[r-1]=Wi(o,this.props)},r.axisKey=function(){return"vertical"===this.props.orientation?"Y":"X"},r.orthogonalAxisKey=function(){return"vertical"===this.props.orientation?"X":"Y"},r.posMinKey=function(){return"vertical"===this.props.orientation?this.props.invert?"bottom":"top":this.props.invert?"right":"left"},r.posMaxKey=function(){return"vertical"===this.props.orientation?this.props.invert?"top":"bottom":this.props.invert?"left":"right"},r.sizeKey=function(){return"vertical"===this.props.orientation?"clientHeight":"clientWidth"},r.fireChangeEvent=function(e){this.props[e]&&this.props[e](Bi(this.state.value),this.state.index)},r.buildThumbStyle=function(e,t){const n={position:"absolute",touchAction:"none",willChange:this.state.index>=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(t)+1};return n[this.posMinKey()]=e+"px",n},r.buildTrackStyle=function(e,t){const n={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return n[this.posMinKey()]=e,n[this.posMaxKey()]=t,n},r.buildMarkStyle=function(e){var t;return(t={position:"absolute"})[this.posMinKey()]=e,t},r.renderThumbs=function(e){const{length:t}=e,n=[];for(let r=0;r<t;r+=1)n[r]=this.buildThumbStyle(e[r],r);const r=[];for(let e=0;e<t;e+=1)r[e]=this.renderThumb(n[e],e);return r},r.renderTracks=function(e){const t=[],n=e.length-1;t.push(this.renderTrack(0,0,e[0]));for(let r=0;r<n;r+=1)t.push(this.renderTrack(r+1,e[r],e[r+1]));return t.push(this.renderTrack(n+1,e[n],this.state.upperBound)),t},r.renderMarks=function(){let{marks:e}=this.props;const t=this.props.max-this.props.min+1;return"boolean"==typeof e?e=Array.from({length:t}).map(((e,t)=>t)):"number"==typeof e&&(e=Array.from({length:t}).map(((e,t)=>t)).filter((t=>t%e==0))),e.map(parseFloat).sort(((e,t)=>e-t)).map((e=>{const t=this.calcOffset(e),n={key:e,className:this.props.markClassName,style:this.buildMarkStyle(t)};return this.props.renderMark(n)}))},r.render=function(){const t=[],{value:n}=this.state,r=n.length;for(let e=0;e<r;e+=1)t[e]=this.calcOffset(n[e],e);const o=this.props.withTracks?this.renderTracks(t):null,i=this.renderThumbs(t),a=this.props.marks?this.renderMarks():null;return e.createElement("div",{ref:e=>{this.slider=e,this.resizeElementRef.current=e},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},o,i,a)},n}(e.Component);zi.displayName="ReactSlider",zi.defaultProps={min:0,max:100,step:1,pageFn:e=>10*e,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:t=>e.createElement("div",t),renderTrack:t=>e.createElement("div",t),renderMark:t=>e.createElement("span",t)};var Ui=zi;const Hi=(0,e.memo)((function(t){var r=t.min,o=t.max,i=t.onChange,a=t.disabled,s=void 0!==a&&a,l=t.initialValues,c=(0,e.useState)(null!=l?l:[r||0,o||1e3]),u=c[0],d=c[1];return n().createElement("div",{className:"w-full flex flex-col gap-[5px]"},n().createElement("p",{className:"text-primary-900 text-sm select-none"},"".concat(u[0]," - ").concat(u[1])),n().createElement(Ui,{className:"slider",disabled:s,min:r||1,max:o||1e3,value:l,onChange:function(e){return d(e)},ariaLabel:["Lower thumb","Upper thumb"],onAfterChange:function(e){null==i||i(e)},minDistance:10,pearling:!0}))}),(function(e,t){return e.min===t.min&&e.max===t.max&&e.disabled===t.disabled&&e.initialValues===t.initialValues}));function Ki(e,[t,n]){return Math.min(n,Math.max(t,e))}var $i=e.createContext(void 0),Yi=e.forwardRef(((e,t)=>(0,Nt.jsx)(Zt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));Yi.displayName="VisuallyHidden";var Xi=Yi,qi=[" ","Enter","ArrowUp","ArrowDown"],Gi=[" ","Enter"],Ji="Select",[Qi,ea,ta]=function(t){const n=t+"CollectionProvider",[r,o]=kt(n),[i,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=t=>{const{scope:n,children:r}=t,o=e.useRef(null),a=e.useRef(new Map).current;return(0,Nt.jsx)(i,{scope:n,itemMap:a,collectionRef:o,children:r})};s.displayName=n;const l=t+"CollectionSlot",c=e.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Dt(t,a(l,n).collectionRef);return(0,Nt.jsx)(Ft,{ref:o,children:r})}));c.displayName=l;const u=t+"CollectionItemSlot",d="data-radix-collection-item",p=e.forwardRef(((t,n)=>{const{scope:r,children:o,...i}=t,s=e.useRef(null),l=Dt(n,s),c=a(u,r);return e.useEffect((()=>(c.itemMap.set(s,{ref:s,...i}),()=>{c.itemMap.delete(s)}))),(0,Nt.jsx)(Ft,{[d]:"",ref:l,children:o})}));return p.displayName=u,[{Provider:s,Slot:c,ItemSlot:p},function(n){const r=a(t+"CollectionConsumer",n),o=e.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`)),n=Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)));return n}),[r.collectionRef,r.itemMap]);return o},o]}(Ji),[na,ra]=kt(Ji,[ta,Ur]),oa=Ur(),[ia,aa]=na(Ji),[sa,la]=na(Ji),ca=t=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:i,onOpenChange:a,value:s,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:p,disabled:h,required:f,form:m}=t,g=oa(n),[v,y]=e.useState(null),[x,b]=e.useState(null),[w,E]=e.useState(!1),P=function(t){const n=e.useContext($i);return t||n||"ltr"}(u),[S=!1,C]=fo({prop:o,defaultProp:i,onChange:a}),[A,T]=fo({prop:s,defaultProp:l,onChange:c}),O=e.useRef(null),M=!v||m||!!v.closest("form"),[j,R]=e.useState(new Set),D=Array.from(j).map((e=>e.props.value)).join(";");return(0,Nt.jsx)(ao,{...g,children:(0,Nt.jsxs)(ia,{required:f,scope:n,trigger:v,onTriggerChange:y,valueNode:x,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:E,contentId:pn(),value:A,onValueChange:T,open:S,onOpenChange:C,dir:P,triggerPointerDownPosRef:O,disabled:h,children:[(0,Nt.jsx)(Qi.Provider,{scope:n,children:(0,Nt.jsx)(sa,{scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback((e=>{R((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:e.useCallback((e=>{R((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:r})}),M?(0,Nt.jsxs)(qa,{"aria-hidden":!0,required:f,tabIndex:-1,name:d,autoComplete:p,value:A,onChange:e=>T(e.target.value),disabled:h,form:m,children:[void 0===A?(0,Nt.jsx)("option",{value:""}):null,Array.from(j)]},D):null]})})};ca.displayName=Ji;var ua="SelectTrigger",da=e.forwardRef(((t,n)=>{const{__scopeSelect:r,disabled:o=!1,...i}=t,a=oa(r),s=aa(ua,r),l=s.disabled||o,c=Dt(n,s.onTriggerChange),u=ea(r),d=e.useRef("touch"),[p,h,f]=Ga((e=>{const t=u().filter((e=>!e.disabled)),n=t.find((e=>e.value===s.value)),r=Ja(t,e,n);void 0!==r&&s.onValueChange(r.value)})),m=e=>{l||(s.onOpenChange(!0),f()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,Nt.jsx)(so,{asChild:!0,...a,children:(0,Nt.jsx)(Zt.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Xa(s.value)?"":void 0,...i,ref:c,onClick:Mt(i.onClick,(e=>{e.currentTarget.focus(),"mouse"!==d.current&&m(e)})),onPointerDown:Mt(i.onPointerDown,(e=>{d.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(m(e),e.preventDefault())})),onKeyDown:Mt(i.onKeyDown,(e=>{const t=""!==p.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),t&&" "===e.key||qi.includes(e.key)&&(m(),e.preventDefault())}))})})}));da.displayName=ua;var pa="SelectValue",ha=e.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...s}=e,l=aa(pa,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==i,d=Dt(t,l.onValueNodeChange);return cn((()=>{c(u)}),[c,u]),(0,Nt.jsx)(Zt.span,{...s,ref:d,style:{pointerEvents:"none"},children:Xa(l.value)?(0,Nt.jsx)(Nt.Fragment,{children:a}):i})}));ha.displayName=pa;var fa=e.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return(0,Nt.jsx)(Zt.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})}));fa.displayName="SelectIcon";var ma=e=>(0,Nt.jsx)(uo,{asChild:!0,...e});ma.displayName="SelectPortal";var ga="SelectContent",va=e.forwardRef(((t,n)=>{const r=aa(ga,t.__scopeSelect),[o,i]=e.useState();if(cn((()=>{i(new DocumentFragment)}),[]),!r.open){const e=o;return e?Vt.createPortal((0,Nt.jsx)(xa,{scope:t.__scopeSelect,children:(0,Nt.jsx)(Qi.Slot,{scope:t.__scopeSelect,children:(0,Nt.jsx)("div",{children:t.children})})}),e):null}return(0,Nt.jsx)(wa,{...t,ref:n})}));va.displayName=ga;var ya=10,[xa,ba]=na(ga),wa=e.forwardRef(((t,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:h,collisionPadding:f,sticky:m,hideWhenDetached:g,avoidCollisions:v,...y}=t,x=aa(ga,r),[b,w]=e.useState(null),[E,P]=e.useState(null),S=Dt(n,(e=>w(e))),[C,A]=e.useState(null),[T,O]=e.useState(null),M=ea(r),[j,R]=e.useState(!1),D=e.useRef(!1);e.useEffect((()=>{if(b)return bo(b)}),[b]),qt();const N=e.useCallback((e=>{const[t,...n]=M().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&E&&(E.scrollTop=0),n===r&&E&&(E.scrollTop=E.scrollHeight),n?.focus(),document.activeElement!==o)return}}),[M,E]),k=e.useCallback((()=>N([C,b])),[N,C,b]);e.useEffect((()=>{j&&k()}),[j,k]);const{onOpenChange:L,triggerPointerDownPosRef:V}=x;e.useEffect((()=>{if(b){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(V.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(V.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),V.current=null};return null!==V.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[b,L,V]),e.useEffect((()=>{const e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[L]);const[F,I]=Ga((e=>{const t=M().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=Ja(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),B=e.useCallback(((e,t,n)=>{const r=!D.current&&!n;(void 0!==x.value&&x.value===t||r)&&(A(e),r&&(D.current=!0))}),[x.value]),_=e.useCallback((()=>b?.focus()),[b]),Z=e.useCallback(((e,t,n)=>{const r=!D.current&&!n;(void 0!==x.value&&x.value===t||r)&&O(e)}),[x.value]),W="popper"===o?Pa:Ea,z=W===Pa?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:h,collisionPadding:f,sticky:m,hideWhenDetached:g,avoidCollisions:v}:{};return(0,Nt.jsx)(xa,{scope:r,content:b,viewport:E,onViewportChange:P,itemRefCallback:B,selectedItem:C,onItemLeave:_,itemTextRefCallback:Z,focusSelectedItem:k,selectedItemText:T,position:o,isPositioned:j,searchRef:F,children:(0,Nt.jsx)(ii,{as:Ft,allowPinchZoom:!0,children:(0,Nt.jsx)(tn,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Mt(i,(e=>{x.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:(0,Nt.jsx)(Kt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:(0,Nt.jsx)(W,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:e=>e.preventDefault(),...y,...z,onPlaced:()=>R(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Mt(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||I(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=M().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>N(t))),e.preventDefault()}}))})})})})})}));wa.displayName="SelectContentImpl";var Ea=e.forwardRef(((t,n)=>{const{__scopeSelect:r,onPlaced:o,...i}=t,a=aa(ga,r),s=ba(ga,r),[l,c]=e.useState(null),[u,d]=e.useState(null),p=Dt(n,(e=>d(e))),h=ea(r),f=e.useRef(!1),m=e.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:y,focusSelectedItem:x}=s,b=e.useCallback((()=>{if(a.trigger&&a.valueNode&&l&&u&&g&&v&&y){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),r=y.getBoundingClientRect();if("rtl"!==a.dir){const o=r.left-t.left,i=n.left-o,a=e.left-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-ya,d=Ki(i,[ya,Math.max(ya,u-c)]);l.style.minWidth=s+"px",l.style.left=d+"px"}else{const o=t.right-r.right,i=window.innerWidth-n.right-o,a=window.innerWidth-e.right-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-ya,d=Ki(i,[ya,Math.max(ya,u-c)]);l.style.minWidth=s+"px",l.style.right=d+"px"}const i=h(),s=window.innerHeight-2*ya,c=g.scrollHeight,d=window.getComputedStyle(u),p=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),x=parseInt(d.borderBottomWidth,10),b=p+m+c+parseInt(d.paddingBottom,10)+x,w=Math.min(5*v.offsetHeight,b),E=window.getComputedStyle(g),P=parseInt(E.paddingTop,10),S=parseInt(E.paddingBottom,10),C=e.top+e.height/2-ya,A=s-C,T=v.offsetHeight/2,O=p+m+(v.offsetTop+T),M=b-O;if(O<=C){const e=i.length>0&&v===i[i.length-1].ref.current;l.style.bottom="0px";const t=u.clientHeight-g.offsetTop-g.offsetHeight,n=O+Math.max(A,T+(e?S:0)+t+x);l.style.height=n+"px"}else{const e=i.length>0&&v===i[0].ref.current;l.style.top="0px";const t=Math.max(C,p+g.offsetTop+(e?P:0)+T)+M;l.style.height=t+"px",g.scrollTop=O-C+g.offsetTop}l.style.margin=`${ya}px 0`,l.style.minHeight=w+"px",l.style.maxHeight=s+"px",o?.(),requestAnimationFrame((()=>f.current=!0))}}),[h,a.trigger,a.valueNode,l,u,g,v,y,a.dir,o]);cn((()=>b()),[b]);const[w,E]=e.useState();cn((()=>{u&&E(window.getComputedStyle(u).zIndex)}),[u]);const P=e.useCallback((e=>{e&&!0===m.current&&(b(),x?.(),m.current=!1)}),[b,x]);return(0,Nt.jsx)(Sa,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:f,onScrollButtonChange:P,children:(0,Nt.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,Nt.jsx)(Zt.div,{...i,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})}));Ea.displayName="SelectItemAlignedPosition";var Pa=e.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ya,...i}=e,a=oa(n);return(0,Nt.jsx)(lo,{...a,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));Pa.displayName="SelectPopperPosition";var[Sa,Ca]=na(ga,{}),Aa="SelectViewport",Ta=e.forwardRef(((t,n)=>{const{__scopeSelect:r,nonce:o,...i}=t,a=ba(Aa,r),s=Ca(Aa,r),l=Dt(n,a.onViewportChange),c=e.useRef(0);return(0,Nt.jsxs)(Nt.Fragment,{children:[(0,Nt.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),(0,Nt.jsx)(Qi.Slot,{scope:r,children:(0,Nt.jsx)(Zt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Mt(i.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){const e=Math.abs(c.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*ya,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),s=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop}))})})]})}));Ta.displayName=Aa;var Oa="SelectGroup",[Ma,ja]=na(Oa),Ra=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=pn();return(0,Nt.jsx)(Ma,{scope:n,id:o,children:(0,Nt.jsx)(Zt.div,{role:"group","aria-labelledby":o,...r,ref:t})})}));Ra.displayName=Oa;var Da="SelectLabel",Na=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=ja(Da,n);return(0,Nt.jsx)(Zt.div,{id:o.id,...r,ref:t})}));Na.displayName=Da;var ka="SelectItem",[La,Va]=na(ka),Fa=e.forwardRef(((t,n)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:a,...s}=t,l=aa(ka,r),c=ba(ka,r),u=l.value===o,[d,p]=e.useState(a??""),[h,f]=e.useState(!1),m=Dt(n,(e=>c.itemRefCallback?.(e,o,i))),g=pn(),v=e.useRef("touch"),y=()=>{i||(l.onValueChange(o),l.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,Nt.jsx)(La,{scope:r,value:o,disabled:i,textId:g,isSelected:u,onItemTextChange:e.useCallback((e=>{p((t=>t||(e?.textContent??"").trim()))}),[]),children:(0,Nt.jsx)(Qi.ItemSlot,{scope:r,value:o,disabled:i,textValue:d,children:(0,Nt.jsx)(Zt.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:m,onFocus:Mt(s.onFocus,(()=>f(!0))),onBlur:Mt(s.onBlur,(()=>f(!1))),onClick:Mt(s.onClick,(()=>{"mouse"!==v.current&&y()})),onPointerUp:Mt(s.onPointerUp,(()=>{"mouse"===v.current&&y()})),onPointerDown:Mt(s.onPointerDown,(e=>{v.current=e.pointerType})),onPointerMove:Mt(s.onPointerMove,(e=>{v.current=e.pointerType,i?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Mt(s.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()})),onKeyDown:Mt(s.onKeyDown,(e=>{""!==c.searchRef?.current&&" "===e.key||(Gi.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));Fa.displayName=ka;var Ia="SelectItemText",Ba=e.forwardRef(((t,n)=>{const{__scopeSelect:r,className:o,style:i,...a}=t,s=aa(Ia,r),l=ba(Ia,r),c=Va(Ia,r),u=la(Ia,r),[d,p]=e.useState(null),h=Dt(n,(e=>p(e)),c.onItemTextChange,(e=>l.itemTextRefCallback?.(e,c.value,c.disabled))),f=d?.textContent,m=e.useMemo((()=>(0,Nt.jsx)("option",{value:c.value,disabled:c.disabled,children:f},c.value)),[c.disabled,c.value,f]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return cn((()=>(g(m),()=>v(m))),[g,v,m]),(0,Nt.jsxs)(Nt.Fragment,{children:[(0,Nt.jsx)(Zt.span,{id:c.textId,...a,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Vt.createPortal(a.children,s.valueNode):null]})}));Ba.displayName=Ia;var _a="SelectItemIndicator",Za=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return Va(_a,n).isSelected?(0,Nt.jsx)(Zt.span,{"aria-hidden":!0,...r,ref:t}):null}));Za.displayName=_a;var Wa="SelectScrollUpButton",za=e.forwardRef(((t,n)=>{const r=ba(Wa,t.__scopeSelect),o=Ca(Wa,t.__scopeSelect),[i,a]=e.useState(!1),s=Dt(n,o.onScrollButtonChange);return cn((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?(0,Nt.jsx)(Ka,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));za.displayName=Wa;var Ua="SelectScrollDownButton",Ha=e.forwardRef(((t,n)=>{const r=ba(Ua,t.__scopeSelect),o=Ca(Ua,t.__scopeSelect),[i,a]=e.useState(!1),s=Dt(n,o.onScrollButtonChange);return cn((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?(0,Nt.jsx)(Ka,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));Ha.displayName=Ua;var Ka=e.forwardRef(((t,n)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=t,a=ba("SelectScrollButton",r),s=e.useRef(null),l=ea(r),c=e.useCallback((()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)}),[]);return e.useEffect((()=>()=>c()),[c]),cn((()=>{const e=l().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[l]),(0,Nt.jsx)(Zt.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:Mt(i.onPointerDown,(()=>{null===s.current&&(s.current=window.setInterval(o,50))})),onPointerMove:Mt(i.onPointerMove,(()=>{a.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(o,50))})),onPointerLeave:Mt(i.onPointerLeave,(()=>{c()}))})})),$a=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return(0,Nt.jsx)(Zt.div,{"aria-hidden":!0,...r,ref:t})}));$a.displayName="SelectSeparator";var Ya="SelectArrow";function Xa(e){return""===e||void 0===e}e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=oa(n),i=aa(Ya,n),a=ba(Ya,n);return i.open&&"popper"===a.position?(0,Nt.jsx)(co,{...o,...r,ref:t}):null})).displayName=Ya;var qa=e.forwardRef(((t,n)=>{const{value:r,...o}=t,i=e.useRef(null),a=Dt(n,i),s=function(t){const n=e.useRef({value:t,previous:t});return e.useMemo((()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous)),[t])}(r);return e.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(s!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}}),[s,r]),(0,Nt.jsx)(Yi,{asChild:!0,children:(0,Nt.jsx)("select",{...o,ref:a,defaultValue:r})})}));function Ga(t){const n=Wt(t),r=e.useRef(""),o=e.useRef(0),i=e.useCallback((e=>{const t=r.current+e;n(t),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(t)}),[n]),a=e.useCallback((()=>{r.current="",window.clearTimeout(o.current)}),[]);return e.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[r,i,a]}function Ja(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=(a=e,s=Math.max(o,0),a.map(((e,t)=>a[(s+t)%a.length])));var a,s;1===r.length&&(i=i.filter((e=>e!==n)));const l=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}qa.displayName="BubbleSelect";var Qa=da,es=fa,ts=ma,ns=va,rs=Ta,os=Na,is=Fa,as=Ba,ss=Za,ls=za,cs=Ha,us=$a,ds=function(){return ds=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ds.apply(this,arguments)},ps=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},hs=ca,fs=Ra,ms=ha,gs=e.forwardRef((function(t,n){var r=t.className,o=t.children,i=ps(t,["className","children"]);return e.createElement(Qa,ds({ref:n,className:Se("flex h-[50px] w-full items-center justify-between rounded-inner bg-gray-100 px-4 placeholder:text-muted-foreground focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r)},i),o,e.createElement(es,{asChild:!0},e.createElement(it,{className:"h-4 w-4 opacity-50"})))}));gs.displayName=Qa.displayName;var vs=e.forwardRef((function(t,n){var r=t.className,o=ps(t,["className"]);return e.createElement(ls,ds({ref:n,className:Se("flex cursor-default items-center justify-center py-1",r)},o),e.createElement(qe,{className:"h-4 w-4"}))}));vs.displayName=ls.displayName;var ys=e.forwardRef((function(t,n){var r=t.className,o=ps(t,["className"]);return e.createElement(cs,ds({ref:n,className:Se("flex cursor-default items-center justify-center py-1",r)},o),e.createElement(it,{className:"h-4 w-4"}))}));ys.displayName=cs.displayName;var xs=e.forwardRef((function(t,n){var r=t.className,o=t.children,i=t.position,a=void 0===i?"popper":i,s=ps(t,["className","children","position"]);return e.createElement(ts,null,e.createElement(ns,ds({ref:n,className:Se("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-inner bg-white text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===a?"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1":"",r),position:a},s),e.createElement(vs,null),e.createElement(rs,{className:Se("p-1","popper"===a?"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]":"")},o),e.createElement(ys,null)))}));xs.displayName=ns.displayName;var bs=e.forwardRef((function(t,n){var r=t.className,o=ps(t,["className"]);return e.createElement(os,ds({ref:n,className:Se("py-1.5 pl-8 pr-2 text-sm font-semibold",r)},o))}));bs.displayName=os.displayName;var ws=e.forwardRef((function(t,n){var r=t.className,o=t.children,i=ps(t,["className","children"]);return e.createElement(is,ds({ref:n,className:Se("relative flex w-full cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",r)},i),e.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},e.createElement(ss,null,e.createElement(N,{className:"h-4 w-4"}))),e.createElement(as,null,o))}));ws.displayName=is.displayName;var Es=e.forwardRef((function(t,n){var r=t.className,o=ps(t,["className"]);return e.createElement(us,ds({ref:n,className:Se("-mx-1 my-1 h-px bg-muted",r)},o))}));Es.displayName=us.displayName;var Ps="Dialog",[Ss,Cs]=kt(Ps),[As,Ts]=Ss(Ps),Os=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[u=!1,d]=fo({prop:o,defaultProp:i,onChange:a});return(0,Nt.jsx)(As,{scope:n,triggerRef:l,contentRef:c,contentId:pn(),titleId:pn(),descriptionId:pn(),open:u,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:s,children:r})};Os.displayName=Ps;var Ms="DialogTrigger",js=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ts(Ms,n),i=Dt(t,o.triggerRef);return(0,Nt.jsx)(Zt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xs(o.open),...r,ref:i,onClick:Mt(e.onClick,o.onOpenToggle)})}));js.displayName=Ms;var Rs="DialogPortal",[Ds,Ns]=Ss(Rs,{forceMount:void 0}),ks=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=t,a=Ts(Rs,n);return(0,Nt.jsx)(Ds,{scope:n,forceMount:r,children:e.Children.map(o,(e=>(0,Nt.jsx)(po,{present:r||a.open,children:(0,Nt.jsx)(uo,{asChild:!0,container:i,children:e})})))})};ks.displayName=Rs;var Ls="DialogOverlay",Vs=e.forwardRef(((e,t)=>{const n=Ns(Ls,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Ts(Ls,e.__scopeDialog);return i.modal?(0,Nt.jsx)(po,{present:r||i.open,children:(0,Nt.jsx)(Fs,{...o,ref:t})}):null}));Vs.displayName=Ls;var Fs=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ts(Ls,n);return(0,Nt.jsx)(ii,{as:Ft,allowPinchZoom:!0,shards:[o.contentRef],children:(0,Nt.jsx)(Zt.div,{"data-state":Xs(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),Is="DialogContent",Bs=e.forwardRef(((e,t)=>{const n=Ns(Is,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Ts(Is,e.__scopeDialog);return(0,Nt.jsx)(po,{present:r||i.open,children:i.modal?(0,Nt.jsx)(_s,{...o,ref:t}):(0,Nt.jsx)(Zs,{...o,ref:t})})}));Bs.displayName=Is;var _s=e.forwardRef(((t,n)=>{const r=Ts(Is,t.__scopeDialog),o=e.useRef(null),i=Dt(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return bo(e)}),[]),(0,Nt.jsx)(Ws,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Mt(t.onCloseAutoFocus,(e=>{e.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:Mt(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Mt(t.onFocusOutside,(e=>e.preventDefault()))})})),Zs=e.forwardRef(((t,n)=>{const r=Ts(Is,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return(0,Nt.jsx)(Ws,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),Ws=e.forwardRef(((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=Ts(Is,r),c=e.useRef(null),u=Dt(n,c);return qt(),(0,Nt.jsxs)(Nt.Fragment,{children:[(0,Nt.jsx)(tn,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,Nt.jsx)(Kt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Xs(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),(0,Nt.jsxs)(Nt.Fragment,{children:[(0,Nt.jsx)(Qs,{titleId:l.titleId}),(0,Nt.jsx)(el,{contentRef:c,descriptionId:l.descriptionId})]})]})})),zs="DialogTitle",Us=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ts(zs,n);return(0,Nt.jsx)(Zt.h2,{id:o.titleId,...r,ref:t})}));Us.displayName=zs;var Hs="DialogDescription",Ks=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ts(Hs,n);return(0,Nt.jsx)(Zt.p,{id:o.descriptionId,...r,ref:t})}));Ks.displayName=Hs;var $s="DialogClose",Ys=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ts($s,n);return(0,Nt.jsx)(Zt.button,{type:"button",...r,ref:t,onClick:Mt(e.onClick,(()=>o.onOpenChange(!1)))})}));function Xs(e){return e?"open":"closed"}Ys.displayName=$s;var qs="DialogTitleWarning",[Gs,Js]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,i=e.useMemo((()=>o),Object.values(o));return(0,Nt.jsx)(r.Provider,{value:i,children:n})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(r);if(i)return i;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(qs,{contentName:Is,titleName:zs,docsSlug:"dialog"}),Qs=({titleId:t})=>{const n=Js(qs),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect((()=>{t&&(document.getElementById(t)||console.error(r))}),[r,t]),null},el=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Js("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=t.current?.getAttribute("aria-describedby");n&&e&&(document.getElementById(n)||console.warn(r))}),[r,t,n]),null},tl=Os,nl=js,rl=ks,ol=Vs,il=Bs,al=Us,sl=Ks,ll=Ys;const cl=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),e.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]);var ul=Object.defineProperty,dl=Object.defineProperties,pl=Object.getOwnPropertyDescriptors,hl=Object.getOwnPropertySymbols,fl=Object.prototype.hasOwnProperty,ml=Object.prototype.propertyIsEnumerable,gl=(e,t,n)=>t in e?ul(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const vl=(0,e.forwardRef)(((t,n)=>e.createElement(m,((e,t)=>dl(e,pl(t)))(((e,t)=>{for(var n in t||(t={}))fl.call(t,n)&&gl(e,n,t[n]);if(hl)for(var n of hl(t))ml.call(t,n)&&gl(e,n,t[n]);return e})({ref:n},t),{weights:cl}))));vl.displayName="X";var yl=function(){return yl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},yl.apply(this,arguments)},xl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},bl=tl,wl=nl,El=ll,Pl=rl,Sl=e.forwardRef((function(t,n){var r=t.className,o=xl(t,["className"]);return e.createElement(ol,yl({className:lt()("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r)},o,{ref:n}))}));Sl.displayName=ol.displayName;var Cl=Pe("fixed z-50 gap-4 bg-white p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Al=e.forwardRef((function(t,n){var r=t.side,o=void 0===r?"right":r,i=t.className,a=t.children,s=xl(t,["side","className","children"]);return e.createElement(Pl,null,e.createElement(Sl,null),e.createElement(il,yl({ref:n,className:lt()(Cl({side:o}),i),onOpenAutoFocus:function(e){return e.preventDefault()}},s),a,e.createElement(ll,{className:"absolute right-4 top-4 rounded-default opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-white"},e.createElement(vl,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Close"))))}));Al.displayName=il.displayName;var Tl=function(t){var n=t.className,r=xl(t,["className"]);return e.createElement("div",yl({className:lt()("flex flex-col space-y-2 text-center sm:text-left",n)},r))};Tl.displayName="SheetHeader";var Ol=function(t){var n=t.className,r=xl(t,["className"]);return e.createElement("div",yl({className:lt()("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n)},r))};Ol.displayName="SheetFooter";var Ml=e.forwardRef((function(t,n){var r=t.className,o=xl(t,["className"]);return e.createElement(al,yl({ref:n,className:lt()("text-lg font-semibold text-foreground",r)},o))}));Ml.displayName=al.displayName;var jl=e.forwardRef((function(t,n){var r=t.className,o=xl(t,["className"]);return e.createElement(sl,yl({ref:n,className:lt()("text-sm text-muted-foreground",r)},o))}));jl.displayName=sl.displayName;const Rl=function(e){var t=e.step,r=e.title,o=e.subtitle,i=e.checked,a=e.active,s=e.onClick,l=lt()("w-full md:w-12 h-12 flex-none rounded-default flex justify-center items-center font-medium",{"bg-green-500 text-white":i,"bg-white text-gray-500":!i,"border-2 bg-gray-100 border-primary-500":a});return n().createElement("div",{className:"w-full flex flex-col items-center text-center gap-3 md:flex-row md:items-center md:text-left",onClick:s},n().createElement("div",{className:l},i?n().createElement(N,{size:22}):t),n().createElement("div",null,n().createElement("h3",{className:"text-sm md:text-base whitespace-nowrap"},r),o&&n().createElement("p",{className:"text-sm text-gray-500 whitespace-nowrap"},o)))};function Dl(e,t){-1===e.indexOf(t)&&e.push(t)}function Nl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const kl=e=>e;let Ll=kl,Vl=kl;function Fl(e){let t;return()=>(void 0===t&&(t=e()),t)}const Il=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class Bl{constructor(){this.subscriptions=[]}add(e){return Dl(this.subscriptions,e),()=>Nl(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _l=e=>1e3*e,Zl=e=>e/1e3;function Wl(e,t){return t?e*(1e3/t):0}function zl(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function Ul(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function Hl(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Kl(e,t,n,r){if("function"==typeof t){const[o,i]=Hl(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=Hl(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function $l(e,t,n){const r=e.getProps();return Kl(r,t,void 0!==n?n:r.custom,e)}new Set;const Yl=Fl((()=>void 0!==window.ScrollTimeline));class Xl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map((e=>"finished"in e?e.finished:e)))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map((n=>Yl()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0));return()=>{n.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ql extends Xl{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function Gl(e,t){return e?e[t]||e.default||e:void 0}const Jl=2e4;function Ql(e){let t=0,n=e.next(t);for(;!n.done&&t<Jl;)t+=50,n=e.next(t);return t>=Jl?1/0:t}function ec(e){return"function"==typeof e}function tc(e,t){e.timeline=t,e.onfinish=null}const nc=e=>Array.isArray(e)&&"number"==typeof e[0],rc={linearEasing:void 0};function oc(e,t){const n=Fl(e);return()=>{var e;return null!==(e=rc[t])&&void 0!==e?e:n()}}const ic=oc((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),"linearEasing"),ac=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let t=0;t<o;t++)r+=e(Il(0,o-1,t))+", ";return`linear(${r.substring(0,r.length-2)})`};function sc(e){return Boolean("function"==typeof e&&ic()||!e||"string"==typeof e&&(e in cc||ic())||nc(e)||Array.isArray(e)&&e.every(sc))}const lc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,cc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:lc([0,.65,.55,1]),circOut:lc([.55,0,1,.45]),backIn:lc([.31,.01,.66,-.59]),backOut:lc([.33,1.53,.69,.99])};function uc(e,t){return e?"function"==typeof e&&ic()?ac(e,t):nc(e)?lc(e):Array.isArray(e)?e.map((e=>uc(e,t)||cc.easeOut)):cc[e]:void 0}const dc=["read","resolveKeyframes","update","preRender","render","postRender"],pc={value:null,addProjectionMetrics:null};function hc(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=dc.reduce(((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1},l=0;function c(t){a.has(t)&&(u.schedule(t),e()),l++,t(s)}const u={schedule:(e,t=!1,i=!1)=>{const s=i&&o?n:r;return t&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),a.delete(e)},process:e=>{s=e,o?i=!0:(o=!0,[n,r]=[r,n],n.forEach(c),t&&pc.value&&pc.value.frameloop[t].push(l),l=0,n.clear(),o=!1,i&&(i=!1,u.process(e)))}};return u}(i,t?n:void 0),e)),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,h=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))};return{schedule:dc.reduce(((t,i)=>{const s=a[i];return t[i]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(h)),s.schedule(t,i,a)),t}),{}),cancel:e=>{for(let t=0;t<dc.length;t++)a[dc[t]].cancel(e)},state:o,steps:a}}const{schedule:fc,cancel:mc,state:gc,steps:vc}=hc("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:kl,!0),{schedule:yc,cancel:xc}=hc(queueMicrotask,!1);let bc;function wc(){bc=void 0}const Ec={now:()=>(void 0===bc&&Ec.set(gc.isProcessing?gc.timestamp:performance.now()),bc),set:e=>{bc=e,queueMicrotask(wc)}},Pc={x:!1,y:!1};function Sc(){return Pc.x||Pc.y}function Cc(e,t){const n=function(e){if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const n=t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ac(e){return!("touch"===e.pointerType||Sc())}function Tc(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&void 0!==e.pointerId)try{e.target[n](e.pointerId)}catch(e){}}const Oc=(e,t)=>!!t&&(e===t||Oc(e,t.parentElement)),Mc=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,jc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),Rc=new WeakSet;function Dc(e){return t=>{"Enter"===t.key&&e(t)}}function Nc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function kc(e){return Mc(e)&&!Sc()}const Lc={layout:0,mainThread:0,waapi:0},Vc={current:void 0};class Fc{constructor(e,t={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=Ec.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Ec.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Bl);const n=this.events[e].add(t);return"change"===e?()=>{n(),fc.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Vc.current&&Vc.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Ec.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Wl(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ic(e,t){return new Fc(e,t)}const Bc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_c=new Set(Bc),Zc=new Set(["width","height","top","left","right","bottom",...Bc]),Wc=e=>Array.isArray(e);function zc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ic(n))}const Uc=e=>Boolean(e&&e.getVelocity);function Hc(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Uc(r)&&r.add))return n.add(t);var r}const Kc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),$c="data-"+Kc("framerAppearId");function Yc(e){return e.props[$c]}const Xc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function qc(e,t,n,r){if(e===t&&n===r)return kl;return o=>0===o||1===o?o:Xc(function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Xc(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(o,0,1,e,n),t,r)}const Gc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Jc=e=>t=>1-e(1-t),Qc=qc(.33,1.53,.69,.99),eu=Jc(Qc),tu=Gc(eu),nu=e=>(e*=2)<1?.5*eu(e):.5*(2-Math.pow(2,-10*(e-1))),ru=e=>1-Math.sin(Math.acos(e)),ou=Jc(ru),iu=Gc(ru),au=e=>/^0[^.\s]+$/u.test(e),su=(e,t,n)=>n>t?t:n<e?e:n,lu={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},cu={...lu,transform:e=>su(0,1,e)},uu={...lu,default:1},du=e=>Math.round(1e5*e)/1e5,pu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,hu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fu=(e,t)=>n=>Boolean("string"==typeof n&&hu.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),mu=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,a,s]=r.match(pu);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},gu={...lu,transform:e=>Math.round((e=>su(0,255,e))(e))},vu={test:fu("rgb","red"),parse:mu("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+gu.transform(e)+", "+gu.transform(t)+", "+gu.transform(n)+", "+du(cu.transform(r))+")"},yu={test:fu("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:vu.transform},xu=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),bu=xu("deg"),wu=xu("%"),Eu=xu("px"),Pu=xu("vh"),Su=xu("vw"),Cu={...wu,parse:e=>wu.parse(e)/100,transform:e=>wu.transform(100*e)},Au={test:fu("hsl","hue"),parse:mu("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+wu.transform(du(t))+", "+wu.transform(du(n))+", "+du(cu.transform(r))+")"},Tu={test:e=>vu.test(e)||yu.test(e)||Au.test(e),parse:e=>vu.test(e)?vu.parse(e):Au.test(e)?Au.parse(e):yu.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?vu.transform(e):Au.transform(e)},Ou=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Mu="number",ju="color",Ru=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Du(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(Ru,(e=>(Tu.test(e)?(r.color.push(i),o.push(ju),n.push(Tu.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(Mu),n.push(parseFloat(e))),++i,"${}"))).split("${}");return{values:n,split:a,indexes:r,types:o}}function Nu(e){return Du(e).values}function ku(e){const{split:t,types:n}=Du(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Mu?du(e[i]):t===ju?Tu.transform(e[i]):e[i]}return o}}const Lu=e=>"number"==typeof e?0:e,Vu={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(pu))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Ou))||void 0===n?void 0:n.length)||0)>0},parse:Nu,createTransformer:ku,getAnimatableNone:function(e){const t=Nu(e);return ku(e)(t.map(Lu))}},Fu=new Set(["brightness","contrast","saturate","opacity"]);function Iu(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(pu)||[];if(!r)return e;const o=n.replace(r,"");let i=Fu.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Bu=/\b([a-z-]*)\(.*?\)/gu,_u={...Vu,getAnimatableNone:e=>{const t=e.match(Bu);return t?t.map(Iu).join(" "):e}},Zu={borderWidth:Eu,borderTopWidth:Eu,borderRightWidth:Eu,borderBottomWidth:Eu,borderLeftWidth:Eu,borderRadius:Eu,radius:Eu,borderTopLeftRadius:Eu,borderTopRightRadius:Eu,borderBottomRightRadius:Eu,borderBottomLeftRadius:Eu,width:Eu,maxWidth:Eu,height:Eu,maxHeight:Eu,top:Eu,right:Eu,bottom:Eu,left:Eu,padding:Eu,paddingTop:Eu,paddingRight:Eu,paddingBottom:Eu,paddingLeft:Eu,margin:Eu,marginTop:Eu,marginRight:Eu,marginBottom:Eu,marginLeft:Eu,backgroundPositionX:Eu,backgroundPositionY:Eu},Wu={rotate:bu,rotateX:bu,rotateY:bu,rotateZ:bu,scale:uu,scaleX:uu,scaleY:uu,scaleZ:uu,skew:bu,skewX:bu,skewY:bu,distance:Eu,translateX:Eu,translateY:Eu,translateZ:Eu,x:Eu,y:Eu,z:Eu,perspective:Eu,transformPerspective:Eu,opacity:cu,originX:Cu,originY:Cu,originZ:Eu},zu={...lu,transform:Math.round},Uu={...Zu,...Wu,zIndex:zu,size:Eu,fillOpacity:cu,strokeOpacity:cu,numOctaves:zu},Hu={...Uu,color:Tu,backgroundColor:Tu,outlineColor:Tu,fill:Tu,stroke:Tu,borderColor:Tu,borderTopColor:Tu,borderRightColor:Tu,borderBottomColor:Tu,borderLeftColor:Tu,filter:_u,WebkitFilter:_u},Ku=e=>Hu[e];function $u(e,t){let n=Ku(e);return n!==_u&&(n=Vu),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Yu=new Set(["auto","none","0"]),Xu=e=>180*e/Math.PI,qu=e=>{const t=Xu(Math.atan2(e[1],e[0]));return Ju(t)},Gu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qu,rotateZ:qu,skewX:e=>Xu(Math.atan(e[1])),skewY:e=>Xu(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ju=e=>((e%=360)<0&&(e+=360),e),Qu=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ed=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),td={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Qu,scaleY:ed,scale:e=>(Qu(e)+ed(e))/2,rotateX:e=>Ju(Xu(Math.atan2(e[6],e[5]))),rotateY:e=>Ju(Xu(Math.atan2(-e[2],e[0]))),rotateZ:qu,rotate:qu,skewX:e=>Xu(Math.atan(e[4])),skewY:e=>Xu(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function nd(e){return e.includes("scale")?1:0}function rd(e,t){if(!e||"none"===e)return nd(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=td,o=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Gu,o=t}if(!o)return nd(t);const i=r[t],a=o[1].split(",").map(od);return"function"==typeof i?i(a):a[i]}function od(e){return parseFloat(e.trim())}const id=e=>e===lu||e===Eu,ad=new Set(["x","y","z"]),sd=Bc.filter((e=>!ad.has(e))),ld={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>rd(t,"x"),y:(e,{transform:t})=>rd(t,"y")};ld.translateX=ld.x,ld.translateY=ld.y;const cd=new Set;let ud=!1,dd=!1;function pd(){if(dd){const e=Array.from(cd).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return sd.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}dd=!1,ud=!1,cd.forEach((e=>e.complete())),cd.clear()}function hd(){cd.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(dd=!0)}))}class fd{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(cd.add(this),ud||(ud=!0,fc.read(hd),fc.resolveKeyframes(pd))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),cd.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,cd.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const md=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),gd=e=>t=>"string"==typeof t&&t.startsWith(e),vd=gd("--"),yd=gd("var(--"),xd=e=>!!yd(e)&&bd.test(e.split("/*")[0].trim()),bd=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,wd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ed(e,t,n=1){Vl(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=wd.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return md(e)?parseFloat(e):e}return xd(o)?Ed(o,t,n+1):o}const Pd=e=>t=>t.test(e),Sd=[lu,Eu,wu,bu,Su,Pu,{test:e=>"auto"===e,parse:e=>e}],Cd=e=>Sd.find(Pd(e));class Ad extends fd{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),xd(r))){const o=Ed(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Zc.has(n)||2!==e.length)return;const[r,o]=e,i=Cd(r),a=Cd(o);if(i!==a)if(id(i)&&id(a))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||au(r))&&n.push(t);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!Yu.has(t)&&Du(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=$u(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ld[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=ld[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const Td=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!Vu.test(e)&&"0"!==e||e.startsWith("url(")));function Od(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=Td(o,t),s=Td(i,t);return Ll(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!a||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||ec(n))&&r)}const Md=e=>null!==e;function jd(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Md),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}class Rd{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ec.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(hd(),pd()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=Ec.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:a,onUpdate:s,isGenerator:l}=this.options;if(!l&&!Od(e,n,r,o)){if(!i)return s&&s(jd(e,this.options,t)),a&&a(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}const Dd=(e,t,n)=>e+(t-e)*n;function Nd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function kd(e,t){return n=>n>0?t:e}const Ld=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Vd=[yu,vu,Au];function Fd(e){const t=(n=e,Vd.find((e=>e.test(n))));var n;if(Ll(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let r=t.parse(e);return t===Au&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=Nd(s,r,e+1/3),i=Nd(s,r,e),a=Nd(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(r)),r}const Id=(e,t)=>{const n=Fd(e),r=Fd(t);if(!n||!r)return kd(e,t);const o={...n};return e=>(o.red=Ld(n.red,r.red,e),o.green=Ld(n.green,r.green,e),o.blue=Ld(n.blue,r.blue,e),o.alpha=Dd(n.alpha,r.alpha,e),vu.transform(o))},Bd=(e,t)=>n=>t(e(n)),_d=(...e)=>e.reduce(Bd),Zd=new Set(["none","hidden"]);function Wd(e,t){return n=>Dd(e,t,n)}function zd(e){return"number"==typeof e?Wd:"string"==typeof e?xd(e)?kd:Tu.test(e)?Id:Kd:Array.isArray(e)?Ud:"object"==typeof e?Tu.test(e)?Id:Hd:kd}function Ud(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>zd(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function Hd(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=zd(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Kd=(e,t)=>{const n=Vu.createTransformer(t),r=Du(e),o=Du(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Zd.has(e)&&!o.values.length||Zd.has(t)&&!r.values.length?function(e,t){return Zd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):_d(Ud(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=null!==(n=e.values[s])&&void 0!==n?n:0;r[i]=l,o[a]++}return r}(r,o),o.values),n):(Ll(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),kd(e,t))};function $d(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Dd(e,t,n):zd(e)(e,t)}function Yd(e,t,n){const r=Math.max(t-5,0);return Wl(n-e(r),t-r)}const Xd=.01,qd=2,Gd=.005,Jd=.5;const Qd=12;function ep(e,t){return e*Math.sqrt(1-t*t)}const tp=["duration","bounce"],np=["stiffness","damping","mass"];function rp(e,t){return t.some((t=>void 0!==e[t]))}function op(e=.3,t=.3){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:h}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!rp(e,np)&&rp(e,tp))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,i=2*su(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:1,stiffness:o,damping:i}}else{const n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:r=1}){let o,i;Ll(e<=_l(10),"Spring duration must be 10 seconds or less");let a=1-t;a=su(.05,1,a),e=su(.01,10,Zl(e)),a<1?(o=t=>{const r=t*a,o=r*e;return.001-(r-n)/ep(t,a)*Math.exp(-o)},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=ep(Math.pow(t,2),a);return(.001-o(t)>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<Qd;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=_l(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...n,velocity:-Zl(n.velocity||0)}),f=p||0,m=c/(2*Math.sqrt(l*u)),g=a-i,v=Zl(Math.sqrt(l/u)),y=Math.abs(g)<5;let x;if(r||(r=y?Xd:qd),o||(o=y?Gd:Jd),m<1){const e=ep(v,m);x=t=>{const n=Math.exp(-m*v*t);return a-n*((f+m*v*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)x=e=>a-Math.exp(-v*e)*(g+(f+v*g)*e);else{const e=v*Math.sqrt(m*m-1);x=t=>{const n=Math.exp(-m*v*t),r=Math.min(e*t,300);return a-n*((f+m*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const b={calculatedDuration:h&&d||null,next:e=>{const t=x(e);if(h)s.done=e>=d;else{let n=0;m<1&&(n=0===e?_l(f):Yd(x,e,t));const i=Math.abs(n)<=r,l=Math.abs(a-t)<=o;s.done=i&&l}return s.value=s.done?a:t,s},toString:()=>{const e=Math.min(Ql(b),Jl),t=ac((t=>b.next(e*t).value),e,30);return e+"ms "+t}};return b}function ip({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},h=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let f=n*t;const m=d+f,g=void 0===a?m:a(m);g!==m&&(f=g-d);const v=e=>-f*Math.exp(-e/r),y=e=>g+v(e),x=e=>{const t=v(e),n=y(e);p.done=Math.abs(t)<=c,p.value=p.done?g:n};let b,w;const E=e=>{var t;t=p.value,(void 0!==s&&t<s||void 0!==l&&t>l)&&(b=e,w=op({keyframes:[p.value,h(p.value)],velocity:Yd(y,e,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==b||(t=!0,x(e),E(e)),void 0!==b&&e>=b?w.next(e-b):(!t&&x(e),p)}}}const ap=qc(.42,0,1,1),sp=qc(0,0,.58,1),lp=qc(.42,0,.58,1),cp={linear:kl,easeIn:ap,easeInOut:lp,easeOut:sp,circIn:ru,circInOut:iu,circOut:ou,backIn:eu,backInOut:tu,backOut:Qc,anticipate:nu},up=e=>{if(nc(e)){Vl(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return qc(t,n,r,o)}return"string"==typeof e?(Vl(void 0!==cp[e],`Invalid easing type '${e}'`),cp[e]):e};function dp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(up):up(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Il(0,t,r);e.push(Dd(n,1,o))}}(t,e.length-1),t}(t),e),s=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Vl(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||$d,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||kl:t;i=_d(e,i)}r.push(i)}return r}(t,r,o),l=s.length,c=n=>{if(a&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const o=Il(e[r],e[r+1],n);return s[r](o)};return n?t=>c(su(e[0],e[i-1],t)):c}(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||lp)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}const pp=e=>{const t=({timestamp:t})=>e(t);return{start:()=>fc.update(t,!0),stop:()=>mc(t),now:()=>gc.isProcessing?gc.timestamp:Ec.now()}},hp={decay:ip,inertia:ip,tween:dp,keyframes:dp,spring:op},fp=e=>e/100;class mp extends Rd{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options,i=(null==r?void 0:r.KeyframeResolver)||fd;this.resolver=new i(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,a=ec(t)?t:hp[t]||dp;let s,l;a!==dp&&"number"!=typeof e[0]&&(s=_d(fp,$d(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});"mirror"===o&&(l=a({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=Ql(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;Lc.mainThread++,this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:s,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:p,repeatType:h,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let y=this.currentTime,x=o;if(p){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,p+1),Boolean(t%2)&&("reverse"===h?(n=1-n,f&&(n-=f/u)):"mirror"===h&&(x=i)),y=su(0,1,n)*u}const b=v?{done:!1,value:s[0]}:x.next(y);a&&(b.value=a(b.value));let{done:w}=b;v||null===l||(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return E&&void 0!==r&&(b.value=jd(s,this.options,r)),m&&m(b.value),E&&this.finish(),b}get duration(){const{resolved:e}=this;return e?Zl(e.calculatedDuration):0}get time(){return Zl(this.currentTime)}set time(e){e=_l(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Zl(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=pp,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel(),Lc.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const gp=new Set(["opacity","clipPath","filter","transform"]),vp=Fl((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),yp={anticipate:nu,backInOut:tu,circInOut:iu};class xp extends Rd{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new Ad(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:o,type:i,motionValue:a,name:s,startTime:l}=this.options;if(!a.owner||!a.owner.current)return!1;if("string"==typeof o&&ic()&&o in yp&&(o=yp[o]),function(e){return ec(e.type)||"spring"===e.type||!sc(e.ease)}(this.options)){const{onComplete:t,onUpdate:a,motionValue:s,element:l,...c}=this.options,u=function(e,t){const n=new mp({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,r=u.times,o=u.ease,i="keyframes"}const c=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=uc(s,o);Array.isArray(u)&&(c.easing=u),pc.value&&Lc.waapi++;const d=e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"});return pc.value&&d.finished.finally((()=>{Lc.waapi--})),d}(a.owner.current,s,e,{...this.options,duration:n,times:r,ease:o});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(tc(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;a.set(jd(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:r,type:i,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return Zl(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Zl(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=_l(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return kl;const{animation:n}=t;tc(n,e)}else this.pendingTimeline=e;return kl}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:a}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:s,element:l,...c}=this.options,u=new mp({...c,keyframes:n,duration:r,type:o,ease:i,times:a,isGenerator:!0}),d=_l(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:s}=this.options;s&&s(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return vp()&&n&&gp.has(n)&&!s&&!l&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}}const bp={type:"spring",stiffness:500,damping:25,restSpeed:10},wp={type:"keyframes",duration:.8},Ep={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Pp=(e,{keyframes:t})=>t.length>2?wp:_c.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:bp:Ep,Sp=(e,t,n,r={},o,i)=>a=>{const s=Gl(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=_l(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(s)||(u={...u,...Pp(e,u)}),u.duration&&(u.duration=_l(u.duration)),u.repeatDelay&&(u.repeatDelay=_l(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&void 0!==t.get()){const e=jd(u.keyframes,s);if(void 0!==e)return fc.update((()=>{u.onUpdate(e),u.onComplete()})),new ql([])}return!i&&xp.supports(u)?new xp(u):new mp(u)};function Cp({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Ap(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||u&&Cp(u,t))continue;const s={delay:n,...Gl(a||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=Yc(e);if(n){const e=window.MotionHandoffAnimation(n,t,fc);null!==e&&(s.startTime=e,d=!0)}}Hc(e,t),r.start(Sp(t,r,o,e.shouldReduceMotion&&Zc.has(t)?{type:!1}:s,e,d));const p=r.animation;p&&c.push(p)}return s&&Promise.all(c).then((()=>{fc.update((()=>{s&&function(e,t){const n=$l(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)zc(e,t,(a=i[t],Wc(a)?a[a.length-1]||0:a));var a}(e,s)}))})),c}function Tp(e,t,n={}){var r;const o=$l(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(Ap(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(Op).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(Tp(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,o+r,a,s,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then((()=>t()))}return Promise.all([a(),s(n.delay)])}function Op(e,t){return e.sortNodePosition(t)}function Mp(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function jp(e){return"string"==typeof e||Array.isArray(e)}const Rp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dp=["initial",...Rp],Np=Dp.length;function kp(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&kp(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Np;n++){const r=Dp[n],o=e.props[r];(jp(o)||!1===o)&&(t[r]=o)}return t}const Lp=[...Rp].reverse(),Vp=Rp.length;function Fp(e){let t=function(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>Tp(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Tp(e,t,n);else{const o="function"==typeof t?$l(e,t,n.custom):t;r=Promise.all(Ap(e,o,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}(e),n=Bp(),r=!0;const o=t=>(n,r)=>{var o;const i=$l(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const{props:a}=e,s=kp(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Vp;t++){const f=Lp[t],m=n[f],g=void 0!==a[f]?a[f]:s[f],v=jp(g),y=f===i?m.isActive:null;!1===y&&(d=t);let x=g===s[f]&&g!==a[f]&&v;if(x&&r&&e.manuallyAnimateOnMount&&(x=!1),m.protectedKeys={...u},!m.isActive&&null===y||!g&&!m.prevProp||Ul(g)||"boolean"==typeof g)continue;const b=(p=m.prevProp,"string"==typeof(h=g)?h!==p:!!Array.isArray(h)&&!Mp(h,p));let w=b||f===i&&m.isActive&&!x&&v||t>d&&v,E=!1;const P=Array.isArray(g)?g:[g];let S=P.reduce(o(f),{});!1===y&&(S={});const{prevResolvedValues:C={}}=m,A={...C,...S},T=t=>{w=!0,c.has(t)&&(E=!0,c.delete(t)),m.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in A){const t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=Wc(t)&&Wc(n)?!Mp(t,n):t!==n,r?null!=t?T(e):c.add(e):void 0!==t&&c.has(e)?T(e):m.protectedKeys[e]=!0}m.prevProp=g,m.prevResolvedValues=S,m.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(w=!1),w&&(!x||!b||E)&&l.push(...P.map((e=>({animation:e,options:{type:f}}))))}var p,h;if(c.size){const t={};if("boolean"!=typeof a.initial){const n=$l(e,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach((n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let f=Boolean(l.length);return!r||!1!==a.initial&&a.initial!==a.animate||e.manuallyAnimateOnMount||(f=!1),r=!1,f?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Bp(),r=!0}}}function Ip(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Bp(){return{animate:Ip(!0),whileInView:Ip(),whileHover:Ip(),whileTap:Ip(),whileDrag:Ip(),whileFocus:Ip(),exit:Ip()}}class _p{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Zp=0;const Wp={animation:{Feature:class extends _p{constructor(e){super(e),e.animationState||(e.animationState=Fp(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ul(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends _p{constructor(){super(...arguments),this.id=Zp++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>{t(this.id)}))}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function zp(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Up(e){return{point:{x:e.pageX,y:e.pageY}}}function Hp(e,t,n,r){return zp(e,t,(e=>t=>Mc(t)&&e(t,Up(t)))(n),r)}function Kp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $p(e){return e.max-e.min}function Yp(e,t,n,r=.5){e.origin=r,e.originPoint=Dd(t.min,t.max,e.origin),e.scale=$p(n)/$p(t),e.translate=Dd(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Xp(e,t,n,r){Yp(e.x,t.x,n.x,r?r.originX:void 0),Yp(e.y,t.y,n.y,r?r.originY:void 0)}function qp(e,t,n){e.min=n.min+t.min,e.max=e.min+$p(t)}function Gp(e,t,n){e.min=t.min-n.min,e.max=e.min+$p(t)}function Jp(e,t,n){Gp(e.x,t.x,n.x),Gp(e.y,t.y,n.y)}const Qp=()=>({x:{min:0,max:0},y:{min:0,max:0}});function eh(e){return[e("x"),e("y")]}function th(e){return void 0===e||1===e}function nh({scale:e,scaleX:t,scaleY:n}){return!th(e)||!th(t)||!th(n)}function rh(e){return nh(e)||oh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function oh(e){return ih(e.x)||ih(e.y)}function ih(e){return e&&"0%"!==e}function ah(e,t,n){return n+t*(e-n)}function sh(e,t,n,r,o){return void 0!==o&&(e=ah(e,o,r)),ah(e,n,r)+t}function lh(e,t=0,n=1,r,o){e.min=sh(e.min,t,n,r,o),e.max=sh(e.max,t,n,r,o)}function ch(e,{x:t,y:n}){lh(e.x,t.translate,t.scale,t.originPoint),lh(e.y,n.translate,n.scale,n.originPoint)}const uh=.999999999999,dh=1.0000000000001;function ph(e,t){e.min=e.min+t,e.max=e.max+t}function hh(e,t,n,r,o=.5){lh(e,t,n,Dd(e.min,e.max,o),r)}function fh(e,t){hh(e.x,t.x,t.scaleX,t.scale,t.originX),hh(e.y,t.y,t.scaleY,t.scale,t.originY)}function mh(e,t){return Kp(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const gh=({current:e})=>e?e.ownerDocument.defaultView:null;function vh(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}const yh=(e,t)=>Math.abs(e-t);class xh{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Eh(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=yh(e.x,t.x),r=yh(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=gc;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=bh(t,this.transformPagePoint),fc.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=Eh("pointercancel"===e.type?this.lastMoveEventInfo:bh(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Mc(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=bh(Up(e),this.transformPagePoint),{point:a}=i,{timestamp:s}=gc;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,Eh(i,this.history)),this.removeListeners=_d(Hp(this.contextWindow,"pointermove",this.handlePointerMove),Hp(this.contextWindow,"pointerup",this.handlePointerUp),Hp(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),mc(this.updatePoint)}}function bh(e,t){return t?{point:t(e.point)}:e}function wh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Eh({point:e},t){return{point:e,delta:wh(e,Sh(t)),offset:wh(e,Ph(t)),velocity:Ch(t,.1)}}function Ph(e){return e[0]}function Sh(e){return e[e.length-1]}function Ch(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Sh(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>_l(t)));)n--;if(!r)return{x:0,y:0};const i=Zl(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Ah(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Th(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Oh=.35;function Mh(e,t,n){return{min:jh(e,t),max:jh(e,n)}}function jh(e,t){return"number"==typeof e?e:e[t]||0}const Rh=new WeakMap;class Dh{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new xh(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Up(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?Pc[i]?null:(Pc[i]=!0,()=>{Pc[i]=!1}):Pc.x||Pc.y?null:(Pc.x=Pc.y=!0,()=>{Pc.x=Pc.y=!1}),!this.openDragLock))return;var i;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eh((e=>{let t=this.getAxisMotionValue(e).get()||0;if(wu.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=$p(r)*(parseFloat(t)/100))}}this.originPoint[e]=t})),o&&fc.postRender((()=>o(e,t))),Hc(this.visualElement,"transform");const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>eh((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:gh(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&fc.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Nh(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Dd(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Dd(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&vh(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:Ah(e.x,n,o),y:Ah(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Oh){return!1===e?e=0:!0===e&&(e=Oh),{x:Mh(e,"left","right"),y:Mh(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&eh((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!vh(e))return!1;const n=e.current;Vl(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=mh(e,n),{scroll:o}=t;return o&&(ph(r.x,o.offset.x),ph(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:Th(e.x,t.x),y:Th(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=Kp(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=eh((a=>{if(!Nh(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Hc(this.visualElement,e),n.start(Sp(e,n,0,t,this.visualElement,!1))}stopAnimation(){eh((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){eh((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){eh((t=>{const{drag:n}=this.getProps();if(!Nh(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-Dd(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!vh(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};eh((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=$p(e),o=$p(t);return o>r?n=Il(t.min,t.max-r,e.min):r>o&&(n=Il(e.min,e.max-o,t.min)),su(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),eh((t=>{if(!Nh(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Dd(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Rh.set(this.visualElement,this);const e=Hp(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();vh(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),fc.read(t);const o=zp(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(eh((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Oh,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function Nh(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const kh=e=>(t,n)=>{e&&fc.postRender((()=>e(t,n)))},Lh=(0,e.createContext)(null),Vh=(0,e.createContext)({}),Fh=(0,e.createContext)({}),Ih={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Bh(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const _h={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Eu.test(e))return e;e=parseFloat(e)}return`${Bh(e,t.target.x)}% ${Bh(e,t.target.y)}%`}},Zh={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Vu.parse(e);if(o.length>5)return r;const i=Vu.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=Dd(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}},Wh={};class zh extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;!function(e){for(const t in e)Wh[t]=e[t],vd(t)&&(Wh[t].isCSSVariable=!0)}(Hh),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ih.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t||e.isPresent!==o?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||fc.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),yc.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Uh(t){const[n,r]=function(t=!0){const n=(0,e.useContext)(Lh);if(null===n)return[!0,null];const{isPresent:r,onExitComplete:o,register:i}=n,a=(0,e.useId)();(0,e.useEffect)((()=>{if(t)return i(a)}),[t]);const s=(0,e.useCallback)((()=>t&&o&&o(a)),[a,o,t]);return!r&&o?[!1,s]:[!0]}(),o=(0,e.useContext)(Vh);return(0,Nt.jsx)(zh,{...t,layoutGroup:o,switchLayoutGroup:(0,e.useContext)(Fh),isPresent:n,safeToRemove:r})}const Hh={borderRadius:{..._h,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_h,borderTopRightRadius:_h,borderBottomLeftRadius:_h,borderBottomRightRadius:_h,boxShadow:Zh},Kh=(e,t)=>e.depth-t.depth;class $h{constructor(){this.children=[],this.isDirty=!1}add(e){Dl(this.children,e),this.isDirty=!0}remove(e){Nl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Kh),this.isDirty=!1,this.children.forEach(e)}}function Yh(e){const t=Uc(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const Xh=["TopLeft","TopRight","BottomLeft","BottomRight"],qh=Xh.length,Gh=e=>"string"==typeof e?parseFloat(e):e,Jh=e=>"number"==typeof e||Eu.test(e);function Qh(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const ef=nf(0,.5,ou),tf=nf(.5,.95,kl);function nf(e,t,n){return r=>r<e?0:r>t?1:n(Il(e,t,r))}function rf(e,t){e.min=t.min,e.max=t.max}function of(e,t){rf(e.x,t.x),rf(e.y,t.y)}function af(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function sf(e,t,n,r,o){return e=ah(e-=t,1/n,r),void 0!==o&&(e=ah(e,1/o,r)),e}function lf(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){if(wu.test(t)&&(t=parseFloat(t),t=Dd(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=Dd(i.min,i.max,r);e===i&&(s-=t),e.min=sf(e.min,t,n,s,o),e.max=sf(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const cf=["x","scaleX","originX"],uf=["y","scaleY","originY"];function df(e,t,n,r){lf(e.x,t,cf,n?n.x:void 0,r?r.x:void 0),lf(e.y,t,uf,n?n.y:void 0,r?r.y:void 0)}function pf(e){return 0===e.translate&&1===e.scale}function hf(e){return pf(e.x)&&pf(e.y)}function ff(e,t){return e.min===t.min&&e.max===t.max}function mf(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gf(e,t){return mf(e.x,t.x)&&mf(e.y,t.y)}function vf(e){return $p(e.x)/$p(e.y)}function yf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class xf{constructor(){this.members=[]}add(e){Dl(this.members,e),e.scheduleRender()}remove(e){if(Nl(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const bf={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},wf=["","X","Y","Z"],Ef={visibility:"hidden"};let Pf=0;function Sf(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Cf(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Yc(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",fc,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Cf(r)}function Af({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Pf++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,pc.value&&(bf.nodes=bf.calculatedTargetDeltas=bf.calculatedProjections=0),this.nodes.forEach(Mf),this.nodes.forEach(Vf),this.nodes.forEach(Ff),this.nodes.forEach(jf),pc.addProjectionMetrics&&pc.addProjectionMetrics(bf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new $h)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Bl),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Ec.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(mc(r),e(i-t))};return fc.read(r,!0),()=>mc(r)}(r,250),Ih.hasAnimatedSinceResize&&(Ih.hasAnimatedSinceResize=!1,this.nodes.forEach(Lf))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||zf,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!gf(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Gl(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Lf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,mc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(If),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Cf(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Df);this.isUpdating||this.nodes.forEach(Nf),this.isUpdating=!1,this.nodes.forEach(kf),this.nodes.forEach(Tf),this.nodes.forEach(Of),this.clearAllSnapshots();const e=Ec.now();gc.delta=su(0,1e3/60,e-gc.timestamp),gc.timestamp=e,gc.isProcessing=!0,vc.update.process(gc),vc.preRender.process(gc),vc.render.process(gc),gc.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Rf),this.sharedNodes.forEach(Bf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,fc.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){fc.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||$p(this.snapshot.measuredBox.x)||$p(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!hf(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||rh(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Kf((r=n).x),Kf(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(Yf)){const{scroll:e}=this.root;e&&(ph(n.x,e.offset.x),ph(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(of(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const r=this.path[t],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&of(n,e),ph(n.x,o.offset.x),ph(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};of(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&fh(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),rh(r.latestValues)&&fh(n,r.latestValues)}return rh(this.latestValues)&&fh(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};of(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!rh(n.latestValues))continue;nh(n.latestValues)&&n.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};of(r,n.measurePageBox()),df(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return rh(this.latestValues)&&df(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==gc.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=gc.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Jp(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),of(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var a,s,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,qp(a.x,s.x,l.x),qp(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):of(this.target,this.layout.layoutBox),ch(this.target,this.targetDelta)):of(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Jp(this.relativeTargetOrigin,this.target,e.target),of(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}pc.value&&bf.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!nh(this.parent.latestValues)&&!oh(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===gc.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;of(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&fh(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,ch(e,a)),r&&rh(i.latestValues)&&fh(e,i.latestValues))}t.x<dh&&t.x>uh&&(t.x=1),t.y<dh&&t.y>uh&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(af(this.prevProjectionDelta.x,this.projectionDelta.x),af(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Xp(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===a&&this.treeScale.y===s&&yf(this.projectionDelta.x,this.prevProjectionDelta.x)&&yf(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),pc.value&&bf.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(Wf));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;_f(i.x,e.x,n),_f(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jp(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Zf(e.x,t.x,n.x,r),Zf(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&function(e,t){return ff(e.x,t.x)&&ff(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),of(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=Dd(0,void 0!==n.opacity?n.opacity:1,ef(r)),e.opacityExit=Dd(void 0!==t.opacity?t.opacity:1,0,tf(r))):i&&(e.opacity=Dd(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<qh;o++){const i=`border${Xh[o]}Radius`;let a=Qh(t,i),s=Qh(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Jh(a)===Jh(s)?(e[i]=Math.max(Dd(Gh(a),Gh(s),r),0),(wu.test(s)||wu.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Dd(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(mc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=fc.update((()=>{Ih.hasAnimatedSinceResize=!0,Lc.layout++,this.currentAnimation=function(e,t,n){const r=Uc(0)?0:Ic(0);return r.start(Sp("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Lc.layout--},onComplete:()=>{Lc.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&$f(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=$p(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=$p(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}of(t,n),fh(t,o),Xp(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new xf),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Sf("z",e,r,this.animationValues);for(let t=0;t<wf.length;t++)Sf(`rotate${wf[t]}`,e,r,this.animationValues),Sf(`skew${wf[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Ef;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Yh(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Yh(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!rh(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(null==n?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const e in Wh){if(void 0===a[e])continue;const{correct:t,applyTo:n,isCSSVariable:o}=Wh[e],s="none"===r.transform?a[e]:t(a[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=s}else o?this.options.visualElement.renderState.vars[e]=s:r[e]=s}return this.options.layoutId&&(r.pointerEvents=i===this?Yh(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Df),this.root.sharedNodes.clear()}}}function Tf(e){e.updateLayout()}function Of(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?eh((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=$p(r);r.min=t[e].min,r.max=r.min+o})):$f(o,n.layoutBox,t)&&eh((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=$p(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Xp(a,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?Xp(s,e.applyTransform(r,!0),n.measuredBox):Xp(s,t,n.layoutBox);const l=!hf(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a={x:{min:0,max:0},y:{min:0,max:0}};Jp(a,n.layoutBox,o.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};Jp(s,t,i.layoutBox),gf(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Mf(e){pc.value&&bf.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function jf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Rf(e){e.clearSnapshot()}function Df(e){e.clearMeasurements()}function Nf(e){e.isLayoutDirty=!1}function kf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Lf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Vf(e){e.resolveTargetDelta()}function Ff(e){e.calcProjection()}function If(e){e.resetSkewAndRotation()}function Bf(e){e.removeLeadSnapshot()}function _f(e,t,n){e.translate=Dd(t.translate,0,n),e.scale=Dd(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Zf(e,t,n,r){e.min=Dd(t.min,n.min,r),e.max=Dd(t.max,n.max,r)}function Wf(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const zf={duration:.45,ease:[.4,0,.1,1]},Uf=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Hf=Uf("applewebkit/")&&!Uf("chrome/")?Math.round:kl;function Kf(e){e.min=Hf(e.min),e.max=Hf(e.max)}function $f(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=vf(t),o=vf(n),!(Math.abs(r-o)<=.2));var r,o}function Yf(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Xf=Af({attachResizeListener:(e,t)=>zp(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),qf={current:void 0},Gf=Af({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qf.current){const e=new Xf({});e.mount(window),e.setOptions({layoutScroll:!0}),qf.current=e}return qf.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Jf={pan:{Feature:class extends _p{constructor(){super(...arguments),this.removePointerDownListener=kl}onPointerDown(e){this.session=new xh(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:gh(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:kh(e),onStart:kh(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&fc.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Hp(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends _p{constructor(e){super(e),this.removeGroupControls=kl,this.removeListeners=kl,this.controls=new Dh(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||kl}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Gf,MeasureLayout:Uh}};function Qf(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&fc.postRender((()=>o(t,Up(t))))}function em(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&fc.postRender((()=>o(t,Up(t))))}const tm=new WeakMap,nm=new WeakMap,rm=e=>{const t=tm.get(e.target);t&&t(e)},om=e=>{e.forEach(rm)};const im={some:0,all:1},am={inView:{Feature:class extends _p{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:im[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;nm.has(n)||nm.set(n,{});const r=nm.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(om,{root:e,...t})),r[o]}(t);return tm.set(e,n),r.observe(e),()=>{tm.delete(e),r.unobserve(e)}}(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends _p{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=Cc(e,n),a=e=>{const n=e.currentTarget;if(!n||!kc(e)||Rc.has(n))return;Rc.add(n),Tc(e,"set");const r=t(n,e),i=(e,t)=>{n.removeEventListener("pointerup",a),n.removeEventListener("pointercancel",s),Tc(e,"release"),kc(e)&&Rc.has(n)&&(Rc.delete(n),"function"==typeof r&&r(e,{success:t}))},a=e=>{const t=!!e.isTrusted&&(r=e,o=n instanceof Element?n.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight},r.clientX<o.left||r.clientX>o.right||r.clientY<o.top||r.clientY>o.bottom);var r,o;i(e,!t&&(!(n instanceof Element)||Oc(n,e.target)))},s=e=>{i(e,!1)};n.addEventListener("pointerup",a,o),n.addEventListener("pointercancel",s,o),n.addEventListener("lostpointercapture",s,o)};return r.forEach((e=>{let t=!1;var r;(e=n.useGlobalTarget?window:e)instanceof HTMLElement&&(t=!0,r=e,jc.has(r.tagName)||-1!==r.tabIndex||null!==e.getAttribute("tabindex")||(e.tabIndex=0)),e.addEventListener("pointerdown",a,o),t&&e.addEventListener("focus",(e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Dc((()=>{if(Rc.has(n))return;Nc(n,"down");const e=Dc((()=>{Nc(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>Nc(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)})(e,o)),o)})),i}(e,((e,t)=>(em(this.node,t,"Start"),(e,{success:t})=>em(this.node,e,t?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends _p{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_d(zp(this.node.current,"focus",(()=>this.onFocus())),zp(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends _p{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=Cc(e,n),a=e=>{if(!Ac(e))return;const{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;const i=e=>{Ac(e)&&(r(e),n.removeEventListener("pointerleave",i))};n.addEventListener("pointerleave",i,o)};return r.forEach((e=>{e.addEventListener("pointerenter",a,o)})),i}(e,((e,t)=>(Qf(this.node,t,"Start"),e=>Qf(this.node,e,"End")))))}unmount(){}}}},sm={layout:{ProjectionNode:Gf,MeasureLayout:Uh}},lm=(0,e.createContext)({strict:!1}),cm=(0,e.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),um=(0,e.createContext)({});function dm(e){return Ul(e.animate)||Dp.some((t=>jp(e[t])))}function pm(e){return Boolean(dm(e)||e.variants)}function hm(e){return Array.isArray(e)?e.join(" "):e}const fm="undefined"!=typeof window,mm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},gm={};for(const e in mm)gm[e]={isEnabled:t=>mm[e].some((e=>!!t[e]))};const vm=Symbol.for("motionComponentSymbol");function ym(t,n,r){return(0,e.useCallback)((e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),r&&("function"==typeof r?r(e):vh(r)&&(r.current=e))}),[n])}const xm=fm?e.useLayoutEffect:e.useEffect;function bm(t,n,r,o,i){var a,s;const{visualElement:l}=(0,e.useContext)(um),c=(0,e.useContext)(lm),u=(0,e.useContext)(Lh),d=(0,e.useContext)(cm).reducedMotion,p=(0,e.useRef)(null);o=o||c.renderer,!p.current&&o&&(p.current=o(t,{visualState:n,parent:l,props:r,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const h=p.current,f=(0,e.useContext)(Fh);!h||h.projection||!i||"html"!==h.type&&"svg"!==h.type||function(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:wm(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(a)||s&&vh(s),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(p.current,r,i,f);const m=(0,e.useRef)(!1);(0,e.useInsertionEffect)((()=>{h&&m.current&&h.update(r,u)}));const g=r[$c],v=(0,e.useRef)(Boolean(g)&&!(null===(a=window.MotionHandoffIsComplete)||void 0===a?void 0:a.call(window,g))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,g)));return xm((()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),yc.render(h.render),v.current&&h.animationState&&h.animationState.animateChanges())})),(0,e.useEffect)((()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&(queueMicrotask((()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,g)})),v.current=!1))})),h}function wm(e){if(e)return!1!==e.options.allowProjection?e.projection:wm(e.parent)}function Em({preloadedFeatures:t,createVisualElement:n,useRender:r,useVisualState:o,Component:i}){var a,s;function l(t,a){let s;const l={...(0,e.useContext)(cm),...t,layoutId:Pm(t)},{isStatic:c}=l,u=function(t){const{initial:n,animate:r}=function(e,t){if(dm(e)){const{initial:t,animate:n}=e;return{initial:!1===t||jp(t)?t:void 0,animate:jp(n)?n:void 0}}return!1!==e.inherit?t:{}}(t,(0,e.useContext)(um));return(0,e.useMemo)((()=>({initial:n,animate:r})),[hm(n),hm(r)])}(t),d=o(t,c);if(!c&&fm){(0,e.useContext)(lm).strict;const t=function(e){const{drag:t,layout:n}=gm;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(l);s=t.MeasureLayout,u.visualElement=bm(i,d,l,n,t.ProjectionNode)}return(0,Nt.jsxs)(um.Provider,{value:u,children:[s&&u.visualElement?(0,Nt.jsx)(s,{visualElement:u.visualElement,...l}):null,r(i,t,ym(d,u.visualElement,a),d,c,u.visualElement)]})}t&&function(e){for(const t in e)gm[t]={...gm[t],...e[t]}}(t),l.displayName=`motion.${"string"==typeof i?i:`create(${null!==(s=null!==(a=i.displayName)&&void 0!==a?a:i.name)&&void 0!==s?s:""})`}`;const c=(0,e.forwardRef)(l);return c[vm]=i,c}function Pm({layoutId:t}){const n=(0,e.useContext)(Vh).id;return n&&void 0!==t?n+"-"+t:t}function Sm(e,{layout:t,layoutId:n}){return _c.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Wh[e]||"opacity"===e)}const Cm=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Am={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Tm=Bc.length;function Om(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const e in t){const n=t[e];if(_c.has(e))a=!0;else if(vd(e))o[e]=n;else{const t=Cm(n,Uu[e]);e.startsWith("origin")?(s=!0,i[e]=t):r[e]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<Tm;i++){const a=Bc[i],s=e[a];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!l||n){const e=Cm(s,Uu[a]);l||(o=!1,r+=`${Am[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}function Mm(e,t,n){for(const r in t)Uc(t[r])||Sm(r,n)||(e[r]=t[r])}function jm(t,n){const r={},o=function(t,n){const r={};return Mm(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n){return(0,e.useMemo)((()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Om(e,n,t),Object.assign({},e.vars,e.style)}),[n])}(t,n)),r}(t,n);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=o,r}const Rm=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Dm(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Rm.has(e)}let Nm=e=>!Dm(e);try{(km=require("@emotion/is-prop-valid").default)&&(Nm=e=>e.startsWith("on")?!Dm(e):km(e))}catch(e){}var km;const Lm=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Vm(e){return"string"==typeof e&&!e.includes("-")&&!!(Lm.indexOf(e)>-1||/[A-Z]/u.test(e))}const Fm={offset:"stroke-dashoffset",array:"stroke-dasharray"},Im={offset:"strokeDashoffset",array:"strokeDasharray"};function Bm(e,t,n){return"string"==typeof e?e:Eu.transform(t+n*e)}function _m(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Om(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:f}=e;p.transform&&(f&&(h.transform=p.transform),delete p.transform),f&&(void 0!==o||void 0!==i||h.transform)&&(h.transformOrigin=function(e,t,n){return`${Bm(t,e.x,e.width)} ${Bm(n,e.y,e.height)}`}(f,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(p.x=t),void 0!==n&&(p.y=n),void 0!==r&&(p.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Fm:Im;e[i.offset]=Eu.transform(-r);const a=Eu.transform(t),s=Eu.transform(n);e[i.array]=`${a} ${s}`}(p,a,s,l,!1)}const Zm=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Wm(t,n,r,o){const i=(0,e.useMemo)((()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return _m(e,n,Zm(o),t.transformTemplate),{...e.attrs,style:{...e.style}}}),[n]);if(t.style){const e={};Mm(e,t.style,t),i.style={...e,...i.style}}return i}function zm(t=!1){return(n,r,o,{latestValues:i},a)=>{const s=(Vm(n)?Wm:jm)(r,i,a,n),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(Nm(o)||!0===n&&Dm(o)||!t&&!Dm(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(r,"string"==typeof n,t),c=n!==e.Fragment?{...l,...s,ref:o}:{},{children:u}=r,d=(0,e.useMemo)((()=>Uc(u)?u.get():u),[u]);return(0,e.createElement)(n,{...c,children:d})}}const Um=t=>(n,r)=>{const o=(0,e.useContext)(um),i=(0,e.useContext)(Lh),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:Hm(r,o,i,e),renderState:t()};return n&&(a.onMount=e=>n({props:r,current:e,...a}),a.onUpdate=e=>n(e)),a}(t,n,o,i);return r?a():function(t){const n=(0,e.useRef)(null);return null===n.current&&(n.current=t()),n.current}(a)};function Hm(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Yh(i[e]);let{initial:a,animate:s}=e;const l=dm(e),c=pm(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!Ul(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Kl(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}function Km(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Uc(o[a])||t.style&&Uc(t.style[a])||Sm(a,e)||void 0!==(null===(r=null==n?void 0:n.getValue(a))||void 0===r?void 0:r.liveStyle))&&(i[a]=o[a]);return i}const $m={useVisualState:Um({scrapeMotionValuesFromProps:Km,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function Ym(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(e){t.dimensions={x:0,y:0,width:0,height:0}}}function Xm(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const qm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Gm(e,t,n,r){Xm(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(qm.has(n)?n:Kc(n),t.attrs[n])}function Jm(e,t,n){const r=Km(e,t,n);for(const n in e)(Uc(e[n])||Uc(t[n]))&&(r[-1!==Bc.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}const Qm=["x","y","width","height","cx","cy","r"],eg={useVisualState:Um({scrapeMotionValuesFromProps:Jm,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i)for(const e in o)if(_c.has(e)){i=!0;break}if(!i)return;let a=!t;if(t)for(let n=0;n<Qm.length;n++){const r=Qm[n];e[r]!==t[r]&&(a=!0)}a&&fc.read((()=>{Ym(n,r),fc.render((()=>{_m(r,o,Zm(n.tagName),e.transformTemplate),Gm(n,r)}))}))}})};function tg(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return Em({...Vm(n)?eg:$m,preloadedFeatures:e,useRender:zm(r),createVisualElement:t,Component:n})}}const ng={current:null},rg={current:!1},og=[...Sd,Tu,Vu],ig=new WeakMap,ag=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class sg{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=Ec.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,fc.render(this.render,!1,!0))};const{latestValues:s,renderState:l,onUpdate:c}=i;this.onUpdate=c,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=dm(t),this.isVariantNode=pm(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==s[e]&&Uc(t)&&t.set(s[e],!1)}}mount(e){this.current=e,ig.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),rg.current||function(){if(rg.current=!0,fm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ng.current=e.matches;e.addListener(t),t()}else ng.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ng.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),mc(this.notifyUpdate),mc(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=_c.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&fc.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),o(),i&&i(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in gm){const t=gm[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ag.length;t++){const n=ag[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Uc(o))e.addValue(r,o);else if(Uc(i))e.addValue(r,Ic(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,Ic(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Ic(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var o;return null!=r&&("string"==typeof r&&(md(r)||au(r))?r=parseFloat(r):(o=r,!og.find(Pd(o))&&Vu.test(t)&&(r=$u(e,t))),this.setBaseTarget(e,Uc(r)?r.get():r)),Uc(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=Kl(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Uc(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Bl),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class lg extends sg{constructor(){super(...arguments),this.KeyframeResolver=Ad}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Uc(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class cg extends lg{constructor(){super(...arguments),this.type="html",this.renderInstance=Xm}readValueFromInstance(e,t){if(_c.has(t))return((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return rd(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),o=(vd(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return mh(e,t)}build(e,t,n){Om(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Km(e,t,n)}}class ug extends lg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Qp,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Ym(this.current,this.renderState)}}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(_c.has(t)){const e=Ku(t);return e&&e.default||0}return t=qm.has(t)?t:Kc(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Jm(e,t,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&fc.postRender(this.updateDimensions)}build(e,t,n){_m(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Gm(e,t,0,r)}mount(e){this.isSVGTag=Zm(e.tagName),super.mount(e)}}const dg=(t,n)=>Vm(t)?new ug(n):new cg(n,{allowProjection:t!==e.Fragment}),pg=zl(tg({...Wp,...am,...Jf,...sm},dg));var hg={type:"spring",stiffness:700,damping:30};const fg=function(e){var t=e.on,r=e.onChange,o=e.disabled,i=e.label;return n().createElement("button",{className:"flex flex-row items-center cursor-pointer select-none border-none bg-transparent",disabled:o,onClick:function(){return null==r?void 0:r(!t)},"aria-label":i},n().createElement("div",{className:"w-[35px] h-[20px] flex flex-row items-center p-[5px] rounded-[50px] transition-colors duration-200 ".concat(t?"bg-primary-500 justify-end":"bg-gray-200 justify-start")},n().createElement(pg.div,{className:"w-[10px] h-[10px] rounded-full ".concat(t?"bg-white":"bg-gray-500"),transition:hg})))},mg=function(e){var t=e.color,r=e.children,o=e.onClick,i=e.iconLeft,a=e.iconRight;return n().createElement("button",{onClick:function(){return null==o?void 0:o()},className:"".concat("rounded-inner px-4 py-2 flex items-center justify-between border-0 cursor-pointer transition-all duration-300 ease-in-out font-medium"," ").concat({primary:"text-primary-900 bg-white hover:bg-gray-200",secondary:"text-secondary-800 bg-secondary-100 hover:text-white hover:bg-secondary-800",white:"text-primary-900 bg-white hover:bg-gray-200"}[t])},i&&n().createElement("span",{className:"flex items-center justify-center mr-2"},i),r,a&&n().createElement("span",{className:"flex items-center justify-center ml-2"},a))};var[gg,vg]=kt("Tooltip",[Ur]),yg=Ur(),xg="TooltipProvider",bg=700,wg="tooltip.open",[Eg,Pg]=gg(xg),Sg=t=>{const{__scopeTooltip:n,delayDuration:r=bg,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:a}=t,[s,l]=e.useState(!0),c=e.useRef(!1),u=e.useRef(0);return e.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),(0,Nt.jsx)(Eg,{scope:n,isOpenDelayed:s,delayDuration:r,onOpen:e.useCallback((()=>{window.clearTimeout(u.current),l(!1)}),[]),onClose:e.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),o)}),[o]),isPointerInTransitRef:c,onPointerInTransitChange:e.useCallback((e=>{c.current=e}),[]),disableHoverableContent:i,children:a})};Sg.displayName=xg;var Cg="Tooltip",[Ag,Tg]=gg(Cg),Og=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:i=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=t,c=Pg(Cg,t.__scopeTooltip),u=yg(n),[d,p]=e.useState(null),h=pn(),f=e.useRef(0),m=s??c.disableHoverableContent,g=l??c.delayDuration,v=e.useRef(!1),[y=!1,x]=fo({prop:o,defaultProp:i,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(wg))):c.onClose(),a?.(e)}}),b=e.useMemo((()=>y?v.current?"delayed-open":"instant-open":"closed"),[y]),w=e.useCallback((()=>{window.clearTimeout(f.current),f.current=0,v.current=!1,x(!0)}),[x]),E=e.useCallback((()=>{window.clearTimeout(f.current),f.current=0,x(!1)}),[x]),P=e.useCallback((()=>{window.clearTimeout(f.current),f.current=window.setTimeout((()=>{v.current=!0,x(!0),f.current=0}),g)}),[g,x]);return e.useEffect((()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)}),[]),(0,Nt.jsx)(ao,{...u,children:(0,Nt.jsx)(Ag,{scope:n,contentId:h,open:y,stateAttribute:b,trigger:d,onTriggerChange:p,onTriggerEnter:e.useCallback((()=>{c.isOpenDelayed?P():w()}),[c.isOpenDelayed,P,w]),onTriggerLeave:e.useCallback((()=>{m?E():(window.clearTimeout(f.current),f.current=0)}),[E,m]),onOpen:w,onClose:E,disableHoverableContent:m,children:r})})};Og.displayName=Cg;var Mg="TooltipTrigger",jg=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,...o}=t,i=Tg(Mg,r),a=Pg(Mg,r),s=yg(r),l=Dt(n,e.useRef(null),i.onTriggerChange),c=e.useRef(!1),u=e.useRef(!1),d=e.useCallback((()=>c.current=!1),[]);return e.useEffect((()=>()=>document.removeEventListener("pointerup",d)),[d]),(0,Nt.jsx)(so,{asChild:!0,...s,children:(0,Nt.jsx)(Zt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:l,onPointerMove:Mt(t.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||a.isPointerInTransitRef.current||(i.onTriggerEnter(),u.current=!0))})),onPointerLeave:Mt(t.onPointerLeave,(()=>{i.onTriggerLeave(),u.current=!1})),onPointerDown:Mt(t.onPointerDown,(()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})})),onFocus:Mt(t.onFocus,(()=>{c.current||i.onOpen()})),onBlur:Mt(t.onBlur,i.onClose),onClick:Mt(t.onClick,i.onClose)})})}));jg.displayName=Mg;var Rg="TooltipPortal",[Dg,Ng]=gg(Rg,{forceMount:void 0}),kg="TooltipContent",Lg=e.forwardRef(((e,t)=>{const n=Ng(kg,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Tg(kg,e.__scopeTooltip);return(0,Nt.jsx)(po,{present:r||a.open,children:a.disableHoverableContent?(0,Nt.jsx)(Bg,{side:o,...i,ref:t}):(0,Nt.jsx)(Vg,{side:o,...i,ref:t})})})),Vg=e.forwardRef(((t,n)=>{const r=Tg(kg,t.__scopeTooltip),o=Pg(kg,t.__scopeTooltip),i=e.useRef(null),a=Dt(n,i),[s,l]=e.useState(null),{trigger:c,onClose:u}=r,d=i.current,{onPointerInTransitChange:p}=o,h=e.useCallback((()=>{l(null),p(!1)}),[p]),f=e.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...o,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);l(i),p(!0)}),[p]);return e.useEffect((()=>()=>h()),[h]),e.useEffect((()=>{if(c&&d){const e=e=>f(e,d),t=e=>f(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[c,d,f,h]),e.useEffect((()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||d?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-a)*(r-s)/(c-s)+a&&(o=!o)}return o}(n,s);r?h():o&&(h(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,d,s,u,h]),(0,Nt.jsx)(Bg,{...t,ref:a})})),[Fg,Ig]=gg(Cg,{isInside:!1}),Bg=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,children:o,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=t,c=Tg(kg,r),u=yg(r),{onClose:d}=c;return e.useEffect((()=>(document.addEventListener(wg,d),()=>document.removeEventListener(wg,d))),[d]),e.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;t?.contains(c.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,d]),(0,Nt.jsx)(Kt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,Nt.jsxs)(lo,{"data-state":c.stateAttribute,...u,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,Nt.jsx)(Bt,{children:o}),(0,Nt.jsx)(Fg,{scope:r,isInside:!0,children:(0,Nt.jsx)(Xi,{id:c.contentId,role:"tooltip",children:i||o})})]})})}));Lg.displayName=kg;var _g="TooltipArrow";e.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=yg(n);return Ig(_g,n).isInside?null:(0,Nt.jsx)(co,{...o,...r,ref:t})})).displayName=_g;var Zg=Lg,Wg=function(){return Wg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Wg.apply(this,arguments)},zg=Sg,Ug=Og,Hg=jg,Kg=e.forwardRef((function(t,n){var r=t.className,o=t.sideOffset,i=void 0===o?4:o,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["className","sideOffset"]);return e.createElement(Zg,Wg({ref:n,sideOffset:i,className:Se("z-50 overflow-hidden rounded-inner bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",r)},a))}));Kg.displayName=Zg.displayName})(),s})()));
3
3
  //# sourceMappingURL=index.js.map