1import{Bt as e,G as t,H as n,It as r,J as i,L as a,Mt as o,Nt as s,Q as c,R as l,S as u,St as d,Vt as f,c as p,ct as m,f as h,g,h as _,m as v,mt as y,p as b,pt as x,st as S,w as C,yt as w,z as T}from"./C-yxSQ4o.js";import{t as E}from"./l-uCxTgS.js";import{N as D}from"./B_6Cc6Zx.js";import{c as ee,d as te,g as ne}from"./Da2X2dWM2.js";import{m as re,o as ie,v as O}from"./lA_XoI5N2.js";import{t as k}from"./LTR1k3pt.js";import{t as A}from"./BDNMzG2s.js";var j=Object.assign(C({__name:`background`,props:{variant:{default:`dark`}},setup(e){let t=e,n=h(()=>[`fixed inset-0`,{"bg-primary-950/80 backdrop-blur-xs":t.variant===`dark`},{"bg-gray-200/75 backdrop-blur-xs":t.variant===`light`},{"bg-transparent":t.variant===`transparent`}]);return(e,t)=>(i(),g(`div`,{class:w(f(n))},null,2))}}),{__name:`TModalBackground`}),ae={class:`flex justify-between items-center gap-4`},oe={class:`flex items-center gap-3`},se={key:0,class:`space-y-1`},M={key:0,class:`text-lg font-semibold mr-7 pr-4 leading-tight`},ce={key:1,class:`text-sm text-gray-500`},le=Object.assign(C({__name:`header`,props:{title:{},subtitle:{},enableCloseButton:{type:Boolean}},emits:[`close`],setup(e,{emit:t}){let n=t;return(t,r)=>{let a=k;return i(),g(`header`,ae,[b(`div`,oe,[c(t.$slots,`icon`),e.title||e.subtitle?(i(),g(`div`,se,[e.title?(i(),g(`h3`,M,d(e.title),1)):_(``,!0),e.subtitle?(i(),g(`p`,ce,d(e.subtitle),1)):_(``,!0)])):_(``,!0)]),e.enableCloseButton?(i(),g(`button`,{key:0,class:`size-8 rounded-full bg-transparent hover:bg-gray-50 transition-colors duration-200 flex items-center justify-center ml-auto cursor-pointer outline-primary-950 shrink-0 self-start`,type:`button`,onClick:r[0]||=e=>n(`close`)},[u(a,{icon:[`far`,`xmark`]})])):_(``,!0)])}}}),{__name:`TModalHeader`}),ue=Object.assign(C({__name:`body`,props:{enableScroll:{type:Boolean}},setup(e){let t=e,n=h(()=>[`space-y-3`,{"overflow-y-auto":t.enableScroll}]);return(e,t)=>(i(),g(`div`,{class:w(f(n))},[c(e.$slots,`default`)],2))}}),{__name:`TModalBody`}),de={},N={class:`relative transform flex flex-col bg-white text-left shadow-xl w-full`};function fe(e,t){return i(),g(`div`,N,[c(e.$slots,`default`)])}var pe=Object.assign(A(de,[[`render`,fe]]),{__name:`TModalContents`}),me={},he={tabindex:`0`};function ge(e,t){return i(),g(`div`,he,[c(e.$slots,`default`)])}var _e=Object.assign(A(me,[[`render`,ge]]),{__name:`TModalContentsWrapper`}),ve=[`open`],ye=Object.assign(C({inheritAttrs:!1,__name:`modal`,props:a({hasPriority:{type:Boolean}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:[`update:visible`],setup(e){let t=e,n=m(e,`visible`),r=s(!1),a=s(!1);x(n,e=>{e&&(r.value=!0,a.value=!0)},{immediate:!0});let o=h(()=>[`fixed inset-0 size-auto max-h-none max-w-none overflow-hidden bg-transparent backdrop:bg-transparent text-primary-950`,t.hasPriority?`z-[10001]`:`z-[10000]`]);return(e,t)=>(i(),v(p,{to:`#teleports`},[n.value?(i(),g(`dialog`,l({key:0},e.$attrs,{open:n.value,class:f(o)}),[c(e.$slots,`default`)],16,ve)):_(``,!0)]))}}),{__name:`TModal`});function be(){let e=D();function t(t){e.value.unshift(t)}function n(t){e.value=e.value.filter(e=>e!==t)}function r(t){return e.value[0]===t}return{stack:e,register:t,unregister:n,isTopModal:r}}function P(){let e=E(`document-scroll-lock`,()=>new Set),t=Symbol(`lock`),r=O(document);function i(){e.value.add(t)}function a(){e.value.delete(t)}return y(()=>{r.value=e.value.size>0}),n(()=>{a()}),{lock:i,unlock:a,isDocumentLocked:o(r)}}var F=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],I=F.join(`,`),L=typeof Element>`u`,R=L?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,z=!L&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},B=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):B(e.parentNode))},xe=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},V=function(e,t,n){if(B(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(I));return t&&R.call(e,I)&&r.unshift(e),r=r.filter(n),r},H=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!B(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=H(o.length?o:a.children,!0,n);
vendor: 8,670 bytes, lines 1-3
1n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{R.call(a,I)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!B(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=H(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},Se=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},U=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||xe(e))&&!Se(e)?0:e.tabIndex},Ce=function(e,t){var n=U(e);return n<0&&t&&!Se(e)?0:n},we=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Te=function(e){return e.tagName===`INPUT`},Ee=function(e){return Te(e)&&e.type===`hidden`},De=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Oe=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},ke=function(e){if(!e.name)return!0;var t=e.form||z(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=Oe(r,e.form);return!i||i===e},Ae=function(e){return Te(e)&&e.type===`radio`},je=function(e){return Ae(e)&&!ke(e)},Me=function(e){var t=e&&z(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=z(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},Ne=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},Pe=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=R.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(R.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=z(e);if(s&&!s.shadowRoot&&r(s)===!0)return Ne(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(Me(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return Ne(e);return!1},Fe=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return R.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},W=function(e,t){return!(t.disabled||Ee(t)||Pe(t,e)||De(t)||Fe(t))},G=function(e,t){return!(je(t)||U(t)<0||!W(e,t))},Ie=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},Le=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=Ce(a,i),s=i?Le(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(we).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Re=function(e,t){return t||={},Le(t.getShadowRoot?H([e],t.includeContainer,{filter:G.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ie}):V(e,t.includeContainer,G.bind(null,t)))},ze=function(e,t){return t||={},t.getShadowRoot?H([e],t.includeContainer,{filter:W.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):V(e,t.includeContainer,W.bind(null,t))},K=function(e,t){if(t||={},!e)throw Error(`No node provided`);return R.call(e,I)!==!1&&G(t,e)},Be=F.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),q=function(e,t){if(t||={},!e)throw Error(`No node provided`);return R.call(e,Be)!==!1&&W(t,e)};function J(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ve(e){if(Array.isArray(e))return J(e)}function He(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=Ze(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance. 2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function Ue(e,t,n){return(t=Xe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function We(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ge(){throw TypeError(`Invalid attempt to spread non-iterable instance. 3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ke(Object(n),!0).forEach(function(t){Ue(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Je(e){return Ve(e)||We(e)||Ze(e)||Ge()}function Ye(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Xe(e){var t=Ye(e,`string`);return typeof t==`symbol`?t:t+``}function Ze(e,t){if(e){if(typeof e==`string`)return J(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(e,t):void 0}}var Y={getActiveTrap:function(e){return e?.length>0?e[e.length-1]:null},activateTrap:function(e,t){t!==Y.getActiveTrap(e)&&Y.pauseTrap(e);var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),Y.unpauseTrap(e)},pauseTrap:function(e){Y.getActiveTrap(e)?._setPausedState(!0)},unpauseTrap:function(e){var t=Y.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},Qe=function(e){return e.tagName&&e.tagName.toLowerCase()===`input`&&typeof e.select==`function`},$e=function(e){return e?.key===`Escape`||e?.key===`Esc`||e?.keyCode===27},X=function(e){return e?.key===`Tab`||e?.keyCode===9},et=function(e){return X(e)&&!e.shiftKey},tt=function(e){return X(e)&&e.shiftKey},Z=function(e){return setTimeout(e,0)},Q=function(e){var t=[...arguments].slice(1);return typeof e==`function`?e.apply(void 0,t):e},$=function(e){return e.target.shadowRoot&&typeof e.composedPath==`function`?e.composedPath()[0]:e.target},nt=[],rt=function(e,t){var n=t?.document||document,r=t?.trapStack||nt,i=qe({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,delayReturnFocus:!0,isolateSubtrees:!1,isKeyForward:et,isKeyBackward:tt},t),a={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o,s=function(e,t,n){return e&&e[t]!==void 0?e[t]:i[n||t]},c=function(e,t){var n=typeof t?.composedPath==`function`?t.composedPath():void 0;return a.containerGroups.findIndex(function(t){var r=t.container,i=t.tabbableNodes;return r.contains(e)||n?.includes(r)||i.find(function(t){return t===e})})},l=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.hasFallback,a=r!==void 0&&r,o=t.params,s=o===void 0?[]:o,c=i[e];if(typeof c==`function`&&(c=c.apply(void 0,Je(s))),c===!0&&(c=void 0),!c){
3if(c===void 0||c===!1)return c;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}var l=c;if(typeof c==`string`){try{l=n.querySelector(c)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!l&&!a)throw Error(`\`${e}\` as selector refers to no known node`)}return l},u=function(e){var t=e.activeElement;return t?t.shadowRoot&&t.shadowRoot.activeElement!==null?u(t.shadowRoot):t:null},d=function(){var e=l(`initialFocus`,{hasFallback:!0});if(e===!1)return!1;if(e===void 0||e&&!q(e,i.tabbableOptions)){var t=u(n);if(c(t)>=0)e=t;else{var r=a.tabbableGroups[0];e=r&&r.firstTabbableNode||l(`fallbackFocus`)}}else e===null&&(e=l(`fallbackFocus`));if(!e)throw Error(`Your focus-trap needs to have at least one focusable element`);return e},f=function(){if(a.containerGroups=a.containers.map(function(e){var t=Re(e,i.tabbableOptions),n=ze(e,i.tabbableOptions),r=t.length>0?t[0]:void 0,a=t.length>0?t[t.length-1]:void 0,o=n.find(function(e){return K(e)}),s=n.slice().reverse().find(function(e){return K(e)});return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:!!t.find(function(e){return U(e)>0}),firstTabbableNode:r,lastTabbableNode:a,firstDomTabbableNode:o,lastDomTabbableNode:s,nextTabbableNode:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=t.indexOf(e);return i<0?r?n.slice(n.indexOf(e)+1).find(function(e){return K(e)}):n.slice(0,n.indexOf(e)).reverse().find(function(e){return K(e)}):t[i+(r?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(e){return e.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!l(`fallbackFocus`))throw Error(`Your focus-trap must have at least one container with at least one tabbable node in it at all times`);if(a.containerGroups.find(function(e){return e.posTabIndexesFound})&&a.containerGroups.length>1)throw Error(`At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.`)},p=function(e){if(e!==!1&&e!==u(document)){if(!e||!e.focus){p(d());return}
vendor: 4,066 bytes, line 3
3e.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=e,Qe(e)&&e.select()}},m=function(e){var t=l(`setReturnFocus`,{params:[e]});return t||t!==!1&&e},h=function(e){var t=e.target,n=e.event,r=e.isBackward,o=r!==void 0&&r;t||=$(n),f();var s=null;if(a.tabbableGroups.length>0){var u=c(t,n),d=u>=0?a.containerGroups[u]:void 0;if(u<0)s=o?a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:a.tabbableGroups[0].firstTabbableNode;else if(o){var p=a.tabbableGroups.findIndex(function(e){var n=e.firstTabbableNode;return t===n});if(p<0&&(d.container===t||q(t,i.tabbableOptions)&&!K(t,i.tabbableOptions)&&!d.nextTabbableNode(t,!1))&&(p=u),p>=0){var m=p===0?a.tabbableGroups.length-1:p-1,h=a.tabbableGroups[m];s=U(t)>=0?h.lastTabbableNode:h.lastDomTabbableNode}else X(n)||(s=d.nextTabbableNode(t,!1))}else{var g=a.tabbableGroups.findIndex(function(e){var n=e.lastTabbableNode;return t===n});if(g<0&&(d.container===t||q(t,i.tabbableOptions)&&!K(t,i.tabbableOptions)&&!d.nextTabbableNode(t))&&(g=u),g>=0){var _=g===a.tabbableGroups.length-1?0:g+1,v=a.tabbableGroups[_];s=U(t)>=0?v.firstTabbableNode:v.firstDomTabbableNode}else X(n)||(s=d.nextTabbableNode(t))}}else s=l(`fallbackFocus`);return s},g=function(e){if(!(c($(e),e)>=0)){if(Q(i.clickOutsideDeactivates,e)){o.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Q(i.allowOutsideClick,e)||e.preventDefault()}},_=function(e){var t=$(e),n=c(t,e)>=0;if(n||t instanceof Document)n&&(a.mostRecentlyFocusedNode=t);else{e.stopImmediatePropagation();var r,o=!0;if(a.mostRecentlyFocusedNode)if(U(a.mostRecentlyFocusedNode)>0){var s=c(a.mostRecentlyFocusedNode),l=a.containerGroups[s].tabbableNodes;if(l.length>0){var u=l.findIndex(function(e){return e===a.mostRecentlyFocusedNode});u>=0&&(i.isKeyForward(a.recentNavEvent)?u+1<l.length&&(r=l[u+1],o=!1):u-1>=0&&(r=l[u-1],o=!1))}}else a.containerGroups.some(function(e){return e.tabbableNodes.some(function(e){return U(e)>0})})||(o=!1);else o=!1;o&&(r=h({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),p(r||a.mostRecentlyFocusedNode||d())}a.recentNavEvent=void 0},v=function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a.recentNavEvent=e;var n=h({event:e,isBackward:t});n&&(X(e)&&e.preventDefault(),p(n))},y=function(e){(i.isKeyForward(e)||i.isKeyBackward(e))&&v(e,i.isKeyBackward(e))},b=function(e){$e(e)&&Q(i.escapeDeactivates,e)!==!1&&(e.preventDefault(),o.deactivate())},x=function(e){c($(e),e)>=0||Q(i.clickOutsideDeactivates,e)||Q(i.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},S=function(){if(a.active){Y.activateTrap(r,o);var e;return i.delayInitialFocus?e=new Promise(function(e){a.delayInitialFocusTimer=Z(function(){p(d()),e()})}):p(d()),n.addEventListener(`focusin`,_,!0),n.addEventListener(`mousedown`,g,{capture:!0,passive:!1}),n.addEventListener(`touchstart`,g,{capture:!0,passive:!1}),n.addEventListener(`click`,x,{capture:!0,passive:!1}),n.addEventListener(`keydown`,y,{capture:!0,passive:!1}),n.addEventListener(`keydown`,b),e}},C=function(e){a.active&&!a.paused&&o._setSubtreeIsolation(!1),a.adjacentElements.clear(),a.alreadySilent.clear();var t=new Set,n=new Set,r=He(e),i;try{for(r.s();!(i=r.n()).done;){var s=i.value;t.add(s);for(var c=typeof ShadowRoot<`u`&&s.getRootNode()instanceof ShadowRoot,l=s;l;){t.add(l);var u=l.parentElement,d=[];u?d=u.children:!u&&c&&(d=l.getRootNode().children,u=l.getRootNode().host,c=typeof ShadowRoot<`u`&&u.getRootNode()instanceof ShadowRoot);var f=He(d),p;try{for(f.s();!(p=f.n()).done;){var m=p.value;n.add(m)}}catch(e){f.e(e)}finally{f.f()}l=u}}}catch(e){r.e(e)}finally{r.f()}t.forEach(function(e){n.delete(e)}),a.adjacentElements=n},w=function(){if(a.active)return n.removeEventListener(`focusin`,_,!0),n.removeEventListener(`mousedown`,g,!0),n.removeEventListener(`touchstart`,g,!0),n.removeEventListener(`click`,x,!0),n.removeEventListener(`keydown`,y,!0),n.removeEventListener(`keydown`,b),o},T=typeof window<`u`&&`MutationObserver`in window?new MutationObserver(function(e){var t=a.mostRecentlyFocusedNode;
3t&&e.some(function(e){return Array.from(e.removedNodes).some(function(e){return e===t||typeof e.contains==`function`&&e.contains(t)})})&&a.containers.some(function(e){return e?.isConnected})&&(f(),p(d()))}):void 0,E=function(){T&&(T.disconnect(),a.active&&!a.paused&&a.containers.map(function(e){T.observe(e,{subtree:!0,childList:!0})}))};return o={get active(){return a.active},get paused(){return a.paused},activate:function(e){if(a.active)return this;var t=s(e,`onActivate`),i=s(e,`onPostActivate`),c=s(e,`checkCanFocusTrap`),l=Y.getActiveTrap(r),d=!1;if(l&&!l.paused){var p;(p=l._setSubtreeIsolation)==null||p.call(l,!1),d=!0}try{c||f(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=u(n),t?.({trap:o});var m=function(){c&&f();var e=function(){o._setSubtreeIsolation(!0),E(),i?.({trap:o})},t=S();t?t.then(e):e()};if(c)return c(a.containers.concat()).then(m,m),this;m()}catch(e){if(l===Y.getActiveTrap(r)&&d){var h;(h=l._setSubtreeIsolation)==null||h.call(l,!0)}throw e}return this},deactivate:function(e){if(!a.active)return this;var t=qe({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},e);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,a.paused||o._setSubtreeIsolation(!1),a.alreadySilent.clear(),w(),a.active=!1,a.paused=!1,E(),Y.deactivateTrap(r,o);var n=s(t,`onDeactivate`),c=s(t,`onPostDeactivate`),l=s(t,`checkCanReturnFocus`),u=s(t,`delayReturnFocus`),d=s(t,`returnFocus`,`returnFocusOnDeactivate`);n?.({trap:o});var f=function(){d&&p(m(a.nodeFocusedBeforeActivation)),c?.({trap:o})},h=function(){u&&d?Z(f):f()};return d&&l?(l(m(a.nodeFocusedBeforeActivation)).then(h,h),this):(h(),this)},pause:function(e){return a.active?(a.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function(e){return!a.active||(a.manuallyPaused=!1,r[r.length-1]!==this)?this:this._setPausedState(!1,e)},updateContainerElements:function(e){return a.containers=[].concat(e).filter(
3Boolean).map(function(e){return typeof e==`string`?n.querySelector(e):e}),i.isolateSubtrees&&C(a.containers),a.active&&(f(),a.paused||o._setSubtreeIsolation(!0)),E(),this}},Object.defineProperties(o,{_isManuallyPaused:{value:function(){return a.manuallyPaused}},_setPausedState:{value:function(e,t){if(a.paused===e)return this;if(a.paused=e,e){var n=s(t,`onPause`),r=s(t,`onPostPause`);n?.({trap:o}),w(),o._setSubtreeIsolation(!1),E(),r?.({trap:o})}else{var i=s(t,`onUnpause`),c=s(t,`onPostUnpause`);i?.({trap:o}),(function(){f();var e=function(){o._setSubtreeIsolation(!0),E(),c?.({trap:o})},t=S();t?t.then(e):e()})()}return this}},_setSubtreeIsolation:{value:function(e){i.isolateSubtrees&&a.adjacentElements.forEach(function(t){if(e)switch(i.isolateSubtrees){case`aria-hidden`:(t.ariaHidden===`true`||t.getAttribute(`aria-hidden`)?.toLowerCase()===`true`)&&a.alreadySilent.add(t),t.setAttribute(`aria-hidden`,`true`);break;default:(t.inert||t.hasAttribute(`inert`))&&a.alreadySilent.add(t),t.setAttribute(`inert`,!0);break}else if(!a.alreadySilent.has(t))switch(i.isolateSubtrees){case`aria-hidden`:t.removeAttribute(`aria-hidden`);break;default:t.removeAttribute(`inert`);break}})}}}),o.updateContainerElements(e),o};function it(t,n={}){let i,{immediate:a,...o}=n,s=r(!1),c=r(!1),l=e=>i&&i.activate(e),u=e=>i&&i.deactivate(e);return x(h(()=>te(e(t)).map(t=>{let n=e(t);return typeof n==`string`?n:ie(n)}).filter(ee)),e=>{if(e.length)if(!i)i=rt(e,{...o,onActivate(e){s.value=!0,n.onActivate&&n.onActivate(e)},onDeactivate(e){s.value=!1,n.onDeactivate&&n.onDeactivate(e)}}),a&&l();else{let t=i?.active;i?.updateContainerElements(e),!t&&a&&l()}},{flush:`post`}),ne(()=>u()),{hasFocus:s,isPaused:c,activate:l,deactivate:u,pause:()=>{i&&(i.pause(),c.value=!0)},unpause:()=>{i&&(i.unpause(),c.value=!1)}}}function at(e){let{mobileType:r=`drawer`,positionModal:i=`center`,positionDrawer:a=`bottom`,enableOutsideDismiss:o=!1,enableEscapeKey:c=!1,enableScrollLock:l=!1,visible:u,onClose:d,modalRef:f,focusTrapOptions:p={clickOutsideDeactivates:!0,escapeDeactivates:!0}}=e,m=s(S()),{activate:g,deactivate:_}=it(f,p),{register:v,unregister:y,isTopModal:b}=be();x(u,e=>{e?v(m.value):y(m.value)},{immediate:!0});let C=h(()=>b(m.value));x(C,async e=>{await T(),e?g():_()},{immediate:!0}),n(()=>{y(m.value)});let w=h(()=>r===`drawer`),E=h(()=>{let t=`flex justify-center text-center focus:outline-none h-full`;if(!w.value)return[t,`p-4`,{center:`items-center`,top:`items-start`,bottom:`items-end`}[i]];let n=a===`bottom`?`items-end`:`items-start`;return[t,[`p-0`,{"md:p-4":e.size?.value!==`full`}],n,`md:items-center`]}),D=h(()=>{let t=w.value?{sm:`md:max-w-sm`,md:`md:max-w-md`,lg:`md:max-w-lg`,xl:`md:max-w-xl`,"2xl":`md:max-w-2xl`,"3xl":`md:max-w-3xl`,"4xl":`md:max-w-4xl`,"5xl":`md:max-w-5xl`,"6xl":`md:max-w-6xl`,full:`w-full h-dvh min-h-0 overflow-hidden`}:{sm:`max-w-sm`,md:`max-w-md`,lg:`max-w-lg`,xl:`max-w-xl`,"2xl":`max-w-2xl`,"3xl":`max-w-3xl`,"4xl":`max-w-4xl`,"5xl":`max-w-5xl`,"6xl":`max-w-6xl`,full:`w-full h-dvh min-h-0 overflow-hidden`},n=`rounded-xl`;
3return e.size?.value===`full`?n=``:w.value&&(a===`bottom`?n=`rounded-t-xl sm:rounded-xl`:a===`top`&&(n=`rounded-b-xl sm:rounded-xl`)),[`relative transform flex flex-col bg-white text-left shadow-xl w-full max-h-full transition-[max-width] duration-300 ease-in-out`,t[e.size?.value??`md`],n]}),ee=h(()=>[`relative p-4 pb-0 md:p-5 md:pb-0`,{"shrink-0":e.size?.value===`full`}]),te=h(()=>[`p-4 md:p-5`,{"flex flex-col flex-1 min-h-0 overflow-hidden":e.size?.value===`full`}]),ne=h(()=>[`p-4 md:p-5`]),ie=h(()=>{let e=`transition-all duration-300 ease-in-out`;if(!w.value)return{enterActive:e,leaveActive:e,enterFrom:`opacity-0 scale-95`,leaveTo:`opacity-0 scale-95`};let t=a===`bottom`?`translate-y-full`:`-translate-y-full`;return{enterActive:e,leaveActive:e,enterFrom:`opacity-0 ${t} sm:translate-y-0 sm:opacity-0 sm:scale-95`,leaveTo:`opacity-0 ${t} sm:translate-y-0 sm:opacity-0 sm:scale-95`}}),O=s(!1),k=s(!1),A=s(`close`),{lock:j,unlock:ae,isDocumentLocked:oe}=P();x(u,e=>{e?(O.value=!0,k.value=!1):k.value=!0}),t(()=>{u.value&&(O.value=!0,k.value=!1,l&&j())}),l&&x(u,e=>{e?j():ae()});function se(){O.value=!1,k.value=!1,u.value=!1,d?.(A.value)}function M(e=`close`){A.value=e,k.value=!0}function ce(){O.value=!0,k.value=!1,u.value=!0}function le(){o&&M(`clickoutside`)}if(c){let{escape:e}=re();e&&x(e,e=>{e&&N()})}function ue(){M(`close`)}function de(){M(`button`)}function N(){M(`esc`)}function fe(){M(`clickoutside`)}return{wrapperClasses:E,contentClasses:D,headerClasses:ee,bodyClasses:te,footerClasses:ne,transitionClasses:ie,isMobileDrawer:w,isVisible:O,isAnimating:k,handleAfterLeave:se,close:M,open:ce,closeWithButton:de,closeWithExitButton:ue,closeWithEscape:N,closeWithOutsideClick:fe,handleBackgroundClick:le,enableOutsideDismiss:o,enableEscapeKey:c,enableScrollLock:l,isLocked:oe,shouldTrapFocus:C,modalRef:f}}export{pe as a,j as c,_e as i,P as n,ue as o,ye as r,le as s,at as t}; 4//# sourceMappingURL=BSIVGFOb2.js.map
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.