@onside/install-widget 1.0.1 → 1.0.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-lib/AndroidPlatformModal-B8lt-w-V.js +47 -0
- package/dist-lib/AndroidPlatformModal-BNghy_S2.cjs +1 -0
- package/dist-lib/Dialog-D53Br-Xy.cjs +45 -0
- package/dist-lib/Dialog-DXOEeh8t.js +1399 -0
- package/dist-lib/GoToSafariModal-CLxmpCng.js +85 -0
- package/dist-lib/GoToSafariModal-DJDoZzSN.cjs +1 -0
- package/dist-lib/UpdateIOSModal-Cd2FI2Dl.cjs +1 -0
- package/dist-lib/UpdateIOSModal-ms1UJmHc.js +169 -0
- package/dist-lib/install-package-CyWo-B7v.js +3405 -0
- package/dist-lib/install-package-q3ncGygt.cjs +1 -0
- package/dist-lib/install-package.cjs +1 -45
- package/dist-lib/install-package.js +6 -5012
- package/package.json +2 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as o } from "react";
|
|
3
|
+
import { t as d, B as c } from "./install-package-CyWo-B7v.js";
|
|
4
|
+
import { D as m } from "./Dialog-DXOEeh8t.js";
|
|
5
|
+
const x = ({
|
|
6
|
+
open: t,
|
|
7
|
+
onClose: l
|
|
8
|
+
}) => {
|
|
9
|
+
const n = "is_android", a = o(() => {
|
|
10
|
+
d(n, "click", "close"), l();
|
|
11
|
+
}, [l]), i = o(
|
|
12
|
+
(r) => {
|
|
13
|
+
r || a();
|
|
14
|
+
},
|
|
15
|
+
[a]
|
|
16
|
+
);
|
|
17
|
+
return /* @__PURE__ */ e(
|
|
18
|
+
m,
|
|
19
|
+
{
|
|
20
|
+
"aria-labelledby": n,
|
|
21
|
+
className: "outline-hidden",
|
|
22
|
+
isDisplayingMargins: !0,
|
|
23
|
+
open: t,
|
|
24
|
+
onOpenChange: i,
|
|
25
|
+
children: /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-between text-center", children: [
|
|
26
|
+
/* @__PURE__ */ s("div", { className: "m-auto", children: [
|
|
27
|
+
/* @__PURE__ */ e("p", { className: "text-2xl font-bold", children: "Onside is for iPhone and iPad" }),
|
|
28
|
+
/* @__PURE__ */ e("p", { className: "mt-3 px-10 font-sans text-xs font-normal", children: "To install Onside, please use an iPhone or iPad." })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ e(
|
|
31
|
+
c,
|
|
32
|
+
{
|
|
33
|
+
className: "mt-2 w-full",
|
|
34
|
+
onClick: a,
|
|
35
|
+
size: "lg",
|
|
36
|
+
type: "button",
|
|
37
|
+
variant: "secondary",
|
|
38
|
+
children: "Close"
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
] })
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
x as AndroidPlatformModal
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),t=require("./install-package-q3ncGygt.cjs"),c=require("./Dialog-D53Br-Xy.cjs"),d=({open:i,onClose:l})=>{const n="is_android",a=s.useCallback(()=>{t.trackModalEvent(n,"click","close"),l()},[l]),o=s.useCallback(r=>{r||a()},[a]);return e.jsx(c.Dialog,{"aria-labelledby":n,className:"outline-hidden",isDisplayingMargins:!0,open:i,onOpenChange:o,children:e.jsxs("div",{className:"flex h-full flex-col items-center justify-between text-center",children:[e.jsxs("div",{className:"m-auto",children:[e.jsx("p",{className:"text-2xl font-bold",children:"Onside is for iPhone and iPad"}),e.jsx("p",{className:"mt-3 px-10 font-sans text-xs font-normal",children:"To install Onside, please use an iPhone or iPad."})]}),e.jsx(t.Button,{className:"mt-2 w-full",onClick:a,size:"lg",type:"button",variant:"secondary",children:"Close"})]})})};exports.AndroidPlatformModal=d;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";const m=require("react/jsx-runtime"),W=require("react"),Oe=require("react-dom"),ee=require("./install-package-q3ncGygt.cjs");function De(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=De(W),ct=De(Oe);function T(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function me(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ae(...e){return t=>{let n=!1;const r=e.map(o=>{const a=me(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():me(e[o],null)}}}}function M(...e){return i.useCallback(Ae(...e),e)}function ut(e,t){const n=i.createContext(t),r=a=>{const{children:c,...s}=a,d=i.useMemo(()=>s,Object.values(s));return m.jsx(n.Provider,{value:d,children:c})};r.displayName=e+"Provider";function o(a){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function lt(e,t=[]){let n=[];function r(a,c){const s=i.createContext(c),d=n.length;n=[...n,c];const l=v=>{const{scope:p,children:h,...b}=v,u=p?.[e]?.[d]||s,g=i.useMemo(()=>b,Object.values(b));return m.jsx(u.Provider,{value:g,children:h})};l.displayName=a+"Provider";function f(v,p){const h=p?.[e]?.[d]||s,b=i.useContext(h);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${v}\` must be used within \`${a}\``)}return[l,f]}const o=()=>{const a=n.map(c=>i.createContext(c));return function(s){const d=s?.[e]||a;return i.useMemo(()=>({[`__scope${e}`]:{...s,[e]:d}}),[s,d])}};return o.scopeName=e,[r,dt(o,...t)]}function dt(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const c=r.reduce((s,{useScope:d,scopeName:l})=>{const v=d(a)[`__scope${l}`];return{...s,...v}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var B=globalThis?.document?i.useLayoutEffect:()=>{},ft=i[" useId ".trim().toString()]||(()=>{}),vt=0;function te(e){const[t,n]=i.useState(ft());return B(()=>{n(r=>r??String(vt++))},[e]),e||(t?`radix-${t}`:"")}var mt=i[" useInsertionEffect ".trim().toString()]||B;function pt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,c]=ht({defaultProp:t,onChange:n}),s=e!==void 0,d=s?e:o;{const f=i.useRef(e!==void 0);i.useEffect(()=>{const v=f.current;v!==s&&console.warn(`${r} is changing from ${v?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,r])}const l=i.useCallback(f=>{if(s){const v=gt(f)?f(e):f;v!==e&&c.current?.(v)}else a(f)},[s,e,a,c]);return[d,l]}function ht({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),a=i.useRef(t);return mt(()=>{a.current=t},[t]),i.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function gt(e){return typeof e=="function"}function Te(e){const t=yt(e),n=i.forwardRef((r,o)=>{const{children:a,...c}=r,s=i.Children.toArray(a),d=s.find(bt);if(d){const l=d.props.children,f=s.map(v=>v===d?i.Children.count(l)>1?i.Children.only(null):i.isValidElement(l)?l.props.children:null:v);return m.jsx(t,{...c,ref:o,children:i.isValidElement(l)?i.cloneElement(l,void 0,f):null})}return m.jsx(t,{...c,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function yt(e){const t=i.forwardRef((n,r)=>{const{children:o,...a}=n;if(i.isValidElement(o)){const c=wt(o),s=Ct(a,o.props);return o.type!==i.Fragment&&(s.ref=r?Ae(r,c):c),i.cloneElement(o,s)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Et=Symbol("radix.slottable");function bt(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Et}function Ct(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...s)=>{const d=a(...s);return o(...s),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function wt(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var St=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],D=St.reduce((e,t)=>{const n=Te(`Primitive.${t}`),r=i.forwardRef((o,a)=>{const{asChild:c,...s}=o,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(d,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function xt(e,t){e&&ct.flushSync(()=>e.dispatchEvent(t))}function U(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function Rt(e,t=globalThis?.document){const n=U(e);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Nt="DismissableLayer",ue="dismissableLayer.update",Pt="dismissableLayer.pointerDownOutside",Ot="dismissableLayer.focusOutside",pe,Ie=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Me=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:c,onDismiss:s,...d}=e,l=i.useContext(Ie),[f,v]=i.useState(null),p=f?.ownerDocument??globalThis?.document,[,h]=i.useState({}),b=M(t,E=>v(E)),u=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=u.indexOf(g),C=f?u.indexOf(f):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,S=C>=y,x=Tt(E=>{const O=E.target,j=[...l.branches].some(J=>J.contains(O));!S||j||(o?.(E),c?.(E),E.defaultPrevented||s?.())},p),P=It(E=>{const O=E.target;[...l.branches].some(J=>J.contains(O))||(a?.(E),c?.(E),E.defaultPrevented||s?.())},p);return Rt(E=>{C===l.layers.size-1&&(r?.(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},p),i.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(pe=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),he(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=pe)}},[f,p,n,l]),i.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),he())},[f,l]),i.useEffect(()=>{const E=()=>h({});return document.addEventListener(ue,E),()=>document.removeEventListener(ue,E)},[]),m.jsx(D.div,{...d,ref:b,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,P.onFocusCapture),onBlurCapture:T(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,x.onPointerDownCapture)})});Me.displayName=Nt;var Dt="DismissableLayerBranch",At=i.forwardRef((e,t)=>{const n=i.useContext(Ie),r=i.useRef(null),o=M(t,r);return i.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(D.div,{...e,ref:o})});At.displayName=Dt;function Tt(e,t=globalThis?.document){const n=U(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let d=function(){ke(Pt,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function It(e,t=globalThis?.document){const n=U(e),r=i.useRef(!1);return i.useEffect(()=>{const o=a=>{a.target&&!r.current&&ke(Ot,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function he(){const e=new CustomEvent(ue);document.dispatchEvent(e)}function ke(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?xt(o,a):o.dispatchEvent(a)}var ne="focusScope.autoFocusOnMount",re="focusScope.autoFocusOnUnmount",ge={bubbles:!1,cancelable:!0},Mt="FocusScope",Le=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...c}=e,[s,d]=i.useState(null),l=U(o),f=U(a),v=i.useRef(null),p=M(t,u=>d(u)),h=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let u=function(w){if(h.paused||!s)return;const S=w.target;s.contains(S)?v.current=S:A(v.current,{select:!0})},g=function(w){if(h.paused||!s)return;const S=w.relatedTarget;S!==null&&(s.contains(S)||A(v.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&A(s)};document.addEventListener("focusin",u),document.addEventListener("focusout",g);const C=new MutationObserver(y);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",g),C.disconnect()}}},[r,s,h.paused]),i.useEffect(()=>{if(s){Ee.add(h);const u=document.activeElement;if(!s.contains(u)){const y=new CustomEvent(ne,ge);s.addEventListener(ne,l),s.dispatchEvent(y),y.defaultPrevented||(kt(Wt(_e(s)),{select:!0}),document.activeElement===u&&A(s))}return()=>{s.removeEventListener(ne,l),setTimeout(()=>{const y=new CustomEvent(re,ge);s.addEventListener(re,f),s.dispatchEvent(y),y.defaultPrevented||A(u??document.body,{select:!0}),s.removeEventListener(re,f),Ee.remove(h)},0)}}},[s,l,f,h]);const b=i.useCallback(u=>{if(!n&&!r||h.paused)return;const g=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,y=document.activeElement;if(g&&y){const C=u.currentTarget,[w,S]=Lt(C);w&&S?!u.shiftKey&&y===S?(u.preventDefault(),n&&A(w,{select:!0})):u.shiftKey&&y===w&&(u.preventDefault(),n&&A(S,{select:!0})):y===C&&u.preventDefault()}},[n,r,h.paused]);return m.jsx(D.div,{tabIndex:-1,...c,ref:p,onKeyDown:b})});Le.displayName=Mt;function kt(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(A(r,{select:t}),document.activeElement!==n)return}function Lt(e){const t=_e(e),n=ye(t,e),r=ye(t.reverse(),e);return[n,r]}function _e(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ye(e,t){for(const n of e)if(!_t(n,{upTo:t}))return n}function _t(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ft(e){return e instanceof HTMLInputElement&&"select"in e}function A(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ft(e)&&t&&e.select()}}var Ee=jt();function jt(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=be(e,t),e.unshift(t)},remove(t){e=be(e,t),e[0]?.resume()}}}function be(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Wt(e){return e.filter(t=>t.tagName!=="A")}var Bt="Portal",Fe=i.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=i.useState(!1);B(()=>a(!0),[]);const c=n||o&&globalThis?.document?.body;return c?Oe.createPortal(m.jsx(D.div,{...r,ref:t}),c):null});Fe.displayName=Bt;function Ut(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var q=e=>{const{present:t,children:n}=e,r=$t(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),a=M(r.ref,Vt(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:a}):null};q.displayName="Presence";function $t(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),a=i.useRef("none"),c=e?"mounted":"unmounted",[s,d]=Ut(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=$(r.current);a.current=s==="mounted"?l:"none"},[s]),B(()=>{const l=r.current,f=o.current;if(f!==e){const p=a.current,h=$(l);e?d("MOUNT"):h==="none"||l?.display==="none"?d("UNMOUNT"):d(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),B(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,v=h=>{const u=$(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&u&&(d("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=h=>{h.target===t&&(a.current=$(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function $(e){return e?.animationName||"none"}function Vt(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var oe=0;function Ht(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ce()),document.body.insertAdjacentElement("beforeend",e[1]??Ce()),oe++,()=>{oe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),oe--}},[])}function Ce(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var N=function(){return N=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},N.apply(this,arguments)};function je(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function zt(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var G="right-scroll-bar-position",Y="width-before-scroll-bar",Kt="with-scroll-bars-hidden",Gt="--removed-body-scroll-bar-size";function ae(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yt(e,t){var n=W.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Xt=typeof window<"u"?i.useLayoutEffect:i.useEffect,we=new WeakMap;function qt(e,t){var n=Yt(null,function(r){return e.forEach(function(o){return ae(o,r)})});return Xt(function(){var r=we.get(n);if(r){var o=new Set(r),a=new Set(e),c=n.current;o.forEach(function(s){a.has(s)||ae(s,null)}),a.forEach(function(s){o.has(s)||ae(s,c)})}we.set(n,e)},[e]),n}function Zt(e){return e}function Qt(e,t){t===void 0&&(t=Zt);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var c=t(a,r);return n.push(c),function(){n=n.filter(function(s){return s!==c})}},assignSyncMedium:function(a){for(r=!0;n.length;){var c=n;n=[],c.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var c=[];if(n.length){var s=n;n=[],s.forEach(a),c=n}var d=function(){var f=c;c=[],f.forEach(a)},l=function(){return Promise.resolve().then(d)};l(),n={push:function(f){c.push(f),l()},filter:function(f){return c=c.filter(f),n}}}};return o}function Jt(e){e===void 0&&(e={});var t=Qt(null);return t.options=N({async:!0,ssr:!1},e),t}var We=function(e){var t=e.sideCar,n=je(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,N({},n))};We.isSideCarExport=!0;function en(e,t){return e.useMedium(t),We}var Be=Jt(),ie=function(){},Z=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:ie,onWheelCapture:ie,onTouchMoveCapture:ie}),o=r[0],a=r[1],c=e.forwardProps,s=e.children,d=e.className,l=e.removeScrollBar,f=e.enabled,v=e.shards,p=e.sideCar,h=e.noRelative,b=e.noIsolation,u=e.inert,g=e.allowPinchZoom,y=e.as,C=y===void 0?"div":y,w=e.gapMode,S=je(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,P=qt([n,t]),E=N(N({},S),o);return i.createElement(i.Fragment,null,f&&i.createElement(x,{sideCar:Be,removeScrollBar:l,shards:v,noRelative:h,noIsolation:b,inert:u,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:w}),c?i.cloneElement(i.Children.only(s),N(N({},E),{ref:P})):i.createElement(C,N({},E,{className:d,ref:P}),s))});Z.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Z.classNames={fullWidth:Y,zeroRight:G};var tn=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nn(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=tn();return t&&e.setAttribute("nonce",t),e}function rn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function on(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var an=function(){var e=0,t=null;return{add:function(n){e==0&&(t=nn())&&(rn(t,n),on(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sn=function(){var e=an();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ue=function(){var e=sn(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},cn={left:0,top:0,right:0,gap:0},se=function(e){return parseInt(e||"",10)||0},un=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[se(n),se(r),se(o)]},ln=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return cn;var t=un(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},dn=Ue(),F="data-scroll-locked",fn=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(Kt,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(s,"px ").concat(r,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(F,`] {
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(o,`px;
|
|
11
|
+
padding-top: `).concat(a,`px;
|
|
12
|
+
padding-right: `).concat(c,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(s,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(G,` {
|
|
20
|
+
right: `).concat(s,"px ").concat(r,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(Y,` {
|
|
24
|
+
margin-right: `).concat(s,"px ").concat(r,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(G," .").concat(G,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(Y," .").concat(Y,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(F,`] {
|
|
36
|
+
`).concat(Gt,": ").concat(s,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},Se=function(){var e=parseInt(document.body.getAttribute(F)||"0",10);return isFinite(e)?e:0},vn=function(){i.useEffect(function(){return document.body.setAttribute(F,(Se()+1).toString()),function(){var e=Se()-1;e<=0?document.body.removeAttribute(F):document.body.setAttribute(F,e.toString())}},[])},mn=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;vn();var a=i.useMemo(function(){return ln(o)},[o]);return i.createElement(dn,{styles:fn(a,!t,o,n?"":"!important")})},le=!1;if(typeof window<"u")try{var V=Object.defineProperty({},"passive",{get:function(){return le=!0,!0}});window.addEventListener("test",V,V),window.removeEventListener("test",V,V)}catch{le=!1}var k=le?{passive:!1}:!1,pn=function(e){return e.tagName==="TEXTAREA"},$e=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!pn(e)&&n[t]==="visible")},hn=function(e){return $e(e,"overflowY")},gn=function(e){return $e(e,"overflowX")},xe=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ve(e,r);if(o){var a=He(e,r),c=a[1],s=a[2];if(c>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},yn=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},En=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ve=function(e,t){return e==="v"?hn(t):gn(t)},He=function(e,t){return e==="v"?yn(t):En(t)},bn=function(e,t){return e==="h"&&t==="rtl"?-1:1},Cn=function(e,t,n,r,o){var a=bn(e,window.getComputedStyle(t).direction),c=a*r,s=n.target,d=t.contains(s),l=!1,f=c>0,v=0,p=0;do{if(!s)break;var h=He(e,s),b=h[0],u=h[1],g=h[2],y=u-g-a*b;(b||y)&&Ve(e,s)&&(v+=y,p+=b);var C=s.parentNode;s=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!d&&s!==document.body||d&&(t.contains(s)||t===s));return(f&&Math.abs(v)<1||!f&&Math.abs(p)<1)&&(l=!0),l},H=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Re=function(e){return[e.deltaX,e.deltaY]},Ne=function(e){return e&&"current"in e?e.current:e},wn=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Sn=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},xn=0,L=[];function Rn(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(xn++)[0],a=i.useState(Ue)[0],c=i.useRef(e);i.useEffect(function(){c.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var u=zt([e.lockRef.current],(e.shards||[]).map(Ne),!0).filter(Boolean);return u.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),u.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=i.useCallback(function(u,g){if("touches"in u&&u.touches.length===2||u.type==="wheel"&&u.ctrlKey)return!c.current.allowPinchZoom;var y=H(u),C=n.current,w="deltaX"in u?u.deltaX:C[0]-y[0],S="deltaY"in u?u.deltaY:C[1]-y[1],x,P=u.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in u&&E==="h"&&P.type==="range")return!1;var O=xe(E,P);if(!O)return!0;if(O?x=E:(x=E==="v"?"h":"v",O=xe(E,P)),!O)return!1;if(!r.current&&"changedTouches"in u&&(w||S)&&(r.current=x),!x)return!0;var j=r.current||x;return Cn(j,g,u,j==="h"?w:S)},[]),d=i.useCallback(function(u){var g=u;if(!(!L.length||L[L.length-1]!==a)){var y="deltaY"in g?Re(g):H(g),C=t.current.filter(function(x){return x.name===g.type&&(x.target===g.target||g.target===x.shadowParent)&&wn(x.delta,y)})[0];if(C&&C.should){g.cancelable&&g.preventDefault();return}if(!C){var w=(c.current.shards||[]).map(Ne).filter(Boolean).filter(function(x){return x.contains(g.target)}),S=w.length>0?s(g,w[0]):!c.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),l=i.useCallback(function(u,g,y,C){var w={name:u,delta:g,target:y,should:C,shadowParent:Nn(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),f=i.useCallback(function(u){n.current=H(u),r.current=void 0},[]),v=i.useCallback(function(u){l(u.type,Re(u),u.target,s(u,e.lockRef.current))},[]),p=i.useCallback(function(u){l(u.type,H(u),u.target,s(u,e.lockRef.current))},[]);i.useEffect(function(){return L.push(a),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:p}),document.addEventListener("wheel",d,k),document.addEventListener("touchmove",d,k),document.addEventListener("touchstart",f,k),function(){L=L.filter(function(u){return u!==a}),document.removeEventListener("wheel",d,k),document.removeEventListener("touchmove",d,k),document.removeEventListener("touchstart",f,k)}},[]);var h=e.removeScrollBar,b=e.inert;return i.createElement(i.Fragment,null,b?i.createElement(a,{styles:Sn(o)}):null,h?i.createElement(mn,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Nn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Pn=en(Be,Rn);var ze=i.forwardRef(function(e,t){return i.createElement(Z,N({},e,{ref:t,sideCar:Pn}))});ze.classNames=Z.classNames;var On=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_=new WeakMap,z=new WeakMap,K={},ce=0,Ke=function(e){return e&&(e.host||Ke(e.parentNode))},Dn=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ke(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},An=function(e,t,n,r){var o=Dn(t,Array.isArray(e)?e:[e]);K[n]||(K[n]=new WeakMap);var a=K[n],c=[],s=new Set,d=new Set(o),l=function(v){!v||s.has(v)||(s.add(v),l(v.parentNode))};o.forEach(l);var f=function(v){!v||d.has(v)||Array.prototype.forEach.call(v.children,function(p){if(s.has(p))f(p);else try{var h=p.getAttribute(r),b=h!==null&&h!=="false",u=(_.get(p)||0)+1,g=(a.get(p)||0)+1;_.set(p,u),a.set(p,g),c.push(p),u===1&&b&&z.set(p,!0),g===1&&p.setAttribute(n,"true"),b||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return f(t),s.clear(),ce++,function(){c.forEach(function(v){var p=_.get(v)-1,h=a.get(v)-1;_.set(v,p),a.set(v,h),p||(z.has(v)||v.removeAttribute(r),z.delete(v)),h||v.removeAttribute(n)}),ce--,ce||(_=new WeakMap,_=new WeakMap,z=new WeakMap,K={})}},Tn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=On(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),An(r,o,n,"aria-hidden")):function(){return null}},Q="Dialog",[Ge,Qn]=lt(Q),[In,R]=Ge(Q),Ye=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:c=!0}=e,s=i.useRef(null),d=i.useRef(null),[l,f]=pt({prop:r,defaultProp:o??!1,onChange:a,caller:Q});return m.jsx(In,{scope:t,triggerRef:s,contentRef:d,contentId:te(),titleId:te(),descriptionId:te(),open:l,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(v=>!v),[f]),modal:c,children:n})};Ye.displayName=Q;var Xe="DialogTrigger",Mn=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=R(Xe,n),a=M(t,o.triggerRef);return m.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ve(o.open),...r,ref:a,onClick:T(e.onClick,o.onOpenToggle)})});Mn.displayName=Xe;var de="DialogPortal",[kn,qe]=Ge(de,{forceMount:void 0}),Ze=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=R(de,t);return m.jsx(kn,{scope:t,forceMount:n,children:i.Children.map(r,c=>m.jsx(q,{present:n||a.open,children:m.jsx(Fe,{asChild:!0,container:o,children:c})}))})};Ze.displayName=de;var X="DialogOverlay",Qe=i.forwardRef((e,t)=>{const n=qe(X,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=R(X,e.__scopeDialog);return a.modal?m.jsx(q,{present:r||a.open,children:m.jsx(_n,{...o,ref:t})}):null});Qe.displayName=X;var Ln=Te("DialogOverlay.RemoveScroll"),_n=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=R(X,n);return m.jsx(ze,{as:Ln,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(D.div,{"data-state":ve(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),I="DialogContent",Je=i.forwardRef((e,t)=>{const n=qe(I,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=R(I,e.__scopeDialog);return m.jsx(q,{present:r||a.open,children:a.modal?m.jsx(Fn,{...o,ref:t}):m.jsx(jn,{...o,ref:t})})});Je.displayName=I;var Fn=i.forwardRef((e,t)=>{const n=R(I,e.__scopeDialog),r=i.useRef(null),o=M(t,n.contentRef,r);return i.useEffect(()=>{const a=r.current;if(a)return Tn(a)},[]),m.jsx(et,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:T(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:T(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,s=c.button===0&&c.ctrlKey===!0;(c.button===2||s)&&a.preventDefault()}),onFocusOutside:T(e.onFocusOutside,a=>a.preventDefault())})}),jn=i.forwardRef((e,t)=>{const n=R(I,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return m.jsx(et,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;n.triggerRef.current?.contains(c)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),et=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...c}=e,s=R(I,n),d=i.useRef(null),l=M(t,d);return Ht(),m.jsxs(m.Fragment,{children:[m.jsx(Le,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(Me,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ve(s.open),...c,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(Bn,{titleId:s.titleId}),m.jsx($n,{contentRef:d,descriptionId:s.descriptionId})]})]})}),fe="DialogTitle",tt=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=R(fe,n);return m.jsx(D.h2,{id:o.titleId,...r,ref:t})});tt.displayName=fe;var nt="DialogDescription",Wn=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=R(nt,n);return m.jsx(D.p,{id:o.descriptionId,...r,ref:t})});Wn.displayName=nt;var rt="DialogClose",ot=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=R(rt,n);return m.jsx(D.button,{type:"button",...r,ref:t,onClick:T(e.onClick,()=>o.onOpenChange(!1))})});ot.displayName=rt;function ve(e){return e?"open":"closed"}var at="DialogTitleWarning",[Jn,it]=ut(at,{contentName:I,titleName:fe,docsSlug:"dialog"}),Bn=({titleId:e})=>{const t=it(at),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
+
|
|
43
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
+
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Un="DialogDescriptionWarning",$n=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${it(Un).contentName}}.`;return i.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Vn=Ye,Hn=Ze,zn=Qe,Kn=Je,Gn=tt,Yn=ot;const Xn=e=>i.createElement("svg",{fill:"none",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"m4 12 8-8m-8 0 8 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),qn=e=>i.createElement("svg",{fill:"none",height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"m9.7002 13-4.2929-4.29289c-.39052-.39053-.39052-1.02369 0-1.41422l4.2929-4.29289",stroke:"#1e1c1f",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:.84,strokeWidth:1.5})),Pe="provider-widget-portal-root";function Zn(){let e=document.getElementById(Pe);return e||(e=document.createElement("div"),e.id=Pe,e.setAttribute("data-provider-widget-host",""),e.style.zIndex="2147483647",e.style.position="relative",document.body.appendChild(e)),e}const st=W.forwardRef((e,t)=>{const{"aria-labelledby":n,"aria-describedby":r,children:o,className:a,footerContent:c,headerContent:s,isDisplayingMargins:d=!0,open:l,onOpenChange:f,showCloseButton:v=!0,onBackClick:p}=e,[h,b]=W.useState(null);return W.useEffect(()=>{b(Zn())},[]),m.jsx(Vn,{open:l,onOpenChange:f,children:h&&m.jsxs(Hn,{container:h,children:[m.jsx(zn,{"aria-hidden":!0,className:ee.cn("fixed inset-0 bg-black/50 backdrop-blur-sm","!z-[2147483647] pointer-events-auto","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","duration-300")}),m.jsx(Kn,{ref:t,"aria-labelledby":n,"aria-describedby":r,"aria-modal":"true",className:ee.cn("fixed left-1/2 top-1/2 w-full max-w-lg -translate-x-1/2 -translate-y-1/2 outline-none","!z-[2147483647]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]","data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","duration-300",d&&"h-dvh max-h-[calc(100dvh-8px)] max-w-[calc(100dvw-8px)] rounded-2xl bg-white p-4",a),children:m.jsxs("div",{className:"flex h-full flex-col",children:[m.jsxs(Gn,{className:"flex flex-shrink-0 flex-row items-center justify-between",children:[m.jsxs("div",{className:"flex items-center",children:[p&&m.jsx(ee.Button,{className:"mr-auto rounded-full !bg-lightGray !p-[10px]",onClick:p,children:m.jsx(qn,{className:"size-4"})}),s]}),v&&m.jsx(Yn,{asChild:!0,children:m.jsx("button",{"aria-label":"Close modal",className:"hover:bg-gray-200 ml-auto rounded-full bg-lightGray p-[10px] outline-none",type:"button",children:m.jsx(Xn,{className:"size-4"})})})]}),m.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o}),c&&m.jsx("footer",{className:"flex flex-shrink-0 flex-col gap-2.5",children:c})]})})]})})});st.displayName="Dialog";exports.Dialog=st;
|