vendor: 8,510 bytes, line 1
1import{r as a,j as p,v as ke,w as Fe,x as Nt,o as I,y as xt,_ as O,z as je,A as Pt,p as H,u as Dt,s as me}from"./index-B7IqohZr.js";import{c as Ot}from"./createLucideIcon-hpoMUvwA.js";import{u as Tt}from"./auth-middleware-21lU5F1R.js";const At=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_t=Ot("x",At);function T(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function It(e,t){const n=a.createContext(t),r=i=>{const{children:c,...s}=i,d=a.useMemo(()=>s,Object.values(s));return p.jsx(n.Provider,{value:d,children:c})};r.displayName=e+"Provider";function o(i){const c=a.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Lt(e,t=[]){let n=[];function r(i,c){const s=a.createContext(c),d=n.length;n=[...n,c];const u=v=>{const{scope:m,children:g,...C}=v,l=m?.[e]?.[d]||s,h=a.useMemo(()=>C,Object.values(C));return p.jsx(l.Provider,{value:h,children:g})};u.displayName=i+"Provider";function f(v,m){const g=m?.[e]?.[d]||s,C=a.useContext(g);if(C)return C;if(c!==void 0)return c;throw new Error(`\`${v}\` must be used within \`${i}\``)}return[u,f]}const o=()=>{const i=n.map(c=>a.createContext(c));return function(s){const d=s?.[e]||i;return a.useMemo(()=>({[`__scope${e}`]:{...s,[e]:d}}),[s,d])}};return o.scopeName=e,[r,Mt(o,...t)]}function Mt(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const c=r.reduce((s,{useScope:d,scopeName:u})=>{const v=d(i)[`__scope${u}`];return{...s,...v}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var $=globalThis?.document?a.useLayoutEffect:()=>{},kt=ke[" useId ".trim().toString()]||(()=>{}),Ft=0;function ie(e){const[t,n]=a.useState(kt());return $(()=>{n(r=>r??String(Ft++))},[e]),e||(t?`radix-${t}`:"")}var jt=ke[" useInsertionEffect ".trim().toString()]||$;function Wt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,c]=Bt({defaultProp:t,onChange:n}),s=e!==void 0,d=s?e:o;{const f=a.useRef(e!==void 0);a.useEffect(()=>{const v=f.current;v!==s&&console.warn(`${r} is changing from ${v?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,r])}const u=a.useCallback(f=>{if(s){const v=Ut(f)?f(e):f;v!==e&&c.current?.(v)}else i(f)},[s,e,i,c]);return[d,u]}function Bt({defaultProp:e,onChange:t}){const[n,r]=a.useState(e),o=a.useRef(n),i=a.useRef(t);return jt(()=>{i.current=t},[t]),a.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function Ut(e){return typeof e=="function"}function $t(e){const t=Vt(e),n=a.forwardRef((r,o)=>{const{children:i,...c}=r,s=a.Children.toArray(i),d=s.find(Kt);if(d){const u=d.props.children,f=s.map(v=>v===d?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:v);return p.jsx(t,{...c,ref:o,children:a.isValidElement(u)?a.cloneElement(u,void 0,f):null})}return p.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Vt(e){const t=a.forwardRef((n,r)=>{const{children:o,...i}=n;if(a.isValidElement(o)){const c=Xt(o),s=Gt(i,o.props);return o.type!==a.Fragment&&(s.ref=r?Fe(r,c):c),a.cloneElement(o,s)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ht=Symbol("radix.slottable");function Kt(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ht}function Gt(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const d=i(...s);return o(...s),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Xt(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],P=zt.reduce((e,t)=>{const n=$t(`Primitive.${t}`),r=a.forwardRef((o,i)=>{const{asChild:c,...s}=o,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(d,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qt(e,t){e&&Nt.flushSync(()=>e.dispatchEvent(t))}function V(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function Yt(e,t=globalThis?.document){const n=V(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Zt="DismissableLayer",he="dismissableLayer.update",Qt="dismissableLayer.pointerDownOutside",Jt="dismissableLayer.focusOutside",Ce,We=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Be=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:c,onDismiss:s,...d}=e,u=a.useContext(We),[f,v]=a.useState(null),m=f?.ownerDocument??globalThis?.document,[,g]=a.useState({}),C=I(t,E=>v(E)),l=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=l.indexOf(h),b=f?l.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,w=b>=y,R=nn(E=>{const A=E.target,L=[...u.branches].some(W=>W.contains(A));!w||L||(o?.(E),c?.(E),E.defaultPrevented||s?.())},m),N=rn(E=>{const A=E.target;[...u.branches].some(W=>W.contains(A))||(i?.(E),c?.(E),E.defaultPrevented||s?.())},m);return Yt(E=>{b===u.layers.size-1&&(r?.(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},m),a.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ce=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Re(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ce)}},[f,m,n,u]),a.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Re())},[f,u]),a.useEffect(()=>{const E=()=>g({});return document.addEventListener(he,E),()=>document.removeEventListener(he,E)},[]),p.jsx(P.div,{...d,ref:C,style:{pointerEvents:S?w?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,N.onFocusCapture),onBlurCapture:T(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,R.onPointerDownCapture)})});Be.displayName=Zt;var en="DismissableLayerBranch",tn=a.forwardRef((e,t)=>{const n=a.useContext(We),r=a.useRef(null),o=I(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(P.div,{...e,ref:o})});tn.displayName=en;function nn(e,t=globalThis?.document){const n=V(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let d=function(){Ue(Qt,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function rn(e,t=globalThis?.document){const n=V(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&Ue(Jt,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Re(){const e=new CustomEvent(he);document.dispatchEvent(e)}function Ue(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?qt(o,i):o.dispatchEvent(i)}var se="focusScope.autoFocusOnMount",ce="focusScope.autoFocusOnUnmount",Ne={bubbles:!1,cancelable:!0},on="FocusScope",$e=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...c}
vendor: 5,625 bytes, line 1
1=e,[s,d]=a.useState(null),u=V(o),f=V(i),v=a.useRef(null),m=I(t,l=>d(l)),g=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let l=function(S){if(g.paused||!s)return;const w=S.target;s.contains(w)?v.current=w:D(v.current,{select:!0})},h=function(S){if(g.paused||!s)return;const w=S.relatedTarget;w!==null&&(s.contains(w)||D(v.current,{select:!0}))},y=function(S){if(document.activeElement===document.body)for(const R of S)R.removedNodes.length>0&&D(s)};document.addEventListener("focusin",l),document.addEventListener("focusout",h);const b=new MutationObserver(y);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",l),document.removeEventListener("focusout",h),b.disconnect()}}},[r,s,g.paused]),a.useEffect(()=>{if(s){Pe.add(g);const l=document.activeElement;if(!s.contains(l)){const y=new CustomEvent(se,Ne);s.addEventListener(se,u),s.dispatchEvent(y),y.defaultPrevented||(an(dn(Ve(s)),{select:!0}),document.activeElement===l&&D(s))}return()=>{s.removeEventListener(se,u),setTimeout(()=>{const y=new CustomEvent(ce,Ne);s.addEventListener(ce,f),s.dispatchEvent(y),y.defaultPrevented||D(l??document.body,{select:!0}),s.removeEventListener(ce,f),Pe.remove(g)},0)}}},[s,u,f,g]);const C=a.useCallback(l=>{if(!n&&!r||g.paused)return;const h=l.key==="Tab"&&!l.altKey&&!l.ctrlKey&&!l.metaKey,y=document.activeElement;if(h&&y){const b=l.currentTarget,[S,w]=sn(b);S&&w?!l.shiftKey&&y===w?(l.preventDefault(),n&&D(S,{select:!0})):l.shiftKey&&y===S&&(l.preventDefault(),n&&D(w,{select:!0})):y===b&&l.preventDefault()}},[n,r,g.paused]);return p.jsx(P.div,{tabIndex:-1,...c,ref:m,onKeyDown:C})});$e.displayName=on;function an(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(D(r,{select:t}),document.activeElement!==n)return}function sn(e){const t=Ve(e),n=xe(t,e),r=xe(t.reverse(),e);return[n,r]}function Ve(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xe(e,t){for(const n of e)if(!cn(n,{upTo:t}))return n}function cn(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function un(e){return e instanceof HTMLInputElement&&"select"in e}function D(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&un(e)&&t&&e.select()}}var Pe=ln();function ln(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=De(e,t),e.unshift(t)},remove(t){e=De(e,t),e[0]?.resume()}}}function De(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function dn(e){return e.filter(t=>t.tagName!=="A")}var fn="Portal",He=a.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=a.useState(!1);$(()=>i(!0),[]);const c=n||o&&globalThis?.document?.body;return c?xt.createPortal(p.jsx(P.div,{...r,ref:t}),c):null});He.displayName=fn;function vn(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var re=e=>{const{present:t,children:n}=e,r=pn(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),i=I(r.ref,mn(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:i}):null};re.displayName="Presence";function pn(e){const[t,n]=a.useState(),r=a.useRef(null),o=a.useRef(e),i=a.useRef("none"),c=e?"mounted":"unmounted",[s,d]=vn(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const u=G(r.current);i.current=s==="mounted"?u:"none"},[s]),$(()=>{const u=r.current,f=o.current;if(f!==e){const m=i.current,g=G(u);e?d("MOUNT"):g==="none"||u?.display==="none"?d("UNMOUNT"):d(f&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),$(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,v=g=>{const l=G(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&l&&(d("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},m=g=>{g.target===t&&(i.current=G(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:a.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function G(e){return e?.animationName||"none"}function mn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ue=0;function hn(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Oe()),document.body.insertAdjacentElement("beforeend",e[1]??Oe()),ue++,()=>{ue===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ue--}},[])}function Oe(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 4,893 bytes, lines 1-16
1style.position="fixed",e.style.pointerEvents="none",e}var J="right-scroll-bar-position",ee="width-before-scroll-bar",gn="with-scroll-bars-hidden",yn="--removed-body-scroll-bar-size";function le(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function En(e,t){var n=a.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var bn=typeof window<"u"?a.useLayoutEffect:a.useEffect,Te=new WeakMap;function Sn(e,t){var n=En(null,function(r){return e.forEach(function(o){return le(o,r)})});return bn(function(){var r=Te.get(n);if(r){var o=new Set(r),i=new Set(e),c=n.current;o.forEach(function(s){i.has(s)||le(s,null)}),i.forEach(function(s){o.has(s)||le(s,c)})}Te.set(n,e)},[e]),n}function wn(e){return e}function Cn(e,t){t===void 0&&(t=wn);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var c=t(i,r);return n.push(c),function(){n=n.filter(function(s){return s!==c})}},assignSyncMedium:function(i){for(r=!0;n.length;){var c=n;n=[],c.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var c=[];if(n.length){var s=n;n=[],s.forEach(i),c=n}var d=function(){var f=c;c=[],f.forEach(i)},u=function(){return Promise.resolve().then(d)};u(),n={push:function(f){c.push(f),u()},filter:function(f){return c=c.filter(f),n}}}};return o}function Rn(e){e===void 0&&(e={});var t=Cn(null);return t.options=O({async:!0,ssr:!1},e),t}var Ke=function(e){var t=e.sideCar,n=je(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return a.createElement(r,O({},n))};Ke.isSideCarExport=!0;function Nn(e,t){return e.useMedium(t),Ke}var Ge=Rn(),de=function(){},oe=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:de,onWheelCapture:de,onTouchMoveCapture:de}),o=r[0],i=r[1],c=e.forwardProps,s=e.children,d=e.className,u=e.removeScrollBar,f=e.enabled,v=e.shards,m=e.sideCar,g=e.noRelative,C=e.noIsolation,l=e.inert,h=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,S=e.gapMode,w=je(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=m,N=Sn([n,t]),E=O(O({},w),o);return a.createElement(a.Fragment,null,f&&a.createElement(R,{sideCar:Ge,removeScrollBar:u,shards:v,noRelative:g,noIsolation:C,inert:l,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:S}),c?a.cloneElement(a.Children.only(s),O(O({},E),{ref:N})):a.createElement(b,O({},E,{className:d,ref:N}),s))});oe.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};oe.classNames={fullWidth:ee,zeroRight:J};var xn=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Pn(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xn();return t&&e.setAttribute("nonce",t),e}function Dn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function On(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Tn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Pn())&&(Dn(t,n),On(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},An=function(){var e=Tn();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xe=function(){var e=An(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},_n={left:0,top:0,right:0,gap:0},fe=function(e){return parseInt(e||"",10)||0},In=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[fe(n),fe(r),fe(o)]},Ln=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return _n;var t=In(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Mn=Xe(),j="data-scroll-locked",kn=function(e,t,n,r){var o=e.left,i=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),` 2 .`.concat(gn,` { 3 overflow: hidden `).concat(r,`; 4 padding-right: `).concat(s,"px ").concat(r,`; 5 } 6 body[`).concat(j,`] { 7 overflow: hidden `).concat(r,`; 8 overscroll-behavior: contain; 9 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 10 padding-left: `.concat(o,`px; 11 padding-top: `).concat(i,`px; 12 padding-right: `).concat(c,`px; 13 margin-left:0; 14 margin-top:0; 15 margin-right: `).concat(s,"px ").concat(r,`; 16 `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";
16")].filter(Boolean).join(""),` 17 } 18 19 .`).concat(J,` { 20 right: `).concat(s,"px ").concat(r,`; 21 } 22 23 .`).concat(ee,` { 24 margin-right: `).concat(s,"px ").concat(r,`; 25 } 26 27 .`).concat(J," .").concat(J,` { 28 right: 0 `).concat(r,`; 29 } 30 31 .`).concat(ee," .").concat(ee,` { 32 margin-right: 0 `).concat(r,`; 33 } 34 35 body[`).concat(j,`] { 36 `).concat(yn,": ").concat(s,`px; 37 } 38`)},Ae=function(){var e=parseInt(document.body.getAttribute(j)||"0",10);return isFinite(e)?e:0},Fn=function(){a.useEffect(function(){return document.body.setAttribute(j,(Ae()+1).toString()),function(){var e=Ae()-1;e<=0?document.body.removeAttribute(j):document.body.setAttribute(j,e.toString())}},[])},jn=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Fn();var i=a.useMemo(function(){return Ln(o)},[o]);return a.createElement(Mn,{styles:kn(i,!t,o,n?"":"!important")})},ge=!1;if(typeof window<"u")try{var X=Object.defineProperty({},"passive",{get:function(){return ge=!0,!0}});window.addEventListener("test",X,X),window.removeEventListener("test",X,X)}catch{ge=!1}var M=ge?{passive:!1}:!1,Wn=function(e){return e.tagName==="TEXTAREA"},ze=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Wn(e)&&n[t]==="visible")},Bn=function(e){return ze(e,"overflowY")},Un=function(e){return ze(e,"overflowX")},_e=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=qe(e,r);if(o){var i=Ye(e,r),c=i[1],s=i[2];if(c>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$n=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Vn=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qe=function(e,t){return e==="v"?Bn(t):Un(t)},Ye=function(e,t){return e==="v"?$n(t):Vn(t)},Hn=function(e,t){return e==="h"&&t==="rtl"?-1:1},Kn=function(e,t,n,r,o){var i=Hn(e,window.getComputedStyle(t).direction),c=i*r,s=n.target,d=t.contains(s),u=!1,f=c>0,v=0,m=0;do{if(!s)break;var g=Ye(e,s),C=g[0],l=g[1],h=g[2],y=l-h-i*C;(C||y)&&qe(e,s)&&(v+=y,m+=C);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!d&&s!==document.body||d&&(t.contains(s)||t===s));return(f&&Math.abs(v)<1||!f&&Math.abs(m)<1)&&(u=!0),u},z=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ie=function(e){return[e.deltaX,e.deltaY]},Le=function(e){return e&&"current"in e?e.current:e},Gn=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Xn=function(e){return` 39 .block-interactivity-`.concat(e,` {pointer-events: none;} 40 .allow-interactivity-`).concat(e,` {pointer-events: all;} 41`)},zn=0,k=[];function qn(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(zn++)[0],i=a.useState(Xe)[0],c=a.useRef(e);a.useEffect(function(){c.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var l=Pt([e.lockRef.current],(e.shards||[]).map(Le),!0).filter(Boolean);return l.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),l.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=a.useCallback(function(l,h){if("touches"in l&&l.touches.length===2||l.type==="wheel"&&l.ctrlKey)return!c.current.allowPinchZoom;var y=z(l),b=n.current,S="deltaX"in l?l.deltaX:b[0]-y[0],w="deltaY"in l?l.deltaY:b[1]-y[1],R,N=l.target,E=Math.abs(S)>Math.abs(w)?"h":"v";if("touches"in l&&E==="h"&&N.type==="range")return!1;var A=window.getSelection(),L=A&&A.anchorNode,W=L?L===N||L.contains(N):!1;if(W)return!1;var K=_e(E,N);if(!K)return!0;if(K?R=E:(R=E==="v"?"h":"v",K=_e(E,N)),!K)return!1;if(!r.current&&"changedTouches"in l&&(S||w)&&(r.current=R),!R)return!0;var we=r.current||R;return Kn(we,h,l,we==="h"?S:w)},[]),d=a.useCallback(function(l){var h=l;if(!(!k.length||k[k.length-1]!==i)){var y="deltaY"in h?Ie(h):z(h),b=t.current.filter(function(R){return R.name===h.type&&(R.target===h.target||h.target===R.shadowParent)&&Gn(R.delta,y)})[0];if(b&&b.should){h.cancelable&&h.preventDefault();return}
vendor: 4,323 bytes, line 41
41if(!b){var S=(c.current.shards||[]).map(Le).filter(Boolean).filter(function(R){return R.contains(h.target)}),w=S.length>0?s(h,S[0]):!c.current.noIsolation;w&&h.cancelable&&h.preventDefault()}}},[]),u=a.useCallback(function(l,h,y,b){var S={name:l,delta:h,target:y,should:b,shadowParent:Yn(y)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(w){return w!==S})},1)},[]),f=a.useCallback(function(l){n.current=z(l),r.current=void 0},[]),v=a.useCallback(function(l){u(l.type,Ie(l),l.target,s(l,e.lockRef.current))},[]),m=a.useCallback(function(l){u(l.type,z(l),l.target,s(l,e.lockRef.current))},[]);a.useEffect(function(){return k.push(i),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:m}),document.addEventListener("wheel",d,M),document.addEventListener("touchmove",d,M),document.addEventListener("touchstart",f,M),function(){k=k.filter(function(l){return l!==i}),document.removeEventListener("wheel",d,M),document.removeEventListener("touchmove",d,M),document.removeEventListener("touchstart",f,M)}},[]);var g=e.removeScrollBar,C=e.inert;return a.createElement(a.Fragment,null,C?a.createElement(i,{styles:Xn(o)}):null,g?a.createElement(jn,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Yn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Zn=Nn(Ge,qn);var Ze=a.forwardRef(function(e,t){return a.createElement(oe,O({},e,{ref:t,sideCar:Zn}))});Ze.classNames=oe.classNames;var Qn=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},F=new WeakMap,q=new WeakMap,Y={},ve=0,Qe=function(e){return e&&(e.host||Qe(e.parentNode))},Jn=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Qe(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},er=function(e,t,n,r){var o=Jn(t,Array.isArray(e)?e:[e]);Y[n]||(Y[n]=new WeakMap);var i=Y[n],c=[],s=new Set,d=new Set(o),u=function(v){!v||s.has(v)||(s.add(v),u(v.parentNode))};o.forEach(u);var f=function(v){!v||d.has(v)||Array.prototype.forEach.call(v.children,function(m){if(s.has(m))f(m);else try{var g=m.getAttribute(r),C=g!==null&&g!=="false",l=(F.get(m)||0)+1,h=(i.get(m)||0)+1;F.set(m,l),i.set(m,h),c.push(m),l===1&&C&&q.set(m,!0),h===1&&m.setAttribute(n,"true"),C||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return f(t),s.clear(),ve++,function(){c.forEach(function(v){var m=F.get(v)-1,g=i.get(v)-1;F.set(v,m),i.set(v,g),m||(q.has(v)||v.removeAttribute(r),q.delete(v)),g||v.removeAttribute(n)}),ve--,ve||(F=new WeakMap,F=new WeakMap,q=new WeakMap,Y={})}},tr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Qn(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),er(r,o,n,"aria-hidden")):function(){return null}};function nr(e){const t=rr(e),n=a.forwardRef((r,o)=>{const{children:i,...c}=r,s=a.Children.toArray(i),d=s.find(ar);if(d){const u=d.props.children,f=s.map(v=>v===d?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:v);return p.jsx(t,{...c,ref:o,children:a.isValidElement(u)?a.cloneElement(u,void 0,f):null})}return p.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function rr(e){const t=a.forwardRef((n,r)=>{const{children:o,...i}=n;if(a.isValidElement(o)){const c=sr(o),s=ir(i,o.props);return o.type!==a.Fragment&&(s.ref=r?Fe(r,c):c),a.cloneElement(o,s)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var or=Symbol("radix.slottable");function ar(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===or}function ir(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const d=i(...s);return o(...s),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function sr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}
vendor: 4,819 bytes, lines 41-45
41var ae="Dialog",[Je,Kr]=Lt(ae),[cr,x]=Je(ae),et=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:c=!0}=e,s=a.useRef(null),d=a.useRef(null),[u,f]=Wt({prop:r,defaultProp:o??!1,onChange:i,caller:ae});return p.jsx(cr,{scope:t,triggerRef:s,contentRef:d,contentId:ie(),titleId:ie(),descriptionId:ie(),open:u,onOpenChange:f,onOpenToggle:a.useCallback(()=>f(v=>!v),[f]),modal:c,children:n})};et.displayName=ae;var tt="DialogTrigger",nt=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=x(tt,n),i=I(t,o.triggerRef);return p.jsx(P.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Se(o.open),...r,ref:i,onClick:T(e.onClick,o.onOpenToggle)})});nt.displayName=tt;var Ee="DialogPortal",[ur,rt]=Je(Ee,{forceMount:void 0}),ot=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=x(Ee,t);return p.jsx(ur,{scope:t,forceMount:n,children:a.Children.map(r,c=>p.jsx(re,{present:n||i.open,children:p.jsx(He,{asChild:!0,container:o,children:c})}))})};ot.displayName=Ee;var ne="DialogOverlay",at=a.forwardRef((e,t)=>{const n=rt(ne,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=x(ne,e.__scopeDialog);return i.modal?p.jsx(re,{present:r||i.open,children:p.jsx(dr,{...o,ref:t})}):null});at.displayName=ne;var lr=nr("DialogOverlay.RemoveScroll"),dr=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=x(ne,n);return p.jsx(Ze,{as:lr,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(P.div,{"data-state":Se(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),_="DialogContent",it=a.forwardRef((e,t)=>{const n=rt(_,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=x(_,e.__scopeDialog);return p.jsx(re,{present:r||i.open,children:i.modal?p.jsx(fr,{...o,ref:t}):p.jsx(vr,{...o,ref:t})})});it.displayName=_;var fr=a.forwardRef((e,t)=>{const n=x(_,e.__scopeDialog),r=a.useRef(null),o=I(t,n.contentRef,r);return a.useEffect(()=>{const i=r.current;if(i)return tr(i)},[]),p.jsx(st,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:T(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:T(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,s=c.button===0&&c.ctrlKey===!0;(c.button===2||s)&&i.preventDefault()}),onFocusOutside:T(e.onFocusOutside,i=>i.preventDefault())})}),vr=a.forwardRef((e,t)=>{const n=x(_,e.__scopeDialog),r=a.useRef(!1),o=a.useRef(!1);return p.jsx(st,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;n.triggerRef.current?.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),st=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...c}=e,s=x(_,n),d=a.useRef(null),u=I(t,d);return hn(),p.jsxs(p.Fragment,{children:[p.jsx($e,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:p.jsx(Be,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Se(s.open),...c,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(pr,{titleId:s.titleId}),p.jsx(hr,{contentRef:d,descriptionId:s.descriptionId})]})]})}),be="DialogTitle",ct=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=x(be,n);return p.jsx(P.h2,{id:o.titleId,...r,ref:t})});ct.displayName=be;var ut="DialogDescription",lt=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=x(ut,n);return p.jsx(P.p,{id:o.descriptionId,...r,ref:t})});lt.displayName=ut;var dt="DialogClose",ft=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=x(dt,n);return p.jsx(P.button,{type:"button",...r,ref:t,onClick:T(e.onClick,()=>o.onOpenChange(!1))})});ft.displayName=dt;function Se(e){return e?"open":"closed"}var vt="DialogTitleWarning",[Gr,pt]=It(vt,{contentName:_,titleName:be,docsSlug:"dialog"}),pr=({titleId:e})=>{const t=pt(vt),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 42 43If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 44 45For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},mr="DialogDescriptionWarning",hr=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pt(mr).contentName}}.`;return a.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");
45t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},gr=et,Xr=nt,yr=ot,mt=at,ht=it,gt=ct,yt=lt,Er=ft;const zr=gr,br=yr,Et=a.forwardRef(({className:e,...t},n)=>p.jsx(mt,{ref:n,className:H("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}));Et.displayName=mt.displayName;const Sr=a.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(br,{children:[p.jsx(Et,{}),p.jsxs(ht,{ref:r,className:H("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 sm:rounded-lg",e),...n,children:[t,p.jsxs(Er,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background cursor-pointer transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[p.jsx(_t,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Sr.displayName=ht.displayName;const wr=({className:e,...t})=>p.jsx("div",{className:H("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});wr.displayName="DialogHeader";const Cr=a.forwardRef(({className:e,...t},n)=>p.jsx(gt,{ref:n,className:H("text-lg font-semibold leading-none tracking-tight",e),...t}));Cr.displayName=gt.displayName;const Rr=a.forwardRef(({className:e,...t},n)=>p.jsx(yt,{ref:n,className:H("text-sm text-muted-foreground",e),...t}));Rr.displayName=yt.displayName;function te(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?te=function(t){return typeof t}:te=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},te(e)}var bt="dahlia",Nr=function(t){return t===3?"v3":t},St="https://js.stripe.com",xr="".concat(St,"/").concat(bt,"/stripe.js"),Pr=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Dr=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;var Or=function(t){return Pr.test(t)||Dr.test(t)},Tr=function(){for(var t=document.querySelectorAll('script[src^="'.concat(St,'"]')),n=0;n<t.length;n++){var r=t[n];if(Or(r.src))return r}return null},Me=function(t){var n="",r=document.createElement("script");r.src="".concat(xr).concat(n);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(r),r},Ar=function(t,n){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"9.7.0",startTime:n})},B=null,Z=null,Q=null,_r=function(t){return function(n){t(new Error("Failed to load Stripe.js",{cause:n}))}},Ir=function(t,n){return function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))}},Lr=function(t){return B!==null?B:(B=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe){n(window.Stripe);return}try{var o=Tr();if(!(o&&t)){if(!o)o=Me(t);else if(o&&Q!==null&&Z!==null){var i;o.removeEventListener("load",Q),o.removeEventListener("error",Z),(i=o.parentNode)===null||i===void 0||i.removeChild(o),o=Me(t)}}Q=Ir(n,r),Z=_r(r),o.addEventListener("load",Q),o.addEventListener("error",Z)}catch(c){r(c);return}}),B.catch(function(n){return B=null,Promise.reject(n)}))},Mr=function(t,n,r){if(t===null)return null;var o=n[0];if(typeof o!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(te(o)," instead."));var i=o.match(/^pk_test/),c=Nr(t.version),s=bt;i&&c!==s&&console.warn("Stripe.js@".concat(c," was loaded on the page, but @stripe/stripe-js@").concat("9.7.0"," expected Stripe.js@").concat(s,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var d=t.apply(void 0,n);return Ar(d,r),d}
45,U,wt=!1,Ct=function(){return U||(U=Lr(null).catch(function(t){return U=null,Promise.reject(t)}),U)};Promise.resolve().then(function(){return Ct()}).catch(function(e){wt||console.warn(e)});var kr=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];wt=!0;var o=Date.now();return Ct().then(function(i){return Mr(i,n,o)})};const ye="pk_live_51Te7BVDJQQ1piogTkASQ5GDadKPXAnvLW1f0QnMBdGbpgpZwu2fpU0JnNvZnNDHy6l3dkSvTha4aOCOtgZ9o1Zhp00qipKVI7N";function Rt(){if(ye?.startsWith("pk_test_"))return"sandbox";if(ye?.startsWith("pk_live_"))return"live";throw new Error("Stripe payments are not configured for this build. Complete Stripe go-live in your Lovable project to enable production checkout.")}let pe=null;function qr(){return pe||(Rt(),pe=kr(ye)),pe}function Fr(){return Rt()}const jr=new Set(["88065044-8515-4139-938d-0d6b808c6489"]);async function Wr(e){const{data:t}=await me.from("subscriptions").select("*").eq("user_id",e).eq("environment",Fr()).order("created_at",{ascending:!1}).limit(1).maybeSingle();return t??null}function Br(e){if(!e)return!1;const t=e.current_period_end?new Date(e.current_period_end):null,n=!t||t>new Date;return["active","trialing","past_due"].includes(e.status)?n:e.status==="canceled"?!!t&&t>new Date:!1}function Ur(e){return e?e.startsWith("fleet")?"fleet":e.startsWith("owner_operator")?"owner_operator":"free":"free"}function Yr(){const{user:e}=Dt(),t=Tt({queryKey:["subscription",e?.id],queryFn:()=>Wr(e.id),enabled:!!e?.id});a.useEffect(()=>{if(!e?.id)return;const c=me.channel(`subscriptions:${e.id}`).on("postgres_changes",{event:"*",schema:"public",table:"subscriptions",filter:`user_id=eq.${e.id}`},()=>t.refetch()).subscribe();return()=>{me.removeChannel(c)}},[e?.id]);const n=t.data??null,r=jr.has(e?.id??""),o=r||Br(n),i=r?"fleet":o?Ur(n?.price_id):"free";return{subscription:n,isActive:o,tier:i,isFleet:o&&i==="fleet",isPastDue:!r&&n?.status==="past_due",loading:t.isLoading,refetch:t.refetch}}export{ht as C,zr as D,mt as O,yr as P,gr as R,gt as T,Gr as W,_t as X,Fr as a,Sr as b,Kr as c,T as d,yt as e,Er as f,qr as g,Lt as h,Xr as i,wr as j,Cr as k,Yr as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.