PageSourceSearch

https://mini-store-kappa.vercel.app/_next/static/chunks/24i_xpnxumyp0.js?dpl=dpl_99suGz5hzmgWzgXyhqwwTErTrDQk

js mini-store-kappa.vercel.app collected 2026-10-03 07:19:29 UTC 390,625 bytes, 16 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let a=e.r(90809)._(e.r(98183)),o=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==u?(u="//"+(u||""),i&&"/"!==i[0]&&(i="/"+i)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${i}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(18967),i=e.r(52817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return v},useLinkStatus:function(){return x}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let a=e.r(90809),o=e.r(43476),s=a._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550);e.r(33525);let h=e.r(88540),p=e.r(93945),m=e.r(73668),g=e.r(9396);function v(t){var r,n;let i,a,v,[x,b]=(0,s.useOptimistic)(p.IDLE_LINK_STATUS),w=(0,s.useRef)(null),{href:C,as:S,children:E,prefetch:k=null,passHref:A,replace:T,shallow:j,scroll:P,onClick:N,onMouseEnter:R,onTouchStart:M,legacyBehavior:D=!1,onNavigate:I,transitionTypes:L,ref:O,unstable_dynamicOnHover:F,...B}=t;i=E,D&&("string"==typeof i||"number"==typeof i)&&(i=(0,o.jsx)("a",{children:i}));let V=s.default.useContext(u.AppRouterContext),z=!1!==k,$=!1!==k?null===(n=k)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,U="string"==typeof(r=S||C)?r:(0,l.formatUrl)(r);if(D){if(i?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=s.default.Children.only(i)}let _=D?a&&"object"==typeof a&&a.ref:O,H=s.default.useCallback(e=>(null!==V&&(w.current=(0,p.mountLinkInstance)(e,U,V,$,z,b)),()=>{w.current&&((0,p.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,p.unmountPrefetchableInstance)(e)}),[z,U,V,$,b]),W={ref:(0,c.useMergedRef)(H,_),onClick(t){D||"function"!=typeof N||N(t),D&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!V||t.defaultPrevented||function(t,r,n,i,a,o,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);s.default.startTransition(()=>{d(r,i?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l)})}}(t,U,w,T,P,I,L)},onMouseEnter(e){D||"function"!=typeof R||R(e),D&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),V&&z&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)},onTouchStart:function(e){D||"function"!=typeof M||M(e),D&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),V&&z&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)}};return(0,d.isAbsoluteUrl)(U)?W.href=U:D&&!A&&("a"!==a.type||"href"in a.props)||(W.href=(0,f.addBasePath)(U)),v=D?s.default.cloneElement(a,W):(0,o.jsx)("a",{...B,...W,children:i}),(0,o.jsx)(y.Provider,{value:x,children:v})}e.r(84508);let y=(0,s.createContext)(p.IDLE_LINK_STATUS),x=()=>(0,s.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esMo
1dule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},94908,e=>{"use strict";let t=(0,e.i(75254).default)("compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Compass",0,t],94908)},55436,e=>{"use strict";let t=(0,e.i(75254).default)("search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);e.s(["Search",0,t],55436)},73375,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],73375)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,t],37727)},71689,72520,e=>{"use strict";var t=e.i(75254);let r=(0,t.default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,r],71689);let n=(0,t.default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,n],72520)},78917,e=>{"use strict";let t=(0,e.i(75254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],78917)},7233,76838,97625,e=>{"use strict";var t=e.i(75254);let r=(0,t.default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,r],7233);let n=(0,t.default)("badge-check",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["BadgeCheck",0,n],76838);let i=(0,t.default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",0,i],97625)},73264,e=>{"use strict";let t=(0,e.i(75254).default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);e.s(["LayoutGrid",0,t],73264)},46932,21476,64978,31178,37806,74008,47414,96097,22875,e=>{"use strict";let t,r;function n(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function i(e){let t=[{},{}];return e?.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function a(e,t,r,n){if("function"==typeof t){let[a,o]=i(n);t=t(void 0!==r?r:e.custom,a,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[a,o]=i(n);t=t(void 0!==r?r:e.custom,a,o)}return t}function o(e,t,r){let n=e.getProps();return a(n,t,void 0!==r?r:n.custom,e)}function s(e,t){return e?.[t]??e?.default??e}e.i(47167);let l=e=>e,u={},c=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function d(e,t){let r=!1,n=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=c.reduce((e,r)=>(e[r]=function(e,t){let r=new Set,n=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function u(t){o.has(t)&&(c.schedule(t),e()),l++,t(s)}let c={schedule:(e,t=!1,a=!1)=>{let s=a&&i?r:n;return t&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0,[r,n]=[n,r],r.forEach(u),t,l=0,r.clear(),i=!1,a&&(a=!1,c.process(e))}};return c}(a,t?r:void 0),e),{}),{setup:s,read:l,resolveKeyframes:d,preUpdate:f,update:h,preRender:p,render:m,postRender:g}=o,v=()=>{let a=u.useManualTiming?i.timestamp:performance.now();r=!1,u.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),l.process(i),d.process(i),f.process(i),h.process(i),p.process(i),m.process(i),g.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(v))};return{schedule:c.reduce((t,a)=>{let s=o[a];return t[a]=(t,a=!1,o=!1)=>(!r&&(r=!0,n=!0,i.isProcessing||e(v)),s.schedule(t,a,o)),t},{}),cancel:e=>{for(let t=0;t<c.length;t++)o[c[t]].cancel(e)},state:i,steps:o}}let{schedule:f,cancel:h,state:p,steps:m}=d("u">typeof requestAnimationFrame?requestAnimationFrame:l,!0),g=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],v=new Set(g),y=new Set(["width","height","top","left","right","bottom",...g]);function x(e,t){-1===e.indexOf(t)&&e.push(t)}function b(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}class w{constructor(){this.subscriptions=[]}add(e){return x(this.subscriptions,e),()=>b(this.subscriptions,e)}notify(e,t,r){let n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,r);else for(let i=0;i<n;i++){let n=this.subscriptions[i];n&&n(e,t,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function C(){t=void 0}let S={now:()=>(void 0===t&&S.set(p.isProcessing||u.useManualTiming?p.timestamp:performance.now()),t),set:e=>{t=e,queueMicrotask(C)}},E;class k{constructor(e,t={}){this.version="12.9.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let r=S.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change?.notify(this.current),t&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=S.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}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 w);let r=this.events[e].add(t);return"change"===e?()=>{r(),f.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let 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,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}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 E&&E.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=S.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),r?1e3/r*e:0}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.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function A(e,t){return new k(e,t)}let T=e=>Array.isArray(e),j=e=>!!(e&&e.getVelocity);function P(e,t){let r=e.getValue("willChange");if(j(r)&&r.add)return r.add(t);if(!r&&u.WillChange){let r=new u.WillChange("auto");e.addValue("willChange",r),r.add(t)}}let N=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),R="data-"+N("framerAppearId"),M=(e,t)=>r=>
1t(e(r)),D=(...e)=>e.reduce(M),I=(e,t,r)=>r>t?t:r<e?e:r,L=e=>1e3*e,O={layout:0,mainThread:0,waapi:0},F=()=>{},B=()=>{},V=e=>t=>"string"==typeof t&&t.startsWith(e),z=V("--"),$=V("var(--"),U=e=>!!$(e)&&_.test(e.split("/*")[0].trim()),_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,H={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},W={...H,transform:e=>I(0,1,e)},G={...H,default:1},q=e=>Math.round(1e5*e)/1e5,K=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,X=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Y=(e,t)=>r=>!!("string"==typeof r&&X.test(r)&&r.startsWith(e)||t&&null!=r&&Object.prototype.hasOwnProperty.call(r,t)),Z=(e,t,r)=>n=>{if("string"!=typeof n)return n;let[i,a,o,s]=n.match(K);return{[e]:parseFloat(i),[t]:parseFloat(a),[r]:parseFloat(o),alpha:void 0!==s?parseFloat(s):1}},J={...H,transform:e=>Math.round(I(0,255,e))},Q={test:Y("rgb","red"),parse:Z("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+J.transform(e)+", "+J.transform(t)+", "+J.transform(r)+", "+q(W.transform(n))+")"},ee={test:Y("#"),parse:function(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:Q.transform},et=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),er=et("deg"),en=et("%"),ei=et("px"),ea=et("vh"),eo=et("vw"),es={...en,parse:e=>en.parse(e)/100,transform:e=>en.transform(100*e)},el={test:Y("hsl","hue"),parse:Z("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+en.transform(q(t))+", "+en.transform(q(r))+", "+q(W.transform(n))+")"},eu={test:e=>Q.test(e)||ee.test(e)||el.test(e),parse:e=>Q.test(e)?Q.parse(e):el.test(e)?el.parse(e):ee.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Q.transform(e):el.transform(e)},ec=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,ed="number",ef="color",eh=/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 ep(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[],a=0,o=t.replace(eh,e=>(eu.test(e)?(n.color.push(a),i.push(ef),r.push(eu.parse(e))):e.startsWith("var(")?(n.var.push(a),i.push("var"),r.push(e)):(n.number.push(a),i.push(ed),r.push(parseFloat(e))),++a,"${}")).split("${}");return{values:r,split:o,indexes:n,types:i}}function em(e){return ep(e).values}function eg(e){let{split:t,types:r}=ep(e),n=t.length;return e=>{let i="";for(let a=0;a<n;a++)if(i+=t[a],void 0!==e[a]){let t=r[a];t===ed?i+=q(e[a]):t===ef?i+=eu.transform(e[a]):i+=e[a]}return i}}let ev=e=>"number"==typeof e?0:e,ey={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(K)?.length||0)+(e.match(ec)?.length||0)>0},parse:em,createTransformer:eg,getAnimatableNone:function(e){let t=em(e);return eg(e)(t.map(ev))}};function ex(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function eb(e,t){return r=>r>0?t:e}let ew=(e,t,r)=>e+(t-e)*r,eC=(e,t,r)=>{let n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},eS=[ee,Q,el];function eE(e){let t=eS.find(t=>t.test(e));if(F(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let r=t.parse(e);return t===el&&(r=function({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,r/=100;let i=0,a=0,o=0;if(t/=100){let n=r<.5?r*(1+t):r+t-r*t,s=2*r-n;i=ex(s,n,e+1/3),a=ex(s,n,e),o=ex(s,n,e-1/3)}else i=a=o=r;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*o),alpha:n}}(r)),r}let ek=(e,t)=>{let r=eE(e),n=eE(t);if(!r||!n)return eb(e,t);let i={...r};return e=>(i.red=eC(r.red,n.red,e),i.green=eC(r.green,n.green,e),i.blue=eC(r.blue,n.blue,e),i.alpha=ew(r.alpha,n.alpha,e),Q.transform(i))},eA=new Set(["none","hidden"]);function eT(e,t){return r=>ew(e,t,r)}function ej(e){return"number"==typeof e?eT:"string"==typeof e?U(e)?eb:eu.test(e)?ek:eR:Array.isArray(e)?eP:"object"==typeof e?eu.test(e)?ek:eN:eb}function eP(e,t){let r=[...e],n=r.length,i=e.map((e,r)=>ej(e)(e,t[r]));return e=>{for(let t=0;t<n;t++)r[t]=i[t](e);return r}}function eN(e,t){let r={...e,...t},n={};for(let i in r)void 0!==e[i]&&void 0!==t[i]&&(n[i]=ej(e[i])(e[i],t[i]));return e=>{for(let t in n)r[t]=n[t](e);return r}}let eR=(e,t)=>{let r=ey.createTransformer(t),n=ep(e),i=ep(t);
1if(!(n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length))return F(!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.`),eb(e,t);if(eA.has(e)&&!i.values.length||eA.has(t)&&!n.values.length)return eA.has(e)?r=>r<=0?e:t:r=>r>=1?t:e;return D(eP(function(e,t){let r=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][n[a]],s=e.values[o]??0;r[i]=s,n[a]++}return r}(n,i),i.values),r)};function eM(e,t,r){return"number"==typeof e&&"number"==typeof t&&"number"==typeof r?ew(e,t,r):ej(e)(e,t)}let eD=e=>{let t=({timestamp:t})=>e(t);return{start:()=>f.update(t,!0),stop:()=>h(t),now:()=>p.isProcessing?p.timestamp:S.now()}},eI=(e,t,r=10)=>{let n="",i=Math.max(Math.round(t/r),2);for(let t=0;t<i;t++)n+=e(t/(i-1))+", ";return`linear(${n.substring(0,n.length-2)})`};function eL(e){let t=0,r=e.next(t);for(;!r.done&&t<2e4;)t+=50,r=e.next(t);return t>=2e4?1/0:t}function eO(e,t,r){var n,i;let a=Math.max(t-5,0);return n=r-e(a),(i=t-a)?1e3/i*n:0}let eF=.01,eB=2,eV=.005,ez=.5;function e$(e,t){return e*Math.sqrt(1-t*t)}let eU=["duration","bounce"],e_=["stiffness","damping","mass"];function eH(e,t){return t.some(t=>void 0!==e[t])}function eW(e=.3,t=.3){let r,n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:i,restDelta:a}=n,o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:u,damping:c,mass:d,duration:f,velocity:h,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!eH(e,e_)&&eH(e,eU))if(e.visualDuration){let r=2*Math.PI/(1.2*e.visualDuration),n=r*r,i=2*I(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:1,stiffness:n,damping:i}}else{let r=function({duration:e=800,bounce:t=.3,velocity:r=0,mass:n=1}){let i,a;F(e<=L(10),"Spring duration must be 10 seconds or less");let o=1-t;o=I(.05,1,o),e=I(.01,10,e/1e3),o<1?(i=t=>{let n=t*o,i=n*e;return .001-(n-r)/e$(t,o)*Math.exp(-i)},a=t=>{let n=t*o*e,a=Math.pow(o,2)*Math.pow(t,2)*e,s=Math.exp(-n),l=e$(Math.pow(t,2),o);return(n*r+r-a)*s*(-i(t)+.001>0?-1:1)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-r)*e+1),a=t=>e*e*(r-t)*Math.exp(-t*e));let s=function(e,t,r){let n=r;for(let r=1;r<12;r++)n-=e(n)/t(n);return n}(i,a,5/e);if(e=L(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(s,2)*n;return{stiffness:t,damping:2*o*Math.sqrt(n*t),duration:e}}}(e);(t={...t,...r,mass:1}).isResolvedFromDuration=!0}return t}({...n,velocity:-((n.velocity||0)/1e3)}),m=h||0,g=c/(2*Math.sqrt(u*d)),v=s-o,y=Math.sqrt(u/d)/1e3,x=5>Math.abs(v);if(i||(i=x?eF:eB),a||(a=x?eV:ez),g<1){let e=e$(y,g);r=t=>s-Math.exp(-g*y*t)*((m+g*y*v)/e*Math.sin(e*t)+v*Math.cos(e*t))}else if(1===g)r=e=>s-Math.exp(-y*e)*(v+(m+y*v)*e);else{let e=y*Math.sqrt(g*g-1);r=t=>{let r=Math.exp(-g*y*t),n=Math.min(e*t,300);return s-r*((m+g*y*v)*Math.sinh(n)+e*v*Math.cosh(n))/e}}let b={calculatedDuration:p&&f||null,next:e=>{let t=r(e);if(p)l.done=e>=f;else{let n=0===e?m:0;g<1&&(n=0===e?L(m):eO(r,e,t));let o=Math.abs(s-t)<=a;l.done=Math.abs(n)<=i&&o}return l.value=l.done?s:t,l},toString:()=>{let e=Math.min(eL(b),2e4),t=eI(t=>b.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return b}function eG({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:l,restDelta:u=.5,restSpeed:c}){let d,f,h=e[0],p={done:!1,value:h},m=r*t,g=h+m,v=void 0===o?g:o(g);v!==g&&(m=v-h);let y=e=>-m*Math.exp(-e/n),x=e=>v+y(e),b=e=>{let t=y(e),r=x(e);p.done=Math.abs(t)<=u,p.value=p.done?v:r},w=e=>{let t;if(t=p.value,void 0!==s&&t<s||void 0!==l&&t>l){var r;d=e,f=eW({keyframes:[p.value,(r=p.value,void 0===s?l:void 0===l||Math.abs(s-r)<Math.abs(l-r)?s:l)],velocity:eO(x,e,p.value),damping:i,stiffness:a,restDelta:u,restSpeed:c})}};return w(0),{calculatedDuration:null,next:e=>{let t=!1;return(f||void 0!==d||(t=!0,b(e),w(e)),void 0!==d&&e>=d)?f.next(e-d):(t||b(e),p)}}}eW.applyToOptions=e=>{let t=function(e,t=100,r){let n=r({...e,keyframes:[0,t]}),i=Math.min(eL(n),2e4);return{type:"keyframes",ease:e=>n.next(i*e).value/t,duration:i/1e3}}(e,100,eW);return e.ease=t.ease,e.duration=L(t.duration),e.type="keyframes",e};let eq=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e;function eK(e,t,r,n){return e===t&&r===n?l:i=>0===i||1===i?i:eq(function(e,t,r,n,i){let a,o,s=0;do(a=eq(o=t+(r-t)/2,n,i)-e)>0?r=o:t=o;while(Math.abs(a)>1e-7&&++s<12)return o}(i,0,1,e,r),t,n)}let eX=eK(.42,0,1,1),eY=eK(0,0,.58,1),eZ=eK(.42,0,.58,1),eJ=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,eQ=e=>t=>1-e(1-t),e0=eK(.33,1.53,.69,.99),e1=eQ(e0),e2=eJ(e1),e5=e=>(e*=2)<1?.5*e1(e):.5*(2-Math.pow(2,-10*(e-1))),e4=e=>1-Math.sin(Math.acos(e)),e3=eQ(e4),e6=eJ(e4),e7=e=>Array.isArray(e)&&"number"==typeof e[0],e9={linear:l,easeIn:eX,easeInOut:eZ,easeOut:eY,circIn:e4,circInOut:e6,circOut:e3,backIn:e1,backInOut:e2,backOut:e0,anticipate:e5},e8=e=>{if(e7(e)){B(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,r,n,i]=e;return eK(t,r,n,i)}return"string"==typeof e?(B(void 0!==e9[e],`Invalid easing type '${e}'`),e9[e]):e},te=(e,t,r)=>{let n=t-e;return 0===n?1:(r-e)/n};function tt({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){var i;let a,o=Array.isArray(n)&&"number"!=typeof n[0]?n.map(e8):e8(n),s={done:!1,value:t[0]},c=function(e,t,{clamp:r=!0,ease:n,mixer:i}={}){let a=e.length;if(B(a===t.length,"Both input and output ranges must be the same length"),1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=function(e,t,r){let n=[],i=r||u.mix||eM,a=e.length-1;for(let r=0;r<a;r++){let a=i(e[r],e[r+1]);t&&(a=D(Array.isArray(t)?t[r]||l:t,a)),n.push(a)}return n}(t,n,i),c=s.length,d=r=>{if(o&&r<e[0])return t[0];let n=0;if(c>1)for(;n<e.length-2&&!(r<e[n+1]);n++);let i=te(e[n],e[n+1],r);return s[n](i)};return r?t=>d(I(e[0],e[a-1],t)):d}((i=r&&r.length===t.length?r:(!function(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let i=te(0,t,n);e.push(ew(r,1,i))}}(a=[0],t.length-1),a),i.map(t=>t*e)),t,{ease:Array.isArray(o)?o:t.map(()=>o||eZ).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(s.value=c(t),s.done=t>=e,s)}}let tr=e=>null!==e;function tn(e,{repeat:t,repeatType:r="loop"},n,i=1){let a=e.filter(tr),o=i<0||t&&"loop"!==r&&t%2==1?0:a.length-1;return o&&void 0!==n?n:a[o]}let ti={decay:eG,inertia:eG,tween:tt,keyframes:tt,spring:eW};function ta(e){"string"==typeof e.type&&(e.type=ti[e.type])}class to{constructor(){this.count=0,this.updateFinished()}get finished(){return this._finished}updateFinished(){this.count++,this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}let ts=e=>e/100;class tl extends to{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;if(e&&e.updatedAt!==S.now()&&this.tick(S.now()),this.isStopped=!0,"idle"===this.state)return;this.teardown();let{onStop:t}=this.options;t&&t()},O.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;ta(e);let{type:t=tt,repeat:r=0,repeatDelay:n=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||tt;s!==tt&&"number"!=typeof o[0]&&(this.mixKeyframes=D(ts,eM(o[0],o[1])),o=[0,100]);let l=s({...e,keyframes:o});"mirror"===i&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=eL(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+n,this.totalDuration=this.resolvedDuration*(r+1)-n,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let{generator:r,totalDuration:n,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(null===this.startTime)return r.next(0);let{delay:l=0,keyframes:u,repeat:c,repeatType:d,repeatDelay:f,type:h,onUpdate:p,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>n;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let y=this.currentTime,x=r;if(c){let e=Math.min(this.currentTime,n)/o,t=Math.floor(e),r=e%1;!r&&e>=1&&(r=1),1===r&&t--,(t=Math.min(t,c+1))%2&&("reverse"===d?(r=1-r,f&&(r-=f/o)):"mirror"===d&&(x=a)),y=I(0,1,r)*o}let b=v?{done:!1,value:u[0]}:x.next(y);i&&(b.value=i(b.value));let{done:w}=b;v||null===s||(w=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let C=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return C&&h!==eG&&(b.value=tn(u,this.options,m,this.speed)),p&&p(b.value),C&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get time(){return this.currentTime/1e3}set time(e){e=L(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(S.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=eD,onPlay:t,startTime:r}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();let n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(S.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:e}=this.options;e&&e()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown()}teardown(){this.notifyFinished(),this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,O.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),e.observe(this)}}let tu=e=>180*e/Math.PI,tc=e=>tf(tu(Math.atan2(e[1],e[0]))),td={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:tc,rotateZ:tc,skewX:e=>tu(Math.atan(e[1])),skewY:e=>tu(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},tf=e=>((e%=360)<0&&(e+=360),e),th=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),tp=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),tm={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:th,scaleY:tp,scale:e=>(th(e)+tp(e))/2,rotateX:e=>tf(tu(Math.atan2(e[6],e[5]))),rotateY:e=>tf(tu(Math.atan2(-e[2],e[0]))),rotateZ:tc,rotate:tc,skewX:e=>tu(Math.atan(e[4])),skewY:e=>tu(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function tg(e){return+!!e.includes("scale")}function tv(e,t){let r,n;if(!e||"none"===e)return tg(t);let i=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(i)r=tm,n=i;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=td,n=t}if(!n)return tg(t);let a=r[t],o=n[1].split(",").map(ty);return"function"==typeof a?a(o):o[a]}function ty(e){return parseFloat(e.trim())}let tx=e=>e===H||e===ei,tb=new Set(["x","y","z"]),tw=g.filter(e=>!tb.has(e)),tC={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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})=>tv(t,"x"),y:(e,{transform:t})=>tv(t,"y")};tC.translateX=tC.x,tC.translateY=tC.y;let tS=new Set,tE=!1,tk=!1,tA=!1;function tT(){if(tk){let e=Array.from(tS).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),r=new Map;
1t.forEach(e=>{let t,n=(t=[],tw.forEach(r=>{let n=e.getValue(r);void 0!==n&&(t.push([r,n.get()]),n.set(+!!r.startsWith("scale")))}),t);n.length&&(r.set(e,n),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,r])=>{e.getValue(t)?.set(r)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}tk=!1,tE=!1,tS.forEach(e=>e.complete(tA)),tS.clear()}function tj(){tS.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tk=!0)})}class tP{constructor(e,t,r,n,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=n,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(tS.add(this),tE||(tE=!0,f.read(tj),f.resolveKeyframes(tT))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:r,motionValue:n}=this;if(null===e[0]){let i=n?.get(),a=e[e.length-1];if(void 0!==i)e[0]=i;else if(r&&t){let n=r.readValue(t,a);null!=n&&(e[0]=n)}void 0===e[0]&&(e[0]=a),n&&void 0===i&&n.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),tS.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,tS.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}function tN(e){let t;return()=>(void 0===t&&(t=e()),t)}let tR=tN(()=>void 0!==window.ScrollTimeline),tM={},tD=(r=tN(()=>{try{document.createElement("div").animate({opacity:0}
1,{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),()=>tM.linearEasing??r()),tI=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,tL={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tI([0,.65,.55,1]),circOut:tI([.55,0,1,.45]),backIn:tI([.31,.01,.66,-.59]),backOut:tI([.33,1.53,.69,.99])};function tO(e){return"function"==typeof e&&"applyToOptions"in e}class tF extends to{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:r,keyframes:n,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,B("string"!=typeof e.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');const l=function({type:e,...t}){return tO(e)&&tD()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,r,{delay:n=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeOut",times:l}={},u){let c={[t]:r};l&&(c.offset=l);let d=function e(t,r){if(t)return"function"==typeof t?tD()?eI(t,r):"ease-out":e7(t)?tI(t):Array.isArray(t)?t.map(t=>e(t,r)||tL.easeOut):tL[t]}(s,i);Array.isArray(d)&&(c.easing=d);let f={delay:n,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"};u&&(f.pseudoElement=u);let h=e.animate(c,f);return h}(t,r,n,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=tn(n,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):r.startsWith("--")?t.style.setProperty(r,e):t.style[r]=e,this.animation.cancel()}s?.(),this.notifyFinished()},this.animation.oncancel=()=>this.notifyFinished()}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){this.finishedTime=null,this.animation.currentTime=L(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&tR())?(this.animation.timeline=e,l):t(this)}}let tB={anticipate:e5,backInOut:e2,circInOut:e6};class tV extends tF{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in tB&&(e.ease=tB[e.ease])}(e),ta(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:r,onComplete:n,element:i,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let o=new tl({...a,autoplay:!1}),s=L(this.finishedTime??this.time);t.setWithVelocity(o.sample(s-10).value,o.sample(s).value,10),o.stop()}}let tz=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(ey.test(e)||"0"===e)&&!e.startsWith("url(")),t$=new Set(["opacity","clipPath","filter","transform"]),tU=tN(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class t_ extends to{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:a="loop",keyframes:o,name:s,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation?(this._animation.stop(),this.stopTimeline?.()):this.keyframeResolver?.cancel()},this.createdAt=S.now();const d={autoplay:e,delay:t,type:r,repeat:n,repeatDelay:i,repeatType:a,name:s,motionValue:l,element:u,...c},f=u?.KeyframeResolver||tP;this.keyframeResolver=new f(o,(e,t,r)=>this.onKeyframesResolved(e,t,d,!r),s,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,r,n){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:d}=r;this.resolvedAt=S.now(),!function(e,t,r,n){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let a=e[e.length-1],o=tz(i,t),s=tz(a,t);return F(o===s,`You are trying to animate ${t} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`),!!o&&!!s&&(function(e){let t=e[0];if(1===e.length)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}(e)||("spring"===r||tO(r))&&n)}(e,i,a,o)&&((u.instantAnimations||!s)&&d?.(tn(e,r,t)),e[0]=e[e.length-1],r.duration=0,r.repeat=0);let f={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...r,keyframes:e},h=!c&&function(e){let{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:a,type:o}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;
1let{onUpdate:s,transformTemplate:l}=t.owner.getProps();return tU()&&r&&t$.has(r)&&("transform"!==r||!l)&&!s&&!n&&"mirror"!==i&&0!==a&&"inertia"!==o}(f)?new tV({...f,element:f.motionValue.owner.current}):new tl(f);h.finished.then(()=>this.notifyFinished()).catch(l),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(tA=!0,tj(),tT(),tA=!1),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this.animation.cancel()}}let tH=e=>null!==e,tW={type:"spring",stiffness:500,damping:25,restSpeed:10},tG={type:"keyframes",duration:.8},tq={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},tK=(e,t,r,n={},i,a)=>o=>{let l=s(n,e)||{},c=l.delay||n.delay||0,{elapsed:d=0}=n;d-=L(c);let h={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};!function({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}(l)&&Object.assign(h,((e,{keyframes:t})=>t.length>2?tG:v.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:tW:tq)(e,h)),h.duration&&(h.duration=L(h.duration)),h.repeatDelay&&(h.repeatDelay=L(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let p=!1;if(!1!==h.type&&(0!==h.duration||h.repeatDelay)||(h.duration=0,0===h.delay&&(p=!0)),(u.instantAnimations||u.skipAnimations)&&(p=!0,h.duration=0,h.delay=0),h.allowFlatten=!l.type&&!l.ease,p&&!a&&void 0!==t.get()){let e=function(e,{repeat:t,repeatType:r="loop"}){let n=e.filter(tH),i=t&&"loop"!==r&&t%2==1?0:n.length-1;return n[i]}(h.keyframes,l);if(void 0!==e)return void f.update(()=>{h.onUpdate(e),h.onComplete()})}return new t_(h)};function tX(e,t,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:l,...u}=t;n&&(a=n);let c=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in u){let n=e.getValue(t,e.latestValues[t]??null),i=u[t];if(void 0===i||d&&function({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&!0!==t[r];return t[r]=!1,n}(d,t))continue;let o={delay:r,...s(a||{},t)},l=n.get();if(void 0!==l&&!n.isAnimating&&!Array.isArray(i)&&i===l&&!o.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){let r=e.props[R];if(r){let e=window.MotionHandoffAnimation(r,t,f);null!==e&&(o.startTime=e,h=!0)}}P(e,t),n.start(tK(t,n,i,e.shouldReduceMotion&&y.has(t)?{type:!1}:o,e,h));let p=n.animation;p&&c.push(p)}return l&&Promise.all(c).then(()=>{f.update(()=>{l&&function(e,t){let{transitionEnd:r={},transition:n={},...i}=o(e,t)||{};for(let t in i={...i,...r}){var a;let r=T(a=i[t])?a[a.length-1]||0:a;e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,A(r))}}(e,l)})}),c}function tY(e,t,r={}){let n=o(e,t,"exit"===r.type?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);let a=n?()=>Promise.all(tX(e,n,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(n=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return function(e,t,r=0,n=0,i=1,a){let o=[],s=(e.variantChildren.size-1)*n,l=1===i?(e=0)=>e*n:(e=0)=>s-e*n;return Array.from(e.variantChildren).sort(tZ).forEach((e,n)=>{e.notify("AnimationStart",t),o.push(tY(e,t,{...a,delay:r+l(n)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(o)}(e,t,a+n,o,s,r)}:()=>Promise.resolve(),{when:l}=i;if(!l)return Promise.all([a(),s(r.delay)]);{let[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then(()=>t())}}function tZ(e,t){return e.sortNodePosition(t)}function tJ(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function tQ(e){return"string"==typeof e||Array.isArray(e)}let t0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],t1=["initial",...t0],t2=t1.length,t5=[...t0].reverse(),t4=t0.length;function t3(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function t6(){return{animate:t3(!0),whileInView:t3(),whileHover:t3(),whileTap:t3(),whileDrag:t3(),whileFocus:t3(),exit:t3()}}class t7{constructor(e){this.isMounted=!1,this.node=e}update(){}}let t9=0,t8={x:!1,y:!1};function re(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}let rt=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function rr(e){return{point:{x:e.pageX,y:e.pageY}}}function rn(e,t,r,n){return re(e,t,e=>rt(e)&&r(e,rr(e)),n)}function ri({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function ra(e){return e.max-e.min}function ro(e,t,r,n=.5){e.origin=n,e.originPoint=ew(t.min,t.max,e.origin),e.scale=ra(r)/ra(t),e.translate=ew(r.min,r.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 rs(e,t,r,n){ro(e.x,t.x,r.x,n?n.originX:void 0),ro(e.y,t.y,r.y,n?n.originY:void 0)}function rl(e,t,r){e.min=r.min+t.min,e.max=e.min+ra(t)}function ru(e,t,r){e.min=t.min-r.min,e.max=e.min+ra(t)}function rc(e,t,r){ru(e.x,t.x,r.x),ru(e.y,t.y,r.y)}let rd=()=>({translate:0,scale:1,origin:0,originPoint:0}),rf=()=>({x:rd(),y:rd()}),rh=()=>({min:0,max:0}),rp=()=>({x:rh(),y:rh()});function rm(e){return[e("x"),e("y")]}function rg(e){return void 0===e||1===e}function rv({scale:e,scaleX:t,scaleY:r}){return!rg(e)||!rg(t)||!rg(r)}function ry(e){return rv(e)||rx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rx(e){var t,r;return(t=e.x)&&"0%"!==t||(r=e.y)&&"0%"!==r}function rb(e,t,r,n,i){return void 0!==i&&(e=n+i*(e-n)),n+r*(e-n)+t}function rw(e,t=0,r=1,n,i){e.min=rb(e.min,t,r,n,i),e.max=rb(e.max,t,r,n,i)}function rC(e,{x:t,y:r}){rw(e.x,t.translate,t.scale,t.originPoint),rw(e.y,r.translate,r.scale,r.originPoint)}function rS(e,t){e.min=e.min+t,e.max=e.max+t}function rE(e,t,r,n,i=.5){let a=ew(e.min,e.max,i);rw(e,t,r,a,n)}function rk(e,t){rE(e.x,t.x,t.scaleX,t.scale,t.originX),rE(e.y,t.y,t.scaleY,t.scale,t.originY)}function rA(e,t){return ri(function(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),t))}let rT=({current:e})=>e?e.ownerDocument.defaultView:null;function rj(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}let rP=(e,t)=>Math.abs(e-t);class rN{constructor(e,t,{transformPagePoint:r,contextWindow:n,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=rD(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,i=(e=r.offset,t={x:0,y:0},Math.sqrt(rP(e.x,t.x)**2+rP(e.y,t.y)**2)>=3);if(!n&&!i)return;let{point:a}=r,{timestamp:o}=p;this.history.push({...a,timestamp:o});let{onStart:s,onMove:l}=this.handlers;n||(s&&s(this.lastMoveEvent,r),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,r)},this.handlePointerMove=(e,t)=>
1{this.lastMoveEvent=e,this.lastMoveEventInfo=rR(t,this.transformPagePoint),f.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:r,onSessionEnd:n,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=rD("pointercancel"===e.type?this.lastMoveEventInfo:rR(t,this.transformPagePoint),this.history);this.startEvent&&r&&r(e,a),n&&n(e,a)},!rt(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=r,this.contextWindow=n||window;const a=rR(rr(e),this.transformPagePoint),{point:o}=a,{timestamp:s}=p;this.history=[{...o,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,rD(a,this.history)),this.removeListeners=D(rn(this.contextWindow,"pointermove",this.handlePointerMove),rn(this.contextWindow,"pointerup",this.handlePointerUp),rn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),h(this.updatePoint)}}function rR(e,t){return t?{point:t(e.point)}:e}function rM(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rD({point:e},t){return{point:e,delta:rM(e,rI(t)),offset:rM(e,t[0]),velocity:function(e){if(e.length<2)return{x:0,y:0};let t=e.length-1,r=null,n=rI(e);for(;t>=0&&(r=e[t],!(n.timestamp-r.timestamp>L(.1)));)t--;if(!r)return{x:0,y:0};let i=(n.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};let a={x:(n.x-r.x)/i,y:(n.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(t)}}function rI(e){return e[e.length-1]}function rL(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function rO(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function rF(e,t,r){return{min:rB(e,t),max:rB(e,r)}}function rB(e,t){return"number"==typeof e?e:e[t]||0}let rV=new WeakMap;class rz{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=rp(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;let n=e=>{let{dragSnapToOrigin:r}=this.getProps();r?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(rr(e).point)},i=(e,t)=>{let{drag:r,dragPropagation:n,onDragStart:i}=this.getProps();if(r&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"y"===e)if(t8[e])return null;else return t8[e]=!0,()=>{t8[e]=!1};return t8.x||t8.y?null:(t8.x=t8.y=!0,()=>{t8.x=t8.y=!1})}(r),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rm(e=>{let t=this.getAxisMotionValue(e).get()||0;if(en.test(t)){let{projection:r}=this.visualElement;if(r&&r.layout){let n=r.layout.layoutBox[e];n&&(t=ra(n)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&f.postRender(()=>i(e,t)),P(this.visualElement,"transform");let{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},a=(e,t)=>{let{dragPropagation:r,dragDirectionLock:n,onDirectionLock:i,onDrag:a}=this.getProps();if(!r&&!this.openDragLock)return;let{offset:o}=t;if(n&&null===this.currentDirection){this.currentDirection=function(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}(o),null!==this.currentDirection&&i&&i(this.currentDirection);return}this.updateAxis("x",t.point,o),this.updateAxis("y",t.point,o),this.visualElement.render(),a&&a(e,t)},o=(e,t)=>this.stop(e,t),s=()=>rm(e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:l}=this.getProps();this.panSession=new rN(e,{onSessionStart:n,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:rT(this.visualElement)})}stop(e,t){let r=this.isDragging;if(this.cancel(),!r)return;let{velocity:n}=t;this.startAnimation(n);let{onDragEnd:i}=this.getProps();i&&f.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,r){let{drag:n}=this.getProps();if(!r||!r$(e,n,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:r},n){return void 0!==t&&e<t?e=n?ew(t,e,n.min):Math.max(e,t):void 0!==r&&e>r&&(e=n?ew(r,e,n.max):Math.min(e,r)),e}(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;e&&rj(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=function(e,{top:t,left:r,bottom:n,right:i}
1){return{x:rL(e.x,r,i),y:rL(e.y,t,n)}}(r.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:rF(e,"left","right"),y:rF(e,"top","bottom")}}(t),n!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&rm(e=>{var t,n;let i;!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=(t=r.layoutBox[e],n=this.constraints[e],i={},void 0!==n.min&&(i.min=n.min-t.min),void 0!==n.max&&(i.max=n.max-t.min),i))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!rj(t))return!1;let n=t.current;B(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;let a=function(e,t,r){let n=rA(e,r),{scroll:i}=t;return i&&(rS(n.x,i.offset.x),rS(n.y,i.offset.y)),n}(n,i.root,this.visualElement.getTransformPagePoint()),o=(e=i.layout.layoutBox,{x:rO(e.x,a.x),y:rO(e.y,a.y)});if(r){let e=r(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=ri(e))}return o}startAnimation(e){let{drag:t,dragMomentum:r,dragElastic:n,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{};return Promise.all(rm(o=>{if(!r$(o,t,this.currentDirection))return;let l=s&&s[o]||{};a&&(l={min:0,max:0});let u={type:"inertia",velocity:r?e[o]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(o,u)})).then(o)}startAxisValueAnimation(e,t){let r=this.getAxisMotionValue(e);return P(this.visualElement,e),r.start(tK(e,r,0,t,this.visualElement,!1))}stopAnimation(){rm(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){rm(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps();return r[t]||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){rm(t=>{let{drag:r}=this.getProps();if(!r$(t,r,this.currentDirection))return;let{projection:n}=this.visualElement,i=this.getAxisMotionValue(t);if(n&&n.layout){let{min:r,max:a}=n.layout.layoutBox[t];i.set(e[t]-ew(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!rj(t)||!r||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};rm(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){var r,i;let a,o,s,l=t.get();n[e]=(r={min:l,max:l},i=this.constraints[e],a=.5,o=ra(r),(s=ra(i))>o?a=te(i.min,i.max-o,r.min):o>s&&(a=te(r.min,r.max-s,i.min)),I(0,1,a))}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),rm(t=>{if(!r$(t,e,null))return;let r=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];r.set(ew(i,a,n[t]))})}addListeners(){if(!this.visualElement.current)return;rV.set(this.visualElement,this);let e=rn(this.visualElement.current,"pointerdown",e=>{let{drag:t,dragListener:r=!0}=this.getProps();t&&r&&this.start(e)}),t=()=>{let{dragConstraints:e}=this.getProps();rj(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,n=r.addEventListener("measure",t);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),f.read(t);let i=re(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(rm(t=>{let r=this.getAxisMotionValue(t);r&&(this.originPoint[t]+=e[t].translate,r.set(r.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),e(),n(),a&&a()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:i=!1,dragElastic:a=.35,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:n,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function r$(e,t,r){return(!0===t||t===e)&&(null===r||r===e)}let rU=e=>(t,r)=>{e&&f.postRender(()=>e(t,r))};var r_,rH,rW,rG=e.i(43476);let{schedule:rq}=d(queueMicrotask,!1);var rK=e.i(71645);let rX=(0,rK.createContext)(null);function rY(e=!0){let t=(0,rK.useContext)(rX);if(null===t)return[!0,null];let{isPresent:r,onExitComplete:n,register:i}=t,a=(0,rK.useId)();(0,rK.useEffect)(()=>
1{if(e)return i(a)},[e]);let o=(0,rK.useCallback)(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,o]:[!0]}e.s(["PresenceContext",0,rX],21476),e.s(["usePresence",0,rY],64978);let rZ=(0,rK.createContext)({});e.s(["LayoutGroupContext",0,rZ],31178);let rJ=(0,rK.createContext)({}),rQ={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function r0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let r1={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!ei.test(e))return e;else e=parseFloat(e);let r=r0(e,t.target.x),n=r0(e,t.target.y);return`${r}% ${n}%`}},r2={};class r5 extends rK.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:n}=this.props,{projection:i}=e;for(let e in r3)r2[e]=r3[e],z(e)&&(r2[e].isCSSVariable=!0);i&&(t.group&&t.group.add(i),r&&r.register&&n&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),rQ.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:r,drag:n,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,n||e.layoutDependency!==t||void 0===t||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||f.postRender(()=>{let e=a.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),rq.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:n}=e;n&&(n.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function r4(e){let[t,r]=rY(),n=(0,rK.useContext)(rZ);return(0,rG.jsx)(r5,{...e,layoutGroup:n,switchLayoutGroup:(0,rK.useContext)(rJ),isPresent:t,safeToRemove:r})}let r3={borderRadius:{...r1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:r1,borderTopRightRadius:r1,borderBottomLeftRadius:r1,borderBottomRightRadius:r1,boxShadow:{correct:(e,{treeScale:t,projectionDelta:r})=>{let n=ey.parse(e);if(n.length>5)return e;let i=ey.createTransformer(e),a=+("number"!=typeof n[0]),o=r.x.scale*t.x,s=r.y.scale*t.y;n[0+a]/=o,n[1+a]/=s;let l=ew(o,s,.5);return"number"==typeof n[2+a]&&(n[2+a]/=l),"number"==typeof n[3+a]&&(n[3+a]/=l),i(n)}}},r6=(e,t)=>e.depth-t.depth;class r7{constructor(){this.children=[],this.isDirty=!1}add(e){x(this.children,e),this.isDirty=!0}remove(e){b(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(r6),this.isDirty=!1,this.children.forEach(e)}}function r9(e){return j(e)?e.get():e}let r8=["TopLeft","TopRight","BottomLeft","BottomRight"],ne=r8.length,nt=e=>"string"==typeof e?parseFloat(e):e,nr=e=>"number"==typeof e||ei.test(e);function nn(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let ni=no(0,.5,e3),na=no(.5,.95,l);function no(e,t,r){return n=>n<e?0:n>t?1:r(te(e,t,n))}function ns(e,t){e.min=t.min,e.max=t.max}function nl(e,t){ns(e.x,t.x),ns(e.y,t.y)}function nu(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function nc(e,t,r,n,i){return e-=t,e=n+1/r*(e-n),void 0!==i&&(e=n+1/i*(e-n)),e}function nd(e,t,[r,n,i],a,o){!function(e,t=0,r=1,n=.5,i,a=e,o=e){if(en.test(t)&&(t=parseFloat(t),t=ew(o.min,o.max,t/100)-o.min),"number"!=typeof t)return;let s=ew(a.min,a.max,n);e===a&&(s-=t),e.min=nc(e.min,t,r,s,i),e.max=nc(e.max,t,r,s,i)}(e,t[r],t[n],t[i],t.scale,a,o)}let nf=["x","scaleX","originX"],nh=["y","scaleY","originY"];function np(e,t,r,n){nd(e.x,t,nf,r?r.x:void 0,n?n.x:void 0),nd(e.y,t,nh,r?r.y:void 0,n?n.y:void 0)}function nm(e){return 0===e.translate&&1===e.scale}function ng(e){return nm(e.x)&&nm(e.y)}function nv(e,t){return e.min===t.min&&e.max===t.max}function ny(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function nx(e,t){return ny(e.x,t.x)&&ny(e.y,t.y)}function nb(e){return ra(e.x)/ra(e.y)}function nw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class nC{constructor(){this.members=[]}add(e){x(this.members,e),e.scheduleRender()}remove(e){if(b(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t,r=this.members.findIndex(t=>e===t);if(0===r)return!1;for(let e=r;e>=0;e--){let r=this.members[e];if(!1!==r.isPresent){t=r;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:n}=e.options;!1===n&&r.hide()}}
1exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:r}=e;t.onExitComplete&&t.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let nS=["","X","Y","Z"],nE={visibility:"hidden"},nk=0;function nA(e,t,r,n){let{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function nT({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(e={},r=t?.()){this.id=nk++,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,this.nodes.forEach(nN),this.nodes.forEach(nF),this.nodes.forEach(nB),this.nodes.forEach(nR)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new r7)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new w),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let r=this.eventHandlers.get(e);r&&r.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,r=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;let{layoutId:n,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),r&&(i||n)&&(this.isLayoutDirty=!0),e){let r,n=()=>this.root.updateBlockedByResize=!1;e(t,()=>{let e,t;this.root.updateBlockedByResize=!0,r&&r(),e=S.now(),t=({timestamp:r})=>{let i=r-e;i>=250&&(h(t),n(i-250))},f.setup(t,!0),r=()=>h(t),rQ.hasAnimatedSinceResize&&(rQ.hasAnimatedSinceResize=!1,this.nodes.forEach(nO))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&a&&(n||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let i=this.options.transition||a.getDefaultTransition()||nH,{onLayoutAnimationStart:o,onLayoutAnimationComplete:l}=a.getProps(),u=!this.targetLayout||!nx(this.targetLayout,n),c=!t&&r;if(this.options.layoutRoot||this.resumeFrom||c||t&&(u||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);let t={...s(i,"layout"),onPlay:o,onComplete:l};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||nO(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,h(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.forEac
1h(nV),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:r}=t.options;if(!r)return;let n=r.props[R];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:e,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",f,!(e||r))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&e(i)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:r}=this.options;if(void 0===t&&!r)return;let n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(nD);return}this.isUpdating||this.nodes.forEach(nI),this.isUpdating=!1,this.nodes.forEach(nL),this.nodes.forEach(nj),this.nodes.forEach(nP),this.clearAllSnapshots();let e=S.now();p.delta=I(0,1e3/60,e-p.timestamp),p.timestamp=e,p.isProcessing=!0,m.update.process(p),m.preRender.process(p),m.render.process(p),p.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rq.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(nM),this.sharedNodes.forEach(nz)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,f.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){f.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||ra(this.snapshot.measuredBox.x)||ra(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(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();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=rp(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){let t=n(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!ng(this.projectionDelta),r=this.getTransformTemplate(),n=r?r(this.latestValues,""):void 0,a=n!==this.prevTransformTemplateValue;e&&(t||ry(this.latestValues)||a)&&(i(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let r=this.measurePageBox(),n=this.removeElementScroll(r);return e&&(n=this.removeTransform(n)),nq((t=n).x),nq(t.y),{animationId:this.root.animationId,measuredBox:r,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return rp();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(nX))){let{scroll:e}=this.root;e&&(rS(t.x,e.offset.x),rS(t.y,e.offset.y))}return t}removeElementScroll(e){let t=rp();if(nl(t,e),this.scroll?.wasRoot)return t;for(let r=0;r<this.path.length;r++){let n=this.path[r],{scroll:i,options:a}=n;n!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&nl(t,e),rS(t.x,i.offset.x),rS(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let r=rp();nl(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&rk(r,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),ry(n.latestValues)&&rk(r,n.latestValues)}return ry(this.latestValues)&&rk(r,this.latestValues),r}removeTransform(e){let t=rp();nl(t,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];if(!r.instance||!ry(r.latestValues))continue;rv(r.latestValues)&&r.updateSnapshot();let n=rp();nl(n,r.measurePageBox()),np(t,r.latestValues,r.snapshot?r.snapshot.layoutBox:void 0,n)}return ry(this.latestValues)&&np(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!==p.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
1isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let r=!!this.resumingFrom||this!==t;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:n,layoutId:i}=this.options;if(this.layout&&(n||i)){if(this.resolvedRelativeTargetAt=p.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=rp(),this.relativeTargetOrigin=rp(),rc(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),nl(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if(this.target||(this.target=rp(),this.targetWithTransforms=rp()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var a,o,s;this.forceRelativeParentToResolveTarget(),a=this.target,o=this.relativeTarget,s=this.relativeParent.target,rl(a.x,o.x,s.x),rl(a.y,o.y,s.y)}else this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nl(this.target,this.layout.layoutBox),rC(this.target,this.targetDelta)):nl(this.target,this.layout.layoutBox);if(this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=rp(),this.relativeTargetOrigin=rp(),rc(this.relativeTargetOrigin,this.target,e.target),nl(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}}getClosestProjectingParent(){if(!(!this.parent||rv(this.parent.latestValues)||rx(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,r=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(r=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===p.timestamp&&(r=!1),r)return;let{layout:n,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(n||i))return;nl(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;!function(e,t,r,n=!1){let i,a,o=r.length;if(o){t.x=t.y=1;for(let s=0;s<o;s++){a=(i=r[s]).projectionDelta;let{visualElement:o}=i.options;(!o||!o.props.style||"contents"!==o.props.style.display)&&(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&rk(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,rC(e,a)),n&&ry(i.latestValues)&&rk(e,i.latestValues))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=rp());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(nu(this.prevProjectionDelta.x,this.projectionDelta.x),nu(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),rs(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&nw(this.projectionDelta.x,this.prevProjectionDelta.x)&&nw(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=rf(),this.projectionDelta=rf(),this.projectionDeltaWithTransform=rf()}setAnimationOrigin(e,t=!1){let r,n=this.snapshot,i=n?n.latestValues:{},a={...this.latestValues},o=rf();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=rp(),l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),c=!u||u.members.length<=1,d=!!(l&&!c&&!0===this.options.crossfade&&!this.path.some(n_));this.animationProgress=0,this.mixTargetDelta=t=>{let n=t/1e3;if(n$(o.x,e.x,n),n$(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,f,h,p,m,g;rc(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,p=this.relativeTargetOrigin,m=s,g=n,nU(h.x,p.x,m.x,g),nU(h.y,p.y,m.y,g),r&&(u=this.relativeTarget,f=r,nv(u.x,f.x)&&nv(u.y,f.y))&&(this.isProjectionDirty=!1),r||(r=rp()),nl(r,this.relativeTarget)}l&&(this.animationValues=a,function(e,t,r,n,i,a){i?(e.opacity=ew(0,r.opacity??1,ni(n)),e.opacityExit=ew(t.opacity??1,0,na(n))):a&&(e.opacity=ew(t.opacity??1,r.opacity??1,n));for(let i=0;i<ne;i++){let a=`border${r8[i]}Radius`,o=nn(t,a),s=nn(r,a);(void 0!==o||void 0!==s)&&(o||(o=0),s||(s=0),0===o||0===s||nr(o)===nr(s)?(e[a]=Math.max(ew(nt(o),nt(s),n),0),(en.test(s)||en.test(o))&&(e[a]+="%")):e[a]=s)}(t.rotate||r.rotate)&&(e.rotate=ew(t.rotate||0,r.rotate||0,n))}(a,i,this.latestValues,n,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(h(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=f.update(()=>{var t;let r;rQ.hasAnimatedSinceResize=!0,O.layout++,this.currentAnimation=(t={...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{O.layout--},onComplete:()=>{O.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}},(r=j(0)?0:A(0)).start(tK("",r,1e3,t)),r.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let 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(){let e=this.getLead(),{targetWithTransforms:t,target:r,layout:n,latestValues:i}=e;if(t&&r&&n){if(this!==e&&this.layout&&n&&nK(this.options.animationType,this.layout.layoutBox,n.layoutBox)){r=this.target||rp();let t=ra(this.layout.layoutBox.x);r.x.min=e.target.x.min,r.x.max=r.x.min+t;let n=ra(this.layout.layoutBox.y);r.y.min=e.target.y.min,r.y.max=r.y.min+n}nl(t,r),rk(t,i),rs(this.projectionDeltaWithTransform,this.layoutCorrected,t,i
1)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new nC),this.sharedNodes.get(e).add(t);let r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:r}={}){let n=this.getStack();n&&n.promote(this,r),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:r}=e;if((r.z||r.rotate||r.rotateX||r.rotateY||r.rotateZ||r.skewX||r.skewY)&&(t=!0),!t)return;let n={};r.z&&nA("z",e,n,this.animationValues);for(let t=0;t<nS.length;t++)nA(`rotate${nS[t]}`,e,n,this.animationValues),nA(`skew${nS[t]}`,e,n,this.animationValues);for(let t in e.render(),n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}getProjectionStyles(e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return nE;let t={visibility:""},r=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.opacity="",t.pointerEvents=r9(e?.pointerEvents)||"",t.transform=r?r(this.latestValues,""):"none",t;let n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target){let t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=r9(e?.pointerEvents)||""),this.hasProjected&&!ry(this.latestValues)&&(t.transform=r?r({},""):"none",this.hasProjected=!1),t}let i=n.animationValues||n.latestValues;this.applyTransformsToTarget(),t.transform=function(e,t,r){let n="",i=e.x.translate/t.x,a=e.y.translate/t.y,o=r?.z||0;if((i||a||o)&&(n=`translate3d(${i}px, ${a}px, ${o}px) `),(1!==t.x||1!==t.y)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=r;e&&(n=`perspective(${e}px) ${n}`),t&&(n+=`rotate(${t}deg) `),i&&(n+=`rotateX(${i}deg) `),a&&(n+=`rotateY(${a}deg) `),o&&(n+=`skewX(${o}deg) `),s&&(n+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==s||1!==l)&&(n+=`scale(${s}, ${l})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,i),r&&(t.transform=r(i,t.transform));let{x:a,y:o}=this.projectionDelta;for(let e in t.transformOrigin=`${100*a.origin}% ${100*o.origin}% 0`,n.animationValues?t.opacity=n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:t.opacity=n===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0,r2){if(void 0===i[e])continue;let{correct:r,applyTo:a,isCSSVariable:o}=r2[e],s="none"===t.transform?i[e]:r(i[e],n);if(a){let e=a.length;for(let r=0;r<e;r++)t[a[r]]=s}else o?this.options.visualElement.renderState.vars[e]=s:t[e]=s}return this.options.layoutId&&(t.pointerEvents=n===this?r9(e?.pointerEvents)||"":"none"),t}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(nD),this.root.sharedNodes.clear()}}}function nj(e){e.updateLayout()}function nP(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:n}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;"size"===i?rm(e=>{let n=a?t.measuredBox[e]:t.layoutBox[e],i=ra(n);n.min=r[e].min,n.max=n.min+i}):nK(i,t.layoutBox,r)&&rm(n=>{let i=a?t.measuredBox[n]:t.layoutBox[n],o=ra(r[n]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[n].max=e.relativeTarget[n].min+o)});let o=rf();rs(o,r,t.layoutBox);let s=rf();a?rs(s,e.applyTransform(n,!0),t.measuredBox):rs(s,r,t.layoutBox);let l=!ng(o),u=!1;if(!e.resumeFrom){let n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:i,layout:a}=n;
1if(i&&a){let o=rp();rc(o,t.layoutBox,i.layoutBox);let s=rp();rc(s,r,a.layoutBox),nx(o,s)||(u=!0),n.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=n)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function nN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function nR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function nM(e){e.clearSnapshot()}function nD(e){e.clearMeasurements()}function nI(e){e.isLayoutDirty=!1}function nL(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nO(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function nF(e){e.resolveTargetDelta()}function nB(e){e.calcProjection()}function nV(e){e.resetSkewAndRotation()}function nz(e){e.removeLeadSnapshot()}function n$(e,t,r){e.translate=ew(t.translate,0,r),e.scale=ew(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function nU(e,t,r,n){e.min=ew(t.min,r.min,n),e.max=ew(t.max,r.max,n)}function n_(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let nH={duration:.45,ease:[.4,0,.1,1]},nW=e=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nG=nW("applewebkit/")&&!nW("chrome/")?Math.round:l;function nq(e){e.min=nG(e.min),e.max=nG(e.max)}function nK(e,t,r){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(nb(t)-nb(r)))}function nX(e){return e!==e.root&&e.scroll?.wasRoot}let nY=nT({attachResizeListener:(e,t)=>re(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),nZ={current:void 0},nJ=nT({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!nZ.current){let e=new nY({});e.mount(window),e.setOptions({layoutScroll:!0}),nZ.current=e}return nZ.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function nQ(e,t){let r=function(e){if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document,r=(void 0)??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}(e),n=new AbortController;return[r,{passive:!0,...t,signal:n.signal},()=>n.abort()]}function n0(e){return!("touch"===e.pointerType||t8.x||t8.y)}function n1(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover","Start"===r);let i=n["onHover"+r];i&&f.postRender(()=>i(t,rr(t)))}let n2=(e,t)=>!!t&&(e===t||n2(e,t.parentElement)),n5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),n4=new WeakSet;function n3(e){return t=>{"Enter"===t.key&&e(t)}}function n6(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function n7(e){return rt(e)&&!(t8.x||t8.y)}function n9(e,t,r){let{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap","Start"===r);let i=n["onTap"+("End"===r?"":r)];i&&f.postRender(()=>i(t,rr(t)))}let n8=new WeakMap,ie=new WeakMap,it=e=>{let t=n8.get(e.target);t&&t(e)},ir=e=>{e.forEach(it)},ii={some:0,all:1},ia=(0,rK.createContext)({strict:!1}),io=(0,rK.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});e.s(["MotionConfigContext",0,io],37806);let is=(0,rK.createContext)({});function il(e){return n(e.animate)||t1.some(t=>tQ(e[t]))}function iu(e){return!!(il(e)||e.variants)}function ic(e){return Array.isArray(e)?e.join(" "):e}let id="u">typeof window,ih={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"]},ip={};for(let e in ih)ip[e]={isEnabled:t=>ih[e].some(e=>!!t[e])};let im=Symbol.for("motionComponentSymbol"),ig=id?rK.useLayoutEffect:rK.useEffect;function iv(e,{layout:t,layoutId:r}){return v.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!r2[e]||"opacity"===e)}e.s(["useIsomorphicLayoutEffect",0,ig],74008);let iy=(e,t)=>t&&"number"==typeof e?t.transform(e):e,ix={...H,transform:Math.round},ib={borderWidth:ei,borderTopWidth:ei,borderRightWidth:ei,borderBottomWidth:ei,borderLeftWidth:ei,borderRadius:ei,radius:ei,borderTopLeftRadius:ei,borderTopRightRadius:ei,borderBottomRightRadius:ei,borderBottomLeftRadius:ei,width:ei,maxWidth:ei,height:ei,maxHeight:ei,top:ei,right:ei,bottom:ei,left:ei,padding:ei,paddingTop:ei,paddingRight:ei,paddingBottom:ei,paddingLeft:ei,margin:ei,marginTop:ei,marginRight:ei,marginBottom:ei,marginLeft:ei,backgroundPositionX:ei,backgroundPositionY:ei,rotate:er,rotateX:er,rotateY:er,rotateZ:er,scale:G,scaleX:G,scaleY:G,scaleZ:G,skew:er,skewX:er,skewY:er,distance:ei,translateX:ei,translateY:ei,translateZ:ei,x:ei,y:ei,z:ei,perspective:ei,transformPerspective:ei,opacity:W,originX:es,originY:es,originZ:ei,zIndex:ix,fillOpacity:W,strokeOpacity:W,numOctaves:ix},iw={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},iC=g.length;function iS(e,t,r){let{style:n,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let r=t[e];if(v.has(e)){o=!0;continue}if(z(e)){i[e]=r;continue}{let t=iy(r,ib[e]);e.startsWith("origin")?(s=!0,a[e]=t):n[e]=t}}if(!t.transform&&(o||r?n.transform=function(e,t,r){let n="",i=!0;for(let a=0;a<iC;a++){let o=g[a],s=e[o];if(void 0===s)continue;let l=!0;if(!(l="number"==typeof s?s===+!!o.startsWith("scale"):0===parseFloat(s))||r){let e=iy(s,ib[o]);if(!l){i=!1;let t=iw[o]||o;n+=`${t}(${e}) `}r&&(t[o]=e)}}return n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}(t,e.transform,r):n.transform&&(n.transform="none")),s){let{originX:e="50%",originY:t="50%",originZ:r=0}=a;n.transformOrigin=`${e} ${t} ${r}`}}let iE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ik(e,t,r){for(let n in t)j(t[n])||iv(n,r)||(e[n]=t[n])}let iA=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 iT(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||iA.has(e)}let ij=e=>!iT(e);try{(r_=(()=>{let e=Error("Cannot find module '@emotion/is-prop-valid'");throw e.code="MODULE_NOT_FOUND",e})().default)&&(ij=e=>e.startsWith("on")?!iT(e):r_(e))}catch{}let iP=["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 iN(e){if("string"!=typeof e||e.includes("-"));else if(iP.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}let iR={offset:"stroke-dashoffset",array:"stroke-dasharray"},iM={offset:"strokeDashoffset",array:"strokeDasharray"};function iD(e,{attrX:t,attrY:r,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s}
1,l,u){if(iS(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:c,style:d}=e;c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox="fill-box",delete c.transformBox),void 0!==t&&(c.x=t),void 0!==r&&(c.y=r),void 0!==n&&(c.scale=n),void 0!==i&&function(e,t,r=1,n=0,i=!0){e.pathLength=1;let a=i?iR:iM;e[a.offset]=ei.transform(-n);let o=ei.transform(t),s=ei.transform(r);e[a.array]=`${o} ${s}`}(c,i,a,o,!1)}let iI=()=>({...iE(),attrs:{}}),iL=e=>"string"==typeof e&&"svg"===e.toLowerCase();function iO(e){let t=(0,rK.useRef)(null);return null===t.current&&(t.current=e()),t.current}e.s(["useConstant",0,iO],47414);let iF=e=>(t,r)=>{let i=(0,rK.useContext)(is),o=(0,rK.useContext)(rX),s=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},r,i,o){return{latestValues:function(e,t,r,i){let o={},s=i(e,{});for(let e in s)o[e]=r9(s[e]);let{initial:l,animate:u}=e,c=il(e),d=iu(e);t&&d&&!c&&!1!==e.inherit&&(void 0===l&&(l=t.initial),void 0===u&&(u=t.animate));let f=!!r&&!1===r.initial,h=(f=f||!1===l)?u:l;if(h&&"boolean"!=typeof h&&!n(h)){let t=Array.isArray(h)?h:[h];for(let r=0;r<t.length;r++){let n=a(e,t[r]);if(n){let{transitionEnd:e,transition:t,...r}=n;for(let e in r){let t=r[e];if(Array.isArray(t)){let e=f?t.length-1:0;t=t[e]}null!==t&&(o[e]=t)}for(let t in e)o[t]=e[t]}}}return o}(r,i,o,e),renderState:t()}})(e,t,i,o);return r?s():iO(s)};function iB(e,t,r){let{style:n}=e,i={};for(let a in n)(j(n[a])||t.style&&j(t.style[a])||iv(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(i[a]=n[a]);return i}let iV={useVisualState:iF({scrapeMotionValuesFromProps:iB,createRenderState:iE})};function iz(e,t,r){let n=iB(e,t,r);for(let r in e)(j(e[r])||j(t[r]))&&(n[-1!==g.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]);return n}let i$={useVisualState:iF({scrapeMotionValuesFromProps:iz,createRenderState:iI})},iU=e=>t=>t.test(e),i_=[H,ei,en,er,eo,ea,{test:e=>"auto"===e,parse:e=>e}],iH=e=>i_.find(iU(e)),iW=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,iG=new Set(["brightness","contrast","saturate","opacity"]);function iq(e){let[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[n]=r.match(K)||[];if(!n)return e;let i=r.replace(n,""),a=+!!iG.has(t);return n!==r&&(a*=100),t+"("+a+i+")"}let iK=/\b([a-z-]*)\(.*?\)/gu,iX={...ey,getAnimatableNone:e=>{let t=e.match(iK);return t?t.map(iq).join(" "):e}},iY={...ib,color:eu,backgroundColor:eu,outlineColor:eu,fill:eu,stroke:eu,borderColor:eu,borderTopColor:eu,borderRightColor:eu,borderBottomColor:eu,borderLeftColor:eu,filter:iX,WebkitFilter:iX},iZ=e=>iY[e];function iJ(e,t){let r=iZ(e);return r!==iX&&(r=ey),r.getAnimatableNone?r.getAnimatableNone(t):void 0}let iQ=new Set(["auto","none","0"]);class i0 extends tP{constructor(e,t,r,n,i){super(e,t,r,n,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let r=0;r<e.length;r++){let n=e[r];if("string"==typeof n&&U(n=n.trim())){let i=function e(t,r,n=1){B(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);let[i,a]=function(e){let t=iW.exec(e);if(!t)return[,];let[,r,n,i]=t;return[`--${r??n}`,i]}(t);if(!i)return;let o=window.getComputedStyle(r).getPropertyValue(i);if(o){let e=o.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return U(a)?e(a,r,n+1):a}(n,t.current);void 0!==i&&(e[r]=i),r===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!y.has(r)||2!==e.length)return;let[n,i]=e,a=iH(n),o=iH(i);if(a!==o)if(tx(a)&&tx(o))for(let t=0;t<e.length;t++){let r=e[t];"string"==typeof r&&(e[t]=parseFloat(r))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,r=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){if("number"==typeof e)return 0===e;if(null===e)return!0;return"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&r.push(t);r.length&&function(e,t,r){let n,i=0;for(;i<e.length&&!n;){let t=e[i];"string"==typeof t&&!iQ.has(t)&&ep(t).values.length&&(n=e[i]),i++}if(n&&r)for(let i of t)e[i]=iJ(r,n)}(e,r,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=tC[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let n=t[t.length-1];void 0!==n&&e.getValue(r,n).jump(n,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:r}=this;if(!e||!e.current)return;let n=e.getValue(t);n&&n.jump(this.measuredOrigin,!1);let i=r.length-1,a=r[i];r[i]=tC[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEac
1h(([t,r])=>{e.getValue(t).set(r)}),this.resolveNoneKeyframes()}}let i1=[...i_,eu,ey],i2={current:null},i5={current:!1};function i4(){if(i5.current=!0,id)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>i2.current=e.matches;e.addListener(t),t()}else i2.current=!1}e.s(["hasReducedMotionListener",0,i5,"prefersReducedMotion",0,i2],96097),e.s(["initPrefersReducedMotion",0,i4],22875);let i3=new WeakMap,i6=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class i7{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:n,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=tP,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=()=>{let e=S.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,f.render(this.render,!1,!0))};const{latestValues:s,renderState:l}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=il(t),this.isVariantNode=iu(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in c){const t=c[e];void 0!==s[e]&&j(t)&&t.set(s[e],!1)}}mount(e){this.current=e,i3.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)),i5.current||i4(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||i2.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),h(this.notifyUpdate),h(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){let r;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=v.has(e);n&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&f.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=t.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),a(),r&&r(),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 ip){let t=ip[e];if(!t)continue;let{isEnabled:r,Feature:n}=t;if(!this.features[e]&&n&&r(this.props)&&(this.features[e]=new n(this)),this.features[e]){let 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):rp()}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<i6.length;t++){let r=i6[t];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);let n=e["on"+r];n&&(this.propEventSubscriptions[r]=this.on(r,n))}this.prevMotionValues=function(e,t,r){for(let n in t){let i=t[n],a=r[n];if(j(i))e.addValue(n,i);else if(j(a))e.addValue(n,A(i,{owner:e}));else if(a!==i)if(e.hasValue(n)){let t=e.getValue(n);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(n);e.addValue(n,A(void 0!==t?t:i,{owner:e}))}}for(let n in r)void 0===t[n]&&e.removeValue(n);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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}
1addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let r=this.values.get(e);t!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let 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 r=this.values.get(e);return void 0===r&&void 0!==t&&(r=A(null===t?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){let r=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=r){let n,i;if("string"==typeof r&&(n=r,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n)||(i=r,/^0[^.\s]+$/u.test(i))))r=parseFloat(r);else{let n;n=r,!i1.find(iU(n))&&ey.test(t)&&(r=iJ(e,t))}this.setBaseTarget(e,j(r)?r.get():r)}return j(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:r}=this.props;if("string"==typeof r||"object"==typeof r){let n=a(this.props,r,this.presenceContext?.custom);n&&(t=n[e])}if(r&&void 0!==t)return t;let n=this.getBaseTargetFromProps(this.props,e);return void 0===n||j(n)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:n}on(e,t){return this.events[e]||(this.events[e]=new w),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class i9 extends i7{constructor(){super(...arguments),this.KeyframeResolver=i0}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:r}){delete t[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;j(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function i8(e,{style:t,vars:r},n,i){for(let a in Object.assign(e.style,t,i&&i.getProjectionStyles(n)),r)e.style.setProperty(a,r[a])}class ae extends i9{constructor(){super(...arguments),this.type="html",this.renderInstance=i8}readValueFromInstance(e,t){if(v.has(t))return((e,t)=>{let{transform:r="none"}=getComputedStyle(e);return tv(r,t)})(e,t);{let r=window.getComputedStyle(e),n=(z(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:t}){return rA(e,t)}build(e,t,r){iS(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return iB(e,t,r)}}let at=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"]);class ar extends i9{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=rp}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(v.has(t)){let e=iZ(t);return e&&e.default||0}return t=at.has(t)?t:N(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return iz(e,t,r)}build(e,t,r){iD(e,t,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,r,n){for(let r in i8(e,t,void 0,n),t.attrs)e.setAttribute(at.has(r)?r:N(r),t.attrs[r])}mount(e){this.isSVGTag=iL(e.tagName),super.mount(e)}}let an=function(e){if("u"<typeof Proxy)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(r,n)=>"create"===n?e:(t.has(n)||t.set(n,e(n)),t.get(n))})}((rH={animation:{Feature:class extends t7{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:r})=>(function(e,t,r={}){let n;if(e.notify("AnimationStart",t),Array.isArray(t))n=Promise.all(t.map(t=>tY(e,t,r)));else if("string"==typeof t)n=tY(e,t,r);else{let i="function"==typeof t?o(e,t,r.custom):t;n=Promise.all(tX(e,i,r))}return n.then(()=>
1{e.notify("AnimationComplete",t)})})(e,t,r))),r=t6(),i=!0,a=t=>(r,n)=>{let i=o(e,n,"exit"===t?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...n}=i;r={...r,...n,...t}}return r};function s(s){let{props:l}=e,u=function e(t){if(!t)return;if(!t.isControllingVariants){let r=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(r.initial=t.props.initial),r}let r={};for(let e=0;e<t2;e++){let n=t1[e],i=t.props[n];(tQ(i)||!1===i)&&(r[n]=i)}return r}(e.parent)||{},c=[],d=new Set,f={},h=1/0;for(let t=0;t<t4;t++){var p,m;let o=t5[t],g=r[o],v=void 0!==l[o]?l[o]:u[o],y=tQ(v),x=o===s?g.isActive:null;!1===x&&(h=t);let b=v===u[o]&&v!==l[o]&&y;if(b&&i&&e.manuallyAnimateOnMount&&(b=!1),g.protectedKeys={...f},!g.isActive&&null===x||!v&&!g.prevProp||n(v)||"boolean"==typeof v)continue;let w=(p=g.prevProp,"string"==typeof(m=v)?m!==p:!!Array.isArray(m)&&!tJ(m,p)),C=w||o===s&&g.isActive&&!b&&y||t>h&&y,S=!1,E=Array.isArray(v)?v:[v],k=E.reduce(a(o),{});!1===x&&(k={});let{prevResolvedValues:A={}}=g,j={...A,...k},P=t=>{C=!0,d.has(t)&&(S=!0,d.delete(t)),g.needsAnimating[t]=!0;let r=e.getValue(t);r&&(r.liveStyle=!1)};for(let e in j){let t=k[e],r=A[e];if(!f.hasOwnProperty(e))(T(t)&&T(r)?tJ(t,r):t===r)?void 0!==t&&d.has(e)?P(e):g.protectedKeys[e]=!0:null!=t?P(e):d.add(e)}g.prevProp=v,g.prevResolvedValues=k,g.isActive&&(f={...f,...k}),i&&e.blockInitialAnimation&&(C=!1);let N=!(b&&w)||S;C&&N&&c.push(...E.map(e=>({animation:e,options:{type:o}})))}if(d.size){let t={};if("boolean"!=typeof l.initial){let r=o(e,Array.isArray(l.initial)?l.initial[0]:l.initial);r&&r.transition&&(t.transition=r.transition)}d.forEach(r=>{let n=e.getBaseTarget(r),i=e.getValue(r);i&&(i.liveStyle=!0),t[r]=n??null}),c.push({animation:t})}let g=!!c.length;return i&&(!1===l.initial||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(g=!1),i=!1,g?t(c):Promise.resolve()}return{animateChanges:s,setActive:function(t,n){if(r[t].isActive===n)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,n)),r[t].isActive=n;let i=s(t);for(let e in r)r[e].protectedKeys={};return i},setAnimateFunction:function(r){t=r(e)},getState:()=>r,reset:()=>{r=t6(),i=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();n(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends t7{constructor(){super(...arguments),this.id=t9++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;let n=this.node.animationState.setActive("exit",!e);t&&!e&&n.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends t7{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.unmount();let{viewport:r={}}=this.node.getProps(),{root:n,margin:i,amount:a="some",once:o}=r,s={root:n?n.current:void 0,rootMargin:i,threshold:"number"==typeof a?a:ii[a]},l=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,o&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:r,onViewportLeave:n}=this.node.getProps(),i=t?r:n;i&&i(e)};return e=this.node.current,t=function({root:e,...t}){let r=e||document;ie.has(r)||ie.set(r,{});let n=ie.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(ir,{root:e,...t})),n[i]}(s),n8.set(e,l),t.observe(e),()=>{n8.delete(e),t.unobserve(e)}}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends t7{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,r={}){let[n,i,a]=nQ(e,r),o=e=>{let n=e.currentTarget;if(!n7(e)||n4.has(n))return;n4.add(n);let a=t(n,e),o=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),n7(e)&&n4.has(n)&&(n4.delete(n),"function"==typeof a&&a(e,{success:t}))},s=e=>{o(e,n===window||n===document||r.useGlobalTarget||n2(n,e.target))},l=e=>{o(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",l,i)};
1return n.forEach(e=>{((r.useGlobalTarget?window:e).addEventListener("pointerdown",o,i),e instanceof HTMLElement)&&(e.addEventListener("focus",e=>((e,t)=>{let r=e.currentTarget;if(!r)return;let n=n3(()=>{if(n4.has(r))return;n6(r,"down");let e=n3(()=>{n6(r,"up")});r.addEventListener("keyup",e,t),r.addEventListener("blur",()=>n6(r,"cancel"),t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)})(e,i)),n5.has(e.tagName)||-1!==e.tabIndex||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}(e,(e,t)=>(n9(this.node,t,"Start"),(e,{success:t})=>n9(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends t7{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(re(this.node.current,"focus",()=>this.onFocus()),re(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends t7{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,r={}){let[n,i,a]=nQ(e,r),o=e=>{if(!n0(e))return;let{target:r}=e,n=t(r,e);if("function"!=typeof n||!r)return;let a=e=>{n0(e)&&(n(e),r.removeEventListener("pointerleave",a))};r.addEventListener("pointerleave",a,i)};return n.forEach(e=>{e.addEventListener("pointerenter",o,i)}),a}(e,(e,t)=>(n1(this.node,t,"Start"),e=>n1(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends t7{constructor(){super(...arguments),this.removePointerDownListener=l}onPointerDown(e){this.session=new rN(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rT(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:rU(e),onStart:rU(t),onMove:r,onEnd:(e,t)=>{delete this.session,n&&f.postRender(()=>n(e,t))}}}mount(){this.removePointerDownListener=rn(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 t7{constructor(e){super(e),this.removeGroupControls=l,this.removeListeners=l,this.controls=new rz(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||l}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:nJ,MeasureLayout:r4},layout:{ProjectionNode:nJ,MeasureLayout:r4}},rW=(e,t)=>iN(e)?new ar(t):new ae(t,{allowProjection:e!==rK.Fragment}),function(e,{forwardMotionProps:t}={forwardMotionProps:!1}){return function({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:i}){function a(e,a){var o;let s,l={...(0,rK.useContext)(io),...e,layoutId:function({layoutId:e}){let t=(0,rK.useContext)(rZ).id;return t&&void 0!==e?t+"-"+e:e}(e)},{isStatic:u}=l,c=function(e){let{initial:t,animate:r}=function(e,t){if(il(e)){let{initial:t,animate:r}=e;return{initial:!1===t||tQ(t)?t:void 0,animate:tQ(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,(0,rK.useContext)(is));return(0,rK.useMemo)(()=>({initial:t,animate:r}),[ic(t),ic(r)])}(e),d=n(e,u);if(!u&&id){(0,rK.useContext)(ia).strict;let e=function(e){let{drag:t,layout:r}=ip;if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(l);s=e.MeasureLayout,c.visualElement=function(e,t,r,n,i){let{visualElement:a}=(0,rK.useContext)(is),o=(0,rK.useContext)(ia),s=(0,rK.useContext)(rX),l=(0,rK.useContext)(io).reducedMotion,u=(0,rK.useRef)(null);n=n||o.renderer,!u.current&&n&&(u.current=n(e,{visualState:t,parent:a,props:r,presenceContext:s,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:l}));let c=u.current,d=(0,rK.useContext)(rJ);c&&!c.projection&&i&&("html"===c.type||"svg"===c.type)&&function(e,t,r,n){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&rj(s),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:n,crossfade:c,layoutScroll:l,layoutRoot:u})}(u.current,r,i,d);let f=(0,rK.useRef)(!1);(0,rK.useInsertionEffect)(()=>{c&&f.current&&c.update(r,s)});let h=r[R],p=(0,rK.useRef)(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return ig(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),rq.render(c.render),p.
1current&&c.animationState&&c.animationState.animateChanges())}),(0,rK.useEffect)(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),p.current=!1))}),c}(i,d,l,t,e.ProjectionNode)}return(0,rG.jsxs)(is.Provider,{value:c,children:[s&&c.visualElement?(0,rG.jsx)(s,{visualElement:c.visualElement,...l}):null,r(i,e,(o=c.visualElement,(0,rK.useCallback)(e=>{e&&d.onMount&&d.onMount(e),o&&(e?o.mount(e):o.unmount()),a&&("function"==typeof a?a(e):rj(a)&&(a.current=e))},[o])),d,u,c.visualElement)]})}e&&function(e){for(let t in e)ip[t]={...ip[t],...e[t]}}(e),a.displayName=`motion.${"string"==typeof i?i:`create(${i.displayName??i.name??""})`}`;let o=(0,rK.forwardRef)(a);return o[im]=i,o}({...iN(e)?i$:iV,preloadedFeatures:rH,useRender:function(e=!1){return(t,r,n,{latestValues:i},a)=>{let o=(iN(t)?function(e,t,r,n){let i=(0,rK.useMemo)(()=>{let r=iI();return iD(r,t,iL(n),e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){let t={};ik(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t){let r,n,i={},a=(r=e.style||{},ik(n={},r,e),Object.assign(n,function({transformTemplate:e},t){return(0,rK.useMemo)(()=>{let r=iE();return iS(r,t,e),Object.assign({},r.vars,r.style)},[t])}(e,t)),n);return e.drag&&!1!==e.dragListener&&(i.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=a,i})(r,i,a,t),s=function(e,t,r){let n={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&(ij(i)||!0===r&&iT(i)||!t&&!iT(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}(r,"string"==typeof t,e),l=t!==rK.Fragment?{...s,...o,ref:n}:{},{children:u}=r,c=(0,rK.useMemo)(()=>j(u)?u.get():u,[u]);return(0,rK.createElement)(t,{...l,children:c})}}(t),createVisualElement:rW,Component:e})}));e.s(["motion",0,an],46932)},88653,e=>{"use strict";e.i(47167);var t=e.i(43476),r=e.i(71645),n=e.i(31178),i=e.i(47414),a=e.i(74008),o=e.i(21476),s=r,l=e.i(37806);class u extends s.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,r=e instanceof HTMLElement&&e.offsetWidth||0,n=this.props.sizeRef.current;n.height=t.offsetHeight||0,n.width=t.offsetWidth||0,n.top=t.offsetTop,n.left=t.offsetLeft,n.right=r-n.width-n.left}return null}componentDidUpdate(){}render(){return this.props.children}}function c({children:e,isPresent:r,anchorX:n}){let i=(0,s.useId)(),a=(0,s.useRef)(null),o=(0,s.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:d}=(0,s.useContext)(l.MotionConfigContext);return(0,s.useInsertionEffect)(()=>{let{width:e,height:t,top:s,left:l,right:u}=o.current;if(r||!a.current||!e||!t)return;let c="left"===n?`left: ${l}`:`right: ${u}`;a.current.dataset.motionPopId=i;let f=document.createElement("style");return d&&(f.nonce=d),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
2          [data-motion-pop-id="${i}"] {
3            position: absolute !important;
4            width: ${e}px !important;
5            height: ${t}px !important;
6            ${c}px !important;
7            top: ${s}px !important;
8          }
9        `),()=>{document.head.removeChild(f)}},[r]),(0,t.jsx)(u,{isPresent:r,childRef:a,sizeRef:o,children:s.cloneElement(e,{ref:a})})}let d=({children:e,initial:n,isPresent:a,onExitComplete:s,custom:l,presenceAffectsLayout:u,mode:d,anchorX:h})=>{let p=(0,i.useConstant)(f),m=(0,r.useId)(),g=!0,v=(0,r.useMemo)(()=>(g=!1,{id:m,initial:n,isPresent:a,custom:l,onExitComplete:e=>{for(let t of(p.set(e,!0),p.values()))if(!t)return;s&&s()},register:e=>(p.set(e,!1),()=>p.delete(e))}),[a,p,s]);return u&&g&&(v={...v}),(0,r.useMemo)(()=>{p.forEach((e,t)=>p.set(t,!1))},[a]),r.useEffect(()=>{a||p.size||!s||s()},[a]),"popLayout"===d&&(e=(0,t.jsx)(c,{isPresent:a,anchorX:h,children:e})),(0,t.jsx)(o.PresenceContext.Provider,{value:v,children:e})};function f(){return new Map}var h=e.i(64978);let p=e=>e.key||"";function m(e){let t=[];
9return r.Children.forEach(e,e=>{(0,r.isValidElement)(e)&&t.push(e)}),t}e.s(["AnimatePresence",0,({children:e,custom:o,initial:s=!0,onExitComplete:l,presenceAffectsLayout:u=!0,mode:c="sync",propagate:f=!1,anchorX:g="left"})=>{let[v,y]=(0,h.usePresence)(f),x=(0,r.useMemo)(()=>m(e),[e]),b=f&&!v?[]:x.map(p),w=(0,r.useRef)(!0),C=(0,r.useRef)(x),S=(0,i.useConstant)(()=>new Map),[E,k]=(0,r.useState)(x),[A,T]=(0,r.useState)(x);(0,a.useIsomorphicLayoutEffect)(()=>{w.current=!1,C.current=x;for(let e=0;e<A.length;e++){let t=p(A[e]);b.includes(t)?S.delete(t):!0!==S.get(t)&&S.set(t,!1)}},[A,b.length,b.join("-")]);let j=[];if(x!==E){let e=[...x];for(let t=0;t<A.length;t++){let r=A[t],n=p(r);b.includes(n)||(e.splice(t,0,r),j.push(r))}return"wait"===c&&j.length&&(e=j),T(m(e)),k(x),null}let{forceRender:P}=(0,r.useContext)(n.LayoutGroupContext);return(0,t.jsx)(t.Fragment,{children:A.map(e=>{let r=p(e),n=(!f||!!v)&&(x===A||b.includes(r));return(0,t.jsx)(d,{isPresent:n,initial:(!w.current||!!s)&&void 0,custom:o,presenceAffectsLayout:u,mode:c,onExitComplete:n?void 0:()=>{if(!S.has(r))return;S.set(r,!0);let e=!0;S.forEach(t=>{t||(e=!1)}),e&&(P?.(),T(C.current),f&&y?.(),l&&l())},anchorX:g,children:e},r)})})}],88653)},72328,e=>{"use strict";var t=e.i(71645),r=e.i(22875),n=e.i(96097);e.s(["useReducedMotion",0,function(){n.hasReducedMotionListener.current||(0,r.initPrefersReducedMotion)();let[e]=(0,t.useState)(n.prefersReducedMotion.current);return e}])},91918,20783,e=>{"use strict";var t=e.i(71645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t=>{let n=!1,i=e.map(e=>{let i=r(e,t);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let t=0;t<i.length;t++){let n=i[t];"function"==typeof n?n():r(e[t],null)}}}}e.s(["composeRefs",0,n,"useComposedRefs",0,function(...e){return t.useCallback(n(...e),e)}],20783);var i=e.i(43476);function a(e){var r;let a,o=(r=e,(a=t.forwardRef((e,r)=>{let{children:i,...a}=e;if(t.isValidElement(i)){var o;let e,s,l=(o=i,(s=(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(s=(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref),u=function(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{a(...e),i(...e)}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(a,i.props);return i.type!==t.Fragment&&(u.ref=r?n(r,l):l),t.cloneElement(i,u)}return t.Children.count(i)>1?t.Children.only(null):null})).displayName=`${r}.SlotClone`,a),s=t.forwardRef((e,r)=>{let{children:n,...a}=e,s=t.Children.toArray(n),u=s.find(l);if(u){let e=u.props.children,n=s.map(r=>r!==u?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(o,{...a,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(o,{...a,ref:r,children:n})});return s.displayName=`${e}.Slot`,s}var o=a("Slot"),s=Symbol("radix.slottable");function l(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===s}e.s(["Slot",0,o,"createSlot",0,a],91918)},19455,e=>{"use strict";let t,r;var n=e.i(43476),i=e.i(71645),a=e.i(91918),o=e.i(7670);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,l=o.clsx;var u=e.i(75157);let c=(t="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r={variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",brand:"rounded-full bg-brand text-primary-foreground shadow-cta ring-1 ring-inset ring-white/10 transition-all duration-200 hover:bg-brand-hover hover:-translate-y-
9px hover:shadow-cta-hover active:translate-y-0 active:scale-[0.98]",gradient:"rounded-full bg-brand-gradient-cta text-white shadow-cta ring-1 ring-inset ring-white/15 transition-all duration-200 hover:-translate-y-px hover:shadow-cta-hover hover:brightness-[1.04] active:translate-y-0 active:scale-[0.98]",glass:"rounded-full glass text-foreground hover:bg-muted active:scale-[0.98]","glass-light":"rounded-full border border-white/65 bg-white/35 text-foreground shadow-glass backdrop-blur-xl ring-1 ring-inset ring-white/35 transition-all duration-200 hover:-translate-y-px hover:bg-white/55 hover:shadow-glass active:translate-y-0 active:scale-[0.98] dark:border-white/10 dark:bg-white/10 dark:text-white dark:hover:bg-white/15","ghost-outline":"rounded-full border border-border-strong bg-transparent text-foreground hover:bg-muted active:scale-[0.98]"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9",pill:"h-11 min-h-[44px] px-5"}},defaultVariants:{variant:"default",size:"default"}},e=>{var n;if((null==r?void 0:r.variants)==null)return l(t,null==e?void 0:e.class,null==e?void 0:e.className);let{variants:i,defaultVariants:a}=r,o=Object.keys(i).map(t=>{let r=null==e?void 0:e[t],n=null==a?void 0:a[t];if(null===r)return null;let o=s(r)||s(n);return i[t][o]}),u=e&&Object.entries(e).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return l(t,o,null==r||null==(n=r.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...i}=t;return Object.entries(i).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...a,...u}[t]):({...a,...u})[t]===r})?[...e,r,n]:e},[]),null==e?void 0:e.class,null==e?void 0:e.className)}),d=i.forwardRef(({className:e,variant:t,size:r,asChild:i=!1,...o},s)=>{let l=i?a.Slot:"button";return(0,n.jsx)(l,{className:(0,u.cn)(c({variant:t,size:r,className:e})),ref:s,...o})});d.displayName="Button",e.s(["Button",0,d],19455)},30013,e=>{"use strict";var t=e.i(71645);function r(e){return"[object Object]"===Object.prototype.toString.call(e)||Array.isArray(e)}function n(e,t){let i=Object.keys(e),a=Object.keys(t);return i.length===a.length&&JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&i.every(i=>{let a=e[i],o=t[i];return"function"==typeof a?`${a}`==`${o}`:r(a)&&r(o)?n(a,o):a===o})}function i(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function a(e){return"number"==typeof e}function o(e){return"string"==typeof e}function s(e){return"boolean"==typeof e}function l(e){return"[object Object]"===Object.prototype.toString.call(e)}function u(e){return Math.abs(e)}function c(e){return Math.sign(e)}function d(e){return m(e).map(Number)}function f(e){return e[h(e)]}function h(e){return Math.max(0,e.length-1)}function p(e,t=0){return Array.from(Array(e),(e,r)=>t+r)}function m(e){return Object.keys(e)}function g(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function v(){let e=[],t={add:function(r,n,i,a={passive:!0}){let o;return"addEventListener"in r?(r.addEventListener(n,i,a),o=()=>r.removeEventListener(n,i,a)):(r.addListener(i),o=()=>r.removeListener(i)),e.push(o),t},clear:function(){e=e.filter(e=>e())}};return t}function y(e=0,t=0){let r=u(e-t);function n(r){return r<e||r>t}return{length:r,max:t,min:e,constrain:function(r){return n(r)?r<e?e:t:r},reachedAny:n,reachedMax:function(e){return e>t},reachedMin:function(t){return t<e},removeOffset:function(e){return r?e-r*Math.ceil((e-t)/r):e}}}function x(e){let t=e;function r(e){return a(e)?e:e.get()}return{get:function(){return t},set:function(e){t=r(e)},add:function(e){t+=r(e)},subtract:function(e){t-=r(e)}}}function b(e,t){let r="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},n=t.style,i=null,a=!1;return{clear:function(){!a&&(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(a)return;let o=Math.round(100*e.direction(t))/100;o!==i&&(n.transform=r(o),i=o)},toggleActive:function(e){a=!e}}}let w={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function C(e,t,r){let n,i,S,E,k,A,T,j,P=e.ownerDocument,N=P.defaultView,R=function(e){function t(e,t){return function e(t,r){return[t,r].reduce((t,r)=>(m(r).forEach(n=>{let i=t[n],a=r[n],o=l(i)&&l(a);t[n]=o?e(i,a):a}),t),{})}(e,t||{})}return{mergeOptions:t,optionsAtMedia:function(r){let n=r.breakpoints||{},i=m(n).filter(t=>e.matchMedia(t).matches).map(e=>n[e]).reduce((e,r)=>t(e,r),{});return t(r,i)},optionsMediaQueries:function(t){return t.map(e=>m(e.breakpoints||{})).reduce((e,t)=>
9e.concat(t),[]).map(e.matchMedia)}}}(N),M=(j=[],{init:function(e,t){return(j=t.filter(({options:e})=>!1!==R.optionsAtMedia(e).active)).forEach(t=>t.init(e,R)),t.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})},destroy:function(){j=j.filter(e=>e.destroy())}}),D=v(),I=(i={},S={init:function(e){n=e},emit:function(e){return(i[e]||[]).forEach(t=>t(n,e)),S},off:function(e,t){return i[e]=(i[e]||[]).filter(e=>e!==t),S},on:function(e,t){return i[e]=(i[e]||[]).concat([t]),S},clear:function(){i={}}}),{mergeOptions:L,optionsAtMedia:O,optionsMediaQueries:F}=R,{on:B,off:V,emit:z}=I,$=!1,U=L(w,C.globalOptions),_=L(U),H=[];function W(t,r){$||(_=O(U=L(U,t)),H=r||H,function(){let{container:t,slides:r}=_;A=(o(t)?e.querySelector(t):t)||e.children[0];let n=o(r)?A.querySelectorAll(r):r;T=[].slice.call(n||A.children)}(),E=function t(r){let n=function(e,t,r,n,i,l,w){var C,S;let E,k,A,T,j,P,N,R,M,D,I,L,O,F,{align:B,axis:V,direction:z,startIndex:$,loop:U,duration:_,dragFree:H,dragThreshold:W,inViewThreshold:G,slidesToScroll:q,skipSnaps:K,containScroll:X,watchResize:Y,watchSlides:Z,watchDrag:J,watchFocus:Q}=l,ee={measure:function(e){let{offsetTop:t,offsetLeft:r,offsetWidth:n,offsetHeight:i}=e;return{top:t,right:r+n,bottom:t+i,left:r,width:n,height:i}}},et=ee.measure(t),er=r.map(ee.measure),en=(k="rtl"===z,T=(A="y"===V)||!k?1:-1,j=A?"top":k?"right":"left",P=A?"bottom":k?"left":"right",{scroll:A?"y":"x",cross:A?"x":"y",startEdge:j,endEdge:P,measureSize:function(e){let{height:t,width:r}=e;return A?t:r},direction:function(e){return e*T}}),ei=en.measureSize(et),ea={measure:function(e){return e/100*ei}},eo=(C=B,S=ei,E={start:function(){return 0},center:function(e){return(S-e)/2},end:function(e){return S-e}},{measure:function(e,t){return o(C)?E[C](e):C(S,e,t)}}),es=!U&&!!X,{slideSizes:el,slideSizesWithGaps:eu,startGap:ec,endGap:ed}=function(e,t,r,n,i,a){let{measureSize:o,startEdge:s,endEdge:l}=e,c=r[0]&&i,d=function(){if(!c)return 0;let e=r[0];return u(t[s]-e[s])}(),p=c?parseFloat(a.getComputedStyle(f(n)).getPropertyValue(`margin-${l}`)):0,m=r.map(o),g=r.map((e,t,r)=>{let n=t===h(r);return t?n?m[t]+p:r[t+1][s]-e[s]:m[t]+d}).map(u);return{slideSizes:m,slideSizesWithGaps:g,startGap:d,endGap:p}}(en,et,er,r,U||!!X,i),ef=function(e,t,r,n,i,o,s,l){let{startEdge:c,endEdge:p,direction:m}=e,g=a(r);return{groupSlides:function(e){return g?d(e).filter(e=>e%r==0).map(t=>e.slice(t,t+r)):e.length?d(e).reduce((r,a,d)=>{let g=f(r)||0,v=a===h(e),y=i[c]-o[g][c],x=i[c]-o[a][p],b=n||0!==g?0:m(s),w=u(x-(!n&&v?m(l):0)-(y+b));return d&&w>t+2&&r.push(a),v&&r.push(e.length),r},[]).map((t,r,n)=>{let i=Math.max(n[r-1]||0);return e.slice(i,t)}):[]}}}(en,ei,q,U,et,er,ec,ed),{snaps:eh,snapsAligned:ep}=function(e,t,r,n,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,l=s(n).map(e=>f(e)[o]-e[0][a]).map(u).map(t.measure),c=n.map(e=>r[a]-e[a]).map(e=>-u(e)),d=s(c).map(e=>e[0]).map((e,t)=>e+l[t]);return{snaps:c,snapsAligned:d}}(en,eo,et,er,ef),em=-f(eh)+f(eu),{snapsContained:eg,scrollContainLimit:ev}=function(e,t,r,n){let i,a,o=y(-t+e,0),s=r.map((e,t)=>{let{min:n,max:i}=o,a=o.constrain(e),s=t===h(r);return t?s||function(e,t){return 1>=u(e-t)}(n,a)?n:function(e,t){return 1>=u(e-t)}(i,a)?i:a:i}).map(e=>parseFloat(e.toFixed(3))),l=(i=s[0],a=f(s),y(s.lastIndexOf(i),s.indexOf(a)+1));return{snapsContained:function(){if(t<=e+2)return[o.max];if("keepSnaps"===n)return s;let{min:r,max:i}=l;return s.slice(r,i)}(),scrollContainLimit:l}}(ei,em,ep,X),ey=es?eg:ep,{limit:ex}=(N=ey[0],{limit:y(U?N-em:f(ey),N)}),eb=function e(t,r,n){let{constrain:i}=y(0,t),a=t+1,o=s(r);function s(e){return n?u((a+e)%a):i(e)}function l(){return e(t,o,n)}let c={get:function(){return o},set:function(e){return o=s(e),c},add:function(e){return l().set(o+e)},clone:l};return c}(h(ey),$,U),ew=eb.clone(),eC=d(r),eS=function(e,t,r,n){let i=v(),a=1e3/60,o=null,s=0,l=0;function u(e){if(!l)return;o||(o=e,r(),r());let i=e-o;for(o=e,s+=i;s>=a;)r(),s-=a;n(s/a),l&&(l=t.requestAnimationFrame(u))}function c(){t.cancelAnimationFrame(l),o=null,s=0,l=0}return{init:function(){i.add(e,"visibilitychange",()=>{e.hidden&&(o=null,s=0)})},destroy:function(){c(),i.clear()},start:function(){l||(l=t.requestAnimationFrame(u))},stop:c,update:r,render:n}}(n,i,()=>(({dragHandler:e,scrollBody:t,scrollBounds:r,options:{loop:n}})=>{n||r.constrain(e.pointerDown()),t.seek()})(eF),e=>(({scrollBody:e,translate:t,location:r,offsetLocation:n,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:l,eventHandler:u,scrollBounds:c,options:{loop:d}},f)=>{let h=e.settled(),p=!c.shouldConstrain(),m=d?h:h&&p,g=m&&!s.pointerDown();g&&l.stop();let v=r.get()*f+i.get()*(1-f);n.set(v),d&&(a.loop(e.direction()),o.loop()),t.to(n.get()),g&&u.emit("settle"),m||u.emit("scroll")})(eF,e)),eE=ey[eb.get()],ek=x(eE),eA=x(eE),eT=x(eE),ej=x(eE),eP=function(e,t,r,n,i){let a=0,o=0,s=i,l=.68,d=e.get(),f=0;function h(e){return s=e,m}function p(e){return l=e,m}let m={direction:function(){return o},duration:function(){return s},velocity:function(){return a},seek:function(){let t=n.get()-e.get(),i=0;return s?(r.set(e),a+=t/s,a*=l,d+=a,e.add(a),i=d-f):(a=0,r.set(n),e.set(n),i=t),o=c(i),f=d,m},settled:function(){return .001>u(n.get()-t.get())},useBaseFriction:function(){return p(.68)},useBaseDuration:function(){return h(i)},useFriction:p,useDuration:h};return m}(ek,eT,eA,ej,_),eN=function(e,t,r,n,i){let{reachedAny:a,removeOffset:o,constrain:s}=n;function l(e){return e.concat().sort((e,t)=>
9u(e)-u(t))[0]}function d(t,n){let i=[t,t+r,t-r];if(!e)return t;if(!n)return l(i);let a=i.filter(e=>c(e)===n);return a.length?l(a):f(i)-r}return{byDistance:function(r,n){let l=i.get()+r,{index:c,distance:f}=function(r){let n=e?o(r):s(r),{index:i}=t.map((e,t)=>({diff:d(e-n,0),index:t})).sort((e,t)=>u(e.diff)-u(t.diff))[0];return{index:i,distance:n}}(l),h=!e&&a(l);if(!n||h)return{index:c,distance:r};let p=r+d(t[c]-f,0);return{index:c,distance:p}},byIndex:function(e,r){let n=d(t[e]-i.get(),r);return{index:e,distance:n}},shortcut:d}}(U,ey,em,ex,ej),eR=function(e,t,r,n,i,a,o){function s(i){let s=i.distance,l=i.index!==t.get();a.add(s),s&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),l&&(r.set(t.get()),t.set(i.index),o.emit("select"))}return{distance:function(e,t){s(i.byDistance(e,t))},index:function(e,r){let n=t.clone().set(e);s(i.byIndex(n.get(),r))}}}(eS,eb,ew,eP,eN,ej,w),eM=function(e){let{max:t,length:r}=e;return{get:function(e){return r?-((e-t)/r):0}}}(ex),eD=v(),eI=(M={},D=null,I=null,L=!1,{init:function(){R=new IntersectionObserver(e=>{L||(e.forEach(e=>{M[r.indexOf(e.target)]=e}),D=null,I=null,w.emit("slidesInView"))},{root:t.parentElement,threshold:G}),r.forEach(e=>R.observe(e))},destroy:function(){R&&R.disconnect(),L=!0},get:function(e=!0){if(e&&D)return D;if(!e&&I)return I;let t=m(M).reduce((t,r)=>{let n=parseInt(r),{isIntersecting:i}=M[n];return(e&&i||!e&&!i)&&t.push(n),t},[]);return e&&(D=t),e||(I=t),t}}),{slideRegistry:eL}=function(e,t,r,n,i,a){let o,{groupSlides:s}=i,{min:l,max:u}=n;return{slideRegistry:(o=s(a),1===r.length?[a]:e&&"keepSnaps"!==t?o.slice(l,u).map((e,t,r)=>{let n=t===h(r);return t?n?p(h(a)-f(r)[0]+1,f(r)[0]):e:p(f(r[0])+1)}):o)}}(es,X,ey,ev,ef,eC),eO=function(e,t,r,n,i,o,l,u){let c={passive:!0,capture:!0},d=0;function f(e){"Tab"===e.code&&(d=new Date().getTime())}return{init:function(h){u&&(o.add(document,"keydown",f,!1),t.forEach((t,f)=>{o.add(t,"focus",t=>{(s(u)||u(h,t))&&function(t){if(new Date().getTime()-d>10)return;l.emit("slideFocusStart"),e.scrollLeft=0;let o=r.findIndex(e=>e.includes(t));a(o)&&(i.useDuration(0),n.index(o,0),l.emit("slideFocus"))}(f)},c)}))}}}(e,r,eL,eR,eP,eD,w,Q),eF={ownerDocument:n,ownerWindow:i,eventHandler:w,containerRect:et,slideRects:er,animation:eS,axis:en,dragHandler:function(e,t,r,n,i,a,o,l,d,f,h,p,m,x,b,w,C,S){let{cross:E,direction:k}=e,A=["INPUT","SELECT","TEXTAREA"],T={passive:!1},j=v(),P=v(),N=y(50,225).constrain(x.measure(20)),R={mouse:300,touch:400},M={mouse:500,touch:600},D=b?43:25,I=!1,L=0,O=0,F=!1,B=!1,V=!1,z=!1;function $(e){if(!g(e,n)&&e.touches.length>=2)return U(e);let t=a.readPoint(e),r=a.readPoint(e,E),o=u(t-L),s=u(r-O);if(!B&&!z&&(!e.cancelable||!(B=o>s)))return U(e);let c=a.pointerMove(e);o>w&&(V=!0),f.useFriction(.3).useDuration(.75),l.start(),i.add(k(c)),e.preventDefault()}function U(e){var t;let r,n,i=h.byDistance(0,!1).index!==p.get(),o=a.pointerUp(e)*(b?M:R)[z?"mouse":"touch"],s=(t=k(o),r=p.add(-1*c(t)),n=h.byDistance(t,!b).distance,b||u(t)<N?n:C&&i?.5*n:h.byIndex(r.get(),0).distance),l=function(e,t){var r,n;if(0===e||0===t||u(e)<=u(t))return 0;let i=(r=u(e),n=u(t),u(r-n));return u(i/e)}(o,s);B=!1,F=!1,P.clear(),f.useDuration(D-10*l).useFriction(.68+l/50),d.distance(s,!b),z=!1,m.emit("pointerUp")}function _(e){V&&(e.stopPropagation(),e.preventDefault(),V=!1)}return{init:function(e){S&&j.add(t,"dragstart",e=>e.preventDefault(),T).add(t,"touchmove",()=>void 0,T).add(t,"touchend",()=>void 0).add(t,"touchstart",l).add(t,"mousedown",l).add(t,"touchcancel",U).add(t,"contextmenu",U).add(t,"click",_,!0);function l(l){(s(S)||S(e,l))&&function(e){let s,l=g(e,n);if((z=l,V=b&&l&&!e.buttons&&I,I=u(i.get()-o.get())>=2,!l||0===e.button)&&(s=e.target.nodeName||"",!A.includes(s))){let n;F=!0,a.pointerDown(e),f.useFriction(0).useDuration(0),i.set(o),n=z?r:t,P.add(n,"touchmove",$,T).add(n,"touchend",U).add(n,"mousemove",$,T).add(n,"mouseup",U),L=a.readPoint(e),O=a.readPoint(e,E),m.emit("pointerDown")}}(l)}},destroy:function(){j.clear(),P.clear()},pointerDown:function(){return F}}}(en,e,n,i,ej,function(e,t){let r,n;function i(e){return e.timeStamp}function a(r,n){let i=n||e.scroll,a=`client${"x"===i?"X":"Y"}`;return(g(r,t)?r:r.touches[0])[a]}return{pointerDown:function(e){return r=e,n=e,a(e)},pointerMove:function(e){let t=a(e)-a(n),o=i(e)-i(r)>170;return n=e,o&&(r=e),t},pointerUp:function(e){if(!r||!n)return 0;let t=a(n)-a(r),o=i(e)-i(r),s=i(e)-i(n)>170,l=t/o;return o&&!s&&u(l)>.1?l:0},readPoint:a}}(en,i),ek,eS,eR,eP,eN,eb,w,ea,H,W,K,J),eventStore:eD,percentOfView:ea,index:eb,indexPrevious:ew,limit:ex,location:ek,offsetLocation:eT,previousLocation:eA,options:l,resizeHandler:function(e,t,r,n,i,a,o){let l,c,d=[e].concat(n),f=[],h=!1;function p(e){return i.measureSize(o.measure(e))}return{init:function(i){a&&(c=p(e),f=n.map(p),l=new ResizeObserver(r=>{(s(a)||a(i,r))&&function(r){for(let a of r){if(h)return;let r=a.target===e,o=n.indexOf(a.target),s=r?c:f[o];if(u(p(r?e:n[o])-s)>=.5){i.reInit(),t.emit("resize");break}}}(r)}),r.requestAnimationFrame(()=>
9{d.forEach(e=>l.observe(e))}))},destroy:function(){h=!0,l&&l.disconnect()}}}(t,w,i,r,en,Y,ee),scrollBody:eP,scrollBounds:function(e,t,r,n,i){let a=i.measure(10),o=i.measure(50),s=y(.1,.99),l=!1;function c(){return!l&&!!e.reachedAny(r.get())&&!!e.reachedAny(t.get())}return{shouldConstrain:c,constrain:function(i){if(!c())return;let l=e.reachedMin(t.get())?"min":"max",d=u(e[l]-t.get()),f=r.get()-t.get(),h=s.constrain(d/o);r.subtract(f*h),!i&&u(f)<a&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())},toggleActive:function(e){l=!e}}}(ex,eT,ej,eP,ea),scrollLooper:function(e,t,r,n){let{reachedMin:i,reachedMax:a}=y(t.min+.1,t.max+.1);return{loop:function(t){if(!(1===t?a(r.get()):-1===t&&i(r.get())))return;let o=-1*t*e;n.forEach(e=>e.add(o))}}}(em,ex,eT,[ek,eT,eA,ej]),scrollProgress:eM,scrollSnapList:ey.map(eM.get),scrollSnaps:ey,scrollTarget:eN,scrollTo:eR,slideLooper:function(e,t,r,n,i,a,o,s,l){let u=d(i),c=d(i).reverse(),f=m(p(c,o[0]),r,!1).concat(m(p(u,t-o[0]-1),-r,!0));function h(e,t){return e.reduce((e,t)=>e-i[t],t)}function p(e,t){return e.reduce((e,r)=>h(e,t)>0?e.concat([r]):e,[])}function m(i,o,u){let c=a.map((e,r)=>({start:e-n[r]+.5+o,end:e+t-.5+o}));return i.map(t=>{let n=u?0:-r,i=u?r:0,a=c[t][u?"end":"start"];return{index:t,loopPoint:a,slideLocation:x(-1),translate:b(e,l[t]),target:()=>s.get()>a?n:i}})}return{canLoop:function(){return f.every(({index:e})=>.1>=h(u.filter(t=>t!==e),t))},clear:function(){f.forEach(e=>e.translate.clear())},loop:function(){f.forEach(e=>{let{target:t,translate:r,slideLocation:n}=e,i=t();i!==n.get()&&(r.to(i),n.set(i))})},loopPoints:f}}(en,ei,em,el,eu,eh,ey,eT,r),slideFocus:eO,slidesHandler:(F=!1,{init:function(e){Z&&(O=new MutationObserver(t=>{!F&&(s(Z)||Z(e,t))&&function(t){for(let r of t)if("childList"===r.type){e.reInit(),w.emit("slidesChanged");break}}(t)})).observe(t,{childList:!0})},destroy:function(){O&&O.disconnect(),F=!0}}),slidesInView:eI,slideIndexes:eC,slideRegistry:eL,slidesToScroll:ef,target:ej,translate:b(en,t)};return eF}(e,A,T,P,N,r,I);return r.loop&&!n.slideLooper.canLoop()?t(Object.assign({},r,{loop:!1})):n}(_),F([U,...H.map(({options:e})=>e)]).forEach(e=>D.add(e,"change",G)),_.active&&(E.translate.to(E.location.get()),E.animation.init(),E.slidesInView.init(),E.slideFocus.init(Y),E.eventHandler.init(Y),E.resizeHandler.init(Y),E.slidesHandler.init(Y),E.options.loop&&E.slideLooper.loop(),A.offsetParent&&T.length&&E.dragHandler.init(Y),k=M.init(Y,H)))}function G(e,t){let r=X();q(),W(L({startIndex:r},e),t),I.emit("reInit")}function q(){E.dragHandler.destroy(),E.eventStore.clear(),E.translate.clear(),E.slideLooper.clear(),E.resizeHandler.destroy(),E.slidesHandler.destroy(),E.slidesInView.destroy(),E.animation.destroy(),M.destroy(),D.clear()}function K(e,t,r){_.active&&!$&&(E.scrollBody.useBaseFriction().useDuration(!0===t?0:_.duration),E.scrollTo.index(e,r||0))}function X(){return E.index.get()}let Y={canScrollNext:function(){return E.index.add(1).get()!==X()},canScrollPrev:function(){return E.index.add(-1).get()!==X()},containerNode:function(){return A},internalEngine:function(){return E},destroy:function(){$||($=!0,D.clear(),q(),I.emit("destroy"),I.clear())},off:V,on:B,emit:z,plugins:function(){return k},previousScrollSnap:function(){return E.indexPrevious.get()},reInit:G,rootNode:function(){return e},scrollNext:function(e){K(E.index.add(1).get(),e,-1)},scrollPrev:function(e){K(E.index.add(-1).get(),e,1)},scrollProgress:function(){return E.scrollProgress.get(E.offsetLocation.get())},scrollSnapList:function(){return E.scrollSnapList},scrollTo:K,selectedScrollSnap:X,slideNodes:function(){return T},slidesInView:function(){return E.slidesInView.get()},slidesNotInView:function(){return E.slidesInView.get(!1)}};return W(t,r),setTimeout(()=>I.emit("init"),0),Y}function S(e={},r=[]){let a=(0,t.useRef)(e),o=(0,t.useRef)(r),[s,l]=(0,t.useState)(),[u,c]=(0,t.useState)(),d=(0,t.useCallback)(()=>{s&&s.reInit(a.current,o.current)},[s]);return(0,t.useEffect)(()=>{n(a.current,e)||(a.current=e,d())},[e,d]),(0,t.useEffect)(()=>{!function(e,t){if(e.length!==t.length)return!1;let r=i(e),a=i(t);return r.every((e,t)=>n(e,a[t]))}(o.current,r)&&(o.current=r,d())},[r,d]),(0,t.useEffect)(()=>
9{if("u">typeof window&&window.document&&window.document.createElement&&u){C.globalOptions=S.globalOptions;let e=C(u,a.current,o.current);return l(e),()=>e.destroy()}l(void 0)},[u,l]),[c,s]}C.globalOptions=void 0,S.globalOptions=void 0,e.s(["default",0,S],30013)},23211,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(30013),i=e.i(71689),a=e.i(72520),o=e.i(75157),s=e.i(19455);let l=r.createContext(null);function u(){let e=r.useContext(l);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}let c=r.forwardRef(({orientation:e="horizontal",opts:i,setApi:a,plugins:s,className:u,children:c,...d},f)=>{let[h,p]=(0,n.default)({...i,axis:"horizontal"===e?"x":"y"},s),[m,g]=r.useState(!1),[v,y]=r.useState(!1),x=r.useCallback(e=>{e&&(g(e.canScrollPrev()),y(e.canScrollNext()))},[]),b=r.useCallback(()=>{p?.scrollPrev()},[p]),w=r.useCallback(()=>{p?.scrollNext()},[p]),C=r.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),b()):"ArrowRight"===e.key&&(e.preventDefault(),w())},[b,w]);return r.useEffect(()=>{p&&a&&a(p)},[p,a]),r.useEffect(()=>{if(p)return x(p),p.on("reInit",x),p.on("select",x),()=>{p?.off("select",x)}},[p,x]),(0,t.jsx)(l.Provider,{value:{carouselRef:h,api:p,opts:i,orientation:e||(i?.axis==="y"?"vertical":"horizontal"),scrollPrev:b,scrollNext:w,canScrollPrev:m,canScrollNext:v},children:(0,t.jsx)("div",{ref:f,onKeyDown:C,className:(0,o.cn)("relative",u),role:"region","aria-roledescription":"carousel",...d,children:c})})});c.displayName="Carousel";let d=r.forwardRef(({className:e,...r},n)=>{let{carouselRef:i,orientation:a}=u();return(0,t.jsx)("div",{ref:i,className:"overflow-hidden",children:(0,t.jsx)("div",{ref:n,className:(0,o.cn)("flex","horizontal"===a?"-ml-4":"-mt-4 flex-col",e),...r})})});d.displayName="CarouselContent";let f=r.forwardRef(({className:e,...r},n)=>{let{orientation:i}=u();return(0,t.jsx)("div",{ref:n,role:"group","aria-roledescription":"slide",className:(0,o.cn)("min-w-0 shrink-0 grow-0 basis-full","horizontal"===i?"pl-4":"pt-4",e),...r})});f.displayName="CarouselItem",r.forwardRef(({className:e,variant:r="outline",size:n="icon",...a},l)=>{let{orientation:c,scrollPrev:d,canScrollPrev:f}=u();return(0,t.jsxs)(s.Button,{ref:l,variant:r,size:n,className:(0,o.cn)("absolute  h-8 w-8 rounded-full","horizontal"===c?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!f,onClick:d,...a,children:[(0,t.jsx)(i.ArrowLeft,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Previous slide"})]})}).displayName="CarouselPrevious",r.forwardRef(({className:e,variant:r="outline",size:n="icon",...i},l)=>{let{orientation:c,scrollNext:d,canScrollNext:f}=u();return(0,t.jsxs)(s.Button,{ref:l,variant:r,size:n,className:(0,o.cn)("absolute h-8 w-8 rounded-full","horizontal"===c?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!f,onClick:d,...i,children:[(0,t.jsx)(a.ArrowRight,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Next slide"})]})}).displayName="CarouselNext",e.s(["Carousel",0,c,"CarouselContent",0,d,"CarouselItem",0,f])},30030,e=>{"use strict";var t=e.i(71645),r=e.i(43476);e.s(["createContext",0,function(e,n){let i=t.createContext(n),a=e=>{let{children:n,...a}=e,o=t.useMemo(()=>a,Object.values(a));return(0,r.jsx)(i.Provider,{value:o,children:n})};return a.displayName=e+"Provider",[a,function(r){let a=t.useContext(i);if(a)return a;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${e}\``)}]},"createContextScope",0,function(e,n=[]){let i=[],a=()=>{let r=i.map(e=>t.createContext(e));return function(n){let i=n?.[e]||r;return t.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return a.scopeName=e,[function(n,a){let o=t.createContext(a),s=i.length;i=[...i,a];let l=n=>{let{scope:i,children:a,...l}=n,u=i?.[e]?.[s]||o,c=t.useMemo(()=>l,Object.values(l));return(0,r.jsx)(u.Provider,{value:c,children:a})};return l.displayName=n+"Provider",[l,function(r,i){let l=i?.[e]?.[s]||o,u=t.useContext(l);if(u)return u;if(void 0!==a)return a;throw Error(`\`${r}\` must be used within \`${n}\``)}]},function(...e){let r=e[0];if(1===e.length)return r;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return t.useMemo(()=>({[`__scope${r.scopeName}`]:i}),[i])}};return n.scopeName=r.scopeName,n}(a,...n)]}])},75830,e=>{"use strict";var t=e.i(71645),r=e.i(30030),n=e.i(20783),i=e.i(91918),a=e.i(43476),o=new WeakMap;function s(e,t){var r,n;let i,a,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let s=(r=e,n=t,i=r.length,(o=(a=l(n))>=0?a:i+a)<0||o>=i?-1:o);return -1===s?void 0:e[s]}function l(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],o.set(this,!0)}set(e,t){return o.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),a=this.#e.length,o=l(e),s=o>=0?o:a+o,u=s<0||s>=a?-1:s;if(u===this.size||i&&u===this.size-1||-1===u)return this.set(t,r),this;let c=this.size+ +!i;o<0&&s++;let d=[...this.#e],f=!1;for(let e=s;e<c;e++)if(s===e){let a=d[e];d[e]===t&&(a=d[e+1]),i&&this.delete(t),n=this.get(a),this.set(t,r)}else{f||d[e-1]!==t||(f=!0);let r=d[f?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=s(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=s(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return s(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);
9n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,function(e){let o=e+"CollectionProvider",[s,l]=(0,r.createContextScope)(o),[u,c]=s(o,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:r,children:n}=e,i=t.default.useRef(null),o=t.default.useRef(new Map).current;return(0,a.jsx)(u,{scope:r,itemMap:o,collectionRef:i,children:n})};d.displayName=o;let f=e+"CollectionSlot",h=(0,i.createSlot)(f),p=t.default.forwardRef((e,t)=>{let{scope:r,children:i}=e,o=c(f,r),s=(0,n.useComposedRefs)(t,o.collectionRef);return(0,a.jsx)(h,{ref:s,children:i})});p.displayName=f;let m=e+"CollectionItemSlot",g="data-radix-collection-item",v=(0,i.createSlot)(m),y=t.default.forwardRef((e,r)=>{let{scope:i,children:o,...s}=e,l=t.default.useRef(null),u=(0,n.useComposedRefs)(r,l),d=c(m,i);return t.default.useEffect(()=>(d.itemMap.set(l,{ref:l,...s}),()=>void d.itemMap.delete(l))),(0,a.jsx)(v,{...{[g]:""},ref:u,children:o})});return y.displayName=m,[{Provider:d,Slot:p,ItemSlot:y},function(r){let n=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},l]}])},81140,e=>{"use strict";e.s(["composeEventHandlers",0,function(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}])},34620,e=>{"use strict";var t=e.i(71645),r=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["useLayoutEffect",0,r])},69340,e=>{"use strict";var t=e.i(71645),r=e.i(34620);t[" useEffectEvent ".trim().toString()],t[" useInsertionEffect ".trim().toString()];var n=t[" useInsertionEffect ".trim().toString()]||r.useLayoutEffect;Symbol("RADIX:SYNC_STATE"),e.s(["useControllableState",0,function({prop:e,defaultProp:r,onChange:i=()=>{},caller:a}){let[o,s,l]=function({defaultProp:e,onChange:r}){let[i,a]=t.useState(e),o=t.useRef(i),s=t.useRef(r);return n(()=>{s.current=r},[r]),t.useEffect(()=>{o.current!==i&&(s.current?.(i),o.current=i)},[i,o]),[i,a,s]}({defaultProp:r,onChange:i}),u=void 0!==e,c=u?e:o;{let r=t.useRef(void 0!==e);t.useEffect(()=>{let e=r.current;if(e!==u){let t=u?"controlled":"uncontrolled";console.warn(`${a} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}r.current=u},[u,a])}return[c,t.useCallback(t=>{if(u){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else s(t)},[u,e,s,l])]}],69340)},48425,e=>{"use strict";var t=e.i(71645),r=e.i(74080),n=e.i(91918),i=e.i(43476),a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{let a=(0,n.createSlot)(`Primitive.${r}`),o=t.forwardRef((e,t)=>{let{asChild:n,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(n?a:r,{...o,ref:t})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{});e.s(["Primitive",0,a,"dispatchDiscreteCustomEvent",0,function(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}])},96626,e=>{"use strict";var t=e.i(71645),r=e.i(20783),n=e.i(34620),i=e=>{var i;let o,s,{present:l,children:u}=e,c=function(e){var r,i;let[o,s]=t.useState(),l=t.useRef(null),u=t.useRef(e),c=t.useRef("none"),[d,f]=(r=e?"mounted":"unmounted",i={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>
9i[e][t]??e,r));return t.useEffect(()=>{let e=a(l.current);c.current="mounted"===d?e:"none"},[d]),(0,n.useLayoutEffect)(()=>{let t=l.current,r=u.current;if(r!==e){let n=c.current,i=a(t);e?f("MOUNT"):"none"===i||t?.display==="none"?f("UNMOUNT"):r&&n!==i?f("ANIMATION_OUT"):f("UNMOUNT"),u.current=e}},[e,f]),(0,n.useLayoutEffect)(()=>{if(o){let e,t=o.ownerDocument.defaultView??window,r=r=>{let n=a(l.current).includes(r.animationName);if(r.target===o&&n&&(f("ANIMATION_END"),!u.current)){let r=o.style.animationFillMode;o.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=r)})}},n=e=>{e.target===o&&(c.current=a(l.current))};return o.addEventListener("animationstart",n),o.addEventListener("animationcancel",r),o.addEventListener("animationend",r),()=>{t.clearTimeout(e),o.removeEventListener("animationstart",n),o.removeEventListener("animationcancel",r),o.removeEventListener("animationend",r)}}f("ANIMATION_END")},[o,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:t.useCallback(e=>{l.current=e?getComputedStyle(e):null,s(e)},[])}}(l),d="function"==typeof u?u({present:c.isPresent}):t.Children.only(u),f=(0,r.useComposedRefs)(c.ref,(i=d,(s=(o=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?i.ref:(s=(o=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?i.props.ref:i.props.ref||i.ref));return"function"==typeof u||c.isPresent?t.cloneElement(d,{ref:f}):null};function a(e){return e?.animationName||"none"}i.displayName="Presence",e.s(["Presence",0,i])},10772,e=>{"use strict";var t=e.i(71645),r=e.i(34620),n=t[" useId ".trim().toString()]||(()=>void 0),i=0;e.s(["useId",0,function(e){let[a,o]=t.useState(n());return(0,r.useLayoutEffect)(()=>{e||o(e=>e??String(i++))},[e]),e||(a?`radix-${a}`:"")}])},87607,e=>{"use strict";var t=e.i(71645),r=e.i(81140),n=e.i(30030),i=e.i(69340),a=e.i(34620),o=e.i(20783),s=e.i(48425),l=e.i(96626),u=e.i(10772),c=e.i(43476),d="Collapsible",[f,h]=(0,n.createContextScope)(d),[p,m]=f(d),g=t.forwardRef((e,r)=>{let{__scopeCollapsible:n,open:a,defaultOpen:o,disabled:l,onOpenChange:f,...h}=e,[m,g]=(0,i.useControllableState)({prop:a,defaultProp:o??!1,onChange:f,caller:d});return(0,c.jsx)(p,{scope:n,disabled:l,contentId:(0,u.useId)(),open:m,onOpenToggle:t.useCallback(()=>g(e=>!e),[g]),children:(0,c.jsx)(s.Primitive.div,{"data-state":C(m),"data-disabled":l?"":void 0,...h,ref:r})})});g.displayName=d;var v="CollapsibleTrigger",y=t.forwardRef((e,t)=>{let{__scopeCollapsible:n,...i}=e,a=m(v,n);return(0,c.jsx)(s.Primitive.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":C(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...i,ref:t,onClick:(0,r.composeEventHandlers)(e.onClick,a.onOpenToggle)})});y.displayName=v;var x="CollapsibleContent",b=t.forwardRef((e,t)=>{let{forceMount:r,...n}=e,i=m(x,e.__scopeCollapsible);return(0,c.jsx)(l.Presence,{present:r||i.open,children:({present:e})=>(0,c.jsx)(w,{...n,ref:t,present:e})})});b.displayName=x;var w=t.forwardRef((e,r)=>{let{__scopeCollapsible:n,present:i,children:l,...u}=e,d=m(x,n),[f,h]=t.useState(i),p=t.useRef(null),g=(0,o.useComposedRefs)(r,p),v=t.useRef(0),y=v.current,b=t.useRef(0),w=b.current,S=d.open||f,E=t.useRef(S),k=t.useRef(void 0);return t.useEffect(()=>{let e=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,a.useLayoutEffect)(()=>{let e=p.current;if(e){k.current=k.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();v.current=t.height,b.current=t.width,E.current||(e.style.transitionDuration=k.current.transitionDuration,e.style.animationName=k.current.animationName),h(i)}},[d.open,i]),(0,c.jsx)(s.Primitive.div,{"data-state":C(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!S,...u,ref:g,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:S&&l})});function C(e){return e?"open":"closed"}e.s(["Content",0,b,"Root",0,g,"Trigger",0,y,"createCollapsibleScope",0,h])},86318,e=>{"use strict";var t=e.i(71645);e.i(43476);var r=t.createContext(void 0);e.s(["useDirection",0,function(e){let n=t.useContext(r);return e||n||"ltr"}])},67660,e=>{"use strict";var t=e.i(71645),r=e.i(30030),n=e.i(75830),i=e.i(20783),a=e.i(81140),o=e.i(69340),s=e.i(48425),l=e.i(87607),u=e.i(10772),c=e.i(86318),d=e.i(43476),f="Accordion",h=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[p,m,g]=(0,n.createCollection)(f),[v,y]=(0,r.createContextScope)(f,[g,l.createCollapsibleScope]),x=(0,l.createCollapsibleScope)(),b=t.default.forwardRef((e,t)=>
9{let{type:r,...n}=e;return(0,d.jsx)(p.Provider,{scope:e.__scopeAccordion,children:"multiple"===r?(0,d.jsx)(A,{...n,ref:t}):(0,d.jsx)(k,{...n,ref:t})})});b.displayName=f;var[w,C]=v(f),[S,E]=v(f,{collapsible:!1}),k=t.default.forwardRef((e,r)=>{let{value:n,defaultValue:i,onValueChange:a=()=>{},collapsible:s=!1,...l}=e,[u,c]=(0,o.useControllableState)({prop:n,defaultProp:i??"",onChange:a,caller:f});return(0,d.jsx)(w,{scope:e.__scopeAccordion,value:t.default.useMemo(()=>u?[u]:[],[u]),onItemOpen:c,onItemClose:t.default.useCallback(()=>s&&c(""),[s,c]),children:(0,d.jsx)(S,{scope:e.__scopeAccordion,collapsible:s,children:(0,d.jsx)(P,{...l,ref:r})})})}),A=t.default.forwardRef((e,r)=>{let{value:n,defaultValue:i,onValueChange:a=()=>{},...s}=e,[l,u]=(0,o.useControllableState)({prop:n,defaultProp:i??[],onChange:a,caller:f}),c=t.default.useCallback(e=>u((t=[])=>[...t,e]),[u]),h=t.default.useCallback(e=>u((t=[])=>t.filter(t=>t!==e)),[u]);return(0,d.jsx)(w,{scope:e.__scopeAccordion,value:l,onItemOpen:c,onItemClose:h,children:(0,d.jsx)(S,{scope:e.__scopeAccordion,collapsible:!0,children:(0,d.jsx)(P,{...s,ref:r})})})}),[T,j]=v(f),P=t.default.forwardRef((e,r)=>{let{__scopeAccordion:n,disabled:o,dir:l,orientation:u="vertical",...f}=e,g=t.default.useRef(null),v=(0,i.useComposedRefs)(g,r),y=m(n),x="ltr"===(0,c.useDirection)(l),b=(0,a.composeEventHandlers)(e.onKeyDown,e=>{if(!h.includes(e.key))return;let t=e.target,r=y().filter(e=>!e.ref.current?.disabled),n=r.findIndex(e=>e.ref.current===t),i=r.length;if(-1===n)return;e.preventDefault();let a=n,o=i-1,s=()=>{(a=n+1)>o&&(a=0)},l=()=>{(a=n-1)<0&&(a=o)};switch(e.key){case"Home":a=0;break;case"End":a=o;break;case"ArrowRight":"horizontal"===u&&(x?s():l());break;case"ArrowDown":"vertical"===u&&s();break;case"ArrowLeft":"horizontal"===u&&(x?l():s());break;case"ArrowUp":"vertical"===u&&l()}let c=a%i;r[c].ref.current?.focus()});return(0,d.jsx)(T,{scope:n,disabled:o,direction:l,orientation:u,children:(0,d.jsx)(p.Slot,{scope:n,children:(0,d.jsx)(s.Primitive.div,{...f,"data-orientation":u,ref:v,onKeyDown:o?void 0:b})})})}),N="AccordionItem",[R,M]=v(N),D=t.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:n,...i}=e,a=j(N,r),o=C(N,r),s=x(r),c=(0,u.useId)(),f=n&&o.value.includes(n)||!1,h=a.disabled||e.disabled;return(0,d.jsx)(R,{scope:r,open:f,disabled:h,triggerId:c,children:(0,d.jsx)(l.Root,{"data-orientation":a.orientation,"data-state":z(f),...s,...i,ref:t,disabled:h,open:f,onOpenChange:e=>{e?o.onItemOpen(n):o.onItemClose(n)}})})});D.displayName=N;var I="AccordionHeader",L=t.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,i=j(f,r),a=M(I,r);return(0,d.jsx)(s.Primitive.h3,{"data-orientation":i.orientation,"data-state":z(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});L.displayName=I;var O="AccordionTrigger",F=t.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,i=j(f,r),a=M(O,r),o=E(O,r),s=x(r);return(0,d.jsx)(p.ItemSlot,{scope:r,children:(0,d.jsx)(l.Trigger,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...n,ref:t})})});F.displayName=O;var B="AccordionContent",V=t.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,i=j(f,r),a=M(B,r),o=x(r);return(0,d.jsx)(l.Content,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});function z(e){return e?"open":"closed"}V.displayName=B,e.s(["Content",0,V,"Header",0,L,"Item",0,D,"Root",0,b,"Trigger",0,F])},64659,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",0,t],64659)},73443,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(67660),i=e.i(64659),a=e.i(75157);let o=n.Root,s=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(n.Item,{ref:i,className:(0,a.cn)("border-b",e),...r}));s.displayName="AccordionItem";let l=r.forwardRef(({className:e,children:r,...o},s)=>(0,t.jsx)(n.Header,{className:"flex",children:(0,t.jsxs)(n.Trigger,{ref:s,className:(0,a.cn)("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...o,children:[r,(0,t.jsx)(i.ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));l.displayName=n.Trigger.displayName;let u=r.forwardRef(({className:e,children:r,...i},o)=>(0,t.jsx)(n.Content,{ref:o,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...i,children:(0,t.jsx)("div",{className:(0,a.cn)("pb-4 pt-0",e),children:r})}));u.displayName=n.Content.displayName,e.s(["Accordion",0,o,"AccordionContent",0,u,"AccordionItem",0,s,"AccordionTrigger",0,l])},9937,e=>{"use strict";var t=e.i(71645);e.s(["useCallbackRef",0,function(e){let r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}])},55838,(e,t,r)=>{"use strict";var n=e.r(71645),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useState,o=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=a({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return s(function(){i.value=r,i.getSnapshot=t,u(i)&&c({inst:i})},[e,r,t]),o(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},2239,(e,t,r)=>{"use strict";
9t.exports=e.r(55838)},99676,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(30030),i=e.i(9937),a=e.i(34620),o=e.i(48425),s=e.i(2239);function l(){return()=>{}}var u="Avatar",[c,d]=(0,n.createContextScope)(u),[f,h]=c(u),p=r.forwardRef((e,n)=>{let{__scopeAvatar:i,...a}=e,[s,l]=r.useState("idle");return(0,t.jsx)(f,{scope:i,imageLoadingStatus:s,onImageLoadingStatusChange:l,children:(0,t.jsx)(o.Primitive.span,{...a,ref:n})})});p.displayName=u;var m="AvatarImage",g=r.forwardRef((e,n)=>{let{__scopeAvatar:u,src:c,onLoadingStatusChange:d=()=>{},...f}=e,p=h(m,u),g=function(e,{referrerPolicy:t,crossOrigin:n}){let i=(0,s.useSyncExternalStore)(l,()=>!0,()=>!1),o=r.useRef(null),u=i?(o.current||(o.current=new window.Image),o.current):null,[c,d]=r.useState(()=>x(u,e));return(0,a.useLayoutEffect)(()=>{d(x(u,e))},[u,e]),(0,a.useLayoutEffect)(()=>{let e=e=>()=>{d(e)};if(!u)return;let r=e("loaded"),i=e("error");return u.addEventListener("load",r),u.addEventListener("error",i),t&&(u.referrerPolicy=t),"string"==typeof n&&(u.crossOrigin=n),()=>{u.removeEventListener("load",r),u.removeEventListener("error",i)}},[u,n,t]),c}(c,f),v=(0,i.useCallbackRef)(e=>{d(e),p.onImageLoadingStatusChange(e)});return(0,a.useLayoutEffect)(()=>{"idle"!==g&&v(g)},[g,v]),"loaded"===g?(0,t.jsx)(o.Primitive.img,{...f,ref:n,src:c}):null});g.displayName=m;var v="AvatarFallback",y=r.forwardRef((e,n)=>{let{__scopeAvatar:i,delayMs:a,...s}=e,l=h(v,i),[u,c]=r.useState(void 0===a);return r.useEffect(()=>{if(void 0!==a){let e=window.setTimeout(()=>c(!0),a);return()=>window.clearTimeout(e)}},[a]),u&&"loaded"!==l.imageLoadingStatus?(0,t.jsx)(o.Primitive.span,{...s,ref:n}):null});function x(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}y.displayName=v;var b=e.i(75157);let w=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(p,{ref:n,className:(0,b.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...r}));w.displayName=p.displayName;let C=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(g,{ref:n,className:(0,b.cn)("aspect-square h-full w-full",e),...r}));C.displayName=g.displayName;let S=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(y,{ref:n,className:(0,b.cn)("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...r}));S.displayName=y.displayName,e.s(["Avatar",0,w,"AvatarFallback",0,S,"AvatarImage",0,C],99676)},13642,15057,10980,e=>{"use strict";var t=e.i(43476),r=e.i(75254);let n=(0,r.default)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);e.s(["ArrowUpRight",0,n],15057);let i=(0,r.default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);e.s(["BookOpen",0,i],10980);let a=(0,r.default)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),o=(0,r.default)("git-pull-request-arrow",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M5 9v12",key:"ih889a"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}]]);var s=e.i(30535);let l="https://github.com/JordyDutch/mini-store/";e.s(["default",0,function(){return(0,t.jsx)("footer",{className:"relative z-10 mt-8 border-t border-border bg-background/60",children:(0,t.jsxs)("div",{className:"mx-auto w-full max-w-[1200px] px-4 py-10 pb-safe-content md:px-6 md:py-14",children:[(0,t.jsxs)("div",{className:"grid gap-10 md:grid-cols-[1.5fr_1fr] md:gap-12",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Wordmark,{}),(0,t.jsx)("p",{className:"mt-3 max-w-prose text-sm leading-relaxed text-text-secondary",children:"An open, community-built catalog of Mini-Apps for your LUKSO Universal Profile. Open any app instantly, or add it to your Grid."}),(0,t.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"mt-4 inline-flex min-h-[44px] items-center gap-2 text-sm font-medium text-brand-text transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[(0,t.jsx)(a,{className:"h-4 w-4","aria-hidden":"true"}),"View the source on GitHub",(0,t.jsx)(n,{className:"h-4 w-4","aria-hidden":"true"})]})]}),(0,t.jsxs)("div",{className:"md:justify-self-end",children:[(0,t.jsx)("p",{className:"eyebrow",children:"Contribute"}),(0,t.jsx)("h2",{className:"mt-1 font-display text-lg font-semibold text-foreground",children:"Add or update an app"}),(0,t.jsx)("p",{className:"mt-2 max-w-prose text-sm leading-relaxed text-text-secondary",children:"This catalog is maintained openly on GitHub. Want to list your app or fix a detail? Open a pull request — the guide below walks through every step."}),(0,t.jsxs)("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row",children:[(0,t.jsxs)("a",{href:"https://github.com/JordyDutch/mini-store/blob/master/docs/adding-apps.md",target:"_blank",rel:"noopener noreferrer",className:"btn-ghost-outline",children:[(0,t.jsx)(i,{className:"h-4 w-4","aria-hidden":"true"}),"Adding-apps guide"]}),(0,t.jsxs)("a",{href:"https://github.com/JordyDutch/mini-store/pulls",target:"_blank",rel:"noopener noreferrer",className:"btn-brand",children:[(0,t.jsx)(o,{className:"h-4 w-4","aria-hidden":"true"}),"Open a pull request"]})]})]})]}),(0,t.jsxs)("div",{className:"mt-10 flex flex-col gap-3 border-t border-border pt-6 text-xs text-text-tertiary sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsx)("p",{children:"Built with care for the LUKSO c
9ommunity."}),(0,t.jsx)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"transition-colors hover:text-foreground",children:"github.com/JordyDutch/mini-store"})]})]})})}],13642)},22530,e=>{"use strict";var t=e.i(43476),r=e.i(75254);let n=(0,r.default)("moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),i=(0,r.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var a=e.i(8377),o=e.i(75157);e.s(["ThemeToggle",0,function({className:e}){let{theme:r,toggleTheme:s,mounted:l}=(0,a.useTheme)(),u=l&&"dark"===r;return(0,t.jsx)("button",{type:"button",onClick:s,"aria-label":u?"Switch to light theme":"Switch to dark theme",className:(0,o.cn)("btn-glass",e),children:u?(0,t.jsx)(i,{className:"h-5 w-5","aria-hidden":"true"}):(0,t.jsx)(n,{className:"h-5 w-5","aria-hidden":"true"})})}],22530)},88316,e=>{"use strict";var t=e.i(71645),r=e.i(2611),n=e.i(46696),i=e.i(28282),a=e.i(63625),o=e.i(52012),s=e.i(547),l=e.i(56679),u=e.i(4195),c=e.i(8406),d=e.i(75107),f=e.i(27343),h=e.i(69934),p=e.i(78023);function m(e,t){if(!(e instanceof h.BaseError))return!1;let r=e.walk(e=>e instanceof p.ContractFunctionRevertedError);return r instanceof p.ContractFunctionRevertedError&&(!!(r.data?.errorName==="ResolverNotFound"||r.data?.errorName==="ResolverWildcardNotSupported"||r.data?.errorName==="ResolverNotContract"||r.data?.errorName==="ResolverError"||r.data?.errorName==="HttpError"||r.reason?.includes("Wildcard on non-extended resolvers is not supported"))||"reverse"===t&&r.reason===f.panicReasons[50])}var g=e.i(61147),v=e.i(47526),y=e.i(69936),x=e.i(31095),b=e.i(80841);function w(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let t=`0x${e.slice(1,65)}`;return(0,b.isHex)(t)?t:null}function C(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,d.bytesToHex)(t);let r=e.split(".");for(let e=r.length-1;e>=0;e-=1){let n=w(r[e]),i=n?(0,y.toBytes)(n):(0,x.keccak256)((0,y.stringToBytes)(r[e]),"bytes");t=(0,x.keccak256)((0,v.concat)([t,i]),"bytes")}return(0,d.bytesToHex)(t)}function S(e){let t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);let r=new Uint8Array((0,y.stringToBytes)(t).byteLength+2),n=0,i=t.split(".");for(let e=0;e<i.length;e++){var a;let t=(0,y.stringToBytes)(i[e]);t.byteLength>255&&(t=(0,y.stringToBytes)((a=function(e){let t=new Uint8Array(32).fill(0);return e?w(e)||(0,x.keccak256)((0,y.stringToBytes)(e)):(0,d.bytesToHex)(t)}(i[e]),`[${a.slice(2)}]`))),r[n]=t.length,r.set(t,n+1),n+=t.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}var E=e.i(67125),k=e.i(7749),A=e.i(89509);async function T(e,t){let{abi:r,address:n,args:i,functionName:a,...o}=t,u=(0,l.encodeFunctionData)({abi:r,args:i,functionName:a});try{let{data:t}=await (0,E.getAction)(e,A.call,"call")({...o,data:u,to:n});return(0,s.decodeFunctionResult)({abi:r,args:i,functionName:a,data:t||"0x"})}catch(e){throw(0,k.getContractError)(e,{abi:r,address:n,args:i,docsPath:"/docs/contract/readContract",functionName:a})}}async function j(e,t){let{blockNumber:r,blockTag:n,coinType:i,name:a,gatewayUrls:f,strict:h}=t,{chain:p}=e,v=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!p)throw Error("client chain not configured. universalResolverAddress is required.");return(0,u.getChainContractAddress)({blockNumber:r,chain:p,contract:"ensUniversalResolver"})})(),y=p?.ensTlds;if(y&&!y.some(e=>a.endsWith(e)))return null;try{let t=(0,l.encodeFunctionData)({abi:o.addressResolverAbi,functionName:"addr",...null!=i?{args:[C(a),BigInt(i)]}:{args:[C(a)]}}),u={address:v,abi:o.universalResolverResolveAbi,functionName:"resolve",args:[(0,d.toHex)(S(a)),t,f??[g.localBatchGatewayUrl]],blockNumber:r,blockTag:n},h=(0,E.getAction)(e,T,"readContract"),p=await h(u);if("0x"===p[0])return null;let m=(0,s.decodeFunctionResult)({abi:o.addressResolverAbi,args:null!=i?[C(a),BigInt(i)]:void 0,functionName:"addr",data:p[0]});if("0x"===m||"0x00"===(0,c.trim)(m))return null;return m}catch(e){if(h)throw e;if(m(e,"resolve"))return null;throw e}}var P=h;class N extends P.BaseError{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`],name:"EnsAvatarInvalidMetadataError"})}}class R extends P.BaseError{constructor({reason:e}
vendor: 1,325 bytes, line 9
9){super(`ENS NFT avatar URI is invalid. ${e}`,{name:"EnsAvatarInvalidNftUriError"})}}class M extends P.BaseError{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class D extends P.BaseError{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}let I=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,L=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,O=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,F=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function B(e){try{let t=await fetch(e,{method:"HEAD"});if(200===t.status){let e=t.headers.get("content-type");return e?.startsWith("image/")}return!1}catch(t){if("object"==typeof t&&void 0!==t.response||!globalThis.hasOwnProperty("Image"))return!1;return new Promise(t=>{let r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e})}}function V(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function z({uri:e,gatewayUrls:t}){let r=O.test(e);
9if(r)return{uri:e,isOnChain:!0,isEncoded:r};let n=V(t?.ipfs,"https://ipfs.io"),i=V(t?.arweave,"https://arweave.net"),a=e.match(I),{protocol:o,subpath:s,target:l,subtarget:u=""}=a?.groups||{},c="ipns:/"===o||"ipns/"===s,d="ipfs:/"===o||"ipfs/"===s||L.test(e);if(e.startsWith("http")&&!c&&!d){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((c||d)&&l)return{uri:`${n}/${c?"ipns":"ipfs"}/${l}${u}`,isOnChain:!1,isEncoded:!1};if("ar:/"===o&&l)return{uri:`${i}/${l}${u||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(F,"");if(f.startsWith("<svg")&&(f=`data:image/svg+xml;base64,${btoa(f)}`),f.startsWith("data:")||f.startsWith("{"))return{uri:f,isOnChain:!0,isEncoded:!1};throw new M({uri:e})}function $(e){if("object"!=typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new N({data:e});return e.image||e.image_url||e.image_data}async function U({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(e=>e.json());return await _({gatewayUrls:e,uri:$(r)})}catch{throw new M({uri:t})}}async function _({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:n}=z({uri:t,gatewayUrls:e});if(n||await B(r))return r;throw new M({uri:t})}async function H(e,{nft:t}){if("erc721"===t.namespace)return T(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return T(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new D({namespace:t.namespace})}async function W(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?G(e,{gatewayUrls:t,record:r}):_({uri:r,gatewayUrls:t})}async function G(e,{gatewayUrls:t,record:r}){let n=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,n,i]=t.split("/"),[a,o]=r.split(":"),[s,l]=n.split(":");if(!a||"eip155"!==a.toLowerCase())throw new R({reason:"Only EIP-155 supported"});if(!o)throw new R({reason:"Chain ID not found"});if(!l)throw new R({reason:"Contract address not found"});if(!i)throw new R({reason:"Token ID not found"});if(!s)throw new R({reason:"ERC namespace not found"});return{chainID:Number.parseInt(o),namespace:s.toLowerCase(),contractAddress:l,tokenID:i}}(r),{uri:i,isOnChain:a,isEncoded:o}=z({uri:await H(e,{nft:n}),gatewayUrls:t});if(a&&(i.includes("data:application/json;base64,")||i.startsWith("{")))return _({uri:$(JSON.parse(o?atob(i.replace("data:application/json;base64,","")):i)),gatewayUrls:t});let s=n.tokenID;return"erc1155"===n.namespace&&(s=s.replace("0x","").padStart(64,"0")),U({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,s)})}async function q(e,t){let{blockNumber:r,blockTag:n,key:i,name:a,gatewayUrls:c,strict:f}=t,{chain:h}=e,p=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!h)throw Error("client chain not configured. universalResolverAddress is required.");return(0,u.getChainContractAddress)({blockNumber:r,chain:h,contract:"ensUniversalResolver"})})(),v=h?.ensTlds;if(v&&!v.some(e=>a.endsWith(e)))return null;try{let t={address:p,abi:o.universalResolverResolveAbi,functionName:"resolve",args:[(0,d.toHex)(S(a)),(0,l.encodeFunctionData)({abi:o.textResolverAbi,functionName:"text",args:[C(a),i]}),c??[g.localBatchGatewayUrl]],blockNumber:r,blockTag:n},u=(0,E.getAction)(e,T,"readContract"),f=await u(t);if("0x"===f[0])return null;let h=(0,s.decodeFunctionResult)({abi:o.textResolverAbi,functionName:"text",data:f[0]});return""===h?null:h}catch(e){if(f)throw e;if(m(e,"resolve"))return null;throw e}}async function K(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:i,gatewayUrls:a,strict:o,universalResolverAddress:s}){let l=await (0,E.getAction)(e,q,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:i,universalResolverAddress:s,gatewayUrls:a,strict:o});if(!l)return null;try{return await W(e,{record:l,gatewayUrls:n})}catch{return null}}async function X(e,{address:t,blockNumber:r,blockTag:n,gatewayUrls:i,strict:a,universalResolverAddress:s}){let l=s;if(!l){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");l=(0,u.getChainContractAddress)({blockNumber:r,chain:e.chain,contract:"ensUniversalResolver"})}let c=`${t.toLowerCase().substring(2)}.addr.reverse`;try{let a={address:l,abi:o.universalResolverReverseAbi,functionName:"reverse",args:[(0,d.toHex)(S(c))],blockNumber:r,blockTag:n},s=(0,E.getAction)(e,T,"readContract"),[u,f]=i?await s({...a,args:[...a.args,i]}):await s(a);if(t.toLowerCase()!==f.toLowerCase())return null;return u}catch(e){if(a)throw e;if(m(e,"reverse"))return null;throw e}}async function Y(e,t){let{blockNumber:r,blockTag:n,name:i}=t,{chain:a}=e,o=(()=>
9{if(t.universalResolverAddress)return t.universalResolverAddress;if(!a)throw Error("client chain not configured. universalResolverAddress is required.");return(0,u.getChainContractAddress)({blockNumber:r,chain:a,contract:"ensUniversalResolver"})})(),s=a?.ensTlds;if(s&&!s.some(e=>i.endsWith(e)))throw Error(`${i} is not a valid ENS TLD (${s?.join(", ")}) for chain "${a.name}" (id: ${a.id}).`);let[l]=await (0,E.getAction)(e,T,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,d.toHex)(S(i))],blockNumber:r,blockTag:n});return l}var Z=e.i(89991),J=e.i(79690),Q=e.i(64404),ee=e.i(90521),et=e.i(53464);async function er(e,t){let{account:r=e.account,blockNumber:n,blockTag:i="latest",blobs:a,data:o,gas:s,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:c,maxPriorityFeePerGas:f,to:h,value:p,...m}=t,g=r?(0,Z.parseAccount)(r):void 0;try{(0,et.assertRequest)(t);let r=n?(0,d.numberToHex)(n):void 0,v=e.chain?.formatters?.transactionRequest?.format,y=(v||ee.formatTransactionRequest)({...(0,Q.extract)(m,{format:v}),from:g?.address,blobs:a,data:o,gas:s,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:c,maxPriorityFeePerGas:f,to:h,value:p}),x=await e.request({method:"eth_createAccessList",params:[y,r||i]});return{accessList:x.accessList,gasUsed:BigInt(x.gasUsed)}}catch(r){throw(0,J.getCallError)(r,{...t,account:g,chain:e.chain})}}function en(e,{method:t}){let r={};return"fallback"===e.transport.type&&e.transport.onResponse?.(({method:e,response:n,status:i,transport:a})=>{"success"===i&&t===e&&(r[n]=a.request)}),t=>r[t]||e.request}async function ei(e){let t=en(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}var ea=e.i(70204),eo=h;class es extends eo.BaseError{constructor(e){super(`Filter type "${e}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}var el=e.i(74620),eu=e.i(11604),ec=e.i(32881),ed=e.i(27173);let ef="/docs/contract/encodeEventTopics";function eh(e){let{abi:t,eventName:r,args:n}=e,i=t[0];if(r){let e=(0,ed.getAbiItem)({abi:t,name:r});if(!e)throw new ea.AbiEventNotFoundError(r,{docsPath:ef});i=e}if("event"!==i.type)throw new ea.AbiEventNotFoundError(void 0,{docsPath:ef});let a=(0,ec.formatAbiItem)(i),o=(0,el.toEventSelector)(a),s=[];if(n&&"inputs"in i){let e=i.inputs?.filter(e=>"indexed"in e&&e.indexed),t=Array.isArray(n)?n:Object.values(n).length>0?e?.map(e=>n[e.name])??[]:[];t.length>0&&(s=e?.map((e,r)=>Array.isArray(t[r])?t[r].map((n,i)=>ep({param:e,value:t[r][i]})):void 0!==t[r]&&null!==t[r]?ep({param:e,value:t[r]}):null)??[])}return[o,...s]}function ep({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,x.keccak256)((0,y.toBytes)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new es(e.type);return(0,eu.encodeAbiParameters)([e],[t])}async function em(e,t){let{address:r,abi:n,args:i,eventName:a,fromBlock:o,strict:s,toBlock:l}=t,u=en(e,{method:"eth_newFilter"}),c=a?eh({abi:n,args:i,eventName:a}):void 0,f=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:"bigint"==typeof o?(0,d.numberToHex)(o):o,toBlock:"bigint"==typeof l?(0,d.numberToHex)(l):l,topics:c}]});return{abi:n,args:i,eventName:a,id:f,request:u(f),strict:!!s,type:"event"}}async function eg(e,{address:t,args:r,event:n,events:i,fromBlock:a,strict:o,toBlock:s}={}){let l=i??(n?[n]:void 0),u=en(e,{method:"eth_newFilter"}),c=[];l&&(c=[l.flatMap(e=>eh({abi:[e],eventName:e.name,args:r}))],n&&(c=c[0]));let f=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof a?(0,d.numberToHex)(a):a,toBlock:"bigint"==typeof s?(0,d.numberToHex)(s):s,...c.length?{topics:c}:{}}]});return{abi:l,args:r,eventName:n?n.name:void 0,fromBlock:a,id:f,request:u(f),strict:!!o,toBlock:s,type:"event"}}async function ev(e){let t=en(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}var ey=e.i(84734);async function ex(e,t){let{abi:r,address:n,args:i,functionName:a,dataSuffix:o,...s}=t,u=(0,l.encodeFunctionData)({abi:r,args:i,functionName:a});try{return await (0,E.getAction)(e,ey.estimateGas,"estimateGas")({data:`${u}${o?o.replace("0x",""):""}`,to:n,...s})}catch(t){let e=s.account?(0,Z.parseAccount)(s.account):void 0;throw(0,k.getContractError)(t,{abi:r,address:n,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:a,sender:e?.address})}}var eb=e.i(72960),ew=e.i(94720),eC=e.i(90968);async function eS(e){return BigInt(await e.request({method:"eth_blobBaseFee"}))}var eE=e.i(15588);let ek=new Map,eA=new Map;async function eT(e,{cacheKey:t,cacheTime:r=1/0}){let n,i,a,o=(i=(n=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:r=>t.set(e,r)}))(t,ek),{clear:()=>{i.clear(),a.clear()},promise:i,response:a=n(t,eA)}),s=o.response.get();if(s&&r>0&&new Date().getTime()-s.created.getTime()<r)return s.data;let l=o.promise.get();l||(l=e(),o.promise.set(l));try{let e=await l;return o.response.set({created:new Date,data:e}),e}finally{o.promise.clear()}}async function ej(e,{cacheTime:t=e.cacheTime}={}){let r;return BigInt(await eT(()=>e.request({method:"eth_blockNumber"}),{cacheKey:(r=e.uid,`blockNumber.${r}`),cacheTime:t}))}var eP=e.i(50323);async function eN(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){let i,a=void 0!==r?(0,d.numberToHex)(r):void 0;return i=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[a||n]},{dedupe:!!a}),(0,eP.hexToNumber)(i)}var eR=e.i(75948);async function eM(e,{address:t,blockNumber:r,blockTag:n="latest"}){let i=void 0!==r?(0,d.numberToHex)(r):void 0,a=await e.request({method:"eth_getCode",params:[t,i||n]},{dedupe:!!i});if("0x"!==a)return a}var eD=e.i(6685),eI=e.i(1319),eL=e.i(93429),eO=e.i(49311);let eF="/docs/contract/decodeEventLog";function eB(e){let{abi:t,data:r,strict:n,topics:i}=e,a=n??!0,[o,...s]=i;if(!o)throw new ea.AbiEventSignatureEmptyTopicsError({docsPath:eF});let l=1===t.length?t[0]:t.find(e=>"event"===e.type&&o===(0,el.toEventSelector)((0,ec.formatAbiItem)(e)));if(!(l&&"name"in l)||"event"!==l.type)throw new ea.AbiEventSignatureNotFoundError(o,{docsPath:eF});let{name:u,inputs:c}=l,d=c?.some(e=>!("name"in e&&e.name)),f=d?[]:{},h=c.filter(e=>
vendor: 5,420 bytes, line 9
9"indexed"in e&&e.indexed);for(let e=0;e<h.length;e++){let t=h[e],r=s[e];if(!r)throw new ea.DecodeLogTopicsMismatch({abiItem:l,param:t});f[d?e:t.name||e]=function({param:e,value:t}){return"string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/)?t:((0,eO.decodeAbiParameters)([e],t)||[])[0]}({param:t,value:r})}let p=c.filter(e=>!("indexed"in e&&e.indexed));if(p.length>0){if(r&&"0x"!==r)try{let e=(0,eO.decodeAbiParameters)(p,r);if(e)if(d)f=[...f,...e];else for(let t=0;t<p.length;t++)f[p[t].name]=e[t]}catch(e){if(a){if(e instanceof ea.AbiDecodingDataSizeTooSmallError||e instanceof eL.PositionOutOfBoundsError)throw new ea.DecodeLogDataMismatch({abiItem:l,data:r,params:p,size:(0,eI.size)(r)});throw e}}else if(a)throw new ea.DecodeLogDataMismatch({abiItem:l,data:"0x",params:p,size:0})}return{eventName:u,args:Object.values(f).length>0?f:void 0}}function eV(e){let{abi:t,args:r,logs:n,strict:i=!0}=e,a=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return n.map(e=>{try{let n=t.find(t=>"event"===t.type&&e.topics[0]===(0,el.toEventSelector)(t));if(!n)return null;let o=eB({...e,abi:[n],strict:i});if(a&&!a.includes(o.eventName)||!function(e){let{args:t,inputs:r,matchArgs:n}=e;if(!n)return!0;if(!t)return!1;function i(e,t,r){try{if("address"===e.type)return(0,eD.isAddressEqual)(t,r);if("string"===e.type||"bytes"===e.type)return(0,x.keccak256)((0,y.toBytes)(t))===r;return t===r}catch{return!1}}return Array.isArray(t)&&Array.isArray(n)?n.every((e,n)=>{if(null==e)return!0;let a=r[n];return!!a&&(Array.isArray(e)?e:[e]).some(e=>i(a,e,t[n]))}):!("object"!=typeof t||Array.isArray(t)||"object"!=typeof n||Array.isArray(n))&&Object.entries(n).every(([e,n])=>{if(null==n)return!0;let a=r.find(t=>t.name===e);return!!a&&(Array.isArray(n)?n:[n]).some(r=>i(a,r,t[e]))})}({args:o.args,inputs:n.inputs,matchArgs:r}))return null;return{...o,...e}}catch(n){let t,r;if(n instanceof ea.AbiEventSignatureNotFoundError)return null;if(n instanceof ea.DecodeLogDataMismatch||n instanceof ea.DecodeLogTopicsMismatch){if(i)return null;t=n.abiItem.name,r=n.abiItem.inputs?.some(e=>!("name"in e&&e.name))}return{...e,args:r?[]:{},eventName:t}}}).filter(Boolean)}var ez=e.i(56324);async function e$(e,{address:t,blockHash:r,fromBlock:n,toBlock:i,event:a,events:o,args:s,strict:l}={}){let u=o??(a?[a]:void 0),c=[];u&&(c=[u.flatMap(e=>eh({abi:[e],eventName:e.name,args:o?void 0:s}))],a&&(c=c[0]));let f=(r?await e.request({method:"eth_getLogs",params:[{address:t,topics:c,blockHash:r}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:c,fromBlock:"bigint"==typeof n?(0,d.numberToHex)(n):n,toBlock:"bigint"==typeof i?(0,d.numberToHex)(i):i}]})).map(e=>(0,ez.formatLog)(e));return u?eV({abi:u,args:s,logs:f,strict:l??!1}):f}async function eU(e,t){let{abi:r,address:n,args:i,blockHash:a,eventName:o,fromBlock:s,toBlock:l,strict:u}=t,c=o?(0,ed.getAbiItem)({abi:r,name:o}):void 0,d=c?void 0:r.filter(e=>"event"===e.type);return(0,E.getAction)(e,e$,"getLogs")({address:n,args:i,blockHash:a,event:c,events:d,fromBlock:s,toBlock:l,strict:u})}var e_=h;class eH extends e_.BaseError{constructor({address:e}){super(`No EIP-712 domain found on contract "${e}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${e}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function eW(e,t){let{address:r,factory:n,factoryData:i}=t;try{let[t,a,o,s,l,u,c]=await (0,E.getAction)(e,T,"readContract")({abi:eG,address:r,functionName:"eip712Domain",factory:n,factoryData:i});return{domain:{name:a,version:o,chainId:Number(s),verifyingContract:l,salt:u},extensions:c,fields:t}}catch(e){if("ContractFunctionExecutionError"===e.name&&"ContractFunctionZeroDataError"===e.cause.name)throw new eH({address:r});throw e}}let eG=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];async function eq(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){var a;let o=r?(0,d.numberToHex)(r):void 0;return{baseFeePerGas:(a=await e.request({method:"eth_feeHistory",params:[(0,d.numberToHex)(t),o||n,i]},{dedupe:!!o})).baseFeePerGas.map(e=>BigInt(e)),gasUsedRatio:a.gasUsedRatio,oldestBlock:BigInt(a.oldestBlock),reward:a.reward?.map(e=>e.map(e=>BigInt(e)))}}async function eK(e,{filter:t}){let r="strict"in t&&t.strict,n=await t.request({method:"eth_getFilterChanges",params:[t.id]});if("string"==typeof n[0])return n;let i=n.map(e=>(0,ez.formatLog)(e));return"abi"in t&&t.abi?eV({abi:t.abi,logs:i,strict:r}):i}async function eX(e,{filter:t}){let r=t.strict??!1,n=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(e=>(0,ez.formatLog)(e));return t.abi?eV({abi:t.abi,logs:n,strict:r}):n}var eY=e.i(11047);async function eZ(e,{address:t,blockNumber:r,blockTag:n,storageKeys:i}){let a=void 0!==r?(0,d.numberToHex)(r):void 0;var o=await e.request({method:"eth_getProof",params:[t,i,a||(n??"latest")]});return{...o,balance:o.balance?BigInt(o.balance):void 0,nonce:o.nonce?(0,eP.hexToNumber)(o.nonce):void 0,storageProof:o.storageProof?o.storageProof.map(e=>
9({...e,value:BigInt(e.value)})):void 0}}async function eJ(e,{address:t,blockNumber:r,blockTag:n="latest",slot:i}){let a=void 0!==r?(0,d.numberToHex)(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,a||n]})}var eQ=e.i(93702),e0=e.i(82191);async function e1(e,{blockHash:t,blockNumber:r,blockTag:n,hash:i,index:a}){let o=n||"latest",s=void 0!==r?(0,d.numberToHex)(r):void 0,l=null;if(!(l=i?await e.request({method:"eth_getTransactionByHash",params:[i]},{dedupe:!0}):t?await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,d.numberToHex)(a)]},{dedupe:!0}):await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[s||o,(0,d.numberToHex)(a)]},{dedupe:!!s})))throw new eQ.TransactionNotFoundError({blockHash:t,blockNumber:r,blockTag:o,hash:i,index:a});return(e.chain?.formatters?.transaction?.format||e0.formatTransaction)(l)}async function e2(e,{hash:t,transactionReceipt:r}){let[n,i]=await Promise.all([(0,E.getAction)(e,ej,"getBlockNumber")({}),t?(0,E.getAction)(e,e1,"getTransaction")({hash:t}):void 0]),a=r?.blockNumber||i?.blockNumber;return a?n-a+1n:0n}var e5=e.i(37445),e4=e.i(39080);async function e3(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new eQ.TransactionReceiptNotFoundError({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||e4.formatTransactionReceipt)(r)}async function e6(e,t){let{allowFailure:r=!0,batchSize:n,blockNumber:i,blockTag:a,multicallAddress:c,stateOverride:d}=t,f=t.contracts,m=n??("object"==typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),g=c;if(!g){if(!e.chain)throw Error("client chain not configured. multicallAddress is required.");g=(0,u.getChainContractAddress)({blockNumber:i,chain:e.chain,contract:"multicall3"})}let v=[[]],y=0,x=0;for(let e=0;e<f.length;e++){let{abi:t,address:n,args:i,functionName:a}=f[e];try{let e=(0,l.encodeFunctionData)({abi:t,args:i,functionName:a});x+=(e.length-2)/2,m>0&&x>m&&v[y].length>0&&(y++,x=(e.length-2)/2,v[y]=[]),v[y]=[...v[y],{allowFailure:!0,callData:e,target:n}]}catch(o){let e=(0,k.getContractError)(o,{abi:t,address:n,args:i,docsPath:"/docs/contract/multicall",functionName:a});if(!r)throw e;v[y]=[...v[y],{allowFailure:!0,callData:"0x",target:n}]}}let b=await Promise.allSettled(v.map(t=>(0,E.getAction)(e,T,"readContract")({abi:o.multicall3Abi,address:g,args:[t],blockNumber:i,blockTag:a,functionName:"aggregate3",stateOverride:d}))),w=[];for(let e=0;e<b.length;e++){let t=b[e];if("rejected"===t.status){if(!r)throw t.reason;for(let r=0;r<v[e].length;r++)w.push({status:"failure",error:t.reason,result:void 0});continue}let n=t.value;for(let t=0;t<n.length;t++){let{returnData:i,success:a}=n[t],{callData:o}=v[e][t],{abi:l,address:u,functionName:c,args:d}=f[w.length];try{if("0x"===o)throw new ea.AbiDecodingZeroDataError;if(!a)throw new p.RawContractError({data:i});let e=(0,s.decodeFunctionResult)({abi:l,args:d,data:i,functionName:c});w.push(r?{result:e,status:"success"}:e)}catch(t){let e=(0,k.getContractError)(t,{abi:l,address:u,args:d,docsPath:"/docs/contract/multicall",functionName:c});if(!r)throw e;w.push({error:e,result:void 0,status:"failure"})}}}if(w.length!==f.length)throw new h.BaseError("multicall results mismatch");return w}class e7 extends Error{constructor(e,t={}){const r=(()=>{if(t.cause instanceof e7){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause?.message?t.cause.message:t.details})(),n=t.cause instanceof e7&&t.cause.docsPath||t.docsPath,i=`https://oxlib.sh${n??""}`;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...r||n?["",r?`Details: ${r}`:void 0,n?`See: ${i}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"[email protected]"}),this.cause=t.cause,this.details=r,this.docs=i,this.docsPath=n,this.shortMessage=e}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,r):r?null:t}(this,e)}}function e9(e,t){if(tc(e)>t)throw new tp({givenSize:tc(e),maxSize:t})}function e8(e,t={}){let{dir:r,size:n=32}=t;if(0===n)return e;let i=e.replace("0x","");if(i.length>2*n)throw new tg({size:Math.ceil(i.length/2),targetSize:n,type:"Hex"});return`0x${i["right"===r?"padEnd":"padStart"](2*n,"0")}`}let te=new TextEncoder,tt=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function tr(...e){return`0x${e.reduce((e,t)=>
9e+t.replace("0x",""),"")}`}function tn(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?(e9(r,t.size),ts(r,t.size)):r}function ti(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=tt[e[t]];let n=`0x${r}`;return"number"==typeof t.size?(e9(n,t.size),tl(n,t.size)):n}function ta(e,t={}){let r,{signed:n,size:i}=t,a=BigInt(e);i?r=n?(1n<<8n*BigInt(i)-1n)-1n:2n**(8n*BigInt(i))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let o="bigint"==typeof r&&n?-r-1n:0;if(r&&a>r||a<o){let t="bigint"==typeof e?"n":"";throw new td({max:r?`${r}${t}`:void 0,min:`${o}${t}`,signed:n,size:i,value:`${e}${t}`})}let s=(n&&a<0?(1n<<BigInt(8*i))+BigInt(a):a).toString(16),l=`0x${s}`;return i?ts(l,i):l}function to(e,t={}){return ti(te.encode(e),t)}function ts(e,t){return e8(e,{dir:"left",size:t})}function tl(e,t){return e8(e,{dir:"right",size:t})}function tu(e,t,r,n={}){let{strict:i}=n;if("number"==typeof t&&t>0&&t>tc(e)-1)throw new tm({offset:t,position:"start",size:tc(e)});let a=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return i&&function(e,t,r){if("number"==typeof t&&"number"==typeof r&&tc(e)!==r-t)throw new tm({offset:r,position:"end",size:tc(e)})}(a,t,r),a}function tc(e){return Math.ceil((e.length-2)/2)}class td extends e7{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number \`${i}\` is not in safe${n?` ${8*n}-bit`:""}${r?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class tf extends e7{constructor(e){super(`Value \`${"object"==typeof e?function(e){return JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString()+"#__bigint":t,void 0)}(e):e}\` of type \`${typeof e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class th extends e7{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class tp extends e7{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class tm extends e7{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class tg extends e7{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function tv(e){return{address:e.address,amount:ta(e.amount),index:ta(e.index),validatorIndex:ta(e.validatorIndex)}}var ty=e.i(53532),tx=e.i(67078),tb=e.i(57874),tw=e.i(26051);async function tC(e,t){let{blockNumber:r,blockTag:n="latest",blocks:i,returnFullTransactions:a,traceTransfers:o,validation:u}=t;try{let t=[];for(let e of i){var c;let r=e.blockOverrides?(c=e.blockOverrides,{..."bigint"==typeof c.baseFeePerGas&&{baseFeePerGas:ta(c.baseFeePerGas)},..."bigint"==typeof c.blobBaseFee&&{blobBaseFee:ta(c.blobBaseFee)},..."string"==typeof c.feeRecipient&&{feeRecipient:c.feeRecipient},..."bigint"==typeof c.gasLimit&&{gasLimit:ta(c.gasLimit)},..."bigint"==typeof c.number&&{number:ta(c.number)},..."bigint"==typeof c.prevRandao&&{prevRandao:ta(c.prevRandao)},..."bigint"==typeof c.time&&{time:ta(c.time)},...c.withdrawals&&{withdrawals:c.withdrawals.map(tv)}}):void 0,n=e.calls.map(e=>{let t=e.account?(0,Z.parseAccount)(e.account):void 0,r={...e,data:e.abi?(0,l.encodeFunctionData)(e):e.data,from:e.from??t?.address};return(0,et.assertRequest)(r),(0,ee.formatTransactionRequest)(r)}),i=e.stateOverrides?(0,tw.serializeStateOverride)(e.stateOverrides):void 0;t.push({blockOverrides:r,calls:n,stateOverrides:i})}let f=r?(0,d.numberToHex)(r):void 0;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:t,returnFullTransactions:a,traceTransfers:o,validation:u},f||n]})).map((e,t)=>({...(0,tb.formatBlock)(e),calls:e.calls.map((e,r)=>{let{abi:n,args:a,functionName:o,to:l}=i[t].calls[r],u=e.error?.data??e.returnData,c=BigInt(e.gasUsed),d=e.logs?.map(e=>(0,ez.formatLog)(e)),f="0x1"===e.status?"success":"failure",h=n&&"success"===f&&"0x"!==u?(0,s.decodeFunctionResult)({abi:n,data:u,functionName:o}):null,m=(()=>{let t;if("success"!==f&&(e.error?.data==="0x"?t=new ea.AbiDecodingZeroDataError:e.error&&(t=new p.RawContractError(e.error)),t))return(0,k.getContractError)(t,{abi:n??[],address:l,args:a,functionName:o??"<unknown>"})})();return{data:u,gasUsed:c,logs:d,status:f,..."success"===f?{result:h}:{error:m}}})}))}catch(t){let e=(0,tx.getNodeError)(t,{});if(e instanceof ty.UnknownNodeError)throw t;throw e}}var tS=e.i(66564),tE=e.i(15373),tk=e.i(61460),tA=e.i(2094),tT=e.i(88776),tj=e.i(45535);function tP(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}let tN=new TextEncoder;class tR extends e7{constructor({givenSize:e,maxSize:t}
9){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class tM extends e7{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}function tD(e,t={}){var r;let{as:n="string"==typeof e?"Hex":"Bytes"}=t,i=(0,tj.keccak_256)(e instanceof Uint8Array?e:"string"==typeof e?function(e,t={}){let{size:r}=t,n=e;r&&(e9(e,r),n=tl(e,r));let i=n.slice(2);i.length%2&&(i=`0${i}`);let a=i.length/2,o=new Uint8Array(a);for(let e=0,t=0;e<a;e++){let r=tP(i.charCodeAt(t++)),n=tP(i.charCodeAt(t++));if(void 0===r||void 0===n)throw new e7(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);o[e]=16*r+n}return o}(e):(r=e)instanceof Uint8Array?r:new Uint8Array(r));return"Bytes"===n?i:ti(i)}class tI extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}let tL={checksum:new tI(8192)}.checksum,tO=/^0x[a-fA-F0-9]{40}$/;function tF(e,t={}){let{strict:r=!0}=t;if(!tO.test(e))throw new tV({address:e,cause:new tz});if(r){if(e.toLowerCase()===e)return;if(function(e){if(tL.has(e))return tL.get(e);tF(e,{strict:!1});let t=e.substring(2).toLowerCase(),r=tD(function(e,t={}){let{size:r}=t,n=tN.encode(e);if("number"==typeof r){var i;if(n.length>r)throw new tR({givenSize:n.length,maxSize:r});return i=n,function(e,t={}){let{dir:r,size:n=32}=t;if(0===n)return e;if(e.length>n)throw new tM({size:e.length,targetSize:n,type:"Bytes"});let i=new Uint8Array(n);for(let t=0;t<n;t++){let a="right"===r;i[a?t:n-t-1]=e[a?t:e.length-t-1]}return i}(i,{dir:"right",size:r})}return n}(t),{as:"Bytes"}),n=t.split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&n[e]&&(n[e]=n[e].toUpperCase()),(15&r[e>>1])>=8&&n[e+1]&&(n[e+1]=n[e+1].toUpperCase());let i=`0x${n.join("")}`;return tL.set(e,i),i}(e)!==e)throw new tV({address:e,cause:new t$})}}function tB(e,t={}){let{strict:r=!0}=t??{};try{return tF(e,{strict:r}),!0}catch{return!1}}class tV extends e7{constructor({address:e,cause:t}){super(`Address "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class tz extends e7{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class t$ extends e7{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}function tU(e){let t=!0,r="",n=0,i="",a=!1;for(let o=0;o<e.length;o++){let s=e[o];if(["(",")",","].includes(s)&&(t=!0),"("===s&&n++,")"===s&&n--,t){if(0===n){if(" "===s&&["event","function","error",""].includes(i))i="";else if(i+=s,")"===s){a=!0;break}continue}if(" "===s){","!==e[o-1]&&","!==r&&",("!==r&&(r="",t=!1);continue}i+=s,r+=s}}if(!a)throw new e7("Unable to normalize signature.");return i}function t_(e,t={}){let{prepare:r=!0}=t,n=Array.isArray(e)||"string"==typeof e?function(e){let t;if("string"==typeof e)t=(0,tT.parseSignature)(e);else{let r=(0,tA.parseStructs)(e),n=e.length;for(let i=0;i<n;i++){let n=e[i];if(!(0,tk.isStructSignature)(n)){t=(0,tT.parseSignature)(n,r);break}}}if(!t)throw new tE.InvalidAbiItemError({signature:e});return t}(e):e;return{...n,...r?{hash:tW(n)}:{}}}function tH(e){return tu(tW(e),0,4)}function tW(e){return"string"!=typeof e&&"hash"in e&&e.hash?e.hash:tD(to(tU("string"==typeof e?e:tS.formatAbiItem(e))))}class tG extends e7{constructor(e,t){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${tU(tS.formatAbiItem(e.abiItem))}\`, and`,`\`${t.type}\` in \`${tU(tS.formatAbiItem(t.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class tq extends e7{constructor({name:e,data:t,type:r="item"}){const n=e?` with name "${e}"`:t?` with data "${t}"`:"";super(`ABI ${r}${n} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}e.i(25908),e.i(89513);let tK=/^(.*)\[([0-9]*)\]$/,tX=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,tY=/^(u?int)(8|
916|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function tZ(e){let t=0;for(let r=0;r<e.length;r++){let{dynamic:n,encoded:i}=e[r];n?t+=32:t+=tc(i)}let r=[],n=[],i=0;for(let a=0;a<e.length;a++){let{dynamic:o,encoded:s}=e[a];o?(r.push(ta(t+i,{size:32})),n.push(s),i+=tc(s)):r.push(s)}return tr(...r,...n)}function tJ(e,t,r){let{checksumAddress:n=!1}=r??{};if(e.length!==t.length)throw new t2({expectedLength:e.length,givenLength:t.length});let i=tZ(function({checksumAddress:e,parameters:t,values:r}){let n=[];for(let i=0;i<t.length;i++)n.push(function e({checksumAddress:t=!1,parameter:r,value:n}){let i,a=(i=r.type.match(/^(.*)\[(\d+)?\]$/))?[i[2]?Number(i[2]):null,i[1]]:void 0;if(a){let[i,o]=a;return function(t,r){let{checksumAddress:n,length:i,parameter:a}=r,o=null===i;if(!Array.isArray(t))throw new t5(t);if(!o&&t.length!==i)throw new t0({expectedLength:i,givenLength:t.length,type:`${a.type}[${i}]`});let s=!1,l=[];for(let r=0;r<t.length;r++){let i=e({checksumAddress:n,parameter:a,value:t[r]});i.dynamic&&(s=!0),l.push(i)}if(o||s){let e=tZ(l);if(o){let t=ta(l.length,{size:32});return{dynamic:!0,encoded:l.length>0?tr(t,e):t}}if(s)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:tr(...l.map(({encoded:e})=>e))}}(n,{checksumAddress:t,length:i,parameter:{...r,type:o}})}if("tuple"===r.type)return function(t,r){let{checksumAddress:n,parameter:i}=r,a=!1,o=[];for(let r=0;r<i.components.length;r++){let s=i.components[r],l=Array.isArray(t)?r:s.name,u=e({checksumAddress:n,parameter:s,value:t[l]});o.push(u),u.dynamic&&(a=!0)}return{dynamic:a,encoded:a?tZ(o):tr(...o.map(({encoded:e})=>e))}}(n,{checksumAddress:t,parameter:r});if("address"===r.type)return function(e,t){let{checksum:r=!1}=t;return tF(e,{strict:r}),{dynamic:!1,encoded:ts(e.toLowerCase())}}(n,{checksum:t});if("bool"===r.type){var o=n;if("boolean"!=typeof o)throw new e7(`Invalid boolean value: "${o}" (type: ${typeof o}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:ts(tn(o))}}if(r.type.startsWith("uint")||r.type.startsWith("int")){let e=r.type.startsWith("int"),[,,t="256"]=tY.exec(r.type)??[];return function(e,{signed:t,size:r}){if("number"==typeof r){let n=2n**(BigInt(r)-(t?1n:0n))-1n,i=t?-n-1n:0n;if(e>n||e<i)throw new td({max:n.toString(),min:i.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:ta(e,{size:32,signed:t})}}(n,{signed:e,size:Number(t)})}if(r.type.startsWith("bytes"))return function(e,{type:t}){let[,r]=t.split("bytes"),n=tc(e);if(!r){let t=e;return n%32!=0&&(t=tl(t,32*Math.ceil((e.length-2)/2/32))),{dynamic:!0,encoded:tr(ts(ta(n,{size:32})),t)}}if(n!==Number.parseInt(r))throw new t1({expectedSize:Number.parseInt(r),value:e});return{dynamic:!1,encoded:tl(e)}}(n,{type:r.type});if("string"===r.type){var s=n;let e=to(s),t=Math.ceil(tc(e)/32),r=[];for(let n=0;n<t;n++)r.push(tl(tu(e,32*n,(n+1)*32)));return{dynamic:!0,encoded:tr(tl(ta(tc(e),{size:32})),...r)}}throw new t4(r.type)}({checksumAddress:e,parameter:t[i],value:r[i]}));return n}({checksumAddress:n,parameters:e,values:t}));return 0===i.length?"0x":i}function tQ(e,t){if(e.length!==t.length)throw new t2({expectedLength:e.length,givenLength:t.length});let r=[];for(let n=0;n<e.length;n++){let i=e[n],a=t[n];r.push(tQ.encode(i,a))}return tr(...r)}new Uint8Array,new DataView(new ArrayBuffer(0)),(tQ||(tQ={})).encode=function e(t,r,n=!1){if("address"===t)return tF(r),ts(r.toLowerCase(),32*!!n);if("string"===t)return to(r);if("bytes"===t)return r;if("bool"===t)return ts(tn(r),n?32:1);let i=t.match(tY);if(i){let[e,t,a="256"]=i,o=Number.parseInt(a)/8;return ta(r,{size:n?32:o,signed:"int"===t})}let a=t.match(tX);if(a){let[e,t]=a;if(Number.parseInt(t)!==(r.length-2)/2)throw new t1({expectedSize:Number.parseInt(t),value:r});return tl(r,32*!!n)}let o=t.match(tK);if(o&&Array.isArray(r)){let[t,n]=o,i=[];for(let t=0;t<r.length;t++)i.push(e(n,r[t],!0));return 0===i.length?"0x":tr(...i)}throw new t4(t)};class t0 extends e7{constructor({expectedLength:e,givenLength:t,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${e}\`. Given: \`${t}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLe
9ngthMismatchError"})}}class t1 extends e7{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${tc(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class t2 extends e7{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding parameters/values length mismatch.
10Expected length (parameters): ${e}
11Given length (values): ${t}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class t5 extends e7{constructor(e){super(`Value \`${e}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class t4 extends e7{constructor(e){super(`Type \`${e}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function t3(e,t={}){return t_(e,t)}let t6="0x0000000000000000000000000000000000000000";var t7=e.i(72503);async function t9(e,t){let{blockNumber:r,blockTag:n,calls:i,stateOverrides:a,traceAssetChanges:o,traceTransfers:s,validation:u}=t,c=t.account?(0,Z.parseAccount)(t.account):void 0;if(o&&!c)throw new h.BaseError("`account` is required when `traceAssetChanges` is true");let d=c?function(e,t){let{bytecode:r,args:n}=t;return tr(r,e.inputs?.length&&n?.length?tJ(e.inputs,n):"0x")}(t_("constructor(bytes, bytes)"),{bytecode:t7.deploylessCallViaBytecodeBytecode,args:["0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",function(e,...t){let{overloads:r}=e,n=r?function(e,t,r){let n=function(e,t,r){let n,{args:i=[],prepare:a=!0}=r??{},o=function(e,t={}){let{strict:r=!1}=t;try{return!function(e,t={}){let{strict:r=!1}=t;if(!e||"string"!=typeof e)throw new tf(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e)||!e.startsWith("0x"))throw new th(e)}(e,{strict:r}),!0}catch{return!1}}(t,{strict:!1}),s=e.filter(e=>o?"function"===e.type||"error"===e.type?tH(e)===tu(t,0,4):"event"===e.type&&tW(e)===t:"name"in e&&e.name===t);if(0===s.length)throw new tq({name:t});if(1===s.length)return{...s[0],...a?{hash:tW(s[0])}:{}};for(let e of s){if("inputs"in e){if(!i||0===i.length){if(!e.inputs||0===e.inputs.length)return{...e,...a?{hash:tW(e)}:{}};continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===i.length&&i.every((t,r)=>{let n="inputs"in e&&e.inputs[r];return!!n&&function e(t,r){let n=typeof t,i=r.type;switch(i){case"address":return tB(t,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:if("tuple"===i&&"components"in r)return Object.values(r.components).every((r,n)=>e(Object.values(t)[n],r));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===n||"bigint"===n;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===n||t instanceof Uint8Array;
11if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...r,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,n)})){if(n&&"inputs"in n&&n.inputs){let t=function e(t,r,n){for(let i in t){let a=t[i],o=r[i];if("tuple"===a.type&&"tuple"===o.type&&"components"in a&&"components"in o)return e(a.components,o.components,n[i]);let s=[a.type,o.type];if(s.includes("address")&&s.includes("bytes20")||(s.includes("address")&&s.includes("string")||s.includes("address")&&s.includes("bytes"))&&tB(n[i],{strict:!1}))return s}}(e.inputs,n.inputs,i);if(t)throw new tG({abiItem:e,type:t[0]},{abiItem:n,type:t[1]})}n=e}}}let l=(()=>{if(n)return n;let[e,...t]=s;return{...e,overloads:t}})();if(!l)throw new tq({name:t});return{...l,...a?{hash:tW(l)}:{}}}(e,t,r);if("function"!==n.type)throw new tq({name:t,type:"function"});return n}([e,...r],e.name,{args:t[0]}):e,i=tH(n),a=t.length>0?tJ(n.inputs,t[0]):void 0;return a?tr(i,a):i}(t3("function getBalance(address)"),[c.address])]}):void 0,f=o?await Promise.all(t.calls.map(async t=>{if(!t.data&&!t.abi)return;let{accessList:r}=await er(e,{account:c.address,...t,data:t.abi?(0,l.encodeFunctionData)(t):t.data});return r.map(({address:e,storageKeys:t})=>t.length>0?e:null)})).then(e=>e.flat().filter(Boolean)):[],p=a?.map(e=>e.address===c?.address?{...e,nonce:0}:e),m=await tC(e,{blockNumber:r,blockTag:n,blocks:[...o?[{calls:[{data:d}],stateOverrides:a},{calls:f.map((e,t)=>({abi:[t3("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[c.address],to:e,from:t6,nonce:t})),stateOverrides:[{address:t6,nonce:0}]}]:[],{calls:[...i,{}].map((e,t)=>({...e,from:c?.address,nonce:t})),stateOverrides:p},...o?[{calls:[{data:d}]},{calls:f.map((e,t)=>({abi:[t3("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[c.address],to:e,from:t6,nonce:t})),stateOverrides:[{address:t6,nonce:0}]},{calls:f.map((e,t)=>({to:e,abi:[t3("function decimals() returns (uint256)")],functionName:"decimals",from:t6,nonce:t})),stateOverrides:[{address:t6,nonce:0}]},{calls:f.map((e,t)=>({to:e,abi:[t3("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:t6,nonce:t})),stateOverrides:[{address:t6,nonce:0}]},{calls:f.map((e,t)=>({to:e,abi:[t3("function symbol() returns (string)")],functionName:"symbol",from:t6,nonce:t})),stateOverrides:[{address:t6,nonce:0}]}]:[]],traceTransfers:s,validation:u}),g=o?m[2]:m[0],[v,y,,x,b,w,C,S]=o?m:[],{calls:E,...k}=g,A=E.slice(0,-1)??[],T=[...v?.calls??[],...y?.calls??[]].map(e=>"success"===e.status?(0,eP.hexToBigInt)(e.data):null),j=[...x?.calls??[],...b?.calls??[]].map(e=>"success"===e.status?(0,eP.hexToBigInt)(e.data):null),P=(w?.calls??[]).map(e=>"success"===e.status?e.result:null),N=(S?.calls??[]).map(e=>"success"===e.status?e.result:null),R=(C?.calls??[]).map(e=>"success"===e.status?e.result:null),M=[];for(let[e,t]of j.entries()){let r=T[e];if("bigint"!=typeof t||"bigint"!=typeof r)continue;let n=P[e-1],i=N[e-1],a=R[e-1],o=0===e?{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",decimals:18,symbol:"ETH"}:{address:f[e-1],decimals:a||n?Number(n??1):void 0,symbol:i??void 0};M.some(e=>e.token.address===o.address)||M.push({token:o,value:{pre:r,post:t,diff:t-r}})}return{assetChanges:M,block:k,results:A}}async function t8(e,t){let{abi:r,address:n,args:i,dataSuffix:a,functionName:o,...u}=t,c=u.account?(0,Z.parseAccount)(u.account):e.account,d=(0,l.encodeFunctionData)({abi:r,args:i,functionName:o});try{let{data:l}=await (0,E.getAction)(e,A.call,"call")({batch:!1,data:`${d}${a?a.replace("0x",""):""}`,to:n,...u,account:c}),f=(0,s.decodeFunctionResult)({abi:r,args:i,functionName:o,data:l||"0x"}),h=r.filter(e=>"name"in e&&e.name===t.functionName);return{result:f,request:{abi:h,address:n,args:i,dataSuffix:a,functionName:o,...u,account:c}}}catch(e){throw(0,k.getContractError)(e,{abi:r,address:n,args:i,docsPath:"/docs/contract/simulateContract",functionName:o,sender:c?.address})}}async function re(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function rt(e,t){let r,n;return(0,x.keccak256)((r="string"==typeof e?(0,d.stringToHex)(e):"string"==typeof e.raw?e.raw:(0,d.bytesToHex)(e.raw),n=(0,d.stringToHex)(`\x19Ethereum Signed Message:
12${(0,eI.size)(r)}`),(0,v.concat)([n,r])),t)}var rr=e.i(89169),rn=e.i(23838);let ri="0x6492649264926492649264926492649264926492649264926492649264926492";var ra=e.i(90063),ro=e.i(18217),rs=e.i(76267);async function rl(e,t){let{address:r,factory:n,factoryData:i,hash:a,signature:s,universalSignatureVerifierAddress:u=e.chain?.contracts?.universalSignatureVerifier?.address,...c}=t,f=(0,b.isHex)(s)?s:"object"==typeof s&&"r"in s&&"s"in s?function({r:e,s:t,to:r="hex",v:n,yParity:i}){let a=(()=>
12{if(0===i||1===i)return i;if(n&&(27n===n||28n===n||n>=35n))return+(n%2n===0n);throw Error("Invalid `v` or `yParity` value")})(),o=`0x${new rs.secp256k1.Signature((0,eP.hexToBigInt)(e),(0,eP.hexToBigInt)(t)).toCompactHex()}${0===a?"1b":"1c"}`;return"hex"===r?o:(0,y.hexToBytes)(o)}(s):(0,d.bytesToHex)(s),h=await (async()=>n||i?(0,ra.sliceHex)(f,-32)===ri?f:function(e){let{address:t,data:r,signature:n,to:i="hex"}=e,a=(0,v.concatHex)([(0,eu.encodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,r,n]),ri]);return"hex"===i?a:(0,y.hexToBytes)(a)}({address:n,data:i,signature:f}):f)();try{let t=u?{to:u,data:(0,l.encodeFunctionData)({abi:o.universalSignatureValidatorAbi,functionName:"isValidSig",args:[r,a,h]}),...c}:{data:(0,rr.encodeDeployData)({abi:o.universalSignatureValidatorAbi,args:[r,a,h],bytecode:t7.universalSignatureValidatorByteCode}),...c},{data:n}=await (0,E.getAction)(e,A.call,"call")(t);return(0,eP.hexToBool)(n??"0x0")}catch(e){try{if((0,eD.isAddressEqual)((0,rn.getAddress)(r),await (0,ro.recoverAddress)({hash:a,signature:s})))return!0}catch{}if(e instanceof p.CallExecutionError)return!1;throw e}}async function ru(e,{address:t,message:r,factory:n,factoryData:i,signature:a,...o}){return rl(e,{address:t,factory:n,factoryData:i,hash:rt(r),signature:a,...o})}var rc=e.i(43506);function rd({data:e,primaryType:t,types:r}){let n=function e({data:t,primaryType:r,types:n}){let i=[{type:"bytes32"}],a=[function({primaryType:e,types:t}){let r=(0,d.toHex)(function({primaryType:e,types:t}){let r="",n=function e({primaryType:t,types:r},n=new Set){let i=t.match(/^\w*/u),a=i?.[0];if(n.has(a)||void 0===r[a])return n;for(let t of(n.add(a),r[a]))e({primaryType:t.type,types:r},n);return n}({primaryType:e,types:t});for(let i of(n.delete(e),[e,...Array.from(n).sort()]))r+=`${i}(${t[i].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return r}({primaryType:e,types:t}));return(0,x.keccak256)(r)}({primaryType:r,types:n})];for(let o of n[r]){let[r,s]=function t({types:r,name:n,type:i,value:a}){if(void 0!==r[i])return[{type:"bytes32"},(0,x.keccak256)(e({data:a,primaryType:i,types:r}))];if("bytes"===i){let e=a.length%2?"0":"";return a=`0x${e+a.slice(2)}`,[{type:"bytes32"},(0,x.keccak256)(a)]}if("string"===i)return[{type:"bytes32"},(0,x.keccak256)((0,d.toHex)(a))];if(i.lastIndexOf("]")===i.length-1){let e=i.slice(0,i.lastIndexOf("[")),o=a.map(i=>t({name:n,type:e,types:r,value:i}));return[{type:"bytes32"},(0,x.keccak256)((0,eu.encodeAbiParameters)(o.map(([e])=>e),o.map(([,e])=>e)))]}return[{type:i},a]}({types:n,name:o.name,type:o.type,value:t[o.name]});i.push(r),a.push(s)}return(0,eu.encodeAbiParameters)(i,a)}({data:e,primaryType:t,types:r});return(0,x.keccak256)(n)}async function rf(e,t){let{address:r,factory:n,factoryData:i,signature:a,message:o,primaryType:s,types:l,domain:u,...c}=t;return rl(e,{address:r,factory:n,factoryData:i,hash:function(e){let{domain:t={},message:r,primaryType:n}=e,i={EIP712Domain:(0,rc.getTypesForEIP712Domain)({domain:t}),...e.types};(0,rc.validateTypedData)({domain:t,message:r,primaryType:n,types:i});let a=["0x1901"];return t&&a.push(function({domain:e,types:t}){return rd({data:e,primaryType:"EIP712Domain",types:t})}({domain:t,types:i})),"EIP712Domain"!==n&&a.push(rd({data:r,primaryType:n,types:i})),(0,x.keccak256)((0,v.concat)(a))}({message:o,primaryType:s,types:l,domain:u}),signature:a,...c})}var rh=e.i(57351),rp=e.i(20101),rm=e.i(9486),rg=e.i(9760),rv=e.i(34888),ry=e.i(76215);function rx(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:n,onError:i,poll:a,pollingInterval:o=e.pollingInterval}){let s,l,u;return(void 0!==a?a:"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
12onfig.type))?(l=(0,rv.stringify)(["watchBlockNumber",e.uid,t,r,o]),(0,rp.observe)(l,{onBlockNumber:n,onError:i},n=>(0,ry.poll)(async()=>{try{let t=await (0,E.getAction)(e,ej,"getBlockNumber")({cacheTime:0});if(s){if(t===s)return;if(t-s>1&&r)for(let e=s+1n;e<t;e++)n.onBlockNumber(e,s),s=e}(!s||t>s)&&(n.onBlockNumber(t,s),s=t)}catch(e){n.onError?.(e)}},{emitOnBegin:t,interval:o}))):(u=(0,rv.stringify)(["watchBlockNumber",e.uid,t,r]),(0,rp.observe)(u,{onBlockNumber:n,onError:i},t=>{let r=!0,n=()=>r=!1;return(async()=>{try{let i=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:a}=await i.subscribe({params:["newHeads"],onData(e){if(!r)return;let n=(0,eP.hexToBigInt)(e.result?.number);t.onBlockNumber(n,s),s=n},onError(e){t.onError?.(e)}});n=a,r||n()}catch(e){i?.(e)}})(),()=>n()}))}async function rb(e,{confirmations:t=1,hash:r,onReplaced:n,pollingInterval:i=e.pollingInterval,retryCount:a=6,retryDelay:o=({count:e})=>200*~~(1<<e),timeout:s=18e4}){let l,u,c,d=(0,rv.stringify)(["waitForTransactionReceipt",e.uid,r]),f=!1,{promise:h,resolve:p,reject:m}=(0,rm.withResolvers)(),g=s?setTimeout(()=>m(new eQ.WaitForTransactionReceiptTimeoutError({hash:r})),s):void 0,v=(0,rp.observe)(d,{onReplaced:n,resolve:p,reject:m},n=>{let s=(0,E.getAction)(e,rx,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(i){let d=e=>{clearTimeout(g),s(),e(),v()},h=i;if(!f)try{if(c){if(t>1&&(!c.blockNumber||h-c.blockNumber+1n<t))return;d(()=>n.resolve(c));return}if(l||(f=!0,await (0,rg.withRetry)(async()=>{(l=await (0,E.getAction)(e,e1,"getTransaction")({hash:r})).blockNumber&&(h=l.blockNumber)},{delay:o,retryCount:a}),f=!1),c=await (0,E.getAction)(e,e3,"getTransactionReceipt")({hash:r}),t>1&&(!c.blockNumber||h-c.blockNumber+1n<t))return;d(()=>n.resolve(c))}catch(r){if(r instanceof eQ.TransactionNotFoundError||r instanceof eQ.TransactionReceiptNotFoundError){if(!l){f=!1;return}try{u=l,f=!0;let r=await (0,rg.withRetry)(()=>(0,E.getAction)(e,eE.getBlock,"getBlock")({blockNumber:h,includeTransactions:!0}),{delay:o,retryCount:a,shouldRetry:({error:e})=>e instanceof rh.BlockNotFoundError});f=!1;let i=r.transactions.find(({from:e,nonce:t})=>e===u.from&&t===u.nonce);if(!i||(c=await (0,E.getAction)(e,e3,"getTransactionReceipt")({hash:i.hash}),t>1&&(!c.blockNumber||h-c.blockNumber+1n<t)))return;let s="replaced";i.to===u.to&&i.value===u.value&&i.input===u.input?s="repriced":i.from===i.to&&0n===i.value&&(s="cancelled"),d(()=>{n.onReplaced?.({reason:s,replacedTransaction:u,transaction:i,transactionReceipt:c}),n.resolve(c)})}catch(e){d(()=>n.reject(e))}}else d(()=>n.reject(r))}}})});return h}var rw=e.i(83856);let rC=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,rS=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;async function rE(e,t){let{address:r,domain:n,message:i,nonce:a,scheme:o,signature:s,time:l=new Date,...u}=t,c=function(e){let{scheme:t,statement:r,...n}=e.match(rC)?.groups??{},{chainId:i,expirationTime:a,issuedAt:o,notBefore:s,requestId:l,...u}=e.match(rS)?.groups??{},c=e.split("Resources:")[1]?.split("\n- ").slice(1);return{...n,...u,...i?{chainId:Number(i)}:{},...a?{expirationTime:new Date(a)}:{},...o?{issuedAt:new Date(o)}:{},...s?{notBefore:new Date(s)}:{},...l?{requestId:l}:{},...c?{resources:c}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}(i);if(!c.address||!function(e){let{address:t,domain:r,message:n,nonce:i,scheme:a,time:o=new Date}=e;if(r&&n.domain!==r||i&&n.nonce!==i||a&&n.scheme!==a||n.expirationTime&&o>=n.expirationTime||n.notBefore&&o<n.notBefore)return!1;try{if(!n.address||t&&!(0,eD.isAddressEqual)(n.address,t))return!1}catch{return!1}return!0}({address:r,domain:n,message:c,nonce:a,scheme:o,time:l}))return!1;let d=rt(i);return rl(e,{address:c.address,hash:d,signature:s,...u})}var rk=e.i(68941),rA=e.i(38291);function rT(e){return{call:t=>(0,A.call)(e,t),createAccessList:t=>er(e,t),createBlockFilter:()=>ei(e),createContractEventFilter:t=>em(e,t),createEventFilter:t=>eg(e,t),createPendingTransactionFilter:()=>ev(e),estimateContractGas:t=>ex(e,t),estimateGas:t=>(0,ey.estimateGas)(e,t),getBalance:t=>(0,eC.getBalance)(e,t),getBlobBaseFee:()=>eS(e),getBlock:t=>(0,eE.getBlock)(e,t),getBlockNumber:t=>ej(e,t),getBlockTransactionCount:t=>eN(e,t),getBytecode:t=>eM(e,t),getChainId:()=>(0,eR.getChainId)(e),getCode:t=>eM(e,t),getContractEvents:t=>eU(e,t),getEip712Domain:t=>eW(e,t),getEnsAddress:t=>j(e,t),getEnsAvatar:t=>K(e,t),getEnsName:t=>X(e,t),getEnsResolver:t=>Y(e,t),getEnsText:t=>q(e,t),getFeeHistory:t=>eq(e,t),estimateFeesPerGas:t=>(0,eb.estimateFeesPerGas)(e,t),getFilterChanges:t=>eK(e,t),getFilterLogs:t=>eX(e,t),getGasPrice:()=>(0,eY.getGasPrice)(e),getLogs:t=>e$(e,t),getProof:t=>eZ(e,t),estimateMaxPriorityFeePerGas:t=>(0,ew.estimateMaxPriorityFeePerGas)(e,t),getStorageAt:t=>eJ(e,t),getTransaction:t=>e1(e,t),getTransactionConfirmations:t=>e2(e,t),getTransactionCount:t=>(0,e5.getTransactionCount)(e,t),getTransactionReceipt:t=>e3(e,t),multicall:t=>e6(e,t),prepareTransactionRequest:t=>(0,rk.prepareTransactionRequest)(e,t),readContract:t=>T(e,t),sendRawTransaction:t=>(0,rA.sendRawTransaction)(e,t),simulate:t=>tC(e,t),simulateBlocks:t=>tC(e,t),simulateCalls:t=>t9(e,t),simulateContract:t=>t8(e,t),verifyMessage:t=>ru(e,t),verifySiweMessage:t=>rE(e,t),verifyTypedData:t=>rf(e,t),uninstallFilter:t=>re(e,t),waitForTransactionReceipt:t=>rb(e,t),watchBlocks:t=>(function(e,{blockTag:t="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:a,includeTransactions:o,poll:s,pollingInterval:l=e.pollingInterval}){let u,c,d,f,h,p=void 0!==s?s:"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
12onfig.type),m=o??!1;return p?(c=(0,rv.stringify)(["watchBlocks",e.uid,t,r,n,m,l]),(0,rp.observe)(c,{onBlock:i,onError:a},i=>(0,ry.poll)(async()=>{try{let n=await (0,E.getAction)(e,eE.getBlock,"getBlock")({blockTag:t,includeTransactions:m});if(n.number&&u?.number){if(n.number===u.number)return;if(n.number-u.number>1&&r)for(let t=u?.number+1n;t<n.number;t++){let r=await (0,E.getAction)(e,eE.getBlock,"getBlock")({blockNumber:t,includeTransactions:m});i.onBlock(r,u),u=r}}(!u?.number||"pending"===t&&!n?.number||n.number&&n.number>u.number)&&(i.onBlock(n,u),u=n)}catch(e){i.onError?.(e)}},{emitOnBegin:n,interval:l}))):(d=!0,f=!0,h=()=>d=!1,(async()=>{try{n&&(0,E.getAction)(e,eE.getBlock,"getBlock")({blockTag:t,includeTransactions:m}).then(e=>{!d||f&&(i(e,void 0),f=!1)});let r=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:o}=await r.subscribe({params:["newHeads"],async onData(t){if(!d)return;let r=await (0,E.getAction)(e,eE.getBlock,"getBlock")({blockNumber:t.blockNumber,includeTransactions:m}).catch(()=>{});d&&(i(r,u),f=!1,u=r)},onError(e){a?.(e)}});h=o,d||h()}catch(e){a?.(e)}})(),()=>h())})(e,t),watchBlockNumber:t=>rx(e,t),watchContractEvent:t=>(function(e,t){let r,n,i,a,o,{abi:s,address:l,args:u,batch:c=!0,eventName:d,fromBlock:f,onError:h,onLogs:p,poll:m,pollingInterval:g=e.pollingInterval,strict:v}=t;return(void 0!==m?m:"bigint"==typeof f||"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
12onfig.type))?(r=v??!1,n=(0,rv.stringify)(["watchContractEvent",l,u,c,e.uid,d,g,r,f]),(0,rp.observe)(n,{onLogs:p,onError:h},t=>{let n,i;void 0!==f&&(n=f-1n);let a=!1,o=(0,ry.poll)(async()=>{if(!a){try{i=await (0,E.getAction)(e,em,"createContractEventFilter")({abi:s,address:l,args:u,eventName:d,strict:r,fromBlock:f})}catch{}a=!0;return}try{let a;if(i)a=await (0,E.getAction)(e,eK,"getFilterChanges")({filter:i});else{let t=await (0,E.getAction)(e,ej,"getBlockNumber")({});a=n&&n<t?await (0,E.getAction)(e,eU,"getContractEvents")({abi:s,address:l,args:u,eventName:d,fromBlock:n+1n,toBlock:t,strict:r}):[],n=t}if(0===a.length)return;if(c)t.onLogs(a);else for(let e of a)t.onLogs([e])}catch(e){i&&e instanceof rw.InvalidInputRpcError&&(a=!1),t.onError?.(e)}},{emitOnBegin:!0,interval:g});return async()=>{i&&await (0,E.getAction)(e,re,"uninstallFilter")({filter:i}),o()}})):(i=(0,rv.stringify)(["watchContractEvent",l,u,c,e.uid,d,g,v??!1]),a=!0,o=()=>a=!1,(0,rp.observe)(i,{onLogs:p,onError:h},t=>((async()=>{try{let r=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),n=d?eh({abi:s,eventName:d,args:u}):[],{unsubscribe:i}=await r.subscribe({params:["logs",{address:l,topics:n}],onData(e){if(!a)return;let r=e.result;try{let{eventName:e,args:n}=eB({abi:s,data:r.data,topics:r.topics,strict:v}),i=(0,ez.formatLog)(r,{args:n,eventName:e});t.onLogs([i])}catch(a){let e,n;if(a instanceof ea.DecodeLogDataMismatch||a instanceof ea.DecodeLogTopicsMismatch){if(v)return;e=a.abiItem.name,n=a.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let i=(0,ez.formatLog)(r,{args:n?[]:{},eventName:e});t.onLogs([i])}},onError(e){t.onError?.(e)}});o=i,a||o()}catch(e){h?.(e)}})(),()=>o())))})(e,t),watchEvent:t=>(function(e,{address:t,args:r,batch:n=!0,event:i,events:a,fromBlock:o,onError:s,onLogs:l,poll:u,pollingInterval:c=e.pollingInterval,strict:d}){let f,h,p,m=void 0!==u?u:"bigint"==typeof o||"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
12onfig.type),g=d??!1;return m?(f=(0,rv.stringify)(["watchEvent",t,r,n,e.uid,i,c,o]),(0,rp.observe)(f,{onLogs:l,onError:s},s=>{let l,u;void 0!==o&&(l=o-1n);let d=!1,f=(0,ry.poll)(async()=>{if(!d){try{u=await (0,E.getAction)(e,eg,"createEventFilter")({address:t,args:r,event:i,events:a,strict:g,fromBlock:o})}catch{}d=!0;return}try{let o;if(u)o=await (0,E.getAction)(e,eK,"getFilterChanges")({filter:u});else{let n=await (0,E.getAction)(e,ej,"getBlockNumber")({});o=l&&l!==n?await (0,E.getAction)(e,e$,"getLogs")({address:t,args:r,event:i,events:a,fromBlock:l+1n,toBlock:n}):[],l=n}if(0===o.length)return;if(n)s.onLogs(o);else for(let e of o)s.onLogs([e])}catch(e){u&&e instanceof rw.InvalidInputRpcError&&(d=!1),s.onError?.(e)}},{emitOnBegin:!0,interval:c});return async()=>{u&&await (0,E.getAction)(e,re,"uninstallFilter")({filter:u}),f()}})):(h=!0,p=()=>h=!1,(async()=>{try{let n=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),o=a??(i?[i]:void 0),u=[];o&&(u=[o.flatMap(e=>eh({abi:[e],eventName:e.name,args:r}))],i&&(u=u[0]));let{unsubscribe:c}=await n.subscribe({params:["logs",{address:t,topics:u}],onData(e){if(!h)return;let t=e.result;try{let{eventName:e,args:r}=eB({abi:o??[],data:t.data,topics:t.topics,strict:g}),n=(0,ez.formatLog)(t,{args:r,eventName:e});l([n])}catch(i){let e,r;if(i instanceof ea.DecodeLogDataMismatch||i instanceof ea.DecodeLogTopicsMismatch){if(d)return;e=i.abiItem.name,r=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let n=(0,ez.formatLog)(t,{args:r?[]:{},eventName:e});l([n])}},onError(e){s?.(e)}});p=c,h||p()}catch(e){s?.(e)}})(),()=>p())})(e,t),watchPendingTransactions:t=>(function(e,{batch:t=!0,onError:r,onTransactions:n,poll:i,pollingInterval:a=e.pollingInterval}){let o,s,l;return(void 0!==i?i:"webSocket"!==e.transport.type)?(o=(0,rv.stringify)(["watchPendingTransactions",e.uid,t,a]),(0,rp.observe)(o,{onTransactions:n,onError:r},r=>{let n,i=(0,ry.poll)(async()=>{try{if(!n)try{n=await (0,E.getAction)(e,ev,"createPendingTransactionFilter")({});return}catch(e){throw i(),e}let a=await (0,E.getAction)(e,eK,"getFilterChanges")({filter:n});if(0===a.length)return;if(t)r.onTransactions(a);else for(let e of a)r.onTransactions([e])}catch(e){r.onError?.(e)}},{emitOnBegin:!0,interval:a});return async()=>{n&&await (0,E.getAction)(e,re,"uninstallFilter")({filter:n}),i()}})):(s=!0,l=()=>s=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!s)return;let t=e.result;n([t])},onError(e){r?.(e)}});l=t,s||l()}catch(e){r?.(e)}})(),()=>l())})(e,t)}}function rj(e){let{key:t="public",name:r="Public Client"}=e;return(0,a.createClient)({...e,key:t,name:r,type:"publicClient"}).extend(rT)}var rP=e.i(95767),rN=h;class rR extends rN.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}var rM=e.i(71706);let rD={current:0,take(){return this.current++},reset(){this.current=0}};var rI=e.i(95331);function rL(e,t={}){let{batch:r,fetchOptions:n,key:i="http",methods:a,name:o="HTTP JSON-RPC",onFetchRequest:s,onFetchResponse:l,retryDelay:u,raw:c}=t;return({chain:d,retryCount:f,timeout:h})=>{let{batchSize:p=1e3,wait:m=0}="object"==typeof r?r:{},g=t.retryCount??f,v=h??t.timeout??1e4,y=e||d?.rpcUrls.default.http[0];if(!y)throw new rR;let x=function(e,t={}){return{async request(r){let{body:n,onRequest:i=t.onRequest,onResponse:a=t.onResponse,timeout:o=t.timeout??1e4}=r,s={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:l,method:u,signal:c}=s;try{let t,r=await function(e,{errorInstance:t=Error("timed out"),timeout:r,signal:n}){return new Promise((i,a)=>{(async()=>{let o;try{let s=new AbortController;r>0&&(o=setTimeout(()=>{n?s.abort():a(t)},r)),i(await e({signal:s?.signal||null}))}catch(e){e?.name==="AbortError"&&a(t),a(e)}finally{clearTimeout(o)}})()})}(async({signal:t})=>{let r={...s,body:Array.isArray(n)?(0,rv.stringify)(n.map(e=>({jsonrpc:"2.0",id:e.id??rD.take(),...e}))):(0,rv.stringify)({jsonrpc:"2.0",id:n.id??rD.take(),...n}),headers:{"Content-Type":"application/json",...l},method:u||"POST",signal:c||(o>0?t:null)}
12,a=new Request(e,r),d=await i?.(a,r)??{...r,url:e};return await fetch(d.url??e,d)},{errorInstance:new rP.TimeoutError({body:n,url:e}),timeout:o,signal:!0});if(a&&await a(r),r.headers.get("Content-Type")?.startsWith("application/json"))t=await r.json();else{t=await r.text();try{t=JSON.parse(t||"{}")}catch(e){if(r.ok)throw e;t={error:t}}}if(!r.ok)throw new rP.HttpRequestError({body:n,details:(0,rv.stringify)(t.error)||r.statusText,headers:r.headers,status:r.status,url:e});return t}catch(t){if(t instanceof rP.HttpRequestError||t instanceof rP.TimeoutError)throw t;throw new rP.HttpRequestError({body:n,cause:t,url:e})}}}}(y,{fetchOptions:n,onRequest:s,onResponse:l,timeout:v});return(0,rI.createTransport)({key:i,methods:a,name:o,async request({method:e,params:t}){let n={method:e,params:t},{schedule:i}=(0,rM.createBatchScheduler)({id:y,wait:m,shouldSplitBatch:e=>e.length>p,fn:e=>x.request({body:e}),sort:(e,t)=>e.id-t.id}),a=async e=>r?i(e):[await x.request({body:e})],[{error:o,result:s}]=await a(n);if(c)return{error:o,result:s};if(o)throw new rP.RpcRequestError({body:n,error:o,url:y});return s},retryCount:g,retryDelay:u,timeout:v,type:"http"},{fetchOptions:n,url:y})}}var rO=e.i(44954);let rF=async e=>{try{let t=new FormData,r=new Blob([JSON.stringify(e)],{type:"application/json"}),n=new File([r],"metadata.json",{type:"application/json"});t.append("file",n);let i=await fetch("/api/pinata",{method:"POST",body:t});if(!i.ok)throw Error("Failed to upload metadata to IPFS");return await i.json()}catch(e){throw console.error("Error uploading to IPFS:",e),e}};function rB(e){let t=encodeURIComponent(JSON.stringify(function({url:e,width:t,height:r}){return{properties:{src:e},type:"IFRAME",width:t,height:r}}(e)));return`https://universaleverything.io/add-widget?data=${t}`}function rV(e){return rB({url:e.app.url,width:e.app.defaultGridSize.width,height:e.app.defaultGridSize.height})}function rz(e){return rB({url:e.url,width:e.gridSize.width,height:e.gridSize.height})}e.s(["useAppLaunch",0,function(){let a=function(){let{sections:a,setSections:o}=(0,r.useGrid)(),{accounts:s,client:l}=(0,i.useUpProvider)(),[u,c]=(0,t.useState)(!1),[d,f]=(0,t.useState)(!1),[h,p]=(0,t.useState)(!1),[m,g]=(0,t.useState)(null),[v,y]=(0,t.useState)(null),x=(e,t)=>t?.url??e.app.url,b=(e,t)=>t?.name??e.app.name,w=(e,t)=>{let r=x(e,t);return a.some(e=>e.grid.some(e=>"IFRAME"===e.type&&e.properties.src===r))},C=async(t,r,i=null)=>{c(!0);let u=x(t,i),d=b(t,i),f=i?.gridSize??t.app.defaultGridSize;try{let t=[...a],i={type:"IFRAME",width:f.width,height:f.height,properties:{src:u}};t[r].grid.push(i);let c={LSP28TheGrid:t},h=await rF(c),p=[{name:"LSP28TheGrid",key:"0x724141d9918ce69e6b8afcf53a91748466086ba2c74b94cab43c649ae2ac23ff",keyType:"Singleton",valueType:"bytes",valueContent:"VerifiableURI"}],{ERC725:m}=await e.A(52915),g=new m(p).encodeData([{keyName:"LSP28TheGrid",value:{json:c,url:`ipfs://${h.split("/ipfs/")[1]}`}}]),v=await l?.writeContract({address:s[0],abi:[{name:"setData",type:"function",inputs:[{name:"key",type:"bytes32"},{name:"value",type:"bytes"}],outputs:[],stateMutability:"payable"}],functionName:"setData",args:[p[0].key,g.values[0]],account:s[0],chain:rO.lukso});o(t),(0,n.toast)(`${d} installed successfully`,{duration:3e3,position:"bottom-center",style:{background:"#303030",color:"#f0f0f0",border:"1px solid #303030"}}),rj({chain:rO.lukso,transport:rL()}).waitForTransactionReceipt({hash:v}).then(e=>{e||console.error("Transaction failed:",v)}).catch(e=>{console.error("Error checking transaction receipt:",e)})}catch(e){console.error("Error installing app:",e),(0,n.toast)(`Failed to install ${d}`,{duration:3e3,position:"bottom-center",style:{background:"#303030",color:"#f0f0f0",border:"1px solid #303030"}})}finally{c(!1)}};return{handleInstall:async(e,t=null)=>{s&&0!==s.length&&l?w(e,t)?(0,n.toast)(`${b(e,t)} is already installed`,{duration:3e3,position:"bottom-center",style:{background:"#303030",color:"#f0f0f0",border:"1px solid #303030"}}):(g(e),y(t),p(!0)):(0,n.toast)("Connect your Universal Profile to install apps",{duration:3e3,position:"bottom-center",style:{background:"#dc2626",color:"#ffffff",border:"1px solid #dc2626"}})},handleUninstall:async t=>{if(!s||0===s.length||!l)return void(0,n.toast)("Connect your Universal Profile to uninstall apps",{duration:3e3,position:"bottom-center",style:{background:"#dc2626",color:"#ffffff",border:"1px solid #dc2626"}});f(!0);try{let r=a.map(e=>({...e,grid:e.grid.filter(e=>"IFRAME"!==e.type||e.properties.src!==t.app.url)})).filter(e=>e.grid.length>0),i={LSP28TheGrid:r},u=await rF(i),c=[{name:"LSP28TheGrid",key:"0x724141d9918ce69e6b8afcf53a91748466086ba2c74b94cab43c649ae2ac23ff",keyType:"Singleton",valueType:"bytes",valueContent:"VerifiableURI"}],{ERC725:d}=await e.A(52915),f=new d(c).encodeData([{keyName:"LSP28TheGrid",value:{json:i,url:`ipfs://${u.split("/ipfs/")[1]}`}}]),h=await l?.writeContract({address:s[0],abi:[{name:"setData",type:"function",inputs:[{name:"key",type:"bytes32"},{name:"value",type:"bytes"}],outputs:[],stateMutability:"payable"}],functionName:"setData",args:[c[0].key,f.values[0]],account:s[0],chain:rO.lukso});o(r),(0,n.toast)(`${t.app.name} uninstalled successfully`,{duration:3e3,position:"bottom-center",style:{background:"#303030",color:"#f0f0f0",border:"1px solid #303030"}}),rj({chain:rO.lukso,transport:rL()}).waitForTransactionReceipt({hash:h}).then(e=>{e||console.error("Transaction failed:",h)}).catch(e=>{console.error("Error checking transaction receipt:",e)})}catch(e){console.error("Error uninstalling app:",e),(0,n.toast)(`Failed to uninstall ${t.app.name}`,{duration:3e3,position:"bottom-center",style:{background:"#303030",color:"#f0f0f0",border:"1px solid #303030"}})}finally{f(!1)}},isInstalling:u,isUninstalling:d,isInstalled:w,showGridSelection:h,setShowGridSelection:p,pendingApp:m,pendingWidget:v,handleGridSelect:e=>{m&&(C(m,e,v),g(null),y(null)),p(!1)},handleGridSelectionCancel:()=>{g(null),y(null),p(!1)}}}(),{walletConnected:o,isMiniApp:s}=(0,i.useUpProvider)(),l=o&&s,u=(0,t.useCallback)(e=>{let t=e?.app?.url;t&&(!function(e){if(e)try{let t=`upstore:opened:${e}`;if(window.sessionStorage.getItem(t))return;window.sessionStorage.setItem(t,"1");let r=JSON.stringify({appId:e});if("u">typeof navigator&&navigator.sendBeacon){let e=new Blob([r],{type:"application/json"});navigator.sendBeacon("/api/track-open",e);return}fetch("/api/track-open",{method:"POST",headers:{"Content-Type":"application/json"},body:r,keepalive:!0}
12).catch(()=>{})}catch{}}(e?.id),window.open(t,"_blank","noopener,noreferrer"))},[]),c=(0,t.useCallback)((e,t)=>{if(l)return void a.handleInstall(e,t);if(!(t?.url??e?.app?.url))return;let r=t?rz(t):rV(e);window.open(r,"_blank","noopener,noreferrer")},[l,a.handleInstall]),d=(0,t.useCallback)(e=>({kind:"install",label:"Add to Grid",run:c}),[c]),f=(0,t.useCallback)(e=>({kind:"open",label:"Open",run:u}),[u]);return{canInstallToGrid:l,isInGridContext:l,openApp:u,addToGrid:c,getAddToGridUrl:rV,getWidgetAddToGridUrl:rz,getPrimaryAction:d,getSecondaryAction:f,handleInstall:a.handleInstall,handleUninstall:a.handleUninstall,isInstalled:a.isInstalled,isInstalling:a.isInstalling,isUninstalling:a.isUninstalling,showGridSelection:a.showGridSelection,setShowGridSelection:a.setShowGridSelection,pendingApp:a.pendingApp,pendingWidget:a.pendingWidget,handleGridSelect:a.handleGridSelect,handleGridSelectionCancel:a.handleGridSelectionCancel}}],88316)},26330,65491,74606,e=>{"use strict";let t;var r,n=e.i(71645),i=e.i(81140),a=e.i(48425),o=e.i(20783),s=e.i(9937),l=e.i(43476),u="dismissableLayer.update",c=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),d=n.forwardRef((e,t)=>{let{disableOutsidePointerEvents:d=!1,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:v,onDismiss:y,...x}=e,b=n.useContext(c),[w,C]=n.useState(null),S=w?.ownerDocument??globalThis?.document,[,E]=n.useState({}),k=(0,o.useComposedRefs)(t,e=>C(e)),A=Array.from(b.layers),[T]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),j=A.indexOf(T),P=w?A.indexOf(w):-1,N=b.layersWithOutsidePointerEventsDisabled.size>0,R=P>=j,M=function(e,t=globalThis?.document){let r=(0,s.useCallbackRef)(e),i=n.useRef(!1),a=n.useRef(()=>{});return n.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let n=function(){h("dismissableLayer.pointerDownOutside",r,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=n,t.addEventListener("click",a.current,{once:!0})):n()}else t.removeEventListener("click",a.current);i.current=!1},n=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>i.current=!0}}(e=>{let t=e.target,r=[...b.branches].some(e=>e.contains(t));R&&!r&&(m?.(e),v?.(e),e.defaultPrevented||y?.())},S),D=function(e,t=globalThis?.document){let r=(0,s.useCallbackRef)(e),i=n.useRef(!1);return n.useEffect(()=>{let e=e=>{e.target&&!i.current&&h("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}(e=>{let t=e.target;![...b.branches].some(e=>e.contains(t))&&(g?.(e),v?.(e),e.defaultPrevented||y?.())},S);return!function(e,t=globalThis?.document){let r=(0,s.useCallbackRef)(e);n.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{P===b.layers.size-1&&(p?.(e),!e.defaultPrevented&&y&&(e.preventDefault(),y()))},S),n.useEffect(()=>{if(w)return d&&(0===b.layersWithOutsidePointerEventsDisabled.size&&(r=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),b.layersWithOutsidePointerEventsDisabled.add(w)),b.layers.add(w),f(),()=>{d&&1===b.layersWithOutsidePointerEventsDisabled.size&&(S.body.style.pointerEvents=r)}},[w,S,d,b]),n.useEffect(()=>()=>{w&&(b.layers.delete(w),b.layersWithOutsidePointerEventsDisabled.delete(w),f())},[w,b]),n.useEffect(()=>{let e=()=>E({});return document.addEventListener(u,e),()=>document.removeEventListener(u,e)},[]),(0,l.jsx)(a.Primitive.div,{...x,ref:k,style:{pointerEvents:N?R?"auto":"none":void 0,...e.style},onFocusCapture:(0,i.composeEventHandlers)(e.onFocusCapture,D.onFocusCapture),onBlurCapture:(0,i.composeEventHandlers)(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:(0,i.composeEventHandlers)(e.onPointerDownCapture,M.onPointerDownCapture)})});function f(){let e=new CustomEvent(u);document.dispatchEvent(e)}function h(e,t,r,{discrete:n}){let i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?(0,a.dispatchDiscreteCustomEvent)(i,o):i.dispatchEvent(o)}d.displayName="DismissableLayer",n.forwardRef((e,t)=>
12{let r=n.useContext(c),i=n.useRef(null),s=(0,o.useComposedRefs)(t,i);return n.useEffect(()=>{let e=i.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,l.jsx)(a.Primitive.div,{...e,ref:s})}).displayName="DismissableLayerBranch",e.s(["DismissableLayer",0,d],26330);var p="focusScope.autoFocusOnMount",m="focusScope.autoFocusOnUnmount",g={bubbles:!1,cancelable:!0},v=n.forwardRef((e,t)=>{let{loop:r=!1,trapped:i=!1,onMountAutoFocus:u,onUnmountAutoFocus:c,...d}=e,[f,h]=n.useState(null),v=(0,s.useCallbackRef)(u),C=(0,s.useCallbackRef)(c),S=n.useRef(null),E=(0,o.useComposedRefs)(t,e=>h(e)),k=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect(()=>{if(i){let e=function(e){if(k.paused||!f)return;let t=e.target;f.contains(t)?S.current=t:b(S.current,{select:!0})},t=function(e){if(k.paused||!f)return;let t=e.relatedTarget;null!==t&&(f.contains(t)||b(S.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&b(f)});return f&&r.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[i,f,k.paused]),n.useEffect(()=>{if(f){w.add(k);let e=document.activeElement;if(!f.contains(e)){let t=new CustomEvent(p,g);f.addEventListener(p,v),f.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(b(n,{select:t}),document.activeElement!==r)return}(y(f).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&b(f))}return()=>{f.removeEventListener(p,v),setTimeout(()=>{let t=new CustomEvent(m,g);f.addEventListener(m,C),f.dispatchEvent(t),t.defaultPrevented||b(e??document.body,{select:!0}),f.removeEventListener(m,C),w.remove(k)},0)}}},[f,v,C,k]);let A=n.useCallback(e=>{if(!r&&!i||k.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){var a;let t,i=e.currentTarget,[o,s]=[x(t=y(a=i),a),x(t.reverse(),a)];o&&s?e.shiftKey||n!==s?e.shiftKey&&n===o&&(e.preventDefault(),r&&b(s,{select:!0})):(e.preventDefault(),r&&b(o,{select:!0})):n===i&&e.preventDefault()}},[r,i,k.paused]);return(0,l.jsx)(a.Primitive.div,{tabIndex:-1,...d,ref:E,onKeyDown:A})});function y(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let 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(;r.nextNode();)t.push(r.currentNode);return t}function x(e,t){for(let r of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function b(e,{select:t=!1}={}){if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}v.displayName="FocusScope";var w=(t=[],{add(e){let r=t[0];e!==r&&r?.pause(),(t=C(t,e)).unshift(e)},remove(e){t=C(t,e),t[0]?.resume()}});function C(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}e.s(["FocusScope",0,v],65491);var S=e.i(74080),E=e.i(34620),k=n.forwardRef((e,t)=>{let{container:r,...i}=e,[o,s]=n.useState(!1);(0,E.useLayoutEffect)(()=>s(!0),[]);let u=r||o&&globalThis?.document?.body;return u?S.default.createPortal((0,l.jsx)(a.Primitive.div,{...i,ref:t}),u):null});k.displayName="Portal",e.s(["Portal",0,k],74606)},26999,3536,85369,86312,e=>{"use strict";var t,r,n,i,a,o,s,l=e.i(71645),u=e.i(81140),c=e.i(20783),d=e.i(30030),f=e.i(10772),h=e.i(69340),p=e.i(26330),m=e.i(65491),g=e.i(74606),v=e.i(96626),y=e.i(48425),x=0;function b(){l.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??w()),document.body.insertAdjacentElement("beforeend",e[1]??w()),x++,()=>{1===x&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e
12=>e.remove()),x--}},[])}function w(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}e.s(["useFocusGuards",0,b],3536);var C=e.i(90571),S="right-scroll-bar-position",E="width-before-scroll-bar";function k(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var A="u">typeof window?l.useLayoutEffect:l.useEffect,T=new WeakMap,j=(void 0===t&&(t={}),(void 0===r&&(r=function(e){return e}),n=[],i=!1,a={read:function(){if(i)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:null},useMedium:function(e){var t=r(e,i);return n.push(t),function(){n=n.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(i=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){i=!0;var t=[];if(n.length){var r=n;n=[],r.forEach(e),t=n}var a=function(){var r=t;t=[],r.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}).options=(0,C.__assign)({async:!0,ssr:!1},t),a),P=function(){},N=l.forwardRef(function(e,t){var r,n,i,a,o=l.useRef(null),s=l.useState({onScrollCapture:P,onWheelCapture:P,onTouchMoveCapture:P}),u=s[0],c=s[1],d=e.forwardProps,f=e.children,h=e.className,p=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,y=e.noIsolation,x=e.inert,b=e.allowPinchZoom,w=e.as,S=e.gapMode,E=(0,C.__rest)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=(r=[o,t],n=function(e){return r.forEach(function(t){return k(t,e)})},(i=(0,l.useState)(function(){return{value:null,callback:n,facade:{get current(){return i.value},set current(value){var e=i.value;e!==value&&(i.value=value,i.callback(value,e))}}}})[0]).callback=n,a=i.facade,A(function(){var e=T.get(a);if(e){var t=new Set(e),n=new Set(r),i=a.current;t.forEach(function(e){n.has(e)||k(e,null)}),n.forEach(function(e){t.has(e)||k(e,i)})}T.set(a,r)},[r]),a),R=(0,C.__assign)((0,C.__assign)({},E),u);return l.createElement(l.Fragment,null,m&&l.createElement(v,{sideCar:j,removeScrollBar:p,shards:g,noIsolation:y,inert:x,setCallbacks:c,allowPinchZoom:!!b,lockRef:o,gapMode:S}),d?l.cloneElement(l.Children.only(f),(0,C.__assign)((0,C.__assign)({},R),{ref:N})):l.createElement(void 0===w?"div":w,(0,C.__assign)({},R,{className:h,ref:N}),f))});N.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},N.classNames={fullWidth:E,zeroRight:S};var R=function(e){var t=e.sideCar,r=(0,C.__rest)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return l.createElement(n,(0,C.__assign)({},r))};R.isSideCarExport=!0;var M=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=s||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var n,i;(n=t).styleSheet?n.styleSheet.cssText=r:n.appendChild(document.createTextNode(r)),i=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},D=function(){var e=M();return function(t,r){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},I=function(){var e=D();return function(t){return e(t.styles,t.dynamic),null}},L={left:0,top:0,right:0,gap:0},O=function(e){return parseInt(e||"",10)||0},F=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[O(r),O(n),O(i)]},B=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return L;var t=F(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},V=I(),z="data-scroll-locked",$=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(n,";\n   padding-right: ").concat(s,"px ").concat(n,";\n  }\n  body[").concat(z,"] {\n    overflow: hidden ").concat(n,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n    padding-left: ".concat(i,"px;\n    padding-top: ").concat(a,"px;\n    padding-right: ").concat(o,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(s,"px ").concat(n,";\n    "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";
12")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(S," {\n    right: ").concat(s,"px ").concat(n,";\n  }\n  \n  .").concat(E," {\n    margin-right: ").concat(s,"px ").concat(n,";\n  }\n  \n  .").concat(S," .").concat(S," {\n    right: 0 ").concat(n,";\n  }\n  \n  .").concat(E," .").concat(E," {\n    margin-right: 0 ").concat(n,";\n  }\n  \n  body[").concat(z,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n  }\n")},U=function(){var e=parseInt(document.body.getAttribute(z)||"0",10);return isFinite(e)?e:0},_=function(){l.useEffect(function(){return document.body.setAttribute(z,(U()+1).toString()),function(){var e=U()-1;e<=0?document.body.removeAttribute(z):document.body.setAttribute(z,e.toString())}},[])},H=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=void 0===n?"margin":n;_();var a=l.useMemo(function(){return B(i)},[i]);return l.createElement(V,{styles:$(a,!t,i,r?"":"!important")})},W=!1;if("u">typeof window)try{var G=Object.defineProperty({},"passive",{get:function(){return W=!0,!0}});window.addEventListener("test",G,G),window.removeEventListener("test",G,G)}catch(e){W=!1}var q=!!W&&{passive:!1},K=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&(r.overflowY!==r.overflowX||"TEXTAREA"===e.tagName||"visible"!==r[t])},X=function(e,t){var r=t.ownerDocument,n=t;do{if("u">typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Y(e,n)){var i=Z(e,n);if(i[1]>i[2])return!0}n=n.parentNode}while(n&&n!==r.body)return!1},Y=function(e,t){return"v"===e?K(t,"overflowY"):K(t,"overflowX")},Z=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},J=function(e,t,r,n,i){var a,o=(a=window.getComputedStyle(t).direction,"h"===e&&"rtl"===a?-1:1),s=o*n,l=r.target,u=t.contains(l),c=!1,d=s>0,f=0,h=0;do{var p=Z(e,l),m=p[0],g=p[1]-p[2]-o*m;(m||g)&&Y(e,l)&&(f+=g,h+=m),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l))return d&&(i&&1>Math.abs(f)||!i&&s>f)?c=!0:!d&&(i&&1>Math.abs(h)||!i&&-s>h)&&(c=!0),c},Q=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ee=function(e){return[e.deltaX,e.deltaY]},et=function(e){return e&&"current"in e?e.current:e},er=0,en=[];let ei=(o=function(e){var t=l.useRef([]),r=l.useRef([0,0]),n=l.useRef(),i=l.useState(er++)[0],a=l.useState(I)[0],o=l.useRef(e);l.useEffect(function(){o.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(0,C.__spreadArray)([e.lockRef.current],(e.shards||[]).map(et),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=l.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!o.current.allowPinchZoom;var i,a=Q(e),s=r.current,l="deltaX"in e?e.deltaX:s[0]-a[0],u="deltaY"in e?e.deltaY:s[1]-a[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=X(d,c);if(!f)return!0;if(f?i=d:(i="v"===d?"h":"v",f=X(d,c)),!f)return!1;if(!n.current&&"changedTouches"in e&&(l||u)&&(n.current=i),!i)return!0;var h=n.current||i;return J(h,t,e,"h"===h?l:u,!0)},[]),u=l.useCallback(function(e){if(en.length&&en[en.length-1]===a){var r="deltaY"in e?ee(e):Q(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta,n[0]===r[0]&&n[1]===r[1])})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var i=(o.current.shards||[]).map(et).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?s(e,i[0]):!o.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=l.useCallback(function(e,r,n,i){var a={name:e,delta:r,target:n,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=l.useCallback(function(e){r.current=Q(e),n.current=void 0},[]),f=l.useCallback(function(t){c(t.type,ee(t),t.target,s(t,e.lockRef.current))},[]),h=l.useCallback(function(t){c(t.type,Q(t),t.target,s(t,e.lockRef.current))},[]);l.useEffect(function(){return en.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,q),document.addEventListener("touchmove",u,q),document.addEventListener("touchstart",d,q),function(){en=en.filter(function(e){return e!==a}),document.removeEventListener("wheel",u,q),document.removeEventListener("touchmove",u,q),document.removeEventListener("touchstart",d,q)}},[]);var p=e.removeScrollBar,m=e.inert;return l.createElement(l.Fragment,null,m?l.createElement(a,{styles:"\n  .block-interactivity-".concat(i," {pointer-events: none;}\n  .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,p?l.createElement(H,{gapMode:e.gapMode}):null)},j.useMedium(o),R);var ea=l.forwardRef(function(e,t){return l.createElement(N,(0,C.__assign)({},e,{ref:t,sideCar:ei}))});ea.classNames=N.classNames,e.s(["RemoveScroll",0,ea],85369);var eo=new WeakMap,es=new WeakMap,el={},eu=0,ec=function(e){return e&&(e.host||ec(e.parentNode))},ed=function(e,t,r,n){var i=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var r=ec(e);return r&&t.contains(r)?r:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});el[r]||(el[r]=new WeakMap);var a=el[r],o=[],s=new Set,l=new Set(i),u=function(e){!e||s.has(e)||(s.add(e),u(e.parentNode))};
12i.forEach(u);var c=function(e){!e||l.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))c(e);else try{var t=e.getAttribute(n),i=null!==t&&"false"!==t,l=(eo.get(e)||0)+1,u=(a.get(e)||0)+1;eo.set(e,l),a.set(e,u),o.push(e),1===l&&i&&es.set(e,!0),1===u&&e.setAttribute(r,"true"),i||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),s.clear(),eu++,function(){o.forEach(function(e){var t=eo.get(e)-1,i=a.get(e)-1;eo.set(e,t),a.set(e,i),t||(es.has(e)||e.removeAttribute(n),es.delete(e)),i||e.removeAttribute(r)}),--eu||(eo=new WeakMap,eo=new WeakMap,es=new WeakMap,el={})}},ef=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),ed(n,i,r,"aria-hidden")):function(){return null}};e.s(["hideOthers",0,ef],86312);var eh=e.i(91918),ep=e.i(43476),em="Dialog",[eg,ev]=(0,d.createContextScope)(em),[ey,ex]=eg(em),eb=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=l.useRef(null),u=l.useRef(null),[c,d]=(0,h.useControllableState)({prop:n,defaultProp:i??!1,onChange:a,caller:em});return(0,ep.jsx)(ey,{scope:t,triggerRef:s,contentRef:u,contentId:(0,f.useId)(),titleId:(0,f.useId)(),descriptionId:(0,f.useId)(),open:c,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(e=>!e),[d]),modal:o,children:r})};eb.displayName=em;var ew="DialogTrigger",eC=l.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=ex(ew,r),a=(0,c.useComposedRefs)(t,i.triggerRef);return(0,ep.jsx)(y.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":eU(i.open),...n,ref:a,onClick:(0,u.composeEventHandlers)(e.onClick,i.onOpenToggle)})});eC.displayName=ew;var eS="DialogPortal",[eE,ek]=eg(eS,{forceMount:void 0}),eA=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=ex(eS,t);return(0,ep.jsx)(eE,{scope:t,forceMount:r,children:l.Children.map(n,e=>(0,ep.jsx)(v.Presence,{present:r||a.open,children:(0,ep.jsx)(g.Portal,{asChild:!0,container:i,children:e})}))})};eA.displayName=eS;var eT="DialogOverlay",ej=l.forwardRef((e,t)=>{let r=ek(eT,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=ex(eT,e.__scopeDialog);return a.modal?(0,ep.jsx)(v.Presence,{present:n||a.open,children:(0,ep.jsx)(eN,{...i,ref:t})}):null});ej.displayName=eT;var eP=(0,eh.createSlot)("DialogOverlay.RemoveScroll"),eN=l.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=ex(eT,r);return(0,ep.jsx)(ea,{as:eP,allowPinchZoom:!0,shards:[i.contentRef],children:(0,ep.jsx)(y.Primitive.div,{"data-state":eU(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),eR="DialogContent",eM=l.forwardRef((e,t)=>{let r=ek(eR,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=ex(eR,e.__scopeDialog);return(0,ep.jsx)(v.Presence,{present:n||a.open,children:a.modal?(0,ep.jsx)(eD,{...i,ref:t}):(0,ep.jsx)(eI,{...i,ref:t})})});eM.displayName=eR;var eD=l.forwardRef((e,t)=>{let r=ex(eR,e.__scopeDialog),n=l.useRef(null),i=(0,c.useComposedRefs)(t,r.contentRef,n);return l.useEffect(()=>{let e=n.current;if(e)return ef(e)},[]),(0,ep.jsx)(eL,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,u.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:(0,u.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,u.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault())})}),eI=l.forwardRef((e,t)=>{let r=ex(eR,e.__scopeDialog),n=l.useRef(!1),i=l.useRef(!1);return(0,ep.jsx)(eL,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let a=t.target;r.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),eL=l.forwardRef((e,t)=>
12{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=ex(eR,r),u=l.useRef(null),d=(0,c.useComposedRefs)(t,u);return b(),(0,ep.jsxs)(ep.Fragment,{children:[(0,ep.jsx)(m.FocusScope,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,ep.jsx)(p.DismissableLayer,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":eU(s.open),...o,ref:d,onDismiss:()=>s.onOpenChange(!1)})}),(0,ep.jsxs)(ep.Fragment,{children:[(0,ep.jsx)(eG,{titleId:s.titleId}),(0,ep.jsx)(eq,{contentRef:u,descriptionId:s.descriptionId})]})]})}),eO="DialogTitle",eF=l.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=ex(eO,r);return(0,ep.jsx)(y.Primitive.h2,{id:i.titleId,...n,ref:t})});eF.displayName=eO;var eB="DialogDescription",eV=l.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=ex(eB,r);return(0,ep.jsx)(y.Primitive.p,{id:i.descriptionId,...n,ref:t})});eV.displayName=eB;var ez="DialogClose",e$=l.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=ex(ez,r);return(0,ep.jsx)(y.Primitive.button,{type:"button",...n,ref:t,onClick:(0,u.composeEventHandlers)(e.onClick,()=>i.onOpenChange(!1))})});function eU(e){return e?"open":"closed"}e$.displayName=ez;var e_="DialogTitleWarning",[eH,eW]=(0,d.createContext)(e_,{contentName:eR,titleName:eO,docsSlug:"dialog"}),eG=({titleId:e})=>{let t=eW(e_),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
13
14If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
15
16For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},eq=({contentRef:e,descriptionId:t})=>{let r=eW("DialogDescriptionWarning"),n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return l.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null};e.s(["Close",0,e$,"Content",0,eM,"Description",0,eV,"Overlay",0,ej,"Portal",0,eA,"Root",0,eb,"Title",0,eF,"Trigger",0,eC],26999)},70756,48256,63209,70152,e=>{"use strict";var t=e.i(75254);let r=(0,t.default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",0,r],70756);let n=(0,t.default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",0,n],48256);let i=(0,t.default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,i],63209),e.s(["clamp",0,function(e,[t,r]){return Math.min(r,Math.max(t,e))}],70152)},53660,e=>{"use strict";var t=e.i(71645);let r=["top","right","bottom","left"],n=Math.min,i=Math.max,a=Math.round,o=Math.floor,s=e=>({x:e,y:e}),l={left:"right",right:"left",bottom:"top",top:"bottom"},u={start:"end",end:"start"};function c(e,t){return"function"==typeof e?e(t):e}function d(e){return e.split("-")[0]}function f(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function p(e){return"y"===e?"height":"width"}function m(e){return["top","bottom"].includes(d(e))?"y":"x"}function g(e){return e.replace(/start|end/g,e=>u[e])}function v(e){return e.replace(/left|right|bottom|top/g,e=>l[e])}function y(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function x(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function b(e,t,r){let n,{reference:i,floating:a}=e,o=m(t),s=h(m(t)),l=p(s),u=d(t),c="y"===o,g=i.x+i.width/2-a.width/2,v=i.y+i.height/2-a.height/2,y=i[l]/2-a[l]/2;switch(u){case"top":n={x:g,y:i.y-a.height};break;case"bottom":n={x:g,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:v};break;case"left":n={x:i.x-a.width,y:v};break;default:n={x:i.x,y:i.y}}switch(f(t)){case"start":n[s]-=y*(r&&c?-1:1);break;case"end":n[s]+=y*(r&&c?-1:1)}return n}let w=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}
16=r,s=a.filter(Boolean),l=await (null==o.isRTL?void 0:o.isRTL(t)),u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=b(u,n,l),f=n,h={},p=0;for(let r=0;r<s.length;r++){let{name:a,fn:m}=s[r],{x:g,y:v,data:y,reset:x}=await m({x:c,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});c=null!=g?g:c,d=null!=v?v:d,h={...h,[a]:{...h[a],...y}},x&&p<=50&&(p++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(u=!0===x.rects?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:c,y:d}=b(u,f,l)),r=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function C(e,t){var r;void 0===t&&(t={});let{x:n,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=c(t,e),m=y(p),g=s[h?"floating"===f?"reference":"floating":f],v=x(await a.getClippingRect({element:null==(r=await (null==a.isElement?void 0:a.isElement(g)))||r?g:g.contextElement||await (null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),b="floating"===f?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await (null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),C=await (null==a.isElement?void 0:a.isElement(w))&&await (null==a.getScale?void 0:a.getScale(w))||{x:1,y:1},S=x(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:l}):b);return{top:(v.top-S.top+m.top)/C.y,bottom:(S.bottom-v.bottom+m.bottom)/C.y,left:(v.left-S.left+m.left)/C.x,right:(S.right-v.right+m.right)/C.x}}function S(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function E(e){return r.some(t=>e[t]>=0)}async function k(e,t){let{placement:r,platform:n,elements:i}=e,a=await (null==n.isRTL?void 0:n.isRTL(i.floating)),o=d(r),s=f(r),l="y"===m(r),u=["left","top"].includes(o)?-1:1,h=a&&l?-1:1,p=c(t,e),{mainAxis:g,crossAxis:v,alignmentAxis:y}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&"number"==typeof y&&(v="end"===s?-1*y:y),l?{x:v*h,y:g*u}:{x:g*u,y:v*h}}function A(){return"u">typeof window}function T(e){return N(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function P(e){var t;return null==(t=(N(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function N(e){return!!A()&&(e instanceof Node||e instanceof j(e).Node)}function R(e){return!!A()&&(e instanceof Element||e instanceof j(e).Element)}function M(e){return!!A()&&(e instanceof HTMLElement||e instanceof j(e).HTMLElement)}function D(e){return!(!A()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof j(e).ShadowRoot)}function I(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function L(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function O(e){let t=F(),r=R(e)?V(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(r.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(r.contain||"").includes(e))}function F(){return!("u"<typeof CSS)&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function B(e){return["html","body","#document"].includes(T(e))}function V(e){return j(e).getComputedStyle(e)}function z(e){return R(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $(e){if("html"===T(e))return e;let t=e.assignedSlot||e.parentNode||D(e)&&e.host||P(e);return D(t)?t.host:t}function U(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=function e(t){let r=$(t);return B(r)?t.ownerDocument?t.ownerDocument.body:t.body:M(r)&&I(r)?r:e(r)}(e),a=i===(null==(n=e.ownerDocument)?void 0:n.body),o=j(i);if(a){let e=_(o);
16return t.concat(o,o.visualViewport||[],I(i)?i:[],e&&r?U(e):[])}return t.concat(i,U(i,[],r))}function _(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function H(e){let t=V(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=M(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,l=a(r)!==o||a(n)!==s;return l&&(r=o,n=s),{width:r,height:n,$:l}}function W(e){return R(e)?e:e.contextElement}function G(e){let t=W(e);if(!M(t))return s(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=H(t),l=(o?a(r.width):r.width)/n,u=(o?a(r.height):r.height)/i;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}let q=s(0);function K(e){let t=j(e);return F()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:q}function X(e,t,r,n){var i;void 0===t&&(t=!1),void 0===r&&(r=!1);let a=e.getBoundingClientRect(),o=W(e),l=s(1);t&&(n?R(n)&&(l=G(n)):l=G(e));let u=(void 0===(i=r)&&(i=!1),n&&(!i||n===j(o))&&i)?K(o):s(0),c=(a.left+u.x)/l.x,d=(a.top+u.y)/l.y,f=a.width/l.x,h=a.height/l.y;if(o){let e=j(o),t=n&&R(n)?j(n):n,r=e,i=_(r);for(;i&&n&&t!==r;){let e=G(i),t=i.getBoundingClientRect(),n=V(i),a=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,d*=e.y,f*=e.x,h*=e.y,c+=a,d+=o,i=_(r=j(i))}}return x({width:f,height:h,x:c,y:d})}function Y(e,t){let r=z(e).scrollLeft;return t?t.left+r:X(P(e)).left+r}function Z(e,t,r){void 0===r&&(r=!1);let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Y(e,n)),y:n.top+t.scrollTop}}function J(e,t,r){var n;let a;if("viewport"===t)a=function(e,t){let r=j(e),n=P(e),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;let e=F();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s,y:l}}(e,r);else if("document"===t){let t,r,o,s,l,u,c;n=P(e),t=P(n),r=z(n),o=n.ownerDocument.body,s=i(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=i(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),u=-r.scrollLeft+Y(n),c=-r.scrollTop,"rtl"===V(o).direction&&(u+=i(t.clientWidth,o.clientWidth)-s),a={width:s,height:l,x:u,y:c}}else if(R(t)){let e,n,i,o,l,u;n=(e=X(t,!0,"fixed"===r)).top+t.clientTop,i=e.left+t.clientLeft,o=M(t)?G(t):s(1),l=t.clientWidth*o.x,u=t.clientHeight*o.y,a={width:l,height:u,x:i*o.x,y:n*o.y}}else{let r=K(e);a={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return x(a)}function Q(e){return"static"===V(e).position}function ee(e,t){if(!M(e)||"fixed"===V(e).position)return null;if(t)return t(e);let r=e.offsetParent;return P(e)===r&&(r=r.ownerDocument.body),r}function et(e,t){let r=j(e);if(L(e))return r;if(!M(e)){let t=$(e);for(;t&&!B(t);){if(R(t)&&!Q(t))return t;t=$(t)}return r}let n=ee(e,t);for(;n&&["table","td","th"].includes(T(n))&&Q(n);)n=ee(n,t);return n&&B(n)&&Q(n)&&!O(n)?r:n||function(e){let t=$(e);for(;M(t)&&!B(t);){if(O(t))return t;if(L(t))break;t=$(t)}return null}(e)||r}let er=async function(e){let t=this.getOffsetParent||et,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=M(t),i=P(t),a="fixed"===r,o=X(e,!0,a,t),l={scrollLeft:0,scrollTop:0},u=s(0);if(n||!n&&!a)if(("body"!==T(t)||I(i))&&(l=z(t)),n){let e=X(t,!0,a,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else i&&(u.x=Y(i));let c=!i||n||a?s(0):Z(i,l);return{x:o.left+l.scrollLeft-u.x-c.x,y:o.top+l.scrollTop-u.y-c.y,width:o.width,height:o.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},en={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,a="fixed"===i,o=P(n),l=!!t&&L(t.floating);if(n===o||l&&a)return r;let u={scrollLeft:0,scrollTop:0},c=s(1),d=s(0),f=M(n);if((f||!f&&!a)&&(("body"!==T(n)||I(o))&&(u=z(n)),M(n))){let e=X(n);c=G(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}let h=!o||f||a?s(0):Z(o,u,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-u.scrollLeft*c.x+d.x+h.x,y:r.y*c.y-u.scrollTop*c.y+d.y+h.y}},getDocumentElement:P,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:a,strategy:o}=e,s=[..."clippingAncestors"===r?L(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=U(e,[],!1).filter(e=>R(e)&&"body"!==T(e)),i=null,a="fixed"===V(e).position,o=a?$(e):e;for(;R(o)&&!B(o);){let t=V(o),r=O(o);r||"fixed"!==t.position||(i=null),(a?!r&&!i:!r&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||I(o)&&!r&&function e(t,r){let n=$(t);return!(n===r||!R(n)||B(n))&&("fixed"===V(n).position||e(n,r))}(e,o))?n=n.filter(e=>e!==o):i=t,o=$(o)}return t.set(e,n),n}(t,this._c):[].concat(r),a],l=s[0],u=s.reduce((e,r)=>{let a=J(t,r,o);return e.top=i(a.top,e.top),e.right=n(a.right,e.right),e.bottom=n(a.bottom,e.bottom),e.left=i(a.left,e.left),e},J(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:et,getElementRects:er,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=H(e);return{width:t,height:r}},getScale:G,isElement:R,isRTL:function(e){return"rtl"===V(e).direction}};function ei(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let ea=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:a,placement:o,rects:s,platform:l,elements:u,middlewareData:d}=t,{element:g,padding:v=0}=c(e,t)||{};if(null==g)return{};let x=y(v),b={x:r,y:a},w=h(m(o)),C=p(w),S=await l.getDimensions(g),E="y"===w,k=E?"clientHeight":"clientWidth",A=s.reference[C]+s.reference[w]-b[w]-s.floating[C],T=b[w]-s.reference[w],j=await (null==l.getOffsetParent?void 0:l.getOffsetParent(g)),P=j?j[k]:0;
16P&&await (null==l.isElement?void 0:l.isElement(j))||(P=u.floating[k]||s.floating[C]);let N=P/2-S[C]/2-1,R=n(x[E?"top":"left"],N),M=n(x[E?"bottom":"right"],N),D=P-S[C]-M,I=P/2-S[C]/2+(A/2-T/2),L=i(R,n(I,D)),O=!d.arrow&&null!=f(o)&&I!==L&&s.reference[C]/2-(I<R?R:M)-S[C]/2<0,F=O?I<R?I-R:I-D:0;return{[w]:b[w]+F,data:{[w]:L,centerOffset:I-L-F,...O&&{alignmentOffset:F}},reset:O}}});var eo=e.i(74080),es="u">typeof document?t.useLayoutEffect:t.useEffect;function el(e,t){let r,n,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!el(e[n],t[n]))return!1;return!0}if((r=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){let r=i[n];if(("_owner"!==r||!e.$$typeof)&&!el(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function eu(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ec(e,t){let r=eu(e);return Math.round(t*r)/r}function ed(e){let r=t.useRef(e);return es(()=>{r.current=e}),r}var ef=e.i(48425),eh=e.i(43476),ep=t.forwardRef((e,t)=>{let{children:r,width:n=10,height:i=5,...a}=e;return(0,eh.jsx)(ef.Primitive.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,eh.jsx)("polygon",{points:"0,0 30,0 15,10"})})});ep.displayName="Arrow";var em=e.i(20783),eg=e.i(30030),ev=e.i(9937),ey=e.i(34620),ex="Popper",[eb,ew]=(0,eg.createContextScope)(ex),[eC,eS]=eb(ex),eE=e=>{let{__scopePopper:r,children:n}=e,[i,a]=t.useState(null);return(0,eh.jsx)(eC,{scope:r,anchor:i,onAnchorChange:a,children:n})};eE.displayName=ex;var ek="PopperAnchor",eA=t.forwardRef((e,r)=>{let{__scopePopper:n,virtualRef:i,...a}=e,o=eS(ek,n),s=t.useRef(null),l=(0,em.useComposedRefs)(r,s);return t.useEffect(()=>{o.onAnchorChange(i?.current||s.current)}),i?null:(0,eh.jsx)(ef.Primitive.div,{...a,ref:l})});eA.displayName=ek;var eT="PopperContent",[ej,eP]=eb(eT),eN=t.forwardRef((e,r)=>{var a,s,l,u,y,x,b,A,T,j,N,R,M,D,I,L,O,F,B,V,z;let{__scopePopper:$,side:_="bottom",sideOffset:H=0,align:G="center",alignOffset:q=0,arrowPadding:K=0,avoidCollisions:Y=!0,collisionBoundary:Z=[],collisionPadding:J=0,sticky:Q="partial",hideWhenDetached:ee=!1,updatePositionStrategy:et="optimized",onPlaced:er,...ep}=e,eg=eS(eT,$),[ex,eb]=t.useState(null),ew=(0,em.useComposedRefs)(r,e=>eb(e)),[eC,eE]=t.useState(null),ek=function(e){let[r,n]=t.useState(void 0);return(0,ey.useLayoutEffect)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let a=t[0];if("borderBoxSize"in a){let e=a.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;n({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),r}(eC),eA=ek?.width??0,eP=ek?.height??0,eN="number"==typeof J?J:{top:0,right:0,bottom:0,left:0,...J},eR=Array.isArray(Z)?Z:[Z],eM=eR.length>0,eD={padding:eN,boundary:eR.filter(eI),altBoundary:eM},{refs:eF,floatingStyles:eB,placement:eV,isPositioned:ez,middlewareData:e$}=function(e){void 0===e&&(e={});let{placement:r="bottom",strategy:n="absolute",middleware:i=[],platform:a,elements:{reference:o,floating:s}={},transform:l=!0,whileElementsMounted:u,open:c}=e,[d,f]=t.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[h,p]=t.useState(i);el(h,i)||p(i);let[m,g]=t.useState(null),[v,y]=t.useState(null),x=t.useCallback(e=>{e!==E.current&&(E.current=e,g(e))},[]),b=t.useCallback(e=>{e!==k.current&&(k.current=e,y(e))},[]),C=o||m,S=s||v,E=t.useRef(null),k=t.useRef(null),A=t.useRef(d),T=null!=u,j=ed(u),P=ed(a),N=ed(c),R=t.useCallback(()=>{var e,t;let i,a,o;if(!E.current||!k.current)return;let s={placement:r,strategy:n,middleware:h};P.current&&(s.platform=P.current),(e=E.current,t=k.current,i=new Map,o={...(a={platform:en,...s}).platform,_c:i},w(e,t,{...a,platform:o})).then(e=>{let t={...e,isPositioned:!1!==N.current};M.current&&!el(A.current,t)&&(A.current=t,eo.flushSync(()=>{f(t)}))})},[h,r,n,P,N]);es(()=>{!1===c&&A.current.isPositioned&&(A.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[c]);let M=t.useRef(!1);es(()=>(M.current=!0,()=>{M.current=!1}),[]),es(()=>
16{if(C&&(E.current=C),S&&(k.current=S),C&&S){if(j.current)return j.current(C,S,R);R()}},[C,S,R,j,T]);let D=t.useMemo(()=>({reference:E,floating:k,setReference:x,setFloating:b}),[x,b]),I=t.useMemo(()=>({reference:C,floating:S}),[C,S]),L=t.useMemo(()=>{let e={position:n,left:0,top:0};if(!I.floating)return e;let t=ec(I.floating,d.x),r=ec(I.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...eu(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,I.floating,d.x,d.y]);return t.useMemo(()=>({...d,update:R,refs:D,elements:I,floatingStyles:L}),[d,R,D,I,L])}({strategy:"fixed",placement:_+("center"!==G?"-"+G:""),whileElementsMounted:(...e)=>(function(e,t,r,a){let s;void 0===a&&(a={});let{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:f=!1}=a,h=W(e),p=l||u?[...h?U(h):[],...U(t)]:[];p.forEach(e=>{l&&e.addEventListener("scroll",r,{passive:!0}),u&&e.addEventListener("resize",r)});let m=h&&d?function(e,t){let r,a=null,s=P(e);function l(){var e;clearTimeout(r),null==(e=a)||e.disconnect(),a=null}return!function u(c,d){void 0===c&&(c=!1),void 0===d&&(d=1),l();let f=e.getBoundingClientRect(),{left:h,top:p,width:m,height:g}=f;if(c||t(),!m||!g)return;let v={rootMargin:-o(p)+"px "+-o(s.clientWidth-(h+m))+"px "+-o(s.clientHeight-(p+g))+"px "+-o(h)+"px",threshold:i(0,n(1,d))||1},y=!0;function x(t){let n=t[0].intersectionRatio;if(n!==d){if(!y)return u();n?u(!1,n):r=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==n||ei(f,e.getBoundingClientRect())||u(),y=!1}try{a=new IntersectionObserver(x,{...v,root:s.ownerDocument})}catch(e){a=new IntersectionObserver(x,v)}a.observe(e)}(!0),l}(h,r):null,g=-1,v=null;c&&(v=new ResizeObserver(e=>{let[n]=e;n&&n.target===h&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),r()}),h&&!f&&v.observe(h),v.observe(t));let y=f?X(e):null;return f&&function t(){let n=X(e);y&&!ei(y,n)&&r(),y=n,s=requestAnimationFrame(t)}(),r(),()=>{var e;p.forEach(e=>{l&&e.removeEventListener("scroll",r),u&&e.removeEventListener("resize",r)}),null==m||m(),null==(e=v)||e.disconnect(),v=null,f&&cancelAnimationFrame(s)}})(...e,{animationFrame:"always"===et}),elements:{reference:eg.anchor},middleware:[{...{name:"offset",options:l=a={mainAxis:H+eP,alignmentAxis:q},async fn(e){var t,r;let{x:n,y:i,placement:a,middlewareData:o}=e,s=await k(e,l);return a===(null==(t=o.offset)?void 0:t.placement)&&null!=(r=o.arrow)&&r.alignmentOffset?{}:{x:n+s.x,y:i+s.y,data:{...s,placement:a}}}},options:[a,s]},Y&&{...{name:"shift",options:T=b={mainAxis:!0,crossAxis:!1,limiter:"partial"===Q?{...(void 0===(x=u)&&(x={}),{options:x,fn(e){let{x:t,y:r,placement:n,rects:i,middlewareData:a}=e,{offset:o=0,mainAxis:s=!0,crossAxis:l=!0}=c(x,e),u={x:t,y:r},f=m(n),p=h(f),g=u[p],v=u[f],y=c(o,e),b="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(s){let e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+b.mainAxis,r=i.reference[p]+i.reference[e]-b.mainAxis;g<t?g=t:g>r&&(g=r)}if(l){var w,C;let e="y"===p?"width":"height",t=["top","left"].includes(d(n)),r=i.reference[f]-i.floating[e]+(t&&(null==(w=a.offset)?void 0:w[f])||0)+(t?0:b.crossAxis),o=i.reference[f]+i.reference[e]+(t?0:(null==(C=a.offset)?void 0:C[f])||0)-(t?b.crossAxis:0);v<r?v=r:v>o&&(v=o)}return{[p]:g,[f]:v}}}),options:[u,y]}:void 0,...eD},async fn(e){let{x:t,y:r,placement:a}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...u}=c(T,e),f={x:t,y:r},p=await C(e,u),g=m(d(a)),v=h(g),y=f[v],x=f[g];if(o){let e="y"===v?"top":"left",t="y"===v?"bottom":"right",r=y+p[e],a=y-p[t];y=i(r,n(y,a))}if(s){let e="y"===g?"top":"left",t="y"===g?"bottom":"right",r=x+p[e],a=x-p[t];x=i(r,n(x,a))}let b=l.fn({...e,[v]:y,[g]:x});return{...b,data:{x:b.x-t,y:b.y-r,enabled:{[v]:o,[g]:s}}}}},options:[b,A]},Y&&{...{name:"flip",options:R=j={...eD},async fn(e){var t,r,n,i,a,o,s,l;let u,y,x,{placement:b,middlewareData:w,rects:S,initialPlacement:E,platform:k,elements:A}=e,{mainAxis:T=!0,crossAxis:j=!0,fallbackPlacements:P,fallbackStrategy:N="bestFit",fallbackAxisSideDirection:M="none",flipAlignment:D=!0,...I}=c(R,e);if(null!=(t=w.arrow)&&t.alignmentOffset)return{};let L=d(b),O=m(E),F=d(E)===E,B=await (null==k.isRTL?void 0:k.isRTL(A.floating)),V=P||(F||!D?[v(E)]:(u=v(E),[g(E),u,g(u)])),z="none"!==M;!P&&z&&V.push(...(y=f(E),x=function(e,t,r){let n=["left","right"],i=["right","left"];switch(e){case"top":case"bottom":if(r)return t?i:n;return t?n:i;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(d(E),"start"===M,B),y&&(x=x.map(e=>e+"-"+y),D&&(x=x.concat(x.map(g)))),x));let $=[E,...V],U=await C(e,I),_=[],H=(null==(r=w.flip)?void 0:r.overflows)||[];if(T&&_.push(U[L]),j){let e,t,r,n,i=(o=b,s=S,void 0===(l=B)&&(l=!1),e=f(o),r=p(t=h(m(o))),n="x"===t?e===(l?"end":"start")?"right":"left":"start"===e?"bottom":"top",s.reference[r]>s.floating[r]&&(n=v(n)),[n,v(n)]);_.push(U[i[0]],U[i[1]])}if(H=[...H,{placement:b,overflows:_}],!_.every(e=>e<=0)){let e=((null==(n=w.flip)?void 0:n.index)||0)+1,t=$[e];if(t)return{data:{index:e,overflows:H},reset:{placement:t}};let r=null==(i=H.filter(e=>e.overflows[0]<=0).sort((e,t)=>
16e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!r)switch(N){case"bestFit":{let e=null==(a=H.filter(e=>{if(z){let t=m(e.placement);return t===O||"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:a[0];e&&(r=e);break}case"initialPlacement":r=E}if(b!==r)return{reset:{placement:r}}}return{}}},options:[j,N]},{...{name:"size",options:I=M={...eD,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty("--radix-popper-available-width",`${r}px`),o.setProperty("--radix-popper-available-height",`${n}px`),o.setProperty("--radix-popper-anchor-width",`${i}px`),o.setProperty("--radix-popper-anchor-height",`${a}px`)}},async fn(e){var t,r;let a,o,{placement:s,rects:l,platform:u,elements:h}=e,{apply:p=()=>{},...g}=c(I,e),v=await C(e,g),y=d(s),x=f(s),b="y"===m(s),{width:w,height:S}=l.floating;"top"===y||"bottom"===y?(a=y,o=x===(await (null==u.isRTL?void 0:u.isRTL(h.floating))?"start":"end")?"left":"right"):(o=y,a="end"===x?"top":"bottom");let E=S-v.top-v.bottom,k=w-v.left-v.right,A=n(S-v[a],E),T=n(w-v[o],k),j=!e.middlewareData.shift,P=A,N=T;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(N=k),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(P=E),j&&!x){let e=i(v.left,0),t=i(v.right,0),r=i(v.top,0),n=i(v.bottom,0);b?N=w-2*(0!==e||0!==t?e+t:i(v.left,v.right)):P=S-2*(0!==r||0!==n?r+n:i(v.top,v.bottom))}await p({...e,availableWidth:N,availableHeight:P});let R=await u.getDimensions(h.floating);return w!==R.width||S!==R.height?{reset:{rects:!0}}:{}}},options:[M,D]},eC&&{...{name:"arrow",options:F=L={element:eC,padding:K},fn(e){let{element:t,padding:r}="function"==typeof F?F(e):F;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?ea({element:t.current,padding:r}).fn(e):{}:t?ea({element:t,padding:r}).fn(e):{}}},options:[L,O]},eL({arrowWidth:eA,arrowHeight:eP}),ee&&{...{name:"hide",options:z=B={strategy:"referenceHidden",...eD},async fn(e){let{rects:t}=e,{strategy:r="referenceHidden",...n}=c(z,e);switch(r){case"referenceHidden":{let r=S(await C(e,{...n,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:E(r)}}}case"escaped":{let r=S(await C(e,{...n,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:E(r)}}}default:return{}}}},options:[B,V]}]}),[eU,e_]=eO(eV),eH=(0,ev.useCallbackRef)(er);(0,ey.useLayoutEffect)(()=>{ez&&eH?.()},[ez,eH]);let eW=e$.arrow?.x,eG=e$.arrow?.y,eq=e$.arrow?.centerOffset!==0,[eK,eX]=t.useState();return(0,ey.useLayoutEffect)(()=>{ex&&eX(window.getComputedStyle(ex).zIndex)},[ex]),(0,eh.jsx)("div",{ref:eF.setFloating,"data-radix-popper-content-wrapper":"",style:{...eB,transform:ez?eB.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eK,"--radix-popper-transform-origin":[e$.transformOrigin?.x,e$.transformOrigin?.y].join(" "),...e$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,eh.jsx)(ej,{scope:$,placedSide:eU,onArrowChange:eE,arrowX:eW,arrowY:eG,shouldHideArrow:eq,children:(0,eh.jsx)(ef.Primitive.div,{"data-side":eU,"data-align":e_,...ep,ref:ew,style:{...ep.style,animation:ez?void 0:"none"}})})})});eN.displayName=eT;var eR="PopperArrow",eM={top:"bottom",right:"left",bottom:"top",left:"right"},eD=t.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,i=eP(eR,r),a=eM[i.placedSide];return(0,eh.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,eh.jsx)(ep,{...n,ref:t,style:{...n.style,display:"block"}})})});function eI(e){return null!==e}eD.displayName=eR;var eL=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,u]=eO(r),c={start:"0%",center:"50%",end:"100%"}[u],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,h="",p="";return"bottom"===l?(h=a?c:`${d}px`,p=`${-s}px`):"top"===l?(h=a?c:`${d}px`,p=`${n.floating.height+s}px`):"right"===l?(h=`${-s}px`,p=a?c:`${f}px`):"left"===l&&(h=`${n.floating.width+s}px`,p=a?c:`${f}px`),{data:{x:h,y:p}}}});function eO(e){let[t,r="center"]=e.split("-");return[t,r]}e.s(["Anchor",0,eA,"Arrow",0,eD,"Content",0,eN,"Root",0,eE,"createPopperScope",0,ew],53660)},29402,e=>{"use strict";var t=e.i(71645),r=e.i(74080),n=e.i(70152),i=e.i(81140),a=e.i(75830),o=e.i(20783),s=e.i(30030),l=e.i(86318),u=e.i(26330),c=e.i(3536),d=e.i(65491),f=e.i(10772),h=e.i(53660),p=e.i(74606),m=e.i(48425),g=e.i(91918),v=e.i(9937),y=e.i(69340),x=e.i(34620),b=e.i(43476),w=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});t.forwardRef((e,t)=>
16(0,b.jsx)(m.Primitive.span,{...e,ref:t,style:{...w,...e.style}})).displayName="VisuallyHidden";var C=e.i(86312),S=e.i(85369),E=[" ","Enter","ArrowUp","ArrowDown"],k=[" ","Enter"],A="Select",[T,j,P]=(0,a.createCollection)(A),[N,R]=(0,s.createContextScope)(A,[P,h.createPopperScope]),M=(0,h.createPopperScope)(),[D,I]=N(A),[L,O]=N(A),F=e=>{let{__scopeSelect:r,children:n,open:i,defaultOpen:a,onOpenChange:o,value:s,defaultValue:u,onValueChange:c,dir:d,name:p,autoComplete:m,disabled:g,required:v,form:x}=e,w=M(r),[C,S]=t.useState(null),[E,k]=t.useState(null),[j,P]=t.useState(!1),N=(0,l.useDirection)(d),[R,I]=(0,y.useControllableState)({prop:i,defaultProp:a??!1,onChange:o,caller:A}),[O,F]=(0,y.useControllableState)({prop:s,defaultProp:u,onChange:c,caller:A}),B=t.useRef(null),V=!C||x||!!C.closest("form"),[z,$]=t.useState(new Set),U=Array.from(z).map(e=>e.props.value).join(";");return(0,b.jsx)(h.Root,{...w,children:(0,b.jsxs)(D,{required:v,scope:r,trigger:C,onTriggerChange:S,valueNode:E,onValueNodeChange:k,valueNodeHasChildren:j,onValueNodeHasChildrenChange:P,contentId:(0,f.useId)(),value:O,onValueChange:F,open:R,onOpenChange:I,dir:N,triggerPointerDownPosRef:B,disabled:g,children:[(0,b.jsx)(T.Provider,{scope:r,children:(0,b.jsx)(L,{scope:e.__scopeSelect,onNativeOptionAdd:t.useCallback(e=>{$(t=>new Set(t).add(e))},[]),onNativeOptionRemove:t.useCallback(e=>{$(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:n})}),V?(0,b.jsxs)(eb,{"aria-hidden":!0,required:v,tabIndex:-1,name:p,autoComplete:m,value:O,onChange:e=>F(e.target.value),disabled:g,form:x,children:[void 0===O?(0,b.jsx)("option",{value:""}):null,Array.from(z)]},U):null]})})};F.displayName=A;var B="SelectTrigger",V=t.forwardRef((e,r)=>{let{__scopeSelect:n,disabled:a=!1,...s}=e,l=M(n),u=I(B,n),c=u.disabled||a,d=(0,o.useComposedRefs)(r,u.onTriggerChange),f=j(n),p=t.useRef("touch"),[g,v,y]=eC(e=>{let t=f().filter(e=>!e.disabled),r=t.find(e=>e.value===u.value),n=eS(t,e,r);void 0!==n&&u.onValueChange(n.value)}),x=e=>{c||(u.onOpenChange(!0),y()),e&&(u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,b.jsx)(h.Anchor,{asChild:!0,...l,children:(0,b.jsx)(m.Primitive.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":ew(u.value)?"":void 0,...s,ref:d,onClick:(0,i.composeEventHandlers)(s.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&x(e)}),onPointerDown:(0,i.composeEventHandlers)(s.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(x(e),e.preventDefault())}),onKeyDown:(0,i.composeEventHandlers)(s.onKeyDown,e=>{let t=""!==g.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||v(e.key),(!t||" "!==e.key)&&E.includes(e.key)&&(x(),e.preventDefault())})})})});V.displayName=B;var z="SelectValue",$=t.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:i,children:a,placeholder:s="",...l}=e,u=I(z,r),{onValueNodeHasChildrenChange:c}=u,d=void 0!==a,f=(0,o.useComposedRefs)(t,u.onValueNodeChange);return(0,x.useLayoutEffect)(()=>{c(d)},[c,d]),(0,b.jsx)(m.Primitive.span,{...l,ref:f,style:{pointerEvents:"none"},children:ew(u.value)?(0,b.jsx)(b.Fragment,{children:s}):a})});$.displayName=z,t.forwardRef((e,t)=>{let{__scopeSelect:r,children:n,...i}=e;return(0,b.jsx)(m.Primitive.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})}).displayName="SelectIcon";var U=e=>(0,b.jsx)(p.Portal,{asChild:!0,...e});U.displayName="SelectPortal";var _="SelectContent",H=t.forwardRef((e,n)=>{let i=I(_,e.__scopeSelect),[a,o]=t.useState();return((0,x.useLayoutEffect)(()=>{o(new DocumentFragment)},[]),i.open)?(0,b.jsx)(K,{...e,ref:n}):a?r.createPortal((0,b.jsx)(W,{scope:e.__scopeSelect,children:(0,b.jsx)(T.Slot,{scope:e.__scopeSelect,children:(0,b.jsx)("div",{children:e.children})})}),a):null});H.displayName=_;var[W,G]=N(_),q=(0,g.createSlot)("SelectContent.RemoveScroll"),K=t.forwardRef((e,r)=>{let{__scopeSelect:n,position:a="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:l,onPointerDownOutside:f,side:h,sideOffset:p,align:m,alignOffset:g,arrowPadding:v,collisionBoundary:y,collisionPadding:x,sticky:w,hideWhenDetached:E,avoidCollisions:k,...A}=e,T=I(_,n),[P,N]=t.useState(null),[R,M]=t.useState(null),D=(0,o.useComposedRefs)(r,e=>N(e)),[L,O]=t.useState(null),[F,B]=t.useState(null),V=j(n),[z,$]=t.useState(!1),U=t.useRef(!1);t.useEffect(()=>{if(P)return(0,C.hideOthers)(P)},[P]),(0,c.useFocusGuards)();let H=t.useCallback(e=>{let[t,...r]=V().map(e=>e.ref.current),[n]=r.slice(-1),i=document.activeElement;for(let r of e)if(r===i||(r?.scrollIntoView({block:"nearest"}
16),r===t&&R&&(R.scrollTop=0),r===n&&R&&(R.scrollTop=R.scrollHeight),r?.focus(),document.activeElement!==i))return},[V,R]),G=t.useCallback(()=>H([L,P]),[H,L,P]);t.useEffect(()=>{z&&G()},[z,G]);let{onOpenChange:K,triggerPointerDownPosRef:Z}=T;t.useEffect(()=>{if(P){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(Z.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(Z.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():P.contains(r.target)||K(!1),document.removeEventListener("pointermove",t),Z.current=null};return null!==Z.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[P,K,Z]),t.useEffect(()=>{let e=()=>K(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[K]);let[J,Q]=eC(e=>{let t=V().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=eS(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),ee=t.useCallback((e,t,r)=>{let n=!U.current&&!r;(void 0!==T.value&&T.value===t||n)&&(O(e),n&&(U.current=!0))},[T.value]),et=t.useCallback(()=>P?.focus(),[P]),er=t.useCallback((e,t,r)=>{let n=!U.current&&!r;(void 0!==T.value&&T.value===t||n)&&B(e)},[T.value]),en="popper"===a?Y:X,ei=en===Y?{side:h,sideOffset:p,align:m,alignOffset:g,arrowPadding:v,collisionBoundary:y,collisionPadding:x,sticky:w,hideWhenDetached:E,avoidCollisions:k}:{};return(0,b.jsx)(W,{scope:n,content:P,viewport:R,onViewportChange:M,itemRefCallback:ee,selectedItem:L,onItemLeave:et,itemTextRefCallback:er,focusSelectedItem:G,selectedItemText:F,position:a,isPositioned:z,searchRef:J,children:(0,b.jsx)(S.RemoveScroll,{as:q,allowPinchZoom:!0,children:(0,b.jsx)(d.FocusScope,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,i.composeEventHandlers)(s,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,b.jsx)(u.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,b.jsx)(en,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:e=>e.preventDefault(),...A,...ei,onPlaced:()=>$(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:(0,i.composeEventHandlers)(A.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Q(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=V().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>H(t)),e.preventDefault()}})})})})})})});K.displayName="SelectContentImpl";var X=t.forwardRef((e,r)=>{let{__scopeSelect:i,onPlaced:a,...s}=e,l=I(_,i),u=G(_,i),[c,d]=t.useState(null),[f,h]=t.useState(null),p=(0,o.useComposedRefs)(r,e=>h(e)),g=j(i),v=t.useRef(!1),y=t.useRef(!0),{viewport:w,selectedItem:C,selectedItemText:S,focusSelectedItem:E}=u,k=t.useCallback(()=>{if(l.trigger&&l.valueNode&&c&&f&&w&&C&&S){let e=l.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),r=l.valueNode.getBoundingClientRect(),i=S.getBoundingClientRect();if("rtl"!==l.dir){let a=i.left-t.left,o=r.left-a,s=e.left-o,l=e.width+s,u=Math.max(l,t.width),d=window.innerWidth-10,f=(0,n.clamp)(o,[10,Math.max(10,d-u)]);c.style.minWidth=l+"px",c.style.left=f+"px"}else{let a=t.right-i.right,o=window.innerWidth-r.right-a,s=window.innerWidth-e.right-o,l=e.width+s,u=Math.max(l,t.width),d=window.innerWidth-10,f=(0,n.clamp)(o,[10,Math.max(10,d-u)]);c.style.minWidth=l+"px",c.style.right=f+"px"}let o=g(),s=window.innerHeight-20,u=w.scrollHeight,d=window.getComputedStyle(f),h=parseInt(d.borderTopWidth,10),p=parseInt(d.paddingTop,10),m=parseInt(d.borderBottomWidth,10),y=h+p+u+parseInt(d.paddingBottom,10)+m,x=Math.min(5*C.offsetHeight,y),b=window.getComputedStyle(w),E=parseInt(b.paddingTop,10),
16k=parseInt(b.paddingBottom,10),A=e.top+e.height/2-10,T=C.offsetHeight/2,j=h+p+(C.offsetTop+T);if(j<=A){let e=o.length>0&&C===o[o.length-1].ref.current;c.style.bottom="0px";let t=Math.max(s-A,T+(e?k:0)+(f.clientHeight-w.offsetTop-w.offsetHeight)+m);c.style.height=j+t+"px"}else{let e=o.length>0&&C===o[0].ref.current;c.style.top="0px";let t=Math.max(A,h+w.offsetTop+(e?E:0)+T);c.style.height=t+(y-j)+"px",w.scrollTop=j-A+w.offsetTop}c.style.margin="10px 0",c.style.minHeight=x+"px",c.style.maxHeight=s+"px",a?.(),requestAnimationFrame(()=>v.current=!0)}},[g,l.trigger,l.valueNode,c,f,w,C,S,l.dir,a]);(0,x.useLayoutEffect)(()=>k(),[k]);let[A,T]=t.useState();(0,x.useLayoutEffect)(()=>{f&&T(window.getComputedStyle(f).zIndex)},[f]);let P=t.useCallback(e=>{e&&!0===y.current&&(k(),E?.(),y.current=!1)},[k,E]);return(0,b.jsx)(Z,{scope:i,contentWrapper:c,shouldExpandOnScrollRef:v,onScrollButtonChange:P,children:(0,b.jsx)("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:(0,b.jsx)(m.Primitive.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});X.displayName="SelectItemAlignedPosition";var Y=t.forwardRef((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:i=10,...a}=e,o=M(r);return(0,b.jsx)(h.Content,{...o,...a,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...a.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)"}})});Y.displayName="SelectPopperPosition";var[Z,J]=N(_,{}),Q="SelectViewport",ee=t.forwardRef((e,r)=>{let{__scopeSelect:n,nonce:a,...s}=e,l=G(Q,n),u=J(Q,n),c=(0,o.useComposedRefs)(r,l.onViewportChange),d=t.useRef(0);return(0,b.jsxs)(b.Fragment,{children:[(0,b.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:a}),(0,b.jsx)(T.Slot,{scope:n,children:(0,b.jsx)(m.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:(0,i.composeEventHandlers)(s.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=u;if(n?.current&&r){let e=Math.abs(d.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,i=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(i<n){let a=i+e,o=Math.min(n,a),s=a-o;r.style.height=o+"px","0px"===r.style.bottom&&(t.scrollTop=s>0?s:0,r.style.justifyContent="flex-end")}}}d.current=t.scrollTop})})})]})});ee.displayName=Q;var et="SelectGroup",[er,en]=N(et),ei=t.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=(0,f.useId)();return(0,b.jsx)(er,{scope:r,id:i,children:(0,b.jsx)(m.Primitive.div,{role:"group","aria-labelledby":i,...n,ref:t})})});ei.displayName=et;var ea="SelectLabel",eo=t.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=en(ea,r);return(0,b.jsx)(m.Primitive.div,{id:i.id,...n,ref:t})});eo.displayName=ea;var es="SelectItem",[el,eu]=N(es),ec=t.forwardRef((e,r)=>{let{__scopeSelect:n,value:a,disabled:s=!1,textValue:l,...u}=e,c=I(es,n),d=G(es,n),h=c.value===a,[p,g]=t.useState(l??""),[v,y]=t.useState(!1),x=(0,o.useComposedRefs)(r,e=>d.itemRefCallback?.(e,a,s)),w=(0,f.useId)(),C=t.useRef("touch"),S=()=>{s||(c.onValueChange(a),c.onOpenChange(!1))};if(""===a)throw 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,b.jsx)(el,{scope:n,value:a,disabled:s,textId:w,isSelected:h,onItemTextChange:t.useCallback(e=>{g(t=>t||(e?.textContent??"").trim())},[]),children:(0,b.jsx)(T.ItemSlot,{scope:n,value:a,disabled:s,textValue:p,children:(0,b.jsx)(m.Primitive.div,{role:"option","aria-labelledby":w,"data-highlighted":v?"":void 0,"aria-selected":h&&v,"data-state":h?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...u,ref:x,onFocus:(0,i.composeEventHandlers)(u.onFocus,()=>y(!0)),onBlur:(0,i.composeEventHandlers)(u.onBlur,()=>y(!1)),onClick:(0,i.composeEventHandlers)(u.onClick,()=>{"mouse"!==C.current&&S()}),onPointerUp:(0,i.composeEventHandlers)(u.onPointerUp,()=>{"mouse"===C.current&&S()}),onPointerDown:(0,i.composeEventHandlers)(u.onPointerDown,e=>{C.current=e.pointerType}),onPointerMove:(0,i.composeEventHandlers)(u.onPointerMove,e=>{C.current=e.pointerType,s?d.onItemLeave?.():"mouse"===C.current&&e.currentTarget.focu
16s({preventScroll:!0})}),onPointerLeave:(0,i.composeEventHandlers)(u.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:(0,i.composeEventHandlers)(u.onKeyDown,e=>{(d.searchRef?.current===""||" "!==e.key)&&(k.includes(e.key)&&S()," "===e.key&&e.preventDefault())})})})})});ec.displayName=es;var ed="SelectItemText",ef=t.forwardRef((e,n)=>{let{__scopeSelect:i,className:a,style:s,...l}=e,u=I(ed,i),c=G(ed,i),d=eu(ed,i),f=O(ed,i),[h,p]=t.useState(null),g=(0,o.useComposedRefs)(n,e=>p(e),d.onItemTextChange,e=>c.itemTextRefCallback?.(e,d.value,d.disabled)),v=h?.textContent,y=t.useMemo(()=>(0,b.jsx)("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:C}=f;return(0,x.useLayoutEffect)(()=>(w(y),()=>C(y)),[w,C,y]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(m.Primitive.span,{id:d.textId,...l,ref:g}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?r.createPortal(l.children,u.valueNode):null]})});ef.displayName=ed;var eh="SelectItemIndicator",ep=t.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return eu(eh,r).isSelected?(0,b.jsx)(m.Primitive.span,{"aria-hidden":!0,...n,ref:t}):null});ep.displayName=eh;var em="SelectScrollUpButton";t.forwardRef((e,r)=>{let n=G(em,e.__scopeSelect),i=J(em,e.__scopeSelect),[a,s]=t.useState(!1),l=(0,o.useComposedRefs)(r,i.onScrollButtonChange);return(0,x.useLayoutEffect)(()=>{if(n.viewport&&n.isPositioned){let e=function(){s(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),a?(0,b.jsx)(ev,{...e,ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}).displayName=em;var eg="SelectScrollDownButton";t.forwardRef((e,r)=>{let n=G(eg,e.__scopeSelect),i=J(eg,e.__scopeSelect),[a,s]=t.useState(!1),l=(0,o.useComposedRefs)(r,i.onScrollButtonChange);return(0,x.useLayoutEffect)(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),a?(0,b.jsx)(ev,{...e,ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}).displayName=eg;var ev=t.forwardRef((e,r)=>{let{__scopeSelect:n,onAutoScroll:a,...o}=e,s=G("SelectScrollButton",n),l=t.useRef(null),u=j(n),c=t.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return t.useEffect(()=>()=>c(),[c]),(0,x.useLayoutEffect)(()=>{let e=u().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[u]),(0,b.jsx)(m.Primitive.div,{"aria-hidden":!0,...o,ref:r,style:{flexShrink:0,...o.style},onPointerDown:(0,i.composeEventHandlers)(o.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(a,50))}),onPointerMove:(0,i.composeEventHandlers)(o.onPointerMove,()=>{s.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(a,50))}),onPointerLeave:(0,i.composeEventHandlers)(o.onPointerLeave,()=>{c()})})}),ey=t.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,b.jsx)(m.Primitive.div,{"aria-hidden":!0,...n,ref:t})});ey.displayName="SelectSeparator";var ex="SelectArrow";t.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=M(r),a=I(ex,r),o=G(ex,r);return a.open&&"popper"===o.position?(0,b.jsx)(h.Arrow,{...i,...n,ref:t}):null}).displayName=ex;var eb=t.forwardRef(({__scopeSelect:e,value:r,...n},i)=>{let a,s=t.useRef(null),l=(0,o.useComposedRefs)(i,s),u=(a=t.useRef({value:r,previous:r}),t.useMemo(()=>(a.current.value!==r&&(a.current.previous=a.current.value,a.current.value=r),a.current.previous),[r]));return t.useEffect(()=>{let e=s.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(u!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[u,r]),(0,b.jsx)(m.Primitive.select,{...n,style:{...w,...n.style},ref:l,defaultValue:r})});function ew(e){return""===e||void 0===e}function eC(e){let r=(0,v.useCallbackRef)(e),n=t.useRef(""),i=t.useRef(0),a=t.useCallback(e=>{let t=n.current+e;r(t),function e(t){n.current=t,window.clearTimeout(i.current),""!==t&&(i.current=window.setTimeout(()=>e(""),1e3))}(t)},[r]),o=t.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return t.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,a,o]}function eS(e,t,r){var n,i;let a=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=r?e.indexOf(r):-1,s=(n=e,i=Math.max(o,0),n.map((e,t)=>n[(i+t)%n.length]));1===a.length&&(s=s.filter(e=>e!==r));let l=s.find(e=>e.textValue.toLowerCase().startsWith(a.toLowerCase()));return l!==r?l:void 0}eb.displayName="SelectBubbleInput",e.s(["Content",0,H,"Group",0,ei,"Item",0,ec,"ItemIndicator",0,ep,"ItemText",0,ef,"Label",0,eo,"Portal",0,U,"Root",0,F,"Separator",0,ey,"Trigger",0,V,"Value",0,$,"Viewport",0,ee],29402)},43531,e=>{"use strict";
16let t=(0,e.i(75254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,t],43531)},36437,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(26999),i=e.i(46932),a=e.i(72328),o=e.i(73264),s=e.i(70756),l=e.i(48256),u=e.i(37727),c=e.i(63209),d=e.i(19455),f=e.i(29402),h=e.i(43531),p=e.i(64659),m=e.i(75157);let g=f.Root;f.Group;let v=f.Value,y=r.forwardRef(({className:e,children:r,...n},i)=>(0,t.jsxs)(f.Trigger,{ref:i,className:(0,m.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:[r,(0,t.jsx)(p.ChevronDown,{className:"h-4 w-4 opacity-50"})]}));y.displayName=f.Trigger.displayName;let x=r.forwardRef(({className:e,children:r,position:n="popper",...i},a)=>(0,t.jsx)(f.Portal,{children:(0,t.jsx)(f.Content,{ref:a,className:(0,m.cn)("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...i,children:(0,t.jsx)(f.Viewport,{className:(0,m.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r})})}));x.displayName=f.Content.displayName,r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(f.Label,{ref:n,className:(0,m.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...r})).displayName=f.Label.displayName;let b=r.forwardRef(({className:e,children:r,...n},i)=>(0,t.jsxs)(f.Item,{ref:i,className:(0,m.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(f.ItemIndicator,{children:(0,t.jsx)(h.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(f.ItemText,{children:r})]}));b.displayName=f.Item.displayName,r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(f.Separator,{ref:n,className:(0,m.cn)("-mx-1 my-1 h-px bg-muted",e),...r})).displayName=f.Separator.displayName;var w=e.i(2611);function C({open:e,onOpenChange:r,onClose:o,children:s}){let l=(0,a.useReducedMotion)();return(0,t.jsx)(n.Root,{open:e,onOpenChange:r,children:(0,t.jsxs)(n.Portal,{children:[(0,t.jsx)(n.Overlay,{asChild:!0,children:(0,t.jsx)(i.motion.div,{initial:{opacity:0}
16,animate:{opacity:1},exit:{opacity:0},transition:{duration:l?.12:.2},className:"fixed inset-0 z-50 bg-foreground/30 backdrop-blur-[2px]"})}),(0,t.jsx)(n.Content,{"aria-describedby":void 0,className:(0,m.cn)("fixed z-50 focus:outline-none","inset-x-0 bottom-0 w-full pb-safe","sm:inset-auto sm:left-1/2 sm:top-1/2 sm:bottom-auto sm:w-full sm:max-w-[480px] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:pb-0"),children:(0,t.jsxs)(i.motion.div,{initial:l?{opacity:0}:{opacity:0,y:24,scale:.98},animate:{opacity:1,y:0,scale:1},transition:{duration:.28,ease:[.22,1,.36,1]},className:(0,m.cn)("glass-strong relative overflow-hidden","rounded-t-[28px] rounded-b-none border-b-0","sm:rounded-[28px] sm:border-b"),children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 top-0 h-40 bg-glow-ambient"}),(0,t.jsx)("div",{className:"flex justify-center pt-3 sm:hidden",children:(0,t.jsx)("span",{className:"h-1.5 w-10 rounded-full bg-border-strong"})}),(0,t.jsx)(n.Close,{onClick:o,"aria-label":"Close dialog",className:"absolute right-4 top-4 z-10 inline-flex h-9 w-9 items-center justify-center rounded-full text-text-secondary transition hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:(0,t.jsx)(u.X,{className:"h-5 w-5"})}),(0,t.jsx)("div",{className:"relative px-6 pb-8 pt-6 sm:pb-7",children:s})]})})]})})}function S({title:e,subtitle:r,tone:i="default"}){return(0,t.jsxs)("div",{className:"mb-6 flex flex-col items-center text-center",children:[(0,t.jsx)("span",{className:(0,m.cn)("mb-4 inline-flex h-12 w-12 items-center justify-center rounded-2xl","error"===i?"bg-destructive/10 text-destructive":"bg-brand-gradient-cta text-white shadow-cta ring-1 ring-inset ring-white/15"),children:"error"===i?(0,t.jsx)(c.AlertCircle,{className:"h-6 w-6"}):(0,t.jsx)(o.LayoutGrid,{className:"h-6 w-6"})}),(0,t.jsx)(n.Title,{className:"font-display text-xl font-semibold leading-tight tracking-tight text-foreground",children:e}),(0,t.jsx)("p",{className:"mt-2 max-w-[34ch] text-sm leading-relaxed text-text-secondary",children:r})]})}e.s(["default",0,function({open:e,onOpenChange:n,sections:i,appName:a,onGridSelect:o,onCancel:u}){let[c,f]=(0,r.useState)(""),{isLoading:h,error:p}=(0,w.useGrid)(),m=i.filter(e=>void 0!==e.visibility?"public"===e.visibility:!1===e.isPrivate||void 0===e.isPrivate),E=i.filter(e=>void 0!==e.visibility?"private"===e.visibility:!0===e.isPrivate),k=()=>{f(""),u()},A=()=>{f(""),n(!1)},T=(e,r)=>{let n=i.findIndex(t=>t.title===e.title),a=e.grid.length;return(0,t.jsx)(b,{value:n.toString(),className:"rounded-md py-2",children:(0,t.jsxs)("div",{className:"flex flex-col items-start",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:e.title}),(0,t.jsxs)("span",{className:"text-xs text-text-secondary",children:[a," widget",1!==a?"s":""," •"," ",e.gridColumns," columns"]})]})},`${r}-${e.title}`)};return h?(0,t.jsxs)(C,{open:e,onOpenChange:n,onClose:A,children:[(0,t.jsx)(S,{title:"Add to your Grid",subtitle:"Loading your Universal Profile grids..."}),(0,t.jsxs)("div",{className:"flex justify-center py-6",role:"status","aria-live":"polite",children:[(0,t.jsx)("span",{className:"h-8 w-8 animate-spin rounded-full border-2 border-muted border-t-brand"}),(0,t.jsx)("span",{className:"sr-only",children:"Loading grids"})]})]}):p?(0,t.jsxs)(C,{open:e,onOpenChange:n,onClose:A,children:[(0,t.jsx)(S,{title:"Something went wrong",subtitle:(0,t.jsxs)(t.Fragment,{children:["We couldn't load your grids.",(0,t.jsx)("span",{className:"mt-1 block text-text-tertiary",children:p})]}),tone:"error"}),(0,t.jsx)(d.Button,{onClick:k,variant:"ghost-outline",size:"pill",className:"w-full",children:"Close"})]}):i&&0!==i.length?(0,t.jsxs)(C,{open:e,onOpenChange:n,onClose:A,children:[(0,t.jsx)(S,{title:"Add to your Grid",subtitle:(0,t.jsxs)(t.Fragment,{children:["Choose which grid to add"," ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:a})," to."]})}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"grid-select",className:"block text-[11px] font-medium uppercase tracking-[0.06em] text-text-tertiary",children:"Destination grid"}),(0,t.jsxs)(g,{value:c,onValueChange:f,children:[(0,t.jsx)(y,{id:"grid-select",className:"h-12 w-full rounded-md border-border-strong bg-card text-base focus:ring-ring sm:text-sm",children:(0,t.jsx)(v,{placeholder:"Select a grid..."})}),(0,t.jsxs)(x,{className:"rounded-lg border-border bg-popover",children:[m.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-2 py-1.5 text-[11px] font-medium uppercase tracking-[0.06em] text-text-tertiary",children:[(0,t.jsx)(l.Globe,{className:"h-3 w-3"}),"Public grids"]}),m.map(e=>T(e,"public"))]}),E.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-1.5 px-2 py-1.5 text-[11px] font-medium uppercase tracking-[0.06em] text-text-tertiary",children:[(0,t.jsx)(s.Lock,{className:"h-3 w-3"}),"My apps"]}),E.map(e=>T(e,"private"))]})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col-reverse gap-3 sm:flex-row",children:[(0,t.jsx)(d.Button,{onClick:k,variant:"ghost-outline",size:"pill",className:"flex-1",children:"Cancel"}),(0,t.jsx)(d.Button,{onClick:()=>{c&&o(parseInt(c))},disabled:!c,variant:"gradient",size:"pill",className:"flex-1 disabled:opacity-50 disabled:shadow-none",children:"Add to Grid"})]})]})]}):(0,t.jsxs)(C,{open:e,onOpenChange:n,onClose:A,children:[(0,t.jsx)(S,{title:"No grids found",subtitle:"There are no grids on your Universal Profile yet. Create a grid first, then come back to add this app."}),(0,t.jsx)(d.Button,{onClick:k,variant:"ghost-outline",size:"pill",className:"w-full",children:"Close"})]})}],36437)},25726,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(57688),i=e.i(73375),a=e.i(37727),o=e.i(71689),s=e.i(72520),l=e.i(78917),u=e.i(7233),c=e.i(31278),d=e.i(76838),f=e.i(97625),h=e.i(73264),p=e.i(46932),m=e.i(88653),g=e.i(72328),v=e.i(19455),y=e.i(23211),x=e.i(73443),b=e.i(22016),w=e.i(99676),C=e.i(30535),S=e.i(13642),E=e.i(22530),k=e.i(39072),A=e.i(2611),T=e.i(88316),j=e.i(61479),P=e.i(36437);let N=e=>{if(!e)return"";if(e.startsWith("ipfs://")){let t=e.replace("ipfs://","");return`https://api.universalprofile.cloud/ipfs/${t}`}return e},R=[.22,1,.36,1];e.s(["default",0,function({app:e,onBack:M}){let D=(0,g.useReducedMotion)(),{sections:I}=(0,A.useGrid)(),[L,O]=(0,r.useState)(!1),[F,B]=(0,r.useState)(0),[V,z]=(0,r.useState)(null),[$,U]=(0,r.useState)(!1),{canInstallToGrid:_,openApp:H,handleInstall:W,addToGrid:G,getAddToGridUrl:q,isInstalled:K,isInstalling:X,showGridSelection:Y,setShowGridSelection:Z,pendingWidget:J,handleGridSelect:Q,handleGridSelectionCancel:ee}=(0,T.useAppLaunch)(),et=e.app.previewImages??[],er=et.length>0;(0,r.useEffect)(()=>{e.publisherProfile&&"string"==typeof e.publisherProfile&&en(e.publisherProfile)},[e]);let en=async e=>{U(!0);try{let{data:t}=await k.client.query({query:j.GET_UNIVERSAL_PROFILE,variables:{profileAddress:e}});if(t&&t.Profile&&t.Profile.length>0){let e=t.Profile[0],r={...e,profileImages:e.profileImages?.map(e=>({...e,url:N(e.url)})),backgroundImages:e.backgroundImages?.map(e=>({...e,url:N(e.url)}))};z(r)}}catch(e){console.error("Error fetching profile data:",e)}finally{U(!1)}},ei=()=>{O(!1)},ea=()=>{er&&B(e=>0===e?et.length-1:e-1)},eo=()=>{er&&B(e=>e===et.length-1?0:e+1)};(0,r.useEffect)(()=>{let e=e=>{L&&("Escape"===e.key?ei():"ArrowLeft"===e.key?ea():"ArrowRight"===e.key&&eo())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[L,e]);let es={hidden:{opacity:0,y:12*!D},show:{opacity:1,y:0,transition:{duration:.42,ease:R}}},el=V?.name||e?.developer||"Publisher",eu=V?.profileImages&&V.profileImages.length>0?V.profileImages[0].url:e?.icon||"",ec=V?.description?.trim()?V.description:e.developer?`${e.app.name} is built and maintained by ${e.developer}. Launch it to explore everything it offers inside your Universal Profile ecosystem.`:"No description available yet for this app.";return(0,t.jsxs)("div",{className:"relative flex min-h-[100dvh] w-full flex-col bg-background text-foreground",children:[(0,t.jsx)("div",{"aria-hidden":!0,
16className:`pointer-events-none absolute inset-x-0 top-0 z-0 h-[420px] bg-glow-ambient ${D?"":"animate-glow-drift"}`}),(0,t.jsx)("header",{className:"glass-nav sticky top-0 z-30 pt-safe",children:(0,t.jsxs)("div",{className:"mx-auto flex h-14 w-full max-w-[1200px] items-center gap-2 px-4 sm:gap-3 sm:px-6",children:[(0,t.jsx)(b.default,{href:"/","aria-label":"LUKSO UP!Store home",className:"flex min-w-0 items-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsx)(C.Wordmark,{})}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2 md:gap-3",children:[(0,t.jsxs)("button",{onClick:M,className:"inline-flex h-11 min-h-[44px] items-center gap-1 rounded-full px-2.5 text-sm font-medium text-text-secondary transition hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:scale-[0.98] sm:px-3","aria-label":"Go back to the store",type:"button",children:[(0,t.jsx)(i.ChevronLeft,{className:"h-5 w-5","aria-hidden":!0}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Back"})]}),(0,t.jsx)(E.ThemeToggle,{})]})]})}),(0,t.jsx)(p.motion.main,{variants:{hidden:{},show:{transition:{staggerChildren:.06*!D}}},initial:"hidden",animate:"show",className:"relative z-10 mx-auto w-full max-w-[1200px] flex-1 px-4 pb-safe-content pt-6 sm:px-6 sm:pt-8",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_360px] lg:gap-8",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,t.jsxs)(p.motion.section,{variants:es,className:"glass relative overflow-hidden rounded-[1.75rem] p-5 sm:p-7",children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 bg-hero-sheen"}),(0,t.jsxs)("div",{className:"relative flex flex-col gap-5 sm:flex-row sm:items-center",children:[(0,t.jsxs)("div",{className:"relative shrink-0",children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute -inset-3 rounded-[2rem] bg-brand/15 blur-2xl"}),(0,t.jsx)("div",{className:"relative h-20 w-20 overflow-hidden rounded-2xl border border-white/65 bg-white/35 shadow-glass ring-1 ring-inset ring-white/55 backdrop-blur-xl sm:h-24 sm:w-24",children:(0,t.jsx)(n.default,{src:e.icon||"",alt:`${e.app.name} app icon`,fill:!0,quality:95,sizes:"96px",className:"object-cover"})})]}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h1",{className:"font-display text-2xl font-bold leading-tight tracking-tight text-foreground sm:text-3xl",children:e.app.name}),(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(d.BadgeCheck,{className:"h-4 w-4 shrink-0 text-brand","aria-hidden":!0}),(0,t.jsx)("p",{className:"truncate text-sm font-medium text-text-secondary",children:e.developer||"Universal Profile"})]}),e.categories.length>0&&(0,t.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:e.categories.map(e=>(0,t.jsx)("span",{className:"chip",children:e},e))})]})]}),(0,t.jsxs)("div",{className:"relative mt-6 flex flex-col gap-2.5",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,t.jsxs)(v.Button,{variant:"glass-light",size:"pill",className:"h-12 w-full text-sm font-semibold text-brand-text sm:w-auto sm:flex-1",onClick:t=>{t.stopPropagation(),H(e)},children:[(0,t.jsx)(l.ExternalLink,{className:"h-4 w-4","aria-hidden":!0}),(0,t.jsx)("span",{children:"Open App"})]}),_?(0,t.jsx)(v.Button,{variant:"ghost-outline",size:"pill",className:"h-12 w-full text-sm font-semibold text-brand-text sm:w-auto sm:min-w-[180px]",onClick:t=>{t.stopPropagation(),W(e)},disabled:X,children:X?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.Loader2,{className:"h-4 w-4 animate-spin","aria-hidden":!0}),(0,t.jsx)("span",{children:"Adding…"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Plus,{className:"h-4 w-4","aria-hidden":!0}),(0,t.jsx)("span",{children:"Add to Grid"})]})}):(0,t.jsx)(v.Button,{asChild:!0,variant:"ghost-outline",size:"pill",className:"h-12 w-full text-sm font-semibold text-brand-text sm:w-auto 
16sm:min-w-[180px]",children:(0,t.jsxs)("a",{href:q(e),target:"_blank",rel:"noopener noreferrer","aria-label":`Add ${e.app.name} to your Universal Profile Grid on universaleverything.io`,children:[(0,t.jsx)(u.Plus,{className:"h-4 w-4","aria-hidden":!0}),(0,t.jsx)("span",{children:"Add to Grid"})]})})]}),!_&&(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-xs text-text-tertiary",children:[(0,t.jsx)(h.LayoutGrid,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),(0,t.jsx)("span",{children:"Add to Grid opens universaleverything.io to add this app to your Universal Profile — on desktop or mobile."})]})]})]}),e.widgets&&e.widgets.length>0&&(0,t.jsxs)(p.motion.section,{variants:es,children:[(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h2",{className:"font-display text-lg font-semibold text-foreground",children:"Widgets"}),(0,t.jsxs)("p",{className:"mt-0.5 text-sm text-text-secondary",children:["Add any of ",e.developer?`${e.developer}'s`:"these"," ","widgets to your Grid."]})]}),(0,t.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:e.widgets.map(r=>{let n=K(e,r);return(0,t.jsxs)("div",{className:"flex flex-col rounded-lg border border-border bg-card p-4 shadow-rest",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("h3",{className:"flex min-w-0 items-center gap-1.5 text-sm font-semibold text-foreground",children:[(0,t.jsx)(h.LayoutGrid,{className:"h-4 w-4 shrink-0 text-brand","aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:r.name})]}),(0,t.jsxs)("span",{className:"chip shrink-0 tabular-nums",title:"Grid footprint (columns × rows)",children:[r.gridSize.width,"×",r.gridSize.height]})]}),r.description&&(0,t.jsx)("p",{className:"mt-1.5 flex-1 text-[13px] leading-relaxed text-text-secondary",children:r.description}),(0,t.jsx)(v.Button,{variant:"glass-light",size:"pill",className:"mt-3 h-10 w-full text-sm font-medium text-brand-text",disabled:X||n,"aria-label":n?`${r.name} already on your Grid`:`Add ${r.name} to your Grid`,onClick:t=>{t.stopPropagation(),G(e,r)},children:n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.BadgeCheck,{className:"h-4 w-4","aria-hidden":!0}),(0,t.jsx)("span",{children:"Added"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Plus,{className:"h-4 w-4","aria-hidden":!0}),(0,t.jsx)("span",{children:"Add to Grid"})]})})]},r.url)})})]}),er&&(0,t.jsxs)(p.motion.section,{variants:es,children:[(0,t.jsx)("h2",{className:"mb-3 font-display text-lg font-semibold text-foreground",children:"Preview"}),(0,t.jsx)(y.Carousel,{opts:{align:"start",loop:!1,skipSnaps:!1,containScroll:"trimSnaps"},className:"w-full",children:(0,t.jsx)(y.CarouselContent,{className:"-ml-3 flex flex-row py-1",children:et.map((r,i)=>(0,t.jsx)(y.CarouselItem,{className:"basis-[160px] shrink-0 pl-3 sm:basis-[180px]",children:(0,t.jsx)("button",{type:"button",className:"group relative block h-[260px] w-full overflow-hidden rounded-lg border border-border bg-card shadow-rest transition hover:shadow-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:h-[300px]",onClick:()=>{B(i),O(!0)},"aria-label":`View ${e.app.name} screenshot ${i+1} full screen`,children:(0,t.jsx)(n.default,{src:r,alt:`${e.app.name} screenshot ${i+1}`,fill:!0,quality:90,sizes:"180px",className:"object-cover transition-transform duration-300 group-hover:scale-[1.03]",priority:i<3})})},i))})})]}),(0,t.jsxs)(p.motion.section,{variants:es,className:"rounded-lg border border-border bg-card p-5 shadow-rest sm:p-6",children:[(0,t.jsx)("h2",{className:"mb-2 font-display text-lg font-semibold text-foreground",children:"About this app"}),(0,t.jsx)("p",{className:"text-sm leading-relaxed text-text-secondary",children:ec})]}),(0,t.jsx)(p.motion.section,{variants:es,className:"overflow-hidden rounded-lg border border-border bg-card px-5 shadow-rest sm:px-6",children:(0,t.jsx)(x.Accordion,{type:"single",collapsible:!0,defaultValue:"details",className:"w-full",children:(0,t.jsxs)(x.AccordionItem,{value:"details",className:"border-b-0",children:[(0,t.jsx)(x.AccordionTrigger,{className:"font-display text-base font-semibold hover:no-underline",children:"Details"}),(0,t.jsx)(x.AccordionContent,{children:(0,t.jsxs)("dl",{className:"flex flex-col divide-y divide-border",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between py-2.5",children:[(0,t.jsx)("dt",{className:"text-sm text-text-secondary",children:"Grid footprint"}),(0,t.jsxs)("dd",{className:"flex items-center gap-1.5 text-sm font-medium text-foreground",children:[(0,t.jsx)(h.LayoutGrid,{className:"h-3.5 w-3.5 text-text-tertiary","aria-hidden":!0}),e.app.defaultGridSize.width," ×"," ",e.app.defaultGridSize.height]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between py-2.5",children:[(0,t.jsx)("dt",{className:"text-sm text-text-secondary",children:"Categories"}),(0,t.jsx)("dd",{className:"text-sm font-medium text-foreground",children:e.categories.join(", ")||"—"})]}),e.app.sourceCode&&(0,t.jsxs)("div",{className:"flex items-center justify-between py-2.5",children:[(0,t.jsx)("dt",{className:"text-sm text-text-secondary",children:"Source code"}),(0,t.jsx)("dd",{children:(0,t.jsxs)("a",{href:e.app.sourceCode,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 rounded-full px-1 text-sm font-medium text-brand-text transition hover:text-brand-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsx)(f.Code2,{className:"h-3.5 w-3.5","aria-hidden":!0}),"View on GitHub",(0,t.jsx)(l.ExternalLink,{className:"h-3 w-3","aria-hidden":!0})]})})]})]})})]})})})]}),(0,t.jsx)(p.motion.aside,{variants:es,className:"flex flex-col gap-6",children:(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-card p-5 shadow-rest sm:p-6 lg:sticky lg:top-20",children:[(0,t.jsx)("h2",{className:"mb-4 font-display text-lg font-semibold text-foreground",children:"Publisher"}),$?(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex items-start gap-4",children:[(0,t.jsx)("div",{className:"h-12 w-12 animate-pulse rounded-full bg-muted"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("div",{className:"mb-2 h-5 w-40 animate-pulse rounded bg-muted"}),(0,t.jsx)("div",{className:"h-4 w-28 animate-pulse rounded bg-muted"})]})]}),(0,t.jsx)("div",{className:"h-4 w-full animate-pulse rounded bg-muted"}),(0,t.jsx)("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),(0,t.jsxs)("div",{className:"mt-1 flex gap-2",children:[(0,t.jsx)("div",{className:"h-8 w-20 animate-pulse rounded-full bg-muted"}),(0,t.jsx)("div",{className:"h-8 w-20 animate-pulse rounded-full bg-muted"})]})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex items-start gap-4",children:[(0,t.jsxs)(w.Avatar,{className:"h-12 w-12 shrink-0 border border-border",children:[(0,t.jsx)(w.AvatarImage,{src:eu,alt:el,className:"object-cover"}),(0,t.jsx)(w.AvatarFallback,{className:"bg-muted text-text-secondary",children:(e?.developer||"UP").substring(0,2).toUpperCase()})]}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"truncate text-base font-semibold text-foreground",children:el}),(0,t.jsxs)("p",{className:"mt-0.5 text-xs text-text-tertiary",children:[V?.followed?.length||0," follower",1===(V?.followed?.length||0)?"":"s"]}),V?.createdTimestamp&&(0,t.jsxs)("p",{className:"mt-0.5 text-xs text-text-tertiary",children:["Joined"," ",new Date(1e3*Number(V.createdTimestamp)).toLocaleDateString(void 0,{year:"numeric",month:"short"})]})]})]}),V?.description&&(0,t.jsx)("p",{className:"text-sm leading-relaxed text-text-secondary line-clamp-4",children:V.description}),V?.links&&V.links.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:V.links.map((e,r)=>(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-9 items-center gap-1.5 rounded-full border border-border-strong bg-transparent px-3 text-xs font-medium text-foreground transition hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:scale-[0.98]",children:[e.title||"Link",(0,t.jsx)(l.ExternalLink,{className:"h-3 w-3","aria-hidden":!0})]},r))})]})]})})]})}),(0,t.jsx)(S.default,{}),(0,t.jsx)(m.AnimatePresence,{children:L&&er&&(0,t.jsxs)(p.motion.div,{initial:{opacity:0}
16,animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},className:"fixed inset-0 z-50 flex items-center justify-center bg-black/85 p-4 backdrop-blur-sm",role:"dialog","aria-modal":"true","aria-label":`${e.app.name} screenshots`,onClick:ei,children:[(0,t.jsxs)(p.motion.div,{initial:{scale:D?1:.96,opacity:0},animate:{scale:1,opacity:1},exit:{scale:D?1:.96,opacity:0},transition:{duration:.22,ease:R},className:"relative max-h-[85vh] w-auto max-w-[85%] overflow-hidden rounded-xl bg-card shadow-glass",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("button",{onClick:ei,className:"absolute left-3 top-3 z-50 inline-flex h-11 w-11 min-h-[44px] min-w-[44px] items-center justify-center rounded-full glass text-foreground transition hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Close screenshot viewer",children:(0,t.jsx)(a.X,{className:"h-5 w-5","aria-hidden":!0})}),(0,t.jsx)("div",{className:"relative flex h-full w-full items-center justify-center",children:(0,t.jsx)(n.default,{src:et[F],alt:`${e.app.name} screenshot ${F+1}`,className:"max-h-[85vh] w-auto object-contain",width:275,height:800,quality:100,priority:!0})}),(0,t.jsxs)("div",{className:"absolute bottom-3 left-0 right-0 text-center text-sm font-medium text-card-foreground",children:[F+1," / ",et.length]})]}),et.length>1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),ea()},className:"absolute left-4 top-1/2 inline-flex h-11 w-11 min-h-[44px] min-w-[44px] -translate-y-1/2 items-center justify-center rounded-full glass text-foreground transition hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Previous image",children:(0,t.jsx)(o.ArrowLeft,{className:"h-5 w-5","aria-hidden":!0})}),(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),eo()},className:"absolute right-4 top-1/2 inline-flex h-11 w-11 min-h-[44px] min-w-[44px] -translate-y-1/2 items-center justify-center rounded-full glass text-foreground transition hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Next image",children:(0,t.jsx)(s.ArrowRight,{className:"h-5 w-5","aria-hidden":!0})})]})]})}),(0,t.jsx)(P.default,{open:Y,onOpenChange:Z,sections:I,appName:J?.name??e.app.name,onGridSelect:Q,onCancel:ee})]})}])},94229,e=>{"use strict";var t=e.i(43476),r=e.i(22016),n=e.i(46932),i=e.i(72328),a=e.i(94908),o=e.i(55436),s=e.i(75157);e.s(["default",0,function({active:e,onExplore:l}){let u=(0,i.useReducedMotion)(),c="explore"===e,d=c?"0%":"100%",f=c?"100%":"0%",h=(0,s.cn)("lg-switch-item",c&&"lg-switch-item-active"),p=(0,s.cn)("lg-switch-item",!c&&"lg-switch-item-active");return(0,t.jsxs)("div",{className:"lg-switch",role:"group","aria-label":"Store sections",children:[(0,t.jsx)(n.motion.span,{"aria-hidden":"true",className:"lg-switch-thumb",initial:!u&&{x:f},animate:{x:d},transition:u?{duration:0}:{type:"spring",stiffness:360,damping:34}}),l?(0,t.jsxs)("button",{type:"button",onClick:l,"aria-current":c?"page":void 0,className:h,children:[(0,t.jsx)(a.Compass,{className:"h-4 w-4","aria-hidden":"true"}),"Explore"]}):(0,t.jsxs)(r.default,{href:"/","aria-current":c?"page":void 0,className:h,children:[(0,t.jsx)(a.Compass,{className:"h-4 w-4","aria-hidden":"true"}),"Explore"]}),(0,t.jsxs)(r.default,{href:"/store","aria-current":c?void 0:"page",className:p,children:[(0,t.jsx)(o.Search,{className:"h-4 w-4","aria-hidden":"true"}),"Search"]})]})}])},54720,e=>{"use strict";var t=e.i(71645);e.s(["useHydrated",0,function(){let[e,r]=(0,t.useState)(!1);return(0,t.useEffect)(()=>r(!0),[]),e}
16])},66595,(e,t,r)=>{t.exports=JSON.parse('{"defolio-multisend":{"name":"Multisend: Send Tokens & NFTs","url":"https://multisend-alpha.vercel.app/","sourceCode":"https://github.com/deliquified/multisend","developer":"Deliquified Labs","publisher":"0x746a88d4bc09562e3f01bf4bd0ec91233f67e0d5","categories":["DeFi","NFTs","Infrastructure"],"gridSize":[1,2],"screenshots":5,"featured":true,"featuredTitle":"Send Tokens & NFTs"},"stakingverse-staking":{"name":"Stakingverse: Stake Your LYX","url":"https://app.stakingverse.io/","developer":"Stakingverse","publisher":"0x900Be67854A47282211844BbdF5Cc0f332620513","categories":["DeFi","Staking"],"gridSize":[1,1],"screenshots":2,"featured":true,"widgets":[{"name":"Liquid Staking","url":"https://app.stakingverse.io/liquid","gridSize":[1,1],"description":"Mint sLYX and earn auto-compounding staking rewards."},{"name":"Network Stats","url":"https://app.stakingverse.io/network-stats","gridSize":[1,2],"description":"Live LUKSO validators, blocks and ecosystem health."},{"name":"Token Swap","url":"https://app.stakingverse.io/swap","gridSize":[1,1],"description":"Swap between LYX and sLYX in a tap."}]},"deliquified-roasted":{"name":"Roasted: Roast Profiles","url":"https://roasted-green.vercel.app/","developer":"Deliquified Labs","publisher":"0x746a88d4bc09562e3f01bf4bd0ec91233f67e0d5","categories":["Social"],"gridSize":[1,1],"screenshots":6,"featured":true},"aratta-labs-draco":{"name":"Dracos: Swipe & Mint","url":"https://thunder-dracos.vercel.app","developer":"Aratta Labs","publisher":"0x8A985fe01eA908F5697975332260553c454f8F77","categories":["NFTs"],"gridSize":[1,2],"screenshots":2,"featured":true},"aratta-labs-pigmint":{"name":"Pigmint: Mint Your Mood","url":"https://pigmint.vercel.app/","developer":"Aratta Labs","publisher":"0x544051588d6a0713e164196c16024fdcff877540","categories":["Social","NFTs"],"gridSize":[2,2],"screenshots":3,"featured":true},"deliquified-notes":{"name":"Notes: Take Notes Privately","url":"https://mini-notes-livid.vercel.app/","developer":"Deliquified Labs","publisher":"0x746a88d4bc09562e3f01bf4bd0ec91233f67e0d5","categories":["Security","Infrastructure"],"gridSize":[2,2],"screenshots":2,"featured":true},"universal-profiles-mobile":{"name":"Universal Profiles Mobile: Your Web3 Identity","url":"https://my.universalprofile.cloud/apps","developer":"Universal Everything","publisher":"0x0aa3dfcd57fad43e4fad2577fe7dde9395a0098e","categories":["Infrastructure","Social","Community"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["UP Mobile","Universal Profiles","Wallet"]},"openclaw":{"name":"OpenClaw: Authorize AI Agents","url":"https://openclaw.universalprofile.cloud/","sourceCode":"https://github.com/emmet-bot/openclaw-universalprofile-skill","developer":"LUKSO Agent","publisher":"0x293E96ebbf264ed7715cff2b67850517De70232a","categories":["AI","Security","Infrastructure"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["OpenClaw","AI Agents","Controller"]},"universal-profile-authorize":{"name":"UP Authorize: Add Controllers","url":"https://authorize.universalprofile.cloud/","developer":"LUKSO Agent","publisher":"0x293E96ebbf264ed7715cff2b67850517De70232a","categories":["Security","Infrastructure"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["Universal Profile","Authorize","Controller"]},"agent-token-claimer":{"name":"Token Claimer: Create LUKSO Drops","url":"https://agent-token-claimer.vercel.app/","sourceCode":"https://github.com/JordyDutch/Token-Claimer","developer":"JordyDutch & LUKSO Agent","publisher":"0x293E96ebbf264ed7715cff2b67850517De70232a","categories":["DeFi","NFTs","Infrastructure"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["Token Claimer","Drops","LSP7","LSP8","Airdrops"]},"lsp-asset-mover":{"name":"LSP Asset Mover: Transfer Assets","url":"https://lsp-asset-mover.vercel.app/","sourceCode":"https://github.com/JordyDutch/LSP-Asset-Mover","developer":"JordyDutch & LUKSO Agent","publisher":"0x293E96ebbf264ed7715cff2b67850517De70232a","categories":["Security","Infrastructure","NFTs"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["LSP7","LSP8","Assets","Migration","Universal Profile"]},"universal-everything":{"name":"Universal Everything: Explore Profiles","url":"https://universaleverything.io/","sourceCode":"https://github.com/lukso-network/universalprofile.cloud","developer":"Universal Everything","publisher":"0x0aa3dfcd57fad43e4fad2577fe7dde9395a0098e","categories":["Social","Infrastru
16cture","Community"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["Profiles","Assets","Explorer"]},"universal-page":{"name":"Universal Page: NFTs 2.0 Marketplace","url":"https://universal.page/feed","developer":"Universal Page","publisher":"0x00311eea40ef2687dc1049e5b6261481126fb9f3","categories":["NFTs","Marketplaces"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["Marketplace","Collectibles","NFTs"]},"phlox":{"name":"Phlox: Trade on LUKSO","url":"https://phlox.social","developer":"Phlox","publisher":"0xa49c3e8f135307eee2ac4dd813972ce7d4ead418","categories":["DeFi","Exchanges"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["Swap","Liquidity","DeFi"]},"phlame-garden":{"name":"PHLAME Garden: Onchain Reputation","url":"https://phlame-protocol-v1.vercel.app/garden.html","developer":"Phlox","publisher":"0xa49c3e8f135307eee2ac4dd813972ce7d4ead418","categories":["Social","Community","DeFi"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["PHLAME","Reputation","Garden","Leaderboard"]},"potato-tipper":{"name":"POTATO Tipper: Tip New Followers","url":"https://potatotipper.app","developer":"Jean Cavallera","publisher":"0x5eed04004c2D46C12Fe30C639A90AD5d6F5D573d","categories":["Social","Community"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["POTATO","Followers","Tipping"]},"profile-jump":{"name":"Profile Jump: Discover Universal Profiles","url":"https://profilejump.com/","developer":"Profile Jump","publisher":"0x0aa3dfcd57fad43e4fad2577fe7dde9395a0098e","categories":["Social","Infrastructure"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["Discovery","Analytics","Profiles"]},"airdropper":{"name":"Airdropper: Drop Tokens and Collectibles","url":"https://airdropper.universaleverything.io/","developer":"Universal Everything","publisher":"0xed64cb1062990e7fc2433443584a60989c0ae75d","categories":["Community","Infrastructure","DeFi","NFTs"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["Airdrops","Tokens","Collectibles"]},"proof-of-presence":{"name":"Proof of Presence: Event Credentials","url":"https://pop.universaleverything.io/","developer":"Universal Everything","publisher":"0x700a452919208d57fdc886af56d23c9ce548d0c4","categories":["Community","NFTs","Social"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["Events","Credentials","Attendance"]},"nexus-hyperlane-bridge":{"name":"Nexus Bridge: Bridge LYX","url":"https://nexus.hyperlane.xyz/?origin=lukso&destination=ethereum&destinationToken=LYX&originToken=LYX","developer":"Hyperlane","publisher":"0x177bf7d2f499743502604dbf3d42d837b10dc50c","categories":["Infrastructure","DeFi"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["Bridge","LYX","Ethereum"]},"forever-moments":{"name":"Forever Moments: Preserve Memories","url":"https://www.forevermoments.life/moments","developer":"Forever Moments","publisher":"0x7de347be3ebaed43065182fcaba462796d6f2a83","categories":["Social","Art","NFTs"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["Moments","Memories","Collections"]},"hup":{"name":"Hup: Onchain Social Network","url":"https://www.hup.social/","developer":"Hup","publisher":"0x0aa3dfcd57fad43e4fad2577fe7dde9395a0098e","categories":["Social","Community"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["Social","Posts","Onchain"]},"common-ground":{"name":"Common Ground: Community Coordination","url":"https://app.cg/c/LUKSO","sourceCode":"https://github.com/Common-Ground-DAO/commonground","developer":"Common Ground","publisher":"0x0aa3dfcd57fad43e4fad2577fe7dde9395a0098e","categories":["Community","DAOs","Social"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["Community","Coordination","Events"]},"gallery-marketplace":{"name":"3D Marketplace: Grid Gallery","url":"https://universaleverything.io/0xAE493C002dA6afaa239F68931A438183DE01b0c1?assetGroup=grid","developer":"Universal Everything","publisher":"0xAE493C002dA6afaa239F68931A438183DE01b0c1","categories":["Marketplaces","NFTs"],"gridSize":[1,2],"screenshots":1,"tags":["3D","Marketplace","Grid","Universal Page"]},"day-glimpse":{"name":"Day Glimpse: Share Grid Moments","url":"https://universaleverything.io/0xd34cd7127b5fa1522f9739a1b575f60821f5bc31","developer":"Day Glimpse","publisher":"0xd34cd7127b5fa1522f9739a1b575f60821f5bc31","categories":["Social","Community"],"gridSize":[1,2],"screenshots":1,"tags":["Day Glimpse","Grid","Moments","Mini App"]},"follower-tracker":{"name":"FollowerTracker: Analyze UP Connections","url":"https://profile.link/followertracker@F160","developer":"FollowerTracker","publisher":"0xf160ee4e7d25f8a15d98
161848c9643289d25ed9fd","categories":["Social","Infrastructure"],"gridSize":[1,2],"screenshots":1,"tags":["Followers","Universal Profile","Social Graph","Analytics"]},"universal-everything-create-asset":{"name":"Token Creator","url":"https://universaleverything.io/create-asset","developer":"Universal Everything","publisher":"0x0aa3dfcd57fad43e4fad2577fe7dde9395a0098e","categories":["Infrastructure","DeFi"],"gridSize":[1,2],"screenshots":1,"tags":["Token Creator","LSP7","Assets"]},"team-finance-lukso-tools":{"name":"Team Finance: LUKSO Token Tools","url":"https://app.team.finance/token-creation?ref=blog.team.finance","developer":"Team Finance","publisher":"0x0aa3dfcd57fad43e4fad2577fe7dde9395a0098e","categories":["Infrastructure","DeFi"],"gridSize":[1,2],"screenshots":1,"featured":true,"tags":["Token Creator","Vesting","Locks","Multisender"]},"groov":{"name":"Groov: Collect Music Onchain","url":"https://www.groovonchain.com/","developer":"Groov","publisher":"0x7a66Aa55002B34FAECEcF1977D34646690d3c330","categories":["Music","NFTs"],"gridSize":[1,2],"screenshots":1,"tags":["Music","Collectibles","Fanzones"]},"permission-control":{"name":"Permission Control: Manage UP Controllers","url":"https://permissioncontrol.app/","developer":"Permission Control","publisher":"0x65Cb19C9c7b5A6695C48936Cf8917CF34438D7D3","categories":["Security","Infrastructure"],"gridSize":[1,2],"screenshots":1,"tags":["Controllers","Permissions","Universal Profiles"]}
16,"universal-grave":{"name":"Universal Grave","url":"https://universalgrave.com/lukso","developer":"GRAVE","publisher":"0xec1c59E78De6f840A66b6EE8E4066700Be863529","categories":["Security","Infrastructure"],"gridSize":[1,2],"screenshots":1,"tags":["Grave","Digital Assets","Spam"]},"up-assistants":{"name":"UP Assistants","url":"https://upassistants.com/","developer":"UP Assistants","publisher":"0xec1c59E78De6f840A66b6EE8E4066700Be863529","categories":["AI","Infrastructure","Community"],"gridSize":[1,2],"screenshots":1,"tags":["Assistants","Catalog","AI"]}}')},90691,e=>{"use strict";let t=Object.fromEntries(Object.entries(e.i(66595).default).map(([e,t])=>[e,function(e,t){let r=`/apps/${e}`,[n,i]=t.gridSize,a=Array.from({length:Math.max(0,t.screenshots)},(e,t)=>`${r}/screenshot-${t+1}.png`);return{categories:t.categories,publisherProfile:t.publisher,app:{profile:t.publisher,name:t.name,url:t.url,sourceCode:t.sourceCode,defaultGridSize:{width:n,height:i},previewImages:a},id:e,icon:`${r}/logo.png`,banner:`${r}/banner.png`,developer:t.developer,tags:t.tags,featured:t.featured??!1,featuredTitle:t.featuredTitle,widgets:(t.widgets??[]).map(e=>({name:e.name,url:e.url,gridSize:{width:e.gridSize?.[0]??1,height:e.gridSize?.[1]??1},description:e.description}))}}(e,t)])),r=e=>Array.from(new Set(e.filter(Boolean))),n=e=>e.toLowerCase().trim().replace(/https?:\/\//,"").replace(/\/$/,"").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),i=e=>{let[t]=e.app.name.split(":");return t.trim()||e.app.name},a=e=>{let t=e.publisherProfile||e.developer||"";return`${n(t)}:${n(i(e))}`},o=Object.fromEntries(Object.entries(t).reduce((e,[t,n])=>{var o;let s,l=a(n),u=e.findIndex(([,e])=>a(e)===l);if(-1===u)return e.push([t,n]),e;let[c,d]=e[u];return e[u]=[c,{...d,categories:r([...d.categories,...n.categories]),tags:r([...d.tags??[],...n.tags??[],n.app.name,i(n)]),featured:d.featured||n.featured,featuredTitle:d.featuredTitle??n.featuredTitle,widgets:(o=[...d.widgets??[],...n.widgets??[]],s=new Set,o.filter(e=>!s.has(e.url)&&(s.add(e.url),!0)))}],e},[])),s=Object.values(o).filter(e=>e.featured||e.featuredTitle).map(e=>({...e,title:e.featuredTitle||e.app.name,banner:e.banner||""}));e.s(["apps",0,o,"categories",0,{Art:{id:"Art",name:"Art",displayName:"Art"},AI:{id:"AI",name:"AI",displayName:"AI"},Brands:{id:"Brands",name:"Brands",displayName:"Brands"},Community:{id:"Community",name:"Community",displayName:"Community"},DAOs:{id:"DAOs",name:"DAOs",displayName:"DAOs"},DeFi:{id:"DeFi",name:"DeFi",displayName:"DeFi"},Exchanges:{id:"Exchanges",name:"Exchanges",displayName:"Exchanges"},Fashion:{id:"Fashion",name:"Fashion",displayName:"Fashion"},Gaming:{id:"Gaming",name:"Gaming",displayName:"Gaming"},Infrastructure:{id:"Infrastructure",name:"Infrastructure",displayName:"Infrastructure"},Marketplaces:{id:"Marketplaces",name:"Marketplaces",displayName:"Marketplaces"},Music:{id:"Music",name:"Music",displayName:"Music"},NFTs:{id:"NFTs",name:"NFTs",displayName:"NFTs"},Security:{id:"Security",name:"Security",displayName:"Security"},Social:{id:"Social",name:"Social",displayName:"Social"},Staking:{id:"Staking",name:"Staking",displayName:"Staking"}},"featuredApps",0,s,"getAppsByCategory",0,e=>Object.values(o).filter(t=>t.categories.includes(e)),"getPrimaryCategory",0,e=>e.categories[0]||"","shuffle",0,e=>{let t=[...e];for(let e=t.length-1;e>0;e--){let r=Math.floor(Math.random()*(e+1));[t[e],t[r]]=[t[r],t[e]]}return t},"sortByOpenCount",0,(e,t)=>[...e].sort((e,r)=>(t[r.id??""]??0)-(t[e.id??""]??0))])},92270,e=>{"use strict";let t=(0,e.i(75254).default)("log-out",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);e.s(["LogOut",0,t],92270)},76639,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(26999),i=e.i(37727),a=e.i(75157);let o=n.Root;n.Trigger;let s=n.Portal;n.Close;let l=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(n.Overlay,{ref:i,className:(0,a.cn)("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r}));l.displayName=n.Overlay.displayName;let u=r.forwardRef(({className:e,children:r,...o},u)=>(0,t.jsxs)(s,{children:[(0,t.jsx)(l,{}),(0,t.jsxs)(n.Content,{ref:u,className:(0,a.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
16nded-lg",e),...o,children:[r,(0,t.jsxs)(n.Close,{className:"absolute right-4 top-4 rounded-sm 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-accent data-[state=open]:text-muted-foreground",children:[(0,t.jsx)(i.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=n.Content.displayName;let c=({className:e,...r})=>(0,t.jsx)("div",{className:(0,a.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...r});c.displayName="DialogHeader";let d=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(n.Title,{ref:i,className:(0,a.cn)("text-lg font-semibold leading-none tracking-tight",e),...r}));d.displayName=n.Title.displayName;let f=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(n.Description,{ref:i,className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));f.displayName=n.Description.displayName,e.s(["Dialog",0,o,"DialogContent",0,u,"DialogDescription",0,f,"DialogHeader",0,c,"DialogTitle",0,d])},40666,e=>{"use strict";var t=e.i(71645),r=e.i(81140),n=e.i(20783),i=e.i(30030),a=e.i(69340),o=e.i(48425),s=e.i(75830),l=e.i(86318),u=e.i(26330),c=e.i(3536),d=e.i(65491),f=e.i(10772),h=e.i(53660),p=e.i(74606),m=e.i(96626),g=e.i(9937),v=e.i(43476),y="rovingFocusGroup.onEntryFocus",x={bubbles:!1,cancelable:!0},b="RovingFocusGroup",[w,C,S]=(0,s.createCollection)(b),[E,k]=(0,i.createContextScope)(b,[S]),[A,T]=E(b),j=t.forwardRef((e,t)=>(0,v.jsx)(w.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,v.jsx)(w.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,v.jsx)(P,{...e,ref:t})})}));j.displayName=b;var P=t.forwardRef((e,i)=>{let{__scopeRovingFocusGroup:s,orientation:u,loop:c=!1,dir:d,currentTabStopId:f,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:p,onEntryFocus:m,preventScrollOnEntryFocus:w=!1,...S}=e,E=t.useRef(null),k=(0,n.useComposedRefs)(i,E),T=(0,l.useDirection)(d),[j,P]=(0,a.useControllableState)({prop:f,defaultProp:h??null,onChange:p,caller:b}),[N,R]=t.useState(!1),M=(0,g.useCallbackRef)(m),I=C(s),L=t.useRef(!1),[O,F]=t.useState(0);return t.useEffect(()=>{let e=E.current;if(e)return e.addEventListener(y,M),()=>e.removeEventListener(y,M)},[M]),(0,v.jsx)(A,{scope:s,orientation:u,dir:T,loop:c,currentTabStopId:j,onItemFocus:t.useCallback(e=>P(e),[P]),onItemShiftTab:t.useCallback(()=>R(!0),[]),onFocusableItemAdd:t.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>F(e=>e-1),[]),children:(0,v.jsx)(o.Primitive.div,{tabIndex:N||0===O?-1:0,"data-orientation":u,...S,ref:k,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{L.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!L.current;if(e.target===e.currentTarget&&t&&!N){let t=new CustomEvent(y,x);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=I().filter(e=>e.focusable);D([e.find(e=>e.active),e.find(e=>e.id===j),...e].filter(Boolean).map(e=>e.ref.current),w)}}L.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>R(!1))})})}),N="RovingFocusGroupItem",R=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,focusable:a=!0,active:s=!1,tabStopId:l,children:u,...c}=e,d=(0,f.useId)(),h=l||d,p=T(N,i),m=p.currentTabStopId===h,g=C(i),{onFocusableItemAdd:y,onFocusableItemRemove:x,currentTabStopId:b}=p;return t.useEffect(()=>{if(a)return y(),()=>x()},[a,y,x]),(0,v.jsx)(w.ItemSlot,{scope:i,id:h,focusable:a,active:s,children:(0,v.jsx)(o.Primitive.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:n,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{a?p.onItemFocus(h):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>p.onItemFocus(h)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return M[i]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=g().filter(e=>
16e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let a=i.indexOf(e.currentTarget);i=p.loop?(r=i,n=a+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(a+1)}setTimeout(()=>D(i))}}),children:"function"==typeof u?u({isCurrentTabStop:m,hasTabStop:null!=b}):u})})});R.displayName=N;var M={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function D(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}var I=e.i(91918),L=e.i(86312),O=e.i(85369),F=["Enter"," "],B=["ArrowUp","PageDown","End"],V=["ArrowDown","PageUp","Home",...B],z={ltr:[...F,"ArrowRight"],rtl:[...F,"ArrowLeft"]},$={ltr:["ArrowLeft"],rtl:["ArrowRight"]},U="Menu",[_,H,W]=(0,s.createCollection)(U),[G,q]=(0,i.createContextScope)(U,[W,h.createPopperScope,k]),K=(0,h.createPopperScope)(),X=k(),[Y,Z]=G(U),[J,Q]=G(U),ee=e=>{let{__scopeMenu:r,open:n=!1,children:i,dir:a,onOpenChange:o,modal:s=!0}=e,u=K(r),[c,d]=t.useState(null),f=t.useRef(!1),p=(0,g.useCallbackRef)(o),m=(0,l.useDirection)(a);return t.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,v.jsx)(h.Root,{...u,children:(0,v.jsx)(Y,{scope:r,open:n,onOpenChange:p,content:c,onContentChange:d,children:(0,v.jsx)(J,{scope:r,onClose:t.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:s,children:i})})})};ee.displayName=U;var et=t.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,i=K(r);return(0,v.jsx)(h.Anchor,{...i,...n,ref:t})});et.displayName="MenuAnchor";var er="MenuPortal",[en,ei]=G(er,{forceMount:void 0}),ea=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:i}=e,a=Z(er,t);return(0,v.jsx)(en,{scope:t,forceMount:r,children:(0,v.jsx)(m.Presence,{present:r||a.open,children:(0,v.jsx)(p.Portal,{asChild:!0,container:i,children:n})})})};ea.displayName=er;var eo="MenuContent",[es,el]=G(eo),eu=t.forwardRef((e,t)=>{let r=ei(eo,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,a=Z(eo,e.__scopeMenu),o=Q(eo,e.__scopeMenu);return(0,v.jsx)(_.Provider,{scope:e.__scopeMenu,children:(0,v.jsx)(m.Presence,{present:n||a.open,children:(0,v.jsx)(_.Slot,{scope:e.__scopeMenu,children:o.modal?(0,v.jsx)(ec,{...i,ref:t}):(0,v.jsx)(ed,{...i,ref:t})})})})}),ec=t.forwardRef((e,i)=>{let a=Z(eo,e.__scopeMenu),o=t.useRef(null),s=(0,n.useComposedRefs)(i,o);return t.useEffect(()=>{let e=o.current;if(e)return(0,L.hideOthers)(e)},[]),(0,v.jsx)(eh,{...e,ref:s,trapFocus:a.open,disableOutsidePointerEvents:a.open,disableOutsideScroll:!0,onFocusOutside:(0,r.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>a.onOpenChange(!1)})}),ed=t.forwardRef((e,t)=>{let r=Z(eo,e.__scopeMenu);return(0,v.jsx)(eh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),ef=(0,I.createSlot)("MenuContent.ScrollLock"),eh=t.forwardRef((e,i)=>{let{__scopeMenu:a,loop:o=!1,trapFocus:s,onOpenAutoFocus:l,onCloseAutoFocus:f,disableOutsidePointerEvents:p,onEntryFocus:m,onEscapeKeyDown:g,onPointerDownOutside:y,onFocusOutside:x,onInteractOutside:b,onDismiss:w,disableOutsideScroll:C,...S}=e,E=Z(eo,a),k=Q(eo,a),A=K(a),T=X(a),P=H(a),[N,R]=t.useState(null),M=t.useRef(null),D=(0,n.useComposedRefs)(i,M,E.onContentChange),I=t.useRef(0),L=t.useRef(""),F=t.useRef(0),z=t.useRef(null),$=t.useRef("right"),U=t.useRef(0),_=C?O.RemoveScroll:t.Fragment;t.useEffect(()=>()=>window.clearTimeout(I.current),[]),(0,c.useFocusGuards)();let W=t.useCallback(e=>{var t,r;return $.current===z.current?.side&&(t=e,!!(r=z.current?.area)&&function(e,t){let{x:r,y:n}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],l=o.x,u=o.y,c=s.x,d=s.y;u>n!=d>n&&r<(c-l)*(n-u)/(d-u)+l&&(i=!i)}return i}({x:t.clientX,y:t.clientY},r))},[]);return(0,v.jsx)(es,{scope:a,searchRef:L,onItemEnter:t.useCallback(e=>{W(e)&&e.preventDefault()},[W]),onItemLeave:t.useCallback(e=>{W(e)||(M.current?.focus(),R(null))},[W]),onTriggerLeave:t.useCallback(e=>{W(e)&&e.preventDefault()},[W]),pointerGraceTimerRef:F,onPointerGraceIntentChange:t.useCallback(e=>{z.current=e},[]),children:(0,v.jsx)(_,{...C?{as:ef,allowPinchZoom:!0}:void 0,children:(0,v.jsx)(d.FocusScope,{asChild:!0,trapped:s,onMountAutoFocus:(0,r.composeEventHandlers)(l,e=>{e.preventDefault(),M.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:(0,v.jsx)(u.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:p,onEscapeKeyDown:g,onPointerDownOutside:y,onFocusOutside:x,onInteractOutside:b,onDismiss:w,children:(0,v.jsx)(j,{asChild:!0,...T,dir:k.dir,orientation:"vertical",loop:o,currentTabStopId:N,onCurrentTabStopIdChange:R,onEntryFocus:(0,r.composeEventHandlers)(m,e=>{k.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,v.jsx)(h.Content,{role:"menu","aria-orientation":"vertical","data-state":e$(E.open
16),"data-radix-menu-content":"",dir:k.dir,...A,...S,ref:D,style:{outline:"none",...S.style},onKeyDown:(0,r.composeEventHandlers)(S.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;if(t){var i;let t,a,o,s,l,u;"Tab"===e.key&&e.preventDefault(),!r&&n&&(i=e.key,t=L.current+i,a=P().filter(e=>!e.disabled),o=document.activeElement,s=a.find(e=>e.ref.current===o)?.textValue,l=function(e,t,r){var n;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=r?e.indexOf(r):-1,o=(n=Math.max(a,0),e.map((t,r)=>e[(n+r)%e.length]));1===i.length&&(o=o.filter(e=>e!==r));let s=o.find(e=>e.toLowerCase().startsWith(i.toLowerCase()));return s!==r?s:void 0}(a.map(e=>e.textValue),t,s),u=a.find(e=>e.textValue===l)?.ref.current,function e(t){L.current=t,window.clearTimeout(I.current),""!==t&&(I.current=window.setTimeout(()=>e(""),1e3))}(t),u&&setTimeout(()=>u.focus()))}let a=M.current;if(e.target!==a||!V.includes(e.key))return;e.preventDefault();let o=P().filter(e=>!e.disabled).map(e=>e.ref.current);B.includes(e.key)&&o.reverse(),function(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}(o)}),onBlur:(0,r.composeEventHandlers)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(I.current),L.current="")}),onPointerMove:(0,r.composeEventHandlers)(e.onPointerMove,eH(e=>{let t=e.target,r=U.current!==e.clientX;e.currentTarget.contains(t)&&r&&($.current=e.clientX>U.current?"right":"left",U.current=e.clientX)}))})})})})})})});eu.displayName=eo;var ep=t.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,v.jsx)(o.Primitive.div,{role:"group",...n,ref:t})});ep.displayName="MenuGroup";var em=t.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,v.jsx)(o.Primitive.div,{...n,ref:t})});em.displayName="MenuLabel";var eg="MenuItem",ev="menu.itemSelect",ey=t.forwardRef((e,i)=>{let{disabled:a=!1,onSelect:s,...l}=e,u=t.useRef(null),c=Q(eg,e.__scopeMenu),d=el(eg,e.__scopeMenu),f=(0,n.useComposedRefs)(i,u),h=t.useRef(!1);return(0,v.jsx)(ex,{...l,ref:f,disabled:a,onClick:(0,r.composeEventHandlers)(e.onClick,()=>{let e=u.current;if(!a&&e){let t=new CustomEvent(ev,{bubbles:!0,cancelable:!0});e.addEventListener(ev,e=>s?.(e),{once:!0}),(0,o.dispatchDiscreteCustomEvent)(e,t),t.defaultPrevented?h.current=!1:c.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),h.current=!0},onPointerUp:(0,r.composeEventHandlers)(e.onPointerUp,e=>{h.current||e.currentTarget?.click()}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{let t=""!==d.searchRef.current;a||t&&" "===e.key||F.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ey.displayName=eg;var ex=t.forwardRef((e,i)=>{let{__scopeMenu:a,disabled:s=!1,textValue:l,...u}=e,c=el(eg,a),d=X(a),f=t.useRef(null),h=(0,n.useComposedRefs)(i,f),[p,m]=t.useState(!1),[g,y]=t.useState("");return t.useEffect(()=>{let e=f.current;e&&y((e.textContent??"").trim())},[u.children]),(0,v.jsx)(_.ItemSlot,{scope:a,disabled:s,textValue:l??g,children:(0,v.jsx)(R,{asChild:!0,...d,focusable:!s,children:(0,v.jsx)(o.Primitive.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":s||void 0,"data-disabled":s?"":void 0,...u,ref:h,onPointerMove:(0,r.composeEventHandlers)(e.onPointerMove,eH(e=>{s?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,r.composeEventHandlers)(e.onPointerLeave,eH(e=>c.onItemLeave(e))),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>m(!0)),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>m(!1))})})})}),eb=t.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:i,...a}=e;return(0,v.jsx)(ej,{scope:e.__scopeMenu,checked:n,children:(0,v.jsx)(ey,{role:"menuitemcheckbox","aria-checked":eU(n)?"mixed":n,...a,ref:t,"data-state":e_(n),onSelect:(0,r.composeEventHandlers)(a.onSelect,()=>i?.(!!eU(n)||!n),{checkForDefaultPrevented:!1})})})});eb.displayName="MenuCheckboxItem";var ew="MenuRadioGroup",[eC,eS]=G(ew,{value:void 0,onValueChange:()=>{}}),eE=t.forwardRef((e,t)=>{let{value:r,onValueChange:n,...i}=e,a=(0,g.useCallbackRef)(n);return(0,v.jsx)(eC,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,v.jsx)(ep,{...i,ref:t})})});eE.displayName=ew;var ek="MenuRadioItem",eA=t.forwardRef((e,t)=>
16{let{value:n,...i}=e,a=eS(ek,e.__scopeMenu),o=n===a.value;return(0,v.jsx)(ej,{scope:e.__scopeMenu,checked:o,children:(0,v.jsx)(ey,{role:"menuitemradio","aria-checked":o,...i,ref:t,"data-state":e_(o),onSelect:(0,r.composeEventHandlers)(i.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});eA.displayName=ek;var eT="MenuItemIndicator",[ej,eP]=G(eT,{checked:!1}),eN=t.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...i}=e,a=eP(eT,r);return(0,v.jsx)(m.Presence,{present:n||eU(a.checked)||!0===a.checked,children:(0,v.jsx)(o.Primitive.span,{...i,ref:t,"data-state":e_(a.checked)})})});eN.displayName=eT;var eR=t.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,v.jsx)(o.Primitive.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});eR.displayName="MenuSeparator";var eM=t.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,i=K(r);return(0,v.jsx)(h.Arrow,{...i,...n,ref:t})});eM.displayName="MenuArrow";var eD="MenuSub",[eI,eL]=G(eD),eO=e=>{let{__scopeMenu:r,children:n,open:i=!1,onOpenChange:a}=e,o=Z(eD,r),s=K(r),[l,u]=t.useState(null),[c,d]=t.useState(null),p=(0,g.useCallbackRef)(a);return t.useEffect(()=>(!1===o.open&&p(!1),()=>p(!1)),[o.open,p]),(0,v.jsx)(h.Root,{...s,children:(0,v.jsx)(Y,{scope:r,open:i,onOpenChange:p,content:c,onContentChange:d,children:(0,v.jsx)(eI,{scope:r,contentId:(0,f.useId)(),triggerId:(0,f.useId)(),trigger:l,onTriggerChange:u,children:n})})})};eO.displayName=eD;var eF="MenuSubTrigger",eB=t.forwardRef((e,i)=>{let a=Z(eF,e.__scopeMenu),o=Q(eF,e.__scopeMenu),s=eL(eF,e.__scopeMenu),l=el(eF,e.__scopeMenu),u=t.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=l,f={__scopeMenu:e.__scopeMenu},h=t.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return t.useEffect(()=>h,[h]),t.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),d(null)}},[c,d]),(0,v.jsx)(et,{asChild:!0,...f,children:(0,v.jsx)(ex,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":s.contentId,"data-state":e$(a.open),...e,ref:(0,n.composeRefs)(i,s.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),a.open||a.onOpenChange(!0))},onPointerMove:(0,r.composeEventHandlers)(e.onPointerMove,eH(t=>{l.onItemEnter(t),!t.defaultPrevented&&(e.disabled||a.open||u.current||(l.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{a.onOpenChange(!0),h()},100)))})),onPointerLeave:(0,r.composeEventHandlers)(e.onPointerLeave,eH(e=>{h();let t=a.content?.getBoundingClientRect();if(t){let r=a.content?.dataset.side,n="right"===r,i=t[n?"left":"right"],o=t[n?"right":"left"];l.onPointerGraceIntentChange({area:[{x:e.clientX+(n?-5:5),y:e.clientY},{x:i,y:t.top},{x:o,y:t.top},{x:o,y:t.bottom},{x:i,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(e),e.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,t=>{let r=""!==l.searchRef.current;e.disabled||r&&" "===t.key||z[o.dir].includes(t.key)&&(a.onOpenChange(!0),a.content?.focus(),t.preventDefault())})})})});eB.displayName=eF;var eV="MenuSubContent",ez=t.forwardRef((e,i)=>{let a=ei(eo,e.__scopeMenu),{forceMount:o=a.forceMount,...s}=e,l=Z(eo,e.__scopeMenu),u=Q(eo,e.__scopeMenu),c=eL(eV,e.__scopeMenu),d=t.useRef(null),f=(0,n.useComposedRefs)(i,d);return(0,v.jsx)(_.Provider,{scope:e.__scopeMenu,children:(0,v.jsx)(m.Presence,{present:o||l.open,children:(0,v.jsx)(_.Slot,{scope:e.__scopeMenu,children:(0,v.jsx)(eh,{id:c.contentId,"aria-labelledby":c.triggerId,...s,ref:f,align:"start",side:"rtl"===u.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{u.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,r.composeEventHandlers)(e.onFocusOutside,e=>{e.target!==c.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:(0,r.composeEventHandlers)(e.onEscapeKeyDown,e=>{u.onClose(),e.preventDefault()}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),r=$[u.dir].includes(e.ke
16y);t&&r&&(l.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});function e$(e){return e?"open":"closed"}function eU(e){return"indeterminate"===e}function e_(e){return eU(e)?"indeterminate":e?"checked":"unchecked"}function eH(e){return t=>"mouse"===t.pointerType?e(t):void 0}ez.displayName=eV;var eW="DropdownMenu",[eG,eq]=(0,i.createContextScope)(eW,[q]),eK=q(),[eX,eY]=eG(eW),eZ=e=>{let{__scopeDropdownMenu:r,children:n,dir:i,open:o,defaultOpen:s,onOpenChange:l,modal:u=!0}=e,c=eK(r),d=t.useRef(null),[h,p]=(0,a.useControllableState)({prop:o,defaultProp:s??!1,onChange:l,caller:eW});return(0,v.jsx)(eX,{scope:r,triggerId:(0,f.useId)(),triggerRef:d,contentId:(0,f.useId)(),open:h,onOpenChange:p,onOpenToggle:t.useCallback(()=>p(e=>!e),[p]),modal:u,children:(0,v.jsx)(ee,{...c,open:h,onOpenChange:p,dir:i,modal:u,children:n})})};eZ.displayName=eW;var eJ="DropdownMenuTrigger",eQ=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:i,disabled:a=!1,...s}=e,l=eY(eJ,i),u=eK(i);return(0,v.jsx)(et,{asChild:!0,...u,children:(0,v.jsx)(o.Primitive.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...s,ref:(0,n.composeRefs)(t,l.triggerRef),onPointerDown:(0,r.composeEventHandlers)(e.onPointerDown,e=>{!a&&0===e.button&&!1===e.ctrlKey&&(l.onOpenToggle(),l.open||e.preventDefault())}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{!a&&(["Enter"," "].includes(e.key)&&l.onOpenToggle(),"ArrowDown"===e.key&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});eQ.displayName=eJ;var e0=e=>{let{__scopeDropdownMenu:t,...r}=e,n=eK(t);return(0,v.jsx)(ea,{...n,...r})};e0.displayName="DropdownMenuPortal";var e1="DropdownMenuContent",e2=t.forwardRef((e,n)=>{let{__scopeDropdownMenu:i,...a}=e,o=eY(e1,i),s=eK(i),l=t.useRef(!1);return(0,v.jsx)(eu,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...a,ref:n,onCloseAutoFocus:(0,r.composeEventHandlers)(e.onCloseAutoFocus,e=>{l.current||o.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onInteractOutside:(0,r.composeEventHandlers)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;(!o.modal||n)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});e2.displayName=e1;var e5=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eK(r);return(0,v.jsx)(ep,{...i,...n,ref:t})});e5.displayName="DropdownMenuGroup";var e4=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eK(r);return(0,v.jsx)(em,{...i,...n,ref:t})});e4.displayName="DropdownMenuLabel";var e3=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eK(r);return(0,v.jsx)(ey,{...i,...n,ref:t})});e3.displayName="DropdownMenuItem";var e6=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eK(r);return(0,v.jsx)(eb,{...i,...n,ref:t})});e6.displayName="DropdownMenuCheckboxItem";var e7=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eK(r);return(0,v.jsx)(eE,{...i,...n,ref:t})});e7.displayName="DropdownMenuRadioGroup";var e9=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eK(r);return(0,v.jsx)(eA,{...i,...n,ref:t})});e9.displayName="DropdownMenuRadioItem";var e8=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eK(r);return(0,v.jsx)(eN,{...i,...n,ref:t})});e8.displayName="DropdownMenuItemIndicator";var te=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eK(r);return(0,v.jsx)(eR,{...i,...n,ref:t})});te.displayName="DropdownMenuSeparator",t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eK(r);return(0,v.jsx)(eM,{...i,...n,ref:t})}).displayName="DropdownMenuArrow";var tt=t.forwardRef((e,t)=>
16{let{__scopeDropdownMenu:r,...n}=e,i=eK(r);return(0,v.jsx)(eB,{...i,...n,ref:t})});tt.displayName="DropdownMenuSubTrigger";var tr=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eK(r);return(0,v.jsx)(ez,{...i,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});tr.displayName="DropdownMenuSubContent",e.s(["CheckboxItem",0,e6,"Content",0,e2,"Group",0,e5,"Item",0,e3,"ItemIndicator",0,e8,"Label",0,e4,"Portal",0,e0,"RadioGroup",0,e7,"RadioItem",0,e9,"Root",0,eZ,"Separator",0,te,"Sub",0,e=>{let{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:i,defaultOpen:o}=e,s=eK(t),[l,u]=(0,a.useControllableState)({prop:n,defaultProp:o??!1,onChange:i,caller:"DropdownMenuSub"});return(0,v.jsx)(eO,{...s,open:l,onOpenChange:u,children:r})},"SubContent",0,tr,"SubTrigger",0,tt,"Trigger",0,eQ],40666)},11439,63059,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(57688),i=e.i(78917),a=e.i(31278),o=e.i(92270),s=e.i(28282),l=e.i(15423),u=e.i(99676),c=e.i(19455),d=e.i(76639),f=e.i(40666),h=e.i(43531),p=e.i(75254);let m=(0,p.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,m],63059);let g=(0,p.default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var v=e.i(75157);let y=f.Root,x=f.Trigger;f.Group,f.Portal,f.Sub,f.RadioGroup,r.forwardRef(({className:e,inset:r,children:n,...i},a)=>(0,t.jsxs)(f.SubTrigger,{ref:a,className:(0,v.cn)("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",e),...i,children:[n,(0,t.jsx)(m,{className:"ml-auto"})]})).displayName=f.SubTrigger.displayName,r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(f.SubContent,{ref:n,className:(0,v.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})).displayName=f.SubContent.displayName;let b=r.forwardRef(({className:e,sideOffset:r=4,...n},i)=>(0,t.jsx)(f.Portal,{children:(0,t.jsx)(f.Content,{ref:i,sideOffset:r,className:(0,v.cn)("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));b.displayName=f.Content.displayName;let w=r.forwardRef(({className:e,inset:r,...n},i)=>(0,t.jsx)(f.Item,{ref:i,className:(0,v.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",r&&"pl-8",e),...n}));w.displayName=f.Item.displayName,r.forwardRef(({className:e,children:r,checked:n,...i},a)=>(0,t.jsxs)(f.CheckboxItem,{ref:a,className:(0,v.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...i,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(f.ItemIndicator,{children:(0,t.jsx)(h.Check,{className:"h-4 w-4"})})}),r]})).displayName=f.CheckboxItem.displayName,r.forwardRef(({className:e,children:r,...n},i)=>(0,t.jsxs)(f.RadioItem,{ref:i,className:(0,v.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(f.ItemIndicator,{children:(0,t.jsx)(g,{className:"h-2 w-2 fill-current"})})}),r]})).displayName=f.RadioItem.displayName,r.forwardRef(({className:e,inset:r,...n},i)=>(0,t.jsx)(f.Label,{ref:i,className:(0,v.cn)("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",e),...n})).displayName=f.Label.displayName;let C=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(f.Separator,{ref:n,className:(0,v.cn)("-mx-1 my-1 h-px bg-muted",e),...r}));function S({isMiniApp:e}){var r;let{profileData:i}=(0,l.useProfile)(),{disconnect:a,accounts:c}=(0,s.useUpProvider)(),d=i?.name||((r=c?.[0])?`${r.slice(0,6)}…${r.slice(-4)}`:"Profile"),f=(0,t.jsxs)("span",{className:"glass inline-flex h-10 min-h-[44px] items-center gap-2 rounded-full px-2 pr-3",children:[(0,t.jsxs)(u.Avatar,{className:"h-7 w-7",children:[(0,t.jsx)(u.AvatarImage,{src:i?.profileImages?.[0]?.url||"",alt:i?.name||"Universal Profile"}),(0,t.jsx)(u.AvatarFallback,{className:"bg-transparent p-0",children:(0,t.jsx)(n.default,{src:"/up-logo.png",alt:"UP!",width:28,height:28,className:"h-full w-full object-cover"})})]}),(0,t.jsx)("span",{className:"hidden max-w-[120px] truncate text-sm font-medium text-foreground sm:inline",children:d})]});return e?f:(0,t.jsxs)(y,{children:[(0,t.jsx)(x,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:"rounded-full focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:f})}),(0,t.jsxs)(b,{align:"end",className:"min-w-[160px]",children:[(0,t.jsx)(w,{disabled:!0,className:"opacity-100",children:(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:d})}),(0,t.jsx)(C,{}),(0,t.jsxs)(w,{onSelect:()=>a(),children:[(0,t.jsx)(o.LogOut,{className:"h-4 w-4"}),"Disconnect"]})]})]})}function E({open:e,onOpenChange:o}){let{connect:l,hasExtension:u,isConnecting:f,connectError:h,walletConnected:p}=(0,s.useUpProvider)();return(0,r.useEffect)(()=>{p&&o(!1)},[p,o]),(0,t.jsx)(d.Dialog,{open:e,onOpenChange:o,children:(0,t.jsxs)(d.DialogContent,{className:"max-w-sm rounded-2xl",children:[(0,t.jsxs)(d.DialogHeader,{className:"items-center text-center sm:text-center",children:[(0,t.jsx)(n.default,{src:"/up-logo.png",alt:"Universal Profile",width:48,height:48,className:"mb-1 h-12 w-12 rounded-full"}),(0,t.jsx)(d.DialogTitle,{children:"Connect your Universal Profile"}),(0,t.jsx)(d.DialogDescription,{children:u?"Approve the connection in the Universal Profile extension to continue."
16:"You'll need the Universal Profile Browser Extension to connect on this device."})]}),(0,t.jsxs)("div",{className:"mt-2 flex flex-col gap-2",children:[u?(0,t.jsx)(c.Button,{type:"button",variant:"gradient",size:"pill",onClick:()=>l(),disabled:f,children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Loader2,{className:"h-4 w-4 animate-spin"}),"Connecting…"]}):"Connect Universal Profile"}):(0,t.jsx)(c.Button,{asChild:!0,variant:"gradient",size:"pill",children:(0,t.jsxs)("a",{href:"https://chromewebstore.google.com/detail/universal-profiles/abpickdkkbnbcoepogfhkhennhfhehfn",target:"_blank",rel:"noopener noreferrer",children:["Install the extension",(0,t.jsx)(i.ExternalLink,{className:"h-4 w-4"})]})}),(0,t.jsx)(c.Button,{asChild:!0,variant:"ghost-outline",size:"pill",children:(0,t.jsxs)("a",{href:"https://universaleverything.io",target:"_blank",rel:"noopener noreferrer",children:["Open in Universal Everything",(0,t.jsx)(i.ExternalLink,{className:"h-4 w-4"})]})}),h&&(0,t.jsx)("p",{className:"mt-1 text-center text-sm text-destructive",children:h})]})]})})}C.displayName=f.Separator.displayName,e.s(["default",0,function(){let{walletConnected:e,isMiniApp:n,isLoading:i}=(0,s.useUpProvider)(),[a,o]=(0,r.useState)(!1);return e?(0,t.jsx)(S,{isMiniApp:n}):n||i?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.Button,{type:"button",variant:"glass",size:"pill",onClick:()=>o(!0),className:"text-sm font-medium",children:"Connect"}),(0,t.jsx)(E,{open:a,onOpenChange:o})]})}],11439)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.