pi-mega-compact 0.15.0 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extensions/dashboard-server/resolve-snapshot.js +20 -8
- package/dist/src/store/sqlite/global-sessions.js +40 -7
- package/extensions/dashboard-client/dist/assets/{AreaChart-rJdaOUlj.js → AreaChart-D0hDLKC1.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{AreaChart-rJdaOUlj.js.map → AreaChart-D0hDLKC1.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{BarChart-DOfc8me9.js → BarChart-DSbTWZTQ.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{BarChart-DOfc8me9.js.map → BarChart-DSbTWZTQ.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{CacheTab-EhqkEglo.js → CacheTab-Bgt2Wuar.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{CacheTab-EhqkEglo.js.map → CacheTab-Bgt2Wuar.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{EventsTab-BUACwWXf.js → EventsTab-CBb7O-6M.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{EventsTab-BUACwWXf.js.map → EventsTab-CBb7O-6M.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{HealthTab-CDEYVRBb.js → HealthTab-BFMHwnlg.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{HealthTab-CDEYVRBb.js.map → HealthTab-BFMHwnlg.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{MaintenanceTab-DtanIeCQ.js → MaintenanceTab-DxIQyeh-.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{MaintenanceTab-DtanIeCQ.js.map → MaintenanceTab-DxIQyeh-.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{MemoryMapTab-BGEhL7OG.js → MemoryMapTab-C576-nmM.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{MemoryMapTab-BGEhL7OG.js.map → MemoryMapTab-C576-nmM.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{MetricsTab-Cktozn4s.js → MetricsTab-vk8Nqg7k.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{MetricsTab-Cktozn4s.js.map → MetricsTab-vk8Nqg7k.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/OverviewTab-BVaddBS4.js +16 -0
- package/extensions/dashboard-client/dist/assets/OverviewTab-BVaddBS4.js.map +1 -0
- package/extensions/dashboard-client/dist/assets/{ReposTab-Bg72Ozdc.js → ReposTab-CLCd-Gfd.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{ReposTab-Bg72Ozdc.js.map → ReposTab-CLCd-Gfd.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{SessionsTab-BcTK9Lg6.js → SessionsTab-CV_qDKZB.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{SessionsTab-BcTK9Lg6.js.map → SessionsTab-CV_qDKZB.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{SetupTab-Bt-Ru1xp.js → SetupTab-BuIwk7LZ.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{SetupTab-Bt-Ru1xp.js.map → SetupTab-BuIwk7LZ.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{TimeSavedCard-ic_LjJ79.js → TimeSavedCard-BS5-w4mP.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{TimeSavedCard-ic_LjJ79.js.map → TimeSavedCard-BS5-w4mP.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{TurnsTab-D9AZTMgG.js → TurnsTab-DhgjZmEQ.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{TurnsTab-D9AZTMgG.js.map → TurnsTab-DhgjZmEQ.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{WikiTab-hRcJPi_m.js → WikiTab-CmOAaPnM.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{WikiTab-hRcJPi_m.js.map → WikiTab-CmOAaPnM.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{button-BdAtIbVu.js → button-DyV48WDX.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{button-BdAtIbVu.js.map → button-DyV48WDX.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{card-BFYc_QrK.js → card-CfCQ36pG.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{card-BFYc_QrK.js.map → card-CfCQ36pG.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{generateCategoricalChart-BwzyqytT.js → generateCategoricalChart-CGlLggNu.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{generateCategoricalChart-BwzyqytT.js.map → generateCategoricalChart-CGlLggNu.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{index-pmtEr3sb.js → index-tPP7N38D.js} +28 -28
- package/extensions/dashboard-client/dist/assets/index-tPP7N38D.js.map +1 -0
- package/extensions/dashboard-client/dist/assets/{switch-DEyGlFwJ.js → switch-7461qYip.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{switch-DEyGlFwJ.js.map → switch-7461qYip.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{toggle-pDMBQYQj.js → toggle-CHyUS1MH.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{toggle-pDMBQYQj.js.map → toggle-CHyUS1MH.js.map} +1 -1
- package/extensions/dashboard-client/dist/assets/{useSSE-BKaC4dao.js → useSSE-CPIU9hax.js} +2 -2
- package/extensions/dashboard-client/dist/assets/{useSSE-BKaC4dao.js.map → useSSE-CPIU9hax.js.map} +1 -1
- package/extensions/dashboard-client/dist/index.html +1 -1
- package/extensions/dashboard-client/package-lock.json +0 -39
- package/extensions/dashboard-client/src/components/SessionContextGauges.tsx +43 -19
- package/extensions/dashboard-client/src/hooks/useApi.ts +38 -5
- package/extensions/dashboard-client/src/tabs/OverviewTab.tsx +32 -16
- package/extensions/dashboard-server/resolve-snapshot.ts +22 -10
- package/package.json +1 -1
- package/src/store/sqlite/global-sessions.ts +205 -175
- package/extensions/dashboard-client/dist/assets/OverviewTab-08v6Ayuf.js +0 -16
- package/extensions/dashboard-client/dist/assets/OverviewTab-08v6Ayuf.js.map +0 -1
- package/extensions/dashboard-client/dist/assets/index-pmtEr3sb.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as c,j as v,X as O,a as we,n as q}from"./index-pmtEr3sb.js";var Ee=Object.defineProperty,R=(e,t)=>Ee(e,"name",{value:t,configurable:!0}),Z=!!(typeof window<"u"&&window.document&&window.document.createElement);function B(e,t,{checkForDefaultPrevented:n=!0}={}){return R(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},"handleEvent")}R(B,"composeEventHandlers");function Ce(e){if(!Z)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}R(Ce,"getOwnerWindow");function N(e){if(!Z)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}R(N,"getOwnerDocument");function J(e,t=!1){const{activeElement:n}=N(e);if(!n?.nodeName)return null;if(K(n)&&n.contentDocument)return J(n.contentDocument.body,t);if(t){const o=n.getAttribute("aria-activedescendant");if(o){const r=N(n).getElementById(o);if(r)return r}}return n}R(J,"getActiveElement");function K(e){return e.tagName==="IFRAME"}R(K,"isFrame");var _e=Object.defineProperty,M=(e,t)=>_e(e,"name",{value:t,configurable:!0});function A(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}M(A,"setRef");function Q(...e){return t=>{let n=!1;const o=e.map(r=>{const s=A(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():A(e[r],null)}}}}M(Q,"composeRefs");function T(...e){return c.useCallback(Q(...e),e)}M(T,"useComposedRefs");var ye=Object.defineProperty,w=(e,t)=>ye(e,"name",{value:t,configurable:!0});function xe(e,t){const n=c.createContext(t);n.displayName=e+"Context";const o=w(s=>{const{children:i,...u}=s,a=c.useMemo(()=>u,Object.values(u));return v.jsx(n.Provider,{value:a,children:i})},"Provider");o.displayName=e+"Provider";function r(s,i={}){const{optional:u=!1}=i,a=c.useContext(n);if(a)return a;if(t!==void 0)return t;if(!u)throw new Error(`\`${s}\` must be used within \`${e}\``)}return w(r,"useContext"),[o,r]}w(xe,"createContext");function ee(e,t=[]){let n=[];function o(s,i){const u=c.createContext(i);u.displayName=s+"Context";const a=n.length;n=[...n,i];const f=w(l=>{const{scope:m,children:d,...h}=l,S=m?.[e]?.[a]||u,b=c.useMemo(()=>h,Object.values(h));return v.jsx(S.Provider,{value:b,children:d})},"Provider");f.displayName=s+"Provider";function p(l,m,d={}){const{optional:h=!1}=d,S=m?.[e]?.[a]||u,b=c.useContext(S);if(b)return b;if(i!==void 0)return i;if(!h)throw new Error(`\`${l}\` must be used within \`${s}\``)}return w(p,"useContext"),[f,p]}w(o,"createContext");const r=w(()=>{const s=n.map(i=>c.createContext(i));return w(function(u){const a=u?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...u,[e]:a}}),[u,a])},"useScope")},"createScope");return r.scopeName=e,[o,te(r,...t)]}w(ee,"createContextScope");function te(...e){const t=e[0];if(e.length===1)return t;const n=w(()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return w(function(s){const i=o.reduce((u,{useScope:a,scopeName:f})=>{const l=a(s)[`__scope${f}`];return{...u,...l}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}w(te,"composeContextScopes");var z=globalThis?.document?c.useLayoutEffect:()=>{},Pe=Object.defineProperty,Re=(e,t)=>Pe(e,"name",{value:t,configurable:!0}),Y=O[" useEffectEvent ".trim().toString()],X=O[" useInsertionEffect ".trim().toString()];function ne(e){if(typeof Y=="function")return Y(e);const t=c.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof X=="function"?X(()=>{t.current=e}):z(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}Re(ne,"useEffectEvent");var ke=Object.defineProperty,k=(e,t)=>ke(e,"name",{value:t,configurable:!0}),Ie=O[" useInsertionEffect ".trim().toString()]||z;function re({prop:e,defaultProp:t,onChange:n=k(()=>{},"onChange"),caller:o}){const[r,s,i]=oe({defaultProp:t,onChange:n}),u=e!==void 0,a=u?e:r,f=c.useCallback(p=>{if(u){const l=ce(p)?p(e):p;l!==e&&i.current?.(l)}else s(p)},[u,e,s,i]);return[a,f]}k(re,"useControllableState");function oe({defaultProp:e,onChange:t}){const[n,o]=c.useState(e),r=c.useRef(n),s=c.useRef(t);return Ie(()=>{s.current=t},[t]),c.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}k(oe,"useUncontrolledState");function ce(e){return typeof e=="function"}k(ce,"isFunction");var G=Symbol("RADIX:SYNC_STATE");function $e(e,t,n,o){const{prop:r,defaultProp:s,onChange:i,caller:u}=t,a=r!==void 0,f=ne(i),p=[{...n,state:s}];o&&p.push(o);const[l,m]=c.useReducer((b,C)=>{if(C.type===G)return{...b,state:C.state};const _=e(b,C);return a&&!Object.is(_.state,b.state)&&f(_.state),_},...p),d=l.state,h=c.useRef(d);c.useEffect(()=>{h.current!==d&&(h.current=d,a||f(d))},[d,h,a]);const S=c.useMemo(()=>r!==void 0?{...l,state:r}:l,[l,r]);return c.useEffect(()=>{a&&!Object.is(r,l.state)&&m({type:G,state:r})},[r,l.state,a]),[S,m]}k($e,"useControllableStateReducer");var je=Object.defineProperty,Oe=(e,t)=>je(e,"name",{value:t,configurable:!0});function se(e){const[t,n]=c.useState(void 0);return z(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let i,u;if("borderBoxSize"in s){const a=s.borderBoxSize,f=Array.isArray(a)?a[0]:a;i=f.inlineSize,u=f.blockSize}else i=e.offsetWidth,u=e.offsetHeight;n({width:i,height:u})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}Oe(se,"useSize");var Te=Object.defineProperty,E=(e,t)=>Te(e,"name",{value:t,configurable:!0});function ie(e){const t=c.forwardRef((n,o)=>{let{children:r,...s}=n,i=null,u=!1;const a=[];D(r)&&typeof j=="function"&&(r=j(r._payload)),c.Children.forEach(r,m=>{if(fe(m)){u=!0;const d=m;let h="child"in d.props?d.props.child:d.props.children;D(h)&&typeof j=="function"&&(h=j(h._payload)),i=Ae(d,h),a.push(i?.props?.children)}else a.push(m)}),i?i=c.cloneElement(i,void 0,a):!u&&c.Children.count(r)===1&&c.isValidElement(r)&&(i=r);const f=i?le(i):void 0,p=T(o,f);if(!i){if(r||r===0)throw new Error(u?Me(e):Be(e));return r}const l=ue(s,i.props??{});return i.type!==c.Fragment&&(l.ref=o?p:f),c.cloneElement(i,l)});return t.displayName=`${e}.Slot`,t}E(ie,"createSlot");var ae=Symbol.for("radix.slottable");function Ne(e){const t=E(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=ae,t}E(Ne,"createSlottable");var Ae=E((e,t)=>{if("child"in e.props){const n=e.props.child;return c.isValidElement(n)?c.cloneElement(n,void 0,e.props.children(n.props.children)):null}return c.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function ue(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...u)=>{const a=s(...u);return r(...u),a}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}E(ue,"mergeProps");function le(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)}E(le,"getElementRef");function fe(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ae}E(fe,"isSlottable");var De=Symbol.for("react.lazy");function D(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===De&&"_payload"in e&&de(e._payload)}E(D,"isLazyComponent");function de(e){return typeof e=="object"&&e!==null&&"then"in e}E(de,"isPromiseLike");var Be=E(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Me=E(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),j=O[" use ".trim().toString()],ze=Object.defineProperty,Fe=(e,t)=>ze(e,"name",{value:t,configurable:!0}),Le=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],F=Le.reduce((e,t)=>{const n=ie(`Primitive.${t}`),o=c.forwardRef((r,s)=>{const{asChild:i,...u}=r,a=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(a,{...u,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function He(e,t){e&&we.flushSync(()=>e.dispatchEvent(t))}Fe(He,"dispatchDiscreteCustomEvent");var Ue=Object.defineProperty,x=(e,t)=>Ue(e,"name",{value:t,configurable:!0}),L="Switch",[We,tt]=ee(L),[Ve,H]=We(L);function pe(e){const{__scopeSwitch:t,checked:n,children:o,defaultChecked:r,disabled:s,form:i,name:u,onCheckedChange:a,required:f,value:p="on",internal_do_not_use_render:l}=e,[m,d]=re({prop:n,defaultProp:r??!1,onChange:a,caller:L}),[h,S]=c.useState(null),[b,C]=c.useState(null),_=c.useRef(!1),[g,y]=c.useReducer(P=>P+1,0),I=h?!!i||!!h.closest("form"):!0,$={checked:m,setChecked:d,disabled:s,control:h,setControl:S,name:u,form:i,value:p,hasConsumerStoppedPropagationRef:_,userInteractionCount:g,onUserInteraction:y,required:f,defaultChecked:r,isFormControl:I,bubbleInput:b,setBubbleInput:C};return v.jsx(Ve,{scope:t,...$,children:me(l)?l($):o})}x(pe,"SwitchProvider");var qe="SwitchTrigger",Ye=c.forwardRef(x(function({__scopeSwitch:t,onClick:n,...o},r){const{control:s,form:i,value:u,disabled:a,checked:f,required:p,setControl:l,setChecked:m,hasConsumerStoppedPropagationRef:d,onUserInteraction:h,isFormControl:S,bubbleInput:b}=H(qe,t),C=T(r,l),_=c.useRef(f);return c.useEffect(()=>{const g=i?s?.ownerDocument.getElementById(i):s?.form;if(g instanceof HTMLFormElement){const y=x(()=>m(_.current),"reset");return g.addEventListener("reset",y),()=>g.removeEventListener("reset",y)}},[s,i,m]),v.jsx(F.button,{type:"button",role:"switch","aria-checked":f,"aria-required":p,"data-state":U(f),"data-disabled":a?"":void 0,disabled:a,value:u,...o,ref:C,onClick:B(n,g=>{h(),m(y=>!y),b&&S&&(d.current=g.isPropagationStopped(),d.current||g.stopPropagation())})})},"SwitchTrigger")),he=c.forwardRef(x(function(t,n){const{__scopeSwitch:o,name:r,checked:s,defaultChecked:i,required:u,disabled:a,value:f,onCheckedChange:p,form:l,...m}=t;return v.jsx(pe,{__scopeSwitch:o,checked:s,defaultChecked:i,disabled:a,required:u,onCheckedChange:p,name:r,form:l,value:f,internal_do_not_use_render:({isFormControl:d})=>v.jsxs(v.Fragment,{children:[v.jsx(Ye,{...m,ref:n,__scopeSwitch:o}),d&&v.jsx(Je,{__scopeSwitch:o})]})})},"Switch")),Xe="SwitchThumb",Ge=c.forwardRef(x(function(t,n){const{__scopeSwitch:o,...r}=t,s=H(Xe,o);return v.jsx(F.span,{"data-state":U(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:n})},"SwitchThumb")),Ze="SwitchBubbleInput",Je=c.forwardRef(x(function({__scopeSwitch:t,onClick:n,...o},r){const{control:s,hasConsumerStoppedPropagationRef:i,userInteractionCount:u,checked:a,defaultChecked:f,required:p,disabled:l,name:m,value:d,form:h,bubbleInput:S,setBubbleInput:b}=H(Ze,t),C=T(r,b),_=se(s),g=c.useRef(!1),y=c.useRef(a),I=c.useRef(u);c.useEffect(()=>{const P=S;if(!P)return;const be=window.HTMLInputElement.prototype,W=Object.getOwnPropertyDescriptor(be,"checked").set,V=u!==I.current;I.current=u;const ve=y.current!==a;y.current=a;const Se=!(V&&i.current);if(ve&&W){g.current=!V;const ge=new Event("click",{bubbles:Se});W.call(P,a),P.dispatchEvent(ge),g.current=!1}},[S,a,i,u]);const $=c.useRef(a);return v.jsx(F.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??$.current,required:p,disabled:l,name:m,value:d,form:h,...o,tabIndex:-1,ref:C,onClick:B(n,P=>{g.current&&P.stopPropagation()}),style:{...o.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function me(e){return typeof e=="function"}x(me,"isFunction");function U(e){return e?"checked":"unchecked"}x(U,"getState");const Ke=c.forwardRef(({className:e,...t},n)=>v.jsx(he,{ref:n,className:q("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-border transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-bg-elevated focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:v.jsx(Ge,{className:q("pointer-events-none block h-4 w-4 rounded-full bg-foreground shadow-lg transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0.5")})}));Ke.displayName=he.displayName;export{Ke as S};
|
|
2
|
-
//# sourceMappingURL=switch-
|
|
1
|
+
import{r as c,j as v,X as O,a as we,n as q}from"./index-tPP7N38D.js";var Ee=Object.defineProperty,R=(e,t)=>Ee(e,"name",{value:t,configurable:!0}),Z=!!(typeof window<"u"&&window.document&&window.document.createElement);function B(e,t,{checkForDefaultPrevented:n=!0}={}){return R(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},"handleEvent")}R(B,"composeEventHandlers");function Ce(e){if(!Z)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}R(Ce,"getOwnerWindow");function N(e){if(!Z)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}R(N,"getOwnerDocument");function J(e,t=!1){const{activeElement:n}=N(e);if(!n?.nodeName)return null;if(K(n)&&n.contentDocument)return J(n.contentDocument.body,t);if(t){const o=n.getAttribute("aria-activedescendant");if(o){const r=N(n).getElementById(o);if(r)return r}}return n}R(J,"getActiveElement");function K(e){return e.tagName==="IFRAME"}R(K,"isFrame");var _e=Object.defineProperty,M=(e,t)=>_e(e,"name",{value:t,configurable:!0});function A(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}M(A,"setRef");function Q(...e){return t=>{let n=!1;const o=e.map(r=>{const s=A(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():A(e[r],null)}}}}M(Q,"composeRefs");function T(...e){return c.useCallback(Q(...e),e)}M(T,"useComposedRefs");var ye=Object.defineProperty,w=(e,t)=>ye(e,"name",{value:t,configurable:!0});function xe(e,t){const n=c.createContext(t);n.displayName=e+"Context";const o=w(s=>{const{children:i,...u}=s,a=c.useMemo(()=>u,Object.values(u));return v.jsx(n.Provider,{value:a,children:i})},"Provider");o.displayName=e+"Provider";function r(s,i={}){const{optional:u=!1}=i,a=c.useContext(n);if(a)return a;if(t!==void 0)return t;if(!u)throw new Error(`\`${s}\` must be used within \`${e}\``)}return w(r,"useContext"),[o,r]}w(xe,"createContext");function ee(e,t=[]){let n=[];function o(s,i){const u=c.createContext(i);u.displayName=s+"Context";const a=n.length;n=[...n,i];const f=w(l=>{const{scope:m,children:d,...h}=l,S=m?.[e]?.[a]||u,b=c.useMemo(()=>h,Object.values(h));return v.jsx(S.Provider,{value:b,children:d})},"Provider");f.displayName=s+"Provider";function p(l,m,d={}){const{optional:h=!1}=d,S=m?.[e]?.[a]||u,b=c.useContext(S);if(b)return b;if(i!==void 0)return i;if(!h)throw new Error(`\`${l}\` must be used within \`${s}\``)}return w(p,"useContext"),[f,p]}w(o,"createContext");const r=w(()=>{const s=n.map(i=>c.createContext(i));return w(function(u){const a=u?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...u,[e]:a}}),[u,a])},"useScope")},"createScope");return r.scopeName=e,[o,te(r,...t)]}w(ee,"createContextScope");function te(...e){const t=e[0];if(e.length===1)return t;const n=w(()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return w(function(s){const i=o.reduce((u,{useScope:a,scopeName:f})=>{const l=a(s)[`__scope${f}`];return{...u,...l}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}w(te,"composeContextScopes");var z=globalThis?.document?c.useLayoutEffect:()=>{},Pe=Object.defineProperty,Re=(e,t)=>Pe(e,"name",{value:t,configurable:!0}),Y=O[" useEffectEvent ".trim().toString()],X=O[" useInsertionEffect ".trim().toString()];function ne(e){if(typeof Y=="function")return Y(e);const t=c.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof X=="function"?X(()=>{t.current=e}):z(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}Re(ne,"useEffectEvent");var ke=Object.defineProperty,k=(e,t)=>ke(e,"name",{value:t,configurable:!0}),Ie=O[" useInsertionEffect ".trim().toString()]||z;function re({prop:e,defaultProp:t,onChange:n=k(()=>{},"onChange"),caller:o}){const[r,s,i]=oe({defaultProp:t,onChange:n}),u=e!==void 0,a=u?e:r,f=c.useCallback(p=>{if(u){const l=ce(p)?p(e):p;l!==e&&i.current?.(l)}else s(p)},[u,e,s,i]);return[a,f]}k(re,"useControllableState");function oe({defaultProp:e,onChange:t}){const[n,o]=c.useState(e),r=c.useRef(n),s=c.useRef(t);return Ie(()=>{s.current=t},[t]),c.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}k(oe,"useUncontrolledState");function ce(e){return typeof e=="function"}k(ce,"isFunction");var G=Symbol("RADIX:SYNC_STATE");function $e(e,t,n,o){const{prop:r,defaultProp:s,onChange:i,caller:u}=t,a=r!==void 0,f=ne(i),p=[{...n,state:s}];o&&p.push(o);const[l,m]=c.useReducer((b,C)=>{if(C.type===G)return{...b,state:C.state};const _=e(b,C);return a&&!Object.is(_.state,b.state)&&f(_.state),_},...p),d=l.state,h=c.useRef(d);c.useEffect(()=>{h.current!==d&&(h.current=d,a||f(d))},[d,h,a]);const S=c.useMemo(()=>r!==void 0?{...l,state:r}:l,[l,r]);return c.useEffect(()=>{a&&!Object.is(r,l.state)&&m({type:G,state:r})},[r,l.state,a]),[S,m]}k($e,"useControllableStateReducer");var je=Object.defineProperty,Oe=(e,t)=>je(e,"name",{value:t,configurable:!0});function se(e){const[t,n]=c.useState(void 0);return z(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let i,u;if("borderBoxSize"in s){const a=s.borderBoxSize,f=Array.isArray(a)?a[0]:a;i=f.inlineSize,u=f.blockSize}else i=e.offsetWidth,u=e.offsetHeight;n({width:i,height:u})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}Oe(se,"useSize");var Te=Object.defineProperty,E=(e,t)=>Te(e,"name",{value:t,configurable:!0});function ie(e){const t=c.forwardRef((n,o)=>{let{children:r,...s}=n,i=null,u=!1;const a=[];D(r)&&typeof j=="function"&&(r=j(r._payload)),c.Children.forEach(r,m=>{if(fe(m)){u=!0;const d=m;let h="child"in d.props?d.props.child:d.props.children;D(h)&&typeof j=="function"&&(h=j(h._payload)),i=Ae(d,h),a.push(i?.props?.children)}else a.push(m)}),i?i=c.cloneElement(i,void 0,a):!u&&c.Children.count(r)===1&&c.isValidElement(r)&&(i=r);const f=i?le(i):void 0,p=T(o,f);if(!i){if(r||r===0)throw new Error(u?Me(e):Be(e));return r}const l=ue(s,i.props??{});return i.type!==c.Fragment&&(l.ref=o?p:f),c.cloneElement(i,l)});return t.displayName=`${e}.Slot`,t}E(ie,"createSlot");var ae=Symbol.for("radix.slottable");function Ne(e){const t=E(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=ae,t}E(Ne,"createSlottable");var Ae=E((e,t)=>{if("child"in e.props){const n=e.props.child;return c.isValidElement(n)?c.cloneElement(n,void 0,e.props.children(n.props.children)):null}return c.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function ue(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...u)=>{const a=s(...u);return r(...u),a}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}E(ue,"mergeProps");function le(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)}E(le,"getElementRef");function fe(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ae}E(fe,"isSlottable");var De=Symbol.for("react.lazy");function D(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===De&&"_payload"in e&&de(e._payload)}E(D,"isLazyComponent");function de(e){return typeof e=="object"&&e!==null&&"then"in e}E(de,"isPromiseLike");var Be=E(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Me=E(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),j=O[" use ".trim().toString()],ze=Object.defineProperty,Fe=(e,t)=>ze(e,"name",{value:t,configurable:!0}),Le=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],F=Le.reduce((e,t)=>{const n=ie(`Primitive.${t}`),o=c.forwardRef((r,s)=>{const{asChild:i,...u}=r,a=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(a,{...u,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function He(e,t){e&&we.flushSync(()=>e.dispatchEvent(t))}Fe(He,"dispatchDiscreteCustomEvent");var Ue=Object.defineProperty,x=(e,t)=>Ue(e,"name",{value:t,configurable:!0}),L="Switch",[We,tt]=ee(L),[Ve,H]=We(L);function pe(e){const{__scopeSwitch:t,checked:n,children:o,defaultChecked:r,disabled:s,form:i,name:u,onCheckedChange:a,required:f,value:p="on",internal_do_not_use_render:l}=e,[m,d]=re({prop:n,defaultProp:r??!1,onChange:a,caller:L}),[h,S]=c.useState(null),[b,C]=c.useState(null),_=c.useRef(!1),[g,y]=c.useReducer(P=>P+1,0),I=h?!!i||!!h.closest("form"):!0,$={checked:m,setChecked:d,disabled:s,control:h,setControl:S,name:u,form:i,value:p,hasConsumerStoppedPropagationRef:_,userInteractionCount:g,onUserInteraction:y,required:f,defaultChecked:r,isFormControl:I,bubbleInput:b,setBubbleInput:C};return v.jsx(Ve,{scope:t,...$,children:me(l)?l($):o})}x(pe,"SwitchProvider");var qe="SwitchTrigger",Ye=c.forwardRef(x(function({__scopeSwitch:t,onClick:n,...o},r){const{control:s,form:i,value:u,disabled:a,checked:f,required:p,setControl:l,setChecked:m,hasConsumerStoppedPropagationRef:d,onUserInteraction:h,isFormControl:S,bubbleInput:b}=H(qe,t),C=T(r,l),_=c.useRef(f);return c.useEffect(()=>{const g=i?s?.ownerDocument.getElementById(i):s?.form;if(g instanceof HTMLFormElement){const y=x(()=>m(_.current),"reset");return g.addEventListener("reset",y),()=>g.removeEventListener("reset",y)}},[s,i,m]),v.jsx(F.button,{type:"button",role:"switch","aria-checked":f,"aria-required":p,"data-state":U(f),"data-disabled":a?"":void 0,disabled:a,value:u,...o,ref:C,onClick:B(n,g=>{h(),m(y=>!y),b&&S&&(d.current=g.isPropagationStopped(),d.current||g.stopPropagation())})})},"SwitchTrigger")),he=c.forwardRef(x(function(t,n){const{__scopeSwitch:o,name:r,checked:s,defaultChecked:i,required:u,disabled:a,value:f,onCheckedChange:p,form:l,...m}=t;return v.jsx(pe,{__scopeSwitch:o,checked:s,defaultChecked:i,disabled:a,required:u,onCheckedChange:p,name:r,form:l,value:f,internal_do_not_use_render:({isFormControl:d})=>v.jsxs(v.Fragment,{children:[v.jsx(Ye,{...m,ref:n,__scopeSwitch:o}),d&&v.jsx(Je,{__scopeSwitch:o})]})})},"Switch")),Xe="SwitchThumb",Ge=c.forwardRef(x(function(t,n){const{__scopeSwitch:o,...r}=t,s=H(Xe,o);return v.jsx(F.span,{"data-state":U(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:n})},"SwitchThumb")),Ze="SwitchBubbleInput",Je=c.forwardRef(x(function({__scopeSwitch:t,onClick:n,...o},r){const{control:s,hasConsumerStoppedPropagationRef:i,userInteractionCount:u,checked:a,defaultChecked:f,required:p,disabled:l,name:m,value:d,form:h,bubbleInput:S,setBubbleInput:b}=H(Ze,t),C=T(r,b),_=se(s),g=c.useRef(!1),y=c.useRef(a),I=c.useRef(u);c.useEffect(()=>{const P=S;if(!P)return;const be=window.HTMLInputElement.prototype,W=Object.getOwnPropertyDescriptor(be,"checked").set,V=u!==I.current;I.current=u;const ve=y.current!==a;y.current=a;const Se=!(V&&i.current);if(ve&&W){g.current=!V;const ge=new Event("click",{bubbles:Se});W.call(P,a),P.dispatchEvent(ge),g.current=!1}},[S,a,i,u]);const $=c.useRef(a);return v.jsx(F.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??$.current,required:p,disabled:l,name:m,value:d,form:h,...o,tabIndex:-1,ref:C,onClick:B(n,P=>{g.current&&P.stopPropagation()}),style:{...o.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function me(e){return typeof e=="function"}x(me,"isFunction");function U(e){return e?"checked":"unchecked"}x(U,"getState");const Ke=c.forwardRef(({className:e,...t},n)=>v.jsx(he,{ref:n,className:q("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-border transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-bg-elevated focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:v.jsx(Ge,{className:q("pointer-events-none block h-4 w-4 rounded-full bg-foreground shadow-lg transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0.5")})}));Ke.displayName=he.displayName;export{Ke as S};
|
|
2
|
+
//# sourceMappingURL=switch-7461qYip.js.map
|
package/extensions/dashboard-client/dist/assets/{switch-DEyGlFwJ.js.map → switch-7461qYip.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-DEyGlFwJ.js","sources":["../../node_modules/@radix-ui/primitive/dist/index.mjs","../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../node_modules/@radix-ui/react-context/dist/index.mjs","../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../../node_modules/@radix-ui/react-use-effect-event/dist/index.mjs","../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","../../node_modules/@radix-ui/react-use-size/dist/index.mjs","../../node_modules/@radix-ui/react-slot/dist/index.mjs","../../node_modules/@radix-ui/react-primitive/dist/index.mjs","../../node_modules/@radix-ui/react-switch/dist/index.mjs","../../src/components/ui/switch.tsx"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return /* @__PURE__ */ __name(function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n }, \"handleEvent\");\n}\n__name(composeEventHandlers, \"composeEventHandlers\");\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\n__name(getOwnerWindow, \"getOwnerWindow\");\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\n__name(getOwnerDocument, \"getOwnerDocument\");\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\n__name(getActiveElement, \"getActiveElement\");\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\n__name(isFrame, \"isFrame\");\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\n__name(setRef, \"setRef\");\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\n__name(composeRefs, \"composeRefs\");\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\n__name(useComposedRefs, \"useComposedRefs\");\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n Context.displayName = rootComponentName + \"Context\";\n const Provider = /* @__PURE__ */ __name((props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n }, \"Provider\");\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, options = {}) {\n const { optional = false } = options;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n if (optional) return void 0;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n __name(useContext2, \"useContext\");\n return [Provider, useContext2];\n}\n__name(createContext2, \"createContext\");\n// @__NO_SIDE_EFFECTS__\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n BaseContext.displayName = rootComponentName + \"Context\";\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = /* @__PURE__ */ __name((props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n }, \"Provider\");\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope, options = {}) {\n const { optional = false } = options;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n if (optional) return void 0;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n __name(useContext2, \"useContext\");\n return [Provider, useContext2];\n }\n __name(createContext3, \"createContext\");\n const createScope = /* @__PURE__ */ __name(() => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return /* @__PURE__ */ __name(function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n }, \"useScope\");\n }, \"createScope\");\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\n__name(createContextScope, \"createContextScope\");\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = /* @__PURE__ */ __name(() => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return /* @__PURE__ */ __name(function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n }, \"useComposedScopes\");\n }, \"createScope\");\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\n__name(composeContextScopes, \"composeContextScopes\");\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/use-effect-event.tsx\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport * as React from \"react\";\nvar useReactEffectEvent = React[\" useEffectEvent \".trim().toString()];\nvar useReactInsertionEffect = React[\" useInsertionEffect \".trim().toString()];\nfunction useEffectEvent(callback) {\n if (typeof useReactEffectEvent === \"function\") {\n return useReactEffectEvent(callback);\n }\n const ref = React.useRef(() => {\n throw new Error(\"Cannot call an event handler while rendering.\");\n });\n if (typeof useReactInsertionEffect === \"function\") {\n useReactInsertionEffect(() => {\n ref.current = callback;\n });\n } else {\n useLayoutEffect(() => {\n ref.current = callback;\n });\n }\n return React.useMemo(() => ((...args) => ref.current?.(...args)), []);\n}\n__name(useEffectEvent, \"useEffectEvent\");\nexport {\n useEffectEvent\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { IS_DEVELOPMENT } from \"@radix-ui/primitive/is-development\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = /* @__PURE__ */ __name(() => {\n }, \"onChange\"),\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (IS_DEVELOPMENT) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. 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.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\n__name(useControllableState, \"useControllableState\");\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\n__name(useUncontrolledState, \"useUncontrolledState\");\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n__name(isFunction, \"isFunction\");\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { IS_DEVELOPMENT as IS_DEVELOPMENT2 } from \"@radix-ui/primitive/is-development\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (IS_DEVELOPMENT2) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. 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.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\n__name(useControllableStateReducer, \"useControllableStateReducer\");\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/use-size.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\n__name(useSize, \"useSize\");\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/slot.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n let slottableElement = null;\n let hasSlottable = false;\n const newChildren = [];\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n React.Children.forEach(children, (maybeSlottable) => {\n if (isSlottable(maybeSlottable)) {\n hasSlottable = true;\n const slottable = maybeSlottable;\n let child = \"child\" in slottable.props ? slottable.props.child : slottable.props.children;\n if (isLazyComponent(child) && typeof use === \"function\") {\n child = use(child._payload);\n }\n slottableElement = getSlottableElementFromSlottable(slottable, child);\n newChildren.push(slottableElement?.props?.children);\n } else {\n newChildren.push(maybeSlottable);\n }\n });\n if (slottableElement) {\n slottableElement = React.cloneElement(slottableElement, void 0, newChildren);\n } else if (\n // A `Slottable` was found but it didn't resolve to a single element (e.g.\n // it wrapped multiple elements, text, or a render-prop `child` that\n // wasn't an element). Don't fall back to treating the `Slottable` wrapper\n // itself as the slot target — throw a descriptive error below instead.\n !hasSlottable && React.Children.count(children) === 1 && React.isValidElement(children)\n ) {\n slottableElement = children;\n }\n const slottableElementRef = slottableElement ? getElementRef(slottableElement) : void 0;\n const composedRef = useComposedRefs(forwardedRef, slottableElementRef);\n if (!slottableElement) {\n if (children || children === 0) {\n throw new Error(\n hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName)\n );\n }\n return children;\n }\n const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});\n if (slottableElement.type !== React.Fragment) {\n mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;\n }\n return React.cloneElement(slottableElement, mergedProps);\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\n__name(createSlot, \"createSlot\");\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\nvar SLOTTABLE_IDENTIFIER = Symbol.for(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = /* @__PURE__ */ __name((props) => \"child\" in props ? props.children(props.child) : props.children, \"Slottable\");\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\n__name(createSlottable, \"createSlottable\");\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nvar getSlottableElementFromSlottable = /* @__PURE__ */ __name((slottable, child) => {\n if (\"child\" in slottable.props) {\n const child2 = slottable.props.child;\n if (!React.isValidElement(child2)) return null;\n return React.cloneElement(child2, void 0, slottable.props.children(child2.props.children));\n }\n return React.isValidElement(child) ? child : null;\n}, \"getSlottableElementFromSlottable\");\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\n__name(mergeProps, \"mergeProps\");\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\n__name(getElementRef, \"getElementRef\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\n__name(isSlottable, \"isSlottable\");\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\n__name(isLazyComponent, \"isLazyComponent\");\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\n__name(isPromiseLike, \"isPromiseLike\");\nvar createSlotError = /* @__PURE__ */ __name((ownerName) => {\n return `${ownerName} failed to slot onto its children. Expected a single React element child or \\`Slottable\\`.`;\n}, \"createSlotError\");\nvar createSlottableError = /* @__PURE__ */ __name((ownerName) => {\n return `${ownerName} failed to slot onto its \\`Slottable\\`. Expected \\`Slottable\\` to receive a single React element child.`;\n}, \"createSlottableError\");\nvar use = React[\" use \".trim().toString()];\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n__name(dispatchDiscreteCustomEvent, \"dispatchDiscreteCustomEvent\");\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/switch.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar SWITCH_NAME = \"Switch\";\nvar [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);\nvar [SwitchProviderImpl, useSwitchContext] = createSwitchContext(SWITCH_NAME);\nfunction SwitchProvider(props) {\n const {\n __scopeSwitch,\n checked: checkedProp,\n children,\n defaultChecked,\n disabled,\n form,\n name,\n onCheckedChange,\n required,\n value = \"on\",\n // @ts-expect-error\n internal_do_not_use_render\n } = props;\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: SWITCH_NAME\n });\n const [control, setControl] = React.useState(null);\n const [bubbleInput, setBubbleInput] = React.useState(null);\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const [userInteractionCount, onUserInteraction] = React.useReducer(\n (count) => count + 1,\n 0\n );\n const isFormControl = control ? !!form || !!control.closest(\"form\") : (\n // We set this to true by default so that events bubble to forms without JS (SSR)\n true\n );\n const context = {\n checked,\n setChecked,\n disabled,\n control,\n setControl,\n name,\n form,\n value,\n hasConsumerStoppedPropagationRef,\n userInteractionCount,\n onUserInteraction,\n required,\n defaultChecked,\n isFormControl,\n bubbleInput,\n setBubbleInput\n };\n return /* @__PURE__ */ jsx(SwitchProviderImpl, { scope: __scopeSwitch, ...context, children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children });\n}\n__name(SwitchProvider, \"SwitchProvider\");\nvar TRIGGER_NAME = \"SwitchTrigger\";\nvar SwitchTrigger = /* @__PURE__ */ React.forwardRef(\n /* @__PURE__ */ __name(function SwitchTrigger2({ __scopeSwitch, onClick, ...switchProps }, forwardedRef) {\n const {\n control,\n form,\n value,\n disabled,\n checked,\n required,\n setControl,\n setChecked,\n hasConsumerStoppedPropagationRef,\n onUserInteraction,\n isFormControl,\n bubbleInput\n } = useSwitchContext(TRIGGER_NAME, __scopeSwitch);\n const composedRefs = useComposedRefs(forwardedRef, setControl);\n const initialCheckedStateRef = React.useRef(checked);\n React.useEffect(() => {\n const associatedForm = form ? control?.ownerDocument.getElementById(form) : control?.form;\n if (associatedForm instanceof HTMLFormElement) {\n const reset = /* @__PURE__ */ __name(() => setChecked(initialCheckedStateRef.current), \"reset\");\n associatedForm.addEventListener(\"reset\", reset);\n return () => associatedForm.removeEventListener(\"reset\", reset);\n }\n }, [control, form, setChecked]);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"switch\",\n \"aria-checked\": checked,\n \"aria-required\": required,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...switchProps,\n ref: composedRefs,\n onClick: composeEventHandlers(onClick, (event) => {\n onUserInteraction();\n setChecked((prevChecked) => !prevChecked);\n if (bubbleInput && isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n );\n }, \"SwitchTrigger\")\n);\nvar Switch = /* @__PURE__ */ React.forwardRef(\n // blank line to reduce diff noise\n /* @__PURE__ */ __name(function Switch2(props, forwardedRef) {\n const {\n __scopeSwitch,\n name,\n checked,\n defaultChecked,\n required,\n disabled,\n value,\n onCheckedChange,\n form,\n ...switchProps\n } = props;\n return /* @__PURE__ */ jsx(\n SwitchProvider,\n {\n __scopeSwitch,\n checked,\n defaultChecked,\n disabled,\n required,\n onCheckedChange,\n name,\n form,\n value,\n internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n SwitchTrigger,\n {\n ...switchProps,\n ref: forwardedRef,\n __scopeSwitch\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n SwitchBubbleInput,\n {\n __scopeSwitch\n }\n )\n ] })\n }\n );\n }, \"Switch\")\n);\nvar THUMB_NAME = \"SwitchThumb\";\nvar SwitchThumb = /* @__PURE__ */ React.forwardRef(\n /* @__PURE__ */ __name(function SwitchThumb2(props, forwardedRef) {\n const { __scopeSwitch, ...thumbProps } = props;\n const context = useSwitchContext(THUMB_NAME, __scopeSwitch);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...thumbProps,\n ref: forwardedRef\n }\n );\n }, \"SwitchThumb\")\n);\nvar BUBBLE_INPUT_NAME = \"SwitchBubbleInput\";\nvar SwitchBubbleInput = /* @__PURE__ */ React.forwardRef(\n // blank line to reduce diff noise\n /* @__PURE__ */ __name(function SwitchBubbleInput2({ __scopeSwitch, onClick, ...props }, forwardedRef) {\n const {\n control,\n hasConsumerStoppedPropagationRef,\n userInteractionCount,\n checked,\n defaultChecked,\n required,\n disabled,\n name,\n value,\n form,\n bubbleInput,\n setBubbleInput\n } = useSwitchContext(BUBBLE_INPUT_NAME, __scopeSwitch);\n const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);\n const controlSize = useSize(control);\n const shouldStopClickPropagationRef = React.useRef(false);\n const prevCheckedRef = React.useRef(checked);\n const prevUserInteractionCountRef = React.useRef(userInteractionCount);\n React.useEffect(() => {\n const input = bubbleInput;\n if (!input) return;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n \"checked\"\n );\n const setChecked = descriptor.set;\n const isUserInteraction = userInteractionCount !== prevUserInteractionCountRef.current;\n prevUserInteractionCountRef.current = userInteractionCount;\n const checkedChanged = prevCheckedRef.current !== checked;\n prevCheckedRef.current = checked;\n const bubbles = !(isUserInteraction && hasConsumerStoppedPropagationRef.current);\n if (checkedChanged && setChecked) {\n shouldStopClickPropagationRef.current = !isUserInteraction;\n const event = new Event(\"click\", { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n shouldStopClickPropagationRef.current = false;\n }\n }, [bubbleInput, checked, hasConsumerStoppedPropagationRef, userInteractionCount]);\n const defaultCheckedRef = React.useRef(checked);\n return /* @__PURE__ */ jsx(\n Primitive.input,\n {\n type: \"checkbox\",\n \"aria-hidden\": true,\n defaultChecked: defaultChecked ?? defaultCheckedRef.current,\n required,\n disabled,\n name,\n value,\n form,\n ...props,\n tabIndex: -1,\n ref: composedRefs,\n onClick: composeEventHandlers(onClick, (event) => {\n if (shouldStopClickPropagationRef.current) {\n event.stopPropagation();\n }\n }),\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0,\n // We transform because the input is absolutely positioned but we have\n // rendered it **after** the button. This pulls it back to sit on top\n // of the button.\n transform: \"translateX(-100%)\"\n }\n }\n );\n }, \"SwitchBubbleInput\")\n);\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n__name(isFunction, \"isFunction\");\nfunction getState(checked) {\n return checked ? \"checked\" : \"unchecked\";\n}\n__name(getState, \"getState\");\nexport {\n Switch as Root,\n Switch,\n SwitchThumb,\n SwitchThumb as Thumb,\n createSwitchScope,\n SwitchBubbleInput as unstable_BubbleInput,\n SwitchProvider as unstable_Provider,\n SwitchBubbleInput as unstable_SwitchBubbleInput,\n SwitchProvider as unstable_SwitchProvider,\n SwitchTrigger as unstable_SwitchTrigger,\n SwitchTrigger as unstable_Trigger\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\";\nimport { cn } from \"../../utils/cn\";\n\nconst Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>\n>(({ className, ...props }, ref) => (\n <SwitchPrimitives.Root\n ref={ref}\n className={cn(\n \"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-border transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-bg-elevated focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block h-4 w-4 rounded-full bg-foreground shadow-lg transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0.5\",\n )}\n />\n </SwitchPrimitives.Root>\n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n"],"names":["__defProp","__name","target","value","canUseDOM","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","getOwnerWindow","element","getOwnerDocument","getActiveElement","node","activeDescendant","activeElement","isFrame","id","setRef","ref","composeRefs","refs","hasCleanup","cleanups","cleanup","i","useComposedRefs","React.useCallback","createContext2","rootComponentName","defaultContext","Context","React.createContext","Provider","props","children","context","React.useMemo","jsx","useContext2","consumerName","options","optional","React.useContext","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","BaseContext","index","scope","createScope","scopeContexts","contexts","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","overrideScopes","nextScopes","nextScopes2","useScope","currentScope","useLayoutEffect2","React.useLayoutEffect","useReactEffectEvent","React","useReactInsertionEffect","useEffectEvent","callback","React.useRef","useLayoutEffect","args","useInsertionEffect","useControllableState","prop","defaultProp","onChange","caller","uncontrolledProp","setUncontrolledProp","onChangeRef","useUncontrolledState","isControlled","setValue","nextValue","value2","isFunction","React.useState","prevValueRef","React.useEffect","SYNC_STATE","useControllableStateReducer","reducer","userArgs","initialArg","init","controlledState","onChangeProp","internalState","dispatch","React2.useReducer","state2","action","next","uncontrolledState","React2.useRef","React2.useEffect","state","React2.useMemo","useSize","size","setSize","resizeObserver","entries","entry","width","height","borderSizeEntry","borderSize","createSlot","ownerName","Slot2","React.forwardRef","forwardedRef","slotProps","slottableElement","hasSlottable","newChildren","isLazyComponent","use","React.Children","maybeSlottable","isSlottable","slottable","child","getSlottableElementFromSlottable","React.cloneElement","React.isValidElement","slottableElementRef","getElementRef","composedRef","createSlottableError","createSlotError","mergedProps","mergeProps","React.Fragment","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","child2","childProps","overrideProps","propName","slotPropValue","childPropValue","result","getter","mayWarn","REACT_LAZY_TYPE","isPromiseLike","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","dispatchDiscreteCustomEvent","ReactDOM.flushSync","SWITCH_NAME","createSwitchContext","createSwitchScope","SwitchProviderImpl","useSwitchContext","SwitchProvider","__scopeSwitch","checkedProp","defaultChecked","disabled","form","name","onCheckedChange","required","internal_do_not_use_render","checked","setChecked","control","setControl","bubbleInput","setBubbleInput","hasConsumerStoppedPropagationRef","userInteractionCount","onUserInteraction","React.useReducer","count","isFormControl","TRIGGER_NAME","SwitchTrigger","onClick","switchProps","composedRefs","initialCheckedStateRef","associatedForm","reset","getState","prevChecked","Switch","jsxs","Fragment","SwitchBubbleInput","THUMB_NAME","SwitchThumb","thumbProps","BUBBLE_INPUT_NAME","controlSize","shouldStopClickPropagationRef","prevCheckedRef","prevUserInteractionCountRef","input","inputProto","isUserInteraction","checkedChanged","bubbles","defaultCheckedRef","className","SwitchPrimitives.Root","cn","SwitchPrimitives.Thumb"],"mappings":"qEAAA,IAAIA,GAAY,OAAO,eACnBC,EAAS,CAACC,EAAQC,IAAUH,GAAUE,EAAQ,OAAQ,CAAE,MAAAC,EAAO,aAAc,GAAM,EAGnFC,EAAY,CAAC,EAAE,OAAO,OAAW,KAAe,OAAO,UAAY,OAAO,SAAS,eACvF,SAASC,EAAqBC,EAAsBC,EAAiB,CAAE,yBAAAC,EAA2B,EAAI,EAAK,GAAI,CAC7G,OAAuBP,EAAO,SAAqBQ,EAAO,CAExD,GADAH,IAAuBG,CAAK,EACxBD,IAA6B,IAAS,CAACC,GAAS,CAACA,EAAM,iBACzD,OAAOF,IAAkBE,CAAK,CAElC,EAAG,aAAa,CAClB,CACAR,EAAOI,EAAsB,sBAAsB,EACnD,SAASK,GAAeC,EAAS,CAC/B,GAAI,CAACP,EACH,MAAM,IAAI,MAAM,yCAAyC,EAE3D,OAAOO,GAAS,eAAe,aAAe,MAChD,CACAV,EAAOS,GAAgB,gBAAgB,EACvC,SAASE,EAAiBD,EAAS,CACjC,GAAI,CAACP,EACH,MAAM,IAAI,MAAM,2CAA2C,EAE7D,OAAOO,GAAS,eAAiB,QACnC,CACAV,EAAOW,EAAkB,kBAAkB,EAC3C,SAASC,EAAiBC,EAAMC,EAAmB,GAAO,CACxD,KAAM,CAAE,cAAAC,CAAa,EAAKJ,EAAiBE,CAAI,EAC/C,GAAI,CAACE,GAAe,SAClB,OAAO,K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F,CAAA,EAED,GAAGlM,EAEJ,SAAAI,EAAAA,IAACiM,GAAA,CACC,UAAWD,EACT,uKAAA,CACF,CAAA,CACF,CACF,CACD,EACDpB,GAAO,YAAcmB,GAAsB","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
|
|
1
|
+
{"version":3,"file":"switch-7461qYip.js","sources":["../../node_modules/@radix-ui/primitive/dist/index.mjs","../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../node_modules/@radix-ui/react-context/dist/index.mjs","../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../../node_modules/@radix-ui/react-use-effect-event/dist/index.mjs","../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","../../node_modules/@radix-ui/react-use-size/dist/index.mjs","../../node_modules/@radix-ui/react-slot/dist/index.mjs","../../node_modules/@radix-ui/react-primitive/dist/index.mjs","../../node_modules/@radix-ui/react-switch/dist/index.mjs","../../src/components/ui/switch.tsx"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return /* @__PURE__ */ __name(function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n }, \"handleEvent\");\n}\n__name(composeEventHandlers, \"composeEventHandlers\");\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\n__name(getOwnerWindow, \"getOwnerWindow\");\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\n__name(getOwnerDocument, \"getOwnerDocument\");\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\n__name(getActiveElement, \"getActiveElement\");\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\n__name(isFrame, \"isFrame\");\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\n__name(setRef, \"setRef\");\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\n__name(composeRefs, \"composeRefs\");\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\n__name(useComposedRefs, \"useComposedRefs\");\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n Context.displayName = rootComponentName + \"Context\";\n const Provider = /* @__PURE__ */ __name((props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n }, \"Provider\");\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, options = {}) {\n const { optional = false } = options;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n if (optional) return void 0;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n __name(useContext2, \"useContext\");\n return [Provider, useContext2];\n}\n__name(createContext2, \"createContext\");\n// @__NO_SIDE_EFFECTS__\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n BaseContext.displayName = rootComponentName + \"Context\";\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = /* @__PURE__ */ __name((props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n }, \"Provider\");\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope, options = {}) {\n const { optional = false } = options;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n if (optional) return void 0;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n __name(useContext2, \"useContext\");\n return [Provider, useContext2];\n }\n __name(createContext3, \"createContext\");\n const createScope = /* @__PURE__ */ __name(() => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return /* @__PURE__ */ __name(function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n }, \"useScope\");\n }, \"createScope\");\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\n__name(createContextScope, \"createContextScope\");\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = /* @__PURE__ */ __name(() => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return /* @__PURE__ */ __name(function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n }, \"useComposedScopes\");\n }, \"createScope\");\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\n__name(composeContextScopes, \"composeContextScopes\");\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/use-effect-event.tsx\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport * as React from \"react\";\nvar useReactEffectEvent = React[\" useEffectEvent \".trim().toString()];\nvar useReactInsertionEffect = React[\" useInsertionEffect \".trim().toString()];\nfunction useEffectEvent(callback) {\n if (typeof useReactEffectEvent === \"function\") {\n return useReactEffectEvent(callback);\n }\n const ref = React.useRef(() => {\n throw new Error(\"Cannot call an event handler while rendering.\");\n });\n if (typeof useReactInsertionEffect === \"function\") {\n useReactInsertionEffect(() => {\n ref.current = callback;\n });\n } else {\n useLayoutEffect(() => {\n ref.current = callback;\n });\n }\n return React.useMemo(() => ((...args) => ref.current?.(...args)), []);\n}\n__name(useEffectEvent, \"useEffectEvent\");\nexport {\n useEffectEvent\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { IS_DEVELOPMENT } from \"@radix-ui/primitive/is-development\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = /* @__PURE__ */ __name(() => {\n }, \"onChange\"),\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (IS_DEVELOPMENT) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. 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.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\n__name(useControllableState, \"useControllableState\");\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\n__name(useUncontrolledState, \"useUncontrolledState\");\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n__name(isFunction, \"isFunction\");\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { IS_DEVELOPMENT as IS_DEVELOPMENT2 } from \"@radix-ui/primitive/is-development\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (IS_DEVELOPMENT2) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. 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.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\n__name(useControllableStateReducer, \"useControllableStateReducer\");\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/use-size.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\n__name(useSize, \"useSize\");\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/slot.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n let slottableElement = null;\n let hasSlottable = false;\n const newChildren = [];\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n React.Children.forEach(children, (maybeSlottable) => {\n if (isSlottable(maybeSlottable)) {\n hasSlottable = true;\n const slottable = maybeSlottable;\n let child = \"child\" in slottable.props ? slottable.props.child : slottable.props.children;\n if (isLazyComponent(child) && typeof use === \"function\") {\n child = use(child._payload);\n }\n slottableElement = getSlottableElementFromSlottable(slottable, child);\n newChildren.push(slottableElement?.props?.children);\n } else {\n newChildren.push(maybeSlottable);\n }\n });\n if (slottableElement) {\n slottableElement = React.cloneElement(slottableElement, void 0, newChildren);\n } else if (\n // A `Slottable` was found but it didn't resolve to a single element (e.g.\n // it wrapped multiple elements, text, or a render-prop `child` that\n // wasn't an element). Don't fall back to treating the `Slottable` wrapper\n // itself as the slot target — throw a descriptive error below instead.\n !hasSlottable && React.Children.count(children) === 1 && React.isValidElement(children)\n ) {\n slottableElement = children;\n }\n const slottableElementRef = slottableElement ? getElementRef(slottableElement) : void 0;\n const composedRef = useComposedRefs(forwardedRef, slottableElementRef);\n if (!slottableElement) {\n if (children || children === 0) {\n throw new Error(\n hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName)\n );\n }\n return children;\n }\n const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});\n if (slottableElement.type !== React.Fragment) {\n mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;\n }\n return React.cloneElement(slottableElement, mergedProps);\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\n__name(createSlot, \"createSlot\");\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\nvar SLOTTABLE_IDENTIFIER = Symbol.for(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = /* @__PURE__ */ __name((props) => \"child\" in props ? props.children(props.child) : props.children, \"Slottable\");\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\n__name(createSlottable, \"createSlottable\");\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nvar getSlottableElementFromSlottable = /* @__PURE__ */ __name((slottable, child) => {\n if (\"child\" in slottable.props) {\n const child2 = slottable.props.child;\n if (!React.isValidElement(child2)) return null;\n return React.cloneElement(child2, void 0, slottable.props.children(child2.props.children));\n }\n return React.isValidElement(child) ? child : null;\n}, \"getSlottableElementFromSlottable\");\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\n__name(mergeProps, \"mergeProps\");\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\n__name(getElementRef, \"getElementRef\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\n__name(isSlottable, \"isSlottable\");\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\n__name(isLazyComponent, \"isLazyComponent\");\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\n__name(isPromiseLike, \"isPromiseLike\");\nvar createSlotError = /* @__PURE__ */ __name((ownerName) => {\n return `${ownerName} failed to slot onto its children. Expected a single React element child or \\`Slottable\\`.`;\n}, \"createSlotError\");\nvar createSlottableError = /* @__PURE__ */ __name((ownerName) => {\n return `${ownerName} failed to slot onto its \\`Slottable\\`. Expected \\`Slottable\\` to receive a single React element child.`;\n}, \"createSlottableError\");\nvar use = React[\" use \".trim().toString()];\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n__name(dispatchDiscreteCustomEvent, \"dispatchDiscreteCustomEvent\");\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/switch.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar SWITCH_NAME = \"Switch\";\nvar [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);\nvar [SwitchProviderImpl, useSwitchContext] = createSwitchContext(SWITCH_NAME);\nfunction SwitchProvider(props) {\n const {\n __scopeSwitch,\n checked: checkedProp,\n children,\n defaultChecked,\n disabled,\n form,\n name,\n onCheckedChange,\n required,\n value = \"on\",\n // @ts-expect-error\n internal_do_not_use_render\n } = props;\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: SWITCH_NAME\n });\n const [control, setControl] = React.useState(null);\n const [bubbleInput, setBubbleInput] = React.useState(null);\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const [userInteractionCount, onUserInteraction] = React.useReducer(\n (count) => count + 1,\n 0\n );\n const isFormControl = control ? !!form || !!control.closest(\"form\") : (\n // We set this to true by default so that events bubble to forms without JS (SSR)\n true\n );\n const context = {\n checked,\n setChecked,\n disabled,\n control,\n setControl,\n name,\n form,\n value,\n hasConsumerStoppedPropagationRef,\n userInteractionCount,\n onUserInteraction,\n required,\n defaultChecked,\n isFormControl,\n bubbleInput,\n setBubbleInput\n };\n return /* @__PURE__ */ jsx(SwitchProviderImpl, { scope: __scopeSwitch, ...context, children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children });\n}\n__name(SwitchProvider, \"SwitchProvider\");\nvar TRIGGER_NAME = \"SwitchTrigger\";\nvar SwitchTrigger = /* @__PURE__ */ React.forwardRef(\n /* @__PURE__ */ __name(function SwitchTrigger2({ __scopeSwitch, onClick, ...switchProps }, forwardedRef) {\n const {\n control,\n form,\n value,\n disabled,\n checked,\n required,\n setControl,\n setChecked,\n hasConsumerStoppedPropagationRef,\n onUserInteraction,\n isFormControl,\n bubbleInput\n } = useSwitchContext(TRIGGER_NAME, __scopeSwitch);\n const composedRefs = useComposedRefs(forwardedRef, setControl);\n const initialCheckedStateRef = React.useRef(checked);\n React.useEffect(() => {\n const associatedForm = form ? control?.ownerDocument.getElementById(form) : control?.form;\n if (associatedForm instanceof HTMLFormElement) {\n const reset = /* @__PURE__ */ __name(() => setChecked(initialCheckedStateRef.current), \"reset\");\n associatedForm.addEventListener(\"reset\", reset);\n return () => associatedForm.removeEventListener(\"reset\", reset);\n }\n }, [control, form, setChecked]);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"switch\",\n \"aria-checked\": checked,\n \"aria-required\": required,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...switchProps,\n ref: composedRefs,\n onClick: composeEventHandlers(onClick, (event) => {\n onUserInteraction();\n setChecked((prevChecked) => !prevChecked);\n if (bubbleInput && isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n );\n }, \"SwitchTrigger\")\n);\nvar Switch = /* @__PURE__ */ React.forwardRef(\n // blank line to reduce diff noise\n /* @__PURE__ */ __name(function Switch2(props, forwardedRef) {\n const {\n __scopeSwitch,\n name,\n checked,\n defaultChecked,\n required,\n disabled,\n value,\n onCheckedChange,\n form,\n ...switchProps\n } = props;\n return /* @__PURE__ */ jsx(\n SwitchProvider,\n {\n __scopeSwitch,\n checked,\n defaultChecked,\n disabled,\n required,\n onCheckedChange,\n name,\n form,\n value,\n internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n SwitchTrigger,\n {\n ...switchProps,\n ref: forwardedRef,\n __scopeSwitch\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n SwitchBubbleInput,\n {\n __scopeSwitch\n }\n )\n ] })\n }\n );\n }, \"Switch\")\n);\nvar THUMB_NAME = \"SwitchThumb\";\nvar SwitchThumb = /* @__PURE__ */ React.forwardRef(\n /* @__PURE__ */ __name(function SwitchThumb2(props, forwardedRef) {\n const { __scopeSwitch, ...thumbProps } = props;\n const context = useSwitchContext(THUMB_NAME, __scopeSwitch);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...thumbProps,\n ref: forwardedRef\n }\n );\n }, \"SwitchThumb\")\n);\nvar BUBBLE_INPUT_NAME = \"SwitchBubbleInput\";\nvar SwitchBubbleInput = /* @__PURE__ */ React.forwardRef(\n // blank line to reduce diff noise\n /* @__PURE__ */ __name(function SwitchBubbleInput2({ __scopeSwitch, onClick, ...props }, forwardedRef) {\n const {\n control,\n hasConsumerStoppedPropagationRef,\n userInteractionCount,\n checked,\n defaultChecked,\n required,\n disabled,\n name,\n value,\n form,\n bubbleInput,\n setBubbleInput\n } = useSwitchContext(BUBBLE_INPUT_NAME, __scopeSwitch);\n const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);\n const controlSize = useSize(control);\n const shouldStopClickPropagationRef = React.useRef(false);\n const prevCheckedRef = React.useRef(checked);\n const prevUserInteractionCountRef = React.useRef(userInteractionCount);\n React.useEffect(() => {\n const input = bubbleInput;\n if (!input) return;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n \"checked\"\n );\n const setChecked = descriptor.set;\n const isUserInteraction = userInteractionCount !== prevUserInteractionCountRef.current;\n prevUserInteractionCountRef.current = userInteractionCount;\n const checkedChanged = prevCheckedRef.current !== checked;\n prevCheckedRef.current = checked;\n const bubbles = !(isUserInteraction && hasConsumerStoppedPropagationRef.current);\n if (checkedChanged && setChecked) {\n shouldStopClickPropagationRef.current = !isUserInteraction;\n const event = new Event(\"click\", { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n shouldStopClickPropagationRef.current = false;\n }\n }, [bubbleInput, checked, hasConsumerStoppedPropagationRef, userInteractionCount]);\n const defaultCheckedRef = React.useRef(checked);\n return /* @__PURE__ */ jsx(\n Primitive.input,\n {\n type: \"checkbox\",\n \"aria-hidden\": true,\n defaultChecked: defaultChecked ?? defaultCheckedRef.current,\n required,\n disabled,\n name,\n value,\n form,\n ...props,\n tabIndex: -1,\n ref: composedRefs,\n onClick: composeEventHandlers(onClick, (event) => {\n if (shouldStopClickPropagationRef.current) {\n event.stopPropagation();\n }\n }),\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0,\n // We transform because the input is absolutely positioned but we have\n // rendered it **after** the button. This pulls it back to sit on top\n // of the button.\n transform: \"translateX(-100%)\"\n }\n }\n );\n }, \"SwitchBubbleInput\")\n);\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n__name(isFunction, \"isFunction\");\nfunction getState(checked) {\n return checked ? \"checked\" : \"unchecked\";\n}\n__name(getState, \"getState\");\nexport {\n Switch as Root,\n Switch,\n SwitchThumb,\n SwitchThumb as Thumb,\n createSwitchScope,\n SwitchBubbleInput as unstable_BubbleInput,\n SwitchProvider as unstable_Provider,\n SwitchBubbleInput as unstable_SwitchBubbleInput,\n SwitchProvider as unstable_SwitchProvider,\n SwitchTrigger as unstable_SwitchTrigger,\n SwitchTrigger as unstable_Trigger\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\";\nimport { cn } from \"../../utils/cn\";\n\nconst Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>\n>(({ className, ...props }, ref) => (\n <SwitchPrimitives.Root\n ref={ref}\n className={cn(\n \"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-border transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-bg-elevated focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block h-4 w-4 rounded-full bg-foreground shadow-lg transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0.5\",\n )}\n />\n </SwitchPrimitives.Root>\n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n"],"names":["__defProp","__name","target","value","canUseDOM","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","getOwnerWindow","element","getOwnerDocument","getActiveElement","node","activeDescendant","activeElement","isFrame","id","setRef","ref","composeRefs","refs","hasCleanup","cleanups","cleanup","i","useComposedRefs","React.useCallback","createContext2","rootComponentName","defaultContext","Context","React.createContext","Provider","props","children","context","React.useMemo","jsx","useContext2","consumerName","options","optional","React.useContext","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","BaseContext","index","scope","createScope","scopeContexts","contexts","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","overrideScopes","nextScopes","nextScopes2","useScope","currentScope","useLayoutEffect2","React.useLayoutEffect","useReactEffectEvent","React","useReactInsertionEffect","useEffectEvent","callback","React.useRef","useLayoutEffect","args","useInsertionEffect","useControllableState","prop","defaultProp","onChange","caller","uncontrolledProp","setUncontrolledProp","onChangeRef","useUncontrolledState","isControlled","setValue","nextValue","value2","isFunction","React.useState","prevValueRef","React.useEffect","SYNC_STATE","useControllableStateReducer","reducer","userArgs","initialArg","init","controlledState","onChangeProp","internalState","dispatch","React2.useReducer","state2","action","next","uncontrolledState","React2.useRef","React2.useEffect","state","React2.useMemo","useSize","size","setSize","resizeObserver","entries","entry","width","height","borderSizeEntry","borderSize","createSlot","ownerName","Slot2","React.forwardRef","forwardedRef","slotProps","slottableElement","hasSlottable","newChildren","isLazyComponent","use","React.Children","maybeSlottable","isSlottable","slottable","child","getSlottableElementFromSlottable","React.cloneElement","React.isValidElement","slottableElementRef","getElementRef","composedRef","createSlottableError","createSlotError","mergedProps","mergeProps","React.Fragment","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","child2","childProps","overrideProps","propName","slotPropValue","childPropValue","result","getter","mayWarn","REACT_LAZY_TYPE","isPromiseLike","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","dispatchDiscreteCustomEvent","ReactDOM.flushSync","SWITCH_NAME","createSwitchContext","createSwitchScope","SwitchProviderImpl","useSwitchContext","SwitchProvider","__scopeSwitch","checkedProp","defaultChecked","disabled","form","name","onCheckedChange","required","internal_do_not_use_render","checked","setChecked","control","setControl","bubbleInput","setBubbleInput","hasConsumerStoppedPropagationRef","userInteractionCount","onUserInteraction","React.useReducer","count","isFormControl","TRIGGER_NAME","SwitchTrigger","onClick","switchProps","composedRefs","initialCheckedStateRef","associatedForm","reset","getState","prevChecked","Switch","jsxs","Fragment","SwitchBubbleInput","THUMB_NAME","SwitchThumb","thumbProps","BUBBLE_INPUT_NAME","controlSize","shouldStopClickPropagationRef","prevCheckedRef","prevUserInteractionCountRef","input","inputProto","isUserInteraction","chec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,KAAKiC,EAAOlC,CAAO,EAC9BkC,EAAM,cAActN,EAAK,EACzBmN,EAA8B,QAAU,EAC1C,CACF,EAAG,CAAC3B,EAAaJ,EAASM,EAAkCC,CAAoB,CAAC,EACjF,MAAMgC,EAAoB3J,EAAAA,OAAaoH,CAAO,EAC9C,OAAuBtJ,EAAAA,IACrB8H,EAAU,MACV,CACE,KAAM,WACN,cAAe,GACf,eAAgBiB,GAAkB8C,EAAkB,QACpD,SAAAzC,EACA,SAAAJ,EACA,KAAAE,EACA,MAAAtL,EACA,KAAAqL,EACA,GAAGrJ,EACH,SAAU,GACV,IAAK0K,EACL,QAASxM,EAAqBsM,EAAUlM,GAAU,CAC5CmN,EAA8B,SAChCnN,EAAM,gBAAe,CAEzB,CAAC,EACD,MAAO,CACL,GAAG0B,EAAM,MACT,GAAGwL,EACH,SAAU,WACV,cAAe,OACf,QAAS,EACT,OAAQ,EAIR,UAAW,mBACrB,CACA,CACA,CACE,EAAG,mBAAmB,CACxB,EACA,SAASjI,GAAWvF,EAAO,CACzB,OAAO,OAAOA,GAAU,UAC1B,CACAF,EAAOyF,GAAY,YAAY,EAC/B,SAASuH,EAASpB,EAAS,CACzB,OAAOA,EAAU,UAAY,WAC/B,CACA5L,EAAOgN,EAAU,UAAU,EC5Q3B,MAAME,GAASrF,EAAAA,WAGb,CAAC,CAAE,UAAAuG,EAAW,GAAGlM,CAAA,EAASf,IAC1BmB,EAAAA,IAAC+L,GAAA,CACC,IAAAlN,EACA,UAAWmN,EACT,wTACAF,CAAA,EAED,GAAGlM,EAEJ,SAAAI,EAAAA,IAACiM,GAAA,CACC,UAAWD,EACT,uKAAA,CACF,CAAA,CACF,CACF,CACD,EACDpB,GAAO,YAAcmB,GAAsB","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as a,n as m}from"./index-
|
|
2
|
-
//# sourceMappingURL=toggle-
|
|
1
|
+
import{j as a,n as m}from"./index-tPP7N38D.js";function u({pressed:r,onPressedChange:t,className:e,onClick:n,...o}){return a.jsx("button",{type:"button","aria-pressed":r,onClick:i=>{n?.(i),t?.(!r)},className:m("inline-flex items-center justify-center rounded-md border px-3 py-1.5 text-sm font-medium transition-all",r?"border-primary/50 bg-primary/15 text-neon glow-primary":"border-border bg-transparent text-muted hover:text-foreground",e),...o})}export{u as T};
|
|
2
|
+
//# sourceMappingURL=toggle-CHyUS1MH.js.map
|
package/extensions/dashboard-client/dist/assets/{toggle-pDMBQYQj.js.map → toggle-CHyUS1MH.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-
|
|
1
|
+
{"version":3,"file":"toggle-CHyUS1MH.js","sources":["../../src/components/ui/toggle.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface ToggleProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n pressed?: boolean;\n onPressedChange?: (pressed: boolean) => void;\n}\n\nexport function Toggle({ pressed, onPressedChange, className, onClick, ...props }: ToggleProps) {\n return (\n <button\n type=\"button\"\n aria-pressed={pressed}\n onClick={(e) => {\n onClick?.(e);\n onPressedChange?.(!pressed);\n }}\n className={cn(\n \"inline-flex items-center justify-center rounded-md border px-3 py-1.5 text-sm font-medium transition-all\",\n pressed\n ? \"border-primary/50 bg-primary/15 text-neon glow-primary\"\n : \"border-border bg-transparent text-muted hover:text-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n"],"names":["Toggle","pressed","onPressedChange","className","onClick","props","jsx","e","cn"],"mappings":"+CAQO,SAASA,EAAO,CAAE,QAAAC,EAAS,gBAAAC,EAAiB,UAAAC,EAAW,QAAAC,EAAS,GAAGC,GAAsB,CAC9F,OACEC,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,eAAcL,EACd,QAAUM,GAAM,CACdH,IAAUG,CAAC,EACXL,IAAkB,CAACD,CAAO,CAC5B,EACA,UAAWO,EACT,2GACAP,EACI,yDACA,gEACJE,CAAA,EAED,GAAGE,CAAA,CAAA,CAGV"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./index-
|
|
2
|
-
//# sourceMappingURL=useSSE-
|
|
1
|
+
import{r as e}from"./index-tPP7N38D.js";function R(i={}){const{maxEvents:c=500,maxReconnects:l=5}=i,[f,v]=e.useState([]),[E,n]=e.useState("connecting"),[S,p]=e.useState(0),[m,d]=e.useState(null),o=e.useRef(0),s=e.useRef(null),r=e.useCallback(()=>{s.current&&s.current.close(),n("connecting");const t=new EventSource("/api/events");s.current=t,t.onopen=()=>{n("connected"),o.current=0},t.onmessage=g=>{try{const x=JSON.parse(g.data);v(u=>{const a=[...u,x];return a.length>c?a.slice(-c):a}),p(u=>u+1),d(Date.now())}catch{}},t.onerror=()=>{t.close(),o.current<l?(o.current+=1,n("connecting"),setTimeout(r,1e3)):n("disconnected")}},[c,l]);return e.useEffect(()=>(r(),()=>{s.current?.close()}),[r]),{events:f,status:E,eventCount:S,lastEventAt:m}}export{R as u};
|
|
2
|
+
//# sourceMappingURL=useSSE-CPIU9hax.js.map
|
package/extensions/dashboard-client/dist/assets/{useSSE-BKaC4dao.js.map → useSSE-CPIU9hax.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSSE-
|
|
1
|
+
{"version":3,"file":"useSSE-CPIU9hax.js","sources":["../../src/hooks/useSSE.ts"],"sourcesContent":["/**\n * dashboard-client/src/hooks/useSSE.ts — Server-Sent Events hook.\n *\n * Connects to /api/events, provides real-time event stream.\n * SPRINT-B1: basic connection. SPRINT-D1: reconnect with backoff.\n */\n\nimport { useState, useEffect, useRef, useCallback } from 'react';\nimport type { SseEvent } from '../../../dashboard-server/api-contracts';\n\nexport type SseStatus = 'connecting' | 'connected' | 'disconnected' | 'error';\n\nexport interface UseSSEResult {\n events: SseEvent[];\n status: SseStatus;\n eventCount: number;\n lastEventAt: number | null;\n}\n\nexport interface UseSSEOptions {\n /** Max events to keep in memory (ring buffer). */\n maxEvents?: number;\n /** Max reconnect attempts before giving up. */\n maxReconnects?: number;\n}\n\n// SPRINT-D1-REMAINING: exponential backoff (1s → 2s → 4s → max 30s).\n// SPRINT-D1-REMAINING: after 5 failures, set status='disconnected'.\n\nexport function useSSE(options: UseSSEOptions = {}): UseSSEResult {\n const { maxEvents = 500, maxReconnects = 5 } = options;\n const [events, setEvents] = useState<SseEvent[]>([]);\n const [status, setStatus] = useState<SseStatus>('connecting');\n const [eventCount, setEventCount] = useState(0);\n const [lastEventAt, setLastEventAt] = useState<number | null>(null);\n const reconnectCount = useRef(0);\n const sourceRef = useRef<EventSource | null>(null);\n\n const connect = useCallback(() => {\n if (sourceRef.current) {\n sourceRef.current.close();\n }\n setStatus('connecting');\n const source = new EventSource('/api/events');\n sourceRef.current = source;\n\n source.onopen = () => {\n setStatus('connected');\n reconnectCount.current = 0;\n };\n\n source.onmessage = (event) => {\n try {\n const parsed = JSON.parse(event.data) as SseEvent;\n setEvents(prev => {\n const next = [...prev, parsed];\n return next.length > maxEvents ? next.slice(-maxEvents) : next;\n });\n setEventCount(c => c + 1);\n setLastEventAt(Date.now());\n } catch {\n // non-fatal: skip malformed events\n }\n };\n\n source.onerror = () => {\n source.close();\n if (reconnectCount.current < maxReconnects) {\n reconnectCount.current += 1;\n setStatus('connecting');\n // SPRINT-D1: use exponential backoff instead of fixed delay\n setTimeout(connect, 1000);\n } else {\n setStatus('disconnected');\n }\n };\n }, [maxEvents, maxReconnects]);\n\n useEffect(() => {\n connect();\n return () => {\n sourceRef.current?.close();\n };\n }, [connect]);\n\n return { events, status, eventCount, lastEventAt };\n}\n"],"names":["useSSE","options","maxEvents","maxReconnects","events","setEvents","useState","status","setStatus","eventCount","setEventCount","lastEventAt","setLastEventAt","reconnectCount","useRef","sourceRef","connect","useCallback","source","event","parsed","prev","next","c","useEffect"],"mappings":"wCA6BO,SAASA,EAAOC,EAAyB,GAAkB,CAChE,KAAM,CAAE,UAAAC,EAAY,I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C"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>mega-compact dashboard</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-tPP7N38D.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="./assets/index-za_gmEmQ.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
@@ -1651,9 +1651,6 @@
|
|
|
1651
1651
|
"arm"
|
|
1652
1652
|
],
|
|
1653
1653
|
"dev": true,
|
|
1654
|
-
"libc": [
|
|
1655
|
-
"glibc"
|
|
1656
|
-
],
|
|
1657
1654
|
"license": "MIT",
|
|
1658
1655
|
"optional": true,
|
|
1659
1656
|
"os": [
|
|
@@ -1668,9 +1665,6 @@
|
|
|
1668
1665
|
"arm"
|
|
1669
1666
|
],
|
|
1670
1667
|
"dev": true,
|
|
1671
|
-
"libc": [
|
|
1672
|
-
"musl"
|
|
1673
|
-
],
|
|
1674
1668
|
"license": "MIT",
|
|
1675
1669
|
"optional": true,
|
|
1676
1670
|
"os": [
|
|
@@ -1685,9 +1679,6 @@
|
|
|
1685
1679
|
"arm64"
|
|
1686
1680
|
],
|
|
1687
1681
|
"dev": true,
|
|
1688
|
-
"libc": [
|
|
1689
|
-
"glibc"
|
|
1690
|
-
],
|
|
1691
1682
|
"license": "MIT",
|
|
1692
1683
|
"optional": true,
|
|
1693
1684
|
"os": [
|
|
@@ -1702,9 +1693,6 @@
|
|
|
1702
1693
|
"arm64"
|
|
1703
1694
|
],
|
|
1704
1695
|
"dev": true,
|
|
1705
|
-
"libc": [
|
|
1706
|
-
"musl"
|
|
1707
|
-
],
|
|
1708
1696
|
"license": "MIT",
|
|
1709
1697
|
"optional": true,
|
|
1710
1698
|
"os": [
|
|
@@ -1719,9 +1707,6 @@
|
|
|
1719
1707
|
"loong64"
|
|
1720
1708
|
],
|
|
1721
1709
|
"dev": true,
|
|
1722
|
-
"libc": [
|
|
1723
|
-
"glibc"
|
|
1724
|
-
],
|
|
1725
1710
|
"license": "MIT",
|
|
1726
1711
|
"optional": true,
|
|
1727
1712
|
"os": [
|
|
@@ -1736,9 +1721,6 @@
|
|
|
1736
1721
|
"loong64"
|
|
1737
1722
|
],
|
|
1738
1723
|
"dev": true,
|
|
1739
|
-
"libc": [
|
|
1740
|
-
"musl"
|
|
1741
|
-
],
|
|
1742
1724
|
"license": "MIT",
|
|
1743
1725
|
"optional": true,
|
|
1744
1726
|
"os": [
|
|
@@ -1753,9 +1735,6 @@
|
|
|
1753
1735
|
"ppc64"
|
|
1754
1736
|
],
|
|
1755
1737
|
"dev": true,
|
|
1756
|
-
"libc": [
|
|
1757
|
-
"glibc"
|
|
1758
|
-
],
|
|
1759
1738
|
"license": "MIT",
|
|
1760
1739
|
"optional": true,
|
|
1761
1740
|
"os": [
|
|
@@ -1770,9 +1749,6 @@
|
|
|
1770
1749
|
"ppc64"
|
|
1771
1750
|
],
|
|
1772
1751
|
"dev": true,
|
|
1773
|
-
"libc": [
|
|
1774
|
-
"musl"
|
|
1775
|
-
],
|
|
1776
1752
|
"license": "MIT",
|
|
1777
1753
|
"optional": true,
|
|
1778
1754
|
"os": [
|
|
@@ -1787,9 +1763,6 @@
|
|
|
1787
1763
|
"riscv64"
|
|
1788
1764
|
],
|
|
1789
1765
|
"dev": true,
|
|
1790
|
-
"libc": [
|
|
1791
|
-
"glibc"
|
|
1792
|
-
],
|
|
1793
1766
|
"license": "MIT",
|
|
1794
1767
|
"optional": true,
|
|
1795
1768
|
"os": [
|
|
@@ -1804,9 +1777,6 @@
|
|
|
1804
1777
|
"riscv64"
|
|
1805
1778
|
],
|
|
1806
1779
|
"dev": true,
|
|
1807
|
-
"libc": [
|
|
1808
|
-
"musl"
|
|
1809
|
-
],
|
|
1810
1780
|
"license": "MIT",
|
|
1811
1781
|
"optional": true,
|
|
1812
1782
|
"os": [
|
|
@@ -1821,9 +1791,6 @@
|
|
|
1821
1791
|
"s390x"
|
|
1822
1792
|
],
|
|
1823
1793
|
"dev": true,
|
|
1824
|
-
"libc": [
|
|
1825
|
-
"glibc"
|
|
1826
|
-
],
|
|
1827
1794
|
"license": "MIT",
|
|
1828
1795
|
"optional": true,
|
|
1829
1796
|
"os": [
|
|
@@ -1838,9 +1805,6 @@
|
|
|
1838
1805
|
"x64"
|
|
1839
1806
|
],
|
|
1840
1807
|
"dev": true,
|
|
1841
|
-
"libc": [
|
|
1842
|
-
"glibc"
|
|
1843
|
-
],
|
|
1844
1808
|
"license": "MIT",
|
|
1845
1809
|
"optional": true,
|
|
1846
1810
|
"os": [
|
|
@@ -1855,9 +1819,6 @@
|
|
|
1855
1819
|
"x64"
|
|
1856
1820
|
],
|
|
1857
1821
|
"dev": true,
|
|
1858
|
-
"libc": [
|
|
1859
|
-
"musl"
|
|
1860
|
-
],
|
|
1861
1822
|
"license": "MIT",
|
|
1862
1823
|
"optional": true,
|
|
1863
1824
|
"os": [
|