@qaecy/cue-ui 0.0.15 → 0.0.17

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.
package/266.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[266],{5964(Dt,q,h){h.d(q,{p:()=>s});var ye=h(9974),ve=h(4360);function s(i,_){return(0,ye.N)((c,b)=>{let K=0;c.subscribe((0,ve._)(b,O=>i.call(_,O,K++)&&b.next(O)))})}},9417(Dt,q,h){h.d(q,{YN:()=>xn,kq:()=>f});var s=h(5802),i=h(5547);h(7705),h(2271),h(6494),h(1413),h(7468),h(6648),h(6354);const f=new s.nKC(""),A=new s.nKC("",{factory:()=>P}),P="always";Promise.resolve(),Promise.resolve();let Nn=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=i.$C({type:t});static \u0275inj=s.G2t({})}return t})(),xn=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:A,useValue:e.callSetDisabledState??P}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=i.$C({type:t});static \u0275inj=s.G2t({imports:[Nn]})}return t})()}}]);
package/28.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[28],{3319(M,f,u){u.d(f,{a:()=>s});var c=u(7705),l=u(29),e=u(5547);let s=(()=>{class i{icon=(0,c.hFB)(void 0);slot=(0,c.hFB)("before");static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-button-icon"]],inputs:{icon:[1,"icon"],slot:[1,"slot"]},decls:1,vars:2,consts:[[3,"slot","name"]],template:function(o,d){1&o&&e.nrm(0,"cue-svg-icon",0),2&o&&e.Y8G("slot",d.slot())("name",d.icon())},dependencies:[l.A],encapsulation:2})}return i})()},1696(M,f,u){u.d(f,{$:()=>t});var c=u(9769),l=u(7705),e=u(2271),s=u(7089),i=u(5802),n=u(5547);let g=(()=>{class r{el=(0,i.WQX)(n.aKT);renderer=(0,i.WQX)(n.sFG);cuePulse=(0,l.hFB)(!1);cuePulseColor=(0,l.hFB)("");cuePulseMode=(0,l.hFB)("border");activeClass="";constructor(){this.ensureGlobalStyles()}onPulseChanged=(0,i.QZP)(()=>{const h=this.cuePulse(),p=this.cuePulseColor(),m=this.cuePulseMode(),v=this.el.nativeElement;if(this.activeClass&&(this.renderer.removeClass(v,this.activeClass),this.activeClass=""),this.renderer.removeStyle(v,"--cue-pulse-color"),this.renderer.removeStyle(v,"border-radius"),h){const b="text"===m?"cue-pulse-text":"cue-pulse-border";this.renderer.addClass(v,b),this.activeClass=b,p&&this.renderer.setStyle(v,"--cue-pulse-color",p),"border"===m&&setTimeout(()=>{const P=v.firstElementChild;if(P){const _=getComputedStyle(P).borderRadius;_&&"0px"!==_&&this.renderer.setStyle(v,"border-radius",_)}})}});ngOnDestroy(){const h=this.el.nativeElement;this.activeClass&&this.renderer.removeClass(h,this.activeClass),this.renderer.removeStyle(h,"border-radius")}ensureGlobalStyles(){const h="cue-pulse-global-styles";if(document.getElementById(h))return;const p=document.createElement("style");p.id=h,p.textContent="\n @keyframes cue-pulse-border-anim {\n 0% {\n box-shadow: 0 0 0 0 var(--cue-pulse-color, currentColor);\n }\n 70% {\n box-shadow: 0 0 0 8px transparent;\n }\n 100% {\n box-shadow: 0 0 0 0 transparent;\n }\n }\n\n @keyframes cue-pulse-text-anim {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n }\n\n .cue-pulse-border {\n animation: cue-pulse-border-anim 1.5s infinite ease-in-out;\n }\n\n .cue-pulse-text {\n animation: cue-pulse-text-anim 1.5s infinite ease-in-out;\n }\n ",document.head.appendChild(p)}static \u0275fac=function(p){return new(p||r)};static \u0275dir=n.FsC({type:r,selectors:[["","cuePulse",""]],inputs:{cuePulse:[1,"cuePulse"],cuePulseColor:[1,"cuePulseColor"],cuePulseMode:[1,"cuePulseMode"]}})}return r})();const o=["buttonElement"],d=["*"];let t=(()=>{class r{variant=(0,l.hFB)("primary");size=(0,l.hFB)("m");tooltip=(0,l.hFB)("");disabled=(0,l.hFB)(!1);selected=(0,l.geq)(!1);toggleButton=(0,l.hFB)(!1);loading=(0,l.hFB)(!1);fitParentWidth=(0,l.hFB)(!1);noWrap=(0,l.hFB)(!0);buttonElement=l.ebz.required("buttonElement");getStyles=(0,e.EW)(()=>[`\n padding: 0 var(--cue-button-${this.size()}-padding-x);\n\n --focus-color: var(--cue-button-${this.variant()}-focus-color);\n --cue-button-border-color: var(--cue-button-${this.variant()}-border-color);\n color: var(--cue-button-${this.variant()}-foreground);\n --background-color: var(--cue-button-${this.variant()}-background);\n\n --cue-icon-width: var(--cue-button-${this.size()}-icon-width);\n --button-height: var(--cue-button-${this.size()}-height);\n --cue-button-border-radius: var(--cue-button-border-radius, 9999px);\n --button-label-padding-x: var(--cue-button-${this.size()}-label-padding-x);\n `,this.disabled()?`\n color: var(--cue-button-${this.variant()}-disabled-foreground);\n --cue-button-border-color: var(--cue-button-${this.variant()}-disabled-border-color);\n --background-color: var(--cue-button-${this.variant()}-disabled-background);\n `:""].join(""));handleClick(h){h.detail>0&&this.buttonElement().nativeElement.blur(),this.toggleButton()&&(h.stopPropagation(),this.selected.set(!this.selected()))}static \u0275fac=function(p){return new(p||r)};static \u0275cmp=n.VBU({type:r,selectors:[["cue-button"]],viewQuery:function(p,m){1&p&&n.wEZ(m.buttonElement,o,5),2&p&&n.NyB()},inputs:{variant:[1,"variant"],size:[1,"size"],tooltip:[1,"tooltip"],disabled:[1,"disabled"],selected:[1,"selected"],toggleButton:[1,"toggleButton"],loading:[1,"loading"],fitParentWidth:[1,"fitParentWidth"],noWrap:[1,"noWrap"]},outputs:{selected:"selectedChange"},ngContentSelectors:d,decls:3,vars:18,consts:[["buttonElement",""],["tooltipSize","small",3,"click","disabled","cueTooltip","tooltipPlacement","cuePulse"]],template:function(p,m){1&p&&(n.NAR(),n.j41(0,"button",1,0),n.bIt("click",function(b){return m.handleClick(b)}),n.SdG(2),n.k0s()),2&p&&(n.Aen(m.getStyles()),n.xc7("white-space",m.noWrap()?"nowrap":"normal")("flex-basis",m.noWrap()?null:"auto")("min-width",m.noWrap()?null:"fit-content"),n.AVh("selected",m.selected())("ghost","ghost"===m.variant())("fit-parent-width",m.fitParentWidth()),n.Y8G("disabled",m.disabled())("cueTooltip",m.tooltip())("tooltipPlacement","top")("cuePulse",m.loading()))},dependencies:[c.MD,s.d,g],styles:['[_nghost-%COMP%]:has(.fit-parent-width){display:contents}@keyframes _ngcontent-%COMP%_pulse-border{0%{box-shadow:0 0 0 0 var(--focus-color)}50%{box-shadow:0 0 0 8px transparent}to{box-shadow:0 0 0 0 transparent}}button[_ngcontent-%COMP%]{min-width:0;pulse-border-radius:var(--cue-button-border-radius);appearance:none;padding:0;font:inherit;border:var(--cue-button-border-width) var(--cue-button-border-style) var(--cue-button-border-color);display:flex;justify-content:space-between;align-items:center;gap:var(--cue-button-gap);min-height:var(--button-height);height:auto;background-color:var(--background-color);border-radius:var(--cue-button-border-radius, 9999px);margin:3px;position:relative}button[style*="white-space: normal"][_ngcontent-%COMP%]{border-radius:30px!important;padding:10px!important}button.fit-parent-width[_ngcontent-%COMP%]{width:100%;min-width:0}button[_ngcontent-%COMP%]:not(.fit-parent-width){min-width:fit-content;width:auto}button[_ngcontent-%COMP%]:focus{outline:none}button[_ngcontent-%COMP%]:hover:not(:disabled), button[_ngcontent-%COMP%]:focus-within:not(:disabled){outline:1px solid var(--focus-color);outline-offset:2px;cursor:pointer}button.selected[_ngcontent-%COMP%]{outline:1px solid currentColor!important;outline-offset:2px;margin:3px}button.ghost[_ngcontent-%COMP%]:not(.selected){border:none}']})}return r})()},6279(M,f,u){u.d(f,{D:()=>o});var c=u(7705),l=u(2271),e=u(2245),s=u(7089),i=u(5547);const n=[[["","before",""]],"*",[["","after",""]]],g=["[before]","*","[after]"];let o=(()=>{class d{selected=(0,c.hFB)(!1);disabled=(0,c.hFB)(!1);size=(0,c.hFB)("s");tooltip=(0,c.hFB)("");getClass=(0,l.EW)(()=>this.selected()?"selected":"");getTabindex=(0,l.EW)(()=>this.disabled()||this.selected()?"-1":"0");getStyles=(0,l.EW)(()=>`min-width: var(--cue-menu-item-${this.size()}-min-width);\n width: 100%;`);static \u0275fac=function(a){return new(a||d)};static \u0275cmp=i.VBU({type:d,selectors:[["cue-menu-item"]],inputs:{selected:[1,"selected"],disabled:[1,"disabled"],size:[1,"size"],tooltip:[1,"tooltip"]},ngContentSelectors:g,decls:6,vars:8,consts:[["tooltipPlacement","right",3,"disabled","cueTooltip"],[3,"noWrap"],[1,"flexer"]],template:function(a,h){1&a&&(i.NAR(n),i.j41(0,"button",0),i.SdG(1),i.j41(2,"cue-typography",1),i.SdG(3,1),i.k0s(),i.nrm(4,"div",2),i.SdG(5,2),i.k0s()),2&a&&(i.Aen(h.getStyles()),i.HbH(h.getClass()),i.Y8G("disabled",h.disabled())("cueTooltip",h.tooltip()),i.BMQ("tabIndex",h.getTabindex()),i.R7$(2),i.Y8G("noWrap",!0))},dependencies:[e.o,s.d],styles:["[_nghost-%COMP%]{display:contents}button[_ngcontent-%COMP%]{appearance:none;font:inherit;display:flex;border:0;align-items:center;justify-content:start;background:transparent;height:var(--cue-menu-item-height);border-radius:var(--cue-menu-item-border-radius);padding:0 var(--cue-menu-item-padding-x);gap:0 var(--cue-menu-item-gap);--cue-icon-width: var(--cue-menu-item-icon-size);background:var(--cue-menu-item-background-color)}button[_ngcontent-%COMP%]:focus{outline:none}button[_ngcontent-%COMP%]:hover:not(:disabled), button[_ngcontent-%COMP%]:focus:not(:disabled){background:var(--cue-menu-item-focus-background-color)}button.selected[_ngcontent-%COMP%]{background:var(--cue-menu-item-selected-background-color)!important}button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default!important;background:var(--cue-menu-item-background-color)!important}button[_ngcontent-%COMP%]:hover{cursor:pointer}button[_ngcontent-%COMP%]:disabled:hover{cursor:not-allowed}.flexer[_ngcontent-%COMP%]{flex:1}"]})}return d})()},356(M,f,u){u.d(f,{M:()=>i});var c=u(7705),l=u(2271),e=u(5547);const s=["*"];let i=(()=>{class n{maxHeight=(0,c.hFB)(void 0);maxHeightStyle=(0,l.EW)(()=>{const o=this.maxHeight();if(void 0!==o)return"number"==typeof o?`${o}px`:o});static \u0275fac=function(d){return new(d||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-menu-wrap"]],hostVars:2,hostBindings:function(d,t){2&d&&e.xc7("max-height",t.maxHeightStyle())},inputs:{maxHeight:[1,"maxHeight"]},ngContentSelectors:s,decls:2,vars:0,consts:[[1,"cue-menu-wrap-inner"]],template:function(d,t){1&d&&(e.NAR(),e.rj2(0,"div",0),e.SdG(1),e.eux())},styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:var(--cue-menu-gap);padding:var(--cue-menu-padding-y) var(--cue-menu-padding-x);border-radius:var(--cue-menu-border-radius);border:1px solid var(--cue-menu-border-color);background:var(--cue-menu-background-color);color:var(--cue-menu-foreground-color);max-height:var(--cue-menu-max-height);overflow-y:auto}.cue-menu-wrap-inner[_ngcontent-%COMP%]{--cue-input-value-color: var(--cue-menu-foreground-color);width:100%;height:100%;display:flex;flex-direction:column;gap:var(--cue-menu-gap)}"]})}return n})()},7023(M,f,u){u.d(f,{Q:()=>g});var c=u(7705),l=u(5802),e=u(5547),s=u(9769),i=u(9595);let n=(()=>{class o{template=c.hFB.required();context=(0,c.hFB)({});positioning=(0,c.hFB)("bottomright");menuClick=(0,c.CGW)();positioningClass=()=>this.positioning();static \u0275fac=function(r){return new(r||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-context-menu-container"]],hostAttrs:[1,"clickoutside-ignore"],inputs:{template:[1,"template"],context:[1,"context"],positioning:[1,"positioning"]},outputs:{menuClick:"menuClick"},decls:2,vars:4,consts:[[1,"context-menu-wrapper","clickoutside-ignore",3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(r,a){1&r&&(e.j41(0,"div",0),e.bIt("click",function(){return a.menuClick.emit()}),e.eu8(1,1),e.k0s()),2&r&&(e.HbH(a.positioningClass()),e.R7$(),e.Y8G("ngTemplateOutlet",a.template())("ngTemplateOutletContext",a.context()))},dependencies:[s.MD,s.T3],styles:["[_nghost-%COMP%]{position:fixed;pointer-events:auto;z-index:10000;min-width:10px;min-height:10px}.context-menu-wrapper[_ngcontent-%COMP%]{pointer-events:auto;min-width:150px;min-height:10px}.context-menu-wrapper.topleft[_ngcontent-%COMP%]{transform:translate(-100%,-100%)}.context-menu-wrapper.topright[_ngcontent-%COMP%]{transform:translateY(-100%)}.context-menu-wrapper.bottomleft[_ngcontent-%COMP%]{transform:translate(-100%)}.context-menu-wrapper.bottomright[_ngcontent-%COMP%], .context-menu-wrapper.rightstart[_ngcontent-%COMP%]{transform:translate(0)}.context-menu-wrapper.rightend[_ngcontent-%COMP%]{transform:translateY(-100%)}.context-menu-wrapper.leftstart[_ngcontent-%COMP%]{transform:translate(-100%)}.context-menu-wrapper.leftend[_ngcontent-%COMP%]{transform:translate(-100%,-100%)}"]})}return o})(),g=(()=>{class o{elementRef=(0,l.WQX)(e.aKT);applicationRef=(0,l.WQX)(e.o8S);environmentInjector=(0,l.WQX)(l.uvJ);mousePressHandler=i.B.getInstance();static openMenus=[];cueContextMenu=c.hFB.required();contextMenuData=(0,c.hFB)();cueContextEnabled=(0,c.hFB)(!0);trigger=(0,c.hFB)("rightclick");positioning=(0,c.hFB)(void 0);positionAtCursor=(0,c.hFB)(!1);contextMenuOpen=(0,c.CGW)();contextMenuClose=(0,c.CGW)();contextMenuRef=null;documentClickHandlerAttached=!1;documentClickHandler=this.onDocumentClick.bind(this);documentScrollHandler=this.onDocumentScroll.bind(this);hoverTimeout=null;closeTimeout=null;hoverDelay=150;menuMouseEnterHandler=null;menuMouseLeaveHandler=null;boundOnShortRightPress=this.onShortRightPress.bind(this);boundOnShortLeftPress=this.onShortLeftPress.bind(this);boundOnLongRightPress=this.onLongRightPress.bind(this);boundOnLongLeftPress=this.onLongLeftPress.bind(this);constructor(){(0,l.QZP)(()=>{!this.cueContextEnabled()&&this.contextMenuRef&&setTimeout(()=>{this.contextMenuRef&&this.closeContextMenu()},0)})}ngOnInit(){const t=document.querySelectorAll("cue-context-menu-container");if(t.length>0){const r=new Set(o.openMenus.filter(a=>a.contextMenuRef).map(a=>a.contextMenuRef.location.nativeElement));t.forEach(a=>{a.parentNode&&!r.has(a)&&a.parentNode.removeChild(a)})}("rightclick"===this.trigger()||"both"===this.trigger()||"longpress"===this.trigger())&&this.mousePressHandler.setSuppressNativeContextMenu(!0),this.mousePressHandler.events.addListener("shortPressedRight",this.boundOnShortRightPress),this.mousePressHandler.events.addListener("shortPressedLeft",this.boundOnShortLeftPress),"longpress"===this.trigger()&&(this.mousePressHandler.events.addListener("longPressedRight",this.boundOnLongRightPress),this.mousePressHandler.events.addListener("longPressedLeft",this.boundOnLongLeftPress)),"hover"===this.trigger()&&(this.elementRef.nativeElement.addEventListener("mouseenter",this.onMouseEnter.bind(this)),this.elementRef.nativeElement.addEventListener("mouseleave",this.onMouseLeave.bind(this)))}onShortRightPress(t){if(this.isEventOnThisElement(t)&&("rightclick"===this.trigger()||"both"===this.trigger())){if(this.contextMenuRef)return t.preventDefault(),t.stopPropagation(),void this.closeContextMenu();if(!this.cueContextEnabled?.())return;t.preventDefault(),t.stopPropagation(),this.showContextMenu(t)}}onShortLeftPress(t){if(this.isEventOnThisElement(t)&&("leftclick"===this.trigger()||"both"===this.trigger())){if(this.contextMenuRef)return t.preventDefault(),t.stopPropagation(),void this.closeContextMenu();if(!this.cueContextEnabled?.())return;t.preventDefault(),t.stopPropagation(),this.showContextMenu(t)}}onLongRightPress(t){this.cueContextEnabled?.()&&this.isEventOnThisElement(t)&&("longpress"===this.trigger()||"rightclick"===this.trigger()||"both"===this.trigger())&&(t.preventDefault(),t.stopPropagation(),this.showContextMenu(t))}onLongLeftPress(t){this.cueContextEnabled?.()&&this.isEventOnThisElement(t)&&("longpress"===this.trigger()||"leftclick"===this.trigger()||"both"===this.trigger())&&(t.preventDefault(),t.stopPropagation(),this.showContextMenu(t))}isEventOnThisElement(t){return this.elementRef.nativeElement.contains(t.target)}onMouseEnter(t){!this.cueContextEnabled?.()||"hover"!==this.trigger()||(this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null),this.contextMenuRef||(this.hoverTimeout=setTimeout(()=>{this.showContextMenu(t)},this.hoverDelay)))}onMouseLeave(t){!this.cueContextEnabled?.()||"hover"!==this.trigger()||(this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null),this.closeTimeout=setTimeout(()=>{this.contextMenuRef&&this.closeContextMenu()},this.hoverDelay))}onDocumentClick(t){if(this.contextMenuRef)return this.contextMenuRef.location.nativeElement.contains(t.target)?null!==t.target?.closest("cue-menu-item button")?void setTimeout(()=>{this.contextMenuRef&&this.closeContextMenu()},0):void 0:void this.closeContextMenu()}onDocumentScroll(t){this.contextMenuRef&&(this.contextMenuRef.location.nativeElement.contains(t.target)||this.closeContextMenu())}showContextMenu(t){const r=this.elementRef.nativeElement.getBoundingClientRect();o.openMenus.forEach(b=>{b!==this&&(b.contextMenuRef?.location.nativeElement?.contains(this.elementRef.nativeElement)||b.closeContextMenu())}),this.closeContextMenu();const a=this.calculatePositioning(t,r),h=this.cueContextMenu();if(!(h&&h instanceof e.C4Q))return void console.error("Invalid template provided to context menu");this.contextMenuRef=(0,c.a0P)(n,{environmentInjector:this.environmentInjector}),this.contextMenuRef.setInput("template",h),this.contextMenuRef.setInput("context",{$implicit:this.contextMenuData(),event:t}),this.contextMenuRef.setInput("positioning",a);const p=this.contextMenuRef.instance.menuClick.subscribe(()=>{this.closeContextMenu()}),m=this.contextMenuRef.location.nativeElement;"hover"!==this.trigger()||this.positionAtCursor()?(m.style.left=`${t.clientX}px`,m.style.top=`${t.clientY}px`):this.positionSubmenu(m,a,r),this.applicationRef.attachView(this.contextMenuRef.hostView),(this.elementRef.nativeElement.closest("dialog")||document.body).appendChild(m),this.contextMenuRef._menuClickSubscription=p,"hover"===this.trigger()&&(this.menuMouseEnterHandler=()=>{this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)},this.menuMouseLeaveHandler=()=>{this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null),this.closeTimeout=setTimeout(()=>{this.contextMenuRef&&this.closeContextMenu()},this.hoverDelay)},m.addEventListener("mouseenter",this.menuMouseEnterHandler),m.addEventListener("mouseleave",this.menuMouseLeaveHandler)),setTimeout(()=>{this.contextMenuRef&&!this.documentClickHandlerAttached&&(document.addEventListener("click",this.documentClickHandler,!0),document.addEventListener("contextmenu",this.documentClickHandler,!0),document.addEventListener("scroll",this.documentScrollHandler,!0),this.documentClickHandlerAttached=!0)},0),o.openMenus.includes(this)||o.openMenus.push(this),this.contextMenuOpen.emit({event:t,data:this.contextMenuData(),suggestedPositioning:a})}calculatePositioning(t,r){const a=this.positioning();if(a)return a;if("hover"===this.trigger()&&!this.positionAtCursor())return this.calculateSubmenuPositioning(r);const h=window.innerWidth,p=window.innerHeight,v=t.clientX>h-200,b=t.clientY>p-200;return v&&b?"topleft":v?"bottomleft":b?"topright":"bottomright"}calculateSubmenuPositioning(t){const r=window.innerWidth,a=window.innerHeight,P=r-t.right>=300,_=a-t.bottom>=150;return P&&_?"rightstart":P&&!_?"rightend":!P&&_?"leftstart":"leftend"}positionSubmenu(t,r,a){switch(r){case"rightstart":default:t.style.left=`${a.right}px`,t.style.top=`${a.top}px`;break;case"rightend":t.style.left=`${a.right}px`,t.style.top=`${a.bottom}px`;break;case"leftstart":t.style.left=`${a.left}px`,t.style.top=`${a.top}px`;break;case"leftend":t.style.left=`${a.left}px`,t.style.top=`${a.bottom}px`}}closeContextMenu(){if(this.contextMenuRef){const r=this.contextMenuRef.location.nativeElement;this.menuMouseEnterHandler&&(r.removeEventListener("mouseenter",this.menuMouseEnterHandler),this.menuMouseEnterHandler=null),this.menuMouseLeaveHandler&&(r.removeEventListener("mouseleave",this.menuMouseLeaveHandler),this.menuMouseLeaveHandler=null),this.documentClickHandlerAttached&&(document.removeEventListener("click",this.documentClickHandler,!0),document.removeEventListener("contextmenu",this.documentClickHandler,!0),document.removeEventListener("scroll",this.documentScrollHandler,!0),this.documentClickHandlerAttached=!1);const a=this.contextMenuRef._menuClickSubscription;a&&a.unsubscribe(),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null);try{r.parentNode?r.parentNode.removeChild(r):document.body.contains(r)&&document.body.removeChild(r)}catch{try{r.remove&&r.remove()}catch{}}this.applicationRef.detachView(this.contextMenuRef.hostView),this.contextMenuRef.destroy(),this.contextMenuRef=null,this.contextMenuClose.emit()}const t=o.openMenus.indexOf(this);t>-1&&o.openMenus.splice(t,1)}ngOnDestroy(){this.mousePressHandler.setSuppressNativeContextMenu(!1),this.mousePressHandler.events.removeListener("shortPressedRight",this.boundOnShortRightPress),this.mousePressHandler.events.removeListener("shortPressedLeft",this.boundOnShortLeftPress),this.mousePressHandler.events.removeListener("longPressedRight",this.boundOnLongRightPress),this.mousePressHandler.events.removeListener("longPressedLeft",this.boundOnLongLeftPress),"hover"===this.trigger()&&(this.elementRef.nativeElement.removeEventListener("mouseenter",this.onMouseEnter),this.elementRef.nativeElement.removeEventListener("mouseleave",this.onMouseLeave)),this.hoverTimeout&&clearTimeout(this.hoverTimeout),this.closeTimeout&&clearTimeout(this.closeTimeout),this.closeContextMenu()}static \u0275fac=function(r){return new(r||o)};static \u0275dir=e.FsC({type:o,selectors:[["","cueContextMenu",""]],inputs:{cueContextMenu:[1,"cueContextMenu"],contextMenuData:[1,"contextMenuData"],cueContextEnabled:[1,"cueContextEnabled"],trigger:[1,"trigger"],positioning:[1,"positioning"],positionAtCursor:[1,"positionAtCursor"]},outputs:{contextMenuOpen:"contextMenuOpen",contextMenuClose:"contextMenuClose"}})}return o})()},5970(M,f,u){u.d(f,{C:()=>i});var c=u(7705),l=u(5802),e=u(5547);class s{newRect;oldRect;isFirst;element;constructor(g,o,d){this.newRect=g,this.oldRect=o,this.isFirst=null==o,this.element=d}}let i=(()=>{class n{element;zone;observer;oldRect;resized=(0,c.CGW)();windowResized=(0,c.CGW)();constructor(o,d){this.element=o,this.zone=d,this.observer=new ResizeObserver(t=>this.zone.run(()=>this.observe(t)))}ngOnInit(){this.observer.observe(this.element.nativeElement)}ngOnDestroy(){this.observer.disconnect()}onWindowResize(){this.zone.run(()=>{const o=this.getWindowRect(),d=new s(o,void 0,window.document.documentElement);this.windowResized.emit(d)})}observe(o){const d=o[0],t=new s(d.contentRect,this.oldRect,d.target);this.oldRect=d.contentRect,this.resized.emit(t)}getWindowRect(){return{x:0,y:0,width:window.innerWidth,height:window.innerHeight,top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,toJSON:()=>({})}}static \u0275fac=function(d){return new(d||n)(e.rXU(e.aKT),e.rXU(l.SKi))};static \u0275dir=e.FsC({type:n,selectors:[["","cueResized",""]],hostBindings:function(d,t){1&d&&e.bIt("resize",function(){return t.onWindowResize()},e.tSv)},outputs:{resized:"resized",windowResized:"windowResized"}})}return n})()},9595(M,f,u){u.d(f,{B:()=>e});var c=u(1339);let l=(()=>{class s{static _instance;_pressTimer;_shortPressDuration=300;_longPressDuration=1e3;_pressTime;_emittedLongPress=!1;events=new c.EventEmitter;constructor(){document.addEventListener("keydown",n=>{void 0===this._pressTime&&(this._pressTime=(new Date).getTime(),this._pressTimer=setTimeout(()=>{this._handleLongPress(n.key),this._emittedLongPress=!0,clearTimeout(this._pressTimer)},this._longPressDuration),this.events.emit("holdingKey",n.key))}),document.addEventListener("keyup",n=>{void 0!==this._pressTime&&(clearTimeout(this._pressTimer),this._pressTime-(new Date).getTime()<this._shortPressDuration&&!this._emittedLongPress&&this._handleShortPress(n.key),this._reset(),this.events.emit("releasedKey",n.key))})}static getInstance(){return this._instance||(this._instance=new s),this._instance}_handleShortPress(n){"Escape"===n&&this.events.emit("shortPressedEsc"),this.events.emit("shortPressedKey",n)}_handleLongPress(n){"Escape"===n&&this.events.emit("longPressedEsc"),this.events.emit("longPressedKey",n)}_reset(){this._pressTime=void 0,this._emittedLongPress=!1}}return s})(),e=(()=>{class s{static _instance;_pressTimer;_shortPressDuration=200;_pressTime;_emittedLongPress=!1;_holdingControl=!1;_keyPressHandler=l.getInstance();_suppressNativeContextMenu=!1;events=new c.EventEmitter;constructor(){this._keyPressHandler.events.addListener("holdingKey",n=>{this._holdingControl="Control"===n}),this._keyPressHandler.events.addListener("releasedKey",n=>{"Control"===n&&(this._holdingControl=!1)}),document.addEventListener("mousedown",n=>{void 0===this._pressTime&&(this._pressTime=(new Date).getTime(),this._pressTimer=setTimeout(()=>{this._handlePress(n,"long"),this._emittedLongPress=!0,clearTimeout(this._pressTimer)},this._shortPressDuration))}),document.addEventListener("mouseup",n=>{void 0!==this._pressTime&&(clearTimeout(this._pressTimer),this._pressTime-(new Date).getTime()<this._shortPressDuration&&!this._emittedLongPress&&this._handlePress(n,"short"),this._reset())}),document.addEventListener("contextmenu",n=>{this._suppressNativeContextMenu&&(n.preventDefault(),n.stopPropagation())})}static getInstance(){return this._instance||(this._instance=new s),this._instance}setSuppressNativeContextMenu(n){this._suppressNativeContextMenu=n}get suppressNativeContextMenu(){return this._suppressNativeContextMenu}_handlePress(n,g){0===n.button&&!this._holdingControl&&this.events.emit(`${g}PressedLeft`,n),0===n.button&&this._holdingControl&&this.events.emit(`${g}PressedRight`,n),2===n.button&&this.events.emit(`${g}PressedRight`,n)}_reset(){this._pressTime=void 0,this._emittedLongPress=!1}}return s})()},2001(M,f){var u=this&&this.__spreadArrays||function(){for(var l=0,e=0,s=arguments.length;e<s;e++)l+=arguments[e].length;var i=Array(l),n=0;for(e=0;e<s;e++)for(var g=arguments[e],o=0,d=g.length;o<d;o++,n++)i[n]=g[o];return i};Object.defineProperty(f,"__esModule",{value:!0});var c=function(){return function l(){var e=this;this.events={},this.maxListeners=1/0,this.emit=function(s){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];if(e.events[s]){for(var g=e.events[s].length,d=0,t=Array.from(e.events[s]);d<t.length;d++)t[d].apply(void 0,i);return!!g}return!1},this.on=function(s,i){return e.addListener(s,i),e},this.once=function(s,i){var n=function(){for(var g=[],o=0;o<arguments.length;o++)g[o]=arguments[o];i.apply(void 0,g),e.removeListener(s,n)};return e.addListener(s,n),e},this.addListener=function(s,i){return s in e.events?e.events[s].push(i):e.events[s]=[i],e.maxListeners!==1/0&&e.maxListeners<=e.events[s].length&&console.warn('Maximum event listeners for "'+s+'" event!'),e},this.removeListener=function(s,i){if(s in e.events){var n=e.events[s].indexOf(i);-1!==n&&e.events[s].splice(n,1)}return e},this.hasListeners=function(s){return e.events[s]&&!!e.events[s].length},this.prependListener=function(s,i){return s in e.events?e.events[s].unshift(i):e.events[s]=[i],e},this.prependOnceListener=function(s,i){var n=function(){for(var g=[],o=0;o<arguments.length;o++)g[o]=arguments[o];i.apply(void 0,g),e.removeListener(s,n)};return e.prependListener(s,n),e},this.off=function(s,i){return e.removeListener(s,i)},this.removeAllListeners=function(s){return delete e.events[s],e},this.setMaxListeners=function(s){return e.maxListeners=s,e},this.getMaxListeners=function(){return e.maxListeners},this.listeners=function(s){return u(e.events[s])},this.rawListeners=function(s){return e.events[s]},this.eventNames=function(){return Object.keys(e.events)},this.listenerCount=function(s){return e.events[s]&&e.events[s].length||0}}}();f.EventEmitter=c},1339(M,f,u){function c(l){for(var e in l)f.hasOwnProperty(e)||(f[e]=l[e])}Object.defineProperty(f,"__esModule",{value:!0}),c(u(9146)),c(u(2001))},9146(M,f){Object.defineProperty(f,"__esModule",{value:!0}),f.asTypedEventEmitter=function u(c){return c}}}]);