Files
tehran_taj/apps/user-app/dist/assets/KeyCode-CWsxcJGl.js
T

2 lines
1.6 KiB
JavaScript
Raw Normal View History

import{ac as d,i as f,ar as g,d as P,ae as p,O as C,T,a0 as m,X as R,a as h,q as x,bi as y}from"./index-bXlTbVTS.js";var E=!1;try{var c=Object.defineProperty({},"passive",{get:function(){E=!0}});window.addEventListener("testPassive",null,c),window.removeEventListener("testPassive",null,c)}catch{}var j=Symbol("TriggerContextKey"),K=function(e){return e?d(j,{setPortal:function(){},popPortal:!1}):{setPortal:function(){},popPortal:!1}},v=Symbol("PortalContextKey"),b=function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};g(v,{inTriggerContext:i.inTriggerContext,shouldRender:f(function(){var n=e||{},u=n.sPopupVisible,t=n.popupRef,l=n.forceRender,r=n.autoDestroy,s=!1;return(u||t||l)&&(s=!0),!u&&r&&(s=!1),s})})},D=function(){b({},{inTriggerContext:!1});var e=d(v,{shouldRender:f(function(){return!1}),inTriggerContext:!1});return{shouldRender:f(function(){return e.shouldRender.value||e.inTriggerContext===!1})}};const N=P({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:p.func.isRequired,didUpdate:Function},setup:function(e,i){var n=i.slots,u=!0,t,l=D(),r=l.shouldRender;C(function(){u=!1,r.value&&(t=e.getContainer())});var s=T(r,function(){r.value&&!t&&(t=e.getContainer()),t&&s()});return m(function(){R(function(){if(r.value){var o;(o=e.didUpdate)===null||o===void 0||o.call(e,e)}})}),h(function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),function(){if(!r.value)return null;if(u){var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}return t?x(y,{to:t},n):null}}});var O={ESC:27,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};export{O as K,N as P,K as a,E as s,b as u};