const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-react-Bwx_JUp5.js","assets/vendor-router-CmtOvP_N.js"])))=>i.map(i=>d[i]);
var e,t,n,r=Object.defineProperty,o=(e,t,n)=>((e,t,n)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);import{j as a,V as s,R as i,A as c,C as l,T as d,D as u,P as p,c as f,a as m,u as h,b as g,d as b,e as v,f as y,g as x,h as w,S as _,i as j,k as N,l as S,m as E,n as k,o as C,p as T,q as M,r as R,s as P,O as D,W as I,t as A,v as O,w as L,x as $,y as z,z as F,B as q,E as U,F as H,G as W,H as B,I as Y,J as G,K as V,L as K,M as X,N as J,Q,U as Z,X as ee,Y as te,Z as ne,_ as re,$ as oe,a0 as ae,a1 as se,a2 as ie,a3 as ce,a4 as le,a5 as de,a6 as ue,a7 as pe}from"./vendor-ui-yUp6v2BW.js";import{a as fe,g as me,R as he,r as ge,b as be}from"./vendor-react-Bwx_JUp5.js";import{X as ve,C as ye,a as xe,b as we,c as _e,P as je,d as Ne,L as Se,B as Ee,e as ke,f as Ce,H as Te,M as Me,S as Re,F as Pe,g as De,D as Ie,h as Ae,U as Oe,i as Le,j as $e,G as ze,k as Fe,l as qe,m as Ue,T as He,n as We,o as Be,p as Ye,q as Ge,R as Ve,r as Ke,s as Xe}from"./vendor-icons-Dtpnl-9N.js";import{u as Je,a as Qe,Q as Ze,b as et}from"./vendor-query-DiHSHoHc.js";import{u as tt,a as nt,b as rt,R as ot,c as at,N as st,B as it,d as ct}from"./vendor-router-CmtOvP_N.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var lt=fe;n=lt.createRoot,lt.hydrateRoot;var dt="undefined"!=typeof Element,ut="function"==typeof Map,pt="function"==typeof Set,ft="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function mt(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,a;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!==r--;)if(!mt(e[r],t[r]))return!1;return!0}if(ut&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;for(a=e.entries();!(r=a.next()).done;)if(!mt(r.value[1],t.get(r.value[0])))return!1;return!0}if(pt&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(ft&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(r=n;0!==r--;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(dt&&e instanceof Element)return!1;for(r=n;0!==r--;)if(("_owner"!==o[r]&&"__v"!==o[r]&&"__o"!==o[r]||!e.$$typeof)&&!mt(e[o[r]],t[o[r]]))return!1;return!0}return e!=e&&t!=t}const ht=me(function(e,t){try{return mt(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return!1;throw n}});const gt=me(function(e,t,n,r,o,a,s,i){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,s,i],d=0;(c=new Error(t.replace(/%s/g,function(){return l[d++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}});const bt=me(function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!i(l))return!1;var d=e[l],u=t[l];if(!1===(o=n?n.call(r,d,u,l):void 0)||void 0===o&&d!==u)return!1}return!0});var vt=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(vt||{}),yt={rel:["amphtml","canonical","alternate"]},xt={type:["application/ld+json"]},wt={charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},_t=Object.values(vt),jt={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Nt=Object.entries(jt).reduce((e,[t,n])=>(e[n]=t,e),{}),St="data-rh",Et="defaultTitle",kt="defer",Ct="encodeSpecialCharacters",Tt="onChangeClientState",Mt="titleTemplate",Rt="prioritizeSeoTags",Pt=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},Dt=e=>{let t=Pt(e,"title");const n=Pt(e,Mt);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=Pt(e,Et);return t||r||void 0},It=e=>Pt(e,Tt)||(()=>{}),At=(e,t)=>t.filter(t=>void 0!==t[e]).map(t=>t[e]).reduce((e,t)=>({...e,...t}),{}),Ot=(e,t)=>t.filter(e=>void 0!==e.base).map(e=>e.base).reverse().reduce((t,n)=>{if(!t.length){const r=Object.keys(n);for(let o=0;o<r.length;o+=1){const a=r[o].toLowerCase();if(-1!==e.indexOf(a)&&n[a])return t.concat(n)}}return t},[]),Lt=(e,t,n)=>{const r={};return n.filter(t=>!!Array.isArray(t[e])||(void 0!==t[e]&&(t[e],console&&console.warn),!1)).map(t=>t[e]).reverse().reduce((e,n)=>{const o={};n.filter(e=>{let n;const a=Object.keys(e);for(let r=0;r<a.length;r+=1){const o=a[r],s=o.toLowerCase();-1===t.indexOf(s)||"rel"===n&&"canonical"===e[n].toLowerCase()||"rel"===s&&"stylesheet"===e[s].toLowerCase()||(n=s),-1===t.indexOf(o)||"innerHTML"!==o&&"cssText"!==o&&"itemprop"!==o||(n=o)}if(!n||!e[n])return!1;const s=e[n].toLowerCase();return r[n]||(r[n]={}),o[n]||(o[n]={}),!r[n][s]&&(o[n][s]=!0,!0)}).reverse().forEach(t=>e.push(t));const a=Object.keys(o);for(let t=0;t<a.length;t+=1){const e=a[t],n={...r[e],...o[e]};r[e]=n}return e},[]).reverse()},$t=(e,t)=>{if(Array.isArray(e)&&e.length)for(let n=0;n<e.length;n+=1){if(e[n][t])return!0}return!1},zt=e=>Array.isArray(e)?e.join(""):e,Ft=(e,t)=>Array.isArray(e)?e.reduce((e,n)=>(((e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1})(n,t)?e.priority.push(n):e.default.push(n),e),{priority:[],default:[]}):{default:e,priority:[]},qt=(e,t)=>({...e,[t]:void 0}),Ut=["noscript","script","style"],Ht=(e,t=!0)=>!1===t?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),Wt=e=>Object.keys(e).reduce((t,n)=>{const r=void 0!==e[n]?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),Bt=(e,t={})=>Object.keys(e).reduce((t,n)=>(t[jt[n]||n]=e[n],t),t),Yt=(e,t)=>t.map((t,n)=>{const r={key:n,[St]:!0};return Object.keys(t).forEach(e=>{const n=jt[e]||e;if("innerHTML"===n||"cssText"===n){const e=t.innerHTML||t.cssText;r.dangerouslySetInnerHTML={__html:e}}else r[n]=t[e]}),he.createElement(e,r)}),Gt=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>((e,t,n)=>{const r=Bt(n,{key:t,[St]:!0});return[he.createElement("title",r,t)]})(0,t.title,t.titleAttributes),toString:()=>((e,t,n,r)=>{const o=Wt(n),a=zt(t);return o?`<${e} ${St}="true" ${o}>${Ht(a,r)}</${e}>`:`<${e} ${St}="true">${Ht(a,r)}</${e}>`})(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Bt(t),toString:()=>Wt(t)};default:return{toComponent:()=>Yt(e,t),toString:()=>((e,t,n=!0)=>t.reduce((t,r)=>{const o=r,a=Object.keys(o).filter(e=>!("innerHTML"===e||"cssText"===e)).reduce((e,t)=>{const r=void 0===o[t]?t:`${t}="${Ht(o[t],n)}"`;return e?`${e} ${r}`:r},""),s=o.innerHTML||o.cssText||"",i=-1===Ut.indexOf(e);return`${t}<${e} ${St}="true" ${a}${i?"/>":`>${s}</${e}>`}`},""))(e,t,n)}}},Vt=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:o,noscriptTags:a,styleTags:s,title:i="",titleAttributes:c,prioritizeSeoTags:l}=e;let{linkTags:d,metaTags:u,scriptTags:p}=e,f={toComponent:()=>{},toString:()=>""};return l&&({priorityMethods:f,linkTags:d,metaTags:u,scriptTags:p}=(({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const o=Ft(e,wt),a=Ft(t,yt),s=Ft(n,xt);return{priorityMethods:{toComponent:()=>[...Yt("meta",o.priority),...Yt("link",a.priority),...Yt("script",s.priority)],toString:()=>`${Gt("meta",o.priority,r)} ${Gt("link",a.priority,r)} ${Gt("script",s.priority,r)}`},metaTags:o.default,linkTags:a.default,scriptTags:s.default}})(e)),{priority:f,base:Gt("base",t,r),bodyAttributes:Gt("bodyAttributes",n,r),htmlAttributes:Gt("htmlAttributes",o,r),link:Gt("link",d,r),meta:Gt("meta",u,r),noscript:Gt("noscript",a,r),script:Gt("script",p,r),style:Gt("style",s,r),title:Gt("title",{title:i,titleAttributes:c},r)}},Kt=[],Xt=!("undefined"==typeof window||!window.document||!window.document.createElement),Jt=class{constructor(e,t){o(this,"instances",[]),o(this,"canUseDOM",Xt),o(this,"context"),o(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Kt:this.instances,add:e=>{(this.canUseDOM?Kt:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Kt:this.instances).indexOf(e);(this.canUseDOM?Kt:this.instances).splice(t,1)}}}),this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Vt({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},Qt=he.createContext({}),Zt=(e=class extends ge.Component{constructor(t){super(t),o(this,"helmetData"),this.helmetData=new Jt(this.props.context||{},e.canUseDOM)}render(){return he.createElement(Qt.Provider,{value:this.helmetData.value},this.props.children)}},o(e,"canUseDOM",Xt),e),en=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${St}]`),o=[].slice.call(r),a=[];let s;return t&&t.length&&t.forEach(t=>{const n=document.createElement(e);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))if("innerHTML"===e)n.innerHTML=t.innerHTML;else if("cssText"===e)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{const r=e,o=void 0===t[r]?"":t[r];n.setAttribute(e,o)}n.setAttribute(St,"true"),o.some((e,t)=>(s=t,n.isEqualNode(e)))?o.splice(s,1):a.push(n)}),o.forEach(e=>e.parentNode?.removeChild(e)),a.forEach(e=>n.appendChild(e)),{oldTags:o,newTags:a}},tn=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(St),o=r?r.split(","):[],a=[...o],s=Object.keys(t);for(const i of s){const e=t[i]||"";n.getAttribute(i)!==e&&n.setAttribute(i,e),-1===o.indexOf(i)&&o.push(i);const r=a.indexOf(i);-1!==r&&a.splice(r,1)}for(let i=a.length-1;i>=0;i-=1)n.removeAttribute(a[i]);o.length===a.length?n.removeAttribute(St):n.getAttribute(St)!==s.join(",")&&n.setAttribute(St,s.join(","))},nn=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:o,linkTags:a,metaTags:s,noscriptTags:i,onChangeClientState:c,scriptTags:l,styleTags:d,title:u,titleAttributes:p}=e;tn("body",r),tn("html",o),((e,t)=>{void 0!==e&&document.title!==e&&(document.title=zt(e)),tn("title",t)})(u,p);const f={baseTag:en("base",n),linkTags:en("link",a),metaTags:en("meta",s),noscriptTags:en("noscript",i),scriptTags:en("script",l),styleTags:en("style",d)},m={},h={};Object.keys(f).forEach(e=>{const{newTags:t,oldTags:n}=f[e];t.length&&(m[e]=t),n.length&&(h[e]=f[e].oldTags)}),t&&t(),c(e,m,h)},rn=null,on=e=>{rn&&cancelAnimationFrame(rn),e.defer?rn=requestAnimationFrame(()=>{nn(e,()=>{rn=null})}):(nn(e),rn=null)},an=class extends ge.Component{constructor(){super(...arguments),o(this,"rendered",!1)}shouldComponentUpdate(e){return!bt(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:t}=this.props.context;let n=null;const r=(o=e.get().map(e=>{const t={...e.props};return delete t.context,t}),{baseTag:Ot(["href"],o),bodyAttributes:At("bodyAttributes",o),defer:Pt(o,kt),encode:Pt(o,Ct),htmlAttributes:At("htmlAttributes",o),linkTags:Lt("link",["rel","href"],o),metaTags:Lt("meta",["name","charset","http-equiv","property","itemprop"],o),noscriptTags:Lt("noscript",["innerHTML"],o),onChangeClientState:It(o),scriptTags:Lt("script",["src","innerHTML"],o),styleTags:Lt("style",["cssText"],o),title:Dt(o),titleAttributes:At("titleAttributes",o),prioritizeSeoTags:$t(o,Rt)});var o;Zt.canUseDOM?on(r):Vt&&(n=Vt(r)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},sn=(t=class extends ge.Component{shouldComponentUpdate(e){return!ht(qt(this.props,"helmetData"),qt(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(t=>{n={...n,[t]:e[t]}}),n}warnOnInvalidChildren(e,t){return gt(_t.some(t=>e.type===t),"function"==typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${_t.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),gt(!t||"string"==typeof t||Array.isArray(t)&&!t.some(e=>"string"!=typeof e),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return he.Children.forEach(e,e=>{if(!e||!e.props)return;const{children:r,...o}=e.props,a=Object.keys(o).reduce((e,t)=>(e[Nt[t]||t]=o[t],e),{});let{type:s}=e;switch("symbol"==typeof s?s=s.toString():this.warnOnInvalidChildren(e,r),s){case"Symbol(react.fragment)":t=this.mapChildrenToProps(r,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(e,n,a,r);break;default:t=this.mapObjectTypeChildren(e,t,a,r)}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof Jt)){r=new Jt(r.context,!0),delete n.helmetData}return r?he.createElement(an,{...n,context:r.value}):he.createElement(Qt.Consumer,null,e=>he.createElement(an,{...n,context:e}))}},o(t,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),t);let cn=0;const ln=new Map,dn=e=>{if(ln.has(e))return;const t=setTimeout(()=>{ln.delete(e),mn({type:"REMOVE_TOAST",toastId:e})},1e6);ln.set(e,t)},un=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?dn(n):e.toasts.forEach(e=>{dn(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||void 0===n?{...e,open:!1}:e)}}case"REMOVE_TOAST":return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},pn=[];let fn={toasts:[]};function mn(e){fn=un(fn,e),pn.forEach(e=>{e(fn)})}function hn({...e}){const t=(cn=(cn+1)%Number.MAX_SAFE_INTEGER,cn.toString()),n=()=>mn({type:"DISMISS_TOAST",toastId:t});return mn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:e=>{e||n()}}}),{id:t,dismiss:n,update:e=>mn({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function gn(){const[e,t]=ge.useState(fn);return ge.useEffect(()=>(pn.push(t),()=>{const e=pn.indexOf(t);e>-1&&pn.splice(e,1)}),[e]),{...e,toast:hn,dismiss:e=>mn({type:"DISMISS_TOAST",toastId:e})}}function bn(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=bn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function vn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=bn(e))&&(r&&(r+=" "),r+=t);return r}const yn=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,xn=vn,wn=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return xn(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const s=yn(t)||yn(r);return o[e][s]}),i=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),c=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...i}[t]):{...a,...i}[t]===n})?[...e,n,r]:e},[]);return xn(e,s,c,null==n?void 0:n.class,null==n?void 0:n.className)},_n=e=>{const t=En(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),jn(n,t)||Sn(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},jn=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?jn(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const a=e.join("-");return t.validators.find(({validator:e})=>e(a))?.classGroupId},Nn=/^\[(.+)\]$/,Sn=e=>{if(Nn.test(e)){const t=Nn.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},En=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Mn(Object.entries(e.classGroups),n).forEach(([e,n])=>{kn(n,r,e,t)}),r},kn=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:Cn(t,e)).classGroupId=n)}if("function"==typeof e)return Tn(e)?void kn(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,o])=>{kn(o,Cn(t,e),n,r)})})},Cn=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Tn=e=>e.isThemeGetter,Mn=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,Rn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},Pn=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],a=t.length,s=e=>{const n=[];let s,i=0,c=0;for(let u=0;u<e.length;u++){let l=e[u];if(0===i){if(l===o&&(r||e.slice(u,u+a)===t)){n.push(e.slice(c,u)),c=u+a;continue}if("/"===l){s=u;continue}}"["===l?i++:"]"===l&&i--}const l=0===n.length?e:e.substring(c),d=l.startsWith("!");return{modifiers:n,hasImportantModifier:d,baseClassName:d?l.substring(1):l,maybePostfixModifierPosition:s&&s>c?s-c:void 0}};return n?e=>n({className:e,parseClassName:s}):s},Dn=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},In=/\s+/;function An(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=On(e))&&(r&&(r+=" "),r+=t);return r}const On=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=On(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ln(e,...t){let n,r,o,a=function(i){const c=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:Rn(e.cacheSize),parseClassName:Pn(e),..._n(e)}))(c),r=n.cache.get,o=n.cache.set,a=s,s(i)};function s(e){const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(In);let i="";for(let c=s.length-1;c>=0;c-=1){const e=s[c],{modifiers:t,hasImportantModifier:l,baseClassName:d,maybePostfixModifierPosition:u}=n(e);let p=Boolean(u),f=r(p?d.substring(0,u):d);if(!f){if(!p){i=e+(i.length>0?" "+i:i);continue}if(f=r(d),!f){i=e+(i.length>0?" "+i:i);continue}p=!1}const m=Dn(t).join(":"),h=l?m+"!":m,g=h+f;if(a.includes(g))continue;a.push(g);const b=o(f,p);for(let n=0;n<b.length;++n){const e=b[n];a.push(h+e)}i=e+(i.length>0?" "+i:i)}return i})(e,n);return o(e,a),a}return function(){return a(An.apply(null,arguments))}}const $n=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},zn=/^\[(?:([a-z-]+):)?(.+)\]$/i,Fn=/^\d+\/\d+$/,qn=new Set(["px","full","screen"]),Un=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hn=/\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$/,Wn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Bn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gn=e=>Kn(e)||qn.has(e)||Fn.test(e),Vn=e=>cr(e,"length",lr),Kn=e=>Boolean(e)&&!Number.isNaN(Number(e)),Xn=e=>cr(e,"number",Kn),Jn=e=>Boolean(e)&&Number.isInteger(Number(e)),Qn=e=>e.endsWith("%")&&Kn(e.slice(0,-1)),Zn=e=>zn.test(e),er=e=>Un.test(e),tr=new Set(["length","size","percentage"]),nr=e=>cr(e,tr,dr),rr=e=>cr(e,"position",dr),or=new Set(["image","url"]),ar=e=>cr(e,or,pr),sr=e=>cr(e,"",ur),ir=()=>!0,cr=(e,t,n)=>{const r=zn.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},lr=e=>Hn.test(e)&&!Wn.test(e),dr=()=>!1,ur=e=>Bn.test(e),pr=e=>Yn.test(e),fr=Ln(()=>{const e=$n("colors"),t=$n("spacing"),n=$n("blur"),r=$n("brightness"),o=$n("borderColor"),a=$n("borderRadius"),s=$n("borderSpacing"),i=$n("borderWidth"),c=$n("contrast"),l=$n("grayscale"),d=$n("hueRotate"),u=$n("invert"),p=$n("gap"),f=$n("gradientColorStops"),m=$n("gradientColorStopPositions"),h=$n("inset"),g=$n("margin"),b=$n("opacity"),v=$n("padding"),y=$n("saturate"),x=$n("scale"),w=$n("sepia"),_=$n("skew"),j=$n("space"),N=$n("translate"),S=()=>["auto",Zn,t],E=()=>[Zn,t],k=()=>["",Gn,Vn],C=()=>["auto",Kn,Zn],T=()=>["","0",Zn],M=()=>[Kn,Zn];return{cacheSize:500,separator:":",theme:{colors:[ir],spacing:[Gn,Vn],blur:["none","",er,Zn],brightness:M(),borderColor:[e],borderRadius:["none","","full",er,Zn],borderSpacing:E(),borderWidth:k(),contrast:M(),grayscale:T(),hueRotate:M(),invert:T(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[Qn,Vn],inset:S(),margin:S(),opacity:M(),padding:E(),saturate:M(),scale:M(),sepia:T(),skew:M(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",Zn]}],container:["container"],columns:[{columns:[er]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Zn]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Jn,Zn]}],basis:[{basis:S()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Zn]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",Jn,Zn]}],"grid-cols":[{"grid-cols":[ir]}],"col-start-end":[{col:["auto",{span:["full",Jn,Zn]},Zn]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[ir]}],"row-start-end":[{row:["auto",{span:[Jn,Zn]},Zn]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Zn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Zn]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Zn,t]}],"min-w":[{"min-w":[Zn,t,"min","max","fit"]}],"max-w":[{"max-w":[Zn,t,"none","full","min","max","fit","prose",{screen:[er]},er]}],h:[{h:[Zn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Zn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Zn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Zn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",er,Vn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xn]}],"font-family":[{font:[ir]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Zn]}],"line-clamp":[{"line-clamp":["none",Kn,Xn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Gn,Zn]}],"list-image":[{"list-image":["none",Zn]}],"list-style-type":[{list:["none","disc","decimal",Zn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Gn,Vn]}],"underline-offset":[{"underline-offset":["auto",Gn,Zn]}],"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:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Zn]}],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",Zn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",rr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ar]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"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:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Gn,Zn]}],"outline-w":[{outline:[Gn,Vn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Gn,Vn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",er,sr]}],"shadow-color":[{shadow:[ir]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",er,Zn]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[y]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Zn]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",Zn]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",Zn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Jn,Zn]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Zn]}],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",Zn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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"]}],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",Zn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Gn,Vn,Xn]}],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"]}}});function mr(...e){return fr(vn(e))}const hr=p,gr=ge.forwardRef(({className:e,...t},n)=>a.jsx(s,{ref:n,className:mr("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));gr.displayName=s.displayName;const br=wn("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),vr=ge.forwardRef(({className:e,variant:t,...n},r)=>a.jsx(i,{ref:r,className:mr(br({variant:t}),e),...n}));vr.displayName=i.displayName;ge.forwardRef(({className:e,...t},n)=>a.jsx(c,{ref:n,className:mr("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t})).displayName=c.displayName;const yr=ge.forwardRef(({className:e,...t},n)=>a.jsx(l,{ref:n,className:mr("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx(ve,{className:"h-4 w-4"})}));yr.displayName=l.displayName;const xr=ge.forwardRef(({className:e,...t},n)=>a.jsx(d,{ref:n,className:mr("text-sm font-semibold",e),...t}));xr.displayName=d.displayName;const wr=ge.forwardRef(({className:e,...t},n)=>a.jsx(u,{ref:n,className:mr("text-sm opacity-90",e),...t}));function _r(){const{toasts:e}=gn();return a.jsxs(hr,{children:[e.map(function({id:e,title:t,description:n,action:r,...o}){return a.jsxs(vr,{...o,children:[a.jsxs("div",{className:"grid gap-1",children:[t&&a.jsx(xr,{children:t}),n&&a.jsx(wr,{children:n})]}),r,a.jsx(yr,{})]},e)}),a.jsx(gr,{})]})}wr.displayName=u.displayName;var jr=["light","dark"],Nr=ge.createContext(void 0),Sr={setTheme:e=>{},themes:[]};ge.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:a,value:s,attrs:i,nonce:c})=>{let l="system"===a,d="class"===n?`var d=document.documentElement,c=d.classList;c.remove(${i.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${n}',s='setAttribute';`,u=o?jr.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(e,t=!1,r=!0)=>{let a=s?s[e]:e,i=t?e+"|| ''":`'${a}'`,c="";return o&&r&&!t&&jr.includes(e)&&(c+=`d.style.colorScheme = '${e}';`),"class"===n?c+=t||a?`c.add(${i})`:"null":a&&(c+=`d[s](n,${i})`),c},f=e?`!function(){${d}${p(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${l})){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${p(s?"x[e]":"e",!0)}}${l?"":"else{"+p(a,!1,!1)+"}"}${u}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${p(s?"x[e]":"e",!0)}}else{${p(a,!1,!1)};}${u}}catch(t){}}();`;return ge.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:f}})});var Er=Array(12).fill(0),kr=({visible:e})=>he.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},he.createElement("div",{className:"sonner-spinner"},Er.map((e,t)=>he.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),Cr=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Tr=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Mr=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Rr=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Pr=1,Dr=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:Pr++,a=this.toasts.find(e=>e.id===o),s=void 0===e.dismissible||e.dismissible;return a?this.toasts=this.toasts.map(t=>t.id===o?(this.publish({...t,...e,id:o,title:n}),{...t,...e,id:o,dismissible:s,title:n}):t):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));let r=e instanceof Promise?e:e(),o=void 0!==n;return r.then(async e=>{if(Ir(e)&&!e.ok){o=!1;let r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,a="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description;this.create({id:n,type:"error",message:r,description:a})}else if(void 0!==t.success){o=!1;let r="function"==typeof t.success?await t.success(e):t.success,a="function"==typeof t.description?await t.description(e):t.description;this.create({id:n,type:"success",message:r,description:a})}}).catch(async e=>{if(void 0!==t.error){o=!1;let r="function"==typeof t.error?await t.error(e):t.error,a="function"==typeof t.description?await t.description(e):t.description;this.create({id:n,type:"error",message:r,description:a})}}).finally(()=>{var e;o&&(this.dismiss(n),n=void 0),null==(e=t.finally)||e.call(t)}),n},this.custom=(e,t)=>{let n=(null==t?void 0:t.id)||Pr++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Ir=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,Ar=(e,t)=>{let n=(null==t?void 0:t.id)||Pr++;return Dr.addToast({title:e,...t,id:n}),n},Or=Object.assign(Ar,{success:Dr.success,info:Dr.info,warning:Dr.warning,error:Dr.error,custom:Dr.custom,message:Dr.message,promise:Dr.promise,dismiss:Dr.dismiss,loading:Dr.loading},{getHistory:()=>Dr.toasts});function Lr(e){return void 0!==e.label}!function(e,{insertAt:t}={}){if("undefined"==typeof document)return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}(':where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}\n');var $r=3,zr=14;function Fr(...e){return e.filter(Boolean).join(" ")}var qr=e=>{var t,n,r,o,a,s,i,c,l,d;let{invert:u,toast:p,unstyled:f,interacting:m,setHeights:h,visibleToasts:g,heights:b,index:v,toasts:y,expanded:x,removeToast:w,defaultRichColors:_,closeButton:j,style:N,cancelButtonStyle:S,actionButtonStyle:E,className:k="",descriptionClassName:C="",duration:T,position:M,gap:R,loadingIcon:P,expandByDefault:D,classNames:I,icons:A,closeButtonAriaLabel:O="Close toast",pauseWhenPageIsHidden:L,cn:$}=e,[z,F]=he.useState(!1),[q,U]=he.useState(!1),[H,W]=he.useState(!1),[B,Y]=he.useState(!1),[G,V]=he.useState(0),[K,X]=he.useState(0),J=he.useRef(null),Q=he.useRef(null),Z=0===v,ee=v+1<=g,te=p.type,ne=!1!==p.dismissible,re=p.className||"",oe=p.descriptionClassName||"",ae=he.useMemo(()=>b.findIndex(e=>e.toastId===p.id)||0,[b,p.id]),se=he.useMemo(()=>{var e;return null!=(e=p.closeButton)?e:j},[p.closeButton,j]),ie=he.useMemo(()=>p.duration||T||4e3,[p.duration,T]),ce=he.useRef(0),le=he.useRef(0),de=he.useRef(0),ue=he.useRef(null),[pe,fe]=M.split("-"),me=he.useMemo(()=>b.reduce((e,t,n)=>n>=ae?e:e+t.height,0),[b,ae]),ge=(()=>{let[e,t]=he.useState(document.hidden);return he.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),be=p.invert||u,ve="loading"===te;le.current=he.useMemo(()=>ae*R+me,[ae,me]),he.useEffect(()=>{F(!0)},[]),he.useLayoutEffect(()=>{if(!z)return;let e=Q.current,t=e.style.height;e.style.height="auto";let n=e.getBoundingClientRect().height;e.style.height=t,X(n),h(e=>e.find(e=>e.toastId===p.id)?e.map(e=>e.toastId===p.id?{...e,height:n}:e):[{toastId:p.id,height:n,position:p.position},...e])},[z,p.title,p.description,h,p.id]);let ye=he.useCallback(()=>{U(!0),V(le.current),h(e=>e.filter(e=>e.toastId!==p.id)),setTimeout(()=>{w(p)},200)},[p,w,h,le]);return he.useEffect(()=>{if(p.promise&&"loading"===te||p.duration===1/0||"loading"===p.type)return;let e,t=ie;return x||m||L&&ge?(()=>{if(de.current<ce.current){let e=(new Date).getTime()-ce.current;t-=e}de.current=(new Date).getTime()})():t!==1/0&&(ce.current=(new Date).getTime(),e=setTimeout(()=>{var e;null==(e=p.onAutoClose)||e.call(p,p),ye()},t)),()=>clearTimeout(e)},[x,m,D,p,ie,ye,p.promise,te,L,ge]),he.useEffect(()=>{let e=Q.current;if(e){let t=e.getBoundingClientRect().height;return X(t),h(e=>[{toastId:p.id,height:t,position:p.position},...e]),()=>h(e=>e.filter(e=>e.toastId!==p.id))}},[h,p.id]),he.useEffect(()=>{p.delete&&ye()},[ye,p.delete]),he.createElement("li",{"aria-live":p.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Q,className:$(k,re,null==I?void 0:I.toast,null==(t=null==p?void 0:p.classNames)?void 0:t.toast,null==I?void 0:I.default,null==I?void 0:I[te],null==(n=null==p?void 0:p.classNames)?void 0:n[te]),"data-sonner-toast":"","data-rich-colors":null!=(r=p.richColors)?r:_,"data-styled":!(p.jsx||p.unstyled||f),"data-mounted":z,"data-promise":!!p.promise,"data-removed":q,"data-visible":ee,"data-y-position":pe,"data-x-position":fe,"data-index":v,"data-front":Z,"data-swiping":H,"data-dismissible":ne,"data-type":te,"data-invert":be,"data-swipe-out":B,"data-expanded":!!(x||D&&z),style:{"--index":v,"--toasts-before":v,"--z-index":y.length-v,"--offset":`${q?G:le.current}px`,"--initial-height":D?"auto":`${K}px`,...N,...p.style},onPointerDown:e=>{ve||!ne||(J.current=new Date,V(le.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(W(!0),ue.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n,r;if(B||!ne)return;ue.current=null;let o=Number((null==(e=Q.current)?void 0:e.style.getPropertyValue("--swipe-amount").replace("px",""))||0),a=(new Date).getTime()-(null==(t=J.current)?void 0:t.getTime()),s=Math.abs(o)/a;if(Math.abs(o)>=20||s>.11)return V(le.current),null==(n=p.onDismiss)||n.call(p,p),ye(),void Y(!0);null==(r=Q.current)||r.style.setProperty("--swipe-amount","0px"),W(!1)},onPointerMove:e=>{var t;if(!ue.current||!ne)return;let n=e.clientY-ue.current.y,r=e.clientX-ue.current.x,o=("top"===pe?Math.min:Math.max)(0,n),a="touch"===e.pointerType?10:2;Math.abs(o)>a?null==(t=Q.current)||t.style.setProperty("--swipe-amount",`${n}px`):Math.abs(r)>a&&(ue.current=null)}},se&&!p.jsx?he.createElement("button",{"aria-label":O,"data-disabled":ve,"data-close-button":!0,onClick:ve||!ne?()=>{}:()=>{var e;ye(),null==(e=p.onDismiss)||e.call(p,p)},className:$(null==I?void 0:I.closeButton,null==(o=null==p?void 0:p.classNames)?void 0:o.closeButton)},he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},he.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),he.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,p.jsx||he.isValidElement(p.title)?p.jsx||p.title:he.createElement(he.Fragment,null,te||p.icon||p.promise?he.createElement("div",{"data-icon":"",className:$(null==I?void 0:I.icon,null==(a=null==p?void 0:p.classNames)?void 0:a.icon)},p.promise||"loading"===p.type&&!p.icon?p.icon||(null!=A&&A.loading?he.createElement("div",{className:"sonner-loader","data-visible":"loading"===te},A.loading):P?he.createElement("div",{className:"sonner-loader","data-visible":"loading"===te},P):he.createElement(kr,{visible:"loading"===te})):null,"loading"!==p.type?p.icon||(null==A?void 0:A[te])||(e=>{switch(e){case"success":return Cr;case"info":return Mr;case"warning":return Tr;case"error":return Rr;default:return null}})(te):null):null,he.createElement("div",{"data-content":"",className:$(null==I?void 0:I.content,null==(s=null==p?void 0:p.classNames)?void 0:s.content)},he.createElement("div",{"data-title":"",className:$(null==I?void 0:I.title,null==(i=null==p?void 0:p.classNames)?void 0:i.title)},p.title),p.description?he.createElement("div",{"data-description":"",className:$(C,oe,null==I?void 0:I.description,null==(c=null==p?void 0:p.classNames)?void 0:c.description)},p.description):null),he.isValidElement(p.cancel)?p.cancel:p.cancel&&Lr(p.cancel)?he.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||S,onClick:e=>{var t,n;Lr(p.cancel)&&ne&&(null==(n=(t=p.cancel).onClick)||n.call(t,e),ye())},className:$(null==I?void 0:I.cancelButton,null==(l=null==p?void 0:p.classNames)?void 0:l.cancelButton)},p.cancel.label):null,he.isValidElement(p.action)?p.action:p.action&&Lr(p.action)?he.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||E,onClick:e=>{var t,n;Lr(p.action)&&(e.defaultPrevented||(null==(n=(t=p.action).onClick)||n.call(t,e),ye()))},className:$(null==I?void 0:I.actionButton,null==(d=null==p?void 0:p.classNames)?void 0:d.actionButton)},p.action.label):null))};function Ur(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";let e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}var Hr=e=>{let{invert:t,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:i,theme:c="light",richColors:l,duration:d,style:u,visibleToasts:p=$r,toastOptions:f,dir:m=Ur(),gap:h=zr,loadingIcon:g,icons:b,containerAriaLabel:v="Notifications",pauseWhenPageIsHidden:y,cn:x=Fr}=e,[w,_]=he.useState([]),j=he.useMemo(()=>Array.from(new Set([n].concat(w.filter(e=>e.position).map(e=>e.position)))),[w,n]),[N,S]=he.useState([]),[E,k]=he.useState(!1),[C,T]=he.useState(!1),[M,R]=he.useState("system"!==c?c:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),P=he.useRef(null),D=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),I=he.useRef(null),A=he.useRef(!1),O=he.useCallback(e=>{var t;null!=(t=w.find(t=>t.id===e.id))&&t.delete||Dr.dismiss(e.id),_(t=>t.filter(({id:t})=>t!==e.id))},[w]);return he.useEffect(()=>Dr.subscribe(e=>{e.dismiss?_(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t)):setTimeout(()=>{be.flushSync(()=>{_(t=>{let n=t.findIndex(t=>t.id===e.id);return-1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]})})})}),[]),he.useEffect(()=>{"system"===c?("system"===c&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?R("dark"):R("light")),"undefined"!=typeof window&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:e})=>{R(e?"dark":"light")})):R(c)},[c]),he.useEffect(()=>{w.length<=1&&k(!1)},[w]),he.useEffect(()=>{let e=e=>{var t,n;r.every(t=>e[t]||e.code===t)&&(k(!0),null==(t=P.current)||t.focus()),"Escape"===e.code&&(document.activeElement===P.current||null!=(n=P.current)&&n.contains(document.activeElement))&&k(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r]),he.useEffect(()=>{if(P.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,A.current=!1)}},[P.current]),w.length?he.createElement("section",{"aria-label":`${v} ${D}`,tabIndex:-1},j.map((e,n)=>{var r;let[c,v]=e.split("-");return he.createElement("ol",{key:e,dir:"auto"===m?Ur():m,tabIndex:-1,ref:P,className:s,"data-sonner-toaster":!0,"data-theme":M,"data-y-position":c,"data-x-position":v,style:{"--front-toast-height":`${(null==(r=N[0])?void 0:r.height)||0}px`,"--offset":"number"==typeof i?`${i}px`:i||"32px","--width":"356px","--gap":`${h}px`,...u},onBlur:e=>{A.current&&!e.currentTarget.contains(e.relatedTarget)&&(A.current=!1,I.current&&(I.current.focus({preventScroll:!0}),I.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||A.current||(A.current=!0,I.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{C||k(!1)},onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||T(!0)},onPointerUp:()=>T(!1)},w.filter(t=>!t.position&&0===n||t.position===e).map((n,r)=>{var s,i;return he.createElement(qr,{key:n.id,icons:b,index:r,toast:n,defaultRichColors:l,duration:null!=(s=null==f?void 0:f.duration)?s:d,className:null==f?void 0:f.className,descriptionClassName:null==f?void 0:f.descriptionClassName,invert:t,visibleToasts:p,closeButton:null!=(i=null==f?void 0:f.closeButton)?i:a,interacting:C,position:e,style:null==f?void 0:f.style,unstyled:null==f?void 0:f.unstyled,classNames:null==f?void 0:f.classNames,cancelButtonStyle:null==f?void 0:f.cancelButtonStyle,actionButtonStyle:null==f?void 0:f.actionButtonStyle,removeToast:O,toasts:w.filter(e=>e.position==n.position),heights:N.filter(e=>e.position==n.position),setHeights:S,expandByDefault:o,gap:h,loadingIcon:g,expanded:E,pauseWhenPageIsHidden:y,cn:x})}))})):null};const Wr=({...e})=>{const{theme:t="system"}=null!=(n=ge.useContext(Nr))?n:Sr;var n;return a.jsx(Hr,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var[Br,Yr]=f("Tooltip",[m]),Gr=m(),Vr="TooltipProvider",Kr=700,Xr="tooltip.open",[Jr,Qr]=Br(Vr),Zr=e=>{const{__scopeTooltip:t,delayDuration:n=Kr,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,[i,c]=ge.useState(!0),l=ge.useRef(!1),d=ge.useRef(0);return ge.useEffect(()=>{const e=d.current;return()=>window.clearTimeout(e)},[]),a.jsx(Jr,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:ge.useCallback(()=>{window.clearTimeout(d.current),c(!1)},[]),onClose:ge.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>c(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:ge.useCallback(e=>{l.current=e},[]),disableHoverableContent:o,children:s})};Zr.displayName=Vr;var eo="Tooltip",[to,no]=Br(eo),ro=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:c}=e,l=Qr(eo,e.__scopeTooltip),d=Gr(t),[u,p]=ge.useState(null),f=S(),m=ge.useRef(0),h=i??l.disableHoverableContent,g=c??l.delayDuration,b=ge.useRef(!1),[v=!1,y]=E({prop:r,defaultProp:o,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(Xr))):l.onClose(),s?.(e)}}),x=ge.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),w=ge.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b.current=!1,y(!0)},[y]),_=ge.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),j=ge.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{b.current=!0,y(!0),m.current=0},g)},[g,y]);return ge.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),a.jsx(k,{...d,children:a.jsx(to,{scope:t,contentId:f,open:v,stateAttribute:x,trigger:u,onTriggerChange:p,onTriggerEnter:ge.useCallback(()=>{l.isOpenDelayed?j():w()},[l.isOpenDelayed,j,w]),onTriggerLeave:ge.useCallback(()=>{h?_():(window.clearTimeout(m.current),m.current=0)},[_,h]),onOpen:w,onClose:_,disableHoverableContent:h,children:n})})};ro.displayName=eo;var oo="TooltipTrigger",ao=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=no(oo,n),s=Qr(oo,n),i=Gr(n),c=ge.useRef(null),l=h(t,c,o.onTriggerChange),d=ge.useRef(!1),u=ge.useRef(!1),p=ge.useCallback(()=>d.current=!1,[]);return ge.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),a.jsx(g,{asChild:!0,...i,children:a.jsx(b.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:v(e.onPointerMove,e=>{"touch"!==e.pointerType&&(u.current||s.isPointerInTransitRef.current||(o.onTriggerEnter(),u.current=!0))}),onPointerLeave:v(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:v(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:v(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:v(e.onBlur,o.onClose),onClick:v(e.onClick,o.onClose)})})});ao.displayName=oo;var[so,io]=Br("TooltipPortal",{forceMount:void 0}),co="TooltipContent",lo=ge.forwardRef((e,t)=>{const n=io(co,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=no(co,e.__scopeTooltip);return a.jsx(y,{present:r||i.open,children:i.disableHoverableContent?a.jsx(mo,{side:o,...s,ref:t}):a.jsx(uo,{side:o,...s,ref:t})})}),uo=ge.forwardRef((e,t)=>{const n=no(co,e.__scopeTooltip),r=Qr(co,e.__scopeTooltip),o=ge.useRef(null),s=h(t,o),[i,c]=ge.useState(null),{trigger:l,onClose:d}=n,u=o.current,{onPointerInTransitChange:p}=r,f=ge.useCallback(()=>{c(null),p(!1)},[p]),m=ge.useCallback((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),a=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...o,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);c(a),p(!0)},[p]);return ge.useEffect(()=>()=>f(),[f]),ge.useEffect(()=>{if(l&&u){const e=e=>m(e,u),t=e=>m(e,l);return l.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}},[l,u,m,f]),ge.useEffect(()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||u?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const e=t[a].x,i=t[a].y,c=t[s].x,l=t[s].y;i>r!=l>r&&n<(c-e)*(r-i)/(l-i)+e&&(o=!o)}return o}(n,i);r?f():o&&(f(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[l,u,i,d,f]),a.jsx(mo,{...e,ref:s})}),[po,fo]=Br(eo,{isInside:!1}),mo=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...c}=e,l=no(co,n),d=Gr(n),{onClose:u}=l;return ge.useEffect(()=>(document.addEventListener(Xr,u),()=>document.removeEventListener(Xr,u)),[u]),ge.useEffect(()=>{if(l.trigger){const e=e=>{const t=e.target;t?.contains(l.trigger)&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[l.trigger,u]),a.jsx(x,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:a.jsxs(w,{"data-state":l.stateAttribute,...d,...c,ref:t,style:{...c.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:[a.jsx(_,{children:r}),a.jsx(po,{scope:n,isInside:!0,children:a.jsx(j,{id:l.contentId,role:"tooltip",children:o||r})})]})})});lo.displayName=co;var ho="TooltipArrow";ge.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Gr(n);return fo(ho,n).isInside?null:a.jsx(N,{...o,...r,ref:t})}).displayName=ho;var go=lo;const bo=Zr,vo=ro,yo=ao,xo=ge.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(go,{ref:r,sideOffset:t,className:mr("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));xo.displayName=go.displayName;const wo={COOKIE_DOMAIN:".semprecomigo.com.br",HOME_URL:"https://home.semprecomigo.com.br",AUTH_URL:"https://auth.semprecomigo.com.br",STORE_URL:"https://semprecomigo.com.br/loja",TOKEN_COOKIE_DAYS:1,REFRESH_TOKEN_DAYS:30},_o=()=>{if("undefined"==typeof window)return!0;const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||e.includes("lovable.app")||e.includes("lovableproject.com")},jo=()=>"undefined"!=typeof window?window.location.href:wo.STORE_URL,No=e=>{const t=e||("undefined"!=typeof window?window.location.href:wo.STORE_URL);return`${wo.AUTH_URL}/login?redirect=${encodeURIComponent(t)}`},So=["auth_token","refresh_token","token_expires_at","user_data","client_id","collaborator_id","is_temporary_password","affiliate_id","user_id"];function Eo(){return"undefined"!=typeof window&&window.location.hostname.endsWith("semprecomigo.com.br")}function ko(e,t,n){const r=[`${e}=${encodeURIComponent(t)}`,"path=/"];if(n>0){const e=new Date(Date.now()+24*n*60*60*1e3).toUTCString();r.splice(1,0,`expires=${e}`)}Eo()&&(r.push(`domain=${wo.COOKIE_DOMAIN}`),r.push("Secure")),r.push("SameSite=Lax"),document.cookie=r.join("; ")}function Co(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(const n of t){const t=n.indexOf("=");if(-1===t)continue;const r=n.substring(0,t).trim(),o=n.substring(t+1).trim();if(r===e)try{return decodeURIComponent(o)}catch{return o}}return null}function To(e){const t=[`${e}=`,"expires=Thu, 01 Jan 1970 00:00:00 GMT","path=/"];Eo()&&t.push(`domain=${wo.COOKIE_DOMAIN}`),document.cookie=t.join("; ")}const Mo=["default-roles-"],Ro=new Set(["offline_access","uma_authorization"]);function Po(e){try{const t=e.split(".");if(3!==t.length)return null;const n=atob(t[1].replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(n)}catch{return null}}function Do(e){const t=Po(e);if(!t||!t.sub)return null;const n=t.realm_access?.roles||[],r=Object.values(t.resource_access||{}).flatMap(e=>e.roles||[]),o=[...new Set([...n,...r])].filter(e=>!Ro.has(e)&&!Mo.some(t=>e.startsWith(t)));return{userId:t.sub,coreUserId:t.user_id||null,coreClientId:t.client_id||null,email:t.email||"",username:t.preferred_username||"",name:t.name||"",firstName:t.given_name||"",lastName:t.family_name||"",roles:o,affiliateId:t.affiliate_id||null,exp:t.exp||0,iat:t.iat||0}}function Io(e,t=30){const n=Po(e);return!n?.exp||Date.now()/1e3>=n.exp-t}function Ao(e,t){return!!e&&e.roles.includes(t)}function Oo(e,t){return!!e&&t.some(t=>e.roles.includes(t))}const Lo=[{id:"colaborador-default",label:"Sem token (cole um JWT real)",description:"Cole no campo de token custom um JWT válido do Keycloak (realm Comigo). Sem ele, a navegação é de visitante anônimo.",token:"",clientId:"da063028-8484-4f45-8648-dc0e7e305ea9"}],$o="lovable-dev-auth-state",zo={simulateLoggedOut:!1,presetId:Lo[0].id};function Fo(){if("undefined"==typeof window)return zo;try{const e=window.localStorage.getItem($o);if(!e)return zo;const t=JSON.parse(e);return{simulateLoggedOut:!!t.simulateLoggedOut,presetId:t.presetId||zo.presetId,customToken:t.customToken||void 0,customClientId:t.customClientId||void 0}}catch{return zo}}function qo(e){if("undefined"!=typeof window)try{window.localStorage.setItem($o,JSON.stringify(e))}catch{}}function Uo(){const e=Fo();if(e.simulateLoggedOut)return{token:null,clientId:null};const t=Lo.find(t=>t.id===e.presetId)??Lo[0];return{token:e.customToken||t.token,clientId:e.customClientId||t.clientId}}function Ho(){const e=function(){const e=Co("auth_token");return e&&!Io(e)?e:null}();return e||(_o()&&Uo().token||"")}function Wo(){return Ho()}function Bo(){const e=Ho();return e||""}const Yo="https://core.rnrastreamento.com",Go="true";function Vo({id:e,enabled:t=!0}){return Je({queryKey:["proposal",e],queryFn:async()=>{try{const{data:t}=await Qe.get(`${Yo}/superapp/proposals/${e}`,{headers:{"ngrok-skip-browser-warning":Go,Authorization:`Bearer ${Wo()}`}});return t}catch(t){throw t}},enabled:t&&!!e&&"disabled"!==e&&"new"!==e,staleTime:3e4,refetchInterval:3e4,refetchIntervalInBackground:!1,retry:1})}function Ko({pagarmeOrderId:e}){return Je({queryKey:["pagarme-charge",e],queryFn:async()=>{const{data:t}=await Qe.get(`${Yo}/superapp/pagarme-charge/${e}`,{headers:{"ngrok-skip-browser-warning":Go,Authorization:`Bearer ${Wo()}`}});return t},enabled:!!e,staleTime:3e4,refetchInterval:3e4,refetchOnMount:!0})}function Xo(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function Jo(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const Qo=6048e5;let Zo={};function ea(){return Zo}function ta(e,t){const n=ea(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Xo(e),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function na(e){return ta(e,{weekStartsOn:1})}function ra(e){const t=Xo(e),n=t.getFullYear(),r=Jo(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=na(r),a=Jo(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const s=na(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function oa(e){const t=Xo(e);return t.setHours(0,0,0,0),t}function aa(e){const t=Xo(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function sa(e,t){const n=oa(e),r=oa(t),o=+n-aa(n),a=+r-aa(r);return Math.round((o-a)/864e5)}function ia(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function ca(e){const t=Xo(e),n=Jo(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const la={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function da(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const ua={date:da({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:da({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:da({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},pa={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function fa(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function ma(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(i)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(i,e=>e.test(s)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(i,e=>e.test(s));let l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;return{value:l,rest:t.slice(s.length)}}}function ha(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;return{value:s,rest:t.slice(o.length)}}}const ga={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=la[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:ua,formatRelative:(e,t,n,r)=>pa[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:fa({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:fa({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:fa({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:fa({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:fa({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:ha({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:ma({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:ma({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:ma({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:ma({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:ma({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function ba(e){const t=Xo(e),n=+na(t)-+function(e){const t=ra(e),n=Jo(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),na(n)}(t);return Math.round(n/Qo)+1}function va(e,t){const n=Xo(e),r=n.getFullYear(),o=ea(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=Jo(e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=ta(s,t),c=Jo(e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const l=ta(c,t);return n.getTime()>=i.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function ya(e,t){const n=Xo(e),r=+ta(n,t)-+function(e,t){const n=ea(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=va(e,t),a=Jo(e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),ta(a,t)}(n,t);return Math.round(r/Qo)+1}function xa(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const wa={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return xa("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):xa(n+1,2)},d:(e,t)=>xa(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>xa(e.getHours()%12||12,t.length),H:(e,t)=>xa(e.getHours(),t.length),m:(e,t)=>xa(e.getMinutes(),t.length),s:(e,t)=>xa(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return xa(Math.trunc(r*Math.pow(10,n-3)),t.length)}},_a="midnight",ja="noon",Na="morning",Sa="afternoon",Ea="evening",ka="night",Ca={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return wa.y(e,t)},Y:function(e,t,n,r){const o=va(e,r),a=o>0?o:1-o;if("YY"===t){return xa(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):xa(a,t.length)},R:function(e,t){return xa(ra(e),t.length)},u:function(e,t){return xa(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return xa(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return xa(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return wa.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return xa(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ya(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):xa(o,t.length)},I:function(e,t,n){const r=ba(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):xa(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):wa.d(e,t)},D:function(e,t,n){const r=function(e){const t=Xo(e);return sa(t,ca(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):xa(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return xa(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return xa(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return xa(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?ja:0===r?_a:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?Ea:r>=12?Sa:r>=4?Na:ka,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return wa.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):wa.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):xa(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):xa(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):wa.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):wa.s(e,t)},S:function(e,t){return wa.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Ma(r);case"XXXX":case"XX":return Ra(r);default:return Ra(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ma(r);case"xxxx":case"xx":return Ra(r);default:return Ra(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ta(r,":");default:return"GMT"+Ra(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ta(r,":");default:return"GMT"+Ra(r,":")}},t:function(e,t,n){return xa(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return xa(e.getTime(),t.length)}};function Ta(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return 0===a?n+String(o):n+String(o)+t+xa(a,2)}function Ma(e,t){if(e%60==0){return(e>0?"-":"+")+xa(Math.abs(e)/60,2)}return Ra(e,t)}function Ra(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+xa(Math.trunc(r/60),2)+t+xa(r%60,2)}const Pa=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Da=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Ia={p:Da,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Pa(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",Pa(r,t)).replace("{{time}}",Da(o,t))}},Aa=/^D+$/,Oa=/^Y+$/,La=["D","DD","YY","YYYY"];const $a=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,za=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Fa=/^'([^]*?)'?$/,qa=/''/g,Ua=/[a-zA-Z]/;function Ha(e,t,n){const r=ea(),o=n?.locale??r.locale??ga,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Xo(e);if(!function(e){if(!ia(e)&&"number"!=typeof e)return!1;const t=Xo(e);return!isNaN(Number(t))}(i))throw new RangeError("Invalid time value");let c=t.match(za).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,Ia[t])(e,o.formatLong)}return e}).join("").match($a).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Wa(e)};if(Ca[t])return{isToken:!0,value:e};if(t.match(Ua))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(c=o.localize.preprocessor(i,c));const l={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return c.map(r=>{if(!r.isToken)return r.value;const a=r.value;(!n?.useAdditionalWeekYearTokens&&function(e){return Oa.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return Aa.test(e)}(a))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(La.includes(e))throw new RangeError(r)}(a,t,String(e));return(0,Ca[a[0]])(i,a,o.localize,l)}).join("")}function Wa(e){const t=e.match(Fa);return t?t[1].replace(qa,"'"):e}const Ba={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},Ya={date:da({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:da({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:da({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ga={lastWeek:e=>{const t=e.getDay();return"'"+(0===t||6===t?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},Va={code:"pt-BR",formatDistance:(e,t,n)=>{let r;const o=Ba[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"em "+r:"há "+r:r},formatLong:Ya,formatRelative:(e,t,n,r)=>{const o=Ga[e];return"function"==typeof o?o(t):o},localize:{ordinalNumber:(e,t)=>{const n=Number(e);return"week"===t?.unit?n+"ª":n+"º"},era:fa({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},defaultWidth:"wide"}),quarter:fa({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:fa({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},defaultWidth:"wide"}),day:fa({values:{narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},defaultWidth:"wide"}),dayPeriod:fa({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:ha({matchPattern:/^(\d+)[ºªo]?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:ma({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},defaultParseWidth:"any"}),quarter:ma({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:ma({matchPatterns:{narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},defaultParseWidth:"any"}),day:ma({matchPatterns:{narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},defaultMatchWidth:"wide",parsePatterns:{short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},defaultParseWidth:"any"}),dayPeriod:ma({matchPatterns:{narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},Ka=/^\d{4}-\d{2}-\d{2}$/,Xa=e=>{if(!e)return new Date(NaN);if(Ka.test(e)){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}return new Date(e)},Ja=e=>{const t=Xa(e);return isNaN(t.getTime())?"Data inválida":Ha(t,"dd/MM/yyyy",{locale:Va})},Qa=e=>{if(!e)return!1;return Xa(e)<new Date},Za=e=>{const t=e?.charges?.[0]?.last_transaction;return t&&"pix"===t.transaction_type?{qr_code:t.qr_code,qr_code_url:t.qr_code_url,expires_at:t.expires_at,status:t.status,transaction_type:t.transaction_type}:null},es=e=>{const t=e?.charges?.[0]?.last_transaction;return t&&"boleto"===t.transaction_type?{line:t.line,pdf:t.pdf,url:t.url,due_at:t.due_at,expires_at:t.expires_at,qr_code:t.qr_code,status:t.status,transaction_type:t.transaction_type}:null},ts=e=>{const t=e.replace(/\D/g,"");return t.match(/.{1,4}/g)?.join(" ")||t},ns=e=>{const t=e?.OrdemDePagamento;return!(!Array.isArray(t)||0===t.length)&&t.some(e=>Array.isArray(e?.Lancamentos)&&e.Lancamentos.some(e=>!0===e.Pago))},rs=e=>{if(!0===e.Pago)return"paid";if(!e.Vencimento)return"on_time";const t=Xa(e.Vencimento);if(isNaN(t.getTime()))return"on_time";const n=new Date(t);n.setHours(0,0,0,0);const r=new Date;return r.setHours(0,0,0,0),n<r?"overdue":"on_time"},os=e=>({paid:{label:"Pago",color:"text-green-700",bgColor:"bg-green-50",borderColor:"border-green-200",icon:"Check"},on_time:{label:"No prazo",color:"text-blue-700",bgColor:"bg-blue-50",borderColor:"border-blue-200",icon:"Clock"},overdue:{label:"Em atraso",color:"text-red-700",bgColor:"bg-red-50",borderColor:"border-red-200",icon:"AlertTriangle"}}[e]),as=ge.createContext(void 0),ss=({children:e})=>{const[t,n]=ge.useState(null),{data:r,isLoading:o,error:s}=Vo({id:t||"",enabled:!!t}),i=r?.OrdemDePagamento?.[0]?.Pagarme_Order_Id,{data:c,isLoading:l}=Ko({pagarmeOrderId:i||""}),d=ge.useMemo(()=>ns(r),[r]),u={proposalId:t,proposalData:r,pagarmeChargeData:c,isLoading:o,isLoadingCharge:l,error:s,isPaid:d,setProposalId:e=>n(e)};return a.jsx(as.Provider,{value:u,children:e})},is=()=>{const e=ge.useContext(as);if(!e)throw new Error("useProposal deve ser usado dentro de um ProposalProvider");return e},cs=wn("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 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 hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ls=ge.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?C:"button";return a.jsx(i,{className:mr(cs({variant:t,size:n,className:e})),ref:s,...o})});ls.displayName="Button";const ds=ge.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:mr("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));ds.displayName="Card";const us=ge.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:mr("flex flex-col space-y-1.5 p-6",e),...t}));us.displayName="CardHeader";const ps=ge.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:mr("text-2xl font-semibold leading-none tracking-tight",e),...t}));ps.displayName="CardTitle";const fs=ge.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:mr("text-sm text-muted-foreground",e),...t}));fs.displayName="CardDescription";const ms=ge.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:mr("p-6 pt-0",e),...t}));ms.displayName="CardContent";ge.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:mr("flex items-center p-6 pt-0",e),...t})).displayName="CardFooter";const hs=()=>{const e=tt();return a.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:a.jsx(ds,{className:"max-w-md w-full",children:a.jsxs(ms,{className:"p-12 text-center",children:[a.jsx(ye,{className:"w-16 h-16 text-muted-foreground mx-auto mb-4"}),a.jsx("h1",{className:"text-4xl font-bold text-foreground mb-2",children:"404"}),a.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Página não encontrada"}),a.jsx("p",{className:"text-muted-foreground mb-6",children:"Esta página não está disponível no momento ou não existe."}),a.jsx(ls,{onClick:()=>e("/"),className:"w-full",children:"Voltar para Loja"})]})})})},gs={},bs=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),n=e?.nonce||e?.getAttribute("nonce");r=Promise.allSettled(t.map(e=>{if((e=function(e){return"/loja/"+e}(e))in gs)return;gs[e]=!0;const t=e.endsWith(".css"),r=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${r}`))return;const o=document.createElement("link");return o.rel=t?"stylesheet":"modulepreload",t||(o.as="script"),o.crossOrigin="",o.href=e,n&&o.setAttribute("nonce",n),document.head.appendChild(o),t?new Promise((t,n)=>{o.addEventListener("load",t),o.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function o(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&o(e.reason);return e().catch(o)})};var vs="Avatar",[ys,xs]=f(vs),[ws,_s]=ys(vs),js=ge.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=ge.useState("idle");return a.jsx(ws,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:a.jsx(b.span,{...r,ref:t})})});js.displayName=vs;var Ns="AvatarImage",Ss=ge.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,i=_s(Ns,n),c=function(e,t){const[n,r]=ge.useState("idle");return M(()=>{if(!e)return void r("error");let n=!0;const o=new window.Image,a=e=>()=>{n&&r(e)};return r("loading"),o.onload=a("loaded"),o.onerror=a("error"),o.src=e,t&&(o.referrerPolicy=t),()=>{n=!1}},[e,t]),n}(r,s.referrerPolicy),l=T(e=>{o(e),i.onImageLoadingStatusChange(e)});return M(()=>{"idle"!==c&&l(c)},[c,l]),"loaded"===c?a.jsx(b.img,{...s,ref:t,src:r}):null});Ss.displayName=Ns;var Es="AvatarFallback",ks=ge.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=_s(Es,n),[i,c]=ge.useState(void 0===r);return ge.useEffect(()=>{if(void 0!==r){const e=window.setTimeout(()=>c(!0),r);return()=>window.clearTimeout(e)}},[r]),i&&"loaded"!==s.imageLoadingStatus?a.jsx(b.span,{...o,ref:t}):null});ks.displayName=Es;var Cs=js,Ts=Ss,Ms=ks;const Rs=ge.forwardRef(({className:e,...t},n)=>a.jsx(Cs,{ref:n,className:mr("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Rs.displayName=Cs.displayName;ge.forwardRef(({className:e,...t},n)=>a.jsx(Ts,{ref:n,className:mr("aspect-square h-full w-full",e),...t})).displayName=Ts.displayName;const Ps=ge.forwardRef(({className:e,...t},n)=>a.jsx(Ms,{ref:n,className:mr("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ps.displayName=Ms.displayName;var Ds="AlertDialog",[Is,As]=f(Ds,[R]),Os=R(),Ls=e=>{const{__scopeAlertDialog:t,...n}=e,r=Os(t);return a.jsx(F,{...r,...n,modal:!0})};Ls.displayName=Ds;var $s=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Os(n);return a.jsx(P,{...o,...r,ref:t})});$s.displayName="AlertDialogTrigger";var zs=e=>{const{__scopeAlertDialog:t,...n}=e,r=Os(t);return a.jsx(z,{...r,...n})};zs.displayName="AlertDialogPortal";var Fs=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Os(n);return a.jsx(D,{...o,...r,ref:t})});Fs.displayName="AlertDialogOverlay";var qs="AlertDialogContent",[Us,Hs]=Is(qs),Ws=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,s=Os(n),i=ge.useRef(null),c=h(t,i),l=ge.useRef(null);return a.jsx(I,{contentName:qs,titleName:Bs,docsSlug:"alert-dialog",children:a.jsx(Us,{scope:n,cancelRef:l,children:a.jsxs(A,{role:"alertdialog",...s,...o,ref:c,onOpenAutoFocus:v(o.onOpenAutoFocus,e=>{e.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[a.jsx(_,{children:r}),a.jsx(Qs,{contentRef:i})]})})})});Ws.displayName=qs;var Bs="AlertDialogTitle",Ys=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Os(n);return a.jsx(O,{...o,...r,ref:t})});Ys.displayName=Bs;var Gs="AlertDialogDescription",Vs=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Os(n);return a.jsx(L,{...o,...r,ref:t})});Vs.displayName=Gs;var Ks=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Os(n);return a.jsx($,{...o,...r,ref:t})});Ks.displayName="AlertDialogAction";var Xs="AlertDialogCancel",Js=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=Hs(Xs,n),s=Os(n),i=h(t,o);return a.jsx($,{...s,...r,ref:i})});Js.displayName=Xs;var Qs=({contentRef:e})=>{const t=`\`${qs}\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \`${qs}\` by passing a \`${Gs}\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${qs}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return ge.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))},[t,e]),null},Zs=Fs,ei=Ws,ti=Ks,ni=Js,ri=Ys,oi=Vs;const ai=Ls,si=$s,ii=zs,ci=ge.forwardRef(({className:e,...t},n)=>a.jsx(Zs,{className:mr("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,ref:n}));ci.displayName=Zs.displayName;const li=ge.forwardRef(({className:e,...t},n)=>a.jsxs(ii,{children:[a.jsx(ci,{}),a.jsx(ei,{ref:n,className:mr("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),...t})]}));li.displayName=ei.displayName;const di=({className:e,...t})=>a.jsx("div",{className:mr("flex flex-col space-y-2 text-center sm:text-left",e),...t});di.displayName="AlertDialogHeader";const ui=({className:e,...t})=>a.jsx("div",{className:mr("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ui.displayName="AlertDialogFooter";const pi=ge.forwardRef(({className:e,...t},n)=>a.jsx(ri,{ref:n,className:mr("text-lg font-semibold",e),...t}));pi.displayName=ri.displayName;const fi=ge.forwardRef(({className:e,...t},n)=>a.jsx(oi,{ref:n,className:mr("text-sm text-muted-foreground",e),...t}));fi.displayName=oi.displayName;const mi=ge.forwardRef(({className:e,...t},n)=>a.jsx(ti,{ref:n,className:mr(cs(),e),...t}));mi.displayName=ti.displayName;const hi=ge.forwardRef(({className:e,...t},n)=>a.jsx(ni,{ref:n,className:mr(cs({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));hi.displayName=ni.displayName;const gi="/loja/assets/logo-comigo-oficial.png";function bi(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return ge.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var vi="rovingFocusGroup.onEntryFocus",yi={bubbles:!1,cancelable:!0},xi="RovingFocusGroup",[wi,_i,ji]=q(xi),[Ni,Si]=function(e,t=[]){let n=[];const r=()=>{const t=n.map(e=>ge.createContext(e));return function(n){const r=n?.[e]||t;return ge.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){const o=ge.createContext(r),s=n.length;function i(t){const{scope:n,children:r,...i}=t,c=n?.[e][s]||o,l=ge.useMemo(()=>i,Object.values(i));return a.jsx(c.Provider,{value:l,children:r})}return n=[...n,r],i.displayName=t+"Provider",[i,function(n,a){const i=a?.[e][s]||o,c=ge.useContext(i);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},bi(r,...t)]}(xi,[ji]),[Ei,ki]=Ni(xi),Ci=ge.forwardRef((e,t)=>a.jsx(wi.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(wi.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Ti,{...e,ref:t})})}));Ci.displayName=xi;var Ti=ge.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...p}=e,f=ge.useRef(null),m=h(t,f),g=U(s),[y=null,x]=E({prop:i,defaultProp:c,onChange:l}),[w,_]=ge.useState(!1),j=T(d),N=_i(n),S=ge.useRef(!1),[k,C]=ge.useState(0);return ge.useEffect(()=>{const e=f.current;if(e)return e.addEventListener(vi,j),()=>e.removeEventListener(vi,j)},[j]),a.jsx(Ei,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:y,onItemFocus:ge.useCallback(e=>x(e),[x]),onItemShiftTab:ge.useCallback(()=>_(!0),[]),onFocusableItemAdd:ge.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:ge.useCallback(()=>C(e=>e-1),[]),children:a.jsx(b.div,{tabIndex:w||0===k?-1:0,"data-orientation":r,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:v(e.onMouseDown,()=>{S.current=!0}),onFocus:v(e.onFocus,e=>{const t=!S.current;if(e.target===e.currentTarget&&t&&!w){const t=new CustomEvent(vi,yi);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=N().filter(e=>e.focusable);Di([e.find(e=>e.active),e.find(e=>e.id===y),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:v(e.onBlur,()=>_(!1))})})}),Mi="RovingFocusGroupItem",Ri=ge.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,c=S(),l=s||c,d=ki(Mi,n),u=d.currentTabStopId===l,p=_i(n),{onFocusableItemAdd:f,onFocusableItemRemove:m}=d;return ge.useEffect(()=>{if(r)return f(),()=>m()},[r,f,m]),a.jsx(wi.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:a.jsx(b.span,{tabIndex:u?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:v(e.onMouseDown,e=>{r?d.onItemFocus(l):e.preventDefault()}),onFocus:v(e.onFocus,()=>d.onItemFocus(l)),onKeyDown:v(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void d.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Pi[r]}(e,d.orientation,d.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=p().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const a=o.indexOf(e.currentTarget);o=d.loop?(r=a+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(a+1)}setTimeout(()=>Di(o))}var n,r})})})});Ri.displayName=Mi;var Pi={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Di(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Ii=Ci,Ai=Ri,Oi=["Enter"," "],Li=["ArrowUp","PageDown","End"],$i=["ArrowDown","PageUp","Home",...Li],zi={ltr:[...Oi,"ArrowRight"],rtl:[...Oi,"ArrowLeft"]},Fi={ltr:["ArrowLeft"],rtl:["ArrowRight"]},qi="Menu",[Ui,Hi,Wi]=q(qi),[Bi,Yi]=f(qi,[Wi,m,Si]),Gi=m(),Vi=Si(),[Ki,Xi]=Bi(qi),[Ji,Qi]=Bi(qi),Zi=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,c=Gi(t),[l,d]=ge.useState(null),u=ge.useRef(!1),p=T(s),f=U(o);return ge.useEffect(()=>{const e=()=>{u.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),a.jsx(k,{...c,children:a.jsx(Ki,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:d,children:a.jsx(Ji,{scope:t,onClose:ge.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:u,dir:f,modal:i,children:r})})})};Zi.displayName=qi;var ec=ge.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gi(n);return a.jsx(g,{...o,...r,ref:t})});ec.displayName="MenuAnchor";var tc="MenuPortal",[nc,rc]=Bi(tc,{forceMount:void 0}),oc=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Xi(tc,t);return a.jsx(nc,{scope:t,forceMount:n,children:a.jsx(y,{present:n||s.open,children:a.jsx(K,{asChild:!0,container:o,children:r})})})};oc.displayName=tc;var ac="MenuContent",[sc,ic]=Bi(ac),cc=ge.forwardRef((e,t)=>{const n=rc(ac,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Xi(ac,e.__scopeMenu),i=Qi(ac,e.__scopeMenu);return a.jsx(Ui.Provider,{scope:e.__scopeMenu,children:a.jsx(y,{present:r||s.open,children:a.jsx(Ui.Slot,{scope:e.__scopeMenu,children:i.modal?a.jsx(lc,{...o,ref:t}):a.jsx(dc,{...o,ref:t})})})})}),lc=ge.forwardRef((e,t)=>{const n=Xi(ac,e.__scopeMenu),r=ge.useRef(null),o=h(t,r);return ge.useEffect(()=>{const e=r.current;if(e)return H(e)},[]),a.jsx(uc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:v(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),dc=ge.forwardRef((e,t)=>{const n=Xi(ac,e.__scopeMenu);return a.jsx(uc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),uc=ge.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:f,onDismiss:m,disableOutsideScroll:g,...b}=e,y=Xi(ac,n),_=Qi(ac,n),j=Gi(n),N=Vi(n),S=Hi(n),[E,k]=ge.useState(null),T=ge.useRef(null),M=h(t,T,y.onContentChange),R=ge.useRef(0),P=ge.useRef(""),D=ge.useRef(0),I=ge.useRef(null),A=ge.useRef("right"),O=ge.useRef(0),L=g?G:ge.Fragment,$=g?{as:C,allowPinchZoom:!0}:void 0,z=e=>{const t=P.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,o=n.find(e=>e.ref.current===r)?.textValue,a=function(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),o=r?t[0]:t,a=n?e.indexOf(n):-1;let s=(i=e,c=Math.max(a,0),i.map((e,t)=>i[(c+t)%i.length]));var i,c;1===o.length&&(s=s.filter(e=>e!==n));const l=s.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}(n.map(e=>e.textValue),t,o),s=n.find(e=>e.textValue===a)?.ref.current;!function e(t){P.current=t,window.clearTimeout(R.current),""!==t&&(R.current=window.setTimeout(()=>e(""),1e3))}(t),s&&setTimeout(()=>s.focus())};ge.useEffect(()=>()=>window.clearTimeout(R.current),[]),W();const F=ge.useCallback(e=>A.current===I.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const e=t[a].x,i=t[a].y,c=t[s].x,l=t[s].y;i>r!=l>r&&n<(c-e)*(r-i)/(l-i)+e&&(o=!o)}return o}(n,t)}(e,I.current?.area),[]);return a.jsx(sc,{scope:n,searchRef:P,onItemEnter:ge.useCallback(e=>{F(e)&&e.preventDefault()},[F]),onItemLeave:ge.useCallback(e=>{F(e)||(T.current?.focus(),k(null))},[F]),onTriggerLeave:ge.useCallback(e=>{F(e)&&e.preventDefault()},[F]),pointerGraceTimerRef:D,onPointerGraceIntentChange:ge.useCallback(e=>{I.current=e},[]),children:a.jsx(L,{...$,children:a.jsx(B,{asChild:!0,trapped:o,onMountAutoFocus:v(s,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(x,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:f,onDismiss:m,children:a.jsx(Ii,{asChild:!0,...N,dir:_.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:k,onEntryFocus:v(l,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(w,{role:"menu","aria-orientation":"vertical","data-state":Lc(y.open),"data-radix-menu-content":"",dir:_.dir,...j,...b,ref:M,style:{outline:"none",...b.style},onKeyDown:v(b.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&z(e.key));const o=T.current;if(e.target!==o)return;if(!$i.includes(e.key))return;e.preventDefault();const a=S().filter(e=>!e.disabled).map(e=>e.ref.current);Li.includes(e.key)&&a.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(a)}),onBlur:v(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(R.current),P.current="")}),onPointerMove:v(e.onPointerMove,Fc(e=>{const t=e.target,n=O.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>O.current?"right":"left";A.current=t,O.current=e.clientX}}))})})})})})})});cc.displayName=ac;var pc=ge.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(b.div,{role:"group",...r,ref:t})});pc.displayName="MenuGroup";var fc=ge.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(b.div,{...r,ref:t})});fc.displayName="MenuLabel";var mc="MenuItem",hc="menu.itemSelect",gc=ge.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=ge.useRef(null),i=Qi(mc,e.__scopeMenu),c=ic(mc,e.__scopeMenu),l=h(t,s),d=ge.useRef(!1);return a.jsx(bc,{...o,ref:l,disabled:n,onClick:v(e.onClick,()=>{const e=s.current;if(!n&&e){const t=new CustomEvent(hc,{bubbles:!0,cancelable:!0});e.addEventListener(hc,e=>r?.(e),{once:!0}),V(e,t),t.defaultPrevented?d.current=!1:i.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:v(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:v(e.onKeyDown,e=>{const t=""!==c.searchRef.current;n||t&&" "===e.key||Oi.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});gc.displayName=mc;var bc=ge.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=ic(mc,n),c=Vi(n),l=ge.useRef(null),d=h(t,l),[u,p]=ge.useState(!1),[f,m]=ge.useState("");return ge.useEffect(()=>{const e=l.current;e&&m((e.textContent??"").trim())},[s.children]),a.jsx(Ui.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:a.jsx(Ai,{asChild:!0,...c,focusable:!r,children:a.jsx(b.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:d,onPointerMove:v(e.onPointerMove,Fc(e=>{if(r)i.onItemLeave(e);else if(i.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:v(e.onPointerLeave,Fc(e=>i.onItemLeave(e))),onFocus:v(e.onFocus,()=>p(!0)),onBlur:v(e.onBlur,()=>p(!1))})})})}),vc=ge.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return a.jsx(Ec,{scope:e.__scopeMenu,checked:n,children:a.jsx(gc,{role:"menuitemcheckbox","aria-checked":$c(n)?"mixed":n,...o,ref:t,"data-state":zc(n),onSelect:v(o.onSelect,()=>r?.(!!$c(n)||!n),{checkForDefaultPrevented:!1})})})});vc.displayName="MenuCheckboxItem";var yc="MenuRadioGroup",[xc,wc]=Bi(yc,{value:void 0,onValueChange:()=>{}}),_c=ge.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=T(r);return a.jsx(xc,{scope:e.__scopeMenu,value:n,onValueChange:s,children:a.jsx(pc,{...o,ref:t})})});_c.displayName=yc;var jc="MenuRadioItem",Nc=ge.forwardRef((e,t)=>{const{value:n,...r}=e,o=wc(jc,e.__scopeMenu),s=n===o.value;return a.jsx(Ec,{scope:e.__scopeMenu,checked:s,children:a.jsx(gc,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":zc(s),onSelect:v(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Nc.displayName=jc;var Sc="MenuItemIndicator",[Ec,kc]=Bi(Sc,{checked:!1}),Cc=ge.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=kc(Sc,n);return a.jsx(y,{present:r||$c(s.checked)||!0===s.checked,children:a.jsx(b.span,{...o,ref:t,"data-state":zc(s.checked)})})});Cc.displayName=Sc;var Tc=ge.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(b.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Tc.displayName="MenuSeparator";var Mc=ge.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gi(n);return a.jsx(N,{...o,...r,ref:t})});Mc.displayName="MenuArrow";var[Rc,Pc]=Bi("MenuSub"),Dc="MenuSubTrigger",Ic=ge.forwardRef((e,t)=>{const n=Xi(Dc,e.__scopeMenu),r=Qi(Dc,e.__scopeMenu),o=Pc(Dc,e.__scopeMenu),s=ic(Dc,e.__scopeMenu),i=ge.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=s,d={__scopeMenu:e.__scopeMenu},u=ge.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return ge.useEffect(()=>u,[u]),ge.useEffect(()=>{const e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]),a.jsx(ec,{asChild:!0,...d,children:a.jsx(bc,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Lc(n.open),...e,ref:Y(t,o.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:v(e.onPointerMove,Fc(t=>{s.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||i.current||(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:v(e.onPointerLeave,Fc(e=>{u();const t=n.content?.getBoundingClientRect();if(t){const r=n.content?.dataset.side,o="right"===r,a=o?-5:5,i=t[o?"left":"right"],l=t[o?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:i,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:i,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:v(e.onKeyDown,t=>{const o=""!==s.searchRef.current;e.disabled||o&&" "===t.key||zi[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Ic.displayName=Dc;var Ac="MenuSubContent",Oc=ge.forwardRef((e,t)=>{const n=rc(ac,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Xi(ac,e.__scopeMenu),i=Qi(ac,e.__scopeMenu),c=Pc(Ac,e.__scopeMenu),l=ge.useRef(null),d=h(t,l);return a.jsx(Ui.Provider,{scope:e.__scopeMenu,children:a.jsx(y,{present:r||s.open,children:a.jsx(Ui.Slot,{scope:e.__scopeMenu,children:a.jsx(uc,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:d,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{i.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:v(e.onFocusOutside,e=>{e.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:v(e.onEscapeKeyDown,e=>{i.onClose(),e.preventDefault()}),onKeyDown:v(e.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=Fi[i.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});function Lc(e){return e?"open":"closed"}function $c(e){return"indeterminate"===e}function zc(e){return $c(e)?"indeterminate":e?"checked":"unchecked"}function Fc(e){return t=>"mouse"===t.pointerType?e(t):void 0}Oc.displayName=Ac;var qc=Zi,Uc=ec,Hc=oc,Wc=cc,Bc=pc,Yc=fc,Gc=gc,Vc=vc,Kc=_c,Xc=Nc,Jc=Cc,Qc=Tc,Zc=Mc,el=Ic,tl=Oc,nl="DropdownMenu",[rl,ol]=f(nl,[Yi]),al=Yi(),[sl,il]=rl(nl),cl=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:c=!0}=e,l=al(t),d=ge.useRef(null),[u=!1,p]=E({prop:o,defaultProp:s,onChange:i});return a.jsx(sl,{scope:t,triggerId:S(),triggerRef:d,contentId:S(),open:u,onOpenChange:p,onOpenToggle:ge.useCallback(()=>p(e=>!e),[p]),modal:c,children:a.jsx(qc,{...l,open:u,onOpenChange:p,dir:r,modal:c,children:n})})};cl.displayName=nl;var ll="DropdownMenuTrigger",dl=ge.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=il(ll,n),i=al(n);return a.jsx(Uc,{asChild:!0,...i,children:a.jsx(b.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Y(t,s.triggerRef),onPointerDown:v(e.onPointerDown,e=>{r||0!==e.button||!1!==e.ctrlKey||(s.onOpenToggle(),s.open||e.preventDefault())}),onKeyDown:v(e.onKeyDown,e=>{r||(["Enter"," "].includes(e.key)&&s.onOpenToggle(),"ArrowDown"===e.key&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});dl.displayName=ll;var ul=e=>{const{__scopeDropdownMenu:t,...n}=e,r=al(t);return a.jsx(Hc,{...r,...n})};ul.displayName="DropdownMenuPortal";var pl="DropdownMenuContent",fl=ge.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=il(pl,n),s=al(n),i=ge.useRef(!1);return a.jsx(Wc,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:v(e.onCloseAutoFocus,e=>{i.current||o.triggerRef.current?.focus(),i.current=!1,e.preventDefault()}),onInteractOutside:v(e.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.modal&&!r||(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});fl.displayName=pl;ge.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=al(n);return a.jsx(Bc,{...o,...r,ref:t})}).displayName="DropdownMenuGroup";var ml=ge.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=al(n);return a.jsx(Yc,{...o,...r,ref:t})});ml.displayName="DropdownMenuLabel";var hl=ge.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=al(n);return a.jsx(Gc,{...o,...r,ref:t})});hl.displayName="DropdownMenuItem";var gl=ge.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=al(n);return a.jsx(Vc,{...o,...r,ref:t})});gl.displayName="DropdownMenuCheckboxItem";ge.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=al(n);return a.jsx(Kc,{...o,...r,ref:t})}).displayName="DropdownMenuRadioGroup";var bl=ge.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=al(n);return a.jsx(Xc,{...o,...r,ref:t})});bl.displayName="DropdownMenuRadioItem";var vl=ge.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=al(n);return a.jsx(Jc,{...o,...r,ref:t})});vl.displayName="DropdownMenuItemIndicator";var yl=ge.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=al(n);return a.jsx(Qc,{...o,...r,ref:t})});yl.displayName="DropdownMenuSeparator";ge.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=al(n);return a.jsx(Zc,{...o,...r,ref:t})}).displayName="DropdownMenuArrow";var xl=ge.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=al(n);return a.jsx(el,{...o,...r,ref:t})});xl.displayName="DropdownMenuSubTrigger";var wl=ge.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=al(n);return a.jsx(tl,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});wl.displayName="DropdownMenuSubContent";var _l=ul,jl=fl,Nl=ml,Sl=hl,El=gl,kl=bl,Cl=vl,Tl=yl,Ml=xl,Rl=wl;const Pl=cl,Dl=dl;ge.forwardRef(({className:e,inset:t,children:n,...r},o)=>a.jsxs(Ml,{ref:o,className:mr("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,a.jsx(xe,{className:"ml-auto h-4 w-4"})]})).displayName=Ml.displayName;ge.forwardRef(({className:e,...t},n)=>a.jsx(Rl,{ref:n,className:mr("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})).displayName=Rl.displayName;const Il=ge.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(_l,{children:a.jsx(jl,{ref:r,sideOffset:t,className:mr("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Il.displayName=jl.displayName;const Al=ge.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(Sl,{ref:r,className:mr("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Al.displayName=Sl.displayName;ge.forwardRef(({className:e,children:t,checked:n,...r},o)=>a.jsxs(El,{ref:o,className:mr("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(Cl,{children:a.jsx(we,{className:"h-4 w-4"})})}),t]})).displayName=El.displayName;ge.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(kl,{ref:r,className:mr("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(Cl,{children:a.jsx(_e,{className:"h-2 w-2 fill-current"})})}),t]})).displayName=kl.displayName;const Ol=ge.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(Nl,{ref:r,className:mr("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Ol.displayName=Nl.displayName;const Ll=ge.forwardRef(({className:e,...t},n)=>a.jsx(Tl,{ref:n,className:mr("-mx-1 my-1 h-px bg-muted",e),...t}));Ll.displayName=Tl.displayName;const $l="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,zl="8.55.2",Fl=globalThis;function ql(e,t,n){const r=n||Fl,o=r.__SENTRY__=r.__SENTRY__||{},a=o[zl]=o[zl]||{};return a[e]||(a[e]=t())}const Ul="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Hl=["debug","info","warn","error","log","assert","trace"],Wl={};function Bl(e){if(!("console"in Fl))return e();const t=Fl.console,n={},r=Object.keys(Wl);r.forEach(e=>{const r=Wl[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}const Yl=ql("logger",function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Ul?Hl.forEach(n=>{t[n]=(...t)=>{e&&Bl(()=>{Fl.console[n](`Sentry Logger [${n}]:`,...t)})}}):Hl.forEach(e=>{t[e]=()=>{}}),t}),Gl="?",Vl=/\(error: (.*)\)/,Kl=/captureMessage|captureException/;function Xl(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const o=[],a=e.split("\n");for(let s=n;s<a.length;s++){const e=a[s];if(e.length>1024)continue;const n=Vl.test(e)?e.replace(Vl,"$1"):e;if(!n.match(/\S*Error: /)){for(const e of t){const t=e(n);if(t){o.push(t);break}}if(o.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(Jl(t).function||"")&&t.pop();t.reverse(),Kl.test(Jl(t).function||"")&&(t.pop(),Kl.test(Jl(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||Jl(t).filename,function:e.function||Gl}))}(o.slice(r))}}function Jl(e){return e[e.length-1]||{}}const Ql="<anonymous>";function Zl(e){try{return e&&"function"==typeof e&&e.name||Ql}catch(t){return Ql}}function ed(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch(n){return}}}const td={},nd={};function rd(e,t){td[e]=td[e]||[],td[e].push(t)}function od(e,t){if(!nd[e]){nd[e]=!0;try{t()}catch(n){Ul&&Yl.error(`Error while instrumenting ${e}`,n)}}}function ad(e,t){const n=e&&td[e];if(n)for(const o of n)try{o(t)}catch(r){Ul&&Yl.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Zl(o)}\nError:`,r)}}let sd=null;function id(){sd=Fl.onerror,Fl.onerror=function(e,t,n,r,o){return ad("error",{column:r,error:o,line:n,msg:e,url:t}),!!sd&&sd.apply(this,arguments)},Fl.onerror.__SENTRY_INSTRUMENTED__=!0}let cd=null;function ld(){cd=Fl.onunhandledrejection,Fl.onunhandledrejection=function(e){return ad("unhandledrejection",e),!cd||cd.apply(this,arguments)},Fl.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function dd(){return ud(Fl),Fl}function ud(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||zl,t[zl]=t[zl]||{}}const pd=Object.prototype.toString;function fd(e){switch(pd.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return jd(e,Error)}}function md(e,t){return pd.call(e)===`[object ${t}]`}function hd(e){return md(e,"ErrorEvent")}function gd(e){return md(e,"DOMError")}function bd(e){return md(e,"String")}function vd(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function yd(e){return null===e||vd(e)||"object"!=typeof e&&"function"!=typeof e}function xd(e){return md(e,"Object")}function wd(e){return"undefined"!=typeof Event&&jd(e,Event)}function _d(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function jd(e,t){try{return e instanceof t}catch(n){return!1}}function Nd(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const Sd=Fl;function Ed(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let a=0,s=0;const i=" > ",c=i.length;let l;const d=Array.isArray(t)?t:t.keyAttrs,u=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&a++<r&&(l=kd(n,d),!("html"===l||a>1&&s+o.length*c+l.length>=u));)o.push(l),s+=l.length,n=n.parentNode;return o.reverse().join(i)}catch(n){return"<unknown>"}}function kd(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(Sd.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const o=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(o&&o.length)o.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&bd(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const a=["aria-label","type","name","title","alt"];for(const s of a){const e=n.getAttribute(s);e&&r.push(`[${s}="${e}"]`)}return r.join("")}function Cd(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function Td(e,t){if(!Array.isArray(e))return"";const n=[];for(let o=0;o<e.length;o++){const t=e[o];try{Nd(t)?n.push("[VueViewModel]"):n.push(String(t))}catch(r){n.push("[value cannot be serialized]")}}return n.join(t)}function Md(e,t,n=!1){return!!bd(e)&&(md(t,"RegExp")?t.test(e):!!bd(t)&&(n?e===t:e.includes(t)))}function Rd(e,t=[],n=!1){return t.some(t=>Md(e,t,n))}function Pd(e,t,n){if(!(t in e))return;const r=e[t],o=n(r);"function"==typeof o&&Id(o,r);try{e[t]=o}catch(a){Ul&&Yl.log(`Failed to replace method "${t}" in object`,e)}}function Dd(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(r){Ul&&Yl.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Id(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Dd(e,"__sentry_original__",t)}catch(n){}}function Ad(e){return e.__sentry_original__}function Od(e){if(fd(e))return{message:e.message,name:e.name,stack:e.stack,...$d(e)};if(wd(e)){const t={type:e.type,target:Ld(e.target),currentTarget:Ld(e.currentTarget),...$d(e)};return"undefined"!=typeof CustomEvent&&jd(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Ld(e){try{return t=e,"undefined"!=typeof Element&&jd(t,Element)?Ed(e):Object.prototype.toString.call(e)}catch(n){return"<unknown>"}var t}function $d(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function zd(e){return Fd(e,new Map)}function Fd(e,t){if(function(e){if(!xd(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(t){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const o of Object.getOwnPropertyNames(e))void 0!==e[o]&&(r[o]=Fd(e[o],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach(e=>{r.push(Fd(e,t))}),r}return e}function qd(){return Date.now()/1e3}const Ud=function(){const{performance:e}=Fl;if(!e||!e.now)return qd;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function Hd(){const e=Fl,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(r){}return"10000000100040008000100000000000".replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function Wd(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Bd(e){const{message:t,event_id:n}=e;if(t)return t;const r=Wd(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Yd(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],a=o[0]=o[0]||{};a.value||(a.value=t||""),a.type||(a.type="Error")}function Gd(e,t){const n=Wd(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function Vd(e){if(function(e){try{return e.__sentry_captured__}catch(t){}}(e))return!0;try{Dd(e,"__sentry_captured__",!0)}catch(t){}return!1}var Kd;function Xd(e){return new Qd(t=>{t(e)})}function Jd(e){return new Qd((t,n)=>{n(e)})}(()=>{const{performance:e}=Fl;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=o<t,s=e.timing&&e.timing.navigationStart,i="number"==typeof s?Math.abs(s+n-r):t;(a||i<t)&&(o<=i&&e.timeOrigin)})(),function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Kd||(Kd={}));class Qd{constructor(e){Qd.prototype.__init.call(this),Qd.prototype.__init2.call(this),Qd.prototype.__init3.call(this),Qd.prototype.__init4.call(this),this._state=Kd.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new Qd((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(o){r(o)}else n(t)},e=>{if(t)try{n(t(e))}catch(o){r(o)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new Qd((t,n)=>{let r,o;return this.then(t=>{o=!1,r=t,e&&e()},t=>{o=!0,r=t,e&&e()}).then(()=>{o?n(r):t(r)})})}__init(){this._resolve=e=>{this._setResult(Kd.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Kd.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===Kd.PENDING&&(_d(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Kd.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===Kd.RESOLVED&&e[1](this._value),this._state===Kd.REJECTED&&e[2](this._value),e[0]=!0)})}}}function Zd(e){const t=Ud(),n={sid:Hd(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return zd({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&eu(n,e),n}function eu(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Ud(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Hd()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function tu(){return Hd()}function nu(){return Hd().substring(16)}function ru(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=ru(r[o],t[o],n-1));return r}const ou="_sentrySpan";function au(e,t){t?Dd(e,ou,t):delete e[ou]}function su(e){return e[ou]}class iu{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:tu(),spanId:nu()}}clone(){const e=new iu;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,au(e,su(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&eu(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof cu?[t.getScopeData(),t.getRequestSession()]:xd(t)?[e,e.requestSession]:[],{tags:o,extra:a,user:s,contexts:i,level:c,fingerprint:l=[],propagationContext:d}=n||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...a},this._contexts={...this._contexts,...i},s&&Object.keys(s).length&&(this._user=s),c&&(this._level=c),l.length&&(this._fingerprint=l),d&&(this._propagationContext=d),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,au(this,void 0),this._attachments=[],this.setPropagationContext({traceId:tu()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:qd(),...e};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:su(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=ru(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:nu(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:Hd();if(!this._client)return Yl.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:Hd();if(!this._client)return Yl.warn("No client configured on scope - will not capture message!"),r;const o=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Hd();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(Yl.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}const cu=iu;class lu{constructor(e,t){let n,r;n=e||new cu,r=t||new cu,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(r){throw this._popScope(),r}return _d(n)?n.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function du(){const e=ud(dd());return e.stack=e.stack||new lu(ql("defaultCurrentScope",()=>new cu),ql("defaultIsolationScope",()=>new cu))}function uu(e){return du().withScope(e)}function pu(e,t){const n=du();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function fu(e){return du().withScope(()=>e(du().getIsolationScope()))}function mu(e){const t=ud(e);return t.acs?t.acs:{withIsolationScope:fu,withScope:uu,withSetScope:pu,withSetIsolationScope:(e,t)=>fu(t),getCurrentScope:()=>du().getScope(),getIsolationScope:()=>du().getIsolationScope()}}function hu(){return mu(dd()).getCurrentScope()}function gu(){return mu(dd()).getIsolationScope()}function bu(...e){const t=mu(dd());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function vu(){return hu().getClient()}function yu(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:o}=t;return zd({trace_id:n,span_id:r,parent_span_id:o})}function xu(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[r,o]]of t){(n[r]||(n[r]=[])).push(zd(o))}return n}const wu=/^sentry-/;function _u(e){const t=function(e){if(!e||!bd(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce((e,t)=>{const n=ju(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{});return ju(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(wu)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function ju(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}let Nu=!1;function Su(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return zd({parent_span_id:r?t:Cu(e).parent_span_id,span_id:r?nu():t,trace_id:n})}function Eu(e){return"number"==typeof e?ku(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ku(e.getTime()):Ud()}function ku(e){return e>9999999999?e/1e3:e}function Cu(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:o,name:a,endTime:s,parentSpanId:i,status:c}=e;return zd({span_id:t,trace_id:n,data:r,description:a,parent_span_id:i,start_timestamp:Eu(o),timestamp:Eu(s)||void 0,status:Tu(c),op:r["sentry.op"],origin:r["sentry.origin"],_metrics_summary:xu(e)})}return{span_id:t,trace_id:n}}catch(t){return{}}}function Tu(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}function Mu(e){return e._sentryRootSpan||e}function Ru(){Nu||(Bl(()=>{}),Nu=!0)}const Pu="production";function Du(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o=zd({environment:n.environment||Pu,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",o),o}function Iu(e){const t=vu();if(!t)return{};const n=Mu(e),r=n._frozenDsc;if(r)return r;const o=n.spanContext().traceState,a=o&&o.get("sentry.dsc"),s=a&&_u(a);if(s)return s;const i=Du(e.spanContext().traceId,t),c=Cu(n),l=c.data||{},d=l["sentry.sample_rate"];null!=d&&(i.sample_rate=`${d}`);const u=l["sentry.source"],p=c.description;return"url"!==u&&p&&(i.transaction=p),function(){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=vu(),t=e&&e.getOptions();return!!t&&(t.enableTracing||"tracesSampleRate"in t||"tracesSampler"in t)}()&&(i.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n))),t.emit("createDsc",i,n),i}const Au=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ou(e,t=!1){const{host:n,path:r,pass:o,port:a,projectId:s,protocol:i,publicKey:c}=e;return`${i}://${c}${t&&o?`:${o}`:""}@${n}${a?`:${a}`:""}/${r?`${r}/`:r}${s}`}function Lu(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function $u(e){const t="string"==typeof e?function(e){const t=Au.exec(e);if(!t)return void Bl(()=>{});const[n,r,o="",a="",s="",i=""]=t.slice(1);let c="",l=i;const d=l.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),l=d.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return Lu({host:a,pass:o,path:c,projectId:l,port:s,protocol:n,publicKey:r})}(e):Lu(e);if(t&&function(e){if(!Ul)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(Yl.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(Yl.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(Yl.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(Yl.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function zu(e,t=100,n=1/0){try{return qu("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Fu(e,t=3,n=102400){const r=zu(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?Fu(e,t-1,n):r;var o}function qu(e,t,n=1/0,r=1/0,o=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[a,s]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const i=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(Nd(t))return"[VueViewModel]";if(xd(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${Zl(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}var n}(e,t);if(!i.startsWith("[object "))return i;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return i.replace("object ","");if(a(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return qu("",l.toJSON(),c-1,r,o)}catch(f){}const d=Array.isArray(t)?[]:{};let u=0;const p=Od(t);for(const m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(u>=r){d[m]="[MaxProperties ~]";break}const e=p[m];d[m]=qu(m,e,c-1,r,o),u++}return s(t),d}function Uu(e,t=[]){return[e,t]}function Hu(e,t){const[n,r]=e;return[n,[...r,t]]}function Wu(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function Bu(e){return Fl.__SENTRY__&&Fl.__SENTRY__.encodePolyfill?Fl.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function Yu(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[Bu(r),e]:r.push("string"==typeof e?Bu(e):e)}for(const s of n){const[e,t]=s;if(o(`\n${JSON.stringify(e)}\n`),"string"==typeof t||t instanceof Uint8Array)o(t);else{let e;try{e=JSON.stringify(t)}catch(a){e=JSON.stringify(zu(t))}o(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}(r)}function Gu(e){const t="string"==typeof e.data?Bu(e.data):e.data;return[zd({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Vu={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function Ku(e){return Vu[e]}function Xu(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ju(e,t,n,r){const o=Xu(n),a=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const s=function(e,t,n,r){const o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Ou(r)},...o&&{trace:zd({...o})}}}(e,o,r,t);delete e.sdkProcessingMetadata;return Uu(s,[[{type:a},e]])}function Qu(e,t,n,r=0){return new Qd((o,a)=>{const s=e[r];if(null===t||"function"!=typeof s)o(t);else{const i=s({...t},n);$l&&s.id&&null===i&&Yl.log(`Event processor "${s.id}" dropped event`),_d(i)?i.then(t=>Qu(e,t,n,r+1).then(o)).then(null,a):Qu(e,i,n,r+1).then(o).then(null,a)}})}let Zu,ep,tp;function np(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:a}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:a,level:s,transactionName:i}=t,c=zd(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=zd(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const d=zd(o);d&&Object.keys(d).length&&(e.user={...d,...e.user});const u=zd(a);u&&Object.keys(u).length&&(e.contexts={...u,...e.contexts});s&&(e.level=s);i&&"transaction"!==e.type&&(e.transaction=i)}(e,t),r&&function(e,t){e.contexts={trace:Su(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Iu(t),...e.sdkProcessingMetadata};const n=Mu(t),r=Cu(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,a)}function rp(e,t){const{extra:n,tags:r,user:o,contexts:a,level:s,sdkProcessingMetadata:i,breadcrumbs:c,fingerprint:l,eventProcessors:d,attachments:u,propagationContext:p,transactionName:f,span:m}=t;op(e,"extra",n),op(e,"tags",r),op(e,"user",o),op(e,"contexts",a),e.sdkProcessingMetadata=ru(e.sdkProcessingMetadata,i,2),s&&(e.level=s),f&&(e.transactionName=f),m&&(e.span=m),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),u.length&&(e.attachments=[...e.attachments,...u]),e.propagationContext={...e.propagationContext,...p}}function op(e,t,n){e[t]=ru(e[t],n,1)}function ap(e,t,n,r,o,a){const{normalizeDepth:s=3,normalizeMaxBreadth:i=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Hd(),timestamp:t.timestamp||qd()},l=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:a=250}=t;e.environment=e.environment||n||Pu,!e.release&&r&&(e.release=r);!e.dist&&o&&(e.dist=o);e.message&&(e.message=Cd(e.message,a));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Cd(s.value,a));const i=e.request;i&&i.url&&(i.url=Cd(i.url,a))}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,l),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=Fl._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return tp&&n.length===ep||(ep=n.length,tp=n.reduce((n,r)=>{Zu||(Zu={});const o=Zu[r];if(o)n[o[0]]=o[1];else{const o=e(r);for(let e=o.length-1;e>=0;e--){const a=o[e],s=a&&a.filename,i=t[r];if(s&&i){n[s]=i,Zu[r]=[s,i];break}}}return n},{})),tp}(t);try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{n&&e.filename&&(e.debug_id=n[e.filename])})})}catch(r){}}(c,e.stackParser);const d=function(e,t){if(!t)return e;const n=e?e.clone():new cu;return n.update(t),n}(r,n.captureContext);n.mechanism&&Gd(c,n.mechanism);const u=o?o.getEventProcessors():[],p=ql("globalScope",()=>new cu).getScopeData();if(a){rp(p,a.getScopeData())}if(d){rp(p,d.getScopeData())}const f=[...n.attachments||[],...p.attachments];f.length&&(n.attachments=f),np(c,p);return Qu([...u,...p.eventProcessors],c,n).then(e=>(e&&function(e){const t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch(r){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof s&&s>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:zu(e.data,t,n)}}))},...e.user&&{user:zu(e.user,t,n)},...e.contexts&&{contexts:zu(e.contexts,t,n)},...e.extra&&{extra:zu(e.extra,t,n)}};e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=zu(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:zu(e.data,t,n)}})));e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=zu(e.contexts.flags,3,n));return r}(e,s,i):e))}function sp(e){if(e)return function(e){return e instanceof cu||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>ip.includes(e))}(e)?{captureContext:e}:e}const ip=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function cp(e,t){return hu().captureException(e,sp(t))}function lp(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;return hu().captureMessage(e,n,r)}function dp(e,t){return hu().captureEvent(e,t)}function up(e){gu().setUser(e)}function pp(e){const t=vu(),n=gu(),r=hu(),{release:o,environment:a=Pu}=t&&t.getOptions()||{},{userAgent:s}=Fl.navigator||{},i=Zd({release:o,environment:a,user:r.getUser()||n.getUser(),...s&&{userAgent:s},...e}),c=n.getSession();return c&&"ok"===c.status&&eu(c,{status:"exited"}),fp(),n.setSession(i),r.setSession(i),i}function fp(){const e=gu(),t=hu(),n=t.getSession()||e.getSession();n&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),eu(e,t)}(n),mp(),e.setSession(),t.setSession()}function mp(){const e=gu(),t=hu(),n=vu(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function hp(e=!1){e?fp():mp()}function gp(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function bp(e,t,n){return t||`${function(e){return`${gp(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const vp=[];function yp(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;const o=function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r),a=o.findIndex(e=>"Debug"===e.name);if(a>-1){const[e]=o.splice(a,1);o.push(e)}return o}function xp(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function wp(e,t,n){if(n[t.name])$l&&Yl.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===vp.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),vp.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}$l&&Yl.log(`Integration installed: ${t.name}`)}}class _p extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}const jp="Not capturing exception because it's already been captured.";class Np{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=$u(e.dsn):$l&&Yl.warn("No DSN provided, client will not send events."),this._dsn){const t=bp(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}["enableTracing","tracesSampleRate","tracesSampler"].find(t=>t in e&&null==e[t])&&Bl(()=>{})}captureException(e,t,n){const r=Hd();if(Vd(e))return $l&&Yl.log(jp),r;const o={event_id:r,...t};return this._process(this.eventFromException(e,o).then(e=>this._captureEvent(e,o,n))),o.event_id}captureMessage(e,t,n,r){const o={event_id:Hd(),...n},a=vd(e)?e:String(e),s=yd(e)?this.eventFromMessage(a,t,o):this.eventFromException(e,o);return this._process(s.then(e=>this._captureEvent(e,o,r))),o.event_id}captureEvent(e,t,n){const r=Hd();if(t&&t.originalException&&Vd(t.originalException))return $l&&Yl.log(jp),r;const o={event_id:r,...t},a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,o,a||n)),o.event_id}captureSession(e){"string"!=typeof e.release?$l&&Yl.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),eu(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):Xd(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.emit("close"),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];wp(this,e,this._integrations),t||xp(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=Ju(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of t.attachments||[])n=Hu(n,Gu(o));const r=this.sendEnvelope(n);r&&r.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){const t=function(e,t,n,r){const o=Xu(n);return Uu({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Ou(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const r="number"==typeof n?n:1,o=`${e}:${t}`;$l&&Yl.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,e=>($l&&Yl.error("Error while sending envelope:",e),e)):($l&&Yl.error("Transport disabled"),Xd({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&wp(e,t,n)}),n}(this,e),xp(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const o=t.exception&&t.exception.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const a="ok"===e.status;(a&&0===e.errors||a&&n)&&(eu(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Qd(t=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n=hu(),r=gu()){const o=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),ap(o,e,t,n,this,r).then(e=>{if(null===e)return e;e.contexts={trace:yu(n),...e.contexts};const t=function(e,t){const n=t.getPropagationContext();return n.dsc||Du(n.traceId,e)}(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:t,...e.sdkProcessingMetadata},e})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{$l&&(e instanceof _p&&"log"===e.logLevel?Yl.log(e.message):Yl.warn(e))})}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:o}=r,a=Ep(e),s=Sp(e),i=e.type||"error",c=`before send for type \`${i}\``,l=void 0===o?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;$l&&Yl.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}(o);if(s&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",e),Jd(new _p(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const d="replay_event"===i?"replay":i,u=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,u).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",d,e),new _p("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const o=function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:a,beforeSendSpan:s}=t;if(Sp(n)&&o)return o(n,r);if(Ep(n)){if(n.spans&&s){const t=[];for(const r of n.spans){const n=s(r);n?t.push(n):(Ru(),e.recordDroppedEvent("before_send","span"))}n.spans=t}if(a){if(n.spans){const e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(n,r)}}return n}(this,r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(_d(e))return e.then(e=>{if(!xd(e)&&null!==e)throw new _p(n);return e},e=>{throw new _p(`${t} rejected with ${e}`)});if(!xd(e)&&null!==e)throw new _p(n);return e}(o,c)}).then(r=>{if(null===r){if(this.recordDroppedEvent("before_send",d,e),a){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new _p(`${c} returned \`null\`, will not send event.`,"log")}const o=n&&n.getSession();if(!a&&o&&this._updateSessionFromEvent(o,r),a){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const s=r.transaction_info;if(a&&s&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...s,source:e}}return this.sendEvent(r,t),r}).then(null,e=>{if(e instanceof _p)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new _p(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){$l&&Yl.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void($l&&Yl.log("No outcomes to send"));if(!this._dsn)return void($l&&Yl.log("No dsn provided, will not send outcomes"));$l&&Yl.log("Sending outcomes:",e);const t=(n=e,Uu((r=this._options.tunnel&&Ou(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:qd(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}}function Sp(e){return void 0===e.type}function Ep(e){return"transaction"===e.type}function kp(e,t){!0===t.debug&&($l?Yl.enable():Bl(()=>{}));hu().update(t.initialScope);const n=new e(t);return function(e){hu().setClient(e)}(n),n.init(),n}function Cp(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return Jd(new _p("Not adding Promise because buffer limit was reached."));const o=r();return-1===t.indexOf(o)&&t.push(o),o.then(()=>n(o)).then(null,()=>n(o).then(null,()=>{})),o},drain:function(e){return new Qd((n,r)=>{let o=t.length;if(!o)return n(!0);const a=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Xd(e).then(()=>{--o||(clearTimeout(a),n(!0))},r)})})}}}function Tp(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},a=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(a)for(const i of a.trim().split(",")){const[e,t,,,n]=i.split(":",5),a=parseInt(e,10),s=1e3*(isNaN(a)?60:a);if(t)for(const i of t.split(";"))"metric_bucket"===i&&n&&!n.split(";").includes("custom")||(o[i]=r+s);else o.all=r+s}else s?o.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(s,r):429===t&&(o.all=r+6e4);return o}function Mp(e,t,n=Cp(e.bufferSize||64)){let r={};return{send:function(o){const a=[];if(Wu(o,(t,n)=>{const o=Ku(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,o)){const r=Rp(t,n);e.recordDroppedEvent("ratelimit_backoff",o,r)}else a.push(t)}),0===a.length)return Xd({});const s=Uu(o[0],a),i=t=>{Wu(s,(n,r)=>{const o=Rp(n,r);e.recordDroppedEvent(t,Ku(r),o)})};return n.add(()=>t({body:Yu(s)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&$l&&Yl.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Tp(r,e),e),e=>{throw i("network_error"),e})).then(e=>e,e=>{if(e instanceof _p)return $l&&Yl.error("Skipped sending event because buffer is full."),i("queue_overflow"),Xd({});throw e})},flush:e=>n.drain(e)}}function Rp(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function Pp(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:zl})),version:zl}),e._metadata=o}const Dp=100;function Ip(e,t){const n=vu(),r=gu();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:a=Dp}=n.getOptions();if(a<=0)return;const s={timestamp:qd(),...e},i=o?Bl(()=>o(s,t)):s;null!==i&&(n.emit&&n.emit("beforeAddBreadcrumb",i,t),r.addBreadcrumb(i,a))}let Ap;const Op=new WeakMap,Lp=()=>({name:"FunctionToString",setupOnce(){Ap=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Ad(this),n=Op.has(vu())&&void 0!==t?t:this;return Ap.apply(n,e)}}catch(e){}},setup(e){Op.set(e,!0)}}),$p=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],zp=(e={})=>({name:"InboundFilters",processEvent(t,n,r){const o=r.getOptions(),a=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:$p],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,o);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(t){}return!1}(e))return $l&&Yl.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Bd(e)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch(r){}n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`));return t}(e).some(e=>Rd(e,t))}(e,t.ignoreErrors))return $l&&Yl.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Bd(e)}`),!0;if(function(e){if(e.type)return!1;if(!e.exception||!e.exception.values||0===e.exception.values.length)return!1;return!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(e))return $l&&Yl.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${Bd(e)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&Rd(n,t)}(e,t.ignoreTransactions))return $l&&Yl.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Bd(e)}`),!0;if(function(e,t){if(!t||!t.length)return!1;const n=Fp(e);return!!n&&Rd(n,t)}(e,t.denyUrls))return $l&&Yl.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Bd(e)}.\nUrl: ${Fp(e)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=Fp(e);return!n||Rd(n,t)}(e,t.allowUrls))return $l&&Yl.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Bd(e)}.\nUrl: ${Fp(e)}`),!0;return!1}(t,a)?null:t}});function Fp(e){try{let n;try{n=e.exception.values[0].stacktrace.frames}catch(t){}return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch(n){return $l&&Yl.error(`Cannot extract url for event ${Bd(e)}`),null}}function qp(e,t,n=250,r,o,a,s){if(!(a.exception&&a.exception.values&&s&&jd(s.originalException,Error)))return;const i=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;var c,l;i&&(a.exception.values=(c=Up(e,t,o,s.originalException,r,a.exception.values,i,0),l=n,c.map(e=>(e.value&&(e.value=Cd(e.value,l)),e))))}function Up(e,t,n,r,o,a,s,i){if(a.length>=n+1)return a;let c=[...a];if(jd(r[o],Error)){Hp(s,i);const a=e(t,r[o]),l=c.length;Wp(a,o,l,i),c=Up(e,t,n,r[o],o,[a,...c],a,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,a)=>{if(jd(r,Error)){Hp(s,i);const l=e(t,r),d=c.length;Wp(l,`errors[${a}]`,d,i),c=Up(e,t,n,r,o,[l,...c],l,d)}}),c}function Hp(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function Wp(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Bp(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Yp(){"console"in Fl&&Hl.forEach(function(e){e in Fl.console&&Pd(Fl.console,e,function(t){return Wl[e]=t,function(...t){ad("console",{args:t,level:e});const n=Wl[e];n&&n.apply(Fl.console,t)}})})}function Gp(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Vp=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Xp(e,t))return!1;if(!Kp(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Jp(t),r=Jp(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Xp(e,t))return!1;if(!Kp(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return $l&&Yl.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(n){}return e=t}}};function Kp(e,t){let n=ed(e),r=ed(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){const e=r[o],t=n[o];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function Xp(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(o){return!1}}function Jp(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Qp(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const Zp=Fl;function ef(){if(!("fetch"in Zp))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function tf(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function nf(e,t){const n="fetch";rd(n,e),od(n,()=>function(e,t=!1){if(t&&!function(){if("string"==typeof EdgeRuntime)return!0;if(!ef())return!1;if(tf(Zp.fetch))return!0;let e=!1;const t=Zp.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=tf(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Ul&&Yl.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}())return;Pd(Fl,"fetch",function(e){return function(...t){const n=new Error,{method:r,url:o}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:of(t),method:rf(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:of(t),method:rf(t,"method")?String(t.method).toUpperCase():"GET"}}(t),a={args:t,fetchData:{method:r,url:o},startTimestamp:1e3*Ud(),virtualError:n};return ad("fetch",{...a}),e.apply(Fl,t).then(async e=>(ad("fetch",{...a,endTimestamp:1e3*Ud(),response:e}),e),e=>{throw ad("fetch",{...a,endTimestamp:1e3*Ud(),error:e}),fd(e)&&void 0===e.stack&&(e.stack=n.stack,Dd(e,"framesToPop",1)),e})}})}(0,t))}function rf(e,t){return!!e&&"object"==typeof e&&!!e[t]}function of(e){return"string"==typeof e?e:e?rf(e,"url")?e.url:e.toString?e.toString():"":""}const af=Fl;const sf=Fl;let cf=0;function lf(){return cf>0}function df(e,t={}){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(Ad(e))return e}catch(r){return e}const n=function(...n){try{const r=n.map(e=>df(e,t));return e.apply(this,r)}catch(r){throw cf++,setTimeout(()=>{cf--}),bu(e=>{e.addEventProcessor(e=>(t.mechanism&&(Yd(e,void 0),Gd(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),cp(r)}),r}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch(r){}Id(n,e),Dd(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch(o){}return n}const uf="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function pf(e,t){const n=hf(e,t),r={type:vf(t),value:yf(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ff(e,t,n,r){const o=vu(),a=o&&o.getOptions().normalizeDepth,s=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}return}(t),i={__serialized__:Fu(t,a)};if(s)return{exception:{values:[pf(e,s)]},extra:i};const c={exception:{values:[{type:wd(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:_f(t,{isUnhandledRejection:r})}]},extra:i};if(n){const t=hf(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function mf(e,t){return{exception:{values:[pf(e,t)]}}}function hf(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&gf.test(e.message))return 1;return 0}(t),o=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,o)}catch(a){}return[]}const gf=/Minified React error #\d+;/i;function bf(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function vf(e){const t=e&&e.name;if(!t&&bf(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function yf(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:bf(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function xf(e,t,n,r,o){let a;if(hd(t)&&t.error){return mf(e,t.error)}if(gd(t)||md(t,"DOMException")){const o=t;if("stack"in t)a=mf(e,t);else{const t=o.name||(gd(o)?"DOMError":"DOMException"),s=o.message?`${t}: ${o.message}`:t;a=wf(e,s,n,r),Yd(a,s)}return"code"in o&&(a.tags={...a.tags,"DOMException.code":`${o.code}`}),a}if(fd(t))return mf(e,t);if(xd(t)||wd(t)){return a=ff(e,t,n,o),Gd(a,{synthetic:!0}),a}return a=wf(e,t,n,r),Yd(a,`${t}`),Gd(a,{synthetic:!0}),a}function wf(e,t,n,r){const o={};if(r&&n){const r=hf(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),Gd(o,{synthetic:!0})}if(vd(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function _f(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(Od(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Cd(r,t);for(let o=n.length;o>0;o--){const e=n.slice(0,o).join(", ");if(!(e.length>t))return o===n.length?e:Cd(e,t)}return""}(e),r=t?"promise rejection":"exception";if(hd(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(wd(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(t){}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}class jf extends Np{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};Pp(t,"browser",["browser"],sf.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&sf.document&&sf.document.addEventListener("visibilitychange",()=>{"hidden"===sf.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){const o=xf(e,t,n&&n.syntheticException||void 0,r);return Gd(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Xd(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const a=wf(e,t,r&&r.syntheticException||void 0,o);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),Xd(a)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(uf&&Yl.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Ou(r)}},a=function(e){return[{type:"user_report"},e]}(e);return Uu(o,[a])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}}const Nf="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Sf=Fl;let Ef,kf,Cf,Tf;function Mf(){if(!Sf.document)return;const e=ad.bind(null,"dom"),t=Rf(e,!0);Sf.document.addEventListener("click",t,!1),Sf.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Sf[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(Pd(r,"addEventListener",function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){const r=Rf(e);a.handler=r,t.call(this,n,r,o)}a.refCount++}catch(a){}return t.call(this,n,r,o)}}),Pd(r,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},o=n[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch(o){}return e.call(this,t,n,r)}}))})}function Rf(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(t){return null}}(n);if(function(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;Dd(n,"_sentryCaptured",!0),r&&!r._sentryId&&Dd(r,"_sentryId",Hd());const o="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==kf)return!1;try{if(!e.target||e.target._sentryId!==Cf)return!1}catch(t){}return!0}(n)){e({event:n,name:o,global:t}),kf=n.type,Cf=r?r._sentryId:void 0}clearTimeout(Ef),Ef=Sf.setTimeout(()=>{Cf=void 0,kf=void 0},1e3)}}function Pf(e){const t="history";rd(t,e),od(t,Df)}function Df(){if(!function(){const e=af.chrome,t=e&&e.app&&e.app.runtime,n="history"in af&&!!af.history.pushState&&!!af.history.replaceState;return!t&&n}())return;const e=Sf.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=Tf,t=String(n);Tf=t;ad("history",{from:e,to:t})}return e.apply(this,t)}}Sf.onpopstate=function(...t){const n=Sf.location.href,r=Tf;Tf=n;if(ad("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(o){}},Pd(Sf.history,"pushState",t),Pd(Sf.history,"replaceState",t)}const If={};function Af(e){If[e]=void 0}const Of="__sentry_xhr_v3__";function Lf(){if(!Sf.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,o=1e3*Ud(),a=bd(n[0])?n[0].toUpperCase():void 0,s=function(e){if(bd(e))return e;try{return e.toString()}catch(t){}return}(n[1]);if(!a||!s)return e.apply(t,n);t[Of]={method:a,url:s,request_headers:{}},"POST"===a&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const i=()=>{const e=t[Of];if(e&&4===t.readyState){try{e.status_code=t.status}catch(n){}ad("xhr",{endTimestamp:1e3*Ud(),startTimestamp:o,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(i(),e.apply(t,n))}):t.addEventListener("readystatechange",i),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,o]=n,a=t[Of];return a&&bd(r)&&bd(o)&&(a.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[Of];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return ad("xhr",{startTimestamp:1e3*Ud(),xhr:t}),e.apply(t,n)}})}function $f(e,t=function(e){const t=If[e];if(t)return t;let n=Sf[e];if(tf(n))return If[e]=n.bind(Sf);const r=Sf.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(n=o[e]),r.head.removeChild(t)}catch(o){Nf&&Yl.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n?If[e]=n.bind(Sf):n}("fetch")){let n=0,r=0;return Mp(e,function(o){const a=o.body.length;n+=a,r++;const s={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Af("fetch"),Jd("No fetch implementation available");try{return t(e.url,s).then(e=>(n-=a,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}catch(i){return Af("fetch"),n-=a,r--,Jd(i)}})}function zf(e,t,n,r){const o={filename:e,function:"<anonymous>"===t?Gl:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const Ff=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,qf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Uf=/\((\S*)(?::(\d+))(?::(\d+))\)/,Hf=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Wf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Bf=Xl(...[[30,e=>{const t=Ff.exec(e);if(t){const[,e,n,r]=t;return zf(e,Gl,+n,+r)}const n=qf.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Uf.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=Yf(n[1]||Gl,n[2]);return zf(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=Hf.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Wf.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||Gl;return[n,e]=Yf(n,e),zf(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Yf=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Gl,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Gf=1024,Vf=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console";rd(t,e),od(t,Yp)}(function(e){return function(t){if(vu()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:Gp(t.level),message:Td(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${Td(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Ip(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(vu()!==e)return;let r,o,a="object"==typeof t?t.serializeAttribute:void 0,s="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;s&&s>Gf&&(uf&&Yl.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=Gf),"string"==typeof a&&(a=[a]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=Ed(t,{keyAttrs:a,maxStringLength:s}),o=function(e){if(!Sd.HTMLElement)return null;let t=e;for(let n=0;n<5;n++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(t)}catch(c){r="<unknown>"}if(0===r.length)return;const i={category:`ui.${n.name}`,message:r};o&&(i.data={"ui.component_name":o}),Ip(i,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),rd("dom",n),od("dom",Mf)),t.xhr&&function(e){rd("xhr",e),od("xhr",Lf)}(function(e){return function(t){if(vu()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[Of];if(!n||!r||!o)return;const{method:a,url:s,status_code:i,body:c}=o,l={method:a,url:s,status_code:i},d={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};Ip({category:"xhr",data:l,type:"http",level:Qp(i)},d)}}(e)),t.fetch&&nf(function(e){return function(t){if(vu()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){Ip({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response,o={...t.fetchData,status_code:e&&e.status},a={input:t.args,response:e,startTimestamp:n,endTimestamp:r};Ip({category:"fetch",data:o,type:"http",level:Qp(o.status_code)},a)}}}(e)),t.history&&Pf(function(e){return function(t){if(vu()!==e)return;let n=t.from,r=t.to;const o=Bp(sf.location.href);let a=n?Bp(n):void 0;const s=Bp(r);a&&a.path||(a=o),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),o.protocol===a.protocol&&o.host===a.host&&(n=a.relative),Ip({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){vu()===e&&Ip({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Bd(t)},{event:t})}}(e))}}};const Kf=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Xf=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&Pd(sf,"setTimeout",Jf),t.setInterval&&Pd(sf,"setInterval",Jf),t.requestAnimationFrame&&Pd(sf,"requestAnimationFrame",Qf),t.XMLHttpRequest&&"XMLHttpRequest"in sf&&Pd(XMLHttpRequest.prototype,"send",Zf);const e=t.eventTarget;if(e){(Array.isArray(e)?e:Kf).forEach(em)}}}};function Jf(e){return function(...t){const n=t[0];return t[0]=df(n,{mechanism:{data:{function:Zl(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Qf(e){return function(t){return e.apply(this,[df(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Zl(e)},handled:!1,type:"instrument"}})])}}function Zf(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&Pd(n,e,function(t){const n={mechanism:{data:{function:e,handler:Zl(t)},handled:!1,type:"instrument"}},r=Ad(t);return r&&(n.mechanism.data.handler=Zl(r)),df(t,n)})}),e.apply(this,t)}}function em(e){const t=sf[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Pd(n,"addEventListener",function(t){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=df(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Zl(r),target:e},handled:!1,type:"instrument"}}))}catch(a){}return t.apply(this,[n,df(r,{mechanism:{data:{function:"addEventListener",handler:Zl(r),target:e},handled:!1,type:"instrument"}}),o])}}),Pd(n,"removeEventListener",function(e){return function(t,n,r){try{const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch(o){}return e.call(this,t,n,r)}}))}const tm=()=>({name:"BrowserSession",setupOnce(){void 0!==sf.document?(pp({ignoreDuration:!0}),hp(),Pf(({from:e,to:t})=>{void 0!==e&&e!==t&&(pp({ignoreDuration:!0}),hp())})):uf&&Yl.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),nm=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){!function(e){const t="error";rd(t,e),od(t,id)}(t=>{const{stackParser:n,attachStacktrace:r}=om();if(vu()!==e||lf())return;const{msg:o,url:a,line:s,column:i,error:c}=t,l=function(e,t,n,r){const o=e.exception=e.exception||{},a=o.values=o.values||[],s=a[0]=a[0]||{},i=s.stacktrace=s.stacktrace||{},c=i.frames=i.frames||[],l=r,d=n,u=bd(t)&&t.length>0?t:function(){try{return Sd.document.location.href}catch(e){return""}}();0===c.length&&c.push({colno:l,filename:u,function:Gl,in_app:!0,lineno:d});return e}(xf(n,c||o,void 0,r,!1),a,s,i);l.level="error",dp(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}(e),rm("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";rd(t,e),od(t,ld)}(t=>{const{stackParser:n,attachStacktrace:r}=om();if(vu()!==e||lf())return;const o=function(e){if(yd(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(t){}return e}(t),a=yd(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:xf(n,o,void 0,r,!0);a.level="error",dp(a,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(e),rm("onunhandledrejection"))}}};function rm(e){uf&&Yl.log(`Global Handler attached: ${e}`)}function om(){const e=vu();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const am=()=>({name:"HttpContext",preprocessEvent(e){if(!sf.navigator&&!sf.location&&!sf.document)return;const t=e.request&&e.request.url||sf.location&&sf.location.href,{referrer:n}=sf.document||{},{userAgent:r}=sf.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},a={...e.request,...t&&{url:t},headers:o};e.request=a}}),sm=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){const a=o.getOptions();qp(pf,a.stackParser,a.maxValueLength,n,t,e,r)}}};function im(e){const t=[zp(),Lp(),Xf(),Vf(),nm(),sm(),Vp(),am()];return!1!==e.autoSessionTracking&&t.push(tm()),t}function cm(e={}){const t=function(e={}){const t={defaultIntegrations:im(e),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:sf.SENTRY_RELEASE&&sf.SENTRY_RELEASE.id?sf.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==e.defaultIntegrations&&delete e.defaultIntegrations,{...t,...e}}(e);if(!t.skipBrowserExtensionCheck&&function(){const e=void 0!==sf.window&&sf;if(!e)return!1;const t=e[e.chrome?"chrome":"browser"],n=t&&t.runtime&&t.runtime.id,r=sf.location&&sf.location.href||"",o=!!n&&sf===sf.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some(e=>r.startsWith(`${e}//`)),a=void 0!==e.nw;return!!n&&!o&&!a}())return void Bl(()=>{});uf&&(ef()||Yl.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:(r=t.stackParser||Bf,Array.isArray(r)?Xl(...r):r),integrations:yp(t),transport:t.transport||$f};var r;return kp(jf,n)}function lm(e={}){if(!sf.document)return void(uf&&Yl.error("Global document not defined in showReportDialog call"));const t=hu(),n=t.getClient(),r=n&&n.getDsn();if(!r)return void(uf&&Yl.error("DSN not configured for showReportDialog call"));if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const t=gu().lastEventId();t&&(e.eventId=t)}const o=sf.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=function(e,t){const n=$u(e);if(!n)return"";const r=`${gp(n)}embed/error-page/`;let o=`dsn=${Ou(n)}`;for(const a in t)if("dsn"!==a&&"onClose"!==a)if("user"===a){const e=t.user;if(!e)continue;e.name&&(o+=`&name=${encodeURIComponent(e.name)}`),e.email&&(o+=`&email=${encodeURIComponent(e.email)}`)}else o+=`&${encodeURIComponent(a)}=${encodeURIComponent(t[a])}`;return`${r}?${o}`}(r,e),e.onLoad&&(o.onload=e.onLoad);const{onClose:a}=e;if(a){const e=t=>{if("__sentry_reportdialog_closed__"===t.data)try{a()}finally{sf.removeEventListener("message",e)}};sf.addEventListener("message",e)}const s=sf.document.head||sf.document.body;s?s.appendChild(o):uf&&Yl.error("Not injecting report dialog. No injection point found in HTML")}function dm(e){const t={...e};var n,r;return Pp(t,"react"),n="react",r={version:ge.version},gu().setContext(n,r),cm(t)}function um(e,{componentStack:t},n){if(function(e){const t=e.match(/^([^.]+)/);return null!==t&&parseInt(t[0])>=17}(ge.version)&&fd(e)&&t){const n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,function(e,t){const n=new WeakSet;!function e(t,r){if(!n.has(t))return t.cause?(n.add(t),e(t.cause,r)):void(t.cause=r)}(e,t)}(e,n)}return cp(e,{...n,captureContext:{contexts:{react:{componentStack:t}}}})}var pm={exports:{}},fm={},mm="function"==typeof Symbol&&Symbol.for,hm=mm?Symbol.for("react.element"):60103,gm=mm?Symbol.for("react.portal"):60106,bm=mm?Symbol.for("react.fragment"):60107,vm=mm?Symbol.for("react.strict_mode"):60108,ym=mm?Symbol.for("react.profiler"):60114,xm=mm?Symbol.for("react.provider"):60109,wm=mm?Symbol.for("react.context"):60110,_m=mm?Symbol.for("react.async_mode"):60111,jm=mm?Symbol.for("react.concurrent_mode"):60111,Nm=mm?Symbol.for("react.forward_ref"):60112,Sm=mm?Symbol.for("react.suspense"):60113,Em=mm?Symbol.for("react.suspense_list"):60120,km=mm?Symbol.for("react.memo"):60115,Cm=mm?Symbol.for("react.lazy"):60116,Tm=mm?Symbol.for("react.block"):60121,Mm=mm?Symbol.for("react.fundamental"):60117,Rm=mm?Symbol.for("react.responder"):60118,Pm=mm?Symbol.for("react.scope"):60119;function Dm(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case hm:switch(e=e.type){case _m:case jm:case bm:case ym:case vm:case Sm:return e;default:switch(e=e&&e.$$typeof){case wm:case Nm:case Cm:case km:case xm:return e;default:return t}}case gm:return t}}}function Im(e){return Dm(e)===jm}fm.AsyncMode=_m,fm.ConcurrentMode=jm,fm.ContextConsumer=wm,fm.ContextProvider=xm,fm.Element=hm,fm.ForwardRef=Nm,fm.Fragment=bm,fm.Lazy=Cm,fm.Memo=km,fm.Portal=gm,fm.Profiler=ym,fm.StrictMode=vm,fm.Suspense=Sm,fm.isAsyncMode=function(e){return Im(e)||Dm(e)===_m},fm.isConcurrentMode=Im,fm.isContextConsumer=function(e){return Dm(e)===wm},fm.isContextProvider=function(e){return Dm(e)===xm},fm.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===hm},fm.isForwardRef=function(e){return Dm(e)===Nm},fm.isFragment=function(e){return Dm(e)===bm},fm.isLazy=function(e){return Dm(e)===Cm},fm.isMemo=function(e){return Dm(e)===km},fm.isPortal=function(e){return Dm(e)===gm},fm.isProfiler=function(e){return Dm(e)===ym},fm.isStrictMode=function(e){return Dm(e)===vm},fm.isSuspense=function(e){return Dm(e)===Sm},fm.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===bm||e===jm||e===ym||e===vm||e===Sm||e===Em||"object"==typeof e&&null!==e&&(e.$$typeof===Cm||e.$$typeof===km||e.$$typeof===xm||e.$$typeof===wm||e.$$typeof===Nm||e.$$typeof===Mm||e.$$typeof===Rm||e.$$typeof===Pm||e.$$typeof===Tm)},fm.typeOf=Dm,pm.exports=fm;var Am=pm.exports,Om={};Om[Am.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Om[Am.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};const Lm="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,$m={componentStack:null,error:null,eventId:null};let zm=class e extends ge.Component{constructor(t){super(t),e.prototype.__init.call(this),this.state=$m,this._openFallbackReportDialog=!0;const n=vu();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",e=>{!e.type&&this._lastEventId&&e.event_id===this._lastEventId&&lm({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(e,t){const{componentStack:n}=t,r=null==n?void 0:n,{beforeCapture:o,onError:a,showDialog:s,dialogOptions:i}=this.props;bu(c=>{o&&o(c,e,r);const l=null!=this.props.handled?this.props.handled:!!this.props.fallback,d=um(e,t,{mechanism:{handled:l}});a&&a(e,r,d),s&&(this._lastEventId=d,this._openFallbackReportDialog&&lm({...i,eventId:d})),this.setState({error:e,componentStack:n,eventId:d})})}componentDidMount(){const{onMount:e}=this.props;e&&e()}componentWillUnmount(){const{error:e,componentStack:t,eventId:n}=this.state,{onUnmount:r}=this.props;r&&r(e,t,n),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}__init(){this.resetErrorBoundary=()=>{const{onReset:e}=this.props,{error:t,componentStack:n,eventId:r}=this.state;e&&e(t,n,r),this.setState($m)}}render(){const{fallback:e,children:t}=this.props,n=this.state;if(n.error){let t;return t="function"==typeof e?ge.createElement(e,{error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):e,ge.isValidElement(t)?t:(e&&Lm&&Yl.warn("fallback did not produce a valid ReactElement"),null)}return"function"==typeof t?t():t}};const Fm=/^\d{11}$/,qm=/^\d{14}$/;function Um(e){if(!e)return!1;const t=e.replace(/\D/g,"");return Fm.test(t)||qm.test(t)}const Hm=ge.createContext({isAuthenticated:!1,isLoading:!1,user:null,token:null,clientId:null,collaboratorId:null,affiliateId:null,isTemporaryPassword:!1,hasRole:()=>!1,hasAnyRole:()=>!1,logout:()=>{},refreshAuth:()=>{},loginWithCredentials:async()=>{},loginWithLead:async()=>({password:""})});function Wm({children:e}){const[t,n]=ge.useState(0),r=ge.useCallback(()=>n(e=>e+1),[]),o=ge.useMemo(()=>{if(_o()){const{token:e,clientId:t}=Uo(),n=e,o=n?Do(n):null,a=!!o,s=new Set(["Administrador","FinanceiroOperador","MarketplaceOperador","assistencia-operador","PessoasAtivos-Operador","Faturas-Operador","admin","gestor","admin-financeiro","supervisor-financeiro","supervisor-cobrancas","supervisor-comercial","operador","operador-central","operador-agendamento","operador-cobrancas","operador-financeiro","consultor-comercial","consultor-financeiro"]),i=o?.roles?.some(e=>s.has(e))?o.userId:null;return{isAuthenticated:a,isLoading:!1,user:o?{...o,coreUserId:o.coreUserId||null,id:o.userId,clientId:t}:null,token:n,clientId:t,collaboratorId:i,affiliateId:o?.affiliateId||null,isTemporaryPassword:!1,hasRole:e=>Ao(o,e),hasAnyRole:e=>Oo(o,e),logout:()=>{},refreshAuth:r,loginWithCredentials:async()=>{},loginWithLead:async(e,t,n)=>({password:"mock"})}}const e=Co("auth_token"),t=Co("client_id"),n=Co("collaborator_id"),o="true"===Co("is_temporary_password"),a=Co("affiliate_id"),s=Co("user_id"),i=!(!e||Io(e))&&e?Do(e):null,c=!!i,l=i?.coreUserId||s||null;return{isAuthenticated:c,isLoading:!1,user:i?{...i,coreUserId:l,id:i.userId,clientId:t}:null,token:c?e:null,clientId:t,collaboratorId:n,affiliateId:i?.affiliateId||a,isTemporaryPassword:o,hasRole:e=>Ao(i,e),hasAnyRole:e=>Oo(i,e),logout:()=>{!function(){for(const e of So)To(e)}(),window.location.href=wo.STORE_URL},refreshAuth:r,loginWithCredentials:async()=>{},loginWithLead:async(e,t,n)=>({password:""})}},[t,r]);return ge.useEffect(()=>{!function(e){if(null===e)return void up(null);const t={};e.id&&!Um(e.id)&&(t.id=String(e.id)),e.email&&!Um(e.email)&&e.email.includes("@")&&(t.email=e.email),e.username&&!Um(e.username)&&(t.username=e.username),0!==Object.keys(t).length&&up(t)}(o.user?{id:o.user.id,email:o.user.email??void 0,username:o.user.email??void 0}:null)},[o.user]),a.jsx(Hm.Provider,{value:o,children:e})}function Bm(){return ge.useContext(Hm)}const Ym=({userName:e="",showLogo:t=!0,onOpenGlobalMenu:n,showSidebarTrigger:r=!1,onToggleSidebar:o,isSidebarCollapsed:s=!1})=>{const{isAuthenticated:i,user:c,logout:l}=Bm(),d=function(){const[e,t]=ge.useState(0);return ge.useEffect(()=>{let e=!0;const n=async()=>{try{const n=document.cookie.match(/(?:^|;\s*)auth_token=([^;]+)/),r=n?decodeURIComponent(n[1]):localStorage.getItem("auth_token");if(!r)return;const o=await fetch("https://core.rnrastreamento.com/superapp/notifications/unread-counts",{headers:{Authorization:`Bearer ${r}`}});if(!o.ok)return;const a=await o.json(),s=Object.values(a??{}).reduce((e,t)=>e+(Number(t)||0),0);e&&t(s)}catch{}};n();const r=window.setInterval(n,6e4);return()=>{e=!1,window.clearInterval(r)}},[]),e}(),[u,p]=ge.useState(!1),f=c?.name||e||"Usuário",m=f.split(" ").filter(Boolean).map(e=>e[0]).join("").toUpperCase().slice(0,2)||"U";return a.jsxs("header",{className:"sticky top-0 z-50 w-full border-b border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 pt-[env(safe-area-inset-top,0px)]",children:[a.jsxs("div",{className:"flex items-center justify-between h-16 px-4",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[r&&o&&a.jsx(bo,{children:a.jsxs(vo,{children:[a.jsx(yo,{asChild:!0,children:a.jsx(ls,{variant:"ghost",size:"sm",onClick:o,className:"h-9 w-9 p-0","aria-label":s?"Expandir menu":"Minimizar menu",children:s?a.jsx(je,{className:"w-5 h-5"}):a.jsx(Ne,{className:"w-5 h-5"})})}),a.jsx(xo,{side:"bottom",children:a.jsx("p",{children:s?"Expandir menu":"Minimizar menu"})})]})}),i&&a.jsx(bo,{children:a.jsxs(vo,{children:[a.jsx(yo,{asChild:!0,children:a.jsx(ls,{variant:"ghost",size:"sm",onClick:n,className:"h-9 w-9 p-0","aria-label":"Aplicativos Comigo",children:a.jsx(Se,{className:"w-5 h-5"})})}),a.jsx(xo,{side:"bottom",children:a.jsx("p",{children:"Aplicativos Comigo"})})]})}),t&&a.jsx("div",{className:"flex items-center cursor-pointer ml-2",onClick:()=>window.location.href="https://home.semprecomigo.com.br",children:a.jsx("img",{src:gi,alt:"Comigo Logo",className:"h-8 w-auto",width:"96",height:"32",loading:"eager",decoding:"async",fetchPriority:"high",style:{aspectRatio:"3/1"}})})]}),a.jsx("div",{className:"flex items-center gap-3",children:i?a.jsxs(a.Fragment,{children:[a.jsxs("button",{onClick:()=>{window.location.href="https://home.semprecomigo.com.br/notificacoes"},"aria-label":d>0?`Notificações (${d} não lidas)`:"Notificações",className:"relative inline-flex h-10 w-10 items-center justify-center rounded-md hover:bg-muted/50 transition-colors",children:[a.jsx(Ee,{className:"h-5 w-5 text-primary",strokeWidth:2}),d>0&&a.jsx("span",{className:"absolute -right-0.5 -top-0.5 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-destructive px-1 text-[10px] font-semibold leading-none text-destructive-foreground ring-2 ring-background",children:d>99?"99+":d})]}),a.jsxs(Pl,{children:[a.jsx(Dl,{asChild:!0,children:a.jsx(Rs,{className:"w-8 h-8 cursor-pointer",children:a.jsx(Ps,{className:"bg-primary text-primary-foreground text-sm",children:m})})}),a.jsxs(Il,{align:"end",className:"w-48",children:[a.jsx(Ol,{className:"font-normal",children:a.jsx("p",{className:"text-sm font-medium",children:f})}),a.jsx(Ll,{}),a.jsx(Al,{onClick:()=>window.location.href="https://home.semprecomigo.com.br/configuracoes",children:"Configurações"}),a.jsx(Ll,{}),a.jsxs(Al,{onSelect:e=>{e.preventDefault(),p(!0)},className:"text-destructive focus:text-destructive",children:[a.jsx(ke,{className:"mr-2 h-4 w-4"}),"Sair"]})]})]})]}):a.jsxs(ls,{onClick:()=>{window.location.href=No(window.location.href)},size:"sm",variant:"outline",children:[a.jsx(Ce,{className:"w-4 h-4 mr-2"}),"Entrar"]})})]}),a.jsx(ai,{open:u,onOpenChange:p,children:a.jsxs(li,{children:[a.jsxs(di,{children:[a.jsx(pi,{children:"Sair da conta?"}),a.jsx(fi,{children:"Você precisará entrar novamente para acessar sua conta."})]}),a.jsxs(ui,{children:[a.jsx(hi,{children:"Cancelar"}),a.jsx(mi,{onClick:()=>{l()},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Sair"})]})]})})]})},Gm=ge.createContext(void 0),Vm=()=>{const e=ge.useContext(Gm);if(void 0===e)throw new Error("useCarrinho deve ser usado dentro de um CarrinhoProvider");return e},Km=({children:e})=>{const[t,n]=ge.useState([]),[r,o]=ge.useState(!1);return a.jsx(Gm.Provider,{value:{temItensNoCarrinho:r,setTemItensNoCarrinho:o,carrinhoIDs:t,adicionarAoCarrinho:e=>{n(t=>{if(t.includes(e))return t;const n=[...t,e];return o(!0),n})},removerDoCarrinho:e=>{n(t=>{const n=t.filter(t=>t!==e);return o(n.length>0),n})},limparCarrinho:()=>{n([]),o(!1)},itemEstaNoCarrinho:e=>t.includes(e)},children:e})},Xm=[{id:"home",label:"Início",icon:Te,url:"https://home.semprecomigo.com.br"},{id:"tracking",label:"Monitoramento",icon:Me,url:"https://monitoramento.semprecomigo.com.br"},{id:"store",label:"Loja",icon:Re,url:"https://semprecomigo.com.br/loja"},{id:"faturas",label:"Faturas",icon:Pe,url:"https://faturas.semprecomigo.com.br"},{id:"assistencia",label:"Assistência",icon:De,url:"https://assistencia.semprecomigo.com.br",disabled:!0}],Jm=()=>{const{temItensNoCarrinho:e}=Vm();return e?null:a.jsx("div",{className:"no-print fixed bottom-0 left-0 right-0 z-40 bg-background border-t border-border md:hidden pb-[env(safe-area-inset-bottom,0px)]",children:a.jsx("div",{className:"grid grid-cols-5 px-1 py-1",children:Xm.map(e=>{const t="store"===e.id,n=e.icon;return a.jsxs(ls,{variant:"ghost",size:"sm",disabled:e.disabled,onClick:()=>{t||e.disabled||(window.location.href=e.url)},className:"flex flex-col items-center justify-center h-16 relative transition-colors "+(t?"text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[a.jsx(n,{className:"w-5 h-5"}),a.jsx("span",{className:"text-[11px] font-medium text-center leading-tight",children:e.label})]},e.id)})})})},Qm=()=>"undefined"!=typeof window&&window.innerWidth<768,Zm=e=>(window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)),eh=()=>!1,th=()=>ge.useSyncExternalStore(Zm,Qm,eh),nh=["admin","administrador","administrador-superapp"],rh=[{id:"home",name:"Home",icon:Te,allowedRoles:[],externalUrl:"https://home.semprecomigo.com.br",showInMenu:!0},{id:"financeiro",name:"Financeiro",icon:Ie,allowedRoles:["admin","Administrador","FinanceiroOperador","FinanceiroSupervisor"],externalUrl:"https://financeiro.semprecomigo.com.br",showInMenu:!0},{id:"estoque",name:"Estoque",icon:Ae,allowedRoles:["admin"],externalUrl:"https://estoque.semprecomigo.com.br",requiredRolesToClick:"__disabled__",badge:"Em breve",showInMenu:!0},{id:"pessoas",name:"Pessoas & Ativo",icon:Oe,allowedRoles:["Administrador","PessoasAtivos-Supervisor","PessoasAtivos-Operador"],externalUrl:"https://pessoaseativos.semprecomigo.com.br",showInMenu:!0},{id:"rh",name:"RH/DP",icon:Le,allowedRoles:["Administrador","RHeDP-Operador","RHeDP-Supervisor"],externalUrl:"https://rhdp.semprecomigo.com.br",showInMenu:!0},{id:"parametrizacao",name:"Parametrização",icon:$e,allowedRoles:["admin"],requiredRolesToClick:"__disabled__",badge:"Em breve",showInMenu:!0},{id:"monitoramento",name:"Monitoramento",icon:Me,allowedRoles:["admin","Cliente","Administrador","MonitoramentoOperador","MonitoramentoSupervisor"],externalUrl:"https://monitoramento.semprecomigo.com.br",showInMenu:!0},{id:"loja",name:"Loja",icon:Re,allowedRoles:["admin","Cliente","Afiliado","FinanceiroSupervisor"],externalUrl:"https://semprecomigo.com.br/loja",showInMenu:!0},{id:"assistencia",name:"Assistência 24h",icon:De,allowedRoles:["admin","Administrador","assistencia-operador","assistencia-supervisor"],externalUrl:"https://assistencia.semprecomigo.com.br/",showInMenu:!0},{id:"clube",name:"Clube Benefícios",icon:ze,allowedRoles:["admin","Cliente","Afiliado"],requiredRolesToClick:"__disabled__",badge:"Em breve",showInMenu:!0},{id:"afiliados",name:"Clube Afiliados",icon:ze,allowedRoles:["admin","Administrador","Cliente","Afiliado","AfiliadoOperador-SuperApp","AfiliadoSupervisor-SuperApp"],externalUrl:"https://afiliados.semprecomigo.com.br/",requiredRolesToClick:["admin","Administrador","Afiliado","AfiliadoOperador-SuperApp","AfiliadoSupervisor-SuperApp"],badge:"Novo",showInMenu:!0},{id:"marketplace",name:"CRM",icon:Fe,allowedRoles:["admin","Administrador","CrmOperador","CrmSupervisor"],externalUrl:"https://crm.semprecomigo.com.br/",showInMenu:!0},{id:"faturas",name:"Faturas",icon:Pe,allowedRoles:["admin","Cliente","Administrador","Faturas-Operador","Faturas-Supervisor"],externalUrl:"https://faturas.semprecomigo.com.br",showInMenu:!0},{id:"suporte",name:"Suporte",icon:De,allowedRoles:["admin","Cliente","Afiliado","FinanceiroSupervisor"],requiredRolesToClick:"__disabled__",badge:"Em breve",showInMenu:!0},{id:"configuracoes",name:"Configurações",icon:qe,allowedRoles:[],externalUrl:"https://home.semprecomigo.com.br/configuracoes",showInMenu:!0}],oh=e=>e.map(e=>e.toLowerCase());function ah(e){const t=oh(e);return nh.some(e=>t.includes(e.toLowerCase()))}function sh(e,t){if("__disabled__"===e.requiredRolesToClick)return"blocked-soon";if(ah(t))return"clickable";if(Array.isArray(e.requiredRolesToClick)&&e.requiredRolesToClick.length>0){const n=oh(e.requiredRolesToClick);if(!oh(t).some(e=>n.includes(e)))return"blocked-no-role"}return"clickable"}const ih=({isOpen:e,onClose:t})=>{const n=tt(),r=th(),{user:o,isAuthenticated:s}=Bm(),i=o?.roles??[],c=ge.useMemo(()=>s?function(e){const t=oh(e),n=ah(e);return rh.filter(e=>!1!==e.showInMenu).filter(e=>{if(n)return!0;if(!e.allowedRoles||0===e.allowedRoles.length)return!0;const r=oh(e.allowedRoles);return t.some(e=>r.includes(e))})}(i,"menu"):[],[s,i]);ge.useEffect(()=>(document.body.style.overflow=e?"hidden":"unset",()=>{document.body.style.overflow="unset"}),[e]),ge.useEffect(()=>{const n=e=>{"Escape"===e.key&&t()};return e&&document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]);if(!e)return null;const l=(e,o)=>{const s=e.icon,c=sh(e,i),l="clickable"!==c;return a.jsxs("button",{onClick:()=>(e=>{"clickable"===sh(e,i)&&(e.externalUrl?window.location.href=e.externalUrl:"configuracoes"===e.id?(n("/configuracoes"),t()):(n(`/${e.id}`),t()))})(e),disabled:l,className:mr("group flex flex-col items-center justify-center rounded-2xl border relative transition-all duration-300",o,l?"bg-muted border-border text-muted-foreground cursor-not-allowed grayscale":"bg-card border-border hover:shadow-small hover:border-primary/20 hover:scale-105 active:scale-95"),children:[a.jsx(s,{className:mr("transition-transform",r?"w-8 h-8 mb-2":"w-10 h-10 mb-3",l?"text-muted-foreground":"text-primary group-hover:scale-110")}),a.jsx("span",{className:mr("font-medium text-center leading-tight px-1",r?"text-xs":"text-sm",l?"text-muted-foreground":"text-foreground group-hover:text-primary"),children:e.name}),"Em breve"===e.badge&&"blocked-soon"===c&&a.jsx("span",{className:"absolute top-2 right-2 text-[10px] font-medium px-2 py-0.5 rounded-full bg-primary/10 text-primary/70",children:"Em breve"}),"Novo"===e.badge&&!l&&a.jsx("span",{className:"absolute top-2 right-2 text-[10px] font-medium px-2 py-0.5 rounded-full bg-green-500 text-white",children:"Novo"})]},e.id)};return r?a.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4",children:[a.jsx("div",{className:"absolute inset-0 bg-black/60 fade-in",onClick:t}),a.jsxs("div",{className:"relative bg-background rounded-3xl shadow-2xl w-full max-w-sm slide-in-up border border-border max-h-[80vh] overflow-hidden",children:[a.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[a.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Aplicativos"}),a.jsx(ls,{variant:"ghost",size:"icon",onClick:t,className:"rounded-full hover:bg-muted",children:a.jsx(ve,{className:"w-5 h-5"})})]}),a.jsx("div",{className:"p-4 max-h-[calc(80vh-80px)] overflow-y-auto",children:a.jsx("div",{className:"grid grid-cols-2 gap-3",children:c.map(e=>l(e,"p-4 min-h-[100px]"))})})]})]}):a.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4",children:[a.jsx("div",{className:"absolute inset-0 bg-black/50 fade-in backdrop-blur-sm",onClick:t}),a.jsxs("div",{className:"relative bg-background rounded-3xl shadow-2xl w-full max-w-3xl slide-in-up border border-border",children:[a.jsxs("div",{className:"flex items-center justify-between p-8 border-b border-border",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:"Aplicativos Comigo"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Acesse todos os módulos do sistema"})]}),a.jsx(ls,{variant:"ghost",size:"icon",onClick:t,className:"rounded-full hover:bg-muted",children:a.jsx(ve,{className:"w-5 h-5"})})]}),a.jsx("div",{className:"p-8 max-h-[70vh] overflow-y-auto",children:a.jsx("div",{className:"grid grid-cols-4 gap-6",children:c.map(e=>l(e,"p-6 min-h-[120px]"))})})]})]})},ch=[{id:"catalogo",name:"Catálogo",path:"/",icon:Re},{id:"orcamentos",name:"Meus Orçamentos",path:"/meus-orcamentos",icon:Pe,requiresAuth:!0},{id:"ativos",name:"Meus Ativos",path:"/meus-ativos",icon:Ue,requiresAuth:!0}],lh=({collapsed:e,onNavigate:t})=>{const n=tt(),r=nt(),{isAuthenticated:o}=Bm(),s=ch.filter(e=>!e.requiresAuth||o);return a.jsx("div",{className:"flex flex-col h-full py-4 bg-background overflow-hidden",children:a.jsx("nav",{className:"flex-1 flex flex-col gap-1 "+(e?"px-1.5":"px-3"),children:s.map(o=>{const s=o.icon,i="/"===(c=o.path)?"/"===r.pathname:r.pathname===c||r.pathname.startsWith(c+"/");var c;return a.jsx(bo,{children:a.jsxs(vo,{delayDuration:0,children:[a.jsx(yo,{asChild:!0,children:a.jsxs("button",{onClick:()=>{n(o.path),t?.()},className:`\n                      flex items-center w-full min-h-[36px] ${e?"justify-center py-2.5 px-0":"py-2.5 px-3 gap-3 text-left"} rounded-lg transition-colors duration-150\n                      focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/30\n                      ${i?"bg-primary/10 text-primary shadow-sm":"hover:bg-muted/80 text-muted-foreground hover:text-foreground"}\n                    `,children:[a.jsx(s,{className:"w-[18px] h-[18px] flex-shrink-0 "+(i?"text-primary":"")}),!e&&a.jsx("span",{className:"text-[13px] whitespace-nowrap overflow-hidden "+(i?"font-semibold":"font-medium"),children:o.name})]})}),e&&a.jsx(xo,{side:"right",className:"ml-2",children:a.jsx("p",{className:"text-sm font-medium",children:o.name})})]})},o.id)})})})};class dh extends ge.Component{constructor(){super(...arguments),o(this,"state",{hasError:!1}),o(this,"handleReset",()=>{this.setState({hasError:!1,error:void 0}),window.location.reload()})}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){}render(){return this.state.hasError?this.props.fallback?this.props.fallback:a.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:a.jsxs(ds,{className:"w-full max-w-md",children:[a.jsxs(us,{className:"text-center",children:[a.jsx("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-destructive/10",children:a.jsx(He,{className:"h-6 w-6 text-destructive"})}),a.jsx(ps,{children:"Algo deu errado"})]}),a.jsxs(ms,{className:"text-center space-y-4",children:[a.jsx("p",{className:"text-muted-foreground",children:"Ocorreu um erro inesperado. Tente recarregar a página."}),this.state.error&&a.jsxs("details",{className:"text-xs text-muted-foreground",children:[a.jsx("summary",{className:"cursor-pointer",children:"Detalhes do erro"}),a.jsx("pre",{className:"mt-2 text-left bg-muted p-2 rounded text-xs overflow-auto",children:this.state.error.message})]}),a.jsxs("div",{className:"flex gap-2 justify-center",children:[a.jsx(ls,{onClick:this.handleReset,variant:"default",children:"Recarregar página"}),a.jsx(ls,{onClick:()=>window.location.href="/",variant:"outline",children:"Voltar ao início"})]})]})]})}):this.props.children}}const uh=()=>"undefined"!=typeof window&&window.innerWidth<768,ph=e=>{const t=window.matchMedia("(max-width: 767px)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},fh=()=>!1;function mh(){return ge.useSyncExternalStore(ph,uh,fh)}const hh=ge.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:mr("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));hh.displayName="Input";var gh="horizontal",bh=["horizontal","vertical"],vh=ge.forwardRef((e,t)=>{const{decorative:n,orientation:r=gh,...o}=e,s=function(e){return bh.includes(e)}(r)?r:gh,i=n?{role:"none"}:{"aria-orientation":"vertical"===s?s:void 0,role:"separator"};return a.jsx(b.div,{"data-orientation":s,...i,...o,ref:t})});vh.displayName="Separator";var yh=vh;const xh=ge.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>a.jsx(yh,{ref:o,decorative:n,orientation:t,className:mr("shrink-0 bg-border","horizontal"===t?"h-[1px] w-full":"h-full w-[1px]",e),...r}));xh.displayName=yh.displayName;const wh=F,_h=P,jh=$,Nh=z,Sh=ge.forwardRef(({className:e,...t},n)=>a.jsx(D,{className:mr("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,ref:n}));Sh.displayName=D.displayName;const Eh=wn("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),kh=ge.forwardRef(({side:e="right",className:t,children:n,...r},o)=>a.jsxs(Nh,{children:[a.jsx(Sh,{}),a.jsxs(A,{ref:o,className:mr(Eh({side:e}),t),...r,children:[n,a.jsxs($,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[a.jsx(ve,{className:"h-5 w-5"}),a.jsx("span",{className:"sr-only",children:"Fechar"})]})]})]}));kh.displayName=A.displayName;const Ch=({className:e,...t})=>a.jsx("div",{className:mr("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ch.displayName="SheetHeader";const Th=ge.forwardRef(({className:e,...t},n)=>a.jsx(O,{ref:n,className:mr("text-lg font-semibold text-foreground",e),...t}));Th.displayName=O.displayName;const Mh=ge.forwardRef(({className:e,...t},n)=>a.jsx(L,{ref:n,className:mr("text-sm text-muted-foreground",e),...t}));function Rh({className:e,...t}){return a.jsx("div",{className:mr("animate-pulse rounded-md bg-muted",e),...t})}Mh.displayName=L.displayName;const Ph=ge.createContext(null);function Dh(){const e=ge.useContext(Ph);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Ih=ge.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:s,...i},c)=>{const l=mh(),[d,u]=ge.useState(!1),[p,f]=ge.useState(e),m=t??p,h=ge.useCallback(e=>{const t="function"==typeof e?e(m):e;n?n(t):f(t),document.cookie=`sidebar:state=${t}; path=/; max-age=604800`},[n,m]),g=ge.useCallback(()=>l?u(e=>!e):h(e=>!e),[l,h,u]);ge.useEffect(()=>{const e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),g())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[g]);const b=m?"expanded":"collapsed",v=ge.useMemo(()=>({state:b,open:m,setOpen:h,isMobile:l,openMobile:d,setOpenMobile:u,toggleSidebar:g}),[b,m,h,l,d,u,g]);return a.jsx(Ph.Provider,{value:v,children:a.jsx(bo,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...o},className:mr("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:c,...i,children:s})})})});Ih.displayName="SidebarProvider";const Ah=ge.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...s},i)=>{const{isMobile:c,state:l,openMobile:d,setOpenMobile:u}=Dh();return"none"===n?a.jsx("div",{className:mr("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...s,children:o}):c?a.jsx(wh,{open:d,onOpenChange:u,...s,children:a.jsx(kh,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:e,children:a.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):a.jsxs("div",{ref:i,className:"group peer hidden md:block text-sidebar-foreground","data-state":l,"data-collapsible":"collapsed"===l?n:"","data-variant":t,"data-side":e,children:[a.jsx("div",{className:mr("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),a.jsx("div",{className:mr("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...s,children:a.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});Ah.displayName="Sidebar";ge.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o}=Dh();return a.jsxs(ls,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:mr("h-7 w-7",e),onClick:e=>{t?.(e),o()},...n,children:[a.jsx(je,{}),a.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}).displayName="SidebarTrigger";ge.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=Dh();return a.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:mr("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}).displayName="SidebarRail";ge.forwardRef(({className:e,...t},n)=>a.jsx("main",{ref:n,className:mr("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t})).displayName="SidebarInset";ge.forwardRef(({className:e,...t},n)=>a.jsx(hh,{ref:n,"data-sidebar":"input",className:mr("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})).displayName="SidebarInput";ge.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"header",className:mr("flex flex-col gap-2 p-2",e),...t})).displayName="SidebarHeader";ge.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"footer",className:mr("flex flex-col gap-2 p-2",e),...t})).displayName="SidebarFooter";ge.forwardRef(({className:e,...t},n)=>a.jsx(xh,{ref:n,"data-sidebar":"separator",className:mr("mx-2 w-auto bg-sidebar-border",e),...t})).displayName="SidebarSeparator";const Oh=ge.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"content",className:mr("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Oh.displayName="SidebarContent";ge.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group",className:mr("relative flex w-full min-w-0 flex-col p-2",e),...t})).displayName="SidebarGroup";ge.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?C:"div";return a.jsx(o,{ref:r,"data-sidebar":"group-label",className:mr("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})}).displayName="SidebarGroupLabel";ge.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?C:"button";return a.jsx(o,{ref:r,"data-sidebar":"group-action",className:mr("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})}).displayName="SidebarGroupAction";ge.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group-content",className:mr("w-full text-sm",e),...t})).displayName="SidebarGroupContent";ge.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu",className:mr("flex w-full min-w-0 flex-col gap-1",e),...t})).displayName="SidebarMenu";ge.forwardRef(({className:e,...t},n)=>a.jsx("li",{ref:n,"data-sidebar":"menu-item",className:mr("group/menu-item relative",e),...t})).displayName="SidebarMenuItem";const Lh=wn("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}});ge.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:s,...i},c)=>{const l=e?C:"button",{isMobile:d,state:u}=Dh(),p=a.jsx(l,{ref:c,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:mr(Lh({variant:n,size:r}),s),...i});return o?("string"==typeof o&&(o={children:o}),a.jsxs(vo,{children:[a.jsx(yo,{asChild:!0,children:p}),a.jsx(xo,{side:"right",align:"center",hidden:"collapsed"!==u||d,...o})]})):p}).displayName="SidebarMenuButton";ge.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const s=t?C:"button";return a.jsx(s,{ref:o,"data-sidebar":"menu-action",className:mr("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})}).displayName="SidebarMenuAction";ge.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:mr("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t})).displayName="SidebarMenuBadge";ge.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const o=ge.useMemo(()=>`${Math.floor(40*Math.random())+50}%`,[]);return a.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:mr("rounded-md h-8 flex gap-2 px-2 items-center",e),...n,children:[t&&a.jsx(Rh,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),a.jsx(Rh,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}).displayName="SidebarMenuSkeleton";ge.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:mr("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t})).displayName="SidebarMenuSub";ge.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e})).displayName="SidebarMenuSubItem";ge.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...o},s)=>{const i=e?C:"a";return a.jsx(i,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:mr("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground","sm"===t&&"text-xs","md"===t&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}).displayName="SidebarMenuSubButton";var $h="ScrollArea",[zh,Fh]=f($h),[qh,Uh]=zh($h),Hh=ge.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=e,[c,l]=ge.useState(null),[d,u]=ge.useState(null),[p,f]=ge.useState(null),[m,g]=ge.useState(null),[v,y]=ge.useState(null),[x,w]=ge.useState(0),[_,j]=ge.useState(0),[N,S]=ge.useState(!1),[E,k]=ge.useState(!1),C=h(t,e=>l(e)),T=U(o);return a.jsx(qh,{scope:n,type:r,dir:T,scrollHideDelay:s,scrollArea:c,viewport:d,onViewportChange:u,content:p,onContentChange:f,scrollbarX:m,onScrollbarXChange:g,scrollbarXEnabled:N,onScrollbarXEnabledChange:S,scrollbarY:v,onScrollbarYChange:y,scrollbarYEnabled:E,onScrollbarYEnabledChange:k,onCornerWidthChange:w,onCornerHeightChange:j,children:a.jsx(b.div,{dir:T,...i,ref:C,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});Hh.displayName=$h;var Wh="ScrollAreaViewport",Bh=ge.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,asChild:o,nonce:s,...i}=e,c=Uh(Wh,n),l=ge.useRef(null),d=h(t,l,c.onViewportChange);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"\n[data-radix-scroll-area-viewport] {\n  scrollbar-width: none;\n  -ms-overflow-style: none;\n  -webkit-overflow-scrolling: touch;\n}\n[data-radix-scroll-area-viewport]::-webkit-scrollbar {\n  display: none;\n}\n:where([data-radix-scroll-area-viewport]) {\n  display: flex;\n  flex-direction: column;\n  align-items: stretch;\n}\n:where([data-radix-scroll-area-content]) {\n  flex-grow: 1;\n}\n"},nonce:s}),a.jsx(b.div,{"data-radix-scroll-area-viewport":"",...i,asChild:o,ref:d,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style},children:vg({asChild:o,children:r},e=>a.jsx("div",{"data-radix-scroll-area-content":"",ref:c.onContentChange,style:{minWidth:c.scrollbarXEnabled?"fit-content":void 0},children:e}))})]})});Bh.displayName=Wh;var Yh="ScrollAreaScrollbar",Gh=ge.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Uh(Yh,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,c="horizontal"===e.orientation;return ge.useEffect(()=>(c?s(!0):i(!0),()=>{c?s(!1):i(!1)}),[c,s,i]),"hover"===o.type?a.jsx(Vh,{...r,ref:t,forceMount:n}):"scroll"===o.type?a.jsx(Kh,{...r,ref:t,forceMount:n}):"auto"===o.type?a.jsx(Xh,{...r,ref:t,forceMount:n}):"always"===o.type?a.jsx(Jh,{...r,ref:t}):null});Gh.displayName=Yh;var Vh=ge.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Uh(Yh,e.__scopeScrollArea),[s,i]=ge.useState(!1);return ge.useEffect(()=>{const e=o.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),i(!0)},r=()=>{t=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[o.scrollArea,o.scrollHideDelay]),a.jsx(y,{present:n||s,children:a.jsx(Xh,{"data-state":s?"visible":"hidden",...r,ref:t})})}),Kh=ge.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Uh(Yh,e.__scopeScrollArea),s="horizontal"===e.orientation,i=gg(()=>l("SCROLL_END"),100),[c,l]=(d="hidden",u={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},ge.useReducer((e,t)=>u[e][t]??e,d));var d,u;return ge.useEffect(()=>{if("idle"===c){const e=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[c,o.scrollHideDelay,l]),ge.useEffect(()=>{const e=o.viewport,t=s?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),i()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[o.viewport,s,l,i]),a.jsx(y,{present:n||"hidden"!==c,children:a.jsx(Jh,{"data-state":"hidden"===c?"hidden":"visible",...r,ref:t,onPointerEnter:v(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:v(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Xh=ge.forwardRef((e,t)=>{const n=Uh(Yh,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,i]=ge.useState(!1),c="horizontal"===e.orientation,l=gg(()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(c?e:t)}},10);return bg(n.viewport,l),bg(n.content,l),a.jsx(y,{present:r||s,children:a.jsx(Jh,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Jh=ge.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=Uh(Yh,e.__scopeScrollArea),s=ge.useRef(null),i=ge.useRef(0),[c,l]=ge.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=dg(c.viewport,c.content),u={...r,sizes:c,onSizesChange:l,hasThumb:Boolean(d>0&&d<1),onThumbChange:e=>s.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function p(e,t){return function(e,t,n,r="ltr"){const o=ug(n),a=o/2,s=t||a,i=o-s,c=n.scrollbar.paddingStart+s,l=n.scrollbar.size-n.scrollbar.paddingEnd-i,d=n.content-n.viewport,u="ltr"===r?[0,d]:[-1*d,0];return fg([c,l],u)(e)}(e,i.current,c,t)}return"horizontal"===n?a.jsx(Qh,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const e=pg(o.viewport.scrollLeft,c,o.dir);s.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollLeft=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollLeft=p(e,o.dir))}}):"vertical"===n?a.jsx(Zh,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const e=pg(o.viewport.scrollTop,c);s.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollTop=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollTop=p(e))}}):null}),Qh=ge.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=Uh(Yh,e.__scopeScrollArea),[i,c]=ge.useState(),l=ge.useRef(null),d=h(t,l,s.onScrollbarXChange);return ge.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),a.jsx(ng,{"data-orientation":"horizontal",...o,ref:d,sizes:n,style:{bottom:0,left:"rtl"===s.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===s.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ug(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(s.viewport){const r=s.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),mg(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:lg(i.paddingLeft),paddingEnd:lg(i.paddingRight)}})}})}),Zh=ge.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=Uh(Yh,e.__scopeScrollArea),[i,c]=ge.useState(),l=ge.useRef(null),d=h(t,l,s.onScrollbarYChange);return ge.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),a.jsx(ng,{"data-orientation":"vertical",...o,ref:d,sizes:n,style:{top:0,right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ug(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(s.viewport){const r=s.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),mg(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:lg(i.paddingTop),paddingEnd:lg(i.paddingBottom)}})}})}),[eg,tg]=zh(Yh),ng=ge.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:c,onThumbPositionChange:l,onDragScroll:d,onWheelScroll:u,onResize:p,...f}=e,m=Uh(Yh,n),[g,y]=ge.useState(null),x=h(t,e=>y(e)),w=ge.useRef(null),_=ge.useRef(""),j=m.viewport,N=r.content-r.viewport,S=T(u),E=T(l),k=gg(p,10);function C(e){if(w.current){const t=e.clientX-w.current.left,n=e.clientY-w.current.top;d({x:t,y:n})}}return ge.useEffect(()=>{const e=e=>{const t=e.target,n=g?.contains(t);n&&S(e,N)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[j,g,N,S]),ge.useEffect(E,[r,E]),bg(g,k),bg(m.content,k),a.jsx(eg,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:T(s),onThumbPointerUp:T(i),onThumbPositionChange:E,onThumbPointerDown:T(c),children:a.jsx(b.div,{...f,ref:x,style:{position:"absolute",...f.style},onPointerDown:v(e.onPointerDown,e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),w.current=g.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),C(e)}}),onPointerMove:v(e.onPointerMove,C),onPointerUp:v(e.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=_.current,m.viewport&&(m.viewport.style.scrollBehavior=""),w.current=null})})})}),rg="ScrollAreaThumb",og=ge.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=tg(rg,e.__scopeScrollArea);return a.jsx(y,{present:n||o.hasThumb,children:a.jsx(ag,{ref:t,...r})})}),ag=ge.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=Uh(rg,n),i=tg(rg,n),{onThumbPositionChange:c}=i,l=h(t,e=>i.onThumbChange(e)),d=ge.useRef(),u=gg(()=>{d.current&&(d.current(),d.current=void 0)},100);return ge.useEffect(()=>{const e=s.viewport;if(e){const t=()=>{if(u(),!d.current){const t=hg(e,c);d.current=t,c()}};return c(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[s.viewport,u,c]),a.jsx(b.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:v(e.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;i.onThumbPointerDown({x:n,y:r})}),onPointerUp:v(e.onPointerUp,i.onThumbPointerUp)})});og.displayName=rg;var sg="ScrollAreaCorner",ig=ge.forwardRef((e,t)=>{const n=Uh(sg,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?a.jsx(cg,{...e,ref:t}):null});ig.displayName=sg;var cg=ge.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Uh(sg,n),[s,i]=ge.useState(0),[c,l]=ge.useState(0),d=Boolean(s&&c);return bg(o.scrollbarX,()=>{const e=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(e),l(e)}),bg(o.scrollbarY,()=>{const e=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(e),i(e)}),d?a.jsx(b.div,{...r,ref:t,style:{width:s,height:c,position:"absolute",right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:0,...e.style}}):null});function lg(e){return e?parseInt(e,10):0}function dg(e,t){const n=e/t;return isNaN(n)?0:n}function ug(e){const t=dg(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function pg(e,t,n="ltr"){const r=ug(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,s=t.content-t.viewport,i=a-r,c=X(e,"ltr"===n?[0,s]:[-1*s,0]);return fg([0,s],[0,i])(c)}function fg(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function mg(e,t){return e>0&&e<t}var hg=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},s=n.left!==a.left,i=n.top!==a.top;(s||i)&&t(),n=a,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function gg(e,t){const n=T(e),r=ge.useRef(0);return ge.useEffect(()=>()=>window.clearTimeout(r.current),[]),ge.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function bg(e,t){const n=T(t);M(()=>{let t=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}function vg(e,t){const{asChild:n,children:r}=e;if(!n)return"function"==typeof t?t(r):t;const o=ge.Children.only(r);return ge.cloneElement(o,{children:"function"==typeof t?t(o.props.children):t})}var yg=Hh,xg=Bh,wg=ig;const _g=ge.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(yg,{ref:r,className:mr("relative overflow-hidden",e),...n,children:[a.jsx(xg,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(jg,{}),a.jsx(wg,{})]}));_g.displayName=yg.displayName;const jg=ge.forwardRef(({className:e,orientation:t="vertical",...n},r)=>a.jsx(Gh,{ref:r,orientation:t,className:mr("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:a.jsx(og,{className:"relative flex-1 rounded-full bg-border"})}));jg.displayName=Gh.displayName;const Ng=({children:e})=>{const{isAuthenticated:t,isLoading:n}=Bm();return ge.useEffect(()=>{n||t||(window.location.href=No(window.location.href))},[t,n]),t?a.jsx(a.Fragment,{children:e}):null},Sg=()=>a.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}),Eg=()=>{const e=tt();return a.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-4",children:a.jsx(ds,{className:"max-w-md w-full",children:a.jsxs(ms,{className:"pt-8 pb-6 flex flex-col items-center text-center gap-4",children:[a.jsx("div",{className:"h-14 w-14 rounded-full bg-muted flex items-center justify-center",children:a.jsx(We,{className:"h-7 w-7 text-muted-foreground"})}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("h2",{className:"text-xl font-semibold tracking-tight",children:"Sem acesso a esta proposta"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Esta proposta não está vinculada à sua conta. Verifique se você acessou com o usuário correto ou volte ao catálogo para iniciar uma nova contratação."})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full pt-2",children:[a.jsx(ls,{className:"flex-1",onClick:()=>e("/"),children:"Ir para o catálogo"}),a.jsx(ls,{variant:"outline",className:"flex-1",onClick:()=>e("/meus-orcamentos"),children:"Meus orçamentos"})]})]})})})},kg=({children:e})=>{const{proposalId:t}=rt(),{clientId:n,collaboratorId:r}=Bm(),{data:o,isLoading:s,error:i}=Vo({id:t||"",enabled:!!t});if(r)return a.jsx(a.Fragment,{children:e});if(!t)return a.jsx(Eg,{});if(s)return a.jsx(Sg,{});if(i||!o)return a.jsx(Eg,{});const c=o?.Cliente_Id??o?.Cliente?.Id??null;return!!n&&!!c&&String(c)===String(n)?a.jsx(a.Fragment,{children:e}):a.jsx(Eg,{})},Cg=he.lazy(()=>bs(()=>import("./LojaCatalogo-HDGXWTH8.js").then(e=>e.L),__vite__mapDeps([0,1]))),Tg=he.lazy(()=>bs(()=>import("./LojaAtivos-CS0sYv_E.js"),__vite__mapDeps([0,1]))),Mg=he.lazy(()=>bs(()=>import("./LojaOrcamentos-CKeuCRK6.js"),__vite__mapDeps([0,1]))),Rg=he.lazy(()=>bs(()=>import("./ContratacaoNovoAtivo-CZM6Z6_A.js"),__vite__mapDeps([0,1]))),Pg=he.lazy(()=>bs(()=>import("./ProdutoLanding-DpujA3XP.js").then(e=>e.P),__vite__mapDeps([0,1]))),Dg=he.lazy(()=>bs(()=>import("./CotacaoSeusDados-Kcd-AqEb.js"),__vite__mapDeps([0,1]))),Ig=he.lazy(()=>bs(()=>import("./CotacaoDadosAtivo-DhoSqeGB.js"),__vite__mapDeps([0,1]))),Ag=he.lazy(()=>bs(()=>import("./CotacaoEndereco-DlgF6Bug.js"),__vite__mapDeps([0,1]))),Og=he.lazy(()=>bs(()=>import("./CotacaoProposta-ZKSgblyb.js"),__vite__mapDeps([0,1]))),Lg=he.lazy(()=>bs(()=>import("./CotacaoSucesso-DM-pdyeL.js"),__vite__mapDeps([0,1]))),$g=he.lazy(()=>bs(()=>import("./CotacaoLayout-ClY3Osds.js"),__vite__mapDeps([0,1]))),zg=he.lazy(()=>bs(()=>import("./CotacaoExpressInicio-BDpm1r0a.js"),__vite__mapDeps([0,1]))),Fg=he.lazy(()=>bs(()=>import("./CotacaoExpressVeiculo-CTYFfS2b.js"),__vite__mapDeps([0,1]))),qg=he.lazy(()=>bs(()=>import("./CotacaoExpressSacola-DsH-AKQS.js"),__vite__mapDeps([0,1]))),Ug=he.lazy(()=>bs(()=>import("./CheckoutPagamento-B1lxHRFm.js"),__vite__mapDeps([0,1]))),Hg=he.lazy(()=>bs(()=>import("./CotacaoPreferenciaRegistrada-C_fTRl1h.js"),__vite__mapDeps([0,1]))),Wg=he.lazy(()=>bs(()=>import("./TestePage-CbBVib9c.js"),__vite__mapDeps([0,1]))),Bg=he.lazy(()=>bs(()=>import("./PrototipoCotacao-CT4s1xP5.js"),__vite__mapDeps([0,1]))),Yg=()=>a.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}),Gg=({legacyTo:e})=>a.jsxs(ot,{children:[a.jsx(at,{index:!0,element:a.jsx(Cg,{})}),a.jsx(at,{path:"meus-ativos",element:a.jsx(Ng,{children:a.jsx(Tg,{})})}),a.jsx(at,{path:"meus-orcamentos",element:a.jsx(Ng,{children:a.jsx(Mg,{})})}),a.jsx(at,{path:"contratacao/ativos",element:a.jsx(Rg,{})}),a.jsx(at,{path:"contratacao/ativos/:proposalId",element:a.jsx(Ng,{children:a.jsx(kg,{children:a.jsx(Rg,{})})})}),a.jsx(at,{path:"contratacao/pagamento/:proposalId",element:a.jsx(Ng,{children:a.jsx(kg,{children:a.jsx(Rg,{})})})}),a.jsx(at,{path:"contratacao/sucesso/:proposalId",element:a.jsx(Ng,{children:a.jsx(kg,{children:a.jsx(Lg,{})})})}),a.jsx(at,{path:"contratacao-novo-ativo/:proposalId",element:a.jsx(st,{to:e(),replace:!0})}),a.jsx(at,{path:"contratacao-novo-ativo/:proposalId/:ids",element:a.jsx(st,{to:e(),replace:!0})}),a.jsx(at,{path:":id",element:a.jsx(Pg,{})}),a.jsxs(at,{path:"cotacao/*",element:a.jsx($g,{}),children:[a.jsx(at,{index:!0,element:a.jsx(zg,{})}),a.jsx(at,{path:"veiculo/:proposalId",element:a.jsx(Fg,{})}),a.jsx(at,{path:"sacola/:proposalId",element:a.jsx(qg,{})}),a.jsx(at,{path:"seus-dados",element:a.jsx(Dg,{})}),a.jsx(at,{path:"seus-dados/plano/:planId",element:a.jsx(Dg,{})}),a.jsx(at,{path:"seus-dados/:proposalId",element:a.jsx(Dg,{})}),a.jsx(at,{path:"dados-ativo/:proposalId",element:a.jsx(Ig,{})}),a.jsx(at,{path:"endereco/:proposalId",element:a.jsx(Ag,{})}),a.jsx(at,{path:"proposta/:proposalId",element:a.jsx(Og,{})}),a.jsx(at,{path:"preferencia-registrada/:proposalId",element:a.jsx(Hg,{})}),a.jsx(at,{path:"checkout/:pedidoId",element:a.jsx(Ug,{})})]}),a.jsx(at,{path:"prototipo/cotacao",element:a.jsx(Bg,{})}),a.jsx(at,{path:"teste",element:a.jsx(Wg,{})})]}),Vg=e=>{const t=th(),n=nt(),[r,o]=ge.useState(!1),[s,i]=ge.useState(!1),{state:c,toggleSidebar:l}=Dh(),d="collapsed"===c,u=n.pathname.includes("/contratacao-novo-ativo")||n.pathname.includes("/contratacao/")||n.pathname.includes("/cotacao/")||n.pathname.endsWith("/cotacao")||n.pathname.includes("/prototipo/"),p=n.pathname.includes("/plano-rastreamento")||n.pathname.includes("/plano-vidros")||n.pathname.includes("/gestao-frotas")||n.pathname.includes("/seguros")||n.pathname.includes("-carro")||n.pathname.includes("-moto"),f=()=>`/loja/contratacao/ativos/${n.pathname.split("/").pop()?.split(":")[0]??""}`;return u||p?a.jsx(dh,{children:a.jsx("div",{className:"min-h-screen w-full flex-1 bg-background",children:a.jsx("main",{className:"flex-1",children:a.jsx(ge.Suspense,{fallback:a.jsx(Yg,{}),children:a.jsx(Gg,{legacyTo:f})})})})}):a.jsx(dh,{children:a.jsxs("div",{className:"min-h-[100dvh] flex flex-col w-full bg-background",children:[a.jsx(Ym,{showLogo:!0,onOpenGlobalMenu:()=>o(!0),showSidebarTrigger:!0,onToggleSidebar:()=>{t?i(e=>!e):l()},isSidebarCollapsed:t?!s:d}),a.jsx(ih,{isOpen:r,onClose:()=>o(!1)}),t&&a.jsx(wh,{open:s,onOpenChange:i,children:a.jsx(kh,{side:"left",className:"w-72 p-0",children:a.jsx("div",{className:"pt-4",children:a.jsx(lh,{collapsed:!1,onNavigate:()=>i(!1)})})})}),a.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[!t&&a.jsx(Ah,{className:"border-r bg-sidebar",style:{height:"calc(100dvh - 4rem)",top:"4rem"},collapsible:"icon",children:a.jsx(Oh,{children:a.jsx(lh,{collapsed:d})})}),a.jsx(_g,{className:"flex-1 h-[calc(100dvh-4rem)]",children:a.jsx("main",{className:"p-4 md:p-6",children:a.jsx(ge.Suspense,{fallback:a.jsx(Yg,{}),children:a.jsx(Gg,{legacyTo:f})})})})]}),t&&a.jsx(Jm,{})]})})},Kg=e=>a.jsx(Ih,{defaultOpen:!0,children:a.jsx(Vg,{...e})});function Xg(e,t,n=30){const r=window.location.hostname.includes("semprecomigo.com.br")?";domain=.semprecomigo.com.br":"";if(n>0){const o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),document.cookie=`${e}=${t};expires=${o.toUTCString()};path=/${r}`}else document.cookie=`${e}=${t};path=/${r}`}function Jg(e){const t=e+"=",n=document.cookie.split(";");for(let r=0;r<n.length;r++){let e=n[r];for(;" "===e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(t))return e.substring(t.length,e.length)}return null}function Qg(e){const t=window.location.hostname.includes("semprecomigo.com.br")?";domain=.semprecomigo.com.br":"";document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/${t}`}function Zg(e){Xg("comigo_afiliado_id",e,30)}function eb(){return Jg("comigo_afiliado_id")}function tb(e){Xg("comigo_codigo_afiliado",e,30)}function nb(){return Jg("comigo_codigo_afiliado")}const rb="comigo_pending_compra_ids";function ob(e){try{Xg(rb,encodeURIComponent(JSON.stringify(e)),1)}catch{}}function ab(){const e=Jg(rb);if(!e)return[];try{const t=JSON.parse(decodeURIComponent(e));return Array.isArray(t)?t.filter(e=>"number"==typeof e):[]}catch{return[]}}function sb(){Qg(rb)}var ib="Switch",[cb,lb]=f(ib),[db,ub]=cb(ib),pb=ge.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:c,value:l="on",onCheckedChange:d,form:u,...p}=e,[f,m]=ge.useState(null),g=h(t,e=>m(e)),y=ge.useRef(!1),x=!f||(u||!!f.closest("form")),[w=!1,_]=E({prop:o,defaultProp:s,onChange:d});return a.jsxs(db,{scope:n,checked:w,disabled:c,children:[a.jsx(b.button,{type:"button",role:"switch","aria-checked":w,"aria-required":i,"data-state":gb(w),"data-disabled":c?"":void 0,disabled:c,value:l,...p,ref:g,onClick:v(e.onClick,e=>{_(e=>!e),x&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),x&&a.jsx(hb,{control:f,bubbles:!y.current,name:r,value:l,checked:w,required:i,disabled:c,form:u,style:{transform:"translateX(-100%)"}})]})});pb.displayName=ib;var fb="SwitchThumb",mb=ge.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=ub(fb,n);return a.jsx(b.span,{"data-state":gb(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});mb.displayName=fb;var hb=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,s=ge.useRef(null),i=J(n),c=Q(t);return ge.useEffect(()=>{const e=s.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}},[i,n,r]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function gb(e){return e?"checked":"unchecked"}var bb=pb,vb=mb;const yb=ge.forwardRef(({className:e,...t},n)=>a.jsx(bb,{className:mr("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:a.jsx(vb,{className:mr("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));yb.displayName=bb.displayName;var xb=ge.forwardRef((e,t)=>a.jsx(b.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));xb.displayName="Label";var wb=xb;const _b=wn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),jb=ge.forwardRef(({className:e,...t},n)=>a.jsx(wb,{ref:n,className:mr(_b(),e),...t}));jb.displayName=wb.displayName;const Nb=ue,Sb=pe,Eb=ge.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(Z,{ref:r,className:mr("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,a.jsx(ee,{asChild:!0,children:a.jsx(Be,{className:"h-4 w-4 opacity-50"})})]}));Eb.displayName=Z.displayName;const kb=ge.forwardRef(({className:e,...t},n)=>a.jsx(te,{ref:n,className:mr("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Ye,{className:"h-4 w-4"})}));kb.displayName=te.displayName;const Cb=ge.forwardRef(({className:e,...t},n)=>a.jsx(ne,{ref:n,className:mr("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Be,{className:"h-4 w-4"})}));Cb.displayName=ne.displayName;const Tb=ge.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>a.jsx(re,{children:a.jsxs(oe,{ref:o,className:mr("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[a.jsx(kb,{}),a.jsx(ae,{className:mr("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(Cb,{})]})}));Tb.displayName=oe.displayName;ge.forwardRef(({className:e,...t},n)=>a.jsx(se,{ref:n,className:mr("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t})).displayName=se.displayName;const Mb=ge.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(ie,{ref:r,className:mr("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(ce,{children:a.jsx(we,{className:"h-4 w-4"})})}),a.jsx(le,{children:t})]}));Mb.displayName=ie.displayName;ge.forwardRef(({className:e,...t},n)=>a.jsx(de,{ref:n,className:mr("-mx-1 my-1 h-px bg-muted",e),...t})).displayName=de.displayName;const Rb=()=>{const e=_o(),{isAuthenticated:t,user:n,clientId:r,refreshAuth:o}=Bm(),[s,i]=ge.useState(!1),[c,l]=ge.useState(()=>Fo()),[d,u]=ge.useState(()=>eb()||""),[p,f]=ge.useState(()=>nb()||"");if(ge.useEffect(()=>{e&&qo(c)},[c,e]),!e)return null;return a.jsx("div",{className:"fixed bottom-3 right-3 z-[9999] max-w-[360px]",children:a.jsxs(ds,{className:"shadow-lg border-amber-400/60 bg-background/95 backdrop-blur",children:[a.jsxs("button",{type:"button",onClick:()=>i(e=>!e),className:"w-full flex items-center justify-between gap-2 px-3 py-2 text-xs font-medium",children:[a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(Ge,{className:"h-3.5 w-3.5 text-amber-500"}),"Dev Auth",a.jsx("span",{className:"inline-block h-2 w-2 rounded-full "+(t?"bg-emerald-500":"bg-zinc-400")}),a.jsx("span",{className:"text-muted-foreground font-normal",children:t?n?.name||"logado":"deslogado"})]}),s?a.jsx(Be,{className:"h-3.5 w-3.5"}):a.jsx(Ye,{className:"h-3.5 w-3.5"})]}),s&&a.jsxs("div",{className:"border-t p-3 space-y-3 text-xs",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx(jb,{htmlFor:"dev-logged-out",className:"text-xs",children:"Simular deslogado"}),a.jsx(yb,{id:"dev-logged-out",checked:c.simulateLoggedOut,onCheckedChange:e=>l(t=>({...t,simulateLoggedOut:e}))})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(jb,{className:"text-xs",children:"Preset"}),a.jsxs(Nb,{value:c.presetId,onValueChange:e=>l(t=>({...t,presetId:e})),disabled:c.simulateLoggedOut,children:[a.jsx(Eb,{className:"h-8 text-xs",children:a.jsx(Sb,{})}),a.jsx(Tb,{children:Lo.map(e=>a.jsx(Mb,{value:e.id,className:"text-xs",children:e.label},e.id))})]})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(jb,{className:"text-xs text-muted-foreground",children:"Override Client.Id (opcional)"}),a.jsx(hh,{value:c.customClientId||"",onChange:e=>l(t=>({...t,customClientId:e.target.value||void 0})),placeholder:"uuid do Client",className:"h-8 text-xs font-mono",disabled:c.simulateLoggedOut})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(jb,{className:"text-xs text-muted-foreground",children:"Override JWT (opcional)"}),a.jsx(hh,{value:c.customToken||"",onChange:e=>l(t=>({...t,customToken:e.target.value||void 0})),placeholder:"cole um access_token",className:"h-8 text-xs font-mono",disabled:c.simulateLoggedOut})]}),a.jsxs(ls,{size:"sm",className:"w-full h-8 text-xs",onClick:()=>{qo(c),o(),hn({title:"Sessão dev recarregada"})},children:[a.jsx(Ve,{className:"h-3 w-3 mr-1"}),"Aplicar e recarregar sessão"]}),a.jsxs("div",{className:"border-t pt-2 space-y-2",children:[a.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Cookies de afiliado"}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(jb,{className:"text-xs",children:"afiliadoId"}),a.jsx(hh,{value:d,onChange:e=>u(e.target.value),className:"h-8 text-xs font-mono",placeholder:"vazio = não setado"})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(jb,{className:"text-xs",children:"codigo_afiliado"}),a.jsx(hh,{value:p,onChange:e=>f(e.target.value),className:"h-8 text-xs font-mono",placeholder:"vazio = não setado"})]}),a.jsx(ls,{size:"sm",variant:"outline",className:"w-full h-8 text-xs",onClick:()=>{d?Zg(d):Qg("comigo_afiliado_id"),p?tb(p):Qg("comigo_codigo_afiliado"),hn({title:"Cookies de afiliado atualizados"})},children:"Salvar cookies de afiliado"})]}),a.jsxs("div",{className:"border-t pt-2 text-[10px] text-muted-foreground space-y-0.5",children:[a.jsxs("div",{children:[a.jsx("span",{className:"font-medium",children:"clientId:"})," ",a.jsx("span",{className:"font-mono",children:r||"—"})]}),a.jsxs("div",{children:[a.jsx("span",{className:"font-medium",children:"user:"})," ",a.jsx("span",{className:"font-mono",children:n?.email||"—"})]})]})]})]})})},Pb=`${Yo}/superapp/me/onboarding`;const Db="feature-intro.flags";function Ib(e){try{localStorage.setItem(Db,JSON.stringify(e))}catch{}}const Ab=ge.createContext(null),Ob=()=>{const e=ge.useContext(Ab);if(!e)throw new Error("useOnboardingFlags requer OnboardingFlagsProvider");return e},Lb=({children:e})=>{const{isAuthenticated:t}=Bm(),n=function(){try{const e=localStorage.getItem(Db);return e?JSON.parse(e):null}catch{return null}}(),[r,o]=ge.useState(n??{}),[s,i]=ge.useState(!0);ge.useEffect(()=>{if(!t)return;let e=!1;return async function(){const e=await fetch(Pb,{headers:{Authorization:`Bearer ${Bo()}`}});if(!e.ok)throw new Error(`onboarding GET ${e.status}`);return await e.json()}().then(t=>{e||(o(t),Ib(t),i(!0))}).catch(()=>{e||i(!0)}),()=>{e=!0}},[t]);const c=ge.useCallback(e=>Boolean(r[e]),[r]),l=ge.useCallback((e,t=!0)=>{o(n=>{const r={...n};return t?r[e]=!0:delete r[e],Ib(r),r}),async function(e,t){const n=await fetch(Pb,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Bo()}`},body:JSON.stringify({key:e,seen:t})});if(!n.ok)throw new Error(`onboarding PATCH ${n.status}`)}(e,t).catch(()=>{})},[]);return a.jsx(Ab.Provider,{value:{ready:s,isSeen:c,markSeen:l},children:e})},$b=["Loja","Contratação","Minha conta"],zb=[{key:"loja.catalogo.v1",label:"Catálogo",route:"/",group:"Loja"},{key:"loja.contratacao.v1",label:"Contratação de ativo",route:"/contratacao/ativos",group:"Contratação"},{key:"loja.cotacao.v1",label:"Cotação rápida",route:"/cotacao",group:"Contratação"},{key:"loja.meus-ativos.v1",label:"Meus ativos",route:"/meus-ativos",group:"Minha conta"},{key:"loja.meus-orcamentos.v1",label:"Meus orçamentos",route:"/meus-orcamentos",group:"Minha conta"}];function Fb({seen:e}){return e?a.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:[a.jsx(we,{className:"h-3 w-3"})," Visto"]}):a.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-semibold text-primary",children:[a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary"})," Não visto"]})}const qb=new Set(["plano-rastreamento","plano-rastreamento-carro","plano-rastreamento-moto","plano-vidros","gestao-frotas","gestao-frotas-v2","plano-rastreamento-v2","plano-rastreamento-carro-v2","plano-rastreamento-moto-v2"]);function Ub(){const[e,t]=ge.useState(!1),n=tt(),r=nt(),o=th(),{isSeen:s,markSeen:i}=Ob(),c=ge.useMemo(()=>$b.map(e=>({group:e,items:zb.filter(t=>t.group===e)})).filter(e=>e.items.length>0),[]),l=zb.filter(e=>s(e.key)).length,d=r.pathname.split("/").filter(Boolean)[0];return d&&qb.has(d)?null:a.jsxs(wh,{open:e,onOpenChange:t,children:[a.jsx(_h,{asChild:!0,children:a.jsxs("button",{className:"fixed bottom-[calc(5rem_+_env(safe-area-inset-bottom,0px))] left-4 z-40 flex h-11 items-center gap-1.5 rounded-full border bg-background px-3.5 text-sm font-medium text-foreground shadow-lg transition-transform hover:-translate-y-px sm:bottom-4",title:"Rever as introduções do app",children:[a.jsx(Ke,{className:"h-4 w-4 text-primary"})," ",a.jsx("span",{className:"hidden sm:inline",children:"Introduções"})]})}),a.jsxs(kh,{side:o?"bottom":"right",className:mr("flex flex-col gap-0 p-0",o?"h-[88vh] rounded-t-2xl":"w-full sm:max-w-[420px]"),children:[a.jsxs("div",{className:"shrink-0 border-b px-5 pb-4 pt-5",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Ke,{className:"h-5 w-5 text-primary"}),a.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Introduções"}),a.jsxs(jh,{className:"ml-auto rounded-full p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:[a.jsx(ve,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Fechar"})]})]}),a.jsx("p",{className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:"Reveja as apresentações guiadas da loja sempre que quiser."}),a.jsxs("p",{className:"mt-2 text-xs font-medium text-muted-foreground",children:[l," de ",zb.length," telas já vistas"]})]}),a.jsx("div",{className:"flex-1 overflow-y-auto px-3 py-3",children:c.map(({group:e,items:r})=>a.jsxs("div",{className:"mb-1",children:[a.jsx("div",{className:"px-2 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:e}),a.jsx("ul",{className:"flex flex-col",children:r.map(e=>{const r=s(e.key);return a.jsx("li",{children:a.jsxs("button",{onClick:()=>((e,r)=>{try{sessionStorage.setItem("intro:open",e)}catch{}i(e,!1),n(r),t(!1)})(e.key,e.route),className:"group flex w-full items-center gap-3 rounded-xl px-2 py-2.5 text-left transition-colors hover:bg-muted",children:[a.jsxs("span",{className:"min-w-0 flex-1",children:[a.jsxs("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[a.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:e.label}),a.jsx(Fb,{seen:r})]}),a.jsxs("span",{className:"mt-0.5 flex items-center gap-1 text-xs text-muted-foreground",children:[a.jsx(Xe,{className:"h-3 w-3 shrink-0"}),a.jsx("span",{className:"truncate",children:e.route})]})]}),a.jsxs("span",{className:"inline-flex shrink-0 items-center gap-0.5 text-xs font-medium text-primary opacity-80 transition-opacity group-hover:opacity-100",children:[r?"Rever":"Ver",a.jsx(xe,{className:"h-4 w-4"})]})]})},e.key)})})]},e))})]})]})}function Hb(){const[e]=ct();return ge.useEffect(()=>{const t=e.get("afiliadoId"),n=e.get("codigo_afiliado");t&&Zg(t),n&&tb(n)},[e]),null}const Wb=new Ze({defaultOptions:{queries:{staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retry:1}}}),Bb=()=>a.jsx(et,{client:Wb,children:a.jsx(ss,{children:a.jsxs(bo,{children:[a.jsx(_r,{}),a.jsx(Wr,{}),a.jsx(Rb,{}),a.jsx(it,{basename:"/loja",children:a.jsxs(Lb,{children:[a.jsx(Hb,{}),a.jsx(Ub,{}),a.jsxs(ot,{children:[a.jsx(at,{path:"/*",element:a.jsx(Kg,{onOpenGlobalMenu:()=>{}})}),a.jsx(at,{path:"*",element:a.jsx(hs,{})})]})]})})]})})}),Yb=ge.createContext(void 0),Gb=[{id:"bloqueador-premium",nome:"Bloqueador remoto de ignição",preco:20,selecionado:!1,descricao:"Sistema avançado de bloqueio que impede a ignição do veículo remotamente via app ou central de monitoramento."},{id:"seguro-equipamento",nome:"Seguro do Equipamento",preco:25,selecionado:!1,descricao:"Cobertura completa para danos ou furto do equipamento de rastreamento instalado no veículo."},{id:"app-premium",nome:"App Premium com recursos avançados",preco:15,selecionado:!1,descricao:"Acesso a recursos exclusivos como relatórios detalhados, histórico avançado e notificações personalizadas."}],Vb=({children:e})=>{const[t,n]=ge.useState({itensAdicionais:Gb,formaPagamento:"mensal",valorTotal:0}),r={cotacao:t,atualizarDadosPessoais:e=>{n(t=>({...t,dadosPessoais:e}))},atualizarDadosAtivo:e=>{n(t=>({...t,dadosAtivo:e}))},atualizarDadosEndereco:e=>{n(t=>({...t,dadosEndereco:e}))},atualizarDadosSegurado:e=>{n(t=>({...t,dadosSegurado:{optInSeguro:!1,...t.dadosSegurado,...e}}))},atualizarPerfilSeguro:e=>{n(t=>({...t,perfilSeguro:{...t.perfilSeguro,...e}}))},selecionarProduto:(e,t,r,o,a,s)=>{n(n=>({...n,produtoId:e,produtoNome:t,produtoTipo:r,produtoPreco:o,valorAdesao:a,origemCotacao:s}))},toggleItemAdicional:e=>{n(t=>({...t,itensAdicionais:t.itensAdicionais.map(t=>t.id===e?{...t,selecionado:!t.selecionado}:t)}))},setFormaPagamento:e=>{n(t=>({...t,formaPagamento:e}))},setOrigemCotacao:e=>{n(t=>({...t,origemCotacao:e}))},calcularTotal:()=>{const e=(t.produtoPreco||0)+t.itensAdicionais.filter(e=>e.selecionado).reduce((e,t)=>e+t.preco,0);return"anual"===t.formaPagamento?12*e:e},resetCotacao:()=>{n({itensAdicionais:Gb,formaPagamento:"mensal",valorTotal:0})}};return a.jsx(Yb.Provider,{value:r,children:e})},Kb=()=>{const e=ge.useContext(Yb);if(!e)throw new Error("useCotacao deve ser usado dentro de um CotacaoProvider");return e},Xb=ge.createContext(void 0),Jb=({children:e})=>{const[t,n]=ge.useState(null);return a.jsx(Xb.Provider,{value:{quote:t,setQuote:n,resetQuote:()=>n(null)},children:e})},Qb=()=>{const e=ge.useContext(Xb);if(!e)throw new Error("useQuote deve ser usado dentro de um QuoteProvider");return e},Zb=["password","senha","token","authorization","cookie","secret","cpf","cnpj","cartao","card","cvv","cvc","numerocartao","creditcard","card_number","pan"];function ev(e){if(Array.isArray(e))return e.map(ev);if(e&&"object"==typeof e){const t={};for(const[n,r]of Object.entries(e))t[n]=Zb.some(e=>n.toLowerCase().includes(e))?"[Filtered]":ev(r);return t}return e}const tv=/^(localhost|127\.\d+\.\d+\.\d+|0\.0\.0\.0|::1|10\.\d+\.\d+\.\d+|192\.168\.\d+\.\d+|172\.(1[6-9]|2\d|3[01])\.\d+\.\d+)$/;"undefined"!=typeof window&&tv.test(window.location.hostname)||dm({dsn:"https://511e916c396c45a8908794a3979b2eb0@erros.rnrastreamento.com/2",environment:"production",release:void 0,tracesSampleRate:0,sendDefaultPii:!1,ignoreErrors:["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"],beforeSend:e=>(e.request?.data&&(e.request.data=ev(e.request.data)),e.extra&&(e.extra=ev(e.extra)),e)}),window.addEventListener("vite:preloadError",e=>{e.preventDefault();const t="vite-preload-error-reload-at",n=Number(sessionStorage.getItem(t)||0);Date.now()-n>1e4&&(sessionStorage.setItem(t,String(Date.now())),window.location.reload())});const nv=()=>{const e=document.getElementById("initial-loading");e&&e.remove()},rv=setTimeout(nv,3e3);if("serviceWorker"in navigator){const e=()=>{navigator.serviceWorker.register("/loja/sw.js",{scope:"/loja/"}).catch(()=>{})};"requestIdleCallback"in window?window.requestIdleCallback(e,{timeout:5e3}):setTimeout(e,2e3)}n(document.getElementById("root")).render(a.jsx(zm,{fallback:a.jsxs("div",{style:{padding:24,textAlign:"center",fontFamily:"sans-serif"},children:[a.jsx("h2",{children:"Ops, algo deu errado nesta tela."}),a.jsx("p",{children:"Já fomos avisados e estamos verificando. Tente recarregar a página."})]}),children:a.jsx(Zt,{children:a.jsx(Wm,{children:a.jsx(Jb,{children:a.jsx(Vb,{children:a.jsx(Km,{children:a.jsx(Bb,{})})})})})})})),clearTimeout(rv),requestAnimationFrame(nv);export{No as $,ai as A,ls as B,ds as C,Pl as D,gn as E,Ko as F,us as G,ps as H,hh as I,Or as J,Vm as K,jb as L,Qb as M,ab as N,jo as O,gi as P,Kb as Q,is as R,Nb as S,mh as T,bo as U,Yo as V,vo as W,yo as X,xo as Y,fs as Z,bs as _,ms as a,ss as a0,Bo as a1,hn as a2,eb as a3,nb as a4,Ha as a5,Va as a6,wh as a7,kh as a8,Ch as a9,cs as aA,es as aB,Si as aC,Ii as aD,Ai as aE,os as aF,_g as aG,sb as aH,ob as aI,Ob as aJ,sn as aK,cp as aL,lp as aM,ko as aN,wo as aO,wn as aP,Rs as aQ,Ps as aR,Th as aa,Do as ab,Jg as ac,Xg as ad,Qg as ae,Qa as af,ts as ag,Za as ah,mr as ai,_h as aj,Mh as ak,yb as al,Xo as am,Jo as an,oa as ao,ta as ap,aa as aq,Qo as ar,ea as as,sa as at,ga as au,ca as av,na as aw,ba as ax,ya as ay,ia as az,Dl as b,Il as c,si as d,Al as e,li as f,di as g,pi as h,fi as i,ui as j,hi as k,mi as l,Eb as m,Sb as n,Tb as o,Mb as p,Vo as q,Rh as r,xh as s,rs as t,th as u,Ja as v,ns as w,Bm as x,Go as y,Wo as z};