1var Li=Object.defineProperty;var br=e=>{throw TypeError(e)};var $i=(e,t,n)=>t in e?Li(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var K=(e,t,n)=>$i(e,typeof t!="symbol"?t+"":t,n),on=(e,t,n)=>t.has(e)||br("Cannot "+n);var E=(e,t,n)=>(on(e,t,"read from private field"),n?n.call(e):t.get(e)),H=(e,t,n)=>t.has(e)?br("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),D=(e,t,n,r)=>(on(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),$=(e,t,n)=>(on(e,t,"access private method"),n);import{r as c,j as d,B as Wn,R as V}from"./chunk-EVOBXE3Y-CO-xLp7Q.js";import{S as ao,q as yr,t as fe,v as Tt,r as Pt,b as Fi,w as vn,x as xr,y as Wi,f as Bi,z as Ui,A as wr,n as Ut,i as Cr,B as zi,l as co,u as ze}from"./I18nProvider-m4vxxDd4.js";import{r as Bn,R as lo}from"./index-Dmze7AMq.js";var Z,T,ht,Q,Le,Ye,Ae,de,mt,Ze,Je,$e,Fe,Pe,et,I,ut,bn,yn,xn,wn,Cn,En,Rn,uo,so,Hi=(so=class extends ao{constructor(t,n){super();H(this,I);H(this,Z);H(this,T);H(this,ht);H(this,Q);H(this,Le);H(this,Ye);H(this,Ae);H(this,de);H(this,mt);H(this,Ze);H(this,Je);H(this,$e);H(this,Fe);H(this,Pe);H(this,et,new Set);this.options=n,D(this,Z,t),D(this,de,null),D(this,Ae,yr()),this.options.experimental_prefetchInRender||E(this,Ae).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,T).addObserver(this),Er(E(this,T),this.options)?$(this,I,ut).call(this):this.updateResult(),$(this,I,wn).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Sn(E(this,T),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Sn(E(this,T),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$(this,I,Cn).call(this),$(this,I,En).call(this),E(this,T).removeObserver(this)}setOptions(t,n){const r=this.options,o=E(this,T);if(this.options=E(this,Z).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof fe(this.options.enabled,E(this,T))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$(this,I,Rn).call(this),E(this,T).setOptions(this.options),r._defaulted&&!Tt(this.options,r)&&E(this,Z).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,T),observer:this});const s=this.hasListeners();s&&Rr(E(this,T),o,this.options,r)&&$(this,I,ut).call(this),this.updateResult(n),s&&(E(this,T)!==o||fe(this.options.enabled,E(this,T))!==fe(r.enabled,E(this,T))||Pt(this.options.staleTime,E(this,T))!==Pt(r.staleTime,E(this,T)))&&$(this,I,bn).call(this);const i=$(this,I,yn).call(this);s&&(E(this,T)!==o||fe(this.options.enabled,E(this,T))!==fe(r.enabled,E(this,T))||i!==E(this,Pe))&&$(this,I,xn).call(this,i)}getOptimisticResult(t){const n=E(this,Z).getQueryCache().build(E(this,Z),t),r=this.createResult(n,t);return qi(this,r)&&(D(this,Q,r),D(this,Ye,this.options),D(this,Le,E(this,T).state)),r}getCurrentResult(){return E(this,Q)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){E(this,et).add(t)}getCurrentQuery(){return E(this,T)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=E(this,Z).defaultQueryOptions(t),r=E(this,Z).getQueryCache().build(E(this,Z),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return $(this,I,ut).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,Q)))}createResult(t,n){var k;const r=E(this,T),o=this.options,s=E(this,Q),i=E(this,Le),a=E(this,Ye),l=t!==r?t.state:E(this,ht),{state:f}=t;let p={...f},h=!1,m;if(n._optimisticResults){const A=this.hasListeners(),O=!A&&Er(t,n),M=A&&Rr(t,r,n,o);(O||M)&&(p={...p,...Ui(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:g,status:v}=p;if(n.select&&p.data!==void 0)if(s&&p.data===(i==null?void 0:i.data)&&n.select===E(this,mt))m=E(this,Ze);else try{D(this,mt,n.select),m=n.select(p.data),m=wr(s==null?void 0:s.data,m,n),D(this,Ze,m),D(this,de,null)}catch(A){D(this,de,A)}else m=p.data;if(n.placeholderData!==void 0&&m===void 0&&v==="pending"){let A;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))A=s.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((k=E(this,Je))==null?void 0:k.state.data,E(this,Je)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),D(this,de,null)}catch(O){D(this,de,O)}A!==void 0&&(v="success",m=wr(s==null?void 0:s.data,A,n),h=!0)}E(this,de)&&(b=E(this,de),m=E(this,Ze),g=Date.now(),v="error");const y=p.fetchStatus==="fetching",x=v==="pending",w=v==="error",C=x&&y,S=m!==void 0,R={status:v,fetchStatus:p.fetchStatus,isPending:x,isSuccess:v==="success",isError:w,isInitialLoading:C,isLoading:C,data:m,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:g,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdate
1Count:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>l.dataUpdateCount||p.errorUpdateCount>l.errorUpdateCount,isFetching:y,isRefetching:y&&!x,isLoadingError:w&&!S,isPaused:p.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&S,isStale:Un(t,n),refetch:this.refetch,promise:E(this,Ae)};if(this.options.experimental_prefetchInRender){const A=P=>{R.status==="error"?P.reject(R.error):R.data!==void 0&&P.resolve(R.data)},O=()=>{const P=D(this,Ae,R.promise=yr());A(P)},M=E(this,Ae);switch(M.status){case"pending":t.queryHash===r.queryHash&&A(M);break;case"fulfilled":(R.status==="error"||R.data!==M.value)&&O();break;case"rejected":(R.status!=="error"||R.error!==M.reason)&&O();break}}return R}updateResult(t){const n=E(this,Q),r=this.createResult(E(this,T),this.options);if(D(this,Le,E(this,T).state),D(this,Ye,this.options),E(this,Le).data!==void 0&&D(this,Je,E(this,T)),Tt(r,n))return;D(this,Q,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!E(this,et).size)return!0;const u=new Set(a??E(this,et));return this.options.throwOnError&&u.add("error"),Object.keys(E(this,Q)).some(l=>{const f=l;return E(this,Q)[f]!==n[f]&&u.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),$(this,I,uo).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$(this,I,wn).call(this)}},Z=new WeakMap,T=new WeakMap,ht=new WeakMap,Q=new WeakMap,Le=new WeakMap,Ye=new WeakMap,Ae=new WeakMap,de=new WeakMap,mt=new WeakMap,Ze=new WeakMap,Je=new WeakMap,$e=new WeakMap,Fe=new WeakMap,Pe=new WeakMap,et=new WeakMap,I=new WeakSet,ut=function(t){$(this,I,Rn).call(this);let n=E(this,T).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Fi)),n},bn=function(){$(this,I,Cn).call(this);const t=Pt(this.options.staleTime,E(this,T));if(vn||E(this,Q).isStale||!xr(t))return;const r=Wi(E(this,Q).dataUpdatedAt,t)+1;D(this,$e,setTimeout(()=>{E(this,Q).isStale||this.updateResult()},r))},yn=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,T)):this.options.refetchInterval)??!1},xn=function(t){$(this,I,En).call(this),D(this,Pe,t),!(vn||fe(this.options.enabled,E(this,T))===!1||!xr(E(this,Pe))||E(this,Pe)===0)&&D(this,Fe,setInterval(()=>{(this.options.refetchIntervalInBackground||Bi.isFocused())&&$(this,I,ut).call(this)},E(this,Pe)))},wn=function(){$(this,I,bn).call(this),$(this,I,xn).call(this,$(this,I,yn).call(this))},Cn=function(){E(this,$e)&&(clearTimeout(E(this,$e)),D(this,$e,void 0))},En=function(){E(this,Fe)&&(clearInterval(E(this,Fe)),D(this,Fe,void 0))},Rn=function(){const t=E(this,Z).getQueryCache().build(E(this,Z),this.options);if(t===E(this,T))return;const n=E(this,T);D(this,T,t),D(this,ht,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},uo=function(t){Ut.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(E(this,Q))}),E(this,Z).getQueryCache().notify({query:E(this,T),type:"observerResultsUpdated"})})},so);function Vi(e,t){return fe(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Er(e,t){return Vi(e,t)||e.state.data!==void 0&&Sn(e,t,t.refetchOnMount)}function Sn(e,t,n){if(fe(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Un(e,t)}return!1}function Rr(e,t,n,r){return(e!==t||fe(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Un(e,n)}function Un(e,t){return fe(t.enabled,e)!==!1&&e.isStaleByTime(Pt(t.staleTime,e))}function qi(e,t){return!Tt(e.getCurrentResult(),t)}var Oe,_e,J,xe,we,Ot,Nn,io,Gi=(io=class extends ao{constructor(n,r){super();H(this,we);H(this,Oe);H(this,_e);H(this,J);H(this,xe);D(this,Oe,n),this.setOptions(r),this.bindMethods(),$(this,we,Ot).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=E(this,Oe).defaultMutationOptions(n),Tt(this.options,r)||E(this,Oe).getMutationCache().notify({type:"observerOptionsUpdated",mutation:E(this,J),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Cr(r.mutationKey)!==Cr(this.options.mutationKey)?this.reset():((o=E(this,J))==null?void 0:o.state.status)==="pending"&&E(this,J).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=E(this,J))==null||n.removeObserver(this)}onMutationUpdate(n){$(this,we,Ot).call(this),$(this,we,Nn).call(this,n)}getCurrentResult(){return E(this,_e)}reset(){var n;(n=E(this,J))==null||n.removeObserver(this),D(this,J,void 0),$(this,we,Ot).call(this),$(this,we,Nn).call(this)}mutate(n,r){var o;return D(this,xe,r),(o=E(this,J))==null||o.removeObserver(this),D(this,J,E(this,Oe).getMutationCache().build(E(this,Oe),this.options)),E(this,J).addObserver(this),E(this,J).execute(n)}},Oe=new WeakMap,_e=new WeakMap,J=new WeakMap,xe=new WeakMap,we=new WeakSet,Ot=function(){var r;const n=((r=E(this,J))==null?void 0:r.state)??zi();D(this,_e,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Nn=function(n){Ut.batch(()=>{var r,o,s,i,a,u,l,f;if(E(this,xe)&&this.hasListeners()){const p=E(this,_e).variables,h=E(this,_e).context;(n==null?void 0:n.type)==="success"?((o=(r=E(this,xe)).onSuccess)==null||o.call(r,n.data,p,h),(i=(s=E(this,xe)).onSettled)==null||i.call(s,n.data,null,p,h)):(n==null?void 0:n.type)==="error"&&((u=(a=E(this,xe)).onError)==null||u.call(a,n.error,p,h),(f=(l=E(this,xe)).onSettled)==null||f.call(l,void 0,n.error,p,h))}
1this.listeners.forEach(p=>{p(E(this,_e))})})},io),fo=c.createContext(!1),Ki=()=>c.useContext(fo);fo.Provider;function Qi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xi=c.createContext(Qi()),Yi=()=>c.useContext(Xi);function po(e,t){return typeof e=="function"?e(...t):!!e}function An(){}var Zi=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ji=e=>{c.useEffect(()=>{e.clearReset()},[e])},ea=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&po(n,[e.error,r]),ta=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},na=(e,t)=>e.isLoading&&e.isFetching&&!t,ra=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Sr=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function oa(e,t,n){var p,h,m,b,g;const r=co(),o=Ki(),s=Yi(),i=r.defaultQueryOptions(e);(h=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||h.call(p,i),i._optimisticResults=o?"isRestoring":"optimistic",ta(i),Zi(i,s),Ji(s);const a=!r.getQueryCache().get(i.queryHash),[u]=c.useState(()=>new t(r,i)),l=u.getOptimisticResult(i),f=!o&&e.subscribed!==!1;if(c.useSyncExternalStore(c.useCallback(v=>{const y=f?u.subscribe(Ut.batchCalls(v)):An;return u.updateResult(),y},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),c.useEffect(()=>{u.setOptions(i,{listeners:!1})},[i,u]),ra(i,l))throw Sr(i,u,s);if(ea({result:l,errorResetBoundary:s,throwOnError:i.throwOnError,query:r.getQueryCache().get(i.queryHash)}))throw l.error;if((b=(m=r.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||b.call(m,i,l),i.experimental_prefetchInRender&&!vn&&na(l,o)){const v=a?Sr(i,u,s):(g=r.getQueryCache().get(i.queryHash))==null?void 0:g.promise;v==null||v.catch(An).finally(()=>{u.updateResult()})}return i.notifyOnChangeProps?l:u.trackResult(l)}function ho(e,t){return oa(e,Hi)}function ee(e,t){const n=co(),[r]=c.useState(()=>new Gi(n,e));c.useEffect(()=>{r.setOptions(e)},[r,e]);const o=c.useSyncExternalStore(c.useCallback(i=>r.subscribe(Ut.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=c.useCallback((i,a)=>{r.mutate(i,a).catch(An)},[r]);if(o.error&&po(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}function mo(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=mo(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function go(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=mo(e))&&(r&&(r+=" "),r+=t);return r}const Nr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ar=go,vo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ar(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const f=n==null?void 0:n[l],p=s==null?void 0:s[l];if(f===null)return null;const h=Nr(f)||Nr(p);return o[l][h]}),a=n&&Object.entries(n).reduce((l,f)=>{let[p,h]=f;return h===void 0||(l[p]=h),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,f)=>{let{class:p,className:h,...m}=f;return Object.entries(m).every(b=>{let[g,v]=b;return Array.isArray(v)?v.includes({...s,...a}[g]):{...s,...a}[g]===v})?[...l,p,h]:l},[]);return Ar(e,i,u,n==null?void 0:n.class,n==null?void 0:n.className)},zn="-",sa=e=>{const t=aa(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(zn);return a[0]===""&&a.length!==1&&a.shift(),bo(a,t)||ia(i)},getConflictingClassGroupIds:(i,a)=>{const u=n[i]||[];return a&&r[i]?[...u,...r[i]]:u}}},bo=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?bo(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(zn);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},Pr=/^\[(.+)\]$/,ia=e=>{if(Pr.test(e)){const t=Pr.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},aa=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};
vendor: 5,088 bytes, line 1
1return la(Object.entries(e.classGroups),n).forEach(([s,i])=>{Pn(i,r,s,t)}),r},Pn=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Or(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(ca(o)){Pn(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Pn(i,Or(t,s),n,r)})})},Or=(e,t)=>{let n=e;return t.split(zn).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},ca=e=>e.isThemeGetter,la=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e,ua=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},yo="!",da=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const u=[];let l=0,f=0,p;for(let v=0;v<a.length;v++){let y=a[v];if(l===0){if(y===o&&(r||a.slice(v,v+s)===t)){u.push(a.slice(f,v)),f=v+s;continue}if(y==="/"){p=v;continue}}y==="["?l++:y==="]"&&l--}const h=u.length===0?a:a.substring(f),m=h.startsWith(yo),b=m?h.substring(1):h,g=p&&p>f?p-f:void 0;return{modifiers:u,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:i}):i},fa=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},pa=e=>({cache:ua(e.cacheSize),parseClassName:da(e),...sa(e)}),ha=/\s+/,ma=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(ha);let a="";for(let u=i.length-1;u>=0;u-=1){const l=i[u],{modifiers:f,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}=n(l);let b=!!m,g=r(b?h.substring(0,m):h);if(!g){if(!b){a=l+(a.length>0?" "+a:a);continue}if(g=r(h),!g){a=l+(a.length>0?" "+a:a);continue}b=!1}const v=fa(f).join(":"),y=p?v+yo:v,x=y+g;if(s.includes(x))continue;s.push(x);const w=o(g,b);for(let C=0;C<w.length;++C){const S=w[C];s.push(y+S)}a=l+(a.length>0?" "+a:a)}return a};function ga(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=xo(t))&&(r&&(r+=" "),r+=n);return r}const xo=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=xo(e[r]))&&(n&&(n+=" "),n+=t);return n};function va(e,...t){let n,r,o,s=i;function i(u){const l=t.reduce((f,p)=>p(f),e());return n=pa(l),r=n.cache.get,o=n.cache.set,s=a,a(u)}function a(u){const l=r(u);if(l)return l;const f=ma(u,n);return o(u,f),f}return function(){return s(ga.apply(null,arguments))}}const F=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},wo=/^\[(?:([a-z-]+):)?(.+)\]$/i,ba=/^\d+\/\d+$/,ya=new Set(["px","full","screen"]),xa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ca=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ea=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ra=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,be=e=>Ke(e)||ya.has(e)||ba.test(e),Re=e=>rt(e,"length",ja),Ke=e=>!!e&&!Number.isNaN(Number(e)),sn=e=>rt(e,"number",Ke),ct=e=>!!e&&Number.isInteger(Number(e)),Sa=e=>e.endsWith("%")&&Ke(e.slice(0,-1)),_=e=>wo.test(e),Se=e=>xa.test(e),Na=new Set(["length","size","percentage"]),Aa=e=>rt(e,Na,Co),Pa=e=>rt(e,"position",Co),Oa=new Set(["image","url"]),_a=e=>rt(e,Oa,Ma),ka=e=>rt(e,"",Ta),lt=()=>!0,rt=(e,t,n)=>{const r=wo.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},ja=e=>wa.test(e)&&!Ca.test(e),Co=()=>!1,Ta=e=>Ea.test(e),Ma=e=>Ra.test(e),Da=()=>{const e=F("colors"),t=F("spacing"),n=F("blur"),r=F("brightness"),o=F("borderColor"),s=F("borderRadius"),i=F("borderSpacing"),a=F("borderWidth"),u=F("contrast"),l=F("grayscale"),f=F("hueRotate"),p=F("invert"),h=F("gap"),m=F("gradientColorStops"),b=F("gradientColorStopPositions"),g=F("inset"),v=F("margin"),y=F("opacity"),x=F("padding"),w=F("saturate"),C=F("scale"),S=F("sepia"),N=F("skew"),R=F("space"),k=F("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",_,t],P=()=>[_,t],B=()=>["",be,Re],L=()=>["auto",Ke,_],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",_],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[Ke,_];return{cacheSize:500,separator:":",theme:{colors:[lt],spacing:[be,Re],blur:["none","",Se,_],brightness:Y(),borderColor:[e],borderRadius:["n
1one","","full",Se,_],borderSpacing:P(),borderWidth:B(),contrast:Y(),grayscale:z(),hueRotate:Y(),invert:z(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[Sa,Re],inset:M(),margin:M(),opacity:Y(),padding:P(),saturate:Y(),scale:Y(),sepia:z(),skew:Y(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",_]}],container:["container"],columns:[{columns:[Se]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),_]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ct,_]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",_]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",ct,_]}],"grid-cols":[{"grid-cols":[lt]}],"col-start-end":[{col:["auto",{span:["full",ct,_]},_]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[lt]}],"row-start-end":[{row:["auto",{span:[ct,_]},_]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",_]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",_]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}
vendor: 8,317 bytes, line 1
1],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",_,t]}],"min-w":[{"min-w":[_,t,"min","max","fit"]}],"max-w":[{"max-w":[_,t,"none","full","min","max","fit","prose",{screen:[Se]},Se]}],h:[{h:[_,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[_,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[_,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[_,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Se,Re]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",sn]}],"font-family":[{font:[lt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",_]}],"line-clamp":[{"line-clamp":["none",Ke,sn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",be,_]}],"list-image":[{"list-image":["none",_]}],"list-style-type":[{list:["none","disc","decimal",_]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",be,Re]}],"underline-offset":[{"underline-offset":["auto",be,_]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),Pa]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Aa]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_a]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:W()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[be,_]}],"outline-w":[{outline:[be,Re]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[be,Re]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Se,ka]}],"shadow-color":[{shadow:[lt]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Se,_]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",_]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",_]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",_]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[ct,_]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",_]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 9,326 bytes, lines 1-76
1],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[be,Re,sn]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Ia=va(Da);function X(...e){return Ia(go(e))}const La=vo("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),$a=c.forwardRef(({className:e,variant:t,...n},r)=>d.jsx("div",{ref:r,role:"alert",className:X(La({variant:t}),e),...n}));$a.displayName="Alert";const Fa=c.forwardRef(({className:e,...t},n)=>d.jsx("h5",{ref:n,className:X("mb-1 font-medium leading-none tracking-tight",e),...t}));Fa.displayName="AlertTitle";const Wa=c.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:X("text-sm [&_p]:leading-relaxed",e),...t}));Wa.displayName="AlertDescription";/** 2 * @license lucide-react v0.466.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Ba=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Eo=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 7 * @license lucide-react v0.466.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */var Ua={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 12 * @license lucide-react v0.466.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const za=c.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},u)=>c.createElement("svg",{ref:u,...Ua,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Eo("lucide",o),...a},[...i.map(([l,f])=>c.createElement(l,f)),...Array.isArray(s)?s:[s]]));/** 17 * @license lucide-react v0.466.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const ie=(e,t)=>{const n=c.forwardRef(({className:r,...o},s)=>c.createElement(za,{ref:s,iconNode:t,className:Eo(`lucide-${Ba(e)}`,r),...o}));return n.displayName=`${e}`,n};/** 22 * @license lucide-react v0.466.0 - ISC 23 * 24 * This source code is licensed under the ISC license. 25 * See the LICENSE file in the root directory of this source tree. 26 */const Ha=ie("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 27 * @license lucide-react v0.466.0 - ISC 28 * 29 * This source code is licensed under the ISC license. 30 * See the LICENSE file in the root directory of this source tree. 31 */const Va=ie("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 32 * @license lucide-react v0.466.0 - ISC 33 * 34 * This source code is licensed under the ISC license. 35 * See the LICENSE file in the root directory of this source tree. 36 */const fp=ie("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 37 * @license lucide-react v0.466.0 - ISC 38 * 39 * This source code is licensed under the ISC license. 40 * See the LICENSE file in the root directory of this source tree. 41 */const qa=ie("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** 42 * @license lucide-react v0.466.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const Ga=ie("HandCoins",[["path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17",key:"geh8rc"}],["path",{d:"m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"1fto5m"}],["path",{d:"m2 16 6 6",key:"1pfhp9"}],["circle",{cx:"16",cy:"9",r:"2.9",key:"1n0dlu"}],["circle",{cx:"6",cy:"5",r:"3",key:"151irh"}]]);/** 47 * @license lucide-react v0.466.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */const Ka=ie("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 52 * @license lucide-react v0.466.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const pp=ie("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 57 * @license lucide-react v0.466.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const Qa=ie("PartyPopper",[["path",{d:"M5.8 11.3 2 22l10.7-3.79",key:"gwxi1d"}],["path",{d:"M4 3h.01",key:"1vcuye"}],["path",{d:"M22 8h.01",key:"1mrtc2"}],["path",{d:"M15 2h.01",key:"1cjtqr"}],["path",{d:"M22 20h.01",key:"1mrys2"}],["path",{d:"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10",key:"hbicv8"}],["path",{d:"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17",key:"1i94pl"}],["path",{d:"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7",key:"1cofks"}],["path",{d:"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z",key:"4kbmks"}]]);/** 62 * @license lucide-react v0.466.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const Xa=ie("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** 67 * @license lucide-react v0.466.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const Ya=ie("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** 72 * @license lucide-react v0.466.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const Za=ie("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}
76],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/** 77 * @license lucide-react v0.466.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const Ro=ie("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function So({storeName:e,logoUrl:t,linked:n=!0}){const r=t?d.jsx("img",{src:t,alt:e,className:"max-h-12 max-w-full object-contain","data-test":"store-logo"}):d.jsx("h1",{className:"text-2xl font-bold text-foreground",children:e});return n?d.jsx("a",{href:"/",className:"inline-block","aria-label":e,children:r}):r}function Ja({user:e}){const[t,n]=c.useState(!1),r=c.useRef(null);c.useEffect(()=>{if(!t)return;const i=a=>{r.current&&!r.current.contains(a.target)&&n(!1)};return document.addEventListener("click",i),()=>document.removeEventListener("click",i)},[t]);const o=(e.name||e.email).charAt(0).toUpperCase(),s=e.avatar_url?d.jsx("img",{src:e.avatar_url,alt:e.name??e.email,className:"h-8 w-8 rounded-full object-cover"}):d.jsx("span",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-muted text-sm font-medium text-foreground",children:o});return d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",className:"flex cursor-pointer rounded-md border border-border bg-muted p-[7px]",onClick:i=>{i.stopPropagation(),n(a=>!a)},"aria-expanded":t,"data-test":"mobile-user-avatar",children:s}),t&&d.jsx("div",{ref:r,className:"absolute left-0 right-0 top-full z-50 mx-4 -mt-2 rounded-lg border border-border bg-background p-4 shadow-lg","data-test":"mobile-user-dropdown",children:d.jsxs("div",{className:"flex items-center gap-2",children:[s,d.jsxs("div",{className:"flex flex-col",children:[d.jsx("p",{className:"text-base font-medium text-foreground",children:e.name}),d.jsx("p",{className:"text-sm text-muted-foreground",children:e.email})]})]})})]})}function hp({storeName:e,logoUrl:t,user:n,backToAppUrl:r}){const{t:o}=ze();return d.jsxs("div",{className:"w-full lg:hidden","data-test":"mobile-app-header",children:[d.jsxs("div",{className:"relative flex items-center justify-between border-b border-border bg-background p-4",children:[d.jsx(So,{storeName:e,logoUrl:t}),n&&d.jsx(Ja,{user:n})]}),r&&d.jsx("div",{className:"flex bg-muted px-4 py-3",children:d.jsxs("a",{href:r,className:"inline-flex items-center gap-1 rounded-md border border-border bg-background px-3 py-1.5 text-sm text-foreground","data-test":"back-to-app",children:[d.jsx(Va,{className:"h-4 w-4","aria-hidden":"true"}),o("checkout.back_to_app")]})})]})}function mp({storeName:e,logoUrl:t,banner:n,mobileHeader:r,left:o,footer:s,right:i}){return d.jsxs(d.Fragment,{children:[n,d.jsxs("div",{className:"flex flex-col lg:flex-row min-h-screen","data-test":"checkout-layout",children:[r,d.jsxs("div",{className:"user-actions w-full lg:w-1/2 order-last lg:order-first sm:py-8 sm:px-12 lg:px-16 xl:px-24 2xl:px-32 bg-background","data-test":"user-actions-column",children:[r&&d.jsx("div",{className:"h-3 w-full border-b border-border bg-muted sm:hidden"}),d.jsx("div",{className:"hidden lg:flex lg:h-12 lg:items-center mb-8",children:d.jsx(So,{storeName:e,logoUrl:t})}),o,s&&d.jsx("div",{className:"flex flex-col md:items-center mt-6",children:s})]}),d.jsx("div",{className:"w-full lg:w-1/2 lg:pt-16 bg-gray-100 dark:bg-neutral-900","data-test":"product-column",children:i})]})]})}function _r(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function No(...e){return t=>{let n=!1;const r=e.map(o=>{const s=_r(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():_r(e[o],null)}}}}function gp(...e){return c.useCallback(No(...e),e)}var Ao=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),s=o.find(tc);if(s){const i=s.props.children,a=o.map(u=>u===s?c.Children.count(i)>1?c.Children.only(null):c.isValidElement(i)?i.props.children:null:u);return d.jsx(On,{...r,ref:t,children:c.isValidElement(i)?c.cloneElement(i,void 0,a):null})}return d.jsx(On,{...r,ref:t,children:n})});Ao.displayName="Slot";var On=c.forwardRef((e,t)=>
81{const{children:n,...r}=e;if(c.isValidElement(n)){const o=rc(n);return c.cloneElement(n,{...nc(r,n.props),ref:t?No(t,o):o})}return c.Children.count(n)>1?c.Children.only(null):null});On.displayName="SlotClone";var ec=({children:e})=>d.jsx(d.Fragment,{children:e});function tc(e){return c.isValidElement(e)&&e.type===ec}function nc(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function rc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const oc=vo("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",{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"},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"}},defaultVariants:{variant:"default",size:"default"}}),Po=c.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?Ao:"button";return d.jsx(i,{className:X(oc({variant:t,size:n,className:e})),ref:s,...o})});Po.displayName="Button";function sc(e,t=[]){let n=[];function r(s,i){const a=c.createContext(i),u=n.length;n=[...n,i];const l=p=>{var y;const{scope:h,children:m,...b}=p,g=((y=h==null?void 0:h[e])==null?void 0:y[u])||a,v=c.useMemo(()=>b,Object.values(b));return d.jsx(g.Provider,{value:v,children:m})};l.displayName=s+"Provider";function f(p,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[u])||a,b=c.useContext(m);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[l,f]}const o=()=>{const s=n.map(i=>c.createContext(i));return function(a){const u=(a==null?void 0:a[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return o.scopeName=e,[r,ic(o,...t)]}function ic(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:u,scopeName:l})=>{const p=u(s)[`__scope${l}`];return{...a,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function ot(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function ac({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=cc({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=ot(n),u=c.useCallback(l=>{if(s){const p=typeof l=="function"?l(e):l;p!==e&&a(p)}else o(l)},[s,e,o,a]);return[i,u]}function cc({defaultProp:e,onChange:t}){const n=c.useState(e),[r]=n,o=c.useRef(r),s=ot(t);return c.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var We=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{};function lc(e){const[t,n]=c.useState(void 0);return We(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const u=s.borderBoxSize,l=Array.isArray(u)?u[0]:u;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function ye(e,t,{checkForDefaultPrevented:n=!0}={}
81){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function uc(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Oo(...e){return t=>e.forEach(n=>uc(n,t))}function He(...e){return c.useCallback(Oo(...e),e)}var _o=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),s=o.find(dc);if(s){const i=s.props.children,a=o.map(u=>u===s?c.Children.count(i)>1?c.Children.only(null):c.isValidElement(i)?i.props.children:null:u);return d.jsx(_n,{...r,ref:t,children:c.isValidElement(i)?c.cloneElement(i,void 0,a):null})}return d.jsx(_n,{...r,ref:t,children:n})});_o.displayName="Slot";var _n=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const o=pc(n);return c.cloneElement(n,{...fc(r,n.props),ref:t?Oo(t,o):o})}return c.Children.count(n)>1?c.Children.only(null):null});_n.displayName="SlotClone";var ko=({children:e})=>d.jsx(d.Fragment,{children:e});function dc(e){return c.isValidElement(e)&&e.type===ko}function fc(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function pc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],De=hc.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?_o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function mc(e,t){e&&Bn.flushSync(()=>e.dispatchEvent(t))}function gc(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var vc="DismissableLayer",kn="dismissableLayer.update",bc="dismissableLayer.pointerDownOutside",yc="dismissableLayer.focusOutside",kr,jo=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),To=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...u}=e,l=c.useContext(jo),[f,p]=c.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),b=He(t,R=>p(R)),g=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),x=f?g.indexOf(f):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,C=x>=y,S=Cc(R=>{const k=R.target,A=[...l.branches].some(O=>O.contains(k));!C||A||(o==null||o(R),i==null||i(R),R.defaultPrevented||a==null||a())},h),N=Ec(R=>{const k=R.target;[...l.branches].some(O=>O.contains(k))||(s==null||s(R),i==null||i(R),R.defaultPrevented||a==null||a())},h);return gc(R=>{x===l.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},h),c.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(kr=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),jr(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=kr)}},[f,h,n,l]),c.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),jr())},[f,l]),c.useEffect(()=>{const R=()=>m({});return document.addEventListener(kn,R),()=>document.removeEventListener(kn,R)},[]),d.jsx(De.div,{...u,ref:b,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:ye(e.onFocusCapture,N.onFocusCapture),onBlurCapture:ye(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:ye(e.onPointerDownCapture,S.onPointerDownCapture)})});To.displayName=vc;var xc="DismissableLayerBranch",wc=c.forwardRef((e,t)=>
81{const n=c.useContext(jo),r=c.useRef(null),o=He(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),d.jsx(De.div,{...e,ref:o})});wc.displayName=xc;function Cc(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let u=function(){Mo(bc,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ec(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&Mo(yc,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function jr(){const e=new CustomEvent(kn);document.dispatchEvent(e)}function Mo(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mc(o,s):o.dispatchEvent(s)}var Rc=Wn.useId||(()=>{}),Sc=0;function Nc(e){const[t,n]=c.useState(Rc());return We(()=>{n(r=>r??String(Sc++))},[e]),t?`radix-${t}`:""}const Ac=["top","right","bottom","left"],je=Math.min,re=Math.max,Mt=Math.round,yt=Math.floor,me=e=>({x:e,y:e}),Pc={left:"right",right:"left",bottom:"top",top:"bottom"},Oc={start:"end",end:"start"};function jn(e,t,n){return re(e,je(t,n))}function Ce(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function st(e){return e.split("-")[1]}function Hn(e){return e==="x"?"y":"x"}function Vn(e){return e==="y"?"height":"width"}const _c=new Set(["top","bottom"]);function he(e){return _c.has(Ee(e))?"y":"x"}function qn(e){return Hn(he(e))}function kc(e,t,n){n===void 0&&(n=!1);const r=st(e),o=qn(e),s=Vn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Dt(i)),[i,Dt(i)]}function jc(e){const t=Dt(e);return[Tn(e),t,Tn(t)]}function Tn(e){return e.replace(/start|end/g,t=>Oc[t])}const Tr=["left","right"],Mr=["right","left"],Tc=["top","bottom"],Mc=["bottom","top"];function Dc(e,t,n){switch(e){case"top":case"bottom":return n?t?Mr:Tr:t?Tr:Mr;case"left":case"right":return t?Tc:Mc;default:return[]}}function Ic(e,t,n,r){const o=st(e);let s=Dc(Ee(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Tn)))),s}function Dt(e){return e.replace(/left|right|bottom|top/g,t=>Pc[t])}function Lc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Do(e){return typeof e!="number"?Lc(e):{top:e,right:e,bottom:e,left:e}}function It(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Dr(e,t,n){let{reference:r,floating:o}=e;const s=he(t),i=qn(t),a=Vn(i),u=Ee(t),l=s==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let m;switch(u){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:p};break;case"left":m={x:r.x-o.width,y:p};break;default:m={x:r.x,y:r.y}}switch(st(t)){case"start":m[i]-=h*(n&&l?-1:1);break;case"end":m[i]+=h*(n&&l?-1:1);break}return m}async function $c(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:h=!1,padding:m=0}=Ce(t,e),b=Do(m),v=a[h?p==="floating"?"reference":"floating":p],y=It(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:f,strategy:u})),x=p==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},S=It(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:w,strategy:u}):x);return{top:(y.top-S.top+b.top)/C.y,bottom:(S.bottom-y.bottom+b.bottom)/C.y,left:(y.left-S.left+b.left)/C.x,right:(S.right-y.right+b.right)/C.x}}const Fc=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}
81=n,a=s.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Dr(l,r,u),h=r,m={},b=0;for(let v=0;v<a.length;v++){var g;const{name:y,fn:x}=a[v],{x:w,y:C,data:S,reset:N}=await x({x:f,y:p,initialPlacement:r,placement:h,strategy:o,middlewareData:m,rects:l,platform:{...i,detectOverflow:(g=i.detectOverflow)!=null?g:$c},elements:{reference:e,floating:t}});f=w??f,p=C??p,m={...m,[y]:{...m[y],...S}},N&&b<=50&&(b++,typeof N=="object"&&(N.placement&&(h=N.placement),N.rects&&(l=N.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):N.rects),{x:f,y:p}=Dr(l,h,u)),v=-1)}return{x:f,y:p,placement:h,strategy:o,middlewareData:m}},Wc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:u}=t,{element:l,padding:f=0}=Ce(e,t)||{};if(l==null)return{};const p=Do(f),h={x:n,y:r},m=qn(o),b=Vn(m),g=await i.getDimensions(l),v=m==="y",y=v?"top":"left",x=v?"bottom":"right",w=v?"clientHeight":"clientWidth",C=s.reference[b]+s.reference[m]-h[m]-s.floating[b],S=h[m]-s.reference[m],N=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let R=N?N[w]:0;(!R||!await(i.isElement==null?void 0:i.isElement(N)))&&(R=a.floating[w]||s.floating[b]);const k=C/2-S/2,A=R/2-g[b]/2-1,O=je(p[y],A),M=je(p[x],A),P=O,B=R-g[b]-M,L=R/2-g[b]/2+k,G=jn(P,L,B),W=!u.arrow&&st(o)!=null&&L!==G&&s.reference[b]/2-(L<P?O:M)-g[b]/2<0,U=W?L<P?L-P:L-B:0;return{[m]:h[m]+U,data:{[m]:G,centerOffset:L-G-U,...W&&{alignmentOffset:U}},reset:W}}}),Bc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:u,elements:l}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...v}=Ce(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};
81const y=Ee(o),x=he(a),w=Ee(a)===a,C=await(u.isRTL==null?void 0:u.isRTL(l.floating)),S=h||(w||!g?[Dt(a)]:jc(a)),N=b!=="none";!h&&N&&S.push(...Ic(a,g,b,C));const R=[a,...S],k=await u.detectOverflow(t,v),A=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&A.push(k[y]),p){const L=kc(o,i,C);A.push(k[L[0]],k[L[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(L=>L<=0)){var M,P;const L=(((M=s.flip)==null?void 0:M.index)||0)+1,G=R[L];if(G&&(!(p==="alignment"?x!==he(G):!1)||O.every(j=>he(j.placement)===x?j.overflows[0]>0:!0)))return{data:{index:L,overflows:O},reset:{placement:G}};let W=(P=O.filter(U=>U.overflows[0]<=0).sort((U,j)=>U.overflows[1]-j.overflows[1])[0])==null?void 0:P.placement;if(!W)switch(m){case"bestFit":{var B;const U=(B=O.filter(j=>{if(N){const z=he(j.placement);return z===x||z==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(z=>z>0).reduce((z,ne)=>z+ne,0)]).sort((j,z)=>j[1]-z[1])[0])==null?void 0:B[0];U&&(W=U);break}case"initialPlacement":W=a;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function Ir(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Lr(e){return Ac.some(t=>e[t]>=0)}const Uc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Ce(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Ir(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Lr(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Ir(i,n.floating);return{data:{escapedOffsets:a,escaped:Lr(a)}}}default:return{}}}}},Io=new Set(["left","top"]);async function zc(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ee(n),a=st(n),u=he(n)==="y",l=Io.has(i)?-1:1,f=s&&u?-1:1,p=Ce(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof b=="number"&&(m=a==="end"?b*-1:b),u?{x:m*f,y:h*l}:{x:h*l,y:m*f}}const Hc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,u=await zc(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:i}}}}},Vc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:u={fn:y=>
81{let{x,y:w}=y;return{x,y:w}}},...l}=Ce(e,t),f={x:n,y:r},p=await s.detectOverflow(t,l),h=he(Ee(o)),m=Hn(h);let b=f[m],g=f[h];if(i){const y=m==="y"?"top":"left",x=m==="y"?"bottom":"right",w=b+p[y],C=b-p[x];b=jn(w,b,C)}if(a){const y=h==="y"?"top":"left",x=h==="y"?"bottom":"right",w=g+p[y],C=g-p[x];g=jn(w,g,C)}const v=u.fn({...t,[m]:b,[h]:g});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:i,[h]:a}}}}}},qc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:u=!0,crossAxis:l=!0}=Ce(e,t),f={x:n,y:r},p=he(o),h=Hn(p);let m=f[h],b=f[p];const g=Ce(a,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const w=h==="y"?"height":"width",C=s.reference[h]-s.floating[w]+v.mainAxis,S=s.reference[h]+s.reference[w]-v.mainAxis;m<C?m=C:m>S&&(m=S)}if(l){var y,x;const w=h==="y"?"width":"height",C=Io.has(Ee(o)),S=s.reference[p]-s.floating[w]+(C&&((y=i.offset)==null?void 0:y[p])||0)+(C?0:v.crossAxis),N=s.reference[p]+s.reference[w]+(C?0:((x=i.offset)==null?void 0:x[p])||0)-(C?v.crossAxis:0);b<S?b=S:b>N&&(b=N)}return{[h]:m,[p]:b}}}},Gc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:u=()=>{},...l}=Ce(e,t),f=await i.detectOverflow(t,l),p=Ee(o),h=st(o),m=he(o)==="y",{width:b,height:g}=s.floating;let v,y;p==="top"||p==="bottom"?(v=p,y=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=p,v=h==="end"?"top":"bottom");const x=g-f.top-f.bottom,w=b-f.left-f.right,C=je(g-f[v],x),S=je(b-f[y],w),N=!t.middlewareData.shift;let R=C,k=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=x),N&&!h){const O=re(f.left,0),M=re(f.right,0),P=re(f.top,0),B=re(f.bottom,0);m?k=b-2*(O!==0||M!==0?O+M:re(f.left,f.right)):R=g-2*(P!==0||B!==0?P+B:re(f.top,f.bottom))}await u({...t,availableWidth:k,availableHeight:R});const A=await i.getDimensions(a.floating);return b!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function zt(){return typeof window<"u"}function it(e){return Lo(e)?(e.nodeName||"").toLowerCase():"#document"}function oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ve(e){var t;return(t=(Lo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lo(e){return zt()?e instanceof Node||e instanceof oe(e).Node:!1}function ae(e){return zt()?e instanceof Element||e instanceof oe(e).Element:!1}function ge(e){return zt()?e instanceof HTMLElement||e instanceof oe(e).HTMLElement:!1}function $r(e){return!zt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oe(e).ShadowRoot}const Kc=new Set(["inline","contents"]);function gt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Kc.has(o)}const Qc=new Set(["table","td","th"]);function Xc(e){return Qc.has(it(e))}const Yc=[":popover-open",":modal"];function Ht(e){return Yc.some(t=>{try{return e.matches(t)}catch{return!1}})}const Zc=["transform","translate","scale","rotate","perspective"],Jc=["transform","translate","scale","rotate","perspective","filter"],el=["paint","layout","strict","content"];function Gn(e){const t=Kn(),n=ae(e)?ce(e):e;return Zc.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Jc.some(r=>(n.willChange||"").includes(r))||el.some(r=>(n.contain||"").includes(r))}function tl(e){let t=Te(e);for(;ge(t)&&!tt(t);){if(Gn(t))return t;if(Ht(t))return null;t=Te(t)}return null}function Kn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const nl=new Set(["html","body","#document"]);function tt(e){return nl.has(it(e))}function ce(e){return oe(e).getComputedStyle(e)}function Vt(e){return ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Te(e){if(it(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$r(e)&&e.host||ve(e);return $r(t)?t.host:t}function $o(e){const t=Te(e);return tt(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&>(t)?t:$o(t)}function ft(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=$o(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=oe(o);if(s){const a=Mn(i);
81return t.concat(i,i.visualViewport||[],gt(o)?o:[],a&&n?ft(a):[])}return t.concat(o,ft(o,[],n))}function Mn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fo(e){const t=ce(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ge(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Mt(n)!==s||Mt(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Qn(e){return ae(e)?e:e.contextElement}function Qe(e){const t=Qn(e);if(!ge(t))return me(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Fo(t);let i=(s?Mt(n.width):n.width)/r,a=(s?Mt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const rl=me(0);function Wo(e){const t=oe(e);return!Kn()||!t.visualViewport?rl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ol(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==oe(e)?!1:t}function Be(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Qn(e);let i=me(1);t&&(r?ae(r)&&(i=Qe(r)):i=Qe(e));const a=ol(s,n,r)?Wo(s):me(0);let u=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(s){const h=oe(s),m=r&&ae(r)?oe(r):r;let b=h,g=Mn(b);for(;g&&r&&m!==b;){const v=Qe(g),y=g.getBoundingClientRect(),x=ce(g),w=y.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,C=y.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;u*=v.x,l*=v.y,f*=v.x,p*=v.y,u+=w,l+=C,b=oe(g),g=Mn(b)}}return It({width:f,height:p,x:u,y:l})}function qt(e,t){const n=Vt(e).scrollLeft;return t?t.left+n:Be(ve(e)).left+n}function Bo(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-qt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function sl(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=ve(r),a=t?Ht(t.floating):!1;if(r===i||a&&s)return n;let u={scrollLeft:0,scrollTop:0},l=me(1);const f=me(0),p=ge(r);if((p||!p&&!s)&&((it(r)!=="body"||gt(i))&&(u=Vt(r)),ge(r))){const m=Be(r);l=Qe(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const h=i&&!p&&!s?Bo(i,u):me(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+f.x+h.x,y:n.y*l.y-u.scrollTop*l.y+f.y+h.y}}function il(e){return Array.from(e.getClientRects())}function al(e){const t=ve(e),n=Vt(e),r=e.ownerDocument.body,o=re(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=re(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+qt(e);const a=-n.scrollTop;return ce(r).direction==="rtl"&&(i+=re(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Fr=25;function cl(e,t){const n=oe(e),r=ve(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,u=0;if(o){s=o.width,i=o.height;const f=Kn();(!f||f&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const l=qt(r);if(l<=0){const f=r.ownerDocument,p=f.body,h=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-m);b<=Fr&&(s-=b)}else l<=Fr&&(s+=l);return{width:s,height:i,x:a,y:u}}const ll=new Set(["absolute","fixed"]);function ul(e,t){const n=Be(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ge(e)?Qe(e):me(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,u=o*s.x,l=r*s.y;return{width:i,height:a,x:u,y:l}}function Wr(e,t,n){let r;if(t==="viewport")r=cl(e,n);else if(t==="document")r=al(ve(e));else if(ae(t))r=ul(t,n);else{const o=Wo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return It(r)}function Uo(e,t){const n=Te(e);return n===t||!ae(n)||tt(n)?!1:ce(n).position==="fixed"||Uo(n,t)}function dl(e,t){const n=t.get(e);if(n)return n;let r=ft(e,[],!1).filter(a=>ae(a)&&it(a)!=="body"),o=null;const s=ce(e).position==="fixed";let i=s?Te(e):e;for(;ae(i)&&!tt(i);){const a=ce(i),u=Gn(i);!u&&a.position==="fixed"&&(o=null),(s?!u&&!o:!u&&a.position==="static"&&!!o&&ll.has(o.position)||gt(i)&&!u&&Uo(e,i))?r=r.filter(f=>f!==i):o=a,i=Te(i)}return t.set(e,r),r}function fl(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Ht(t)?[]:dl(t,this._c):[].concat(n),r],a=i[0],u=i.reduce((l,f)=>{const p=Wr(t,f,o);return l.top=re(p.top,l.top),l.right=je(p.right,l.right),l.bottom=je(p.bottom,l.bottom),l.left=re(p.left,l.left),l},Wr(t,a,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function pl(e){const{width:t,height:n}=Fo(e);return{width:t,height:n}}function hl(e,t,n){const r=ge(t),o=ve(t),s=n==="fixed",i=Be(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const u=me(0);function l(){u.x=qt(o)}
81if(r||!r&&!s)if((it(t)!=="body"||gt(o))&&(a=Vt(t)),r){const m=Be(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&l();s&&!r&&o&&l();const f=o&&!r&&!s?Bo(o,a):me(0),p=i.left+a.scrollLeft-u.x-f.x,h=i.top+a.scrollTop-u.y-f.y;return{x:p,y:h,width:i.width,height:i.height}}function an(e){return ce(e).position==="static"}function Br(e,t){if(!ge(e)||ce(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ve(e)===n&&(n=n.ownerDocument.body),n}function zo(e,t){const n=oe(e);if(Ht(e))return n;if(!ge(e)){let o=Te(e);for(;o&&!tt(o);){if(ae(o)&&!an(o))return o;o=Te(o)}return n}let r=Br(e,t);for(;r&&Xc(r)&&an(r);)r=Br(r,t);return r&&tt(r)&&an(r)&&!Gn(r)?n:r||tl(e)||n}const ml=async function(e){const t=this.getOffsetParent||zo,n=this.getDimensions,r=await n(e.floating);return{reference:hl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gl(e){return ce(e).direction==="rtl"}const vl={convertOffsetParentRelativeRectToViewportRelativeRect:sl,getDocumentElement:ve,getClippingRect:fl,getOffsetParent:zo,getElementRects:ml,getClientRects:il,getDimensions:pl,getScale:Qe,isElement:ae,isRTL:gl};function Ho(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bl(e,t){let n=null,r;const o=ve(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),s();const l=e.getBoundingClientRect(),{left:f,top:p,width:h,height:m}=l;if(a||t(),!h||!m)return;const b=yt(p),g=yt(o.clientWidth-(f+h)),v=yt(o.clientHeight-(p+m)),y=yt(f),w={rootMargin:-b+"px "+-g+"px "+-v+"px "+-y+"px",threshold:re(0,je(1,u))||1};let C=!0;function S(N){const R=N[0].intersectionRatio;if(R!==u){if(!C)return i();R?i(!1,R):r=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!Ho(l,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return i(!0),s}function yl(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Qn(e),f=o||s?[...l?ft(l):[],...ft(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const p=l&&a?bl(l,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),l&&!u&&m.observe(l),m.observe(t));let b,g=u?Be(e):null;u&&v();function v(){const y=Be(e);g&&!Ho(g,y)&&n(),g=y,b=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(b)}}const xl=Hc,wl=Vc,Cl=Bc,El=Gc,Rl=Uc,Ur=Wc,Sl=qc,Nl=(e,t,n)=>{const r=new Map,o={platform:vl,...n},s={...o.platform,_c:r};return Fc(e,t,{...o,platform:s})};var Al=typeof document<"u",Pl=function(){},_t=Al?c.useLayoutEffect:Pl;function Lt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Lt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Lt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Vo(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zr(e,t){const n=Vo(e);return Math.round(t*n)/n}function cn(e){const t=c.useRef(e);return _t(()=>{t.current=e}),t}function Ol(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:u,open:l}=e,[f,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=c.useState(r);Lt(h,r)||m(r);const[b,g]=c.useState(null),[v,y]=c.useState(null),x=c.useCallback(j=>{j!==N.current&&(N.current=j,g(j))},[]),w=c.useCallback(j=>{j!==R.current&&(R.current=j,y(j))},[]),C=s||b,S=i||v,N=c.useRef(null),R=c.useRef(null),k=c.useRef(f),A=u!=null,O=cn(u),M=cn(o),P=cn(l),B=c.useCallback(()=>
81{if(!N.current||!R.current)return;const j={placement:t,strategy:n,middleware:h};M.current&&(j.platform=M.current),Nl(N.current,R.current,j).then(z=>{const ne={...z,isPositioned:P.current!==!1};L.current&&!Lt(k.current,ne)&&(k.current=ne,Bn.flushSync(()=>{p(ne)}))})},[h,t,n,M,P]);_t(()=>{l===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,p(j=>({...j,isPositioned:!1})))},[l]);const L=c.useRef(!1);_t(()=>(L.current=!0,()=>{L.current=!1}),[]),_t(()=>{if(C&&(N.current=C),S&&(R.current=S),C&&S){if(O.current)return O.current(C,S,B);B()}},[C,S,B,O,A]);const G=c.useMemo(()=>({reference:N,floating:R,setReference:x,setFloating:w}),[x,w]),W=c.useMemo(()=>({reference:C,floating:S}),[C,S]),U=c.useMemo(()=>{const j={position:n,left:0,top:0};if(!W.floating)return j;const z=zr(W.floating,f.x),ne=zr(W.floating,f.y);return a?{...j,transform:"translate("+z+"px, "+ne+"px)",...Vo(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:ne}},[n,a,W.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:B,refs:G,elements:W,floatingStyles:U}),[f,B,G,W,U])}const _l=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ur({element:r.current,padding:o}).fn(n):{}:r?Ur({element:r,padding:o}).fn(n):{}}}},kl=(e,t)=>({...xl(e),options:[e,t]}),jl=(e,t)=>({...wl(e),options:[e,t]}),Tl=(e,t)=>
81({...Sl(e),options:[e,t]}),Ml=(e,t)=>({...Cl(e),options:[e,t]}),Dl=(e,t)=>({...El(e),options:[e,t]}),Il=(e,t)=>({...Rl(e),options:[e,t]}),Ll=(e,t)=>({..._l(e),options:[e,t]});var $l="Arrow",qo=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return d.jsx(De.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});qo.displayName=$l;var Fl=qo;function Wl(e,t=[]){let n=[];function r(s,i){const a=c.createContext(i),u=n.length;n=[...n,i];function l(p){const{scope:h,children:m,...b}=p,g=(h==null?void 0:h[e][u])||a,v=c.useMemo(()=>b,Object.values(b));return d.jsx(g.Provider,{value:v,children:m})}function f(p,h){const m=(h==null?void 0:h[e][u])||a,b=c.useContext(m);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return l.displayName=s+"Provider",[l,f]}const o=()=>{const s=n.map(i=>c.createContext(i));return function(a){const u=(a==null?void 0:a[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return o.scopeName=e,[r,Bl(o,...t)]}function Bl(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:u,scopeName:l})=>{const p=u(s)[`__scope${l}`];return{...a,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Xn="Popper",[Go,Ko]=Wl(Xn),[Ul,Qo]=Go(Xn),Xo=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return d.jsx(Ul,{scope:t,anchor:r,onAnchorChange:o,children:n})};Xo.displayName=Xn;var Yo="PopperAnchor",Zo=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Qo(Yo,n),i=c.useRef(null),a=He(t,i);return c.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:d.jsx(De.div,{...o,ref:a})});Zo.displayName=Yo;var Yn="PopperContent",[zl,Hl]=Go(Yn),Jo=c.forwardRef((e,t)=>{var dr,fr,pr,hr,mr,gr;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:b,...g}=e,v=Qo(Yn,n),[y,x]=c.useState(null),w=He(t,at=>x(at)),[C,S]=c.useState(null),N=lc(C),R=(N==null?void 0:N.width)??0,k=(N==null?void 0:N.height)??0,A=r+(s!=="center"?"-"+s:""),O=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},M=Array.isArray(l)?l:[l],P=M.length>0,B={padding:O,boundary:M.filter(ql),altBoundary:P},{refs:L,floatingStyles:G,placement:W,isPositioned:U,middlewareData:j}=Ol({strategy:"fixed",placement:A,whileElementsMounted:(...at)=>yl(...at,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[kl({mainAxis:o+k,alignmentAxis:i}),u&&jl({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Tl():void 0,...B}),u&&Ml({...B}),Dl({...B,apply:({elements:at,rects:vr,availableWidth:Ti,availableHeight:Mi})=>{const{width:Di,height:Ii}=vr.reference,bt=at.floating.style;bt.setProperty("--radix-popper-available-width",`${Ti}px`),bt.setProperty("--radix-popper-available-height",`${Mi}px`),bt.setProperty("--radix-popper-anchor-width",`${Di}px`),bt.setProperty("--radix-popper-anchor-height",`${Ii}px`)}}),C&&Ll({element:C,padding:a}),Gl({arrowWidth:R,arrowHeight:k}),h&&Il({strategy:"referenceHidden",...B})]}),[z,ne]=ns(W),Y=ot(b);We(()=>{U&&(Y==null||Y())},[U,Y]);const Pi=(dr=j.arrow)==null?void 0:dr.x,Oi=(fr=j.arrow)==null?void 0:fr.y,_i=((pr=j.arrow)==null?void 0:pr.centerOffset)!==0,[ki,ji]=c.useState();return We(()=>{y&&ji(window.getComputedStyle(y).zIndex)},[y]),d.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:U?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ki,"--radix-popper-transform-origin":[(hr=j.transformOrigin)==null?void 0:hr.x,(mr=j.transformOrigin)==null?void 0:mr.y].join(" "),...((gr=j.hide)==null?void 0:gr.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(zl,{scope:n,placedSide:z,onArrowChange:S,arrowX:Pi,arrowY:Oi,shouldHideArrow:_i,children:d.jsx(De.div,{"data-side":z,"data-align":ne,...g,ref:w,style:{...g.style,animation:U?void 0:"none"}})})})});Jo.displayName=Yn;var es="PopperArrow",Vl={top:"bottom",right:"left",bottom:"top",left:"r
81ight"},ts=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Hl(es,r),i=Vl[s.placedSide];return d.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:d.jsx(Fl,{...o,ref:n,style:{...o.style,display:"block"}})})});ts.displayName=es;function ql(e){return e!==null}var Gl=e=>({name:"transformOrigin",options:e,fn(t){var v,y,x;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[l,f]=ns(n),p={start:"0%",center:"50%",end:"100%"}[f],h=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,m=(((x=o.arrow)==null?void 0:x.y)??0)+u/2;let b="",g="";return l==="bottom"?(b=i?p:`${h}px`,g=`${-u}px`):l==="top"?(b=i?p:`${h}px`,g=`${r.floating.height+u}px`):l==="right"?(b=`${-u}px`,g=i?p:`${m}px`):l==="left"&&(b=`${r.floating.width+u}px`,g=i?p:`${m}px`),{data:{x:b,y:g}}}});function ns(e){const[t,n="center"]=e.split("-");return[t,n]}var Kl=Xo,Ql=Zo,Xl=Jo,Yl=ts,Zl="Portal",rs=c.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=c.useState(!1);We(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?lo.createPortal(d.jsx(De.div,{...r,ref:t}),i):null});rs.displayName=Zl;function Jl(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Zn=e=>{const{present:t,children:n}=e,r=eu(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=He(r.ref,tu(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};Zn.displayName="Presence";function eu(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,u]=Jl(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=xt(r.current);s.current=a==="mounted"?l:"none"},[a]),We(()=>{const l=r.current,f=o.current;if(f!==e){const h=s.current,m=xt(l);e?u("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),We(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,p=m=>{const g=xt(r.current).includes(m.animationName);if(m.target===t&&g&&(u("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(s.current=xt(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function xt(e){return(e==null?void 0:e.animationName)||"none"}function tu(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nu="VisuallyHidden",os=c.forwardRef((e,t)=>d.jsx(De.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));os.displayName=nu;var ru=os,[Gt]=sc("Tooltip",[Ko]),Kt=Ko(),ss="TooltipProvider",ou=700,Dn="tooltip.open",[su,Jn]=Gt(ss),is=e=>{const{__scopeTooltip:t,delayDuration:n=ou,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,[i,a]=c.useState(!0),u=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const f=l.current;return()=>window.clearTimeout(f)},[]),d.jsx(su,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:c.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:s})};is.displayName=ss;var Qt="Tooltip",[iu,vt]=Gt(Qt),as=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,u=Jn(Qt,e.__scopeTooltip),l=Kt(t),[f,p]=c.useState(null),h=Nc(),m=c.useRef(0),b=i??u.disableHoverableContent,g=a??u.delayDuration,v=c.useRef(!1),[y=!1,x]=ac({prop:r,defaultProp:o,onChange:R=>{R?(u.onOpen(),document.dispatchEvent(new CustomEvent(Dn))):u.onClose(),s==null||s(R)}}),w=c.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),C=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,x(!0)},[x]),S=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),N=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,x(!0),m.current=0},g)},[g,x]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),d.jsx(Kl,{...l,children:d.jsx(iu,{scope:t,contentId:h,open:y,stateAttribute:w,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayed?N():C()},[u.isOpenDelayed,N,C]),onTriggerLeave:c.useCallback(()=>{b?S():(window.clearTimeout(m.current),m.current=0)},[S,b]),onOpen:C,onClose:S,disableHoverableContent:b,children:n})})};as.displayName=Qt;var In="TooltipTrigger",cs=c.forwardRef((e,t)=>
81{const{__scopeTooltip:n,...r}=e,o=vt(In,n),s=Jn(In,n),i=Kt(n),a=c.useRef(null),u=He(t,a,o.onTriggerChange),l=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>l.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),d.jsx(Ql,{asChild:!0,...i,children:d.jsx(De.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:ye(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:ye(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:ye(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:ye(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:ye(e.onBlur,o.onClose),onClick:ye(e.onClick,o.onClose)})})});cs.displayName=In;var er="TooltipPortal",[au,cu]=Gt(er,{forceMount:void 0}),ls=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=vt(er,t);return d.jsx(au,{scope:t,forceMount:n,children:d.jsx(Zn,{present:n||s.open,children:d.jsx(rs,{asChild:!0,container:o,children:r})})})};ls.displayName=er;var nt="TooltipContent",us=c.forwardRef((e,t)=>{const n=cu(nt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=vt(nt,e.__scopeTooltip);return d.jsx(Zn,{present:r||i.open,children:i.disableHoverableContent?d.jsx(ds,{side:o,...s,ref:t}):d.jsx(lu,{side:o,...s,ref:t})})}),lu=c.forwardRef((e,t)=>{const n=vt(nt,e.__scopeTooltip),r=Jn(nt,e.__scopeTooltip),o=c.useRef(null),s=He(t,o),[i,a]=c.useState(null),{trigger:u,onClose:l}=n,f=o.current,{onPointerInTransitChange:p}=r,h=c.useCallback(()=>{a(null),p(!1)},[p]),m=c.useCallback((b,g)=>{const v=b.currentTarget,y={x:b.clientX,y:b.clientY},x=pu(y,v.getBoundingClientRect()),w=hu(y,x),C=mu(g.getBoundingClientRect()),S=vu([...w,...C]);a(S),p(!0)},[p]);return c.useEffect(()=>()=>h(),[h]),c.useEffect(()=>{if(u&&f){const b=v=>m(v,f),g=v=>m(v,u);return u.addEventListener("pointerleave",b),f.addEventListener("pointerleave",g),()=>{u.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",g)}}},[u,f,m,h]),c.useEffect(()=>{if(i){const b=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},x=(u==null?void 0:u.contains(v))||(f==null?void 0:f.contains(v)),w=!gu(y,i);x?h():w&&(h(),l())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[u,f,i,l,h]),d.jsx(ds,{...e,ref:s})}),[uu,du]=Gt(Qt,{isInside:!1}),ds=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,u=vt(nt,n),l=Kt(n),{onClose:f}=u;return c.useEffect(()=>(document.addEventListener(Dn,f),()=>document.removeEventListener(Dn,f)),[f]),c.useEffect(()=>{if(u.trigger){const p=h=>{const m=h.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),d.jsx(To,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:d.jsxs(Xl,{"data-state":u.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(ko,{children:r}),d.jsx(uu,{scope:n,isInside:!0,children:d.jsx(ru,{id:u.contentId,role:"tooltip",children:o||r})})]})})});us.displayName=nt;var fs="TooltipArrow",fu=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Kt(n);return du(fs,n).isInside?null:d.jsx(Yl,{...o,...r,ref:t})});fu.displayName=fs;function pu(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function hu(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function mu(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function gu(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s].x,u=t[s].y,l=t[i].x,f=t[i].y;u>r!=f>r&&n<(l-a)*(r-u)/(f-u)+a&&(o=!o)}return o}function vu(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),bu(t)}function bu(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var yu=is,ps=as,hs=cs,xu=ls,ms=us;const wu=yu,gs=c.createContext(null),vs=({open:e,defaultOpen:t,onOpenChange:n,children:r,...o}
81)=>{const[s,i]=c.useState(t??!1),a=e!==void 0,u=a?e:s,l=c.useCallback(p=>{a||i(p),n==null||n(p)},[a,n]),f=c.useMemo(()=>({open:u,setOpen:l}),[u,l]);return d.jsx(gs.Provider,{value:f,children:d.jsx(ps,{open:u,onOpenChange:l,...o,children:r})})};vs.displayName=ps.displayName;const bs=c.forwardRef(({onPointerDown:e,onClick:t,...n},r)=>{const o=c.useContext(gs),s=c.useRef({touch:!1,wasOpen:!1});return d.jsx(hs,{ref:r,...n,onPointerDown:i=>{e==null||e(i),s.current={touch:i.pointerType==="touch"||i.pointerType==="pen",wasOpen:(o==null?void 0:o.open)??!1}},onClick:i=>{t==null||t(i),!(!o||!s.current.touch||i.defaultPrevented)&&(i.preventDefault(),o.setOpen(!s.current.wasOpen))}})});bs.displayName=hs.displayName;const ys=c.forwardRef(({className:e,sideOffset:t=4,collisionPadding:n=8,...r},o)=>d.jsx(xu,{children:d.jsx(ms,{ref:o,sideOffset:t,collisionPadding:n,className:X("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...r})}));ys.displayName=ms.displayName;function vp({className:e,...t}){return d.jsx("div",{className:X("animate-pulse rounded-md bg-primary/10",e),...t})}var wt={};function xs(){return typeof window<"u"?"":typeof process<"u"&&(wt!=null&&wt.RAILS_BASE_URL)?wt.RAILS_BASE_URL:"http://localhost:3100"}class ln extends Error{constructor(n,r,o,s=!1){super(r);K(this,"status");K(this,"code");if(this.status=n,this.code=o,s)this.name="ConnectionError";else switch(n){case 401:this.name="AuthenticationError";break;case 403:this.name="ForbiddenError";break;case 404:this.name="NotFoundError";break;case 422:this.name="UnprocessableError";break;default:this.name="InternalError"}}}class Cu{constructor(t={}){K(this,"baseUrl",`${xs()}/storefront_api/v1/`);K(this,"securityData",null);K(this,"securityWorker");K(this,"abortControllers",new Map);K(this,"customFetch",(...t)=>fetch(...t));K(this,"baseApiParams",{credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"});K(this,"setSecurityData",t=>{this.securityData=t});K(this,"contentFormatters",{"application/json":t=>t!==null&&(typeof t=="object"||typeof t=="string")?JSON.stringify(t):t,"text/plain":t=>t!==null&&typeof t!="string"?JSON.stringify(t):t,"multipart/form-data":t=>Object.keys(t||{}).reduce((n,r)=>{const o=t[r];return n.append(r,o instanceof Blob?o:typeof o=="object"&&o!==null?JSON.stringify(o):`${o}`),n},new FormData),"application/x-www-form-urlencoded":t=>this.toQueryString(t)});K(this,"createAbortSignal",t=>{if(this.abortControllers.has(t)){const r=this.abortControllers.get(t);return r?r.signal:void 0}const n=new AbortController;return this.abortControllers.set(t,n),n.signal});K(this,"abortRequest",t=>{const n=this.abortControllers.get(t);n&&(n.abort(),this.abortControllers.delete(t))});K(this,"request",async({body:t,secure:n,path:r,type:o,query:s,format:i,baseUrl:a,cancelToken:u,returnHeaders:l,...f})=>{const p=(typeof n=="boolean"?n:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{}
81,h=this.mergeRequestParams(f,p),m=s&&this.toQueryString(s),b=this.contentFormatters[o||"application/json"],g=i||h.format;return this.customFetch(`${a||this.baseUrl||""}${r}${m?`?${m}`:""}`,{...h,headers:{...h.headers||{},...o&&o!=="multipart/form-data"?{"Content-Type":o}:{}},signal:(u?this.createAbortSignal(u):h.signal)||null,body:typeof t>"u"||t===null?null:b(t)}).then(async v=>{let y=null;const x=!g||v.status==204?null:await v[g]().then(w=>(v.ok||(y=new ln(v.status,w==null?void 0:w.message,w==null?void 0:w.error)),w)).catch(w=>{y=new ln(v.status,"Something went wrong",(w==null?void 0:w.code)??"")});if(u&&this.abortControllers.delete(u),y!=null)throw y;if(!v.ok)throw x;return l?{...x,response_headers:v.headers,response_status:v.status}:x}).catch(v=>{throw v.name==="TypeError"&&v.message==="Failed to fetch"?new ln(0,"Failed to fetch","TypeError",!0):v})});Object.assign(this,t)}encodeQueryParam(t,n){return`${encodeURIComponent(t)}=${encodeURIComponent(typeof n=="number"?n:`${n}`)}`}addQueryParam(t,n){return this.encodeQueryParam(n,t[n])}addArrayQueryParam(t,n){return t[n].map(o=>this.encodeQueryParam(n,o)).join("&")}toQueryString(t){const n=t||{};return Object.keys(n).filter(o=>typeof n[o]<"u").map(o=>Array.isArray(n[o])?this.addArrayQueryParam(n,o):this.addQueryParam(n,o)).join("&")}addQueryParams(t){const n=this.toQueryString(t);return n?`?${n}`:""}
81mergeRequestParams(t,n){return{...this.baseApiParams,...t,...n||{},headers:{...this.baseApiParams.headers||{},...t.headers||{},...n&&n.headers||{}}}}}class Eu extends Cu{constructor(){super(...arguments);K(this,"checkout",{bootstrap:(n,r={})=>this.request({path:"checkout.bootstrap",method:"GET",query:n,secure:!0,format:"json",returnHeaders:!1,...r}),csrf:(n,r={})=>this.request({path:"checkout.csrf",method:"GET",query:n,secure:!0,format:"json",returnHeaders:!1,...r}),translations:(n,r={})=>this.request({path:"checkout.translations",method:"GET",query:n,secure:!0,format:"json",returnHeaders:!1,...r}),payment_setup:(n,r={})=>this.request({path:"checkout.payment_setup",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),sign_up:(n,r={})=>this.request({path:"checkout.sign_up",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),sign_in:(n,r={})=>this.request({path:"checkout.sign_in",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),passwordless_email:(n,r={})=>this.request({path:"checkout.passwordless_email",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),configure:(n,r={})=>this.request({path:"checkout.configure",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),edit_product_config:(n,r={})=>this.request({path:"checkout.edit_product_config",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),discount:(n,r={})=>this.request({path:"checkout.discount",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),remove_discount:(n,r={})=>this.request({path:"checkout.remove_discount",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),cover_fees:(n,r={})=>this.request({path:"checkout.cover_fees",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),refresh_price:(n,r={})=>this.request({path:"checkout.refresh_price",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),remove_payment_method:(n,r={})=>this.request({path:"checkout.remove_payment_method",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),upsell:(n,r={})=>this.request({path:"checkout.upsell",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),accept_upsell:(n,r={})=>this.request({path:"checkout.accept_upsell",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),decline_upsell:(n,r={})=>this.request({path:"checkout.decline_upsell",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),purchase:(n,r={})=>this.request({path:"checkout.purchase",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),approve_payment:(n,r={})=>this.request({path:"checkout.approve_payment",method:"POST",body:n,secure:!0,type:"application/json",format:"json",returnHeaders:!1,...r}),success_payload:(n,r={})=>this.request({path:"checkout.success_payload",method:"GET",query:n,secure:!0,format:"json",returnHeaders:!1,...r}),async_setup_payload:(n,r={})=>this.request({path:"checkout.async_setup_payload",method:"GET",query:n,secure:!0,format:"json",returnHeaders:!1,...r})})}}function Ru(e){const t=Number(e.headers.get("Retry-After")??"1");return Number.isFinite(t)&&t>=0?t*1e3:1e3}async function Su(e){if(e.status!==422)return!1;const t=await e.clone().json().catch(()=>null);return(t==null?void 0:t.error)==="invalid_csrf"}async function Nu(){try{const{csrf_token:e}=await q.checkout.csrf({});return Pu(e),e||null}catch{return null}}const Au=async(e,t)=>{let n=await fetch(e,t);if(n.status===409&&(await new Promise(r=>setTimeout(r,Ru(n))),n=await fetch(e,t)),await Su(n)){const r=await Nu();if(r){const o=new Headers(t==null?void 0:t.headers);o.set("X-CSRF-Token",r),n=await fetch(e,{...t,headers:o})}}return n.status===422?new Response(await n.text(),{status:200,headers:{"Content-Type":"application/json"}}):n},q=new Eu({baseUrl:`${xs()}/storefront_api/v1/`,customFetch:Au,securityWorker:e=>e?{headers:{"X-CSRF-Token":e}}:{},baseApiParams:{headers:{Accept:"application/json"},credentials:"same-origin",format:"json"}});function Pu(e){q.setSecurityData(e||null)}function tr(e){return e!=null&&e.token?e.checkbox?{"g-recaptcha-response":e.token}:{"g-recaptcha-response-data":{[e.action]:e.token}}:{}}function Ou(e){return ee({mutationFn:async()=>await q.checkout.accept_upsell({id:e})})}function _u(e){return ee({mutationFn:async t=>await q.checkout.configure({id:e,...t})})}function ku(e){return ee({mutationFn:async t=>await q.checkout.cover_fees({id:e,cover_fees:t?"on":"off"})})}function ju(e){return ho({queryKey:["checkout","csrf",e??""],queryFn:async()=>(await q.checkout.csrf(e?{id:e}:{})).csrf_token??"",staleTime:1/0,retry:!1,refetchOnWindowFocus:!1})}function Tu(e){return ee({mutationFn:async()=>await q.checkout.decline_upsell({id:e})})}function Mu(e){return ee({mutationFn:async({code:t})=>t?await q.checkout.discount({id:e,form:{code:t}}):await q.checkout.remove_discount({id:e})})}function Du(e){return ee({mutationFn:async()=>await q.checkout.edit_product_config({id:e})})}function Iu(e){return ee({mutationFn:async({email:t,captcha:n})=>await q.checkout.passwordless_email({id:e,form:{email:t},...tr(n)})})}function Lu(e){return ee({mutationFn:async()=>await q.checkout.payment_setup({id:e})})}function $u(e){return ee({mutationFn:async(t={})=>await q.checkout.purchase({id:e,...t})})}function Fu(e){return ee({mutationFn:async t=>await q.checkout.refresh_price({id:e,...t})})}function Wu(e){return ee({mutationFn:async t=>await q.checkout.remove_payment_method({id:e,payment_type:t})})}function Bu(e){return ee({mutationFn:async({form:t,captcha:n})=>await q.checkout.sign_in({id:e,form:t,...tr(n)})})}function Uu(e){return ee({mutationFn:async({form:t,captcha:n})=>await q.checkout.sign_up({id:e,form:t,...tr(n)})})}function zu(e,t){return ho({queryKey:["checkout","success",e,t],queryFn:async()=>{const n=new URLSearchParams(t);return await q.checkout.success_payload({id:e,payment_intent:n.get("payment_intent")??void 0,redirect_status:n.get("redirect_status")??void 0,subscription:n.get("subscription")??void 0})},staleTime:1/0,retry:!1,refetchOnWindowFocus:!1})}function Hu(e){return ee({mutationFn:async()=>await q.checkout.upsell({id:e})})}function bp(){return{csrfToken:ju,signUp:Uu,signIn:Bu,passwordlessEmail:Iu,discount:Mu,coverFees:ku,configure:_u,editProductConfig:Du,refreshPrice:Fu,removePaymentMethod:Wu,paymentSetup:Lu,upsellPreview:Hu,acceptUpsell:Ou,declineUpsell:Tu,purchase:$u,successPayload:zu}}function ke(e,t,{checkForDefaultPrevented:n=!0}={}
81){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Hr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ws(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Hr(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Hr(e[o],null)}}}}function se(...e){return c.useCallback(ws(...e),e)}function Vu(e,t){const n=c.createContext(t),r=s=>{const{children:i,...a}=s,u=c.useMemo(()=>a,Object.values(a));return d.jsx(n.Provider,{value:u,children:i})};r.displayName=e+"Provider";function o(s){const i=c.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Xt(e,t=[]){let n=[];function r(s,i){const a=c.createContext(i),u=n.length;n=[...n,i];const l=p=>{var y;const{scope:h,children:m,...b}=p,g=((y=h==null?void 0:h[e])==null?void 0:y[u])||a,v=c.useMemo(()=>b,Object.values(b));return d.jsx(g.Provider,{value:v,children:m})};l.displayName=s+"Provider";function f(p,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[u])||a,b=c.useContext(m);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[l,f]}const o=()=>{const s=n.map(i=>c.createContext(i));return function(a){const u=(a==null?void 0:a[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return o.scopeName=e,[r,qu(o,...t)]}function qu(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:u,scopeName:l})=>{const p=u(s)[`__scope${l}`];return{...a,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Me=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Gu=Wn[" useId ".trim().toString()]||(()=>{}),Ku=0;function dt(e){const[t,n]=c.useState(Gu());return Me(()=>{n(r=>r??String(Ku++))},[e]),t?`radix-${t}`:""}var Qu=Wn[" useInsertionEffect ".trim().toString()]||Me;function Yt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Xu({defaultProp:t,onChange:n}),a=e!==void 0,u=a?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const p=f.current;p!==a&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. 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.`),f.current=a},[a,r])}const l=c.useCallback(f=>{var p;if(a){const h=Yu(f)?f(e):f;h!==e&&((p=i.current)==null||p.call(i,h))}else s(f)},[a,e,s,i]);return[u,l]}function Xu({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),s=c.useRef(t);return Qu(()=>{s.current=t},[t]),c.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function Yu(e){return typeof e=="function"}function $t(e){const t=Zu(e),n=c.forwardRef((r,o)=>{const{children:s,...i}=r,a=c.Children.toArray(s),u=a.find(ed);if(u){const l=u.props.children,f=a.map(p=>p===u?c.Children.count(l)>1?c.Children.only(null):c.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...i,ref:o,children:c.isValidElement(l)?c.cloneElement(l,void 0,f):null})}return d.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Zu(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n;if(c.isValidElement(o)){const i=nd(o),a=td(s,o.props);return o.type!==c.Fragment&&(a.ref=r?ws(r,i):i),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ju=Symbol("radix.slottable");function ed(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ju}function td(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const u=s(...a);return o(...a),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}
81function nd(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],te=rd.reduce((e,t)=>{const n=$t(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(u,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function od(e,t){e&&Bn.flushSync(()=>e.dispatchEvent(t))}function pt(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function sd(e,t=globalThis==null?void 0:globalThis.document){const n=pt(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var id="DismissableLayer",Ln="dismissableLayer.update",ad="dismissableLayer.pointerDownOutside",cd="dismissableLayer.focusOutside",Vr,Cs=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Es=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...u}=e,l=c.useContext(Cs),[f,p]=c.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),b=se(t,R=>p(R)),g=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),x=f?g.indexOf(f):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,C=x>=y,S=dd(R=>{const k=R.target,A=[...l.branches].some(O=>O.contains(k));!C||A||(o==null||o(R),i==null||i(R),R.defaultPrevented||a==null||a())},h),N=fd(R=>{const k=R.target;[...l.branches].some(O=>O.contains(k))||(s==null||s(R),i==null||i(R),R.defaultPrevented||a==null||a())},h);return sd(R=>{x===l.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},h),c.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Vr=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),qr(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Vr)}},[f,h,n,l]),c.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),qr())},[f,l]),c.useEffect(()=>{const R=()=>m({});return document.addEventListener(Ln,R),()=>document.removeEventListener(Ln,R)},[]),d.jsx(te.div,{...u,ref:b,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:ke(e.onFocusCapture,N.onFocusCapture),onBlurCapture:ke(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:ke(e.onPointerDownCapture,S.onPointerDownCapture)})});Es.displayName=id;var ld="DismissableLayerBranch",ud=c.forwardRef((e,t)=>{const n=c.useContext(Cs),r=c.useRef(null),o=se(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),d.jsx(te.div,{...e,ref:o})});ud.displayName=ld;function dd(e,t=globalThis==null?void 0:globalThis.document){const n=pt(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let u=function(){Rs(ad,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function fd(e,t=globalThis==null?void 0:globalThis.document){const n=pt(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&Rs(cd,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function qr(){const e=new CustomEvent(Ln);document.dispatchEvent(e)}function Rs(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?od(o,s):o.dispatchEvent(s)}var un="focusScope.autoFocusOnMount",dn="focusScope.autoFocusOnUnmount",Gr={bubbles:!1,cancelable:!0},pd="FocusScope",Ss=c.forwardRef((e,t)=>
81{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,u]=c.useState(null),l=pt(o),f=pt(s),p=c.useRef(null),h=se(t,g=>u(g)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let g=function(w){if(m.paused||!a)return;const C=w.target;a.contains(C)?p.current=C:Ne(p.current,{select:!0})},v=function(w){if(m.paused||!a)return;const C=w.relatedTarget;C!==null&&(a.contains(C)||Ne(p.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&Ne(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const x=new MutationObserver(y);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),x.disconnect()}}},[r,a,m.paused]),c.useEffect(()=>{if(a){Qr.add(m);const g=document.activeElement;if(!a.contains(g)){const y=new CustomEvent(un,Gr);a.addEventListener(un,l),a.dispatchEvent(y),y.defaultPrevented||(hd(yd(Ns(a)),{select:!0}),document.activeElement===g&&Ne(a))}return()=>{a.removeEventListener(un,l),setTimeout(()=>{const y=new CustomEvent(dn,Gr);a.addEventListener(dn,f),a.dispatchEvent(y),y.defaultPrevented||Ne(g??document.body,{select:!0}),a.removeEventListener(dn,f),Qr.remove(m)},0)}}},[a,l,f,m]);const b=c.useCallback(g=>{if(!n&&!r||m.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(v&&y){const x=g.currentTarget,[w,C]=md(x);w&&C?!g.shiftKey&&y===C?(g.preventDefault(),n&&Ne(w,{select:!0})):g.shiftKey&&y===w&&(g.preventDefault(),n&&Ne(C,{select:!0})):y===x&&g.preventDefault()}},[n,r,m.paused]);return d.jsx(te.div,{tabIndex:-1,...i,ref:h,onKeyDown:b})});Ss.displayName=pd;function hd(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ne(r,{select:t}),document.activeElement!==n)return}function md(e){const t=Ns(e),n=Kr(t,e),r=Kr(t.reverse(),e);return[n,r]}function Ns(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kr(e,t){for(const n of e)if(!gd(n,{upTo:t}))return n}function gd(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function vd(e){return e instanceof HTMLInputElement&&"select"in e}function Ne(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&vd(e)&&t&&e.select()}}var Qr=bd();function bd(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Xr(e,t),e.unshift(t)},remove(t){var n;e=Xr(e,t),(n=e[0])==null||n.resume()}}}function Xr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yd(e){return e.filter(t=>t.tagName!=="A")}var xd="Portal",As=c.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=c.useState(!1);Me(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?lo.createPortal(d.jsx(te.div,{...r,ref:t}),i):null});As.displayName=xd;function wd(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Zt=e=>{const{present:t,children:n}=e,r=Cd(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=se(r.ref,Ed(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};Zt.displayName="Presence";function Cd(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,u]=wd(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=Ct(r.current);s.current=a==="mounted"?l:"none"},[a]),Me(()=>{const l=r.current,f=o.current;if(f!==e){const h=s.current,m=Ct(l);e?u("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Me(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,p=m=>{const g=Ct(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(u("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(s.current=Ct(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Ct(e){return(e==null?void 0:e.animationName)||"none"}function Ed(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fn=0;function Rd(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Yr()),document.body.insertAdjacentElement("beforeend",e[1]??Yr()),fn++,()=>{fn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),fn--}},[])}function Yr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
81style.position="fixed",e.style.pointerEvents="none",e}var pe=function(){return pe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},pe.apply(this,arguments)};function Ps(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Sd(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var kt="right-scroll-bar-position",jt="width-before-scroll-bar",Nd="with-scroll-bars-hidden",Ad="--removed-body-scroll-bar-size";function pn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Pd(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Od=typeof window<"u"?c.useLayoutEffect:c.useEffect,Zr=new WeakMap;function _d(e,t){var n=Pd(null,function(r){return e.forEach(function(o){return pn(o,r)})});return Od(function(){var r=Zr.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||pn(a,null)}),s.forEach(function(a){o.has(a)||pn(a,i)})}Zr.set(n,e)},[e]),n}function kd(e){return e}function jd(e,t){t===void 0&&(t=kd);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var u=function(){var f=i;i=[],f.forEach(s)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(f){i.push(f),l()},filter:function(f){return i=i.filter(f),n}}}};return o}function Td(e){e===void 0&&(e={});var t=jd(null);return t.options=pe({async:!0,ssr:!1},e),t}var Os=function(e){var t=e.sideCar,n=Ps(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,pe({},n))};Os.isSideCarExport=!0;function Md(e,t){return e.useMedium(t),Os}var _s=Td(),hn=function(){},Jt=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:hn,onWheelCapture:hn,onTouchMoveCapture:hn}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,u=e.className,l=e.removeScrollBar,f=e.enabled,p=e.shards,h=e.sideCar,m=e.noRelative,b=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,w=e.gapMode,C=Ps(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,N=_d([n,t]),R=pe(pe({},C),o);return c.createElement(c.Fragment,null,f&&c.createElement(S,{sideCar:_s,removeScrollBar:l,shards:p,noRelative:m,noIsolation:b,inert:g,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:w}),i?c.cloneElement(c.Children.only(a),pe(pe({},R),{ref:N})):c.createElement(x,pe({},R,{className:u,ref:N}),a))});Jt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Jt.classNames={fullWidth:jt,zeroRight:kt};var Dd=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Id(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Dd();return t&&e.setAttribute("nonce",t),e}function Ld(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $d(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Fd=function(){var e=0,t=null;
81return{add:function(n){e==0&&(t=Id())&&(Ld(t,n),$d(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wd=function(){var e=Fd();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ks=function(){var e=Wd(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Bd={left:0,top:0,right:0,gap:0},mn=function(e){return parseInt(e||"",10)||0},Ud=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[mn(n),mn(r),mn(o)]},zd=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Bd;var t=Ud(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Hd=ks(),Xe="data-scroll-locked",Vd=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),` 82 .`.concat(Nd,` { 83 overflow: hidden `).concat(r,`; 84 padding-right: `).concat(a,"px ").concat(r,`; 85 } 86 body[`).concat(Xe,`] { 87 overflow: hidden `).concat(r,`; 88 overscroll-behavior: contain; 89 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 90 padding-left: `.concat(o,`px; 91 padding-top: `).concat(s,`px; 92 padding-right: `).concat(i,`px; 93 margin-left:0; 94 margin-top:0; 95 margin-right: `).concat(a,"px ").concat(r,`; 96 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` 97 } 98 99 .`).concat(kt,` { 100 right: `).concat(a,"px ").concat(r,`; 101 } 102 103 .`).concat(jt,` { 104 margin-right: `).concat(a,"px ").concat(r,`; 105 } 106 107 .`).concat(kt," .").concat(kt,` { 108 right: 0 `).concat(r,`; 109 } 110 111 .`).concat(jt," .").concat(jt,` { 112 margin-right: 0 `).concat(r,`; 113 } 114 115 body[`).concat(Xe,`] { 116 `).concat(Ad,": ").concat(a,`px; 117 } 118`)},Jr=function(){var e=parseInt(document.body.getAttribute(Xe)||"0",10);return isFinite(e)?e:0},qd=function(){c.useEffect(function(){return document.body.setAttribute(Xe,(Jr()+1).toString()),function(){var e=Jr()-1;e<=0?document.body.removeAttribute(Xe):document.body.setAttribute(Xe,e.toString())}},[])},Gd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;qd();var s=c.useMemo(function(){return zd(o)},[o]);return c.createElement(Hd,{styles:Vd(s,!t,o,n?"":"!important")})},$n=!1;if(typeof window<"u")try{var Et=Object.defineProperty({},"passive",{get:function(){return $n=!0,!0}});window.addEventListener("test",Et,Et),window.removeEventListener("test",Et,Et)}catch{$n=!1}var Ve=$n?{passive:!1}:!1,Kd=function(e){return e.tagName==="TEXTAREA"},js=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Kd(e)&&n[t]==="visible")},Qd=function(e){return js(e,"overflowY")},Xd=function(e){return js(e,"overflowX")},eo=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ts(e,r);if(o){var s=Ms(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Yd=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Zd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ts=function(e,t){return e==="v"?Qd(t):Xd(t)},Ms=function(e,t){return e==="v"?Yd(t):Zd(t)},Jd=function(e,t){return e==="h"&&t==="rtl"?-1:1},ef=function(e,t,n,r,o){var s=Jd(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,u=t.contains(a),l=!1,f=i>0,p=0,h=0;do{if(!a)break;var m=Ms(e,a),b=m[0],g=m[1],v=m[2],y=g-v-s*b;(b||y)&&Ts(e,a)&&(p+=y,h+=b);var x=a.parentNode;a=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(f&&Math.abs(p)<1||!f&&Math.abs(h)<1)&&(l=!0),l},Rt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},to=function(e){return[e.deltaX,e.deltaY]},no=function(e){return e&&"current"in e?e.current:e},tf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nf=function(e){return` 119 .block-interactivity-`.concat(e,` {pointer-events: none;} 120 .allow-interactivity-`).concat(e,` {pointer-events: all;} 121`)},rf=0,qe=[];function of(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(rf++)[0],s=c.useState(ks)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));
vendor: 4,719 bytes, line 121
121var g=Sd([e.lockRef.current],(e.shards||[]).map(no),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var y=Rt(g),x=n.current,w="deltaX"in g?g.deltaX:x[0]-y[0],C="deltaY"in g?g.deltaY:x[1]-y[1],S,N=g.target,R=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in g&&R==="h"&&N.type==="range")return!1;var k=window.getSelection(),A=k&&k.anchorNode,O=A?A===N||A.contains(N):!1;if(O)return!1;var M=eo(R,N);if(!M)return!0;if(M?S=R:(S=R==="v"?"h":"v",M=eo(R,N)),!M)return!1;if(!r.current&&"changedTouches"in g&&(w||C)&&(r.current=S),!S)return!0;var P=r.current||S;return ef(P,v,g,P==="h"?w:C)},[]),u=c.useCallback(function(g){var v=g;if(!(!qe.length||qe[qe.length-1]!==s)){var y="deltaY"in v?to(v):Rt(v),x=t.current.filter(function(S){return S.name===v.type&&(S.target===v.target||v.target===S.shadowParent)&&tf(S.delta,y)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var w=(i.current.shards||[]).map(no).filter(Boolean).filter(function(S){return S.contains(v.target)}),C=w.length>0?a(v,w[0]):!i.current.noIsolation;C&&v.cancelable&&v.preventDefault()}}},[]),l=c.useCallback(function(g,v,y,x){var w={name:g,delta:v,target:y,should:x,shadowParent:sf(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),f=c.useCallback(function(g){n.current=Rt(g),r.current=void 0},[]),p=c.useCallback(function(g){l(g.type,to(g),g.target,a(g,e.lockRef.current))},[]),h=c.useCallback(function(g){l(g.type,Rt(g),g.target,a(g,e.lockRef.current))},[]);c.useEffect(function(){return qe.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Ve),document.addEventListener("touchmove",u,Ve),document.addEventListener("touchstart",f,Ve),function(){qe=qe.filter(function(g){return g!==s}),document.removeEventListener("wheel",u,Ve),document.removeEventListener("touchmove",u,Ve),document.removeEventListener("touchstart",f,Ve)}},[]);var m=e.removeScrollBar,b=e.inert;return c.createElement(c.Fragment,null,b?c.createElement(s,{styles:nf(o)}):null,m?c.createElement(Gd,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function sf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const af=Md(_s,of);var Ds=c.forwardRef(function(e,t){return c.createElement(Jt,pe({},e,{ref:t,sideCar:af}))});Ds.classNames=Jt.classNames;var cf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ge=new WeakMap,St=new WeakMap,Nt={},gn=0,Is=function(e){return e&&(e.host||Is(e.parentNode))},lf=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Is(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},uf=function(e,t,n,r){var o=lf(t,Array.isArray(e)?e:[e]);Nt[n]||(Nt[n]=new WeakMap);var s=Nt[n],i=[],a=new Set,u=new Set(o),l=function(p){!p||a.has(p)||(a.add(p),l(p.parentNode))};o.forEach(l);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(h){if(a.has(h))f(h);else try{var m=h.getAttribute(r),b=m!==null&&m!=="false",g=(Ge.get(h)||0)+1,v=(s.get(h)||0)+1;Ge.set(h,g),s.set(h,v),i.push(h),g===1&&b&&St.set(h,!0),v===1&&h.setAttribute(n,"true"),b||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return f(t),a.clear(),gn++,function(){i.forEach(function(p){var h=Ge.get(p)-1,m=s.get(p)-1;Ge.set(p,h),s.set(p,m),h||(St.has(p)||p.removeAttribute(r),St.delete(p)),m||p.removeAttribute(n)}),gn--,gn||(Ge=new WeakMap,Ge=new WeakMap,St=new WeakMap,Nt={})}},df=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=cf(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),uf(r,o,n,"aria-hidden")):function(){return null}},en="Dialog",[Ls]=Xt(en),[ff,le]=Ls(en),$s=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=c.useRef(null),u=c.useRef(null),[l,f]=Yt({prop:r,defaultProp:o??!1,onChange:s,caller:en});return d.jsx(ff,{scope:t,triggerRef:a,contentRef:u,contentId:dt(),titleId:dt(),descriptionId:dt(),open:l,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:i,children:n})};$s.displayName=en;var Fs="DialogTrigger",Ws=c.forwardRef((e,t)=>
121{const{__scopeDialog:n,...r}=e,o=le(Fs,n),s=se(t,o.triggerRef);return d.jsx(te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":or(o.open),...r,ref:s,onClick:ke(e.onClick,o.onOpenToggle)})});Ws.displayName=Fs;var nr="DialogPortal",[pf,Bs]=Ls(nr,{forceMount:void 0}),Us=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=le(nr,t);return d.jsx(pf,{scope:t,forceMount:n,children:c.Children.map(r,i=>d.jsx(Zt,{present:n||s.open,children:d.jsx(As,{asChild:!0,container:o,children:i})}))})};Us.displayName=nr;var Ft="DialogOverlay",zs=c.forwardRef((e,t)=>{const n=Bs(Ft,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=le(Ft,e.__scopeDialog);return s.modal?d.jsx(Zt,{present:r||s.open,children:d.jsx(mf,{...o,ref:t})}):null});zs.displayName=Ft;var hf=$t("DialogOverlay.RemoveScroll"),mf=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=le(Ft,n);return d.jsx(Ds,{as:hf,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(te.div,{"data-state":or(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ue="DialogContent",Hs=c.forwardRef((e,t)=>{const n=Bs(Ue,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=le(Ue,e.__scopeDialog);return d.jsx(Zt,{present:r||s.open,children:s.modal?d.jsx(gf,{...o,ref:t}):d.jsx(vf,{...o,ref:t})})});Hs.displayName=Ue;var gf=c.forwardRef((e,t)=>{const n=le(Ue,e.__scopeDialog),r=c.useRef(null),o=se(t,n.contentRef,r);return c.useEffect(()=>{const s=r.current;if(s)return df(s)},[]),d.jsx(Vs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ke(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ke(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:ke(e.onFocusOutside,s=>s.preventDefault())})}),vf=c.forwardRef((e,t)=>{const n=le(Ue,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return d.jsx(Vs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Vs=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=le(Ue,n),u=c.useRef(null),l=se(t,u);return Rd(),d.jsxs(d.Fragment,{children:[d.jsx(Ss,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:d.jsx(Es,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":or(a.open),...i,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(bf,{titleId:a.titleId}),d.jsx(xf,{contentRef:u,descriptionId:a.descriptionId})]})]})}),rr="DialogTitle",qs=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=le(rr,n);return d.jsx(te.h2,{id:o.titleId,...r,ref:t})});qs.displayName=rr;var Gs="DialogDescription",Ks=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=le(Gs,n);return d.jsx(te.p,{id:o.descriptionId,...r,ref:t})});Ks.displayName=Gs;var Qs="DialogClose",Xs=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=le(Qs,n);return d.jsx(te.button,{type:"button",...r,ref:t,onClick:ke(e.onClick,()=>o.onOpenChange(!1))})});Xs.displayName=Qs;function or(e){return e?"open":"closed"}var Ys="DialogTitleWarning",[yp,Zs]=Vu(Ys,{contentName:Ue,titleName:rr,docsSlug:"dialog"}),bf=({titleId:e})=>{const t=Zs(Ys),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 122 123If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 124 125For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},yf="DialogDescriptionWarning",xf=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Zs(yf).contentName}}.`;return c.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");
125t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},wf=$s,Cf=Ws,Ef=Us,Js=zs,ei=Hs,ti=qs,ni=Ks,Rf=Xs;const xp=wf,wp=Cf,Sf=Ef,ri=c.forwardRef(({className:e,...t},n)=>d.jsx(Js,{ref:n,className:X("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),...t}));ri.displayName=Js.displayName;const Nf=c.forwardRef(({className:e,children:t,hideCloseButton:n=!1,overlayClassName:r,...o},s)=>d.jsxs(Sf,{children:[d.jsx(ri,{className:r}),d.jsxs(ei,{ref:s,className:X("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:rounded-lg",e),...o,children:[t,!n&&d.jsxs(Rf,{className:"absolute right-4 top-4 roun
125ded-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:[d.jsx(Ro,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Nf.displayName=ei.displayName;const Af=({className:e,...t})=>d.jsx("div",{className:X("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Af.displayName="DialogHeader";const Pf=({className:e,...t})=>d.jsx("div",{className:X("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Pf.displayName="DialogFooter";const Of=c.forwardRef(({className:e,...t},n)=>d.jsx(ti,{ref:n,className:X("text-lg font-semibold leading-none tracking-tight",e),...t}));Of.displayName=ti.displayName;const _f=c.forwardRef(({className:e,...t},n)=>d.jsx(ni,{ref:n,className:X("text-sm text-muted-foreground",e),...t}));_f.displayName=ni.displayName;function kf(e){const t=e+"CollectionProvider",[n,r]=Xt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:y}=g,x=V.useRef(null),w=V.useRef(new Map).current;return d.jsx(o,{scope:v,itemMap:w,collectionRef:x,children:y})};i.displayName=t;const a=e+"CollectionSlot",u=$t(a),l=V.forwardRef((g,v)=>{const{scope:y,children:x}=g,w=s(a,y),C=se(v,w.collectionRef);return d.jsx(u,{ref:C,children:x})});l.displayName=a;const f=e+"CollectionItemSlot",p="data-radix-collection-item",h=$t(f),m=V.forwardRef((g,v)=>{const{scope:y,children:x,...w}=g,C=V.useRef(null),S=se(v,C),N=s(f,y);return V.useEffect(()=>(N.itemMap.set(C,{ref:C,...w}),()=>void N.itemMap.delete(C))),d.jsx(h,{[p]:"",ref:S,children:x})});m.displayName=f;function b(g){const v=s(e+"CollectionConsumer",g);return V.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((N,R)=>w.indexOf(N.ref.current)-w.indexOf(R.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:l,ItemSlot:m},b,r]}var jf=c.createContext(void 0);function Tf(e){const t=c.useContext(jf);return e||t||"ltr"}function oi(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Mf(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var si=e=>{const{present:t,children:n}=e,r=Df(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=se(r.ref,If(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};si.displayName="Presence";function Df(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,u]=Mf(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=At(r.current);s.current=a==="mounted"?l:"none"},[a]),Me(()=>{const l=r.current,f=o.current;if(f!==e){const h=s.current,m=At(l);e?u("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Me(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,p=m=>{const g=At(r.current).includes(m.animationName);if(m.target===t&&g&&(u("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(s.current=At(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function At(e){return(e==null?void 0:e.animationName)||"none"}function If(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}
125var tn="Collapsible",[Lf,ii]=Xt(tn),[$f,sr]=Lf(tn),ai=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...a}=e,[u,l]=Yt({prop:r,defaultProp:o??!1,onChange:i,caller:tn});return d.jsx($f,{scope:n,disabled:s,contentId:dt(),open:u,onOpenToggle:c.useCallback(()=>l(f=>!f),[l]),children:d.jsx(te.div,{"data-state":ar(u),"data-disabled":s?"":void 0,...a,ref:t})})});ai.displayName=tn;var ci="CollapsibleTrigger",li=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=sr(ci,n);return d.jsx(te.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ar(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:oi(e.onClick,o.onOpenToggle)})});li.displayName=ci;var ir="CollapsibleContent",ui=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=sr(ir,e.__scopeCollapsible);return d.jsx(si,{present:n||o.open,children:({present:s})=>d.jsx(Ff,{...r,ref:t,present:s})})});ui.displayName=ir;var Ff=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=sr(ir,n),[a,u]=c.useState(r),l=c.useRef(null),f=se(t,l),p=c.useRef(0),h=p.current,m=c.useRef(0),b=m.current,g=i.open||a,v=c.useRef(g),y=c.useRef(void 0);return c.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),Me(()=>{const x=l.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();p.current=w.height,m.current=w.width,v.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),u(r)}},[i.open,r]),d.jsx(te.div,{"data-state":ar(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...s,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:g&&o})});function ar(e){return e?"open":"closed"}var Wf=ai,Bf=li,Uf=ui,ue="Accordion",zf=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[cr,Hf,Vf]=kf(ue),[nn]=Xt(ue,[Vf,ii]),lr=ii(),di=V.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,s=r;return d.jsx(cr.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?d.jsx(Qf,{...s,ref:t}):d.jsx(Kf,{...o,ref:t})})});di.displayName=ue;var[fi,qf]=nn(ue),[pi,Gf]=nn(ue,{collapsible:!1}),Kf=V.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:s=!1,...i}=e,[a,u]=Yt({prop:n,defaultProp:r??"",onChange:o,caller:ue});return d.jsx(fi,{scope:e.__scopeAccordion,value:V.useMemo(()=>a?[a]:[],[a]),onItemOpen:u,onItemClose:V.useCallback(()=>s&&u(""),[s,u]),children:d.jsx(pi,{scope:e.__scopeAccordion,collapsible:s,children:d.jsx(hi,{...i,ref:t})})})}),Qf=V.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[i,a]=Yt({prop:n,defaultProp:r??[],onChange:o,caller:ue}),u=V.useCallback(f=>a((p=[])=>[...p,f]),[a]),l=V.useCallback(f=>a((p=[])=>p.filter(h=>h!==f)),[a]);return d.jsx(fi,{scope:e.__scopeAccordion,value:i,onItemOpen:u,onItemClose:l,children:d.jsx(pi,{scope:e.__scopeAccordion,collapsible:!0,children:d.jsx(hi,{...s,ref:t})})})}),[Xf,rn]=nn(ue),hi=V.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:s="vertical",...i}=e,a=V.useRef(null),u=se(a,t),l=Hf(n),p=Tf(o)==="ltr",h=oi(e.onKeyDown,m=>{var k;if(!zf.includes(m.key))return;const b=m.target,g=l().filter(A=>{var O;return!((O=A.ref.current)!=null&&O.disabled)}),v=g.findIndex(A=>A.ref.current===b),y=g.length;if(v===-1)return;m.preventDefault();let x=v;const w=0,C=y-1,S=()=>{x=v+1,x>C&&(x=w)},N=()=>{x=v-1,x<w&&(x=C)};switch(m.key){case"Home":x=w;break;case"End":x=C;break;case"ArrowRight":s==="horizontal"&&(p?S():N());break;case"ArrowDown":s==="vertical"&&S();break;case"ArrowLeft":s==="horizontal"&&(p?N():S());break;case"ArrowUp":s==="vertical"&&N();break}const R=x%y;(k=g[R].ref.current)==null||k.focus()});return d.jsx(Xf,{scope:n,disabled:r,direction:o,orientation:s,children:d.jsx(cr.Slot,{scope:n,children:d.jsx(te.div,{...i,"data-orientation":s,ref:u,onKeyDown:r?void 0:h})})})}),Wt="AccordionItem",[Yf,ur]=nn(Wt),mi=V.forwardRef((e,t)=>
125{const{__scopeAccordion:n,value:r,...o}=e,s=rn(Wt,n),i=qf(Wt,n),a=lr(n),u=dt(),l=r&&i.value.includes(r)||!1,f=s.disabled||e.disabled;return d.jsx(Yf,{scope:n,open:l,disabled:f,triggerId:u,children:d.jsx(Wf,{"data-orientation":s.orientation,"data-state":wi(l),...a,...o,ref:t,disabled:f,open:l,onOpenChange:p=>{p?i.onItemOpen(r):i.onItemClose(r)}})})});mi.displayName=Wt;var gi="AccordionHeader",vi=V.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=rn(ue,n),s=ur(gi,n);return d.jsx(te.h3,{"data-orientation":o.orientation,"data-state":wi(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:t})});vi.displayName=gi;var Fn="AccordionTrigger",bi=V.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=rn(ue,n),s=ur(Fn,n),i=Gf(Fn,n),a=lr(n);return d.jsx(cr.ItemSlot,{scope:n,children:d.jsx(Bf,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...a,...r,ref:t})})});bi.displayName=Fn;var yi="AccordionContent",xi=V.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=rn(ue,n),s=ur(yi,n),i=lr(n);return d.jsx(Uf,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});xi.displayName=yi;function wi(e){return e?"open":"closed"}var Zf=di,Jf=mi,ep=vi,Ci=bi,Ei=xi;const tp=Zf,Ri=c.forwardRef(({className:e,...t},n)=>d.jsx(Jf,{ref:n,className:X("border-b",e),...t}));Ri.displayName="AccordionItem";const Si=c.forwardRef(({className:e,children:t,...n},r)=>d.jsx(ep,{className:"flex",children:d.jsxs(Ci,{ref:r,className:X("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),...n,children:[t,d.jsx(Ha,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));Si.displayName=Ci.displayName;const Ni=c.forwardRef(({className:e,children:t,...n},r)=>d.jsx(Ei,{ref:r,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:d.jsx("div",{className:X("pb-4 pt-0",e),children:t})}));Ni.displayName=Ei.displayName;const np=[{icon:Ya,titleKey:"gifts.instructions.buy.title",subtitleKey:"gifts.instructions.buy.subtitle"},{icon:Xa,titleKey:"gifts.instructions.share.title",subtitleKey:"gifts.instructions.share.subtitle"},{icon:qa,titleKey:"gifts.instructions.receive.title",subtitleKey:"gifts.instructions.receive.subtitle"}],rp=[{icon:Za,titleKey:"donations.instructions.account.title",subtitleKey:"donations.instructions.account.subtitle"},{icon:Ga,titleKey:"donations.instructions.amount.title",subtitleKey:"donations.instructions.amount.subtitle"},{icon:Qa,titleKey:"donations.instructions.confirm.title",subtitleKey:"donations.instructions.confirm.subtitle"}];function op({row:e}){const{t}=ze(),n=e.icon;return d.jsxs("div",{className:"flex flex-col",children:[d.jsxs("div",{className:"flex flex-row items-center mb-1",children:[d.jsx(n,{className:"me-2 h-5 w-5 text-primary shrink-0"}),d.jsx("span",{className:"text-sm font-medium text-foreground",children:t(e.titleKey)})]}),d.jsx("span",{className:"text-sm text-muted-foreground",children:t(e.subtitleKey)})]})}function Ai({variant:e,titleKey:t,rows:n,testId:r}){const{t:o}=ze(),s=d.jsx("div",{className:"flex flex-col gap-y-4",children:n.map(i=>d.jsx(op,{row:i},i.titleKey))});return e==="accordion"?d.jsx(tp,{type:"single",collapsible:!0,className:"border-t border-border bg-gray-100 px-6 dark:bg-neutral-900 sm:mt-4 sm:rounded-lg sm:border sm:bg-card dark:sm:bg-card","data-test":`${r}-accordion`,children:d.jsxs(Ri,{value:"instructions",className:"border-b-0",children:[d.jsx(Si,{className:"py-6 text-lg font-medium hover:no-underline",children:o(t)}),d.jsx(Ni,{className:"pb-6",children:s})]})}):d.jsx("div",{className:"p-6 bg-gray-100 dark:bg-neutral-900 md:bg-card dark:md:bg-card sm:rounded-b-lg","data-test":r,children:d.jsxs("div",{className:"flex flex-col w-full min-w-0 gap-4",children:[d.jsx("span",{className:"text-lg font-medium text-foreground",children:o(t)}),s]})})}function sp({variant:e}){return d.jsx(Ai,{variant:e,titleKey:"gifts.instructions.title",rows:np,testId:"gift-instructions"})}function ip({variant:e}){return d.jsx(Ai,{variant:e,titleKey:"donations.instructions.title",rows:rp,testId:"donation-instructions"})}function Bt({heading:e,logoUrl:t,title:n,subtitle:r,variant:o="gift"}){const s=t?d.jsx("img",{src:t,alt:e,className:"max-h-12 max-w-full object-contain","data-test":"store-logo"}):d.jsx("div",{className:`text-[1.75rem] font-bold leading-9 text-foreground ${o==="donation"?"text-center":""}`,children:e});
125return d.jsx("div",{className:"grid h-[300px] bg-primary sm:rounded-t-lg","data-test":"product-image-band",children:d.jsx("div",{className:`flex min-h-52 w-[90%] max-w-96 flex-col self-center justify-self-center rounded-3xl bg-gradient-to-l from-neutral-200 to-stone-100 shadow-xl dark:from-neutral-900 dark:to-neutral-950 ${o==="donation"?"justify-center":""}`,children:o==="donation"?d.jsxs("div",{className:"flex flex-col items-center justify-center p-6",children:[s,d.jsx("div",{className:"mt-2 flex flex-col",children:d.jsx("span",{className:"text-sm text-center text-muted-foreground",children:r})})]}):d.jsxs("div",{className:"flex flex-1 flex-col justify-between px-6 pt-8",children:[d.jsx("div",{children:s}),d.jsxs("div",{className:"flex flex-col pb-6",children:[d.jsx("span",{className:"text-lg font-semibold text-foreground",children:n}),d.jsx("span",{className:"text-sm text-muted-foreground",children:r})]})]})})})}function Cp({type:e,storeName:t,logoUrl:n}){const{t:r}=ze();return d.jsx("div",{className:"bg-gray-100 dark:bg-neutral-900 sm:pt-12 sm:pb-6 sm:sticky sm:top-0 sm:px-12 lg:px-16 xl:px-24 2xl:px-32","data-test":"product-info",children:d.jsx("div",{className:"mx-auto w-full sm:sticky sm:top-12 xl:max-w-xl sm:border sm:border-border sm:rounded-lg sm:overflow-hidden",children:e==="gift"?d.jsxs(d.Fragment,{children:[d.jsx(Bt,{heading:t,logoUrl:n,title:r("gifts.gift"),subtitle:r("gifts.premium_content")}),d.jsx(sp,{variant:"full"})]}):d.jsxs(d.Fragment,{children:[d.jsx(Bt,{variant:"donation",heading:t,logoUrl:n,subtitle:r("donations.subtitle")}),d.jsx(ip,{variant:"full"})]})})})}const ro=220;function Ep({offer:e,checkoutType:t="purchase",storeName:n,storeLogoUrl:r,iapInfo:o=!1,mobileApp:s=!1,children:i,footer:a}){const{t:u}=ze(),[l,f]=c.useState(!1),p=t==="gift",h=t==="donation",m=p||h,{product:b,category:g}=e,v=g.label,y=h?null:b.description,x=h?null:b.description_html,w=!!(y&&y.length>ro||x&&x.replace(/<[^>]*>/g,"").length>ro),C=s?"line-clamp-2":"line-clamp-3",S=`mx-auto w-full ${m?"":"sm:max-w-lg"} xl:max-w-xl`;return d.jsxs("div",{"data-test":"product-info",className:`${m?"sm:pt-12 sm:pb-6 sm:sticky sm:top-0":"h-full sm:py-12"} sm:px-12 lg:px-16 xl:px-24 2xl:px-32`,children:[d.jsxs("div",{className:`${S} ${m?"":"sm:sticky sm:top-12"} sm:border sm:border-border sm:rounded-lg sm:overflow-hidden`,children:[p&&d.jsx(Bt,{heading:n??"",logoUrl:r,title:b.title,subtitle:b.subtitle??u("gifts.premium_content")}),h&&d.jsx(Bt,{variant:"donation",heading:n??"",logoUrl:r,subtitle:b.subtitle??u("donations.subtitle")}),!p&&!h&&b.image_url&&d.jsx("div",{className:"flex flex-col px-4 sm:px-0 pt-4 sm:pt-0",children:d.jsx("img",{src:b.image_url,alt:b.title,className:"w-full rounded sm:rounded-t sm:rounded-b-none max-w-full h-auto"})}),d.jsxs("div",{className:"bg-gray-100 dark:bg-neutral-900 sm:bg-card dark:sm:bg-card p-4 lg:p-6",children:[d.jsxs("div",{className:"flex flex-col gap-2 sm:pb-4 sm:border-b border-border w-full min-w-0",children:[v&&d.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-primary","data-test":"category-label",children:v}),d.jsx("span",{className:"text-lg font-medium text-foreground","data-test":"offer-title",children:b.title}),(y||x)&&d.jsxs("div",{children:[x?d.jsx("div",{className:`text-sm text-muted-foreground break-words [&_a]:underline [&_h3]:font-bold [&_h3]:mt-0 [&_p]:mt-0 [&_p]:mb-2 [&_ul]:list-disc [&_ol]:list-decimal [&_ul]:mb-2 [&_ol]:mb-2 [&_ul]:ps-4 [&_ol]:ps-4 [&_blockquote]:border-l-4 [&_blockquote]:ps-3 [&_blockquote]:my-2 [&_blockquote]:opacity-80 ${w&&!l?C:""}`,"data-test":"offer-description",dangerouslySetInnerHTML:{__html:x}}):d.jsx("div",{className:`text-sm text-muted-foreground break-words ${w&&!l?C:""}`,"data-test":"offer-description",children:y}),w&&d.jsx("button",{type:"button",className:"text-sm font-medium text-primary hover:underline mt-1",onClick:()=>f(N=>!N),"data-test":"offer-description-toggle",children:u(l?"community.posts.show_less_link":"community.posts.show_more_link")})]})]}),o&&d.jsx("div",{className:"flex items-start gap-2 mt-3 p-3 rounded-lg bg-blue-50 dark:bg-blue-950 text-base text-gray-900 dark:text-gray-200","data-test":"iap-migration-info",children:d.jsx("span",{children:u("checkout.iap_migration_info")})}),i]})]}),a&&d.jsx("div",{className:S,children:a})]})}function oo({text:e}){return d.jsx(wu,{delayDuration:100,children:d.jsxs(vs,{children:[d.jsx(bs,{asChild:!0,children:d.jsx("button",{type:"button",className:"ms-1 shrink-0 align-middle text-muted-foreground","aria-label":e,"data-test":"finite-coupon-tooltip",children:d.jsx(Ka,{className:"h-4 w-4","aria-hidden":"true"})})}),d.jsx(ys,{className:"max-w-48 text-left",children:e})]})})}function Ie({label:e,value:t,testId:n,className:r}){return d.jsxs("div",{className:`flex flex-row justify-between items-center text-foreground ${r??""}`,"data-test":n,children:[d.jsx("span",{className:"text-base text-muted-foreground",children:e}),d.jsx("span",{className:"text-base",children:t})]})}function Rp({price:e,coupon:t,orderBump:n,offerTitle:r,checkoutType:o="purchase",freePurchase:s=!1,removingCoupon:i=!1,onRemoveCoupon:a,totalOnly:u=!1}){const{t:l}=ze(),f=n!=null&&n.accepted?n:null,p=(t==null?void 0:t.applied)??null,h=o==="gift"||o==="donation",m=e.taxes,b=!!p&&!h,g=e.discount>0||e.gift_balance_used>0,v=!u&&!!(f||b||e.gift_balance_used>0||e.covered_fees>0||m.length>0||e.tax_pending||e.tax_collection_enabled);return d.jsxs("div",{"data-test":"price-details",children:[(t==null?void 0:t.invali
125d_coupon_message)&&d.jsx("div",{className:"mt-2 rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",role:"alert","data-test":"invalid-coupon-message",children:t.invalid_coupon_message}),v&&d.jsxs("div",{className:"flex flex-col gap-3 pt-4 pb-4 border-b border-border","data-test":"price-summary",children:[d.jsx("span",{className:"text-lg font-semibold",children:l("gift_cards.new.order_summary")}),f&&d.jsxs(d.Fragment,{children:[d.jsx(Ie,{label:r,value:e.original_price_formatted,testId:"order-bump-bundle-line"}),d.jsx(Ie,{label:f.plan.title,value:f.plan.trial_label,testId:"order-bump-line",className:"border-b border-border pb-3"})]}),d.jsx(Ie,{label:l("checkout.subtotal"),value:e.subtotal_is_minimum?l("checkout.pay_what_you_want.starting_from_price",{price:e.subtotal_formatted}):e.subtotal_formatted,testId:"subtotal"}),e.covered_fees>0&&d.jsx(Ie,{label:l("checkout.coveredFees"),value:e.covered_fees_formatted,testId:"covered-fees"}),b&&p&&d.jsxs("div",{className:"flex flex-row justify-between items-center","data-test":p.upsell_coupon?"subscription-upsell-discount":"applied-discount",children:[d.jsxs("div",{className:"flex flex-row items-center",children:[d.jsx("span",{className:"me-2 text-base text-muted-foreground",children:l("checkout.discount")}),d.jsxs("span",{className:"inline-flex max-w-48 items-center rounded bg-primary px-2 py-1 text-[11px] font-medium leading-4 tracking-[1px] uppercase text-primary-foreground","data-test":"coupon-badge",children:[p.label,p.removable&&a&&d.jsx(Po,{type:"button",variant:"ghost",size:"icon",className:"ms-1 -me-1 h-5 w-5","aria-label":l("common.remove"),disabled:i,onClick:a,"data-test":"remove-coupon",children:d.jsx(Ro,{"aria-hidden":"true"})})]})]}),d.jsx("span",{className:"text-base text-foreground",children:p.percent_off!=null?`-${p.percent_off}% (${p.amount_off_formatted})`:`-${p.amount_off_formatted}`})]}),m.map((y,x)=>d.jsx(Ie,{label:y.description,value:y.amount_formatted,testId:"tax-row"},`${y.description??"tax"}-${x}`)),m.length===0&&e.tax_pending&&d.jsx(Ie,{label:l("invoice.taxes"),value:l("checkout.tax_calculated_in_next_step"),testId:"tax-placeholder"}),e.gift_balance_used>0&&d.jsx(Ie,{label:l("invoice.balance_used"),value:`-${e.gift_balance_used_formatted}`,testId:"balance-used"})]}),d.jsxs("div",{className:"flex flex-row justify-between items-center pt-4 text-foreground",children:[!u&&d.jsx("span",{className:"text-lg font-semibold",children:l(f?"checkout.total_today":"checkout.total_only")}),e.trial?d.jsxs("div",{className:u?"flex flex-col items-start":"flex flex-col items-end",children:[d.jsx("span",{className:"text-lg font-semibold","data-test":"trial-copy",children:e.trial.label}),d.jsxs("div",{className:"flex flex-row items-start text-end",children:[g&&d.jsx("span",{className:"text-sm text-muted-foreground line-through mx-1","data-test":"original-price",children:e.original_price_formatted}),d.jsx("span",{className:"text-sm text-muted-foreground","data-test":"total",children:e.trial.after_trial_label}),(p==null?void 0:p.finite_duration_tooltip)&&d.jsx(oo,{text:p.finite_duration_tooltip})]})]}):d.jsxs("div",{className:u?"flex flex-row items-center gap-1":"flex flex-col items-end",children:[d.jsxs("div",{className:"flex flex-row items-center",children:[g&&d.jsx("span",{className:"text-sm text-muted-foreground line-through me-1","data-test":"original-price",children:e.original_price_formatted}),d.jsx("span",{className:"text-lg font-semibold","data-test":"total",children:e.subtotal_is_minimum?l("checkout.pay_what_you_want.starting_from_price",{price:e.final_price_formatted}):e.final_price_formatted}),e.recurring&&!h&&d.jsxs("span",{className:"ms-1 text-sm text-muted-foreground",children:["/",e.recurring.term_label]}),e.recurring&&!h&&(p==null?void 0:p.finite_duration_tooltip)&&d.jsx(oo,{text:p.finite_duration_tooltip})]}),e.rent&&d.jsx("span",{className:"text-sm text-muted-foreground","data-test":"rent-window",children:e.rent.label}),s&&!e.recurring&&d.jsx("span",{className:"text-sm text-muted-foreground","data-test":"no-payment-needed",children:l("checkout.no_payment_needed")})]})]}),f&&d.jsxs("div",{className:"flex flex-row justify-between items-center -mx-4 lg:-mx-6 -mb-4 lg:-mb-6 mt-4 px-4 lg:px-6 py-6 border-t border-border bg-muted/50 sm:rounded-b-lg text-foreground","data-test":"order-bump-post-trial",children:[d.jsxs("div",{className:"flex flex-col",children:[d.jsx("span",{className:"text-base",children:f.post_trial.label}),d.jsx("span",{className:"text-sm text-muted-foreground",children:l("checkout.order_bump.subscription_starts")})]}),d.jsx("span",{className:"text-base whitespace-nowrap",children:f.post_trial.price_with_duration})]})]})}function Sp(){const{t:e}=ze();return d.jsx("div",{className:"flex justify-center my-4 md:my-0","data-test":"uscreen-branding",children:d.jsxs("a",{href:"https://www.uscreen.tv?utm_category=product&utm_medium=branding&utm_campaign=web&utm_content=powered_by",target:"_blank",rel:"noreferrer",className:"flex items-center text-sm leading-none text-[#B0B0B0] hover:text-[#888888] dark:text-[#8A8A8A] dark:hover:text-[#adadad]",children:[d.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"me-1.5","aria-hidden":"true",children:[d.jsx("path",{d:"M142.613 99.0397C141.243 99.8997 139.783 100.6 138.283 101.14V109.68C138.283 131.13
125120.833 148.59 99.3925 148.59H99.1525C77.8225 148.47 60.4725 130.8 60.4725 109.2V43.1197C60.4725 34.0597 53.1026 26.6897 44.0425 26.6897C34.9825 26.6897 27.6125 34.0597 27.6125 43.1197V109.11C27.6125 128.22 35.0826 146.31 48.6525 160.05C62.2725 173.84 80.2725 181.44 99.3325 181.45H99.3625C138.933 181.45 171.123 149.26 171.123 109.69V81.1997L142.613 99.0397Z",fill:"#8A8A8A"}),d.jsx("path",{d:"M176.312 47.9197L134.252 21.5797C129.882 18.8397 124.212 21.9897 124.212 27.1397V79.8097C124.212 84.9697 129.882 88.1097 134.252 85.3697L176.312 59.0397C180.412 56.4697 180.412 50.4897 176.312 47.9197Z",fill:"#adadad"})]}),d.jsx("span",{children:e("checkout.poweredByUscreen")})]})})}export{Ss as $,$a as A,Po as B,fp as C,xp as D,Ol as E,kl as F,jl as G,Tl as H,Ml as I,Dl as J,Ll as K,pp as L,Il as M,yl as N,Ep as O,Rp as P,pt as Q,ke as R,vp as S,wu as T,Sp as U,As as V,dt as W,kf as X,df as Y,Rd as Z,Ds as _,Wa as a,Es as a0,$t as a1,Tf as a2,Yt as a3,Ha as a4,_f as a5,No as a6,Nc as a7,ot as a8,Ka as a9,Pu as aa,ho as ab,Cp as ac,sp as ad,ip as ae,mp as af,hp as ag,So as b,wp as c,Nf as d,Af as e,Of as f,ie as g,gp as h,We as i,Ao as j,ac as k,lc as l,sc as m,X as n,vo as o,Fa as p,vs as q,bs as r,ys as s,q as t,bp as u,Pf as v,te as w,Me as x,se as y,Xt as z};
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.