PageSourceSearch

https://home.s.id/assets/modal-DmYMWHGl.js

js s.id collected 2026-09-24 07:39:37 UTC 25,155 bytes, 41 lines download raw bytes

1import{c as e,i as t,n,t as r}from"./jsx-runtime-CfjKz_hj.js";import{a as i,r as a}from"./button-DFP_6XxS.js";import{t as o}from"./utils-D_mESGjb.js";import{t as s}from"./Trans-D3p2nRlT.js";import{a as c,c as l,d as u,i as d,l as f,n as p,o as m,r as h,s as g,t as _,u as ee}from"./dist-WLiWqhyS.js";var v=e(n());function te({title:e,titleId:t,...n},r){return v.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?v.createElement(`title`,{id:t},e):null,v.createElement(`path`,{fillRule:`evenodd`,d:`M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z`,clipRule:`evenodd`}))}var ne=v.forwardRef(te),y=r(),b=Object.defineProperty,x=(e,t)=>b(e,`name`,{value:t,configurable:!0}),S=`focusScope.autoFocusOnMount`,C=`focusScope.autoFocusOnUnmount`,re={bubbles:!1,cancelable:!0},ie=v.forwardRef(x(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[l,u]=v.useState(null),d=c(a),f=c(o),p=v.useRef(null),h=i(t,u),g=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let e=function(e){if(g.paused||!l)return;let t=e.target;l.contains(t)?p.current=t:w(p.current,{select:!0})},t=function(e){if(g.paused||!l)return;let t=e.relatedTarget;t!==null&&(l.contains(t)||w(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&w(l)};x(e,`handleFocusIn`),x(t,`handleFocusOut`),x(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,l,g.paused]),v.useEffect(()=>{if(l){de.add(g);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(S,re);l.addEventListener(S,d),l.dispatchEvent(t),t.defaultPrevented||(ae(pe(se(l)),{select:!0}),document.activeElement===e&&w(l))}return()=>{l.removeEventListener(S,d),setTimeout(()=>{let t=new CustomEvent(C,re);l.addEventListener(C,f),l.dispatchEvent(t),t.defaultPrevented||w(e??document.body,{select:!0}),l.removeEventListener(C,f),de.remove(g)},0)}}},[l,d,f,g]);let _=v.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=oe(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&w(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&w(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,y.jsx)(m.div,{tabIndex:-1,...s,ref:h,onKeyDown:_})},`FocusScope`));function ae(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(w(r,{select:t}),document.activeElement!==n)return}x(ae,`focusFirst`);function oe(e){let t=se(e);return[ce(t,e),ce(t.reverse(),e)]}x(oe,`getTabbableEdges`);function se(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:x(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}x(se,`getTabbableCandidates`);function ce(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):le(r,{upTo:t})))return r}x(ce,`findVisible`);function le(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}x(le,`isHidden`);function ue(e){return e instanceof HTMLInputElement&&`select`in e}x(ue,`isSelectableInput`);function w(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ue(e)&&t&&e.select()}}x(w,`focus`);var de=fe();function fe(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=T(e,t),e.unshift(t)},remove(t){e=T(e,t),e[0]?.resume()}}}x(fe,`createFocusScopesStack`);function T(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}x(T,`arrayRemove`);function pe(e){return e.filter(e=>e.tagName!==`A`)}x(pe,`removeLinks`);var me=Object.defineProperty,E=(e,t)=>me(e,`name`,{value:t,configurable:!0}),D=0,O=null;function he(e){return k(),e.children}E(he,`FocusGuards`);function k(){v.useEffect(()=>{O||={start:A(),end:A()};let{start:e,end:t}=O;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),D++,()=>{D===1&&(O?.start.remove(),O?.end.remove(),O=null),D=Math.max(0,D-1)}},[])}E(k,`useFocusGuards`);function A(){let 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}E(A,`createFocusGuard`);function ge(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function _e(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;
vendor: 9,102 bytes, lines 1-41
1r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var j,M=t((()=>{j=function(){return j=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},j.apply(this,arguments)}}));M();var N=`right-scroll-bar-position`,P=`width-before-scroll-bar`,ve=`with-scroll-bars-hidden`,ye=`--removed-body-scroll-bar-size`;function F(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function be(e,t){var n=(0,v.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var xe=typeof window<`u`?v.useLayoutEffect:v.useEffect,Se=new WeakMap;function Ce(e,t){var n=be(t||null,function(t){return e.forEach(function(e){return F(e,t)})});return xe(function(){var t=Se.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||F(e,null)}),i.forEach(function(e){r.has(e)||F(e,a)})}Se.set(n,e)},[e]),n}function we(e){return e}function Te(e,t){t===void 0&&(t=we);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ee(e){e===void 0&&(e={});var t=Te(null);return t.options=j({async:!0,ssr:!1},e),t}M();var De=function(e){var t=e.sideCar,n=ge(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return v.createElement(r,j({},n))};De.isSideCarExport=!0;function Oe(e,t){return e.useMedium(t),De}var ke=Ee();M();var I=function(){},L=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:I,onWheelCapture:I,onTouchMoveCapture:I}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,ee=_===void 0?`div`:_,te=e.gapMode,ne=ge(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),y=f,b=Ce([n,t]),x=j(j({},ne),i);return v.createElement(v.Fragment,null,u&&v.createElement(y,{sideCar:ke,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:te}),o?v.cloneElement(v.Children.only(s),j(j({},x),{ref:b})):v.createElement(ee,j({},x,{className:c,ref:b}),s))});L.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},L.classNames={fullWidth:P,zeroRight:N};var Ae=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function je(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ae();return t&&e.setAttribute(`nonce`,t),e}function Me(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ne(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Pe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=je())&&(Me(t,n),Ne(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Fe=function(){var e=Pe();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ie=function(){var e=Fe();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Le={left:0,top:0,right:0,gap:0},R=function(e){return parseInt(e||``,10)||0},Re=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[R(n),R(r),R(i)]},ze=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Le;var t=Re(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])}},Be=Ie(),z=`data-scroll-locked`,Ve=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2  .${ve} {
3   overflow: hidden ${r};
4   padding-right: ${s}px ${r};
5  }
6  body[${z}] {
7    overflow: hidden ${r};
8    overscroll-behavior: contain;
9    ${[t&&`position: relative ${r};`,n===`margin`&&`
10    padding-left: ${i}px;
11    padding-top: ${a}px;
12    padding-right: ${o}px;
13    margin-left:0;
14    margin-top:0;
15    margin-right: ${s}px ${r};
16    `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
17  }
18  
19  .${N} {
20    right: ${s}px ${r};
21  }
22  
23  .${P} {
24    margin-right: ${s}px ${r};
25  }
26  
27  .${N} .${N} {
28    right: 0 ${r};
29  }
30  
31  .${P} .${P} {
32    margin-right: 0 ${r};
33  }
34  
35  body[${z}] {
36    ${ye}: ${s}px;
37  }
38`},He=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Ue=function(){v.useEffect(function(){return document.body.setAttribute(z,(He()+1).toString()),function(){var e=He()-1;e<=0?document.body.removeAttribute(z):document.body.setAttribute(z,e.toString())}},[])},We=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Ue();var a=v.useMemo(function(){return ze(i)},[i]);return v.createElement(Be,{styles:Ve(a,!t,i,n?``:`!important`)})},B=!1;if(typeof window<`u`)try{var V=Object.defineProperty({},"passive",{get:function(){return B=!0,!0}});window.addEventListener(`test`,V,V),window.removeEventListener(`test`,V,V)}catch{B=!1}var H=B?{passive:!1}:!1,Ge=function(e){return e.tagName===`TEXTAREA`},Ke=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Ge(e)&&n[t]===`visible`)},qe=function(e){return Ke(e,`overflowY`)},Je=function(e){return Ke(e,`overflowX`)},Ye=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Qe(e,r)){var i=$e(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Xe=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Ze=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Qe=function(e,t){return e===`v`?qe(t):Je(t)},$e=function(e,t){return e===`v`?Xe(t):Ze(t)},et=function(e,t){return e===`h`&&t===`rtl`?-1:1},tt=function(e,t,n,r,i){var a=et(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=$e(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Qe(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l};M();var U=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nt=function(e){return[e.deltaX,e.deltaY]},rt=function(e){return e&&`current`in e?e.current:e},it=function(e,t){return e[0]===t[0]&&e[1]===t[1]},at=function(e){return`
39  .block-interactivity-${e} {pointer-events: none;}
40  .allow-interactivity-${e} {pointer-events: all;}
41`},ot=0,W=[];function st(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(ot++)[0],a=v.useState(Ie)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=_e([e.lockRef.current],(e.shards||[]).map(rt),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=U(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ye(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ye(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return tt(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(W.length&&W[W.length-1]===a){var r=`deltaY`in n?nt(n):U(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&it(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}
41if(!i){var c=(o.current.shards||[]).map(rt).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=v.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:ct(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=v.useCallback(function(e){n.current=U(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,nt(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,U(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return W.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,H),document.addEventListener(`touchmove`,c,H),document.addEventListener(`touchstart`,u,H),function(){W=W.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,H),document.removeEventListener(`touchmove`,c,H),document.removeEventListener(`touchstart`,u,H)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:at(i)}):null,p?v.createElement(We,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ct(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var lt=Oe(ke,st);M();var ut=v.forwardRef(function(e,t){return v.createElement(L,j({},e,{ref:t,sideCar:lt}))});ut.classNames=L.classNames;var dt=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},G=new WeakMap,K=new WeakMap,q={},J=0,ft=function(e){return e&&(e.host||ft(e.parentNode))},pt=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=ft(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},mt=function(e,t,n,r){var i=pt(t,Array.isArray(e)?e:[e]);q[n]||(q[n]=new WeakMap);var a=q[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(G.get(e)||0)+1,l=(a.get(e)||0)+1;G.set(e,c),a.set(e,l),o.push(e),c===1&&i&&K.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),J++,function(){o.forEach(function(e){var t=G.get(e)-1,i=a.get(e)-1;G.set(e,t),a.set(e,i),t||(K.has(e)||e.removeAttribute(r),K.delete(e)),i||e.removeAttribute(n)}),J--,J||(G=new WeakMap,G=new WeakMap,K=new WeakMap,q={})}},ht=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||dt(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),mt(r,i,n,`aria-hidden`)):function(){return null}},gt=Object.defineProperty,Y=(e,t)=>gt(e,`name`,{value:t,configurable:!0}),X=`Dialog`,[_t,vt]=ee(X),[yt,Z]=_t(X),bt=Y(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[u,d]=g({prop:r,defaultProp:i??!1,onChange:a,caller:X}),[f,p]=v.useState(0),[m,h]=v.useState(0);return(0,y.jsx)(yt,{scope:t,triggerRef:s,contentRef:c,contentId:l(),titleId:l(),descriptionId:l(),titlePresent:f>0,descriptionPresent:m>0,setTitleCount:p,setDescriptionCount:h,open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})},`Dialog`),xt=`DialogTrigger`,St=v.forwardRef(Y(function(e,t){let{__scopeDialog:n,...r}=e,a=Z(xt,n),o=i(t,a.triggerRef);return(0,y.jsx)(m.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":$(a.open),...r,ref:o,onClick:u(e.onClick,a.onOpenToggle)})},`DialogTrigger`)),Ct=`DialogPortal`,[wt,Tt]=_t(Ct,{forceMount:void 0}),Et=Y(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Z(Ct,t);return(0,y.jsx)(wt,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(_,{present:n||a.open,children:(0,y.jsx)(p,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),Dt=`DialogOverlay`,Ot=v.forwardRef(Y(function(e,t){let n=Tt(Dt,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Z(Dt,e.__scopeDialog);return a.modal?(0,y.jsx)(_,{present:r||a.open,children:(0,y.jsx)(At,{...i,ref:t})}):null},`DialogOverlay`)),kt=a(`DialogOverlay.RemoveScroll`),At=v.forwardRef(Y(function(e,t){let{__scopeDialog:n,...r}=e,a=Z(Dt,n),o=d(),s=i(t,o);return(0,y.jsx)(ut,{as:kt,allowPinchZoom:!0,shards:[a.contentRef],children:(0,y.jsx)(m.div,{"data-state":$(a.open),...r,ref:s,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),Q=`DialogContent`,jt=v.forwardRef(Y(function(e,t){let n=Tt(Q,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Z(Q,e.__scopeDialog);return(0,y.jsx)(_,{present:r||a.open,children:a.modal?(0,y.jsx)(Mt,{...i,ref:t}):(0,y.jsx)(Nt,{...i,ref:t})})},`DialogContent`)),Mt=v.forwardRef(Y(function(e,t){let n=Z(Q,e.__scopeDialog),r=v.useRef(null),a=i(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return ht(e)},[]),(0,y.jsx)(Pt,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:u(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:u(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:u(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),Nt=v.forwardRef(Y(function(e,t){let n=Z(Q,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(Pt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),Pt=v.forwardRef(Y(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Z(Q,n);return k(),(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(ie,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,y.jsx)(h,{role:`dialog`,id:s.
41contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":$(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),Ft=`DialogTitle`,It=v.forwardRef(Y(function(e,t){let{__scopeDialog:n,...r}=e,i=Z(Ft,n),{setTitleCount:a}=i;return f(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,y.jsx)(m.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),Lt=`DialogClose`,Rt=v.forwardRef(Y(function(e,t){let{__scopeDialog:n,...r}=e,i=Z(Lt,n);return(0,y.jsx)(m.button,{type:`button`,...r,ref:t,onClick:u(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function $(e){return e?`open`:`closed`}Y($,`getState`);function zt(e={isOpen:!1}){let[t,n]=(0,v.useState)(),[r,i]=(0,v.useState)(e.isOpen),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(!1);return{isOpen:r,open:e=>{i(!0),(e||e===null)&&n(e)},setOpen:i,toggle:()=>i(!r),close:()=>i(!1),isLoading:a,setLoading:()=>o(!0),finishLoading:()=>o(!1),item:t,hideClose:s,setHideClose:c}}var Bt=({isOpen:e,setOpen:t,children:n,trigger:r,disabled:i,isLoading:a,className:s,title:c,blur:l=!1,hideClose:u,drawer:d=!1,fullDrawer:f=!1,sideDrawer:p=!1,restoreFocusId:m})=>(v.useEffect(()=>{e||setTimeout(()=>{document.body.style.pointerEvents=``},300)},[e]),(0,y.jsxs)(bt,{open:e,onOpenChange:e=>{i||a||u||t(e)},children:[r&&(0,y.jsx)(St,{asChild:!0,children:r}),(0,y.jsxs)(Et,{"data-slot":`dialog-portal`,children:[(0,y.jsx)(Ot,{"data-slot":`dialog-overlay`,className:o(`data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none`,`z-[999] fixed inset-0 data-[state=open]:fade-in-100 data-[state=closed]:fade-out-0`,l?`backdrop-blur-sm bg-black/50`:`bg-black/50`)}),(0,y.jsxs)(jt,{onCloseAutoFocus:e=>{m&&(e.preventDefault(),document.getElementById(m)?.focus())},"data-slot":`dialog-content`,className:o(`outline-none`,p&&`pointer-events-none`,`z-[999] fixed h-[100dvh] w-screen inset-0 overflow-y-auto overflow-x-hidden sid-scrollbar data-[state=open]:animate-in data-[state=closed]:animate-out motion-reduce:animate-none`,p?`data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right`:d?`data-[state=open]:slide-in-from-bottom-5 lg:data-[state=open]:slide-in-from-bottom-0 data-[state=closed]:slide-out-to-bottom-2 lg:data-[state=closed]:slide-out-to-bottom-0 lg:data-[state=open]:zoom-in-95 lg:data-[state=closed]:zoom-out-95 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`:`data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`),children:[c&&(0,y.jsx)(It,{className:`sr-only`,children:c}),p?(0,y.jsx)(`div`,{className:o(`pointer-events-auto fixed inset-y-0 right-0 h-[100dvh] w-full max-w-md overflow-y-auto border-l border-white/50 bg-white/95 p-6 shadow-2xl backdrop-blur-2xl sid-scrollbar`,s),children:n}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{onClick:()=>{i||a||u||t(!1)},className:o(`fixed outline-none w-screen h-screen`)}),(0,y.jsx)(`div`,{className:o(``,`flex flex-col w-screen min-h-screen`,d?`justify-end sm:justify-center`:`justify-center p-3`),children:(0,y.jsxs)(`div`,{className:o(`pointer-events-auto`,`relative gap-4 p-3 mx-auto w-full border shadow-lg duration-200 bg-background sm:max-w-lg`,d?`pb-20 rounded-t-lg sm:rounded-lg sm:pb-3`:`rounded-lg`,s),children:[n,d&&(0,y.jsx)(`div`,{style:{height:`env(safe-area-inset-bottom)`}})]})})]})]})]})]})),Vt=({children:e,close:t,className:n=``,disabled:r=!1,hideClose:i})=>(0,y.jsxs)(`div`,{className:`flex items-center mb-3`,children:[(0,y.jsx)(It,{"data-slot":`dialog-title`,className:o(`flex-1 font-montserrat font-semibold`,n),children:e}),!i&&(0,y.jsxs)(Rt,{"data-slot":`dialog-close`,onClick:t,disabled:r,children:[(0,y.jsx)(ne,{"aria-hidden":`true`,className:`size-5`}),(0,y.jsx)(`span`,{className:`sr-only`,children:(0,y.jsx)(s,{i18nKey:`close`,children:`Close`})})]})]});export{Vt as n,zt as r,Bt as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.