PageSourceSearch

https://acb.com/_next/static/chunks/2mnbb_v7kuw95.js

js acb.com collected 2026-10-02 05:10:23 UTC 57,408 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="6aae753b-98a6-6170-272b-5b8ccb681cd8")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,394367,849261,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(614221),i=e.i(752951);let a=(0,r.forwardRef)(function({id:e,placeholder:r,type:n="text",value:i,required:a,disabled:o,isError:l,prependSlot:s,appendSlot:u,onChange:c,...f},d){return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"_inputContainer_191vs_1","data-error":l,"data-disabled":o,children:[s&&(0,t.jsx)("div",{className:"_inputContainer__prependSlot_191vs_21",children:s}),(0,t.jsx)("input",{id:e,ref:d,className:"_input_191vs_1",placeholder:r,type:n,defaultValue:i,onChange:c,required:a,disabled:o,"data-error":l,"data-has-prepend-slot":!!s,"data-has-append-slot":!!u,...f}),u&&(0,t.jsx)("div",{className:"_inputContainer__appendSlot_191vs_28",children:u})]})})});e.s(["I",0,a],849261);var o=e.i(221542);let l=(0,r.forwardRef)(function({id:e,label:r,className:l,required:s=!1,disabled:u,errorMessage:c,prependSlot:f,appendSlot:d,...p},m){return(0,t.jsxs)("div",{className:(0,n.c)("_field_2t869_1",l),children:[r&&(0,t.jsx)(i.L,{htmlFor:e,required:s,children:r}),(0,t.jsx)(a,{id:e,ref:m,required:s,disabled:u,isError:!!c,prependSlot:f,appendSlot:d,...p}),c&&(0,t.jsx)(o.T,{variant:"caption",className:"_errorMessage_2t869_7",children:c})]})});e.s(["F",0,l],394367)},752951,e=>{"use strict";var t=e.i(843476),r=e.i(614221),n=e.i(271645);e.i(50902);var i=e.i(511064),a=e.i(794965),o=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{let a=(0,i.c)(`Primitive.${r}`),o=n.forwardRef((e,n)=>{let{asChild:i,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(i?a:r,{...o,ref:n})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),l=n.forwardRef((e,r)=>(0,t.jsx)(o.label,{...e,ref:r,onMouseDown:t=>{var r;t.target.closest("button, input, select, textarea")||(null==(r=e.onMouseDown)||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));l.displayName="Label";let s={required:"_required_1vo13_1"},u=(0,n.forwardRef)(function({children:e,htmlFor:n,required:i,className:o,...u},c){return(0,t.jsx)(a.H,{as:"p",variant:"subhead",asChild:!0,children:(0,t.jsxs)(l,{ref:c,htmlFor:n,className:(0,r.c)(s.label,o),...u,children:[e," ",i&&(0,t.jsx)("span",{className:s.required,children:"*"})]})})});e.s(["L",0,u])},854160,e=>{"use strict";var t=e.i(271645),r=e.i(50902),n=e.i(848764),i=e.i(843476),a=e.i(690591),o=e.i(120494),l=e.i(822948),s=e.i(246167);let u=["top","right","bottom","left"],c=Math.min,f=Math.max,d=Math.round,p=Math.floor,m=e=>({x:e,y:e}),h={left:"right",right:"left",bottom:"top",top:"bottom"},g={start:"end",end:"start"};function y(e,t){return"function"==typeof e?e(t):e}function v(e){return e.split("-")[0]}function w(e){return e.split("-")[1]}function b(e){return"x"===e?"y":"x"}function x(e){return"y"===e?"height":"width"}let E=new Set(["top","bottom"]);function C(e){return E.has(v(e))?"y":"x"}function S(e){return e.replace(/start|end/g,e=>g[e])}let R=["left","right"],A=["right","left"],T=["top","bottom"],O=["bottom","top"];function N(e){return e.replace(/left|right|bottom|top/g,e=>h[e])}function _(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function k(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 P(e,t,r){let n,{reference:i,floating:a}=e,o=C(t),l=b(C(t)),s=x(l),u=v(t),c="y"===o,f=i.x+i.width/2-a.width/2,d=i.y+i.height/2-a.height/2,p=i[s]/2-a[s]/2;switch(u){case"top":n={x:f,y:i.y-a.height};break;case"bottom":n={x:f,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:d};break;case"left":n={x:i.x-a.width,y:d};break;default:n={x:i.x,y:i.y}}switch(w(t)){case"start":n[l]-=p*(r&&c?-1:1);break;case"end":n[l]+=p*(r&&c?-1:1)}return n}let D=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}
2=r,l=a.filter(Boolean),s=await (null==o.isRTL?void 0:o.isRTL(t)),u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=P(u,n,s),d=n,p={},m=0;for(let r=0;r<l.length;r++){let{name:a,fn:h}=l[r],{x:g,y:y,data:v,reset:w}=await h({x:c,y:f,initialPlacement:n,placement:d,strategy:i,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});c=g??c,f=y??f,p={...p,[a]:{...p[a],...v}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(u=!0===w.rects?await o.getElementRects({reference:e,floating:t,strategy:i}):w.rects),{x:c,y:f}=P(u,d,s)),r=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:p}};async function L(e,t){var r;void 0===t&&(t={});let{x:n,y:i,platform:a,rects:o,elements:l,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=y(t,e),m=_(p),h=l[d?"floating"===f?"reference":"floating":f],g=k(await a.getClippingRect({element:null==(r=await (null==a.isElement?void 0:a.isElement(h)))||r?h:h.contextElement||await (null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:s})),v="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(l.floating)),b=await (null==a.isElement?void 0:a.isElement(w))&&await (null==a.getScale?void 0:a.getScale(w))||{x:1,y:1},x=k(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:w,strategy:s}):v);return{top:(g.top-x.top+m.top)/b.y,bottom:(x.bottom-g.bottom+m.bottom)/b.y,left:(g.left-x.left+m.left)/b.x,right:(x.right-g.right+m.right)/b.x}}function j(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function V(e){return u.some(t=>e[t]>=0)}let F=new Set(["left","top"]);async function M(e,t){let{placement:r,platform:n,elements:i}=e,a=await (null==n.isRTL?void 0:n.isRTL(i.floating)),o=v(r),l=w(r),s="y"===C(r),u=F.has(o)?-1:1,c=a&&s?-1:1,f=y(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*c,y:d*u}:{x:d*u,y:p*c}}function $(){return"u">typeof window}function W(e){return B(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function H(e){var t;return null==(t=(B(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function B(e){return!!$()&&(e instanceof Node||e instanceof I(e).Node)}function U(e){return!!$()&&(e instanceof Element||e instanceof I(e).Element)}function q(e){return!!$()&&(e instanceof HTMLElement||e instanceof I(e).HTMLElement)}function z(e){return!(!$()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof I(e).ShadowRoot)}let Y=new Set(["inline","contents"]);function X(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=ea(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Y.has(i)}let G=new Set(["table","td","th"]),J=[":popover-open",":modal"];function Z(e){return J.some(t=>{try{return e.matches(t)}catch{return!1}})}let K=["transform","translate","scale","rotate","perspective"],Q=["transform","translate","scale","rotate","perspective","filter"],ee=["paint","layout","strict","content"];function et(e){let t=er(),r=U(e)?ea(e):e;return K.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||Q.some(e=>(r.willChange||"").includes(e))||ee.some(e=>(r.contain||"").includes(e))}function er(){return!(typeof CSS>"u")&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let en=new Set(["html","body","#document"]);function ei(e){return en.has(W(e))}function ea(e){return I(e).getComputedStyle(e)}function eo(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function el(e){if("html"===W(e))return e;let t=e.assignedSlot||e.parentNode||z(e)&&e.host||H(e);return z(t)?t.host:t}function es(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=function e(t){let r=el(t);return ei(r)?t.ownerDocument?t.ownerDocument.body:t.body:q(r)&&X(r)?r:e(r)}(e),a=i===(null==(n=e.ownerDocument)?void 0:n.body),o=I(i);if(a){let e=eu(o);
2return t.concat(o,o.visualViewport||[],X(i)?i:[],e&&r?es(e):[])}return t.concat(i,es(i,[],r))}function eu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ec(e){let t=ea(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=q(e),a=i?e.offsetWidth:r,o=i?e.offsetHeight:n,l=d(r)!==a||d(n)!==o;return l&&(r=a,n=o),{width:r,height:n,$:l}}function ef(e){return U(e)?e:e.contextElement}function ed(e){let t=ef(e);if(!q(t))return m(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:a}=ec(t),o=(a?d(r.width):r.width)/n,l=(a?d(r.height):r.height)/i;return o&&Number.isFinite(o)||(o=1),l&&Number.isFinite(l)||(l=1),{x:o,y:l}}let ep=m(0);function em(e){let t=I(e);return er()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ep}function eh(e,t,r,n){var i;void 0===t&&(t=!1),void 0===r&&(r=!1);let a=e.getBoundingClientRect(),o=ef(e),l=m(1);t&&(n?U(n)&&(l=ed(n)):l=ed(e));let s=(void 0===(i=r)&&(i=!1),n&&(!i||n===I(o))&&i)?em(o):m(0),u=(a.left+s.x)/l.x,c=(a.top+s.y)/l.y,f=a.width/l.x,d=a.height/l.y;if(o){let e=I(o),t=n&&U(n)?I(n):n,r=e,i=eu(r);for(;i&&n&&t!==r;){let e=ed(i),t=i.getBoundingClientRect(),n=ea(i),a=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;u*=e.x,c*=e.y,f*=e.x,d*=e.y,u+=a,c+=o,i=eu(r=I(i))}}return k({width:f,height:d,x:u,y:c})}function eg(e,t){let r=eo(e).scrollLeft;return t?t.left+r:eh(H(e)).left+r}function ey(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-eg(e,r),y:r.top+t.scrollTop}}let ev=new Set(["absolute","fixed"]);function ew(e,t,r){var n;let i;if("viewport"===t)i=function(e,t){let r=I(e),n=H(e),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,l=0,s=0;if(i){a=i.width,o=i.height;let e=er();(!e||e&&"fixed"===t)&&(l=i.offsetLeft,s=i.offsetTop)}let u=eg(n);if(u<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,o=Math.abs(n.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else u<=25&&(a+=u);return{width:a,height:o,x:l,y:s}}(e,r);else if("document"===t){let t,r,a,o,l,s,u;n=H(e),t=H(n),r=eo(n),a=n.ownerDocument.body,o=f(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=f(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),s=-r.scrollLeft+eg(n),u=-r.scrollTop,"rtl"===ea(a).direction&&(s+=f(t.clientWidth,a.clientWidth)-o),i={width:o,height:l,x:s,y:u}}else if(U(t)){let e,n,a,o,l,s;n=(e=eh(t,!0,"fixed"===r)).top+t.clientTop,a=e.left+t.clientLeft,o=q(t)?ed(t):m(1),l=t.clientWidth*o.x,s=t.clientHeight*o.y,i={width:l,height:s,x:a*o.x,y:n*o.y}}else{let r=em(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return k(i)}function eb(e){return"static"===ea(e).position}function ex(e,t){if(!q(e)||"fixed"===ea(e).position)return null;if(t)return t(e);let r=e.offsetParent;return H(e)===r&&(r=r.ownerDocument.body),r}function eE(e,t){var r;let n=I(e);if(Z(e))return n;if(!q(e)){let t=el(e);for(;t&&!ei(t);){if(U(t)&&!eb(t))return t;t=el(t)}return n}let i=ex(e,t);for(;i&&(r=i,G.has(W(r)))&&eb(i);)i=ex(i,t);return i&&ei(i)&&eb(i)&&!et(i)?n:i||function(e){let t=el(e);for(;q(t)&&!ei(t);){if(et(t))return t;if(Z(t))break;t=el(t)}return null}(e)||n}let eC=async function(e){let t=this.getOffsetParent||eE,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=q(t),i=H(t),a="fixed"===r,o=eh(e,!0,a,t),l={scrollLeft:0,scrollTop:0},s=m(0);if(n||!n&&!a)if(("body"!==W(t)||X(i))&&(l=eo(t)),n){let e=eh(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=eg(i));a&&!n&&i&&(s.x=eg(i));let u=!i||n||a?m(0):ey(i,l);return{x:o.left+l.scrollLeft-s.x-u.x,y:o.top+l.scrollTop-s.y-u.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}}},eS={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,a="fixed"===i,o=H(n),l=!!t&&Z(t.floating);if(n===o||l&&a)return r;let s={scrollLeft:0,scrollTop:0},u=m(1),c=m(0),f=q(n);if((f||!f&&!a)&&(("body"!==W(n)||X(o))&&(s=eo(n)),q(n))){let e=eh(n);u=ed(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}let d=!o||f||a?m(0):ey(o,s);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-s.scrollLeft*u.x+c.x+d.x,y:r.y*u.y-s.scrollTop*u.y+c.y+d.y}},getDocumentElement:H,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[..."clippingAncestors"===r?Z(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=es(e,[],!1).filter(e=>U(e)&&"body"!==W(e)),i=null,a="fixed"===ea(e).position,o=a?el(e):e;for(;U(o)&&!ei(o);){let t=ea(o),r=et(o);r||"fixed"!==t.position||(i=null),(a?!r&&!i:!r&&"static"===t.position&&!!i&&ev.has(i.position)||X(o)&&!r&&function e(t,r){let n=el(t);return!(n===r||!U(n)||ei(n))&&("fixed"===ea(n).position||e(n,r))}(e,o))?n=n.filter(e=>e!==o):i=t,o=el(o)}return t.set(e,n),n}(t,this._c):[].concat(r),n],o=a[0],l=a.reduce((e,r)=>{let n=ew(t,r,i);return e.top=f(n.top,e.top),e.right=c(n.right,e.right),e.bottom=c(n.bottom,e.bottom),e.left=f(n.left,e.left),e},ew(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:eE,getElementRects:eC,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=ec(e);return{width:t,height:r}},getScale:ed,isElement:U,isRTL:function(e){return"rtl"===ea(e).direction}};function eR(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:n,placement:i,rects:a,platform:o,elements:l,middlewareData:s}=t,{element:u,padding:d=0}=y(e,t)||{};if(null==u)return{};let p=_(d),m={x:r,y:n},h=b(C(i)),g=x(h),v=await o.getDimensions(u),E="y"===h,S=E?"clientHeight":"clientWidth",R=a.reference[g]+a.reference[h]-m[h]-a.floating[g],A=m[h]-a.reference[h],T=await (null==o.getOffsetParent?void 0:o.getOffsetParent(u)),O=T?T[S]:0;O&&await (null==o.isElement?void 0:o.isElement(T))||(O=l.floating[S]||a.floating[g]);let N=O/2-v[g]/2-1,k=c(p[E?"top":"left"],N),P=c(p[E?"bottom":"right"],N),D=O-v[g]-P,L=O/2-v[g]/2+(R/2-A/2),j=f(k,c(L,D)),V=!s.arrow&&null!=w(i)&&L!==j&&a.reference[g]/2-(L<k?k:P)-v[g]/2<0,F=V?L<k?L-k:L-D:0;return{[h]:m[h]+F,data:{[h]:j,centerOffset:L-j-F,...V&&{alignmentOffset:F}},reset:V}}});var eT="u">typeof document?t.useLayoutEffect:function(){};function eO(e,t){let r,n,i;if(e===t)return!0;
2if(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(!eO(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)&&!eO(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function eN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function e_(e,t){let r=eN(e);return Math.round(t*r)/r}function ek(e){let r=t.useRef(e);return eT(()=>{r.current=e}),r}var eP=Symbol("radix.slottable");function eD(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===eP}var eL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var a,o;let l,s,u,c=(o=a=`Primitive.${r}`,(l=t.forwardRef((e,r)=>{let{children:i,...a}=e;if(t.isValidElement(i)){var o,l,s;let e,u,c=(u=(e=null==(l=Object.getOwnPropertyDescriptor((o=i).props,"ref"))?void 0:l.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(u=(e=null==(s=Object.getOwnPropertyDescriptor(o,"ref"))?void 0:s.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref,f=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)=>{let t=a(...e);return i(...e),t}: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&&(f.ref=r?(0,n.c)(r,c):c),t.cloneElement(i,f)}return t.Children.count(i)>1?t.Children.only(null):null})).displayName=`${o}.SlotClone`,s=l,(u=t.forwardRef((e,r)=>{let{children:n,...a}=e,o=t.Children.toArray(n),l=o.find(eD);if(l){let e=l.props.children,n=o.map(r=>r===l?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:r);return(0,i.jsx)(s,{...a,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(s,{...a,ref:r,children:n})})).displayName=`${a}.Slot`,u),f=t.forwardRef((e,t)=>{let{asChild:n,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(n?c:r,{...a,ref:t})});return f.displayName=`Primitive.${r}`,{...e,[r]:f}},{}),ej=t.forwardRef((e,t)=>{let{children:r,width:n=10,height:a=5,...o}=e;return(0,i.jsx)(eL.svg,{...o,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,i.jsx)("polygon",{points:"0,0 30,0 15,10"})})});ej.displayName="Arrow";var eV=Symbol("radix.slottable");function eF(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===eV}var eM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var a,o;let l,s,u,c=(o=a=`Primitive.${r}`,(l=t.forwardRef((e,r)=>{let{children:i,...a}=e;if(t.isValidElement(i)){var o,l,s;let e,u,c=(u=(e=null==(l=Object.getOwnPropertyDescriptor((o=i).props,"ref"))?void 0:l.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(u=(e=null==(s=Object.getOwnPropertyDescriptor(o,"ref"))?void 0:s.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref,f=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)=>{let t=a(...e);return i(...e),t}: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&&(f.ref=r?(0,n.c)(r,c):c),t.cloneElement(i,f)}return t.Children.count(i)>1?t.Children.only(null):null})).displayName=`${o}.SlotClone`,s=l,(u=t.forwardRef((e,r)=>{let{children:n,...a}=e,o=t.Children.toArray(n),l=o.find(eF);if(l){let e=l.props.children,n=o.map(r=>r===l?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:r);return(0,i.jsx)(s,{...a,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(s,{...a,ref:r,children:n})})).displayName=`${a}.Slot`,u),f=t.forwardRef((e,t)=>
2{let{asChild:n,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(n?c:r,{...a,ref:t})});return f.displayName=`Primitive.${r}`,{...e,[r]:f}},{}),e$="Popper",[eW,eI]=(0,a.c)(e$),[eH,eB]=eW(e$),eU=e=>{let{__scopePopper:r,children:n}=e,[a,o]=t.useState(null);return(0,i.jsx)(eH,{scope:r,anchor:a,onAnchorChange:o,children:n})};eU.displayName=e$;var eq="PopperAnchor",ez=t.forwardRef((e,r)=>{let{__scopePopper:a,virtualRef:o,...l}=e,s=eB(eq,a),u=t.useRef(null),c=(0,n.u)(r,u),f=t.useRef(null);return t.useEffect(()=>{let e=f.current;f.current=(null==o?void 0:o.current)||u.current,e!==f.current&&s.onAnchorChange(f.current)}),o?null:(0,i.jsx)(eM.div,{...l,ref:c})});ez.displayName=eq;var eY="PopperContent",[eX,eG]=eW(eY),eJ=t.forwardRef((e,a)=>{var u,d,m,h,g,E,_,k,P,$,W,I,B,U,q,z,Y,X,G;let{__scopePopper:J,side:Z="bottom",sideOffset:K=0,align:Q="center",alignOffset:ee=0,arrowPadding:et=0,avoidCollisions:er=!0,collisionBoundary:en=[],collisionPadding:ei=0,sticky:ea="partial",hideWhenDetached:eo=!1,updatePositionStrategy:el="optimized",onPlaced:eu,...ec}=e,ed=eB(eY,J),[ep,em]=t.useState(null),eg=(0,n.u)(a,e=>em(e)),[ey,ev]=t.useState(null),ew=(0,s.u)(ey),eb=(null==ew?void 0:ew.width)??0,ex=(null==ew?void 0:ew.height)??0,eE="number"==typeof ei?ei:{top:0,right:0,bottom:0,left:0,...ei},eC=Array.isArray(en)?en:[en],eP=eC.length>0,eD={padding:eE,boundary:eC.filter(e0),altBoundary:eP},{refs:eL,floatingStyles:ej,placement:eV,isPositioned:eF,middlewareData:e$}=function(e){void 0===e&&(e={});let{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o,elements:{reference:l,floating:s}={},transform:u=!0,whileElementsMounted:c,open:f}=e,[d,p]=t.useState({x:0,y:0,strategy:i,placement:n,middlewareData:{},isPositioned:!1}),[m,h]=t.useState(a);eO(m,a)||h(a);let[g,y]=t.useState(null),[v,w]=t.useState(null),b=t.useCallback(e=>{e!==S.current&&(S.current=e,y(e))},[]),x=t.useCallback(e=>{e!==R.current&&(R.current=e,w(e))},[]),E=l||g,C=s||v,S=t.useRef(null),R=t.useRef(null),A=t.useRef(d),T=null!=c,O=ek(c),N=ek(o),_=ek(f),k=t.useCallback(()=>{var e,t;let a,o,l;if(!S.current||!R.current)return;let s={placement:n,strategy:i,middleware:m};N.current&&(s.platform=N.current),(e=S.current,t=R.current,a=new Map,l={...(o={platform:eS,...s}).platform,_c:a},D(e,t,{...o,platform:l})).then(e=>{let t={...e,isPositioned:!1!==_.current};P.current&&!eO(A.current,t)&&(A.current=t,r.r.flushSync(()=>{p(t)}))})},[m,n,i,N,_]);eT(()=>{!1===f&&A.current.isPositioned&&(A.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[f]);let P=t.useRef(!1);eT(()=>(P.current=!0,()=>{P.current=!1}),[]),eT(()=>{if(E&&(S.current=E),C&&(R.current=C),E&&C){if(O.current)return O.current(E,C,k);k()}},[E,C,k,O,T]);let L=t.useMemo(()=>({reference:S,floating:R,setReference:b,setFloating:x}),[b,x]),j=t.useMemo(()=>({reference:E,floating:C}),[E,C]),V=t.useMemo(()=>{let e={position:i,left:0,top:0};if(!j.floating)return e;let t=e_(j.floating,d.x),r=e_(j.floating,d.y);return u?{...e,transform:"translate("+t+"px, "+r+"px)",...eN(j.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:t,top:r}},[i,u,j.floating,d.x,d.y]);return t.useMemo(()=>({...d,update:k,refs:L,elements:j,floatingStyles:V}),[d,k,L,j,V])}({strategy:"fixed",placement:Z+("center"!==Q?"-"+Q:""),whileElementsMounted:(...e)=>(function(e,t,r,n){void 0===n&&(n={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,u=ef(e),d=i||a?[...u?es(u):[],...es(t)]:[];d.forEach(e=>{i&&e.addEventListener("scroll",r,{passive:!0}),a&&e.addEventListener("resize",r)});let m=u&&l?function(e,t){let r=null,n,i=H(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function o(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),a();let u=e.getBoundingClientRect(),{left:d,top:m,width:h,height:g}=u;if(l||t(),!h||!g)return;let y={rootMargin:-p(m)+"px "+-p(i.clientWidth-(d+h))+"px "+-p(i.clientHeight-(m+g))+"px "+-p(d)+"px",threshold:f(0,c(1,s))||1},v=!0;function w(t){let r=t[0].intersectionRatio;if(r!==s){if(!v)return o();r?o(!1,r):n=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==r||eR(u,e.getBoundingClientRect())||o(),v=!1}try{r=new IntersectionObserver(w,{...y,root:i.ownerDocument})}catch{r=new IntersectionObserver(w,y)}r.observe(e)}(!0),a}(u,r):null,h=-1,g=null;o&&(g=new ResizeObserver(e=>{let[n]=e;n&&n.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),r()}),u&&!s&&g.observe(u),g.observe(t));let y,v=s?eh(e):null;return s&&function t(){let n=eh(e);v&&!eR(v,n)&&r(),v=n,y=requestAnimationFrame(t)}(),r(),()=>{var e;
2d.forEach(e=>{i&&e.removeEventListener("scroll",r),a&&e.removeEventListener("resize",r)}),null==m||m(),null==(e=g)||e.disconnect(),g=null,s&&cancelAnimationFrame(y)}})(...e,{animationFrame:"always"===el}),elements:{reference:ed.anchor},middleware:[{...{name:"offset",options:k=_={mainAxis:K+ex,alignmentAxis:ee},async fn(e){var t,r;let{x:n,y:i,placement:a,middlewareData:o}=e,l=await M(e,k);return a===(null==(t=o.offset)?void 0:t.placement)&&null!=(r=o.arrow)&&r.alignmentOffset?{}:{x:n+l.x,y:i+l.y,data:{...l,placement:a}}}},options:[_,void 0]},er&&{...{name:"shift",options:W=$={mainAxis:!0,crossAxis:!1,limiter:"partial"===ea?{...(P=void 0,{options:P={},fn(e){let{x:t,y:r,placement:n,rects:i,middlewareData:a}=e,{offset:o=0,mainAxis:l=!0,crossAxis:s=!0}=y(P,e),u={x:t,y:r},c=C(n),f=b(c),d=u[f],p=u[c],m=y(o,e),h="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+h.mainAxis,r=i.reference[f]+i.reference[e]-h.mainAxis;d<t?d=t:d>r&&(d=r)}if(s){var g,w;let e="y"===f?"width":"height",t=F.has(v(n)),r=i.reference[c]-i.floating[e]+(t&&(null==(g=a.offset)?void 0:g[c])||0)+(t?0:h.crossAxis),o=i.reference[c]+i.reference[e]+(t?0:(null==(w=a.offset)?void 0:w[c])||0)-(t?h.crossAxis:0);p<r?p=r:p>o&&(p=o)}return{[f]:d,[c]:p}}}),options:[void 0,void 0]}:void 0,...eD},async fn(e){let{x:t,y:r,placement:n}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:o={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=y(W,e),s={x:t,y:r},u=await L(e,l),d=C(v(n)),p=b(d),m=s[p],h=s[d];
2if(i){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",r=m+u[e],n=m-u[t];m=f(r,c(m,n))}if(a){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",r=h+u[e],n=h-u[t];h=f(r,c(h,n))}let g=o.fn({...e,[p]:m,[d]:h});return{...g,data:{x:g.x-t,y:g.y-r,enabled:{[p]:i,[d]:a}}}}},options:[$,void 0]},er&&{...{name:"flip",options:B=I={...eD},async fn(e){var t,r,n,i,a,o,l,s;let u,c,f,{placement:d,middlewareData:p,rects:m,initialPlacement:h,platform:g,elements:E}=e,{mainAxis:_=!0,crossAxis:k=!0,fallbackPlacements:P,fallbackStrategy:D="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:V=!0,...F}=y(B,e);if(null!=(t=p.arrow)&&t.alignmentOffset)return{};let M=v(d),$=C(h),W=v(h)===h,I=await (null==g.isRTL?void 0:g.isRTL(E.floating)),H=P||(W||!V?[N(h)]:(u=N(h),[S(h),u,S(u)])),U="none"!==j;!P&&U&&H.push(...(c=w(h),f=function(e,t,r){switch(e){case"top":case"bottom":return r?t?A:R:t?R:A;case"left":case"right":return t?T:O;default:return[]}}(v(h),"start"===j,I),c&&(f=f.map(e=>e+"-"+c),V&&(f=f.concat(f.map(S)))),f));let q=[h,...H],z=await L(e,F),Y=[],X=(null==(r=p.flip)?void 0:r.overflows)||[];if(_&&Y.push(z[M]),k){let e,t,r,n,i=(o=d,l=m,void 0===(s=I)&&(s=!1),e=w(o),r=x(t=b(C(o))),n="x"===t?e===(s?"end":"start")?"right":"left":"start"===e?"bottom":"top",l.reference[r]>l.floating[r]&&(n=N(n)),[n,N(n)]);Y.push(z[i[0]],z[i[1]])}if(X=[...X,{placement:d,overflows:Y}],!Y.every(e=>e<=0)){let e=((null==(n=p.flip)?void 0:n.index)||0)+1,t=q[e];if(t&&("alignment"!==k||$===C(t)||X.every(e=>C(e.placement)!==$||e.overflows[0]>0)))return{data:{index:e,overflows:X},reset:{placement:t}};let r=null==(i=X.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!r)switch(D){case"bestFit":{let e=null==(a=X.filter(e=>{if(U){let t=C(e.placement);return t===$||"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=h}if(d!==r)return{reset:{placement:r}}}return{}}},options:[I,void 0]},{...{name:"size",options:q=U={...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 n,i,{placement:a,rects:o,platform:l,elements:s}=e,{apply:u=()=>{},...d}=y(q,e),p=await L(e,d),m=v(a),h=w(a),g="y"===C(a),{width:b,height:x}=o.floating;"top"===m||"bottom"===m?(n=m,i=h===(await (null==l.isRTL?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(i=m,n="end"===h?"top":"bottom");let E=x-p.top-p.bottom,S=b-p.left-p.right,R=c(x-p[n],E),A=c(b-p[i],S),T=!e.middlewareData.shift,O=R,N=A;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(N=S),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(O=E),T&&!h){let e=f(p.left,0),t=f(p.right,0),r=f(p.top,0),n=f(p.bottom,0);g?N=b-2*(0!==e||0!==t?e+t:f(p.left,p.right)):O=x-2*(0!==r||0!==n?r+n:f(p.top,p.bottom))}await u({...e,availableWidth:N,availableHeight:O});let _=await l.getDimensions(s.floating);return b!==_.width||x!==_.height?{reset:{rects:!0}}:{}}},options:[U,void 0]},ey&&{...{name:"arrow",options:Y=z={element:ey,padding:et},fn(e){let{element:t,padding:r}="function"==typeof Y?Y(e):Y;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:[z,void 0]},e1({arrowWidth:eb,arrowHeight:ex}),eo&&{...{name:"hide",options:G=X={strategy:"referenceHidden",...eD},async fn(e){let{rects:t}=e,{strategy:r="referenceHidden",...n}=y(G,e);switch(r){case"referenceHidden":{let r=j(await L(e,{...n,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:V(r)}}}case"escaped":{let r=j(await L(e,{...n,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:V(r)}}}default:return{}}}},options:[X,void 0]}]}),[eW,eI]=e2(eV),eH=(0,o.u)(eu);(0,l.u)(()=>{eF&&(null==eH||eH())},[eF,eH]);let eU=null==(u=e$.arrow)?void 0:u.x,eq=null==(d=e$.arrow)?void 0:d.y,ez=(null==(m=e$.arrow)?void 0:m.centerOffset)!==0,[eG,eJ]=t.useState();return(0,l.u)(()=>{ep&&eJ(window.getComputedStyle(ep).zIndex)},[ep]),(0,i.jsx)("div",{ref:eL.setFloating,"data-radix-popper-content-wrapper":"",style:{...ej,transform:eF?ej.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eG,"--radix-popper-transform-origin":[null==(h=e$.transformOrigin)?void 0:h.x,null==(g=e$.transformOrigin)?void 0:g.y].join(" "),...(null==(E=e$.hide)?void 0:E.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,i.jsx)(eX,{scope:J,placedSide:eW,onArrowChange:ev,arrowX:eU,arrowY:eq,shouldHideArrow:ez,children:(0,i.jsx)(eM.div,{"data-side":eW,"data-align":eI,...ec,ref:eg,style:{...ec.style,animation:eF?void 0:"none"}})})})});eJ.displayName=eY;var eZ="PopperArrow",eK={top:"bottom",right:"left",bottom:"top",left:"r
2ight"},eQ=t.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,a=eG(eZ,r),o=eK[a.placedSide];return(0,i.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,i.jsx)(ej,{...n,ref:t,style:{...n.style,display:"block"}})})});function e0(e){return null!==e}eQ.displayName=eZ;var e1=e=>({name:"transformOrigin",options:e,fn(t){var r,n,i;let{placement:a,rects:o,middlewareData:l}=t,s=(null==(r=l.arrow)?void 0:r.centerOffset)!==0,u=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[f,d]=e2(a),p={start:"0%",center:"50%",end:"100%"}[d],m=((null==(n=l.arrow)?void 0:n.x)??0)+u/2,h=((null==(i=l.arrow)?void 0:i.y)??0)+c/2,g="",y="";return"bottom"===f?(g=s?p:`${m}px`,y=`${-c}px`):"top"===f?(g=s?p:`${m}px`,y=`${o.floating.height+c}px`):"right"===f?(g=`${-c}px`,y=s?p:`${h}px`):"left"===f&&(g=`${o.floating.width+c}px`,y=s?p:`${h}px`),{data:{x:g,y:y}}}});function e2(e){let[t,r="center"]=e.split("-");return[t,r]}e.s(["A",0,eQ,"C",0,eJ,"R",0,eU,"a",0,ez,"c",0,eI])},953084,e=>{"use strict";var t=e.i(271645),r=e.i(822948),n=t[" useId ".trim().toString()]||(()=>{}),i=0;e.s(["u",0,function(e){let[a,o]=t.useState(n());return(0,r.u)(()=>{o(e=>e??String(i++))},[e]),e||(a?`radix-${a}`:"")}])},716026,e=>{"use strict";var t=e.i(271645);e.i(843476);var r=t.createContext(void 0);e.s(["u",0,function(e){let n=t.useContext(r);return e||n||"ltr"}])},981140,e=>{"use strict";"u">typeof window&&window.document&&window.document.createElement,e.s(["composeEventHandlers",0,function(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}])},30030,e=>{"use strict";var t=e.i(271645),r=e.i(843476);e.s(["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),l=i.length;i=[...i,a];let s=n=>{let{scope:i,children:a,...s}=n,u=i?.[e]?.[l]||o,c=t.useMemo(()=>s,Object.values(s));return(0,r.jsx)(u.Provider,{value:c,children:a})};return s.displayName=n+"Provider",[s,function(r,i){let s=i?.[e]?.[l]||o,u=t.useContext(s);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)]}])},248425,820783,e=>{"use strict";var t=e.i(271645);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.i(174080),e.s(["composeRefs",0,n,"useComposedRefs",0,function(...e){return t.useCallback(n(...e),e)}],820783);var i=e.i(843476),a=Symbol("radix.slottable");function o(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===a}var l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var a,l;let s,u,c,f=(l=a=`Primitive.${r}`,(s=t.forwardRef((e,r)=>{let{children:i,...a}=e;if(t.isValidElement(i)){var o;let e,l,s=(o=i,(l=(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(l=(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)=>{let t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}
2:"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,s):s),t.cloneElement(i,u)}return t.Children.count(i)>1?t.Children.only(null):null})).displayName=`${l}.SlotClone`,u=s,(c=t.forwardRef((e,r)=>{let{children:n,...a}=e,l=t.Children.toArray(n),s=l.find(o);if(s){let e=s.props.children,n=l.map(r=>r!==s?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(u,{...a,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(u,{...a,ref:r,children:n})})).displayName=`${a}.Slot`,c),d=t.forwardRef((e,t)=>{let{asChild:n,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(n?f:r,{...a,ref:t})});return d.displayName=`Primitive.${r}`,{...e,[r]:d}},{});e.s(["Primitive",0,l],248425)},30207,586318,e=>{"use strict";var t=e.i(271645);e.s(["useCallbackRef",0,function(e){let r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}],30207),e.i(843476);var r=t.createContext(void 0);e.s(["useDirection",0,function(e){let n=t.useContext(r);return e||n||"ltr"}],586318)},934620,e=>{"use strict";var t=e.i(271645),r=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["useLayoutEffect",0,r])},617805,211671,e=>{"use strict";var t=e.i(271645);e.s(["ERROR_REVALIDATE_EVENT",0,3,"FOCUS_EVENT",0,0,"MUTATE_EVENT",0,2,"RECONNECT_EVENT",0,1],211671);var r=Object.prototype.hasOwnProperty;let n=new WeakMap,i=()=>{},a=i(),o=Object,l=e=>e===a,s=e=>"function"==typeof e,u=(e,t)=>({...e,...t}),c=e=>s(e.then),f={},d={},p="undefined",m=typeof window!=p,h=typeof document!=p,g=m&&"Deno"in window,y=(e,t)=>{let r=n.get(e);return[()=>!l(t)&&e.get(t)||f,n=>{if(!l(t)){let i=e.get(t);t in d||(d[t]=i),r[5](t,u(i,n),i||f)}},r[6],()=>!l(t)&&t in d?d[t]:!l(t)&&e.get(t)||f]},v=!0,[w,b]=m&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[i,i],x={initFocus:e=>(h&&document.addEventListener("visibilitychange",e),w("focus",e),()=>{h&&document.removeEventListener("visibilitychange",e),b("focus",e)}),initReconnect:e=>{let t=()=>{v=!0,e()},r=()=>{v=!1};return w("online",t),w("offline",r),()=>{b("online",t),b("offline",r)}}},E=!t.default.useId,C=!m||g,S=C?t.useEffect:t.useLayoutEffect,R="u">typeof navigator&&navigator.connection,A=!C&&R&&(["slow-2g","2g"].includes(R.effectiveType)||R.saveData),T=new WeakMap,O=(e,t)=>e===`[object ${t}]`,N=0,_=e=>{let t,r,n=typeof e,i=o.prototype.toString.call(e),a=O(i,"Date"),s=O(i,"RegExp"),u=O(i,"Object");if(o(e)!==e||a||s)t=a?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=T.get(e))return t;if(t=++N+"~",T.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=_(e[r])+",";T.set(e,t)}if(u){t="#";let n=o.keys(e).sort();for(;!l(r=n.pop());)l(e[r])||(t+=r+":"+_(e[r])+",");T.set(e,t)}}return t},k=e=>{if(s(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?_(e):"",t]},P=0,D=()=>++P;async function L(...e){let[t,r,i,o]=e,f=u({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{}),d=f.populateCache,p=f.rollbackOnError,m=f.optimisticData,h=f.throwOnError;if(s(r)){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(g))}return g(r);async function g(r){let o,[u]=k(r);if(!u)return;let[g,v]=y(t,u),[w,b,x,E]=n.get(t),C=()=>{let e=w[u];return(s(f.revalidate)?f.revalidate(g().data,r):!1!==f.revalidate)&&(delete x[u],delete E[u],e&&e[0])?e[0](2).then(()=>g().data):g().data};if(e.length<3)return C();let S=i,R=!1,A=D();b[u]=[A,0];let T=!l(m),O=g(),N=O.data,_=O._c,P=l(_)?N:_;if(T&&v({data:m=s(m)?m(P,N):m,_c:P}),s(S))try{S=S(P)}catch(e){o=e,R=!0}if(S&&c(S)){let e;if(S=await S.catch(e=>{o=e,R=!0}),A!==b[u][0]){if(R)throw o;return S}R&&T&&(e=o,"function"==typeof p?p(e):!1!==p)&&(d=!0,v({data:P,_c:a}))}if(d&&!R&&(s(d)?v({data:d(S,P),error:a,_c:a}):v({data:S,error:a,_c:a})),b[u][1]=D(),Promise.resolve(C()).then(()=>{v({_c:a})}),R){if(h)throw o;return}return S}}let j=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},V=(e,t)=>{if(!n.has(e)){let r=u(x,t),o=Object.create(null),l=L.bind(a,e),s=i,c=Object.create(null),f=(e,t)=>{let r=c[e]||[];return c[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},d=(t,r,n)=>{e.set(t,r);let i=c[t];if(i)for(let e of i)e(r,n)},p=()=>
2{if(!n.has(e)&&(n.set(e,[o,Object.create(null),Object.create(null),Object.create(null),l,d,f]),!C)){let t=r.initFocus(setTimeout.bind(a,j.bind(a,o,0))),i=r.initReconnect(setTimeout.bind(a,j.bind(a,o,1)));s=()=>{t&&t(),i&&i(),n.delete(e)}}};return p(),[e,l,p,s]}return[e,n.get(e)[4]]},[F,M]=V(new Map),$=u({onLoadingSlow:i,onSuccess:i,onError:i,onErrorRetry:(e,t,r,n,i)=>{let a=r.errorRetryCount,o=i.retryCount,s=~~((Math.random()+.5)*(1<<(o<8?o:8)))*r.errorRetryInterval;(l(a)||!(o>a))&&setTimeout(n,s,i)},onDiscarded:i,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:A?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:A?5e3:3e3,compare:function e(t,n){var i,a;if(t===n)return!0;if(t&&n&&(i=t.constructor)===n.constructor){if(i===Date)return t.getTime()===n.getTime();if(i===RegExp)return t.toString()===n.toString();if(i===Array){if((a=t.length)===n.length)for(;a--&&e(t[a],n[a]););return -1===a}if(!i||"object"==typeof t){for(i in a=0,t)if(r.call(t,i)&&++a&&!r.call(n,i)||!(i in n)||!e(t[i],n[i]))return!1;return Object.keys(n).length===a}}return t!=t&&n!=n},isPaused:()=>!1,cache:F,mutate:M,fallback:{}},{isOnline:()=>v,isVisible:()=>{let e=h&&document.visibilityState;return l(e)||"hidden"!==e}}),W=(e,t)=>{let r=u(e,t);if(t){let{use:n,fallback:i}=e,{use:a,fallback:o}=t;n&&a&&(r.use=n.concat(a)),i&&o&&(r.fallback=u(i,o))}return r},I=(0,t.createContext)({});e.s(["A",0,i,"B",0,c,"I",0,C,"O",0,o,"S",0,I,"U",0,a,"a",0,s,"b",0,n,"c",0,F,"d",0,$,"e",0,l,"f",0,W,"g",0,e=>{let{value:r}=e,n=(0,t.useContext)(I),i=s(r),o=(0,t.useMemo)(()=>i?r(n):r,[i,n,r]),l=(0,t.useMemo)(()=>i?o:W(n,o),[i,n,o]),c=o&&o.provider,f=(0,t.useRef)(a);c&&!f.current&&(f.current=V(c(l.cache||F),o));let d=f.current;return d&&(l.cache=d[0],l.mutate=d[1]),S(()=>{if(d)return d[2]&&d[2](),d[3]},[]),(0,t.createElement)(I.Provider,u(e,{value:l}))},"i",0,m,"j",0,M,"m",0,u,"n",0,L,"o",0,D,"r",0,E,"s",0,k,"t",0,e=>m&&typeof window.requestAnimationFrame!=p?window.requestAnimationFrame(e):setTimeout(e,1),"u",0,S,"z",0,y],617805)},275198,891915,587370,973074,e=>{"use strict";var t=e.i(617805);e.s(["UNDEFINED",()=>t.U],275198),e.s(["OBJECT",()=>t.O],891915),e.s(["SWRConfig",()=>t.g],587370),e.s(["defaultConfig",()=>t.d],973074)},271235,646192,e=>{"use strict";var t=e.i(617805);e.i(211671);let r="$inf$";e.s(["INFINITE_PREFIX",0,r],646192);var n=e.i(271645);let i=t.i&&window.__SWR_DEVTOOLS_USE__,a=i?window.__SWR_DEVTOOLS_USE__:[],o=e=>(0,t.a)(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],l=()=>{let e=(0,n.useContext)(t.S);return(0,n.useMemo)(()=>(0,t.m)(t.d,e),[e])},s=a.concat(e=>(n,i,a)=>{let o=i&&((...e)=>{let[a]=(0,t.s)(n),[,,,o]=t.b.get(t.c);if(a.startsWith(r))return i(...e);let l=o[a];return(0,t.e)(l)?i(...e):(delete o[a],l)});return e(n,o,a)});i&&(window.__SWR_DEVTOOLS_REACT__=n.default),e.s(["subscribeCallback",0,(e,t,r)=>{let n=t[e]||(t[e]=[]);return n.push(r),()=>{let e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}},"useSWRConfig",0,l,"withArgs",0,e=>function(...r){let n=l(),[i,a,u]=o(r),c=(0,t.f)(n,u),f=e,{use:d}=c,p=(d||[]).concat(s);for(let e=p.length;e--;)f=p[e](f);return f(i,a||c.fetcher||null,c)},"withMiddleware",0,(e,t)=>(...r)=>{let[n,i,a]=o(r),l=(a.use||[]).concat(t);return e(n,i,{...a,use:l})}],271235)},283599,9275,400332,438071,727530,930816,820103,e=>{"use strict";var t=e.i(271645),r=e.i(802239),n=e.i(275198),i=e.i(891915),a=e.i(587370),o=e.i(973074),l=e.i(271235),s=e.i(617805);e.s(["SWRGlobalState",()=>s.b],9275);var s=s,u=s;e.s(["serialize",()=>u.s],400332);var u=s,c=s;e.s(["createCacheHelper",()=>c.z],438071);var c=s,f=s;e.s(["isUndefined",()=>f.e],727530);var f=s,d=s,p=s,m=s,h=s,g=s;e.s(["isFunction",()=>g.a],930816);var g=s,y=e.i(211671),y=y,v=s,w=s;e.s(["useIsomorphicLayoutEffect",()=>w.u],820103);var w=s,b=s,x=s,E=s;let C=()=>{},S=C(),R=(new WeakMap,t.default.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}})),A={dedupe:!0},T=Promise.resolve(n.UNDEFINED),O=()=>m.A;i.OBJECT.defineProperty(a.SWRConfig,"defaultValue",{value:o.defaultConfig});let N=(0,l.withArgs)((e,i,a)=>{let{cache:o,compare:m,suspense:C,fallbackData:S,revalidateOnMount:N,revalidateIfStale:_,refreshInterval:k,refreshWhenHidden:P,refreshWhenOffline:D,keepPreviousData:L,strictServerPrefetchWarning:j}=a,[V,F,M,$]=s.b.get(o),[W,I]=(0,u.s)(e),H=(0,t.useRef)(!1),B=(0,t.useRef)(!1),U=(0,t.useRef)(W),q=(0,t.useRef)(i),z=(0,t.useRef)(a),Y=()=>z.current.isVisible()&&z.current.isOnline(),[X,G,J,Z]=(0,c.z)(o,W),K=(0,t.useRef)({}).current,Q=(0,f.e)(S)?(0,f.e)(a.fallback)?n.UNDEFINED:a.fallback[W]:S,ee=(e,t)=>
2{for(let r in K)if("data"===r){if(!m(e[r],t[r])&&(!(0,f.e)(e[r])||!m(eu,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},et=!H.current,er=(0,t.useMemo)(()=>{let e=X(),t=Z(),r=e=>{let t=(0,E.m)(e);return(delete t._k,(()=>{if(!W||!i||z.current.isPaused())return!1;if(et&&!(0,f.e)(N))return N;let e=(0,f.e)(Q)?t.data:Q;return(0,f.e)(e)||_})())?{isValidating:!0,isLoading:!0,...t}:t},n=r(e),a=e===t?n:r(t),o=n;return[()=>{let e=r(X());return ee(e,o)?(o.data=e.data,o.isLoading=e.isLoading,o.isValidating=e.isValidating,o.error=e.error,o):(o=e,e)},()=>a]},[o,W]),en=(0,r.useSyncExternalStore)((0,t.useCallback)(e=>J(W,(t,r)=>{ee(r,t)||e()}),[o,W]),er[0],er[1]),ei=V[W]&&V[W].length>0,ea=en.data,eo=(0,f.e)(ea)?Q&&(0,d.B)(Q)?R(Q):Q:ea,el=en.error,es=(0,t.useRef)(eo),eu=L?(0,f.e)(ea)?(0,f.e)(es.current)?eo:es.current:ea:eo,ec=W&&(0,f.e)(eo),ef=(0,t.useRef)(null);p.I||(0,r.useSyncExternalStore)(O,()=>(ef.current=!1,ef),()=>(ef.current=!0,ef));let ed=ef.current;j&&ed&&!C&&ec&&console.warn(`Missing pre-initiated data for serialized key "${W}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let ep=!(!W||!i||z.current.isPaused())&&(!ei||!!(0,f.e)(el))&&(et&&!(0,f.e)(N)?N:C?!(0,f.e)(eo)&&_:(0,f.e)(eo)||_),em=et&&ep,eh=(0,f.e)(en.isValidating)?em:en.isValidating,eg=(0,f.e)(en.isLoading)?em:en.isLoading,ey=(0,t.useCallback)(async e=>{let t,r,i=q.current;if(!W||!i||B.current||z.current.isPaused())return!1;let o=!0,l=e||{},s=!M[W]||!l.dedupe,u=()=>x.r?!B.current&&W===U.current&&H.current:W===U.current,c={isValidating:!1,isLoading:!1},d=()=>{G(c)},p=()=>{let e=M[W];e&&e[1]===r&&delete M[W]},v={isValidating:!0};(0,f.e)(X().data)&&(v.isLoading=!0);try{if(s&&(G(v),a.loadingTimeout&&(0,f.e)(X().data)&&setTimeout(()=>{o&&u()&&z.current.onLoadingSlow(W,a)},a.loadingTimeout),M[W]=[i(I),(0,h.o)()]),[t,r]=M[W],t=await t,s&&setTimeout(p,a.dedupingInterval),!M[W]||M[W][1]!==r)return s&&u()&&z.current.onDiscarded(W),!1;c.error=n.UNDEFINED;let e=F[W];if(!(0,f.e)(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return d(),s&&u()&&z.current.onDiscarded(W),!1;let l=X().data;c.data=m(l,t)?l:t,s&&u()&&z.current.onSuccess(t,W,a)}catch(r){p();let e=z.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(c.error=r,s&&u()&&(e.onError(r,W,e),(!0===t||(0,g.a)(t)&&t(r))&&(!z.current.revalidateOnFocus||!z.current.revalidateOnReconnect||Y())&&e.onErrorRetry(r,W,e,e=>{let t=V[W];t&&t[0]&&t[0](y.ERROR_REVALIDATE_EVENT,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0})))}return o=!1,d(),!0},[W,o]),ev=(0,t.useCallback)((...e)=>(0,v.n)(o,U.current,...e),[]);if((0,w.u)(()=>{q.current=i,z.current=a,(0,f.e)(ea)||(es.current=ea)}),(0,w.u)(()=>{if(!W)return;let e=ey.bind(n.UNDEFINED,A),t=0;z.current.revalidateOnFocus&&(t=Date.now()+z.current.focusThrottleInterval);let r=(0,l.subscribeCallback)(W,V,(r,n={})=>{if(r==y.FOCUS_EVENT){let r=Date.now();z.current.revalidateOnFocus&&r>t&&Y()&&(t=r+z.current.focusThrottleInterval,e())}else if(r==y.RECONNECT_EVENT)z.current.revalidateOnReconnect&&Y()&&e();else if(r==y.MUTATE_EVENT)return ey();else if(r==y.ERROR_REVALIDATE_EVENT)return ey(n)});return B.current=!1,U.current=W,H.current=!0,G({_k:I}),ep&&!M[W]&&((0,f.e)(eo)||p.I?e():(0,b.t)(e)),()=>{B.current=!0,r()}},[W]),(0,w.u)(()=>{let e;function t(){let t=(0,g.a)(k)?k(X().data):k;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!X().error&&(P||z.current.isVisible())&&(D||z.current.isOnline())?ey(A).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[k,P,D,W]),(0,t.useDebugValue)(eu),C){if(!x.r&&p.I&&ec)throw Error("Fallback data is required when using Suspense in SSR.");ec&&(q.current=i,z.current=a,B.current=!1);let e=$[W];if(R(!(0,f.e)(e)&&ec?ev(e):T),!(0,f.e)(el)&&ec)throw el;let t=ec?ey(A):T;!(0,f.e)(eu)&&ec&&(t.status="fulfilled",t.value=!0),R(t)}return{mutate:ev,get data(){return K.data=!0,eu},get error(){return K.error=!0,el},get isValidating(){return K.isValidating=!0,eh},get isLoading(){return K.isLoading=!0,eg}}});e.s(["default",0,N],283599)},755838,(e,t,r)=>{"use strict";var n=e.r(271645),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,l=n.useLayoutEffect,s=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 l(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]),s(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},802239,(e,t,r)=>{"use strict";
2t.exports=e.r(755838)},53467,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(283599),i=e.i(671364),a=e.i(389163),o=e.i(974771),l=e.i(837297),s=e.i(557951),u=e.i(174569),c=e.i(706954);let f=e=>e?"accepted":"declined";var d=e.i(12318);let p={defaults:{successTitle:"Elige tu equipo favorito",successMessage:"Selecciona el equipo que más te representa."}};e.s(["default",0,function({isOpen:e,onClose:m,onStepChange:h,closeOnSuccess:g=!1}){let{onContinueWithEmail:y,onLogin:v,onRegister:w,onVerifyCode:b,onResendCode:x,onNicknameValidate:E,onSendChangePasswordCode:C,onVerifyChangePasswordCode:S,onSaveFavoriteTeam:R,getFavoriteTeamConfig:A,handleModalClose:T}=function(){let{saveSession:e}=(0,s.useAuth)(),{link:t}=(0,u.useSuperManagerAuth)(),{setNeedsTeamSelection:n,pendingSocialSession:i,setPendingSocialSession:d}=(0,c.useSocialAuth)(),p=(0,r.useRef)(null),m=(0,r.useRef)(null),h=async e=>{try{if((await (0,a.checkUsernameAvailable)({params:{username:e},config:o.sharedServicesConfigAuth})).available)return{nextStep:"registerPassword"};return{nextStep:"login"}}catch{return{globalError:"Error al verificar el nombre de usuario."}}},g=async e=>{try{if((await (0,a.sendChangePasswordCode)({params:{username:e},config:o.sharedServicesConfigAuth})).sent)return{resendCooldownSeconds:59};return{globalError:"Error al enviar el código a la dirección de correo electrónico."}}catch{return{globalError:"Error al enviar el código a la dirección de correo electrónico."}}},y=async(e,t,r)=>{try{if((await (0,a.confirmChangePassword)({params:{username:e,code:t,password:r},config:o.sharedServicesConfigAuth})).confirmed)return{nextStep:"resetPasswordSuccess",successTitle:"¡Contraseña actualizada!",successMessage:"Has actualizado tu contraseña correctamente."};return{globalError:"Error al confirmar el cambio de contraseña."}}catch{return{globalError:"Error al confirmar el cambio de contraseña."}}},v=async(e,t)=>{try{let r=await (0,a.signIn)({params:{username:e,password:t},config:o.sharedServicesConfigAuth});if(n(!await (0,l.hasFavoriteClub)(r.accessToken)),r.nicknameGenerated)return d(r),{nextStep:"registerBasic",identityLabel:r.user.email};return p.current=r,{nextStep:"success",successTitle:`\xa1Hola ${r.user.nickname}!`,successMessage:"Has accedido correctamente a tu cuenta."}}catch(r){if(r instanceof a.UserNotConfirmedError){m.current={email:e,password:t,firstName:"",lastName:""};try{await (0,a.resendConfirmationCode)({params:{username:e},config:o.sharedServicesConfigAuth})}catch{}return{nextStep:"otpVerify"}}return{globalError:"Error al iniciar sesión."}}},w=async e=>{try{if(!(await (0,a.checkNicknameAvailable)({params:{nickname:e},config:o.sharedServicesConfigAuth})).available)return"El nickname no está disponible.";return}catch{return"Error al validar el nickname."}},b=async t=>{let r=i.current;if("basic"===t.stage&&r){let n=t.nickname.trim();try{await (0,a.updateAttributes)({params:{accessToken:r.accessToken,attributes:{nickname:n,newsletter:t.marketingConsent,thirdparty:t.partnersConsent}},config:o.sharedServicesConfigAuth});let e=t.firstName.trim(),i=t.lastName.trim();(e||i)&&await (0,a.updateMe)({params:{firstName:e,lastName:i},config:(0,o.buildAuthenticatedCmsClientConfig)(r.accessToken)})}catch(e){if(e instanceof a.UpdateAttributesNicknameTakenError)return{fieldErrors:{nickname:"El nickname no está disponible."}};return{globalError:"Error al guardar tu perfil."}}let i={...r,nicknameGenerated:!1,user:{...r.user,nickname:n}};return d(i),e(i),{successTitle:`\xa1Bienvenido ${n}!`,successMessage:"Has completado tu perfil correctamente."}}let l="password"===t.stage&&t.password?t.password:"";try{if((await (0,a.signUp)({params:{username:t.email,password:l,newsletter:f(t.marketingConsent),thirdparty:f(t.partnersConsent),nickname:t.nickname},config:o.sharedServicesConfigAuth})).userConfirmed)return n(!0),{nextStep:"success",successTitle:"¡Bienvenido!",successMessage:"Has creado tu cuenta correctamente."};return m.current={email:t.email,password:l,firstName:t.firstName.trim(),lastName:t.lastName.trim()},{nextStep:"otpVerify"}}catch{return{globalError:"Error al crear la cuenta."}}},x=async(e,t)=>{try{if((await (0,a.confirmSignUp)({params:{username:e,code:t},config:o.sharedServicesConfigAuth})).confirmed&&m.current){let e=m.current,t=await (0,a.signIn)({params:{username:e.email,password:e.password},config:o.sharedServicesConfigAuth});if(m.current=null,p.current=t,e.firstName||e.lastName)try{await (0,a.updateMe)({params:{firstName:e.firstName,lastName:e.lastName},config:(0,o.buildAuthenticatedCmsClientConfig)(t.accessToken)})}catch{}return n(!await (0,l.hasFavoriteClub)(t.accessToken)),{nextStep:"success",successTitle:`\xa1Bienvenido ${t.user.nickname}!`,successMessage:"Has creado tu cuenta correctamente."}}return{globalError:"El código de verificación no es válido."}}catch{return{globalError:"Error al verificar el código."}}},E=async e=>{try{return await (0,a.resendConfirmationCode)({params:{username:e},config:o.sharedServicesConfigAuth}),{resendCooldownSeconds:59}}catch{return{globalError:"Error al reenviar el código."}}},C=(0,r.useCallback)(async()=>{let e=p.current?.accessToken??i.current?.accessToken;return e?(0,o.buildAuthenticatedCmsClientConfig)(e):(0,o.getAuthenticatedCmsClientConfig)()},[i]);
2return{onContinueWithEmail:h,onLogin:v,onRegister:b,onVerifyCode:x,onResendCode:E,onNicknameValidate:w,onSendChangePasswordCode:g,onVerifyChangePasswordCode:y,onSaveFavoriteTeam:async({teamValue:e})=>{let t=Number(e);if(!Number.isFinite(t))return null;try{let e=await (0,a.updateMe)({params:{mainClub:t},config:await C()});return{nickname:p.current?.user.nickname??i.current?.user.nickname??e?.acbidNickname??""}}catch{return null}},getFavoriteTeamConfig:C,handleModalClose:(0,r.useCallback)(r=>{r();let i=p.current;i&&(e(i),i.code&&t(i.code),p.current=null),n(!1)},[e,t,n])}}(),{socialProviders:O,pendingSocialSession:N,setPendingSocialSession:_,needsTeamSelection:k,registrationPrefill:P,setRegistrationPrefill:D}=(0,c.useSocialAuth)(),{saveSession:L,isAuthenticated:j}=(0,s.useAuth)(),{link:V}=(0,u.useSuperManagerAuth)(),{mutate:F}=(0,d.useMe)(),M=j&&k&&!P,$=P?"registerBasic":M?"success":void 0,{data:W}=(0,n.default)(k?["favoriteTeamClubs"]:null,async()=>(0,a.getClubs)({params:{active:!0},config:await A()}),{revalidateOnFocus:!1}),I=(0,r.useMemo)(()=>{if(k&&W)return W.clubs.map(e=>({value:String(e.id),label:e.fullName})).sort((e,t)=>e.label.localeCompare(t.label))},[k,W]),H=(0,r.useCallback)(async({teamValue:e})=>{let r=await R({teamValue:e});if(await F(),!r)return{title:"No hemos podido guardar tu equipo",message:"Inténtalo de nuevo en unos segundos."};let n=W?.clubs.find(t=>String(t.id)===e);return{title:r.nickname?`\xa1Gracias ${r.nickname}!`:"¡Gracias!",message:n?.favoriteClubSelectionMessage??"",description:n?(0,t.jsxs)(t.Fragment,{children:["Personalizaremos la experiencia en base a tu equipo preferido, el"," ",(0,t.jsx)("strong",{children:n.fullName})]}):void 0}},[R,F,W]),B=(0,r.useCallback)(()=>{T(m);let e=N.current;e&&(L(e),e.code&&V(e.code),_(null)),D(null)},[T,m,N,L,_,D,V]),U=(0,r.useCallback)(e=>{h?.(e),g&&"success"===e&&B()},[h,g,B]);return(0,t.jsx)(i.L,{isOpen:e,onClose:B,initialStep:$,initialIdentityLabel:P?.email,initialValues:P?{firstName:P.firstName,lastName:P.lastName}:void 0,labels:M?p:void 0,socialProviders:O.length>0?O:void 0,onStepChange:U,onContinueWithEmail:e=>y(e.email),onLogin:e=>v(e.email,e.password),onNicknameValidate:e=>E(e),onRegister:w,onVerifyCode:e=>b(e.email,e.code),onResendCode:e=>x(e.email),onSendChangePasswordCode:e=>C(e.email),onVerifyChangePasswordCode:e=>S(e.email,e.code,e.password),favoriteTeamOptions:I,favoriteTeamSelectLabel:I?"Elige tu equipo favorito":void 0,onSaveFavoriteTeam:I?H:void 0},P?"social-registration":"default")}],53467)},12318,e=>{"use strict";var t=e.i(271645),r=e.i(283599),n=e.i(389163),i=e.i(974771),a=e.i(557951);e.s(["useMe",0,function(){let{isAuthenticated:e,user:o,logout:l}=(0,a.useAuth)(),{data:s,isLoading:u,error:c,mutate:f}=(0,r.default)(e&&o?["me",o.sub]:null,async()=>{let e=await (0,i.fetchValidAccessToken)();return e?{me:await (0,n.getMe)({config:(0,i.buildAuthenticatedCmsClientConfig)(e)}),tokenUnavailable:!1}:{me:null,tokenUnavailable:!0}},{revalidateOnFocus:!1,shouldRetryOnError:!1});return(0,t.useEffect)(()=>{if(!c)return;let e=c instanceof Error?c.message:String(c);(e.includes("401")||e.includes("403"))&&l()},[c,l]),{me:s?.me??null,isLoading:u,error:c,isTokenUnavailable:s?.tokenUnavailable??!1,mutate:f}}])}]);
3
4//# debugId=6aae753b-98a6-6170-272b-5b8ccb681cd8

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.