@citizenplane/pimp 18.9.12 → 18.9.13
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.
|
@@ -5,6 +5,7 @@ interface InputsOptions {
|
|
|
5
5
|
yearInputPlaceholder?: string;
|
|
6
6
|
}
|
|
7
7
|
interface Props {
|
|
8
|
+
allowEmpty?: boolean;
|
|
8
9
|
autocompleteBirthday?: boolean;
|
|
9
10
|
disabled?: boolean;
|
|
10
11
|
displayErrorMessage?: boolean;
|
|
@@ -37,6 +38,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
37
38
|
isInvalid: boolean;
|
|
38
39
|
errorMessage: string;
|
|
39
40
|
displayErrorMessage: boolean;
|
|
41
|
+
allowEmpty: boolean;
|
|
40
42
|
autocompleteBirthday: boolean;
|
|
41
43
|
inputsOptions: InputsOptions;
|
|
42
44
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CpDate.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpDate.vue"],"names":[],"mappings":"AAuDA;
|
|
1
|
+
{"version":3,"file":"CpDate.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpDate.vue"],"names":[],"mappings":"AAuDA;AA8fA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAYxC,UAAU,aAAa;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B;AAGD,UAAU,KAAK;IACb,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,KAAK,CAAA;CACb;;;;;;;;WAPS,MAAM;UAMP,KAAK;cADD,OAAO;aAFR,MAAM,GAAG,IAAI;aADb,MAAM,GAAG,IAAI;YADd,MAAM;cANJ,OAAO;gBASL,MAAM,GAAG,IAAI;eALd,OAAO;kBAFJ,MAAM;yBADC,OAAO;gBAHhB,OAAO;0BACG,OAAO;mBAId,aAAa;;AA6Y/B,wBAQG"}
|
package/dist/pimp.es.js
CHANGED
|
@@ -27827,6 +27827,10 @@ var mj = { class: "cpMenuItem" }, hj = ["disabled"], gj = {
|
|
|
27827
27827
|
}, Oj = /* @__PURE__ */ h({
|
|
27828
27828
|
__name: "CpDate",
|
|
27829
27829
|
props: {
|
|
27830
|
+
allowEmpty: {
|
|
27831
|
+
type: Boolean,
|
|
27832
|
+
default: !1
|
|
27833
|
+
},
|
|
27830
27834
|
autocompleteBirthday: {
|
|
27831
27835
|
type: Boolean,
|
|
27832
27836
|
default: !1
|
|
@@ -27869,7 +27873,7 @@ var mj = { class: "cpMenuItem" }, hj = ["disabled"], gj = {
|
|
|
27869
27873
|
year: Number(h.value),
|
|
27870
27874
|
month: Number(m.value),
|
|
27871
27875
|
day: Number(d.value)
|
|
27872
|
-
}).toISODate()), C = i(() => Y.fromISO(r.minDate)), w = i(() => Y.fromISO(r.maxDate)), E = i(() => S.value >= C.value.toISODate()), D = i(() => S.value <= w.value.toISODate()), O = i(() => d.value === "" && m.value === "" && h.value === ""), k = i(() => O.value && !r.required ? !0 : !r.isInvalid && A.value && ee.value && te.value && D.value && E.value), A = i(() => Number(d.value) >= 1 && Number(d.value) <= b.value), ee = i(() => !!m.value), te = i(() => Number(h.value) >= v.value && Number(h.value) <= y.value), ne = i(() => k.value || !r.displayErrorMessage ? "" : r.errorMessage ? r.errorMessage : ee.value ? A.value ? te.value ? D.value ? E.value ? "" : `The date can't be before ${C.value.toFormat("DDD")}.` : `The date can't be after ${w.value.toFormat("DDD")}.` : `Year must be in the range ${v.value} – ${y.value}.` : `Day must be in the range 1 – ${b.value}.` : "Month is required."), re = i(() => [`cpDate--${r.size}`, {
|
|
27876
|
+
}).toISODate()), C = i(() => Y.fromISO(r.minDate)), w = i(() => Y.fromISO(r.maxDate)), E = i(() => S.value >= C.value.toISODate()), D = i(() => S.value <= w.value.toISODate()), O = i(() => d.value === "" && m.value === "" && h.value === ""), k = i(() => O.value && (!r.required || r.allowEmpty) ? !0 : !r.isInvalid && A.value && ee.value && te.value && D.value && E.value), A = i(() => Number(d.value) >= 1 && Number(d.value) <= b.value), ee = i(() => !!m.value), te = i(() => Number(h.value) >= v.value && Number(h.value) <= y.value), ne = i(() => k.value || !r.displayErrorMessage ? "" : r.errorMessage ? r.errorMessage : ee.value ? A.value ? te.value ? D.value ? E.value ? "" : `The date can't be before ${C.value.toFormat("DDD")}.` : `The date can't be after ${w.value.toFormat("DDD")}.` : `Year must be in the range ${v.value} – ${y.value}.` : `Day must be in the range 1 – ${b.value}.` : "Month is required."), re = i(() => [`cpDate--${r.size}`, {
|
|
27873
27877
|
"cpDate--isInvalid": !k.value,
|
|
27874
27878
|
"cpDate--isDisabled": r.disabled
|
|
27875
27879
|
}]), ie = i(() => ({ "cpDate__month--isEmpty": !m.value })), ae = i(() => r.autocompleteBirthday ? {
|
package/dist/pimp.umd.js
CHANGED
|
@@ -345,7 +345,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
`,classes:{root:`p-ink`}}),Fk=$.extend({style:Pk});function Ik(e){"@babel/helpers - typeof";return Ik=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ik(e)}function Lk(e){return Vk(e)||Bk(e)||zk(e)||Rk()}function Rk(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
348
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zk(e,t){if(e){if(typeof e==`string`)return Hk(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)?Hk(e,t):void 0}}function Bk(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Vk(e){if(Array.isArray(e))return Hk(e)}function Hk(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 Uk(e,t,n){return(t=Wk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wk(e){var t=Gk(e,`string`);return Ik(t)==`symbol`?t:t+``}function Gk(e,t){if(Ik(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ik(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Kk=Fk.extend(`ripple`,{watch:{"config.ripple":function(e){e?(this.createRipple(this.$host),this.bindEvents(this.$host),this.$host.setAttribute(`data-pd-ripple`,!0),this.$host.style.overflow=`hidden`,this.$host.style.position=`relative`):(this.remove(this.$host),this.$host.removeAttribute(`data-pd-ripple`))}},unmounted:function(e){this.remove(e)},timeout:void 0,methods:{bindEvents:function(e){e.addEventListener(`mousedown`,this.onMouseDown.bind(this))},unbindEvents:function(e){e.removeEventListener(`mousedown`,this.onMouseDown.bind(this))},createRipple:function(e){var t=this.getInk(e);t||(t=Or(`span`,Uk(Uk({role:`presentation`,"aria-hidden":!0,"data-p-ink":!0,"data-p-ink-active":!1,class:!this.isUnstyled()&&this.cx(`root`),onAnimationEnd:this.onAnimationEnd.bind(this)},this.$attrSelector,``),`p-bind`,this.ptm(`root`))),e.appendChild(t),this.$el=t)},remove:function(e){var t=this.getInk(e);t&&(this.$host.style.overflow=``,this.$host.style.position=``,this.unbindEvents(e),t.removeEventListener(`animationend`,this.onAnimationEnd),t.remove())},onMouseDown:function(e){var t=this,n=e.currentTarget,r=this.getInk(n);if(!(!r||getComputedStyle(r,null).display===`none`)){if(!this.isUnstyled()&&lr(r,`p-ink-active`),r.setAttribute(`data-p-ink-active`,`false`),!Pr(r)&&!Hr(r)){var i=Math.max(br(n),zr(n));r.style.height=i+`px`,r.style.width=i+`px`}var a=Rr(n),o=e.pageX-a.left+document.body.scrollTop-Hr(r)/2,s=e.pageY-a.top+document.body.scrollLeft-Pr(r)/2;r.style.top=s+`px`,r.style.left=o+`px`,!this.isUnstyled()&&or(r,`p-ink-active`),r.setAttribute(`data-p-ink-active`,`true`),this.timeout=setTimeout(function(){r&&(!t.isUnstyled()&&lr(r,`p-ink-active`),r.setAttribute(`data-p-ink-active`,`false`))},401)}},onAnimationEnd:function(e){this.timeout&&clearTimeout(this.timeout),!this.isUnstyled()&&lr(e.currentTarget,`p-ink-active`),e.currentTarget.setAttribute(`data-p-ink-active`,`false`)},getInk:function(e){return e&&e.children?Lk(e.children).find(function(e){return jr(e,`data-pc-name`)===`ripple`}):void 0}}}),qk={name:`BaseContextMenu`,extends:ak,props:{model:{type:Array,default:null},appendTo:{type:[String,Object],default:`body`},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},global:{type:Boolean,default:!1},breakpoint:{type:String,default:`960px`},tabindex:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:ok,provide:function(){return{$pcContextMenu:this,$parentInstance:this}}},Jk={name:`ContextMenuSub`,hostName:`ContextMenu`,extends:ak,emits:[`item-click`,`item-mouseenter`,`item-mousemove`],props:{items:{type:Array,default:null},menuId:{type:String,default:null},focusedItemId:{type:String,default:null},root:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},level:{type:Number,default:0},templates:{type:Object,default:null},activeItemPath:{type:Object,default:null},tabindex:{type:Number,default:0}},methods:{getItemId:function(e){return`${this.menuId}_${e.key}`},getItemKey:function(e){return this.getItemId(e)},getItemProp:function(e,t,n){return e&&e.item?Gn(e.item[t],n):void 0},getItemLabel:function(e){return this.getItemProp(e,`label`)},getItemLabelId:function(e){return`${this.menuId}_${e.key}_label`},getPTOptions:function(e,t,n){return this.ptm(e,{context:{item:t.item,active:this.isItemActive(t),focused:this.isItemFocused(t),disabled:this.isItemDisabled(t),index:n}})},isItemActive:function(e){return this.activeItemPath.some(function(t){return t.key===e.key})},isItemVisible:function(e){return this.getItemProp(e,`visible`)!==!1},isItemDisabled:function(e){return this.getItemProp(e,`disabled`)},isItemFocused:function(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:function(e){return L(e.items)},onItemClick:function(e,t){this.getItemProp(t,`command`,{originalEvent:e,item:t.item}),this.$emit(`item-click`,{originalEvent:e,processedItem:t,isFocus:!0})},onItemMouseEnter:function(e,t){this.$emit(`item-mouseenter`,{originalEvent:e,processedItem:t})},onItemMouseMove:function(e,t){this.$emit(`item-mousemove`,{originalEvent:e,processedItem:t,isFocus:!0})},getAriaSetSize:function(){var e=this;return this.items.filter(function(t){return e.isItemVisible(t)&&!e.getItemProp(t,`separator`)}).length},getAriaPosInset:function(e){var t=this;return e-this.items.slice(0,e).filter(function(e){return t.isItemVisible(e)&&t.getItemProp(e,`separator`)}).length+1},onEnter:function(){qr(this.$refs.container,this.level)},getMenuItemProps:function(e,n){return{action:(0,t.mergeProps)({class:this.cx(`itemLink`),tabindex:-1},this.getPTOptions(`itemLink`,e,n)),icon:(0,t.mergeProps)({class:[this.cx(`itemIcon`),this.getItemProp(e,`icon`)]},this.getPTOptions(`itemIcon`,e,n)),label:(0,t.mergeProps)({class:this.cx(`itemLabel`)},this.getPTOptions(`itemLabel`,e,n)),submenuicon:(0,t.mergeProps)({class:this.cx(`submenuIcon`)},this.getPTOptions(`submenuicon`,e,n))}}},components:{AngleRightIcon:hk},directives:{ripple:Kk}},Yk=[`tabindex`],Xk=[`id`,`aria-label`,`aria-disabled`,`aria-expanded`,`aria-haspopup`,`aria-level`,`aria-setsize`,`aria-posinset`,`data-p-active`,`data-p-focused`,`data-p-disabled`],Zk=[`onClick`,`onMouseenter`,`onMousemove`],Qk=[`href`,`target`],$k=[`id`],eA=[`id`];function tA(e,n,r,i,a,o){var s=(0,t.resolveComponent)(`AngleRightIcon`),c=(0,t.resolveComponent)(`ContextMenuSub`,!0),l=(0,t.resolveDirective)(`ripple`);return(0,t.openBlock)(),(0,t.createBlock)(t.Transition,(0,t.mergeProps)({name:`p-anchored-overlay`,onEnter:o.onEnter},e.ptm(`menu.transition`)),{default:(0,t.withCtx)(function(){return[r.root||r.visible?((0,t.openBlock)(),(0,t.createElementBlock)(`ul`,(0,t.mergeProps)({key:0,ref:`container`,tabindex:r.tabindex},e.ptm(`rootList`)),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.items,function(i,a){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:o.getItemKey(i)},[o.isItemVisible(i)&&!o.getItemProp(i,`separator`)?((0,t.openBlock)(),(0,t.createElementBlock)(`li`,(0,t.mergeProps)({key:0,id:o.getItemId(i),style:o.getItemProp(i,`style`),class:[e.cx(`item`,{processedItem:i}),o.getItemProp(i,`class`)],role:`menuitem`,"aria-label":o.getItemLabel(i),"aria-disabled":o.isItemDisabled(i)||void 0,"aria-expanded":o.isItemGroup(i)?o.isItemActive(i):void 0,"aria-haspopup":o.isItemGroup(i)&&!o.getItemProp(i,`to`)?`menu`:void 0,"aria-level":r.level+1,"aria-setsize":o.getAriaSetSize(),"aria-posinset":o.getAriaPosInset(a)},{ref_for:!0},o.getPTOptions(`item`,i,a),{"data-p-active":o.isItemActive(i),"data-p-focused":o.isItemFocused(i),"data-p-disabled":o.isItemDisabled(i)}),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:e.cx(`itemContent`),onClick:function(e){return o.onItemClick(e,i)},onMouseenter:function(e){return o.onItemMouseEnter(e,i)},onMousemove:function(e){return o.onItemMouseMove(e,i)}},{ref_for:!0},o.getPTOptions(`itemContent`,i,a)),[r.templates.item?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.templates.item),{key:1,item:i.item,hasSubmenu:!!o.getItemProp(i,`items`),label:o.getItemLabel(i),props:o.getMenuItemProps(i,a)},null,8,[`item`,`hasSubmenu`,`label`,`props`])):(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)(`a`,(0,t.mergeProps)({key:0,href:o.getItemProp(i,`url`),class:e.cx(`itemLink`),target:o.getItemProp(i,`target`),tabindex:`-1`},{ref_for:!0},o.getPTOptions(`itemLink`,i,a)),[r.templates.itemicon?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.templates.itemicon),{key:0,item:i.item,class:(0,t.normalizeClass)(e.cx(`itemIcon`))},null,8,[`item`,`class`])):o.getItemProp(i,`icon`)?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,(0,t.mergeProps)({key:1,class:[e.cx(`itemIcon`),o.getItemProp(i,`icon`)]},{ref_for:!0},o.getPTOptions(`itemIcon`,i,a)),null,16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({id:o.getItemLabelId(i),class:e.cx(`itemLabel`)},{ref_for:!0},o.getPTOptions(`itemLabel`,i,a)),(0,t.toDisplayString)(o.getItemLabel(i)),17,$k),o.getItemProp(i,`items`)?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:2},[r.templates.submenuicon?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.templates.submenuicon),{key:0,active:o.isItemActive(i),class:(0,t.normalizeClass)(e.cx(`submenuIcon`))},null,8,[`active`,`class`])):((0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({key:1,class:e.cx(`submenuIcon`)},{ref_for:!0},o.getPTOptions(`submenuicon`,i,a)),null,16,[`class`]))],64)):(0,t.createCommentVNode)(``,!0)],16,Qk)),[[l]])],16,Zk),o.isItemVisible(i)&&o.isItemGroup(i)?((0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({key:0,id:o.getItemId(i)+`_list`,role:`menu`,class:e.cx(`submenu`),menuId:r.menuId,focusedItemId:r.focusedItemId,items:i.items,templates:r.templates,activeItemPath:r.activeItemPath,level:r.level+1,visible:o.isItemActive(i)&&o.isItemGroup(i),pt:e.pt,unstyled:e.unstyled,onItemClick:n[0]||=function(t){return e.$emit(`item-click`,t)},onItemMouseenter:n[1]||=function(t){return e.$emit(`item-mouseenter`,t)},onItemMousemove:n[2]||=function(t){return e.$emit(`item-mousemove`,t)},"aria-labelledby":o.getItemLabelId(i)},{ref_for:!0},e.ptm(`submenu`)),null,16,[`id`,`class`,`menuId`,`focusedItemId`,`items`,`templates`,`activeItemPath`,`level`,`visible`,`pt`,`unstyled`,`aria-labelledby`])):(0,t.createCommentVNode)(``,!0)],16,Xk)):(0,t.createCommentVNode)(``,!0),o.isItemVisible(i)&&o.getItemProp(i,`separator`)?((0,t.openBlock)(),(0,t.createElementBlock)(`li`,(0,t.mergeProps)({key:1,id:o.getItemId(i),style:o.getItemProp(i,`style`),class:[e.cx(`separator`),o.getItemProp(i,`class`)],role:`separator`},{ref_for:!0},e.ptm(`separator`)),null,16,eA)):(0,t.createCommentVNode)(``,!0)],64)}),128))],16,Yk)):(0,t.createCommentVNode)(``,!0)]}),_:1},16,[`onEnter`])}Jk.render=tA;var nA={name:`ContextMenu`,extends:qk,inheritAttrs:!1,emits:[`focus`,`blur`,`show`,`hide`,`before-show`,`before-hide`],target:null,outsideClickListener:null,resizeListener:null,documentContextMenuListener:null,matchMediaListener:null,pageX:null,pageY:null,container:null,list:null,data:function(){return{focused:!1,focusedItemInfo:{index:-1,level:0,parentKey:``},activeItemPath:[],visible:!1,submenuVisible:!1,query:null,queryMatches:!1}},watch:{activeItemPath:function(e){L(e)?(this.bindOutsideClickListener(),this.bindResizeListener()):this.visible||(this.unbindOutsideClickListener(),this.unbindResizeListener())}},mounted:function(){this.bindMatchMediaListener(),this.global&&this.bindDocumentContextMenuListener()},beforeUnmount:function(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.unbindDocumentContextMenuListener(),this.unbindMatchMediaListener(),this.container&&this.autoZIndex&&Qr.clear(this.container),this.target=null,this.container=null},methods:{getItemProp:function(e,t){return e?Gn(e[t]):void 0},getItemLabel:function(e){return this.getItemProp(e,`label`)},isItemDisabled:function(e){return this.getItemProp(e,`disabled`)},isItemVisible:function(e){return this.getItemProp(e,`visible`)!==!1},isItemGroup:function(e){return L(this.getItemProp(e,`items`))},isItemSeparator:function(e){return this.getItemProp(e,`separator`)},getProccessedItemLabel:function(e){return e?this.getItemLabel(e.item):void 0},isProccessedItemGroup:function(e){return e&&L(e.items)},toggle:function(e){this.visible?this.hide():this.show(e)},show:function(e){this.$emit(`before-show`),this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:``},R(this.list),this.pageX=e.pageX,this.pageY=e.pageY,this.visible?this.position():this.visible=!0,e.stopPropagation(),e.preventDefault()},hide:function(){this.$emit(`before-hide`),this.visible=!1,this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:``}},onFocus:function(e){this.focused=!0,this.focusedItemInfo=this.focusedItemInfo.index===-1?{index:-1,level:0,parentKey:``}:this.focusedItemInfo,this.$emit(`focus`,e)},onBlur:function(e){this.focused=!1,this.focusedItemInfo={index:-1,level:0,parentKey:``},this.searchValue=``,this.$emit(`blur`,e)},onKeyDown:function(e){var t=e.metaKey||e.ctrlKey;switch(e.code){case`ArrowDown`:this.onArrowDownKey(e);break;case`ArrowUp`:this.onArrowUpKey(e);break;case`ArrowLeft`:this.onArrowLeftKey(e);break;case`ArrowRight`:this.onArrowRightKey(e);break;case`Home`:this.onHomeKey(e);break;case`End`:this.onEndKey(e);break;case`Space`:this.onSpaceKey(e);break;case`Enter`:case`NumpadEnter`:this.onEnterKey(e);break;case`Escape`:this.onEscapeKey(e);break;case`Tab`:this.onTabKey(e);break;case`PageDown`:case`PageUp`:case`Backspace`:case`ShiftLeft`:case`ShiftRight`:break;default:!t&&Zn(e.key)&&this.searchItems(e,e.key);break}},onItemChange:function(e,t){var n=e.processedItem,r=e.isFocus;if(!Fn(n)){var i=n.index,a=n.key,o=n.level,s=n.parentKey,c=n.items,l=L(c),u=this.activeItemPath.filter(function(e){return e.parentKey!==s&&e.parentKey!==a});l&&(u.push(n),this.submenuVisible=!0),this.focusedItemInfo={index:i,level:o,parentKey:s},r&&R(this.list),!(t===`hover`&&this.queryMatches)&&(this.activeItemPath=u)}},onItemClick:function(e){var t=e.processedItem,n=this.isProccessedItemGroup(t);if(this.isSelected(t)){var r=t.index,i=t.key,a=t.level,o=t.parentKey;this.activeItemPath=this.activeItemPath.filter(function(e){return i!==e.key&&i.startsWith(e.key)}),this.focusedItemInfo={index:r,level:a,parentKey:o},R(this.list)}else n?this.onItemChange(e):this.hide()},onItemMouseEnter:function(e){this.onItemChange(e,`hover`)},onItemMouseMove:function(e){this.focused&&this.changeFocusedItemIndex(e,e.processedItem.index)},onArrowDownKey:function(e){var t=this.focusedItemInfo.index===-1?this.findFirstFocusedItemIndex():this.findNextItemIndex(this.focusedItemInfo.index);this.changeFocusedItemIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){if(e.altKey){if(this.focusedItemInfo.index!==-1){var t=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.popup&&this.hide(),e.preventDefault()}else{var n=this.focusedItemInfo.index===-1?this.findLastFocusedItemIndex():this.findPrevItemIndex(this.focusedItemInfo.index);this.changeFocusedItemIndex(e,n),e.preventDefault()}},onArrowLeftKey:function(e){var t=this,n=this.visibleItems[this.focusedItemInfo.index],r=this.activeItemPath.find(function(e){return e.key===n.parentKey});Fn(n.parent)||(this.focusedItemInfo={index:-1,parentKey:r?r.parentKey:``},this.searchValue=``,this.onArrowDownKey(e)),this.activeItemPath=this.activeItemPath.filter(function(e){return e.parentKey!==t.focusedItemInfo.parentKey}),e.preventDefault()},onArrowRightKey:function(e){var t=this.visibleItems[this.focusedItemInfo.index];this.isProccessedItemGroup(t)&&(this.onItemChange({originalEvent:e,processedItem:t}),this.focusedItemInfo={index:-1,parentKey:t.key},this.searchValue=``,this.onArrowDownKey(e)),e.preventDefault()},onHomeKey:function(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()},onEndKey:function(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()},onEnterKey:function(e){if(this.focusedItemInfo.index!==-1){var t=Ar(this.list,`li[id="${`${this.focusedItemIdx}`}"]`),n=t&&Ar(t,`[data-pc-section="itemlink"]`);n?n.click():t&&t.click();var r=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(r)&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex())}e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onEscapeKey:function(e){this.hide(),!this.popup&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex()),e.preventDefault()},onTabKey:function(e){if(this.focusedItemInfo.index!==-1){var t=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()},onEnter:function(e){yr(e,{position:`absolute`}),this.position(),this.autoZIndex&&Qr.set(`menu`,e,this.baseZIndex||this.$primevue.config.zIndex.menu)},onAfterEnter:function(){this.bindOutsideClickListener(),this.bindResizeListener(),this.$emit(`show`),R(this.list)},onLeave:function(){this.$emit(`hide`),this.container=null},onAfterLeave:function(e){this.autoZIndex&&Qr.clear(e),this.unbindOutsideClickListener(),this.unbindResizeListener()},position:function(){var e=this.pageX+1,t=this.pageY+1,n=this.container.offsetParent?this.container.offsetWidth:Ir(this.container),r=this.container.offsetParent?this.container.offsetHeight:Fr(this.container),i=pr(),a=window.scrollY||document.documentElement.scrollTop||document.body.scrollTop||0,o=window.scrollX||document.documentElement.scrollLeft||document.body.scrollLeft||0;e+n-o>i.width&&(e-=n),t+r-a>i.height&&(t-=r),e<o&&(e=o),t<a&&(t=a),this.container.style.left=e+`px`,this.container.style.top=t+`px`},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){var n=e.container&&!e.container.contains(t.target),r=e.visible?!(e.target&&(e.target===t.target||e.target.contains(t.target))):!0;n&&r&&e.hide()},document.addEventListener(`click`,this.outsideClickListener,!0))},unbindOutsideClickListener:function(){this.outsideClickListener&&=(document.removeEventListener(`click`,this.outsideClickListener,!0),null)},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.visible&&!Kr()&&e.hide()},window.addEventListener(`resize`,this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&=(window.removeEventListener(`resize`,this.resizeListener),null)},bindDocumentContextMenuListener:function(){var e=this;this.documentContextMenuListener||(this.documentContextMenuListener=function(t){t.button===2&&e.show(t)},document.addEventListener(`contextmenu`,this.documentContextMenuListener))},unbindDocumentContextMenuListener:function(){this.documentContextMenuListener&&=(document.removeEventListener(`contextmenu`,this.documentContextMenuListener),null)},bindMatchMediaListener:function(){var e=this;if(!this.matchMediaListener){var t=matchMedia(`(max-width: ${this.breakpoint})`);this.query=t,this.queryMatches=t.matches,this.matchMediaListener=function(){e.queryMatches=t.matches},this.query.addEventListener(`change`,this.matchMediaListener)}},unbindMatchMediaListener:function(){this.matchMediaListener&&=(this.query.removeEventListener(`change`,this.matchMediaListener),null)},isItemMatched:function(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e)?.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())},isValidItem:function(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)&&this.isItemVisible(e.item)},isValidSelectedItem:function(e){return this.isValidItem(e)&&this.isSelected(e)},isSelected:function(e){return this.activeItemPath.some(function(t){return t.key===e.key})},findFirstItemIndex:function(){var e=this;return this.visibleItems.findIndex(function(t){return e.isValidItem(t)})},findLastItemIndex:function(){var e=this;return Wn(this.visibleItems,function(t){return e.isValidItem(t)})},findNextItemIndex:function(e){var t=this,n=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex(function(e){return t.isValidItem(e)}):-1;return n>-1?n+e+1:e},findPrevItemIndex:function(e){var t=this,n=e>0?Wn(this.visibleItems.slice(0,e),function(e){return t.isValidItem(e)}):-1;return n>-1?n:e},findSelectedItemIndex:function(){var e=this;return this.visibleItems.findIndex(function(t){return e.isValidSelectedItem(t)})},findFirstFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e},findLastFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e},searchItems:function(e,t){var n=this;this.searchValue=(this.searchValue||``)+t;var r=-1,i=!1;return this.focusedItemInfo.index===-1?r=this.visibleItems.findIndex(function(e){return n.isItemMatched(e)}):(r=this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function(e){return n.isItemMatched(e)}),r=r===-1?this.visibleItems.slice(0,this.focusedItemInfo.index).findIndex(function(e){return n.isItemMatched(e)}):r+this.focusedItemInfo.index),r!==-1&&(i=!0),r===-1&&this.focusedItemInfo.index===-1&&(r=this.findFirstFocusedItemIndex()),r!==-1&&this.changeFocusedItemIndex(e,r),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){n.searchValue=``,n.searchTimeout=null},500),i},changeFocusedItemIndex:function(e,t){this.focusedItemInfo.index!==t&&(this.focusedItemInfo.index=t,this.scrollInView())},scrollInView:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1,t=e===-1?this.focusedItemIdx:`${this.$id}_${e}`,n=Ar(this.list,`li[id="${t}"]`);n&&n.scrollIntoView&&n.scrollIntoView({block:`nearest`,inline:`start`})},createProcessedItems:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:``,a=[];return e&&e.forEach(function(e,o){var s=(i===``?``:i+`_`)+o,c={item:e,index:o,level:n,key:s,parent:r,parentKey:i};c.items=t.createProcessedItems(e.items,n+1,c,s),a.push(c)}),a},containerRef:function(e){this.container=e},listRef:function(e){this.list=e?e.$el:void 0}},computed:{processedItems:function(){return this.createProcessedItems(this.model||[])},visibleItems:function(){var e=this,t=this.activeItemPath.find(function(t){return t.key===e.focusedItemInfo.parentKey});return t?t.items:this.processedItems},focusedItemIdx:function(){return this.focusedItemInfo.index===-1?null:`${this.$id}${L(this.focusedItemInfo.parentKey)?`_`+this.focusedItemInfo.parentKey:``}_${this.focusedItemInfo.index}`}},components:{ContextMenuSub:Jk,Portal:VO}};function rA(e,n,r,i,a,o){var s=(0,t.resolveComponent)(`ContextMenuSub`),c=(0,t.resolveComponent)(`Portal`);return(0,t.openBlock)(),(0,t.createBlock)(c,{appendTo:e.appendTo},{default:(0,t.withCtx)(function(){return[(0,t.createVNode)(t.Transition,(0,t.mergeProps)({name:`p-anchored-overlay`,onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},e.ptm(`transition`)),{default:(0,t.withCtx)(function(){return[a.visible?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({key:0,ref:o.containerRef,class:e.cx(`root`)},e.ptmi(`root`)),[(0,t.createVNode)(s,{ref:o.listRef,id:e.$id+`_list`,class:(0,t.normalizeClass)(e.cx(`rootList`)),role:`menubar`,root:!0,tabindex:e.tabindex,"aria-orientation":`vertical`,"aria-activedescendant":a.focused?o.focusedItemIdx:void 0,menuId:e.$id,focusedItemId:a.focused?o.focusedItemIdx:void 0,items:o.processedItems,templates:e.$slots,activeItemPath:a.activeItemPath,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,level:0,visible:a.submenuVisible,pt:e.pt,unstyled:e.unstyled,onFocus:o.onFocus,onBlur:o.onBlur,onKeydown:o.onKeyDown,onItemClick:o.onItemClick,onItemMouseenter:o.onItemMouseEnter,onItemMousemove:o.onItemMouseMove},null,8,[`id`,`class`,`tabindex`,`aria-activedescendant`,`menuId`,`focusedItemId`,`items`,`templates`,`activeItemPath`,`aria-labelledby`,`aria-label`,`visible`,`pt`,`unstyled`,`onFocus`,`onBlur`,`onKeydown`,`onItemClick`,`onItemMouseenter`,`onItemMousemove`])],16)):(0,t.createCommentVNode)(``,!0)]}),_:1},16,[`onEnter`,`onAfterEnter`,`onLeave`,`onAfterLeave`])]}),_:1},8,[`appendTo`])}nA.render=rA;var iA={class:`cpMenuItem`},aA=[`disabled`],oA={key:0,class:`cpMenuItem__loaderWrapper`},sA={key:0,class:`cpMenuItem__label`},cA=(0,t.defineComponent)({__name:`CpMenuItem`,props:{hideLabel:{type:Boolean,default:!1},isAsync:{type:Boolean},isCritical:{type:Boolean},isLoading:{type:Boolean},isSelected:{type:Boolean,default:!1},leadingIcon:{default:void 0},tooltip:{default:``},trailingIcon:{default:void 0},label:{type:[String,Function],default:``},command:{type:Function,default:void 0},url:{},items:{},disabled:{type:[Boolean,Function]},visible:{type:[Boolean,Function]},target:{},separator:{type:Boolean},style:{}},emits:[`click`,`asyncComplete`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.useSlots)(),o=(0,t.computed)(()=>({"cpMenuItem__button--isCritical":r.isCritical,"cpMenuItem__button--isSelected":r.isSelected})),s=(0,t.computed)(()=>r.isLoading||r.disabled),c=(0,t.computed)(()=>!!r.leadingIcon||!!a[`leading-icon`]),l=(0,t.computed)(()=>!!r.trailingIcon||!!a[`trailing-icon`]),u=(0,t.computed)(()=>(!!r.label||!!a.label)&&!r.hideLabel),d=(0,t.computed)(()=>r.hideLabel?r.label:void 0),f=async e=>{r.command&&(r.isAsync?(await r.command(e),i(`asyncComplete`)):r.command(e)),i(`click`)};return(n,r)=>{let i=(0,t.resolveComponent)(`cp-loader`),a=(0,t.resolveComponent)(`cp-icon`),p=(0,t.resolveDirective)(`tooltip`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,iA,[(0,t.createElementVNode)(`button`,{class:(0,t.normalizeClass)([`cpMenuItem__button`,o.value]),disabled:s.value,type:`button`,onClick:(0,t.withModifiers)(f,[`stop`])},[(0,t.createVNode)(t.Transition,{duration:100,mode:`out-in`,name:`fade`},{default:(0,t.withCtx)(()=>[e.isLoading?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,oA,[(0,t.createVNode)(i,{class:`cpMenuItem__loader`,color:`accent`,size:`2xs`})])):c.value?(0,t.renderSlot)(n.$slots,`leading-icon`,{key:1},()=>[(0,t.createVNode)(a,{"aria-label":d.value,class:`cpMenuItem__icon`,size:`16`,type:e.leadingIcon},null,8,[`aria-label`,`type`])]):(0,t.createCommentVNode)(``,!0)]),_:3}),u.value?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)(`span`,sA,[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)])),[[p,e.tooltip]]):(0,t.createCommentVNode)(``,!0),l.value?(0,t.renderSlot)(n.$slots,`trailing-icon`,{key:1},()=>[(0,t.createVNode)(a,{"aria-label":d.value,class:`cpMenuItem__icon`,size:`16`,type:e.trailingIcon},null,8,[`aria-label`,`type`])]):(0,t.createCommentVNode)(``,!0)],10,aA)])}}}),lA=(0,t.defineComponent)({__name:`CpContextualMenu`,props:{items:{}},setup(e,{expose:n}){let r=(0,t.ref)(),i={root:{class:`cpContextualMenu`},item:{class:`cpContextualMenu__item`},transition:{name:`scale-elastic`,duration:100}},a=e=>{let{x:t,y:n}=e;if(t!==0&&n!==0)return r.value?.show(e);let i=e.currentTarget.getBoundingClientRect(),a=new MouseEvent(`click`,{...e,clientX:i.left+i.width,clientY:i.bottom});r.value?.show(a)},o=()=>r.value?.hide();return n({show:a,hide:o}),(n,a)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(nA),{ref_key:`menu`,ref:r,model:e.items,pt:i},{item:(0,t.withCtx)(({item:e,props:n})=>[(0,t.createVNode)(cA,(0,t.mergeProps)({...e,...n.action},{"leading-icon":e.icon,onAsyncComplete:o,onClick:o}),null,16,[`leading-icon`])]),_:1},8,[`model`]))}}),uA={class:`cpDate__inputs`},dA=[`autocomplete`,`disabled`,`placeholder`,`required`],fA=[`id`,`autocomplete`,`disabled`,`required`],pA={value:``},mA=[`value`],hA={key:2,class:`cpDate__divider`},gA=[`autocomplete`,`disabled`,`placeholder`,`required`],_A={key:0,class:`cpDate__errorMessage`},vA=(0,t.defineComponent)({__name:`CpDate`,props:{autocompleteBirthday:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},displayErrorMessage:{type:Boolean,default:!0},errorMessage:{default:``},inputsOptions:{default:()=>({})},isInvalid:{type:Boolean,default:!1},label:{default:``},locale:{default:()=>navigator.language},maxDate:{default:()=>J.now().toISO()},minDate:{default:()=>J.now().minus({year:120}).toISO()},modelValue:{default:``},required:{type:Boolean,default:!1},size:{default:`md`}},emits:[`update:modelValue`,`onValidation`],setup(e,{emit:n}){let r=e,i=n,a=e=>J.fromISO(r.modelValue).invalid?``:J.fromISO(r.modelValue)[e],o=(0,t.ref)(a(`day`)),s=(0,t.ref)(a(`month`)),c=(0,t.ref)(a(`year`)),l=(0,t.computed)(()=>X(r.label)),u=(0,t.useId)(),d=(0,t.computed)(()=>g.value.year),f=(0,t.computed)(()=>_.value.year),p=(0,t.computed)(()=>J.fromObject({year:c.value&&c.value.length<=4?Number(c.value):J.now().year,month:s.value?Number(s.value):J.now().month,day:1}).daysInMonth),m=(0,t.computed)(()=>vp.months(`long`,{locale:r.locale}).map((e,t)=>({label:X(e),value:t+1}))),h=(0,t.computed)(()=>J.fromObject({year:Number(c.value),month:Number(s.value),day:Number(o.value)}).toISODate()),g=(0,t.computed)(()=>J.fromISO(r.minDate)),_=(0,t.computed)(()=>J.fromISO(r.maxDate)),v=(0,t.computed)(()=>h.value>=g.value.toISODate()),y=(0,t.computed)(()=>h.value<=_.value.toISODate()),b=(0,t.computed)(()=>o.value===``&&s.value===``&&c.value===``),x=(0,t.computed)(()=>b.value&&!r.required?!0:!r.isInvalid&&S.value&&C.value&&w.value&&y.value&&v.value),S=(0,t.computed)(()=>Number(o.value)>=1&&Number(o.value)<=p.value),C=(0,t.computed)(()=>!!s.value),w=(0,t.computed)(()=>Number(c.value)>=d.value&&Number(c.value)<=f.value),T=(0,t.computed)(()=>x.value||!r.displayErrorMessage?``:r.errorMessage?r.errorMessage:C.value?S.value?w.value?y.value?v.value?``:`The date can't be before ${g.value.toFormat(`DDD`)}.`:`The date can't be after ${_.value.toFormat(`DDD`)}.`:`Year must be in the range ${d.value} – ${f.value}.`:`Day must be in the range 1 – ${p.value}.`:`Month is required.`),E=(0,t.computed)(()=>[`cpDate--${r.size}`,{"cpDate--isInvalid":!x.value,"cpDate--isDisabled":r.disabled}]),D=(0,t.computed)(()=>({"cpDate__month--isEmpty":!s.value})),O=(0,t.computed)(()=>r.autocompleteBirthday?{day:`bday-day`,month:`bday-month`,year:`bday-year`}:{day:`off`,month:`off`,year:`off`}),k=(0,t.computed)(()=>r.inputsOptions?.dayInputPlaceholder||`DD`),A=(0,t.computed)(()=>r.inputsOptions?.monthInputPlaceholder||`Months`),j=(0,t.computed)(()=>{let e=new Intl.DateTimeFormat(r.locale,{day:`2-digit`,month:`2-digit`}).formatToParts(new Date(2024,0,31)),t=e.findIndex(e=>e.type===`day`),n=e.findIndex(e=>e.type===`month`);return t===-1||n===-1?!1:t<n}),M=(0,t.computed)(()=>j.value?[`day`,`month`]:[`month`,`day`]),ee=(0,t.computed)(()=>r.inputsOptions?.yearInputPlaceholder||`YYYY`),N=()=>{i(`update:modelValue`,h.value),i(`onValidation`,x.value)},te=e=>e===`day`,ne=e=>e<M.value.length-1;return(0,t.watch)(o,N),(0,t.watch)(s,N),(0,t.watch)(c,N),(n,r)=>{let i=(0,t.resolveComponent)(`cp-transition-expand`),a=(0,t.resolveDirective)(`bind-once`),d=(0,t.resolveDirective)(`maska`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`cpDate`,E.value])},[e.label?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(dO,{key:0,"is-invalid":!x.value,required:e.required},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(l.value),1)]),_:1},8,[`is-invalid`,`required`])),[[a,{for:(0,t.unref)(u)}]]):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,uA,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(M.value,(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:n},[te(n)?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)(`input`,{key:0,"onUpdate:modelValue":r[0]||=e=>o.value=e,autocomplete:O.value.day,class:`cpDate__day`,"data-maska":`##`,disabled:e.disabled,inputmode:`numeric`,maxlength:`2`,placeholder:k.value,required:e.required},null,8,dA)),[[t.vModelText,o.value],[d]]):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)([`cpDate__month`,D.value])},[(0,t.withDirectives)((0,t.createElementVNode)(`select`,{id:(0,t.unref)(u),"onUpdate:modelValue":r[1]||=e=>s.value=e,autocomplete:O.value.month,disabled:e.disabled,required:e.required},[(0,t.createElementVNode)(`option`,pA,(0,t.toDisplayString)(A.value),1),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(m.value,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`option`,{key:n,value:e.value},(0,t.toDisplayString)(e.label),9,mA))),128))],8,fA),[[t.vModelSelect,s.value]])],2)),ne(i)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,hA)):(0,t.createCommentVNode)(``,!0)],64))),128)),r[3]||=(0,t.createElementVNode)(`div`,{class:`cpDate__divider`},null,-1),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{"onUpdate:modelValue":r[2]||=e=>c.value=e,autocomplete:O.value.year,class:`cpDate__year`,"data-maska":`####`,disabled:e.disabled,inputmode:`numeric`,maxlength:`4`,placeholder:ee.value,required:e.required},null,8,gA),[[t.vModelText,c.value],[d]])]),(0,t.createVNode)(i,null,{default:(0,t.withCtx)(()=>[T.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,_A,(0,t.toDisplayString)(T.value),1)):(0,t.createCommentVNode)(``,!0)]),_:1})],2)}}}),yA={class:`cpDatepicker`},bA=`EEE DD`,xA=(0,t.defineComponent)({__name:`CpDatepicker`,props:{allowPastDates:{type:Boolean,default:!1},closeAfterSelect:{type:Boolean,default:!0},errorMessage:{default:``},initDateOne:{default:``},initDateTwo:{default:``},inputValue:{default:``},isError:{type:Boolean,default:!1},isInline:{type:Boolean,default:!1},label:{default:``},locale:{default:()=>navigator.language},maxDate:{default:``},minDate:{default:()=>J.local().toISODate()},mode:{default:`single`},placeholder:{default:`Select a date`},singleMonth:{type:Boolean,default:!1},triggerElementId:{default:``}},emits:[`dates`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.ref)(r.initDateOne||``),o=(0,t.ref)(r.mode===`range`?r.initDateTwo:``),s=(0,t.ref)(!1),c=(0,t.ref)(r.triggerElementId||(0,t.useId)()),l=(0,t.computed)(()=>r.inputValue?r.inputValue:rT({dateOne:a.value,dateTwo:o.value,format:bA,locale:r.locale})),u=(0,t.computed)(()=>r.singleMonth?1:2),d=(0,t.computed)(()=>r.allowPastDates?``:r.minDate),f=e=>m(`dateOne`,e),p=e=>m(`dateTwo`,e),m=(e,t)=>{e===`dateOne`?a.value=t:o.value=t,i(`dates`,[a.value,...o.value?[o.value]:[]])},h=(e,t,n)=>{t!==n&&(e===`dateOne`?a.value=t:o.value=t)};return(0,t.watch)(()=>r.initDateOne,(e,t)=>{h(`dateOne`,e,t)}),(0,t.watch)(()=>r.initDateTwo,(e,t)=>{h(`dateTwo`,e,t)}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,yA,[(0,t.withDirectives)((0,t.createVNode)(vO,{id:c.value,class:`cpDatepicker__input`,disabled:s.value,"error-message":e.errorMessage,"is-invalid":e.isError,label:e.label,"model-value":l.value,placeholder:e.placeholder,type:`text`},null,8,[`id`,`disabled`,`error-message`,`is-invalid`,`label`,`model-value`,`placeholder`]),[[t.vShow,!e.isInline]]),(0,t.createVNode)(qw,{class:(0,t.normalizeClass)([`cpDatepicker__datepicker`,{"cpDatepicker__datepicker--isInline":e.isInline}]),"close-after-select":e.closeAfterSelect,"date-one":a.value,"date-two":o.value,inline:e.isInline,locale:e.locale,"max-date":e.maxDate,"min-date":d.value,mode:e.mode,"months-to-show":u.value,"trigger-element-id":c.value,onClosed:r[0]||=()=>s.value=!1,onDateOneSelected:f,onDateTwoSelected:p,onOpened:r[1]||=()=>s.value=!0},null,8,[`class`,`close-after-select`,`date-one`,`date-two`,`inline`,`locale`,`max-date`,`min-date`,`mode`,`months-to-show`,`trigger-element-id`])]))}}),SA=(e=document)=>{if(e===null)return[];let t=Array.from(e.querySelectorAll(`a, button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])`));return t.length?t.filter(e=>{let t=e.hasAttribute(`disabled`),n=e.offsetHeight!==0&&e.offsetWidth!==0,r=e instanceof HTMLInputElement&&e.type===`radio`&&e.checked===!1;return!t&&n&&!r}):e instanceof HTMLElement?[e]:[]},CA=(e,t)=>{if(!t)return;let n=SA(t),r=n[0],i=n[n.length-1],a=!e.shiftKey&&document.activeElement===i,o=e.shiftKey&&document.activeElement===r;a?(e.preventDefault(),r?.focus()):o&&(e.preventDefault(),i?.focus())},wA=(e,t=`input`)=>{if(!e)return;if(e instanceof HTMLInputElement){e.focus();return}let n=e.querySelector(t);n&&n.focus()},TA={class:`cpDialog`},EA=[`aria-describedby`,`aria-labelledby`,`onKeydown`],DA={class:`cpDialog__header`},OA={key:0,class:`cpDialog__headerTexts`},kA={key:0,class:`cpDialog__title`},AA=[`id`],jA=[`id`],MA={class:`cpDialog__content`},NA={key:0,class:`cpDialog__footer`},PA=(0,t.defineComponent)({__name:`CpDialog`,props:{isClosableOnClickOutside:{type:Boolean,default:!1},maxWidth:{default:600},preventClose:{type:Boolean},subtitle:{default:``},title:{default:``}},emits:[`close`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.useId)(),o=(0,t.computed)(()=>`${a}-title`),s=(0,t.computed)(()=>`${a}-subtitle`),c=(0,t.computed)(()=>_.value?s.value:void 0),l=(0,t.useSlots)(),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.computed)(()=>({maxWidth:`${r.maxWidth}px`})),p=(0,t.computed)(()=>({"cpDialog__overlay--isClosableOnClickOutside":r.isClosableOnClickOutside})),m=(0,t.computed)(()=>!!l.title),h=(0,t.computed)(()=>!!r.title||m.value),g=(0,t.computed)(()=>!!l.subtitle),_=(0,t.computed)(()=>!!r.subtitle||g.value),v=(0,t.computed)(()=>h.value||_.value),y=(0,t.computed)(()=>!!l.footer),b=()=>{r.preventClose||i(`close`)},x=e=>CA(e,d.value),S=()=>u.value?.show(),C=()=>u.value?.close(),w=()=>{let e=SA(d.value);e.length&&e[0].focus()},T=()=>{r.isClosableOnClickOutside&&b()};return(0,t.onMounted)(()=>{S(),(0,t.nextTick)(()=>w())}),(0,t.onBeforeUnmount)(()=>C()),(n,r)=>{let i=(0,t.resolveComponent)(`cp-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,TA,[(0,t.createElementVNode)(`dialog`,{ref_key:`dialogElement`,ref:u,"aria-describedby":c.value,"aria-labelledby":o.value,"aria-modal":`true`,class:`cpDialog__dialog`,onKeydown:(0,t.withKeys)((0,t.withModifiers)(b,[`stop`,`prevent`]),[`esc`])},[(0,t.createElementVNode)(`div`,{"aria-hidden":`true`,class:(0,t.normalizeClass)([`cpDialog__overlay`,p.value]),onClick:T},null,2),(0,t.createElementVNode)(`main`,{ref_key:`dialogContainer`,ref:d,class:`cpDialog__container`,style:(0,t.normalizeStyle)(f.value),onKeydown:(0,t.withKeys)(x,[`tab`])},[(0,t.createElementVNode)(`header`,DA,[v.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,OA,[h.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,kA,[(0,t.renderSlot)(n.$slots,`title`,{},()=>[(0,t.createElementVNode)(`h2`,{id:o.value},(0,t.toDisplayString)(e.title),9,AA)])])):(0,t.createCommentVNode)(``,!0),_.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,id:s.value,class:`cpDialog__subtitle`},[(0,t.renderSlot)(n.$slots,`subtitle`,{},()=>[(0,t.createElementVNode)(`p`,null,(0,t.toDisplayString)(e.subtitle),1)])],8,jA)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),e.preventClose?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:1,"aria-label":`Close dialog`,class:`cpDialog__close`,type:`button`,onClick:b},[(0,t.createVNode)(i,{"aria-hidden":`true`,type:`x`})]))]),(0,t.createElementVNode)(`section`,MA,[(0,t.renderSlot)(n.$slots,`default`)]),y.value?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,NA,[(0,t.renderSlot)(n.$slots,`footer`)])):(0,t.createCommentVNode)(``,!0)],36)],40,EA)])}}}),FA=function(e){return e[e.SMALL_MOBILE=370]=`SMALL_MOBILE`,e[e.MOBILE=552]=`MOBILE`,e[e.TABLET=768]=`TABLET`,e[e.LARGE_TABLET=968]=`LARGE_TABLET`,e[e.DESKTOP=1024]=`DESKTOP`,e[e.LARGE=1440]=`LARGE`,e}({}),IA=(e=FA.MOBILE)=>{let n=(0,t.ref)(!1);(0,t.onMounted)(()=>n.value=!0);let{width:r}=nE();return(0,t.computed)(()=>n.value?r.value<e:!1)},LA={};function RA(e,n){return(0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createVNode)(t.Transition,{name:`dialog`},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,`default`)]),_:3})])}var zA=Y(LA,[[`render`,RA]]),BA=(0,t.defineComponent)({__name:`CpDynamicDialog`,props:(0,t.mergeModels)({class:{},isClosableOnClickOutside:{type:Boolean},maxWidth:{},preventClose:{type:Boolean},subtitle:{},title:{}},{isVisible:{type:Boolean,default:!1},isVisibleModifiers:{}}),emits:(0,t.mergeModels)([`close`],[`update:isVisible`]),setup(e,{emit:n}){let r=e,i=n,a=IA(),o=(0,t.useTemplateRef)(`dynamicComponentRef`),s=(0,t.useModel)(e,`isVisible`),c=(0,t.computed)(()=>a.value?`div`:zA),l=(0,t.computed)(()=>a.value?PD:PA),u=(0,t.computed)(()=>a.value?!0:s.value),d=(0,t.computed)(()=>a.value?{modelValue:s.value,contentClass:r.class,canBackdropClose:!r.preventClose,canSwipeClose:!r.preventClose,preventClose:r.preventClose}:{maxWidth:r.maxWidth,class:r.class,preventClose:r.preventClose,isClosableOnClickOutside:r.isClosableOnClickOutside,...r.title&&{title:r.title},...r.subtitle&&{subtitle:r.subtitle}}),f=async()=>{await(0,t.nextTick)(),o.value&&o.value?.open()};return(0,t.watch)(a,()=>{a.value&&s.value&&f()}),(n,r)=>{let a=(0,t.resolveComponent)(`cp-heading`);return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(c.value),null,{default:(0,t.withCtx)(()=>[u.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(l.value),(0,t.mergeProps)({key:0},d.value,{ref_key:`dynamicComponentRef`,ref:o,onClose:r[0]||=e=>i(`close`)}),(0,t.createSlots)({default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`default`)]),footer:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`footer`)]),_:2},[e.title?{name:`header`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`title`,{},()=>[(0,t.createVNode)(a,{class:`cpDynamicDialog__title`,"heading-level":`h3`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)]),_:1})])]),key:`0`}:void 0,e.title?{name:`title`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`title`)]),key:`1`}:void 0,e.subtitle?{name:`subtitle`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`subtitle`)]),key:`2`}:void 0]),1040)):(0,t.createCommentVNode)(``,!0)]),_:3})}}}),VA=(0,t.defineComponent)({inheritAttrs:!1,__name:`CpHeading`,props:{headingLevel:{default:`h1`},size:{default:500}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(n.$props.headingLevel),(0,t.mergeProps)({class:[`cpHeading`,`cpHeading--${e.size}`]},n.$attrs),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`default`)]),_:3},16,[`class`]))}}),HA=(0,t.defineComponent)({__name:`CpItemActions`,props:{actions:{},iconPosition:{default:`horizontal`},quickOptionsLimit:{default:2}},setup(e){let n=e,r=(0,t.computed)(()=>({"cpItemActions--isDropdownOpen":a.value})),i=(0,t.ref)(),a=(0,t.ref)(!1),o=e=>i.value?.show(e),s=(0,t.computed)(()=>({icon:`more-${n.iconPosition}`,command:e=>o(e)})),c=(0,t.computed)(()=>!!n.actions.length),l=(0,t.computed)(()=>{let e=[...n.actions];return e.length<=n.quickOptionsLimit?[...e,s.value]:[...e.slice(0,n.quickOptionsLimit),s.value]}),u=e=>a.value=e;return(n,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`cpItemActions`,r.value])},[c.value?((0,t.openBlock)(),(0,t.createBlock)(nO,{key:0,class:`cpItemActions__buttonGroup`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.value,(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(cA,(0,t.mergeProps)({ref_for:!0},e,{key:n,"hide-label":``,"leading-icon":e.icon}),null,16,[`leading-icon`]))),128))]),_:1})):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(lA,{ref_key:`contextualMenu`,ref:i,items:e.actions,onHide:a[0]||=e=>u(!1),onShow:a[1]||=e=>u(!0)},null,8,[`items`])],2))}}),UA={name:`TimesIcon`,extends:mk};function WA(e){return JA(e)||qA(e)||KA(e)||GA()}function GA(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
348
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zk(e,t){if(e){if(typeof e==`string`)return Hk(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)?Hk(e,t):void 0}}function Bk(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Vk(e){if(Array.isArray(e))return Hk(e)}function Hk(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 Uk(e,t,n){return(t=Wk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wk(e){var t=Gk(e,`string`);return Ik(t)==`symbol`?t:t+``}function Gk(e,t){if(Ik(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ik(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Kk=Fk.extend(`ripple`,{watch:{"config.ripple":function(e){e?(this.createRipple(this.$host),this.bindEvents(this.$host),this.$host.setAttribute(`data-pd-ripple`,!0),this.$host.style.overflow=`hidden`,this.$host.style.position=`relative`):(this.remove(this.$host),this.$host.removeAttribute(`data-pd-ripple`))}},unmounted:function(e){this.remove(e)},timeout:void 0,methods:{bindEvents:function(e){e.addEventListener(`mousedown`,this.onMouseDown.bind(this))},unbindEvents:function(e){e.removeEventListener(`mousedown`,this.onMouseDown.bind(this))},createRipple:function(e){var t=this.getInk(e);t||(t=Or(`span`,Uk(Uk({role:`presentation`,"aria-hidden":!0,"data-p-ink":!0,"data-p-ink-active":!1,class:!this.isUnstyled()&&this.cx(`root`),onAnimationEnd:this.onAnimationEnd.bind(this)},this.$attrSelector,``),`p-bind`,this.ptm(`root`))),e.appendChild(t),this.$el=t)},remove:function(e){var t=this.getInk(e);t&&(this.$host.style.overflow=``,this.$host.style.position=``,this.unbindEvents(e),t.removeEventListener(`animationend`,this.onAnimationEnd),t.remove())},onMouseDown:function(e){var t=this,n=e.currentTarget,r=this.getInk(n);if(!(!r||getComputedStyle(r,null).display===`none`)){if(!this.isUnstyled()&&lr(r,`p-ink-active`),r.setAttribute(`data-p-ink-active`,`false`),!Pr(r)&&!Hr(r)){var i=Math.max(br(n),zr(n));r.style.height=i+`px`,r.style.width=i+`px`}var a=Rr(n),o=e.pageX-a.left+document.body.scrollTop-Hr(r)/2,s=e.pageY-a.top+document.body.scrollLeft-Pr(r)/2;r.style.top=s+`px`,r.style.left=o+`px`,!this.isUnstyled()&&or(r,`p-ink-active`),r.setAttribute(`data-p-ink-active`,`true`),this.timeout=setTimeout(function(){r&&(!t.isUnstyled()&&lr(r,`p-ink-active`),r.setAttribute(`data-p-ink-active`,`false`))},401)}},onAnimationEnd:function(e){this.timeout&&clearTimeout(this.timeout),!this.isUnstyled()&&lr(e.currentTarget,`p-ink-active`),e.currentTarget.setAttribute(`data-p-ink-active`,`false`)},getInk:function(e){return e&&e.children?Lk(e.children).find(function(e){return jr(e,`data-pc-name`)===`ripple`}):void 0}}}),qk={name:`BaseContextMenu`,extends:ak,props:{model:{type:Array,default:null},appendTo:{type:[String,Object],default:`body`},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},global:{type:Boolean,default:!1},breakpoint:{type:String,default:`960px`},tabindex:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:ok,provide:function(){return{$pcContextMenu:this,$parentInstance:this}}},Jk={name:`ContextMenuSub`,hostName:`ContextMenu`,extends:ak,emits:[`item-click`,`item-mouseenter`,`item-mousemove`],props:{items:{type:Array,default:null},menuId:{type:String,default:null},focusedItemId:{type:String,default:null},root:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},level:{type:Number,default:0},templates:{type:Object,default:null},activeItemPath:{type:Object,default:null},tabindex:{type:Number,default:0}},methods:{getItemId:function(e){return`${this.menuId}_${e.key}`},getItemKey:function(e){return this.getItemId(e)},getItemProp:function(e,t,n){return e&&e.item?Gn(e.item[t],n):void 0},getItemLabel:function(e){return this.getItemProp(e,`label`)},getItemLabelId:function(e){return`${this.menuId}_${e.key}_label`},getPTOptions:function(e,t,n){return this.ptm(e,{context:{item:t.item,active:this.isItemActive(t),focused:this.isItemFocused(t),disabled:this.isItemDisabled(t),index:n}})},isItemActive:function(e){return this.activeItemPath.some(function(t){return t.key===e.key})},isItemVisible:function(e){return this.getItemProp(e,`visible`)!==!1},isItemDisabled:function(e){return this.getItemProp(e,`disabled`)},isItemFocused:function(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:function(e){return L(e.items)},onItemClick:function(e,t){this.getItemProp(t,`command`,{originalEvent:e,item:t.item}),this.$emit(`item-click`,{originalEvent:e,processedItem:t,isFocus:!0})},onItemMouseEnter:function(e,t){this.$emit(`item-mouseenter`,{originalEvent:e,processedItem:t})},onItemMouseMove:function(e,t){this.$emit(`item-mousemove`,{originalEvent:e,processedItem:t,isFocus:!0})},getAriaSetSize:function(){var e=this;return this.items.filter(function(t){return e.isItemVisible(t)&&!e.getItemProp(t,`separator`)}).length},getAriaPosInset:function(e){var t=this;return e-this.items.slice(0,e).filter(function(e){return t.isItemVisible(e)&&t.getItemProp(e,`separator`)}).length+1},onEnter:function(){qr(this.$refs.container,this.level)},getMenuItemProps:function(e,n){return{action:(0,t.mergeProps)({class:this.cx(`itemLink`),tabindex:-1},this.getPTOptions(`itemLink`,e,n)),icon:(0,t.mergeProps)({class:[this.cx(`itemIcon`),this.getItemProp(e,`icon`)]},this.getPTOptions(`itemIcon`,e,n)),label:(0,t.mergeProps)({class:this.cx(`itemLabel`)},this.getPTOptions(`itemLabel`,e,n)),submenuicon:(0,t.mergeProps)({class:this.cx(`submenuIcon`)},this.getPTOptions(`submenuicon`,e,n))}}},components:{AngleRightIcon:hk},directives:{ripple:Kk}},Yk=[`tabindex`],Xk=[`id`,`aria-label`,`aria-disabled`,`aria-expanded`,`aria-haspopup`,`aria-level`,`aria-setsize`,`aria-posinset`,`data-p-active`,`data-p-focused`,`data-p-disabled`],Zk=[`onClick`,`onMouseenter`,`onMousemove`],Qk=[`href`,`target`],$k=[`id`],eA=[`id`];function tA(e,n,r,i,a,o){var s=(0,t.resolveComponent)(`AngleRightIcon`),c=(0,t.resolveComponent)(`ContextMenuSub`,!0),l=(0,t.resolveDirective)(`ripple`);return(0,t.openBlock)(),(0,t.createBlock)(t.Transition,(0,t.mergeProps)({name:`p-anchored-overlay`,onEnter:o.onEnter},e.ptm(`menu.transition`)),{default:(0,t.withCtx)(function(){return[r.root||r.visible?((0,t.openBlock)(),(0,t.createElementBlock)(`ul`,(0,t.mergeProps)({key:0,ref:`container`,tabindex:r.tabindex},e.ptm(`rootList`)),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.items,function(i,a){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:o.getItemKey(i)},[o.isItemVisible(i)&&!o.getItemProp(i,`separator`)?((0,t.openBlock)(),(0,t.createElementBlock)(`li`,(0,t.mergeProps)({key:0,id:o.getItemId(i),style:o.getItemProp(i,`style`),class:[e.cx(`item`,{processedItem:i}),o.getItemProp(i,`class`)],role:`menuitem`,"aria-label":o.getItemLabel(i),"aria-disabled":o.isItemDisabled(i)||void 0,"aria-expanded":o.isItemGroup(i)?o.isItemActive(i):void 0,"aria-haspopup":o.isItemGroup(i)&&!o.getItemProp(i,`to`)?`menu`:void 0,"aria-level":r.level+1,"aria-setsize":o.getAriaSetSize(),"aria-posinset":o.getAriaPosInset(a)},{ref_for:!0},o.getPTOptions(`item`,i,a),{"data-p-active":o.isItemActive(i),"data-p-focused":o.isItemFocused(i),"data-p-disabled":o.isItemDisabled(i)}),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:e.cx(`itemContent`),onClick:function(e){return o.onItemClick(e,i)},onMouseenter:function(e){return o.onItemMouseEnter(e,i)},onMousemove:function(e){return o.onItemMouseMove(e,i)}},{ref_for:!0},o.getPTOptions(`itemContent`,i,a)),[r.templates.item?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.templates.item),{key:1,item:i.item,hasSubmenu:!!o.getItemProp(i,`items`),label:o.getItemLabel(i),props:o.getMenuItemProps(i,a)},null,8,[`item`,`hasSubmenu`,`label`,`props`])):(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)(`a`,(0,t.mergeProps)({key:0,href:o.getItemProp(i,`url`),class:e.cx(`itemLink`),target:o.getItemProp(i,`target`),tabindex:`-1`},{ref_for:!0},o.getPTOptions(`itemLink`,i,a)),[r.templates.itemicon?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.templates.itemicon),{key:0,item:i.item,class:(0,t.normalizeClass)(e.cx(`itemIcon`))},null,8,[`item`,`class`])):o.getItemProp(i,`icon`)?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,(0,t.mergeProps)({key:1,class:[e.cx(`itemIcon`),o.getItemProp(i,`icon`)]},{ref_for:!0},o.getPTOptions(`itemIcon`,i,a)),null,16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({id:o.getItemLabelId(i),class:e.cx(`itemLabel`)},{ref_for:!0},o.getPTOptions(`itemLabel`,i,a)),(0,t.toDisplayString)(o.getItemLabel(i)),17,$k),o.getItemProp(i,`items`)?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:2},[r.templates.submenuicon?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.templates.submenuicon),{key:0,active:o.isItemActive(i),class:(0,t.normalizeClass)(e.cx(`submenuIcon`))},null,8,[`active`,`class`])):((0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({key:1,class:e.cx(`submenuIcon`)},{ref_for:!0},o.getPTOptions(`submenuicon`,i,a)),null,16,[`class`]))],64)):(0,t.createCommentVNode)(``,!0)],16,Qk)),[[l]])],16,Zk),o.isItemVisible(i)&&o.isItemGroup(i)?((0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({key:0,id:o.getItemId(i)+`_list`,role:`menu`,class:e.cx(`submenu`),menuId:r.menuId,focusedItemId:r.focusedItemId,items:i.items,templates:r.templates,activeItemPath:r.activeItemPath,level:r.level+1,visible:o.isItemActive(i)&&o.isItemGroup(i),pt:e.pt,unstyled:e.unstyled,onItemClick:n[0]||=function(t){return e.$emit(`item-click`,t)},onItemMouseenter:n[1]||=function(t){return e.$emit(`item-mouseenter`,t)},onItemMousemove:n[2]||=function(t){return e.$emit(`item-mousemove`,t)},"aria-labelledby":o.getItemLabelId(i)},{ref_for:!0},e.ptm(`submenu`)),null,16,[`id`,`class`,`menuId`,`focusedItemId`,`items`,`templates`,`activeItemPath`,`level`,`visible`,`pt`,`unstyled`,`aria-labelledby`])):(0,t.createCommentVNode)(``,!0)],16,Xk)):(0,t.createCommentVNode)(``,!0),o.isItemVisible(i)&&o.getItemProp(i,`separator`)?((0,t.openBlock)(),(0,t.createElementBlock)(`li`,(0,t.mergeProps)({key:1,id:o.getItemId(i),style:o.getItemProp(i,`style`),class:[e.cx(`separator`),o.getItemProp(i,`class`)],role:`separator`},{ref_for:!0},e.ptm(`separator`)),null,16,eA)):(0,t.createCommentVNode)(``,!0)],64)}),128))],16,Yk)):(0,t.createCommentVNode)(``,!0)]}),_:1},16,[`onEnter`])}Jk.render=tA;var nA={name:`ContextMenu`,extends:qk,inheritAttrs:!1,emits:[`focus`,`blur`,`show`,`hide`,`before-show`,`before-hide`],target:null,outsideClickListener:null,resizeListener:null,documentContextMenuListener:null,matchMediaListener:null,pageX:null,pageY:null,container:null,list:null,data:function(){return{focused:!1,focusedItemInfo:{index:-1,level:0,parentKey:``},activeItemPath:[],visible:!1,submenuVisible:!1,query:null,queryMatches:!1}},watch:{activeItemPath:function(e){L(e)?(this.bindOutsideClickListener(),this.bindResizeListener()):this.visible||(this.unbindOutsideClickListener(),this.unbindResizeListener())}},mounted:function(){this.bindMatchMediaListener(),this.global&&this.bindDocumentContextMenuListener()},beforeUnmount:function(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.unbindDocumentContextMenuListener(),this.unbindMatchMediaListener(),this.container&&this.autoZIndex&&Qr.clear(this.container),this.target=null,this.container=null},methods:{getItemProp:function(e,t){return e?Gn(e[t]):void 0},getItemLabel:function(e){return this.getItemProp(e,`label`)},isItemDisabled:function(e){return this.getItemProp(e,`disabled`)},isItemVisible:function(e){return this.getItemProp(e,`visible`)!==!1},isItemGroup:function(e){return L(this.getItemProp(e,`items`))},isItemSeparator:function(e){return this.getItemProp(e,`separator`)},getProccessedItemLabel:function(e){return e?this.getItemLabel(e.item):void 0},isProccessedItemGroup:function(e){return e&&L(e.items)},toggle:function(e){this.visible?this.hide():this.show(e)},show:function(e){this.$emit(`before-show`),this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:``},R(this.list),this.pageX=e.pageX,this.pageY=e.pageY,this.visible?this.position():this.visible=!0,e.stopPropagation(),e.preventDefault()},hide:function(){this.$emit(`before-hide`),this.visible=!1,this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:``}},onFocus:function(e){this.focused=!0,this.focusedItemInfo=this.focusedItemInfo.index===-1?{index:-1,level:0,parentKey:``}:this.focusedItemInfo,this.$emit(`focus`,e)},onBlur:function(e){this.focused=!1,this.focusedItemInfo={index:-1,level:0,parentKey:``},this.searchValue=``,this.$emit(`blur`,e)},onKeyDown:function(e){var t=e.metaKey||e.ctrlKey;switch(e.code){case`ArrowDown`:this.onArrowDownKey(e);break;case`ArrowUp`:this.onArrowUpKey(e);break;case`ArrowLeft`:this.onArrowLeftKey(e);break;case`ArrowRight`:this.onArrowRightKey(e);break;case`Home`:this.onHomeKey(e);break;case`End`:this.onEndKey(e);break;case`Space`:this.onSpaceKey(e);break;case`Enter`:case`NumpadEnter`:this.onEnterKey(e);break;case`Escape`:this.onEscapeKey(e);break;case`Tab`:this.onTabKey(e);break;case`PageDown`:case`PageUp`:case`Backspace`:case`ShiftLeft`:case`ShiftRight`:break;default:!t&&Zn(e.key)&&this.searchItems(e,e.key);break}},onItemChange:function(e,t){var n=e.processedItem,r=e.isFocus;if(!Fn(n)){var i=n.index,a=n.key,o=n.level,s=n.parentKey,c=n.items,l=L(c),u=this.activeItemPath.filter(function(e){return e.parentKey!==s&&e.parentKey!==a});l&&(u.push(n),this.submenuVisible=!0),this.focusedItemInfo={index:i,level:o,parentKey:s},r&&R(this.list),!(t===`hover`&&this.queryMatches)&&(this.activeItemPath=u)}},onItemClick:function(e){var t=e.processedItem,n=this.isProccessedItemGroup(t);if(this.isSelected(t)){var r=t.index,i=t.key,a=t.level,o=t.parentKey;this.activeItemPath=this.activeItemPath.filter(function(e){return i!==e.key&&i.startsWith(e.key)}),this.focusedItemInfo={index:r,level:a,parentKey:o},R(this.list)}else n?this.onItemChange(e):this.hide()},onItemMouseEnter:function(e){this.onItemChange(e,`hover`)},onItemMouseMove:function(e){this.focused&&this.changeFocusedItemIndex(e,e.processedItem.index)},onArrowDownKey:function(e){var t=this.focusedItemInfo.index===-1?this.findFirstFocusedItemIndex():this.findNextItemIndex(this.focusedItemInfo.index);this.changeFocusedItemIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){if(e.altKey){if(this.focusedItemInfo.index!==-1){var t=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.popup&&this.hide(),e.preventDefault()}else{var n=this.focusedItemInfo.index===-1?this.findLastFocusedItemIndex():this.findPrevItemIndex(this.focusedItemInfo.index);this.changeFocusedItemIndex(e,n),e.preventDefault()}},onArrowLeftKey:function(e){var t=this,n=this.visibleItems[this.focusedItemInfo.index],r=this.activeItemPath.find(function(e){return e.key===n.parentKey});Fn(n.parent)||(this.focusedItemInfo={index:-1,parentKey:r?r.parentKey:``},this.searchValue=``,this.onArrowDownKey(e)),this.activeItemPath=this.activeItemPath.filter(function(e){return e.parentKey!==t.focusedItemInfo.parentKey}),e.preventDefault()},onArrowRightKey:function(e){var t=this.visibleItems[this.focusedItemInfo.index];this.isProccessedItemGroup(t)&&(this.onItemChange({originalEvent:e,processedItem:t}),this.focusedItemInfo={index:-1,parentKey:t.key},this.searchValue=``,this.onArrowDownKey(e)),e.preventDefault()},onHomeKey:function(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()},onEndKey:function(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()},onEnterKey:function(e){if(this.focusedItemInfo.index!==-1){var t=Ar(this.list,`li[id="${`${this.focusedItemIdx}`}"]`),n=t&&Ar(t,`[data-pc-section="itemlink"]`);n?n.click():t&&t.click();var r=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(r)&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex())}e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onEscapeKey:function(e){this.hide(),!this.popup&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex()),e.preventDefault()},onTabKey:function(e){if(this.focusedItemInfo.index!==-1){var t=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()},onEnter:function(e){yr(e,{position:`absolute`}),this.position(),this.autoZIndex&&Qr.set(`menu`,e,this.baseZIndex||this.$primevue.config.zIndex.menu)},onAfterEnter:function(){this.bindOutsideClickListener(),this.bindResizeListener(),this.$emit(`show`),R(this.list)},onLeave:function(){this.$emit(`hide`),this.container=null},onAfterLeave:function(e){this.autoZIndex&&Qr.clear(e),this.unbindOutsideClickListener(),this.unbindResizeListener()},position:function(){var e=this.pageX+1,t=this.pageY+1,n=this.container.offsetParent?this.container.offsetWidth:Ir(this.container),r=this.container.offsetParent?this.container.offsetHeight:Fr(this.container),i=pr(),a=window.scrollY||document.documentElement.scrollTop||document.body.scrollTop||0,o=window.scrollX||document.documentElement.scrollLeft||document.body.scrollLeft||0;e+n-o>i.width&&(e-=n),t+r-a>i.height&&(t-=r),e<o&&(e=o),t<a&&(t=a),this.container.style.left=e+`px`,this.container.style.top=t+`px`},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){var n=e.container&&!e.container.contains(t.target),r=e.visible?!(e.target&&(e.target===t.target||e.target.contains(t.target))):!0;n&&r&&e.hide()},document.addEventListener(`click`,this.outsideClickListener,!0))},unbindOutsideClickListener:function(){this.outsideClickListener&&=(document.removeEventListener(`click`,this.outsideClickListener,!0),null)},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.visible&&!Kr()&&e.hide()},window.addEventListener(`resize`,this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&=(window.removeEventListener(`resize`,this.resizeListener),null)},bindDocumentContextMenuListener:function(){var e=this;this.documentContextMenuListener||(this.documentContextMenuListener=function(t){t.button===2&&e.show(t)},document.addEventListener(`contextmenu`,this.documentContextMenuListener))},unbindDocumentContextMenuListener:function(){this.documentContextMenuListener&&=(document.removeEventListener(`contextmenu`,this.documentContextMenuListener),null)},bindMatchMediaListener:function(){var e=this;if(!this.matchMediaListener){var t=matchMedia(`(max-width: ${this.breakpoint})`);this.query=t,this.queryMatches=t.matches,this.matchMediaListener=function(){e.queryMatches=t.matches},this.query.addEventListener(`change`,this.matchMediaListener)}},unbindMatchMediaListener:function(){this.matchMediaListener&&=(this.query.removeEventListener(`change`,this.matchMediaListener),null)},isItemMatched:function(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e)?.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())},isValidItem:function(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)&&this.isItemVisible(e.item)},isValidSelectedItem:function(e){return this.isValidItem(e)&&this.isSelected(e)},isSelected:function(e){return this.activeItemPath.some(function(t){return t.key===e.key})},findFirstItemIndex:function(){var e=this;return this.visibleItems.findIndex(function(t){return e.isValidItem(t)})},findLastItemIndex:function(){var e=this;return Wn(this.visibleItems,function(t){return e.isValidItem(t)})},findNextItemIndex:function(e){var t=this,n=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex(function(e){return t.isValidItem(e)}):-1;return n>-1?n+e+1:e},findPrevItemIndex:function(e){var t=this,n=e>0?Wn(this.visibleItems.slice(0,e),function(e){return t.isValidItem(e)}):-1;return n>-1?n:e},findSelectedItemIndex:function(){var e=this;return this.visibleItems.findIndex(function(t){return e.isValidSelectedItem(t)})},findFirstFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e},findLastFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e},searchItems:function(e,t){var n=this;this.searchValue=(this.searchValue||``)+t;var r=-1,i=!1;return this.focusedItemInfo.index===-1?r=this.visibleItems.findIndex(function(e){return n.isItemMatched(e)}):(r=this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function(e){return n.isItemMatched(e)}),r=r===-1?this.visibleItems.slice(0,this.focusedItemInfo.index).findIndex(function(e){return n.isItemMatched(e)}):r+this.focusedItemInfo.index),r!==-1&&(i=!0),r===-1&&this.focusedItemInfo.index===-1&&(r=this.findFirstFocusedItemIndex()),r!==-1&&this.changeFocusedItemIndex(e,r),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){n.searchValue=``,n.searchTimeout=null},500),i},changeFocusedItemIndex:function(e,t){this.focusedItemInfo.index!==t&&(this.focusedItemInfo.index=t,this.scrollInView())},scrollInView:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1,t=e===-1?this.focusedItemIdx:`${this.$id}_${e}`,n=Ar(this.list,`li[id="${t}"]`);n&&n.scrollIntoView&&n.scrollIntoView({block:`nearest`,inline:`start`})},createProcessedItems:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:``,a=[];return e&&e.forEach(function(e,o){var s=(i===``?``:i+`_`)+o,c={item:e,index:o,level:n,key:s,parent:r,parentKey:i};c.items=t.createProcessedItems(e.items,n+1,c,s),a.push(c)}),a},containerRef:function(e){this.container=e},listRef:function(e){this.list=e?e.$el:void 0}},computed:{processedItems:function(){return this.createProcessedItems(this.model||[])},visibleItems:function(){var e=this,t=this.activeItemPath.find(function(t){return t.key===e.focusedItemInfo.parentKey});return t?t.items:this.processedItems},focusedItemIdx:function(){return this.focusedItemInfo.index===-1?null:`${this.$id}${L(this.focusedItemInfo.parentKey)?`_`+this.focusedItemInfo.parentKey:``}_${this.focusedItemInfo.index}`}},components:{ContextMenuSub:Jk,Portal:VO}};function rA(e,n,r,i,a,o){var s=(0,t.resolveComponent)(`ContextMenuSub`),c=(0,t.resolveComponent)(`Portal`);return(0,t.openBlock)(),(0,t.createBlock)(c,{appendTo:e.appendTo},{default:(0,t.withCtx)(function(){return[(0,t.createVNode)(t.Transition,(0,t.mergeProps)({name:`p-anchored-overlay`,onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},e.ptm(`transition`)),{default:(0,t.withCtx)(function(){return[a.visible?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({key:0,ref:o.containerRef,class:e.cx(`root`)},e.ptmi(`root`)),[(0,t.createVNode)(s,{ref:o.listRef,id:e.$id+`_list`,class:(0,t.normalizeClass)(e.cx(`rootList`)),role:`menubar`,root:!0,tabindex:e.tabindex,"aria-orientation":`vertical`,"aria-activedescendant":a.focused?o.focusedItemIdx:void 0,menuId:e.$id,focusedItemId:a.focused?o.focusedItemIdx:void 0,items:o.processedItems,templates:e.$slots,activeItemPath:a.activeItemPath,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,level:0,visible:a.submenuVisible,pt:e.pt,unstyled:e.unstyled,onFocus:o.onFocus,onBlur:o.onBlur,onKeydown:o.onKeyDown,onItemClick:o.onItemClick,onItemMouseenter:o.onItemMouseEnter,onItemMousemove:o.onItemMouseMove},null,8,[`id`,`class`,`tabindex`,`aria-activedescendant`,`menuId`,`focusedItemId`,`items`,`templates`,`activeItemPath`,`aria-labelledby`,`aria-label`,`visible`,`pt`,`unstyled`,`onFocus`,`onBlur`,`onKeydown`,`onItemClick`,`onItemMouseenter`,`onItemMousemove`])],16)):(0,t.createCommentVNode)(``,!0)]}),_:1},16,[`onEnter`,`onAfterEnter`,`onLeave`,`onAfterLeave`])]}),_:1},8,[`appendTo`])}nA.render=rA;var iA={class:`cpMenuItem`},aA=[`disabled`],oA={key:0,class:`cpMenuItem__loaderWrapper`},sA={key:0,class:`cpMenuItem__label`},cA=(0,t.defineComponent)({__name:`CpMenuItem`,props:{hideLabel:{type:Boolean,default:!1},isAsync:{type:Boolean},isCritical:{type:Boolean},isLoading:{type:Boolean},isSelected:{type:Boolean,default:!1},leadingIcon:{default:void 0},tooltip:{default:``},trailingIcon:{default:void 0},label:{type:[String,Function],default:``},command:{type:Function,default:void 0},url:{},items:{},disabled:{type:[Boolean,Function]},visible:{type:[Boolean,Function]},target:{},separator:{type:Boolean},style:{}},emits:[`click`,`asyncComplete`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.useSlots)(),o=(0,t.computed)(()=>({"cpMenuItem__button--isCritical":r.isCritical,"cpMenuItem__button--isSelected":r.isSelected})),s=(0,t.computed)(()=>r.isLoading||r.disabled),c=(0,t.computed)(()=>!!r.leadingIcon||!!a[`leading-icon`]),l=(0,t.computed)(()=>!!r.trailingIcon||!!a[`trailing-icon`]),u=(0,t.computed)(()=>(!!r.label||!!a.label)&&!r.hideLabel),d=(0,t.computed)(()=>r.hideLabel?r.label:void 0),f=async e=>{r.command&&(r.isAsync?(await r.command(e),i(`asyncComplete`)):r.command(e)),i(`click`)};return(n,r)=>{let i=(0,t.resolveComponent)(`cp-loader`),a=(0,t.resolveComponent)(`cp-icon`),p=(0,t.resolveDirective)(`tooltip`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,iA,[(0,t.createElementVNode)(`button`,{class:(0,t.normalizeClass)([`cpMenuItem__button`,o.value]),disabled:s.value,type:`button`,onClick:(0,t.withModifiers)(f,[`stop`])},[(0,t.createVNode)(t.Transition,{duration:100,mode:`out-in`,name:`fade`},{default:(0,t.withCtx)(()=>[e.isLoading?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,oA,[(0,t.createVNode)(i,{class:`cpMenuItem__loader`,color:`accent`,size:`2xs`})])):c.value?(0,t.renderSlot)(n.$slots,`leading-icon`,{key:1},()=>[(0,t.createVNode)(a,{"aria-label":d.value,class:`cpMenuItem__icon`,size:`16`,type:e.leadingIcon},null,8,[`aria-label`,`type`])]):(0,t.createCommentVNode)(``,!0)]),_:3}),u.value?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)(`span`,sA,[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)])),[[p,e.tooltip]]):(0,t.createCommentVNode)(``,!0),l.value?(0,t.renderSlot)(n.$slots,`trailing-icon`,{key:1},()=>[(0,t.createVNode)(a,{"aria-label":d.value,class:`cpMenuItem__icon`,size:`16`,type:e.trailingIcon},null,8,[`aria-label`,`type`])]):(0,t.createCommentVNode)(``,!0)],10,aA)])}}}),lA=(0,t.defineComponent)({__name:`CpContextualMenu`,props:{items:{}},setup(e,{expose:n}){let r=(0,t.ref)(),i={root:{class:`cpContextualMenu`},item:{class:`cpContextualMenu__item`},transition:{name:`scale-elastic`,duration:100}},a=e=>{let{x:t,y:n}=e;if(t!==0&&n!==0)return r.value?.show(e);let i=e.currentTarget.getBoundingClientRect(),a=new MouseEvent(`click`,{...e,clientX:i.left+i.width,clientY:i.bottom});r.value?.show(a)},o=()=>r.value?.hide();return n({show:a,hide:o}),(n,a)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(nA),{ref_key:`menu`,ref:r,model:e.items,pt:i},{item:(0,t.withCtx)(({item:e,props:n})=>[(0,t.createVNode)(cA,(0,t.mergeProps)({...e,...n.action},{"leading-icon":e.icon,onAsyncComplete:o,onClick:o}),null,16,[`leading-icon`])]),_:1},8,[`model`]))}}),uA={class:`cpDate__inputs`},dA=[`autocomplete`,`disabled`,`placeholder`,`required`],fA=[`id`,`autocomplete`,`disabled`,`required`],pA={value:``},mA=[`value`],hA={key:2,class:`cpDate__divider`},gA=[`autocomplete`,`disabled`,`placeholder`,`required`],_A={key:0,class:`cpDate__errorMessage`},vA=(0,t.defineComponent)({__name:`CpDate`,props:{allowEmpty:{type:Boolean,default:!1},autocompleteBirthday:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},displayErrorMessage:{type:Boolean,default:!0},errorMessage:{default:``},inputsOptions:{default:()=>({})},isInvalid:{type:Boolean,default:!1},label:{default:``},locale:{default:()=>navigator.language},maxDate:{default:()=>J.now().toISO()},minDate:{default:()=>J.now().minus({year:120}).toISO()},modelValue:{default:``},required:{type:Boolean,default:!1},size:{default:`md`}},emits:[`update:modelValue`,`onValidation`],setup(e,{emit:n}){let r=e,i=n,a=e=>J.fromISO(r.modelValue).invalid?``:J.fromISO(r.modelValue)[e],o=(0,t.ref)(a(`day`)),s=(0,t.ref)(a(`month`)),c=(0,t.ref)(a(`year`)),l=(0,t.computed)(()=>X(r.label)),u=(0,t.useId)(),d=(0,t.computed)(()=>g.value.year),f=(0,t.computed)(()=>_.value.year),p=(0,t.computed)(()=>J.fromObject({year:c.value&&c.value.length<=4?Number(c.value):J.now().year,month:s.value?Number(s.value):J.now().month,day:1}).daysInMonth),m=(0,t.computed)(()=>vp.months(`long`,{locale:r.locale}).map((e,t)=>({label:X(e),value:t+1}))),h=(0,t.computed)(()=>J.fromObject({year:Number(c.value),month:Number(s.value),day:Number(o.value)}).toISODate()),g=(0,t.computed)(()=>J.fromISO(r.minDate)),_=(0,t.computed)(()=>J.fromISO(r.maxDate)),v=(0,t.computed)(()=>h.value>=g.value.toISODate()),y=(0,t.computed)(()=>h.value<=_.value.toISODate()),b=(0,t.computed)(()=>o.value===``&&s.value===``&&c.value===``),x=(0,t.computed)(()=>b.value&&(!r.required||r.allowEmpty)?!0:!r.isInvalid&&S.value&&C.value&&w.value&&y.value&&v.value),S=(0,t.computed)(()=>Number(o.value)>=1&&Number(o.value)<=p.value),C=(0,t.computed)(()=>!!s.value),w=(0,t.computed)(()=>Number(c.value)>=d.value&&Number(c.value)<=f.value),T=(0,t.computed)(()=>x.value||!r.displayErrorMessage?``:r.errorMessage?r.errorMessage:C.value?S.value?w.value?y.value?v.value?``:`The date can't be before ${g.value.toFormat(`DDD`)}.`:`The date can't be after ${_.value.toFormat(`DDD`)}.`:`Year must be in the range ${d.value} – ${f.value}.`:`Day must be in the range 1 – ${p.value}.`:`Month is required.`),E=(0,t.computed)(()=>[`cpDate--${r.size}`,{"cpDate--isInvalid":!x.value,"cpDate--isDisabled":r.disabled}]),D=(0,t.computed)(()=>({"cpDate__month--isEmpty":!s.value})),O=(0,t.computed)(()=>r.autocompleteBirthday?{day:`bday-day`,month:`bday-month`,year:`bday-year`}:{day:`off`,month:`off`,year:`off`}),k=(0,t.computed)(()=>r.inputsOptions?.dayInputPlaceholder||`DD`),A=(0,t.computed)(()=>r.inputsOptions?.monthInputPlaceholder||`Months`),j=(0,t.computed)(()=>{let e=new Intl.DateTimeFormat(r.locale,{day:`2-digit`,month:`2-digit`}).formatToParts(new Date(2024,0,31)),t=e.findIndex(e=>e.type===`day`),n=e.findIndex(e=>e.type===`month`);return t===-1||n===-1?!1:t<n}),M=(0,t.computed)(()=>j.value?[`day`,`month`]:[`month`,`day`]),ee=(0,t.computed)(()=>r.inputsOptions?.yearInputPlaceholder||`YYYY`),N=()=>{i(`update:modelValue`,h.value),i(`onValidation`,x.value)},te=e=>e===`day`,ne=e=>e<M.value.length-1;return(0,t.watch)(o,N),(0,t.watch)(s,N),(0,t.watch)(c,N),(n,r)=>{let i=(0,t.resolveComponent)(`cp-transition-expand`),a=(0,t.resolveDirective)(`bind-once`),d=(0,t.resolveDirective)(`maska`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`cpDate`,E.value])},[e.label?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(dO,{key:0,"is-invalid":!x.value,required:e.required},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(l.value),1)]),_:1},8,[`is-invalid`,`required`])),[[a,{for:(0,t.unref)(u)}]]):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,uA,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(M.value,(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:n},[te(n)?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)(`input`,{key:0,"onUpdate:modelValue":r[0]||=e=>o.value=e,autocomplete:O.value.day,class:`cpDate__day`,"data-maska":`##`,disabled:e.disabled,inputmode:`numeric`,maxlength:`2`,placeholder:k.value,required:e.required},null,8,dA)),[[t.vModelText,o.value],[d]]):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)([`cpDate__month`,D.value])},[(0,t.withDirectives)((0,t.createElementVNode)(`select`,{id:(0,t.unref)(u),"onUpdate:modelValue":r[1]||=e=>s.value=e,autocomplete:O.value.month,disabled:e.disabled,required:e.required},[(0,t.createElementVNode)(`option`,pA,(0,t.toDisplayString)(A.value),1),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(m.value,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`option`,{key:n,value:e.value},(0,t.toDisplayString)(e.label),9,mA))),128))],8,fA),[[t.vModelSelect,s.value]])],2)),ne(i)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,hA)):(0,t.createCommentVNode)(``,!0)],64))),128)),r[3]||=(0,t.createElementVNode)(`div`,{class:`cpDate__divider`},null,-1),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{"onUpdate:modelValue":r[2]||=e=>c.value=e,autocomplete:O.value.year,class:`cpDate__year`,"data-maska":`####`,disabled:e.disabled,inputmode:`numeric`,maxlength:`4`,placeholder:ee.value,required:e.required},null,8,gA),[[t.vModelText,c.value],[d]])]),(0,t.createVNode)(i,null,{default:(0,t.withCtx)(()=>[T.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,_A,(0,t.toDisplayString)(T.value),1)):(0,t.createCommentVNode)(``,!0)]),_:1})],2)}}}),yA={class:`cpDatepicker`},bA=`EEE DD`,xA=(0,t.defineComponent)({__name:`CpDatepicker`,props:{allowPastDates:{type:Boolean,default:!1},closeAfterSelect:{type:Boolean,default:!0},errorMessage:{default:``},initDateOne:{default:``},initDateTwo:{default:``},inputValue:{default:``},isError:{type:Boolean,default:!1},isInline:{type:Boolean,default:!1},label:{default:``},locale:{default:()=>navigator.language},maxDate:{default:``},minDate:{default:()=>J.local().toISODate()},mode:{default:`single`},placeholder:{default:`Select a date`},singleMonth:{type:Boolean,default:!1},triggerElementId:{default:``}},emits:[`dates`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.ref)(r.initDateOne||``),o=(0,t.ref)(r.mode===`range`?r.initDateTwo:``),s=(0,t.ref)(!1),c=(0,t.ref)(r.triggerElementId||(0,t.useId)()),l=(0,t.computed)(()=>r.inputValue?r.inputValue:rT({dateOne:a.value,dateTwo:o.value,format:bA,locale:r.locale})),u=(0,t.computed)(()=>r.singleMonth?1:2),d=(0,t.computed)(()=>r.allowPastDates?``:r.minDate),f=e=>m(`dateOne`,e),p=e=>m(`dateTwo`,e),m=(e,t)=>{e===`dateOne`?a.value=t:o.value=t,i(`dates`,[a.value,...o.value?[o.value]:[]])},h=(e,t,n)=>{t!==n&&(e===`dateOne`?a.value=t:o.value=t)};return(0,t.watch)(()=>r.initDateOne,(e,t)=>{h(`dateOne`,e,t)}),(0,t.watch)(()=>r.initDateTwo,(e,t)=>{h(`dateTwo`,e,t)}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,yA,[(0,t.withDirectives)((0,t.createVNode)(vO,{id:c.value,class:`cpDatepicker__input`,disabled:s.value,"error-message":e.errorMessage,"is-invalid":e.isError,label:e.label,"model-value":l.value,placeholder:e.placeholder,type:`text`},null,8,[`id`,`disabled`,`error-message`,`is-invalid`,`label`,`model-value`,`placeholder`]),[[t.vShow,!e.isInline]]),(0,t.createVNode)(qw,{class:(0,t.normalizeClass)([`cpDatepicker__datepicker`,{"cpDatepicker__datepicker--isInline":e.isInline}]),"close-after-select":e.closeAfterSelect,"date-one":a.value,"date-two":o.value,inline:e.isInline,locale:e.locale,"max-date":e.maxDate,"min-date":d.value,mode:e.mode,"months-to-show":u.value,"trigger-element-id":c.value,onClosed:r[0]||=()=>s.value=!1,onDateOneSelected:f,onDateTwoSelected:p,onOpened:r[1]||=()=>s.value=!0},null,8,[`class`,`close-after-select`,`date-one`,`date-two`,`inline`,`locale`,`max-date`,`min-date`,`mode`,`months-to-show`,`trigger-element-id`])]))}}),SA=(e=document)=>{if(e===null)return[];let t=Array.from(e.querySelectorAll(`a, button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])`));return t.length?t.filter(e=>{let t=e.hasAttribute(`disabled`),n=e.offsetHeight!==0&&e.offsetWidth!==0,r=e instanceof HTMLInputElement&&e.type===`radio`&&e.checked===!1;return!t&&n&&!r}):e instanceof HTMLElement?[e]:[]},CA=(e,t)=>{if(!t)return;let n=SA(t),r=n[0],i=n[n.length-1],a=!e.shiftKey&&document.activeElement===i,o=e.shiftKey&&document.activeElement===r;a?(e.preventDefault(),r?.focus()):o&&(e.preventDefault(),i?.focus())},wA=(e,t=`input`)=>{if(!e)return;if(e instanceof HTMLInputElement){e.focus();return}let n=e.querySelector(t);n&&n.focus()},TA={class:`cpDialog`},EA=[`aria-describedby`,`aria-labelledby`,`onKeydown`],DA={class:`cpDialog__header`},OA={key:0,class:`cpDialog__headerTexts`},kA={key:0,class:`cpDialog__title`},AA=[`id`],jA=[`id`],MA={class:`cpDialog__content`},NA={key:0,class:`cpDialog__footer`},PA=(0,t.defineComponent)({__name:`CpDialog`,props:{isClosableOnClickOutside:{type:Boolean,default:!1},maxWidth:{default:600},preventClose:{type:Boolean},subtitle:{default:``},title:{default:``}},emits:[`close`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.useId)(),o=(0,t.computed)(()=>`${a}-title`),s=(0,t.computed)(()=>`${a}-subtitle`),c=(0,t.computed)(()=>_.value?s.value:void 0),l=(0,t.useSlots)(),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.computed)(()=>({maxWidth:`${r.maxWidth}px`})),p=(0,t.computed)(()=>({"cpDialog__overlay--isClosableOnClickOutside":r.isClosableOnClickOutside})),m=(0,t.computed)(()=>!!l.title),h=(0,t.computed)(()=>!!r.title||m.value),g=(0,t.computed)(()=>!!l.subtitle),_=(0,t.computed)(()=>!!r.subtitle||g.value),v=(0,t.computed)(()=>h.value||_.value),y=(0,t.computed)(()=>!!l.footer),b=()=>{r.preventClose||i(`close`)},x=e=>CA(e,d.value),S=()=>u.value?.show(),C=()=>u.value?.close(),w=()=>{let e=SA(d.value);e.length&&e[0].focus()},T=()=>{r.isClosableOnClickOutside&&b()};return(0,t.onMounted)(()=>{S(),(0,t.nextTick)(()=>w())}),(0,t.onBeforeUnmount)(()=>C()),(n,r)=>{let i=(0,t.resolveComponent)(`cp-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,TA,[(0,t.createElementVNode)(`dialog`,{ref_key:`dialogElement`,ref:u,"aria-describedby":c.value,"aria-labelledby":o.value,"aria-modal":`true`,class:`cpDialog__dialog`,onKeydown:(0,t.withKeys)((0,t.withModifiers)(b,[`stop`,`prevent`]),[`esc`])},[(0,t.createElementVNode)(`div`,{"aria-hidden":`true`,class:(0,t.normalizeClass)([`cpDialog__overlay`,p.value]),onClick:T},null,2),(0,t.createElementVNode)(`main`,{ref_key:`dialogContainer`,ref:d,class:`cpDialog__container`,style:(0,t.normalizeStyle)(f.value),onKeydown:(0,t.withKeys)(x,[`tab`])},[(0,t.createElementVNode)(`header`,DA,[v.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,OA,[h.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,kA,[(0,t.renderSlot)(n.$slots,`title`,{},()=>[(0,t.createElementVNode)(`h2`,{id:o.value},(0,t.toDisplayString)(e.title),9,AA)])])):(0,t.createCommentVNode)(``,!0),_.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,id:s.value,class:`cpDialog__subtitle`},[(0,t.renderSlot)(n.$slots,`subtitle`,{},()=>[(0,t.createElementVNode)(`p`,null,(0,t.toDisplayString)(e.subtitle),1)])],8,jA)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),e.preventClose?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:1,"aria-label":`Close dialog`,class:`cpDialog__close`,type:`button`,onClick:b},[(0,t.createVNode)(i,{"aria-hidden":`true`,type:`x`})]))]),(0,t.createElementVNode)(`section`,MA,[(0,t.renderSlot)(n.$slots,`default`)]),y.value?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,NA,[(0,t.renderSlot)(n.$slots,`footer`)])):(0,t.createCommentVNode)(``,!0)],36)],40,EA)])}}}),FA=function(e){return e[e.SMALL_MOBILE=370]=`SMALL_MOBILE`,e[e.MOBILE=552]=`MOBILE`,e[e.TABLET=768]=`TABLET`,e[e.LARGE_TABLET=968]=`LARGE_TABLET`,e[e.DESKTOP=1024]=`DESKTOP`,e[e.LARGE=1440]=`LARGE`,e}({}),IA=(e=FA.MOBILE)=>{let n=(0,t.ref)(!1);(0,t.onMounted)(()=>n.value=!0);let{width:r}=nE();return(0,t.computed)(()=>n.value?r.value<e:!1)},LA={};function RA(e,n){return(0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createVNode)(t.Transition,{name:`dialog`},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,`default`)]),_:3})])}var zA=Y(LA,[[`render`,RA]]),BA=(0,t.defineComponent)({__name:`CpDynamicDialog`,props:(0,t.mergeModels)({class:{},isClosableOnClickOutside:{type:Boolean},maxWidth:{},preventClose:{type:Boolean},subtitle:{},title:{}},{isVisible:{type:Boolean,default:!1},isVisibleModifiers:{}}),emits:(0,t.mergeModels)([`close`],[`update:isVisible`]),setup(e,{emit:n}){let r=e,i=n,a=IA(),o=(0,t.useTemplateRef)(`dynamicComponentRef`),s=(0,t.useModel)(e,`isVisible`),c=(0,t.computed)(()=>a.value?`div`:zA),l=(0,t.computed)(()=>a.value?PD:PA),u=(0,t.computed)(()=>a.value?!0:s.value),d=(0,t.computed)(()=>a.value?{modelValue:s.value,contentClass:r.class,canBackdropClose:!r.preventClose,canSwipeClose:!r.preventClose,preventClose:r.preventClose}:{maxWidth:r.maxWidth,class:r.class,preventClose:r.preventClose,isClosableOnClickOutside:r.isClosableOnClickOutside,...r.title&&{title:r.title},...r.subtitle&&{subtitle:r.subtitle}}),f=async()=>{await(0,t.nextTick)(),o.value&&o.value?.open()};return(0,t.watch)(a,()=>{a.value&&s.value&&f()}),(n,r)=>{let a=(0,t.resolveComponent)(`cp-heading`);return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(c.value),null,{default:(0,t.withCtx)(()=>[u.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(l.value),(0,t.mergeProps)({key:0},d.value,{ref_key:`dynamicComponentRef`,ref:o,onClose:r[0]||=e=>i(`close`)}),(0,t.createSlots)({default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`default`)]),footer:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`footer`)]),_:2},[e.title?{name:`header`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`title`,{},()=>[(0,t.createVNode)(a,{class:`cpDynamicDialog__title`,"heading-level":`h3`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)]),_:1})])]),key:`0`}:void 0,e.title?{name:`title`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`title`)]),key:`1`}:void 0,e.subtitle?{name:`subtitle`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`subtitle`)]),key:`2`}:void 0]),1040)):(0,t.createCommentVNode)(``,!0)]),_:3})}}}),VA=(0,t.defineComponent)({inheritAttrs:!1,__name:`CpHeading`,props:{headingLevel:{default:`h1`},size:{default:500}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(n.$props.headingLevel),(0,t.mergeProps)({class:[`cpHeading`,`cpHeading--${e.size}`]},n.$attrs),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`default`)]),_:3},16,[`class`]))}}),HA=(0,t.defineComponent)({__name:`CpItemActions`,props:{actions:{},iconPosition:{default:`horizontal`},quickOptionsLimit:{default:2}},setup(e){let n=e,r=(0,t.computed)(()=>({"cpItemActions--isDropdownOpen":a.value})),i=(0,t.ref)(),a=(0,t.ref)(!1),o=e=>i.value?.show(e),s=(0,t.computed)(()=>({icon:`more-${n.iconPosition}`,command:e=>o(e)})),c=(0,t.computed)(()=>!!n.actions.length),l=(0,t.computed)(()=>{let e=[...n.actions];return e.length<=n.quickOptionsLimit?[...e,s.value]:[...e.slice(0,n.quickOptionsLimit),s.value]}),u=e=>a.value=e;return(n,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`cpItemActions`,r.value])},[c.value?((0,t.openBlock)(),(0,t.createBlock)(nO,{key:0,class:`cpItemActions__buttonGroup`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.value,(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(cA,(0,t.mergeProps)({ref_for:!0},e,{key:n,"hide-label":``,"leading-icon":e.icon}),null,16,[`leading-icon`]))),128))]),_:1})):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(lA,{ref_key:`contextualMenu`,ref:i,items:e.actions,onHide:a[0]||=e=>u(!1),onShow:a[1]||=e=>u(!0)},null,8,[`items`])],2))}}),UA={name:`TimesIcon`,extends:mk};function WA(e){return JA(e)||qA(e)||KA(e)||GA()}function GA(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
349
349
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KA(e,t){if(e){if(typeof e==`string`)return YA(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)?YA(e,t):void 0}}function qA(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function JA(e){if(Array.isArray(e))return YA(e)}function YA(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 XA(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,(0,t.mergeProps)({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),WA(n[0]||=[(0,t.createElementVNode)(`path`,{d:`M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z`,fill:`currentColor`},null,-1)]),16)}UA.render=XA;var ZA={name:`SpinnerIcon`,extends:mk};function QA(e){return nj(e)||tj(e)||ej(e)||$A()}function $A(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
350
350
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ej(e,t){if(e){if(typeof e==`string`)return rj(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)?rj(e,t):void 0}}function tj(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function nj(e){if(Array.isArray(e))return rj(e)}function rj(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 ij(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,(0,t.mergeProps)({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),QA(n[0]||=[(0,t.createElementVNode)(`path`,{d:`M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z`,fill:`currentColor`},null,-1)]),16)}ZA.render=ij;var aj=V.extend({name:`badge`,style:`
|
|
351
351
|
.p-badge {
|
package/package.json
CHANGED
|
@@ -78,6 +78,7 @@ interface InputsOptions {
|
|
|
78
78
|
type DateField = 'day' | 'month'
|
|
79
79
|
|
|
80
80
|
interface Props {
|
|
81
|
+
allowEmpty?: boolean
|
|
81
82
|
autocompleteBirthday?: boolean
|
|
82
83
|
disabled?: boolean
|
|
83
84
|
displayErrorMessage?: boolean
|
|
@@ -99,6 +100,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
99
100
|
maxDate: () => DateTime.now().toISO(),
|
|
100
101
|
label: '',
|
|
101
102
|
required: false,
|
|
103
|
+
allowEmpty: false,
|
|
102
104
|
disabled: false,
|
|
103
105
|
isInvalid: false,
|
|
104
106
|
errorMessage: '',
|
|
@@ -179,7 +181,7 @@ const areInputsEmpty = computed(() => {
|
|
|
179
181
|
})
|
|
180
182
|
|
|
181
183
|
const isDateValid = computed(() => {
|
|
182
|
-
if (areInputsEmpty.value && !props.required)
|
|
184
|
+
if (areInputsEmpty.value && (!props.required || props.allowEmpty)) return true
|
|
183
185
|
|
|
184
186
|
return (
|
|
185
187
|
!props.isInvalid &&
|
|
@@ -476,7 +478,7 @@ watch(year, handleUpdate)
|
|
|
476
478
|
opacity: 0.4;
|
|
477
479
|
}
|
|
478
480
|
}
|
|
479
|
-
|
|
481
|
+
|
|
480
482
|
&--isInvalid {
|
|
481
483
|
.cpDate__inputs,
|
|
482
484
|
.cpDate__inputs:hover {
|