1import{c as L}from"./Be1fzYNM.js";import{a3 as B,a4 as S,a8 as D,ao as E,g as w,ah as K,H as b,x as a,B as p,v as d,N as u,aj as i,A as v,ak as R,U as I,K as l,Q as P,y,L as A,z as x,V as $}from"./C-jFTK7P.js";import{Z as m}from"./DGEOgZpe.js";import{s as O}from"./D3LvJICj.js";import V from"./TTluGK-M.js";import{F as Z}from"./DQ7tVInm.js";import{s as j}from"./DeyNh_UT.js";import{u as z,b as N}from"./COT4P5FY.js";import{s as T}from"./D6ccI_RY.js";import"./ks5VOnq0.js";import"./DE--nLB0.js";import"./DEpaNUPv.js";import"./b10xiphM.js";import"./DIBD5wcJ.js";import"./DmfvTtO6.js";var F=B` 2 .p-drawer { 3 display: flex; 4 flex-direction: column; 5 transform: translate3d(0px, 0px, 0px); 6 position: relative; 7 transition: transform 0.3s; 8 background: dt('drawer.background'); 9 color: dt('drawer.color'); 10 border: 1px solid dt('drawer.border.color'); 11 box-shadow: dt('drawer.shadow'); 12 } 13 14 .p-drawer-content { 15 overflow-y: auto; 16 flex-grow: 1; 17 padding: dt('drawer.content.padding'); 18 } 19 20 .p-drawer-header { 21 display: flex; 22 align-items: center; 23 justify-content: space-between; 24 flex-shrink: 0; 25 padding: dt('drawer.header.padding'); 26 } 27 28 .p-drawer-footer { 29 padding: dt('drawer.footer.padding'); 30 } 31 32 .p-drawer-title { 33 font-weight: dt('drawer.title.font.weight'); 34 font-size: dt('drawer.title.font.size'); 35 } 36 37 .p-drawer-full .p-drawer { 38 transition: none; 39 transform: none; 40 width: 100vw !important; 41 height: 100vh !important; 42 max-height: 100%; 43 top: 0px !important; 44 left: 0px !important; 45 border-width: 1px; 46 } 47 48 .p-drawer-left .p-drawer-enter-from, 49 .p-drawer-left .p-drawer-leave-to { 50 transform: translateX(-100%); 51 } 52 53 .p-drawer-right .p-drawer-enter-from, 54 .p-drawer-right .p-drawer-leave-to { 55 transform: translateX(100%); 56 } 57 58 .p-drawer-top .p-drawer-enter-from, 59 .p-drawer-top .p-drawer-leave-to { 60 transform: translateY(-100%); 61 } 62 63 .p-drawer-bottom .p-drawer-enter-from, 64 .p-drawer-bottom .p-drawer-leave-to { 65 transform: translateY(100%); 66 } 67 68 .p-drawer-full .p-drawer-enter-from, 69 .p-drawer-full .p-drawer-leave-to { 70 opacity: 0; 71 } 72 73 .p-drawer-full .p-drawer-enter-active, 74 .p-drawer-full .p-drawer-leave-active { 75 transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1); 76 } 77 78 .p-drawer-left .p-drawer { 79 width: 20rem; 80 height: 100%; 81 border-inline-end-width: 1px; 82 } 83 84 .p-drawer-right .p-drawer { 85 width: 20rem; 86 height: 100%; 87 border-inline-start-width: 1px; 88 } 89 90 .p-drawer-top .p-drawer { 91 height: 10rem; 92 width: 100%; 93 border-block-end-width: 1px; 94 } 95 96 .p-drawer-bottom .p-drawer { 97 height: 10rem; 98 width: 100%; 99 border-block-start-width: 1px; 100 } 101 102 .p-drawer-left .p-drawer-content, 103 .p-drawer-right .p-drawer-content, 104 .p-drawer-top .p-drawer-content, 105 .p-drawer-bottom .p-drawer-content { 106 width: 100%; 107 height: 100%; 108 } 109 110 .p-drawer-open { 111 display: flex; 112 } 113 114 .p-drawer-mask:dir(rtl) { 115 flex-direction: row-reverse; 116 } 117`,M={mask:function(t){var r=t.position,o=t.modal;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:r==="left"?"flex-start":r==="right"?"flex-end":"center",alignItems:r==="top"?"flex-start":r==="bottom"?"flex-end":"center",pointerEvents:o?"auto":"none"}},root:{pointerEvents:"auto"}},U={mask:function(t){var r=t.instance,o=t.props,s=["left","right","top","bottom"],n=s.find(function(f){return f===o.position});return["p-drawer-mask",{"p-overlay-mask p-overlay-mask-enter":o.modal,"p-drawer-open":r.containerVisible,"p-drawer-full":r.fullScreen},n?"p-drawer-".concat(n):""]},root:function(t){var r=t.instance;return["p-drawer p-component",{"p-drawer-full":r.fullScreen}]},header:"p-drawer-header",title:"p-drawer-title",pcCloseButton:"p-drawer-close-button",content:"p-drawer-content",footer:"p-drawer-footer"},X=S.extend({name:"drawer",style:F,classes:U,inlineStyles:M}),Y={name:"BaseDrawer",extends:T,props:{visible:{type:Boolean,default:!1},position:{type:String,default:"left"},header:{type:null,default:null},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},dismissable:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!0},closeButtonProps:{type:Object,default:function(){return{severity:"secondary",text:!0,rounded:!0}}},closeIcon:{type:String,default:void 0},modal:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1}},style:X,provide:function(){return{$pcDrawer:this,$parentInstance:this}}};function c(e){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(e)}function h(e,t,r){return(t=q(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q(e){var t=H(e,"string");return c(t)=="symbol"?t:t+""}function H(e,t){if(c(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(c(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Q={name:"Drawer",extends:Y,inheritAttrs:!1,emits:["update:visible","show","after-show","hide","after-hide","before-hide"],data:function(){return{containerVisible:this.visible}},container:null,mask:null,content:null,headerContainer:null,footerContainer:null,closeButton:null,outsideClickListener:null,documentKeydownListener:null,wat
117ch:{dismissable:function(t){t?this.enableDocumentSettings():this.disableDocumentSettings()}},updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.disableDocumentSettings(),this.mask&&this.autoZIndex&&m.clear(this.mask),this.container=null,this.mask=null},methods:{hide:function(){this.$emit("update:visible",!1)},onEnter:function(){this.$emit("show"),this.focus(),this.bindDocumentKeyDownListener(),this.autoZIndex&&m.set("modal",this.mask,this.baseZIndex||this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.enableDocumentSettings(),this.$emit("after-show")},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&E(this.mask,"p-overlay-mask-leave"),this.$emit("before-hide")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(){this.autoZIndex&&m.clear(this.mask),this.unbindDocumentKeyDownListener(),this.containerVisible=!1,this.disableDocumentSettings(),this.$emit("after-hide")},onMaskClick:function(t){this.dismissable&&this.modal&&this.mask===t.target&&this.hide()},focus:function(){var t=function(s){return s&&s.querySelector("[autofocus]")},r=this.$slots.header&&t(this.headerContainer);r||(r=this.$slots.default&&t(this.container),r||(r=this.$slots.footer&&t(this.footerContainer),r||(r=this.closeButton))),r&&D(r)},enableDocumentSettings:function(){this.dismissable&&!this.modal&&this.bindOutsideClickListener(),this.blockScroll&&N()},disableDocumentSettings:function(){this.unbindOutsideClickListener(),this.blockScroll&&z()},onKeydown:function(t){t.code==="Escape"&&this.hide()},containerRef:function(t){this.container=t},maskRef:function(t){this.mask=t},contentRef:function(t){this.content=t},headerContainerRef:function(t){this.headerContainer=t},footerContainerRef:function(t){this.footerContainer=t},closeButtonRef:function(t){this.closeButton=t?t.$el:void 0},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeydown,document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},bindOutsideClickListener:function(){var t=this;this.outsideClickListener||(this.outsideClickListener=function(r){t.isOutsideClicked(r)&&t.hide()},document.addEventListener("click",this.outsideClickListener,!0))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener,!0),this.outsideClickListener=null)},isOutsideClicked:function(t){return this.container&&!this.container.contains(t.target)}},computed:{fullScreen:function(){return this.position==="full"},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},dataP:function(){return L(h(h(h({"full-screen":this.position==="full"},this.position,this.position),"open",this.containerVisible),"modal",this.modal))}},directives:{focustrap:Z},components:{Button:V,Portal:j,TimesIcon:O}},G=["data-p"],J=["aria-modal","data-p"];function W(e,t,r,o,s,n){var f=w("Button"),k=w("Portal"),g=K("focustrap");return a(),b(k,null,{default:p(function(){return[s.containerVisible?(a(),d("div",i({key:0,ref:n.maskRef,onMousedown:t[0]||(t[0]=function(){return n.onMaskClick&&n.onMaskClick.apply(n,arguments)}),class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position,modal:e.modal}),"data-p":n.dataP},e.ptm("mask")),[v(R,i({name:"p-drawer",onEnter:n.onEnter,onAfterEnter:n.onAfterEnter,onBeforeLeave:n.onBeforeLeave,onLeave:n.onLeave,onAfterLeave:n.onAfterLeave,appear:""},e.ptm("transition")),{default:p(function(){return[e.visible?I((a(),d("div",i({key:0,ref:n.containerRef,class:e.cx("root"),style:e.sx("root"),role:"complementary","aria-modal":e.modal,"data-p":n.dataP},e.ptmi("root")),[e.$slots.container?l(e.$slots,"container",{key:0,closeCallback:n.hide}):(a(),d(P,{key:1},[y("div",i({ref:n.headerContainerRef,class:e.cx("header")},e.ptm("header")),[l(e.$slots,"header",{class:A(e.cx("title"))},function(){return[e.header?(a(),d("div",i({key:0,class:e.cx("title")},e.ptm("title")),x(e.header),17)):u("",!0)]}),e.showCloseIcon?l(e.$slots,"closebutton",{key:0,closeCallback:n.hide},function(){return[v(f,i({ref:n.closeButtonRef,type:"button",class:e.cx("pcCloseButton"),"aria-label":n.closeAriaLabel,unstyled:e.unstyled,onClick:n.hide},e.closeButtonProps,{pt:e.ptm("pcCloseButton"),"data-pc-group-section":"iconcontainer"}),{icon:p(function(C){return[l(e.$slots,"closeicon",{},function(){return[(a(),b($(e.closeIcon?"span":"TimesIcon"),i({class:[e.closeIcon,C.class]},e.ptm("pcCloseButton").icon),null,16,["class"]))]})]}),_:3},16,["class","aria-label","unstyled","onClick","pt"])]}):u("",!0)],16),y("div",i({ref:n.contentRef,class:e.cx("content")},e.ptm("content")),[l(e.$slots,"default")],16),e.$slots.footer?(a(),d("div",i({key:0,ref:n.footerContainerRef,class:e.cx("footer")},e.ptm("footer")),[l(e.$slots,"footer")],16)):u("",!0)],64))],16,J)),[[g]]):u("",!0)]}),_:3},16,["onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],16,G)):u("",!0)]}),_:3})}Q.render=W;export{Q as default};
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.