p3x-redis-ui-material
Version:
💿 P3X Redis UI triple frontend — Angular + React/MUI + Vue/Vuetify with 54 languages, 7 themes, Socket.IO, desktop notifications, and full feature parity
14 lines • 99.2 kB
JavaScript
import {E as r,X as Xe$1,f as fQ,F as x,Q,G as It,b as bi$1,P,K as op,L as uc,M as wt,_ as _e,N as h,O as A,S as F$1,T as p,V as N,$ as R,a0 as nt$1,a1 as he,a2 as C$1,a3 as Ie,a4 as O,a5 as QE,a6 as S,a7 as B,a8 as y,a9 as q$1,aa as Z,ab as Ae,ac as uo,ad as Vn$1,ae as Q$1,af as oe,ag as Ht$1,ah as wn$1,ai as tt,aj as xn$1,ak as st,al as jl,am as Ps,an as Fi$1,ao as Hi$1,ap as Nr,aq as mr,ar as re,as as ee,at as sp,au as Ot,av as vr,aw as L$1,ax as xe,ay as ji$1,az as Li,aA as up,aB as XE,aC as Re,aD as Tl,aE as ce,aF as Ii$1,aG as Dn$1,aH as Of,o as mt$1,aI as Ei$1,aJ as jn,d as ae,e as aY,aK as iY,aL as sY,y as yt,w as wt$1,Y as Yt,W as Wt,Z as Zt,u,i as Qt,j as gt$1,a as f,aM as lt,B as Ba,h as hv,v as vf,I as IS,n as no,k as bv,p as pv,c as In$1,t as If,r as ro,R as Rv,x as YT,J as JT,z as fm,A as pm,H as HT,U as UT,aN as Ov,aO as kS}from'./chunk-BwlFOdbx.js';import {g}from'./chunk-D8bfuaIw.js';import {X}from'./chunk-DeaQoucA.js';import {w as we,t as te}from'./chunk-B8YlgrW9.js';import'./chunk-BqyDblvT.js';import {L,F,E}from'./main-HNF44SV3.js';var ze=(()=>{class o{dialog;constructor(t){this.dialog=t;}show(t){return L(this,null,function*(){let{AclUserDialogComponent:i}=yield import('./chunk-DqeUBvBz.js'),n=this.dialog.open(i,h({data:t,width:"600px"}));return new Promise(r=>{n.afterClosed().subscribe(s=>r(s));})})}static \u0275fac=function(i){return new(i||o)(A(Re))};static \u0275prov=F$1({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function Vt(o){let e=o.cloneNode(true),t=e.querySelectorAll("[id]"),i=o.nodeName.toLowerCase();e.removeAttribute("id");for(let n=0;n<t.length;n++)t[n].removeAttribute("id");return i==="canvas"?je(o,e):(i==="input"||i==="select"||i==="textarea")&&Ke(o,e),$e("canvas",o,e,je),$e("input, textarea, select",o,e,Ke),e}function $e(o,e,t,i){let n=e.querySelectorAll(o);if(n.length){let r=t.querySelectorAll(o);for(let s=0;s<n.length;s++)i(n[s],r[s]);}}var Di=0;function Ke(o,e){e.type!=="file"&&(e.value=o.value),e.type==="radio"&&e.name&&(e.name=`mat-clone-${e.name}-${Di++}`);}function je(o,e){let t=e.getContext("2d");if(t)try{t.drawImage(o,0,0);}catch(i){}}function $t(o){let e=o.getBoundingClientRect();return {top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function At(o,e,t){let{top:i,bottom:n,left:r,right:s}=o;return t>=i&&t<=n&&e>=r&&e<=s}function yi(o,e){let t=e.left<o.left,i=e.left+e.width>o.right,n=e.top<o.top,r=e.top+e.height>o.bottom;return t||i||n||r}function nt(o,e,t){o.top+=e,o.bottom=o.top+o.height,o.left+=t,o.right=o.left+o.width;}function Be(o,e,t,i){let{top:n,right:r,bottom:s,left:_,width:h,height:g}=o,D=h*e,k=g*e;return i>n-k&&i<s+k&&t>_-D&&t<r+D}var mt=class{_document;positions=new Map;constructor(e){this._document=e;}clear(){this.positions.clear();}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:$t(t)});});}handleScroll(e){let t=xe(e),i=this.positions.get(t);if(!i)return null;let n=i.scrollPosition,r,s;if(t===this._document){let g=this.getViewportScrollPosition();r=g.top,s=g.left;}else r=t.scrollTop,s=t.scrollLeft;let _=n.top-r,h=n.left-s;return this.positions.forEach((g,D)=>{g.clientRect&&t!==D&&t.contains(D)&&nt(g.clientRect,_,h);}),n.top=r,n.left=s,{top:_,left:h}}getViewportScrollPosition(){return {top:window.scrollY,left:window.scrollX}}};function oi(o,e){let t=o.rootNodes;if(t.length===1&&t[0].nodeType===e.ELEMENT_NODE)return t[0];let i=e.createElement("div");return t.forEach(n=>i.appendChild(n)),i}function Kt(o,e,t){for(let i in e)if(e.hasOwnProperty(i)){let n=e[i];n?o.setProperty(i,n,t?.has(i)?"important":""):o.removeProperty(i);}return o}function q(o,e){let t=e?"":"none";Kt(o.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t});}function qe(o,e,t){Kt(o.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t);}function gt(o,e){return e&&e!="none"?o+" "+e:o}function We(o,e){o.style.width=`${e.width}px`,o.style.height=`${e.height}px`,o.style.transform=ot(e.left,e.top);}function ot(o,e){return `translate3d(${Math.round(o)}px, ${Math.round(e)}px, 0)`}var et={capture:true},Mt={passive:false,capture:true},Ei=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_e({type:o,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,n){},styles:[`@layer cdk-resets {
.cdk-drag-preview {
background: none;
border: none;
padding: 0;
color: inherit;
inset: auto;
}
}
.cdk-drag-placeholder *,
.cdk-drag-preview * {
pointer-events: none !important;
}
`],encapsulation:2})}return o})(),ft=(()=>{class o{_ngZone=p(N);_document=p(R);_styleLoader=p(nt$1);_renderer=p(he).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new C$1;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Ie([]);_globalListeners;_draggingPredicate=t=>t.isDragging();_domNodesToDirectives=null;pointerMove=new C$1;pointerUp=new C$1;registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t);}registerDragItem(t){this._dragInstances.add(t),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,Mt);});}removeDropContainer(t){this._dropInstances.delete(t);}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.();}startDragging(t,i){if(!(this._activeDragInstances().indexOf(t)>-1)&&(this._styleLoader.load(Ei),this._activeDragInstances.update(n=>[...n,t]),this._activeDragInstances().length===1)){let n=i.type.startsWith("touch"),r=_=>this.pointerUp.next(_),s=[["scroll",_=>this._scroll.next(_),et],["selectstart",this._preventDefaultWhileDragging,Mt]];n?s.push(["touchend",r,et],["touchcancel",r,et]):s.push(["mouseup",r,et]),n||s.push(["mousemove",_=>this.pointerMove.next(_),Mt]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=s.map(([_,h,g])=>this._renderer.listen(this._document,_,h,g));});}}stopDragging(t){this._activeDragInstances.update(i=>{let n=i.indexOf(t);return n>-1?(i.splice(n,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners();}isDragging(t){return this._activeDragInstances().indexOf(t)>-1}scrolled(t){let i=[this._scroll];return t&&t!==this._document&&i.push(new O(n=>this._ngZone.runOutsideAngular(()=>{let r=this._renderer.listen(t,"scroll",s=>{this._activeDragInstances().length&&n.next(s);},et);return ()=>{r();}}))),QE(...i)}registerDirectiveNode(t,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(t,i);}removeDirectiveNode(t){this._domNodesToDirectives?.delete(t);}getDragDirectiveForNode(t){return this._domNodesToDirectives?.get(t)||null}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete();}_preventDefaultWhileDragging=t=>{this._activeDragInstances().length>0&&t.preventDefault();};_persistentTouchmoveListener=t=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&t.preventDefault(),this.pointerMove.next(t));};_clearGlobalListeners(){this._globalListeners?.forEach(t=>t()),this._globalListeners=void 0;}static \u0275fac=function(i){return new(i||o)};static \u0275prov=S({token:o,factory:o.\u0275fac})}return o})();function Ze(o){let e=o.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(o)*e}function Pi(o){let e=getComputedStyle(o),t=Lt(e,"transition-property"),i=t.find(_=>_==="transform"||_==="all");if(!i)return 0;let n=t.indexOf(i),r=Lt(e,"transition-duration"),s=Lt(e,"transition-delay");return Ze(r[n])+Ze(s[n])}function Lt(o,e){return o.getPropertyValue(e).split(",").map(i=>i.trim())}var ki=new Set(["position"]),Nt=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview}constructor(e,t,i,n,r,s,_,h,g,D){this._document=e,this._rootElement=t,this._direction=i,this._initialDomRect=n,this._previewTemplate=r,this._previewClass=s,this._pickupPositionOnPage=_,this._initialTransform=h,this._zIndex=g,this._renderer=D;}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),Ye(this._preview)&&this._preview.showPopover();}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null;}setTransform(e){this._preview.style.transform=e;}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e);}getTransitionDuration(){return Pi(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,i=e?e.template:null,n;if(i&&e){let r=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(i,e.context);s.detectChanges(),n=oi(s,this._document),this._previewEmbeddedView=s,e.matchSize?We(n,r):n.style.transform=ot(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y);}else n=Vt(this._rootElement),We(n,this._initialDomRect),this._initialTransform&&(n.style.transform=this._initialTransform);return Kt(n.style,{"pointer-events":"none",margin:Ye(n)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},ki),q(n,false),n.classList.add("cdk-drag-preview"),n.setAttribute("popover","manual"),n.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(r=>n.classList.add(r)):n.classList.add(t)),n}};function Ye(o){return "showPopover"in o}var Ii={passive:true},Xe={passive:false},Ti={passive:false,capture:true},Ri=800,Je="cdk-drag-placeholder",Qe=new Set(["position"]);function ri(o,e,t={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){let i=o.get(Ot,null,{optional:true})||o.get(he).createRenderer(null,null);return new Ut(e,t,o.get(R),o.get(N),o.get(vr),o.get(ft),i)}var Ut=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview=null;_previewContainer;_placeholderRef=null;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Ie(false);_hasMoved=false;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new C$1;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=L$1.EMPTY;_pointerUpSubscription=L$1.EMPTY;_scrollSubscription=L$1.EMPTY;_resizeSubscription=L$1.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=true;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef=null;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>q(t,e)));}_disabled=false;beforeStarted=new C$1;started=new C$1;released=new C$1;ended=new C$1;entered=new C$1;exited=new C$1;dropped=new C$1;moved=this._moveEvents;data;constrainPosition;constructor(e,t,i,n,r,s,_){this._config=t,this._document=i,this._ngZone=n,this._viewportRuler=r,this._dragDropRegistry=s,this._renderer=_,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new mt(i),s.registerDragItem(this);}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(i=>tt(i)),this._handles.forEach(i=>q(i,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i);}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=tt(e);if(t!==this._rootElement){this._removeRootElementListeners();let i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(t,"mousedown",this._pointerDown,Xe),i.listen(t,"touchstart",this._pointerDown,Ii),i.listen(t,"dragstart",this._nativeDragStart,Xe)]),this._initialTransform=void 0,this._rootElement=t;}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?tt(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null;}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0};}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&yi(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let e=this._boundaryElement.getBoundingClientRect(),t=this._rootElement.getBoundingClientRect(),i=0,n=0;t.left<e.left?i=e.left-t.left:t.right>e.right&&(i=e.right-t.right),t.top<e.top?n=e.top-t.top:t.bottom>e.bottom&&(n=e.bottom-t.bottom);let r=this._activeTransform.x,s=this._activeTransform.y,_=r+i,h=s+n;this._rootElement.style.transform=ot(_,h),this._activeTransform={x:_,y:h},this._passiveTransform={x:_,y:h};}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),q(e,true));}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),q(e,this.disabled));}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e;}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return {x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e);}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0;}_destroyPreview(){this._preview?.destroy(),this._preview=null;}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null;}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e);}else this.disabled||this._initializeDragSequence(this._rootElement,e);};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let n=Math.abs(t.x-this._pickupPositionOnPage.x),r=Math.abs(t.y-this._pickupPositionOnPage.y);if(n+r>=this._config.dragStartThreshold){let _=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),h=this._dropContainer;if(!_){this._endDragSequence(e);return}(!h||!h.isDragging()&&!h.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(true),this._ngZone.run(()=>this._startDragSequence(e)));}return}e.cancelable&&e.preventDefault();let i=this._getConstrainedPointerPosition(t);if(this._hasMoved=true,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,t);else {let n=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=i.x-n.x+this._passiveTransform.x,r.y=i.y-n.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y);}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:e,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta});});};_pointerUp=e=>{this._endDragSequence(e);};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this);});else {this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e});}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this);}}_startDragSequence(e){it(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),i=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(t,"selectstart",Oi,Ti);}),i){let n=this._rootElement,r=n.parentNode,s=this._placeholder=this._createPlaceholderElement(),_=this._marker=this._marker||this._document.createComment("");r.insertBefore(_,n),this._initialTransform=n.style.transform||"",this._preview=new Nt(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(r,t)),qe(n,false,Qe),this._document.body.appendChild(r.replaceChild(s,n)),this.started.next({source:this,event:e}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this);}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[]);}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let i=this.isDragging(),n=it(t),r=!n&&t.button!==0,s=this._rootElement,_=xe(t),h=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+Ri>Date.now(),g=n?ji$1(t):Li(t);if(_&&_.draggable&&t.type==="mousedown"&&t.preventDefault(),i||r||h||g)return;if(this._handles.length){let L=s.style;this._rootElementTapHighlight=L.webkitTapHighlightColor||"",L.webkitTapHighlightColor="transparent";}this._hasMoved=false,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(L=>this._updateOnScroll(L)),this._boundaryElement&&(this._boundaryRect=$t(this._boundaryElement));let D=this._previewTemplate;this._pickupPositionInElement=D&&D.template&&!D.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let k=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:k.x,y:k.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t);}_cleanupDragArtifacts(e){qe(this._rootElement,true,Qe),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,i=t.getItemIndex(this),n=this._getPointerPositionOnPage(e),r=this._getDragDistance(n),s=t._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:r,dropPoint:n,event:e}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:r,dropPoint:n,event:e}),t.drop(this,i,this._initialIndex,this._initialContainer,s,r,n,e),this._dropContainer=this._initialContainer;});}_updateActiveDropContainer({x:e,y:t},{x:i,y:n}){let r=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{let s=this._dropContainer.getItemIndex(this),_=this._dropContainer.getItemAtIndex(s+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,_),this._dropContainer=r,this._dropContainer.enter(this,e,t,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)});}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,n),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y));}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let n=_=>{(!_||this._preview&&xe(_)===this._preview.element&&_.propertyName==="transform")&&(s(),i(),clearTimeout(r));},r=setTimeout(n,t*1.5),s=this._preview.addEventListener("transitionend",n);}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,i;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),i=oi(this._placeholderRef,this._document)):i=Vt(this._rootElement),i.style.pointerEvents="none",i.classList.add(Je),i}_getPointerPositionInElement(e,t,i){let n=t===this._rootElement?null:t,r=n?n.getBoundingClientRect():e,s=it(i)?i.targetTouches[0]:i,_=this._getViewportScrollPosition(),h=s.pageX-r.left-_.left,g=s.pageY-r.top-_.top;return {x:r.left-e.left+h,y:r.top-e.top+g}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),i=it(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,n=i.pageX-t.left,r=i.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let _=this._ownerSVGElement.createSVGPoint();return _.x=n,_.y=r,_.matrixTransform(s.inverse())}}return {x:n,y:r}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:n}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?n=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:r,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,_=this._boundaryRect,{width:h,height:g}=this._getPreviewRect(),D=_.top+s,k=_.bottom-(g-s),L=_.left+r,Z=_.right-(h-r);i=ti(i,L,Z),n=ti(n,D,k);}return {x:i,y:n}}_updatePointerDirectionDelta(e){let{x:t,y:i}=e,n=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-r.x),_=Math.abs(i-r.y);return s>this._config.pointerDirectionChangeThreshold&&(n.x=t>r.x?1:-1,r.x=t),_>this._config.pointerDirectionChangeThreshold&&(n.y=i>r.y?1:-1,r.y=i),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,q(this._rootElement,e));}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0;}_applyRootElementTransform(e,t){let i=1/this.scale,n=ot(e*i,t*i),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=gt(n,this._initialTransform);}_applyPreviewTransform(e,t){let i=this._previewTemplate?.template?void 0:this._initialTransform,n=ot(e,t);this._preview.setTransform(gt(n,i));}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear();}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),n=this._boundaryElement.getBoundingClientRect();if(n.width===0&&n.height===0||i.width===0&&i.height===0)return;let r=n.left-i.left,s=i.right-n.right,_=n.top-i.top,h=i.bottom-n.bottom;n.width>i.width?(r>0&&(e+=r),s>0&&(e-=s)):e=0,n.height>i.height?(_>0&&(t+=_),h>0&&(t-=h)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e});}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:it(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let i=xe(e);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&nt(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y));}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=up(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let i=this._previewContainer||"global";if(i==="parent")return e;if(i==="global"){let n=this._document;return t||n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement||n.body}return tt(i)}_getPreviewRect(){return (!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault();}else this.disabled||e.preventDefault();};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}_conditionallyInsertAnchor(e,t,i){if(e===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(t===this._initialContainer&&t.hasAnchor){let n=this._anchor??=Vt(this._placeholder);n.classList.remove(Je),n.classList.add("cdk-drag-anchor"),n.style.transform="",i?i.before(n):tt(t.element).appendChild(n);}}};function ti(o,e,t){return Math.max(e,Math.min(t,o))}function it(o){return o.type[0]==="t"}function Oi(o){o.preventDefault();}function W(o,e,t){let i=ei(e,o.length-1),n=ei(t,o.length-1);if(i===n)return;let r=o[i],s=n<i?-1:1;for(let _=i;_!==n;_+=s)o[_]=o[_+s];o[n]=r;}function ei(o,e){return Math.max(0,Math.min(e,o))}var ut=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction="ltr";constructor(e){this._dragDropRegistry=e;}_previousSwap={drag:null,delta:0,overlaps:false};start(e){this.withItems(e);}sort(e,t,i,n){let r=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,i,n);if(s===-1&&r.length>0)return null;let _=this.orientation==="horizontal",h=r.findIndex(O=>O.drag===e),g=r[s],D=r[h].clientRect,k=g.clientRect,L=h>s?1:-1,Z=this._getItemOffsetPx(D,k,L),Ct=this._getSiblingOffsetPx(h,r,L),xt=r.slice();return W(r,h,s),r.forEach((O,wi)=>{if(xt[wi]===O)return;let jt=O.drag===e,vt=jt?Z:Ct,Bt=jt?e.getPlaceholderElement():O.drag.getRootElement();O.offset+=vt;let qt=Math.round(O.offset*(1/O.drag.scale));_?(Bt.style.transform=gt(`translate3d(${qt}px, 0, 0)`,O.initialTransform),nt(O.clientRect,0,vt)):(Bt.style.transform=gt(`translate3d(0, ${qt}px, 0)`,O.initialTransform),nt(O.clientRect,vt,0));}),this._previousSwap.overlaps=At(k,t,i),this._previousSwap.drag=g.drag,this._previousSwap.delta=_?n.x:n.y,{previousIndex:h,currentIndex:s}}enter(e,t,i,n){let r=this._activeDraggables,s=r.indexOf(e),_=e.getPlaceholderElement();s>-1&&r.splice(s,1);let h=n==null||n<0?this._getItemIndexFromPointerPosition(e,t,i):n,g=r[h];if(g===e&&(g=r[h+1]),!g&&(h==null||h===-1||h<r.length-1)&&this._shouldEnterAsFirstChild(t,i)&&(g=r[0]),g&&!this._dragDropRegistry.isDragging(g)){let D=g.getRootElement();D.parentElement.insertBefore(_,D),r.splice(h,0,e);}else this._element.appendChild(_),r.push(e);_.style.transform="",this._cacheItemPositions();}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions();}withSortPredicate(e){this._sortPredicate=e;}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let i=this._itemPositions.find(n=>n.drag===e)?.initialTransform;t.style.transform=i||"";}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=false;}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return this._getVisualItemPositions().findIndex(t=>t.drag===e)}getItemAtIndex(e){return this._getVisualItemPositions()[e]?.drag||null}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:i})=>{nt(i,e,t);}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition();});}withElementContainer(e){this._element=e;}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let i=t.getVisibleElement();return {drag:t,offset:0,initialTransform:i.style.transform||"",clientRect:$t(i)}}).sort((t,i)=>e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top);}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(e,t,i){let n=this.orientation==="horizontal",r=n?t.left-e.left:t.top-e.top;return i===-1&&(r+=n?t.width-e.width:t.height-e.height),r}_getSiblingOffsetPx(e,t,i){let n=this.orientation==="horizontal",r=t[e].clientRect,s=t[e+i*-1],_=r[n?"width":"height"]*i;if(s){let h=n?"left":"top",g=n?"right":"bottom";i===-1?_-=s.clientRect[h]-r[g]:_+=r[h]-s.clientRect[g];}return _}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return false;let i=this._itemPositions,n=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let s=i[i.length-1].clientRect;return n?e>=s.right:t>=s.bottom}else {let s=i[0].clientRect;return n?e<=s.left:t<=s.top}}_getItemIndexFromPointerPosition(e,t,i,n){let r=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:_,clientRect:h})=>{if(_===e)return false;if(n){let g=r?n.x:n.y;if(_===this._previousSwap.drag&&this._previousSwap.overlaps&&g===this._previousSwap.delta)return false}return r?t>=Math.floor(h.left)&&t<Math.floor(h.right):i>=Math.floor(h.top)&&i<Math.floor(h.bottom)});return s===-1||!this._sortPredicate(s,e)?-1:s}},Gt=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:false};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t;}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<t.length;i++){let n=t[i];this._relatedNodes.push([n,n.nextSibling]);}this.withItems(e);}sort(e,t,i,n){let r=this._getItemIndexFromPointerPosition(e,t,i),s=this._previousSwap;if(r===-1||this._activeItems[r]===e)return null;let _=this._activeItems[r];if(s.drag===_&&s.overlaps&&s.deltaX===n.x&&s.deltaY===n.y)return null;let h=this.getItemIndex(e),g=e.getPlaceholderElement(),D=_.getRootElement();r>h?D.after(g):D.before(g),W(this._activeItems,h,r);let k=this._getRootNode().elementFromPoint(t,i);return s.deltaX=n.x,s.deltaY=n.y,s.drag=_,s.overlaps=D===k||D.contains(k),{previousIndex:h,currentIndex:r}}enter(e,t,i,n){let r=this._activeItems.indexOf(e);r>-1&&this._activeItems.splice(r,1);let s=n==null||n<0?this._getItemIndexFromPointerPosition(e,t,i):n;s===-1&&(s=this._getClosestItemIndexToPointer(e,t,i));let _=this._activeItems[s];_&&!this._dragDropRegistry.isDragging(_)?(this._activeItems.splice(s,0,e),_.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()));}withItems(e){this._activeItems=e.slice();}withSortPredicate(e){this._sortPredicate=e;}reset(){let e=this._element,t=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[n,r]=this._relatedNodes[i];n.parentNode===e&&n.nextSibling!==r&&(r===null?e.appendChild(n):r.parentNode===e&&e.insertBefore(n,r));}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=false;}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}getItemAtIndex(e){return this._activeItems[e]||null}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition();});}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0);}_getItemIndexFromPointerPosition(e,t,i){let n=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(i)),r=n?this._activeItems.findIndex(s=>{let _=s.getRootElement();return n===_||_.contains(n)}):-1;return r===-1||!this._sortPredicate(r,e)?-1:r}_getRootNode(){return this._rootNode||(this._rootNode=up(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,i){if(this._activeItems.length===0)return -1;if(this._activeItems.length===1)return 0;let n=1/0,r=-1;for(let s=0;s<this._activeItems.length;s++){let _=this._activeItems[s];if(_!==e){let{x:h,y:g}=_.getRootElement().getBoundingClientRect(),D=Math.hypot(t-h,i-g);D<n&&(n=D,r=s);}}return r}},ii=.05,si=.05,M=(function(o){return o[o.NONE=0]="NONE",o[o.UP=1]="UP",o[o.DOWN=2]="DOWN",o})(M||{}),T=(function(o){return o[o.NONE=0]="NONE",o[o.LEFT=1]="LEFT",o[o.RIGHT=2]="RIGHT",o})(T||{});function ai(o,e){return new Ht(e,o.get(ft),o.get(R),o.get(N),o.get(vr))}var Ht=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=false;sortingDisabled=false;lockAxis=null;autoScrollDisabled=false;autoScrollStep=2;hasAnchor=false;enterPredicate=()=>true;sortPredicate=()=>true;beforeStarted=new C$1;entered=new C$1;exited=new C$1;dropped=new C$1;sorted=new C$1;receivingStarted=new C$1;receivingStopped=new C$1;data;_container;_isDragging=false;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=L$1.EMPTY;_verticalScrollDirection=M.NONE;_horizontalScrollDirection=T.NONE;_scrollNode;_stopScrollTimers=new C$1;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,i,n,r){this._dragDropRegistry=t,this._ngZone=n,this._viewportRuler=r;let s=this.element=tt(e);this._document=i,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new mt(i);}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this);}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings();}enter(e,t,i,n){this._draggingStarted(),n==null&&this.sortingDisabled&&(n=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,i,n),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)});}exit(e){this._reset(),this.exited.next({item:e,container:this});}drop(e,t,i,n,r,s,_,h){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:i,container:this,previousContainer:n,isPointerOverContainer:r,distance:s,dropPoint:_,event:h});}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(t.filter(n=>n.isDragging()).every(n=>e.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof ut&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new Gt(this._document,this._dragDropRegistry);else {let t=new ut(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t;}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,i)=>this.sortPredicate(t,i,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;tt(this.element);let i=this._scrollableElements.indexOf(this._container),n=this._scrollableElements.indexOf(e);return i>-1&&this._scrollableElements.splice(i,1),n>-1&&this._scrollableElements.splice(n,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}getItemAtIndex(e){return this._isDragging?this._sortStrategy.getItemAtIndex(e):this._draggables[e]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,i,n){if(this.sortingDisabled||!this._domRect||!Be(this._domRect,ii,t,i))return;let r=this._sortStrategy.sort(e,t,i,n);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:e});}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let i,n=M.NONE,r=T.NONE;if(this._parentPositions.positions.forEach((s,_)=>{_===this._document||!s.clientRect||i||Be(s.clientRect,ii,e,t)&&([n,r]=Fi(_,s.clientRect,this._direction,e,t),(n||r)&&(i=_));}),!n&&!r){let{width:s,height:_}=this._viewportRuler.getViewportSize(),h={width:s,height:_,top:0,right:s,bottom:_,left:0};n=li(h,t),r=ci(h,e),i=window;}i&&(n!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=n,this._horizontalScrollDirection=r,this._scrollNode=i,(n||r)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling());}_stopScrolling(){this._stopScrollTimers.next();}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=true,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents();}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect;}_reset(){this._isDragging=false;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear();}_startScrollInterval=()=>{this._stopScrolling(),XE(0,Tl).pipe(Ht$1(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===M.UP?e.scrollBy(0,-t):this._verticalScrollDirection===M.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===T.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===T.RIGHT&&e.scrollBy(t,0);});};_isOverContainer(e,t){return this._domRect!=null&&At(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,i){return this._siblings.find(n=>n._canReceive(e,t,i))}_canReceive(e,t,i){if(!this._domRect||!At(this._domRect,t,i)||!this.enterPredicate(e,this))return false;let n=this._getShadowRoot().elementFromPoint(t,i);return n?n===this._container||this._container.contains(n):false}_startReceiving(e,t){let i=this._activeSiblings;!i.has(e)&&t.every(n=>this.enterPredicate(n,this)||this._draggables.indexOf(n)>-1)&&(i.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}));}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this});}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left);}else this.isReceiving()&&this._cacheParentPositions();});}_getShadowRoot(){if(!this._cachedShadowRoot){let e=up(this._container);this._cachedShadowRoot=e||this._document;}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e));}};function li(o,e){let{top:t,bottom:i,height:n}=o,r=n*si;return e>=t-r&&e<=t+r?M.UP:e>=i-r&&e<=i+r?M.DOWN:M.NONE}function ci(o,e){let{left:t,right:i,width:n}=o,r=n*si;return e>=t-r&&e<=t+r?T.LEFT:e>=i-r&&e<=i+r?T.RIGHT:T.NONE}function Fi(o,e,t,i,n){let r=li(e,n),s=ci(e,i),_=M.NONE,h=T.NONE;if(r){let g=o.scrollTop;r===M.UP?g>0&&(_=M.UP):o.scrollHeight-g>o.clientHeight&&(_=M.DOWN);}if(s){let g=o.scrollLeft;t==="rtl"?s===T.RIGHT?g<0&&(h=T.RIGHT):o.scrollWidth+g>o.clientWidth&&(h=T.LEFT):s===T.LEFT?g>0&&(h=T.LEFT):o.scrollWidth-g>o.clientWidth&&(h=T.RIGHT);}return [_,h]}var Mi=(()=>{class o{_injector=p(B);createDrag(t,i){return ri(this._injector,t,i)}createDropList(t){return ai(this._injector,t)}static \u0275fac=function(i){return new(i||o)};static \u0275prov=S({token:o,factory:o.\u0275fac})}return o})(),zt=new y("CDK_DRAG_PARENT");var di=new y("CdkDragHandle"),_i=(()=>{class o{element=p(q$1);_parentDrag=p(zt,{optional:true,skipSelf:true});_dragDropRegistry=p(ft);_stateChanges=new C$1;get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._stateChanges.next(this);}_disabled=false;constructor(){this._parentDrag?._addHandle(this);}ngAfterViewInit(){if(!this._parentDrag){let t=this.element.nativeElement.parentElement;for(;t;){let i=this._dragDropRegistry.getDragDirectiveForNode(t);if(i){this._parentDrag=i,i._addHandle(this);break}t=t.parentElement;}}}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete();}static \u0275fac=function(i){return new(i||o)};static \u0275dir=Z({type:o,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[2,"cdkDragHandleDisabled","disabled",ce]},features:[Ii$1([{provide:di,useExisting:o}])]})}return o})(),pi=new y("CDK_DRAG_CONFIG"),hi=new y("CdkDropList"),mi=(()=>{class o{element=p(q$1);dropContainer=p(hi,{optional:true,skipSelf:true});_ngZone=p(N);_viewContainerRef=p(Ae);_dir=p(uo,{optional:true});_changeDetectorRef=p(uc);_selfHandle=p(di,{optional:true,self:true});_parentDrag=p(zt,{optional:true,skipSelf:true});_dragDropRegistry=p(ft);_destroyed=new C$1;_handles=new Vn$1([]);_previewTemplate=null;_placeholderTemplate=null;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(t){this._disabled=t,this._dragRef.disabled=this._disabled;}_disabled=false;constrainPosition;previewClass;previewContainer;scale=1;started=new Q$1;released=new Q$1;ended=new Q$1;entered=new Q$1;exited=new Q$1;dropped=new Q$1;moved=new O(t=>{let i=this._dragRef.moved.pipe(oe(n=>({source:this,pointerPosition:n.pointerPosition,event:n.event,delta:n.delta,distance:n.distance}))).subscribe(t);return ()=>{i.unsubscribe();}});_injector=p(B);constructor(){let t=this.dropContainer,i=p(pi,{optional:true});this._dragRef=ri(this._injector,this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),t&&(t.addItem(this),t._dropListRef.beforeStarted.pipe(Ht$1(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale;})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef);}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset();}resetToBoundary(){this._dragRef.resetToBoundary();}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(t){this._dragRef.setFreeDragPosition(t);}ngAfterViewInit(){wn$1(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition);},{injector:this._injector});}ngOnChanges(t){let i=t.rootElementSelector,n=t.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,n&&!n.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition);}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose();});}_addHandle(t){let i=this._handles.getValue();i.push(t),this._handles.next(i);}_removeHandle(t){let i=this._handles.getValue(),n=i.indexOf(t);n>-1&&(i.splice(n,1),this._handles.next(i));}_setPreviewTemplate(t){this._previewTemplate=t;}_resetPreviewTemplate(t){t===this._previewTemplate&&(this._previewTemplate=null);}_setPlaceholderTemplate(t){this._placeholderTemplate=t;}_resetPlaceholderTemplate(t){t===this._placeholderTemplate&&(this._placeholderTemplate=null);}_updateRootElement(){let t=this.element.nativeElement,i=t;this.rootElementSelector&&(i=t.closest!==void 0?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||t);}_getBoundaryElement(){let t=this.boundaryElement;return t?typeof t=="string"?this.element.nativeElement.closest(t):tt(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){let i=this._dir,n=this.dragStartDelay,r=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.scale=this.scale,t.dragStartDelay=typeof n=="object"&&n?n:xn$1(n),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),i&&t.withDirection(i.value);}}),t.beforeStarted.pipe(st(1)).subscribe(()=>{if(this._parentDrag){t.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let n=this._dragDropRegistry.getDragDirectiveForNode(i);if(n){t.withParent(n._dragRef);break}i=i.parentElement;}});}_handleEvents(t){t.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCh