{"version":3,"file":"recruitler-drag-drop.mjs","sources":["../../projects/sortable/src/lib/drag-drop/dom/styling.ts","../../projects/sortable/src/lib/drag-drop/dom/transition-duration.ts","../../projects/sortable/src/lib/drag-drop/dom/client-rect.ts","../../projects/sortable/src/lib/drag-drop/dom/parent-position-tracker.ts","../../projects/sortable/src/lib/drag-drop/dom/clone-node.ts","../../projects/sortable/src/lib/drag-drop/drag-ref.ts","../../projects/sortable/src/lib/drag-drop/drag-utils.ts","../../projects/sortable/src/lib/drag-drop/sorting/single-axis-sort-strategy.ts","../../projects/sortable/src/lib/drag-drop/drop-list-ref.ts","../../projects/sortable/src/lib/drag-drop/drag-drop-registry.ts","../../projects/sortable/src/lib/drag-drop/drag-drop.ts","../../projects/sortable/src/lib/drag-drop/drag-parent.ts","../../projects/sortable/src/lib/drag-drop/drag-events.ts","../../projects/sortable/src/lib/drag-drop/directives/assertions.ts","../../projects/sortable/src/lib/drag-drop/directives/drag-handle.ts","../../projects/sortable/src/lib/drag-drop/directives/drag-placeholder.ts","../../projects/sortable/src/lib/drag-drop/directives/drag-preview.ts","../../projects/sortable/src/lib/drag-drop/directives/config.ts","../../projects/sortable/src/lib/drag-drop/directives/drag.ts","../../projects/sortable/src/lib/drag-drop/directives/drop-list-group.ts","../../projects/sortable/src/lib/drag-drop/directives/drop-list.ts","../../projects/sortable/src/lib/drag-drop/drag-drop-tree.ts","../../projects/sortable/src/lib/drag-drop/components/tree-component/nested-drag-drop.component.ts","../../projects/sortable/src/lib/drag-drop/components/tree-component/nested-drag-drop.component.html","../../projects/sortable/src/lib/drag-drop/public-api.ts","../../projects/sortable/src/public-api.ts","../../projects/sortable/src/recruitler-drag-drop.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Extended CSSStyleDeclaration that includes a couple of drag-related\n * properties that aren't in the built-in TS typings.\n */\nexport interface DragCSSStyleDeclaration extends CSSStyleDeclaration {\n  msScrollSnapType: string;\n  scrollSnapType: string;\n  webkitTapHighlightColor: string;\n}\n\n/**\n * Shallow-extends a stylesheet object with another stylesheet-like object.\n * Note that the keys in `source` have to be dash-cased.\n * @docs-private\n */\nexport function extendStyles(\n  dest: CSSStyleDeclaration,\n  source: Record<string, string>,\n  importantProperties?: Set<string>,\n) {\n  for (let key in source) {\n    if (source.hasOwnProperty(key)) {\n      const value = source[key];\n\n      if (value) {\n        dest.setProperty(key, value, importantProperties?.has(key) ? 'important' : '');\n      } else {\n        dest.removeProperty(key);\n      }\n    }\n  }\n\n  return dest;\n}\n\n/**\n * Toggles whether the native drag interactions should be enabled for an element.\n * @param element Element on which to toggle the drag interactions.\n * @param enable Whether the drag interactions should be enabled.\n * @docs-private\n */\nexport function toggleNativeDragInteractions(element: HTMLElement, enable: boolean) {\n  const userSelect = enable ? '' : 'none';\n\n  extendStyles(element.style, {\n    'touch-action': enable ? '' : 'none',\n    '-webkit-user-drag': enable ? '' : 'none',\n    '-webkit-tap-highlight-color': enable ? '' : 'transparent',\n    'user-select': userSelect,\n    '-ms-user-select': userSelect,\n    '-webkit-user-select': userSelect,\n    '-moz-user-select': userSelect,\n  });\n}\n\n/**\n * Toggles whether an element is visible while preserving its dimensions.\n * @param element Element whose visibility to toggle\n * @param enable Whether the element should be visible.\n * @param importantProperties Properties to be set as `!important`.\n * @docs-private\n */\nexport function toggleVisibility(\n  element: HTMLElement,\n  enable: boolean,\n  importantProperties?: Set<string>,\n) {\n  extendStyles(\n    element.style,\n    {\n      position: enable ? '' : 'fixed',\n      top: enable ? '' : '0',\n      opacity: enable ? '' : '0',\n      left: enable ? '' : '-999em',\n    },\n    importantProperties,\n  );\n}\n\n/**\n * Combines a transform string with an optional other transform\n * that exited before the base transform was applied.\n */\nexport function combineTransforms(transform: string, initialTransform?: string): string {\n  return initialTransform && initialTransform != 'none'\n    ? transform + ' ' + initialTransform\n    : transform;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** Parses a CSS time value to milliseconds. */\nfunction parseCssTimeUnitsToMs(value: string): number {\n  // Some browsers will return it in seconds, whereas others will return milliseconds.\n  const multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;\n  return parseFloat(value) * multiplier;\n}\n\n/** Gets the transform transition duration, including the delay, of an element in milliseconds. */\nexport function getTransformTransitionDurationInMs(element: HTMLElement): number {\n  const computedStyle = getComputedStyle(element);\n  const transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');\n  const property = transitionedProperties.find(prop => prop === 'transform' || prop === 'all');\n\n  // If there's no transition for `all` or `transform`, we shouldn't do anything.\n  if (!property) {\n    return 0;\n  }\n\n  // Get the index of the property that we're interested in and match\n  // it up to the same index in `transition-delay` and `transition-duration`.\n  const propertyIndex = transitionedProperties.indexOf(property);\n  const rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');\n  const rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');\n\n  return (\n    parseCssTimeUnitsToMs(rawDurations[propertyIndex]) +\n    parseCssTimeUnitsToMs(rawDelays[propertyIndex])\n  );\n}\n\n/** Parses out multiple values from a computed style into an array. */\nfunction parseCssPropertyValue(computedStyle: CSSStyleDeclaration, name: string): string[] {\n  const value = computedStyle.getPropertyValue(name);\n  return value.split(',').map(part => part.trim());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** Gets a mutable version of an element's bounding `ClientRect`. */\nexport function getMutableClientRect(element: Element): ClientRect {\n  const clientRect = element.getBoundingClientRect();\n\n  // We need to clone the `clientRect` here, because all the values on it are readonly\n  // and we need to be able to update them. Also we can't use a spread here, because\n  // the values on a `ClientRect` aren't own properties. See:\n  // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes\n  return {\n    top: clientRect.top,\n    right: clientRect.right,\n    bottom: clientRect.bottom,\n    left: clientRect.left,\n    width: clientRect.width,\n    height: clientRect.height,\n    x: clientRect.x,\n    y: clientRect.y,\n  } as ClientRect;\n}\n\n/**\n * Checks whether some coordinates are within a `ClientRect`.\n * @param clientRect ClientRect that is being checked.\n * @param x Coordinates along the X axis.\n * @param y Coordinates along the Y axis.\n */\nexport function isInsideClientRect(clientRect: ClientRect, x: number, y: number) {\n  const {top, bottom, left, right} = clientRect;\n  return y >= top && y <= bottom && x >= left && x <= right;\n}\n\n/**\n * Updates the top/left positions of a `ClientRect`, as well as their bottom/right counterparts.\n * @param clientRect `ClientRect` that should be updated.\n * @param top Amount to add to the `top` position.\n * @param left Amount to add to the `left` position.\n */\nexport function adjustClientRect(\n  clientRect: {\n    top: number;\n    bottom: number;\n    left: number;\n    right: number;\n    width: number;\n    height: number;\n  },\n  top: number,\n  left: number,\n) {\n  clientRect.top += top;\n  clientRect.bottom = clientRect.top + clientRect.height;\n\n  clientRect.left += left;\n  clientRect.right = clientRect.left + clientRect.width;\n}\n\n/**\n * Checks whether the pointer coordinates are close to a ClientRect.\n * @param rect ClientRect to check against.\n * @param threshold Threshold around the ClientRect.\n * @param pointerX Coordinates along the X axis.\n * @param pointerY Coordinates along the Y axis.\n */\nexport function isPointerNearClientRect(\n  rect: ClientRect,\n  threshold: number,\n  pointerX: number,\n  pointerY: number,\n): boolean {\n  const {top, right, bottom, left, width, height} = rect;\n  const xThreshold = width * threshold;\n  const yThreshold = height * threshold;\n\n  return (\n    pointerY > top - yThreshold &&\n    pointerY < bottom + yThreshold &&\n    pointerX > left - xThreshold &&\n    pointerX < right + xThreshold\n  );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {_getEventTarget} from '@angular/cdk/platform';\nimport {getMutableClientRect, adjustClientRect} from './client-rect';\n\n/** Object holding the scroll position of something. */\ninterface ScrollPosition {\n  top: number;\n  left: number;\n}\n\n/** Keeps track of the scroll position and dimensions of the parents of an element. */\nexport class ParentPositionTracker {\n  /** Cached positions of the scrollable parent elements. */\n  readonly positions = new Map<\n    Document | HTMLElement,\n    {\n      scrollPosition: ScrollPosition;\n      clientRect?: ClientRect;\n    }\n  >();\n\n  constructor(private _document: Document) {}\n\n  /** Clears the cached positions. */\n  clear() {\n    this.positions.clear();\n  }\n\n  /** Caches the positions. Should be called at the beginning of a drag sequence. */\n  cache(elements: readonly HTMLElement[]) {\n    this.clear();\n    this.positions.set(this._document, {\n      scrollPosition: this.getViewportScrollPosition(),\n    });\n\n    elements.forEach(element => {\n      this.positions.set(element, {\n        scrollPosition: {top: element.scrollTop, left: element.scrollLeft},\n        clientRect: getMutableClientRect(element),\n      });\n    });\n  }\n\n  /** Handles scrolling while a drag is taking place. */\n  handleScroll(event: Event): ScrollPosition | null {\n    const target = _getEventTarget<HTMLElement | Document>(event)!;\n    const cachedPosition = this.positions.get(target);\n\n    if (!cachedPosition) {\n      return null;\n    }\n\n    const scrollPosition = cachedPosition.scrollPosition;\n    let newTop: number;\n    let newLeft: number;\n\n    if (target === this._document) {\n      const viewportScrollPosition = this.getViewportScrollPosition();\n      newTop = viewportScrollPosition.top;\n      newLeft = viewportScrollPosition.left;\n    } else {\n      newTop = (target as HTMLElement).scrollTop;\n      newLeft = (target as HTMLElement).scrollLeft;\n    }\n\n    const topDifference = scrollPosition.top - newTop;\n    const leftDifference = scrollPosition.left - newLeft;\n\n    // Go through and update the cached positions of the scroll\n    // parents that are inside the element that was scrolled.\n    this.positions.forEach((position, node) => {\n      if (position.clientRect && target !== node && target.contains(node)) {\n        adjustClientRect(position.clientRect, topDifference, leftDifference);\n      }\n    });\n\n    scrollPosition.top = newTop;\n    scrollPosition.left = newLeft;\n\n    return {top: topDifference, left: leftDifference};\n  }\n\n  /**\n   * Gets the scroll position of the viewport. Note that we use the scrollX and scrollY directly,\n   * instead of going through the `ViewportRuler`, because the first value the ruler looks at is\n   * the top/left offset of the `document.documentElement` which works for most cases, but breaks\n   * if the element is offset by something like the `BlockScrollStrategy`.\n   */\n  getViewportScrollPosition() {\n    return {top: window.scrollY, left: window.scrollX};\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** Creates a deep clone of an element. */\nexport function deepCloneNode(node: HTMLElement): HTMLElement {\n  const clone = node.cloneNode(true) as HTMLElement;\n  const descendantsWithId = clone.querySelectorAll('[id]');\n  const nodeName = node.nodeName.toLowerCase();\n\n  // Remove the `id` to avoid having multiple elements with the same id on the page.\n  clone.removeAttribute('id');\n\n  for (let i = 0; i < descendantsWithId.length; i++) {\n    descendantsWithId[i].removeAttribute('id');\n  }\n\n  if (nodeName === 'canvas') {\n    transferCanvasData(node as HTMLCanvasElement, clone as HTMLCanvasElement);\n  } else if (nodeName === 'input' || nodeName === 'select' || nodeName === 'textarea') {\n    transferInputData(node as HTMLInputElement, clone as HTMLInputElement);\n  }\n\n  transferData('canvas', node, clone, transferCanvasData);\n  transferData('input, textarea, select', node, clone, transferInputData);\n  return clone;\n}\n\n/** Matches elements between an element and its clone and allows for their data to be cloned. */\nfunction transferData<T extends Element>(\n  selector: string,\n  node: HTMLElement,\n  clone: HTMLElement,\n  callback: (source: T, clone: T) => void,\n) {\n  const descendantElements = node.querySelectorAll<T>(selector);\n\n  if (descendantElements.length) {\n    const cloneElements = clone.querySelectorAll<T>(selector);\n\n    for (let i = 0; i < descendantElements.length; i++) {\n      callback(descendantElements[i], cloneElements[i]);\n    }\n  }\n}\n\n// Counter for unique cloned radio button names.\nlet cloneUniqueId = 0;\n\n/** Transfers the data of one input element to another. */\nfunction transferInputData(\n  source: Element & {value: string},\n  clone: Element & {value: string; name: string; type: string},\n) {\n  // Browsers throw an error when assigning the value of a file input programmatically.\n  if (clone.type !== 'file') {\n    clone.value = source.value;\n  }\n\n  // Radio button `name` attributes must be unique for radio button groups\n  // otherwise original radio buttons can lose their checked state\n  // once the clone is inserted in the DOM.\n  if (clone.type === 'radio' && clone.name) {\n    clone.name = `mat-clone-${clone.name}-${cloneUniqueId++}`;\n  }\n}\n\n/** Transfers the data of one canvas element to another. */\nfunction transferCanvasData(source: HTMLCanvasElement, clone: HTMLCanvasElement) {\n  const context = clone.getContext('2d');\n\n  if (context) {\n    // In some cases `drawImage` can throw (e.g. if the canvas size is 0x0).\n    // We can't do much about it so just ignore the error.\n    try {\n      context.drawImage(source, 0, 0);\n    } catch {}\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n  EmbeddedViewRef,\n  ElementRef,\n  NgZone,\n  ViewContainerRef,\n  TemplateRef,\n} from '@angular/core';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport { Direction } from '@angular/cdk/bidi';\nimport {\n  normalizePassiveListenerOptions,\n  _getEventTarget,\n  _getShadowRoot,\n} from '@angular/cdk/platform';\nimport { coerceBooleanProperty, coerceElement } from '@angular/cdk/coercion';\nimport {\n  isFakeMousedownFromScreenReader,\n  isFakeTouchstartFromScreenReader,\n} from '@angular/cdk/a11y';\nimport { Subscription, Subject, Observable } from 'rxjs';\nimport type { DropListRef } from './drop-list-ref';\nimport { DragDropRegistry } from './drag-drop-registry';\nimport {\n  combineTransforms,\n  DragCSSStyleDeclaration,\n  extendStyles,\n  toggleNativeDragInteractions,\n  toggleVisibility,\n} from './dom/styling';\nimport { getTransformTransitionDurationInMs } from './dom/transition-duration';\nimport { getMutableClientRect, adjustClientRect } from './dom/client-rect';\nimport { ParentPositionTracker } from './dom/parent-position-tracker';\nimport { deepCloneNode } from './dom/clone-node';\nimport { CdkDrag } from './public-api';\n\n/** Object that can be used to configure the behavior of DragRef. */\nexport interface DragRefConfig {\n  /**\n   * Minimum amount of pixels that the user should\n   * drag, before the CDK initiates a drag sequence.\n   */\n  dragStartThreshold: number;\n\n  /**\n   * Amount the pixels the user should drag before the CDK\n   * considers them to have changed the drag direction.\n   */\n  pointerDirectionChangeThreshold: number;\n\n  /** `z-index` for the absolutely-positioned elements that are created by the drag item. */\n  zIndex?: number;\n\n  /** Ref that the current drag item is nested in. */\n  parentDragRef?: DragRef;\n}\n\n\n// R2M start\n/**\n * Information for nesting item.\n * nestIndex means the index of container into which DragRef item will be nested into\n */\nexport interface DragNestInfo {\n  nestIndex: number,\n\n}\n// R2M end\n\n\n/** Options that can be used to bind a passive event listener. */\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({\n  passive: true,\n});\n\n/** Options that can be used to bind an active event listener. */\nconst activeEventListenerOptions = normalizePassiveListenerOptions({\n  passive: false,\n});\n\n/**\n * Time in milliseconds for which to ignore mouse events, after\n * receiving a touch event. Used to avoid doing double work for\n * touch devices where the browser fires fake mouse events, in\n * addition to touch events.\n */\nconst MOUSE_EVENT_IGNORE_TIME = 800;\n\n// TODO(crisbeto): add an API for moving a draggable up/down the\n// list programmatically. Useful for keyboard controls.\n\n/** Template that can be used to create a drag helper element (e.g. a preview or a placeholder). */\ninterface DragHelperTemplate<T = any> {\n  template: TemplateRef<T> | null;\n  viewContainer: ViewContainerRef;\n  context: T;\n}\n\n/** Template that can be used to create a drag preview element. */\ninterface DragPreviewTemplate<T = any> extends DragHelperTemplate<T> {\n  matchSize?: boolean;\n}\n\n/** Point on the page or within an element. */\nexport interface Point {\n  x: number;\n  y: number;\n}\n\n/** Inline styles to be set as `!important` while dragging. */\nconst dragImportantProperties = new Set([\n  // Needs to be important, because some `mat-table` sets `position: sticky !important`. See #22781.\n  'position',\n]);\n\n/**\n * Possible places into which the preview of a drag item can be inserted.\n * - `global` - Preview will be inserted at the bottom of the `<body>`. The advantage is that\n * you don't have to worry about `overflow: hidden` or `z-index`, but the item won't retain\n * its inherited styles.\n * - `parent` - Preview will be inserted into the parent of the drag item. The advantage is that\n * inherited styles will be preserved, but it may be clipped by `overflow: hidden` or not be\n * visible due to `z-index`. Furthermore, the preview is going to have an effect over selectors\n * like `:nth-child` and some flexbox configurations.\n * - `ElementRef<HTMLElement> | HTMLElement` - Preview will be inserted into a specific element.\n * Same advantages and disadvantages as `parent`.\n */\nexport type PreviewContainer =\n  | 'global'\n  | 'parent'\n  | ElementRef<HTMLElement>\n  | HTMLElement;\n\n/**\n * Reference to a draggable item. Used to manipulate or dispose of the item.\n */\nexport class DragRef<T = any> {\n  /** Element displayed next to the user's pointer while the element is dragged. */\n  private _preview: HTMLElement;\n\n  /** Reference to the view of the preview element. */\n  private _previewRef: EmbeddedViewRef<any> | null;\n\n  /** Container into which to insert the preview. */\n  private _previewContainer: PreviewContainer | undefined;\n\n  /** Reference to the view of the placeholder element. */\n  private _placeholderRef: EmbeddedViewRef<any> | null;\n\n  /** Element that is rendered instead of the draggable item while it is being sorted. */\n  private _placeholder: HTMLElement;\n\n  /** Coordinates within the element at which the user picked up the element. */\n  private _pickupPositionInElement: Point;\n\n  /** Coordinates on the page at which the user picked up the element. */\n  private _pickupPositionOnPage: Point;\n\n  /**\n   * Anchor node used to save the place in the DOM where the element was\n   * picked up so that it can be restored at the end of the drag sequence.\n   */\n  private _anchor: Comment;\n\n  /**\n   * CSS `transform` applied to the element when it isn't being dragged. We need a\n   * passive transform in order for the dragged element to retain its new position\n   * after the user has stopped dragging and because we need to know the relative\n   * position in case they start dragging again. This corresponds to `element.style.transform`.\n   */\n  private _passiveTransform: Point = { x: 0, y: 0 };\n\n  /** CSS `transform` that is applied to the element while it's being dragged. */\n  private _activeTransform: Point = { x: 0, y: 0 };\n\n  /** Inline `transform` value that the element had before the first dragging sequence. */\n  private _initialTransform?: string;\n\n  /**\n   * Whether the dragging sequence has been started. Doesn't\n   * necessarily mean that the element has been moved.\n   */\n  private _hasStartedDragging = false;\n\n  /** Whether the element has moved since the user started dragging it. */\n  private _hasMoved: boolean;\n\n  /** Drop container in which the DragRef resided when dragging began. */\n  private _initialContainer: DropListRef;\n\n  /** Index at which the item started in its initial container. */\n  private _initialIndex: number;\n\n  /** Cached positions of scrollable parent elements. */\n  private _parentPositions: ParentPositionTracker;\n\n  /** Emits when the item is being moved. */\n  private readonly _moveEvents = new Subject<{\n    source: DragRef;\n    pointerPosition: { x: number; y: number };\n    event: MouseEvent | TouchEvent;\n    distance: Point;\n    delta: { x: -1 | 0 | 1; y: -1 | 0 | 1 };\n  }>();\n\n  /** Keeps track of the direction in which the user is dragging along each axis. */\n  private _pointerDirectionDelta: { x: -1 | 0 | 1; y: -1 | 0 | 1 };\n\n  /** Pointer position at which the last change in the delta occurred. */\n  private _pointerPositionAtLastDirectionChange: Point;\n\n  /** Position of the pointer at the last pointer event. */\n  private _lastKnownPointerPosition: Point;\n\n  /**\n   * Root DOM node of the drag instance. This is the element that will\n   * be moved around as the user is dragging.\n   */\n  private _rootElement: HTMLElement;\n\n  /**\n   * Nearest ancestor SVG, relative to which coordinates are calculated if dragging SVGElement\n   */\n  private _ownerSVGElement: SVGSVGElement | null;\n\n  /**\n   * Inline style value of `-webkit-tap-highlight-color` at the time the\n   * dragging was started. Used to restore the value once we're done dragging.\n   */\n  private _rootElementTapHighlight: string;\n\n  /** Subscription to pointer movement events. */\n  private _pointerMoveSubscription = Subscription.EMPTY;\n\n  /** Subscription to the event that is dispatched when the user lifts their pointer. */\n  private _pointerUpSubscription = Subscription.EMPTY;\n\n  /** Subscription to the viewport being scrolled. */\n  private _scrollSubscription = Subscription.EMPTY;\n\n  /** Subscription to the viewport being resized. */\n  private _resizeSubscription = Subscription.EMPTY;\n\n  /**\n   * Time at which the last touch event occurred. Used to avoid firing the same\n   * events multiple times on touch devices where the browser will fire a fake\n   * mouse event for each touch event, after a certain time.\n   */\n  private _lastTouchEventTime: number;\n\n  /** Time at which the last dragging sequence was started. */\n  private _dragStartTime: number;\n\n  /** Cached reference to the boundary element. */\n  private _boundaryElement: HTMLElement | null = null;\n\n  /** Whether the native dragging interactions have been enabled on the root element. */\n  private _nativeInteractionsEnabled = true;\n\n  /** Client rect of the root element when the dragging sequence has started. */\n  public _initialClientRect?: ClientRect;\n\n  /** Cached dimensions of the preview element. Should be read via `_getPreviewRect`. */\n  private _previewRect?: ClientRect;\n\n  /** Cached dimensions of the boundary element. */\n  private _boundaryRect?: ClientRect;\n\n  /** Element that will be used as a template to create the draggable item's preview. */\n  private _previewTemplate?: DragPreviewTemplate | null;\n\n  /** Template for placeholder element rendered to show where a draggable would be dropped. */\n  private _placeholderTemplate?: DragHelperTemplate | null;\n\n  /** Elements that can be used to drag the draggable item. */\n  private _handles: HTMLElement[] = [];\n\n  /** Registered handles that are currently disabled. */\n  private _disabledHandles = new Set<HTMLElement>();\n\n  /** Droppable container that the draggable is a part of. */\n  private _dropContainer?: DropListRef;\n\n  /** Layout direction of the item. */\n  private _direction: Direction = 'ltr';\n\n  /** Ref that the current drag item is nested in. */\n  public _parentDragRef: DragRef<unknown> | null;\n\n  /**\n   * Cached shadow root that the element is placed in. `null` means that the element isn't in\n   * the shadow DOM and `undefined` means that it hasn't been resolved yet. Should be read via\n   * `_getShadowRoot`, not directly.\n   */\n  private _cachedShadowRoot: ShadowRoot | null | undefined;\n\n  /** Axis along which dragging is locked. */\n  lockAxis: 'x' | 'y';\n\n  /**\n   * Amount of milliseconds to wait after the user has put their\n   * pointer down before starting to drag the element.\n   */\n  dragStartDelay: number | { touch: number; mouse: number } = 0;\n\n  /** Class to be added to the preview element. */\n  previewClass: string | string[] | undefined;\n\n  // R2M start\n  nestInfo: DragNestInfo | null | undefined;\n\n  /** HTML Element for placeholder transition */\n  animPlaceholder: HTMLElement | undefined;\n\n  // R2M end\n\n  /** Whether starting to drag this element is disabled. */\n  get disabled(): boolean {\n    return (\n      this._disabled || !!(this._dropContainer && this._dropContainer.disabled)\n    );\n  }\n  set disabled(value: boolean) {\n    const newValue = coerceBooleanProperty(value);\n\n    if (newValue !== this._disabled) {\n      this._disabled = newValue;\n      this._toggleNativeDragInteractions();\n      this._handles.forEach((handle) =>\n        toggleNativeDragInteractions(handle, newValue)\n      );\n    }\n  }\n  private _disabled = false;\n\n  /** Emits as the drag sequence is being prepared. */\n  readonly beforeStarted = new Subject<void>();\n\n  /** Emits when the user starts dragging the item. */\n  readonly started = new Subject<{\n    source: DragRef;\n    event: MouseEvent | TouchEvent;\n  }>();\n\n  /** Emits when the user has released a drag item, before any animations have started. */\n  readonly released = new Subject<{\n    source: DragRef;\n    event: MouseEvent | TouchEvent;\n  }>();\n\n  /** Emits when the user stops dragging an item in the container. */\n  readonly ended = new Subject<{\n    source: DragRef;\n    distance: Point;\n    dropPoint: Point;\n    event: MouseEvent | TouchEvent;\n  }>();\n\n  /** Emits when the user has moved the item into a new container. */\n  readonly entered = new Subject<{\n    container: DropListRef;\n    item: DragRef;\n    currentIndex: number;\n  }>();\n\n  /** Emits when the user removes the item its container by dragging it into another container. */\n  readonly exited = new Subject<{ container: DropListRef; item: DragRef }>();\n\n  /** Emits when the user drops the item inside a container. */\n  readonly dropped = new Subject<{\n    previousIndex: number;\n    currentIndex: number;\n    item: DragRef;\n    container: DropListRef;\n    previousContainer: DropListRef;\n    distance: Point;\n    dropPoint: Point;\n    isPointerOverContainer: boolean;\n    event: MouseEvent | TouchEvent;\n    nestInfo: DragNestInfo | null | undefined\n  }>();\n\n  /**\n   * Emits as the user is dragging the item. Use with caution,\n   * because this event will fire for every pixel that the user has dragged.\n   */\n  readonly moved: Observable<{\n    source: DragRef;\n    pointerPosition: { x: number; y: number };\n    event: MouseEvent | TouchEvent;\n    distance: Point;\n    delta: { x: -1 | 0 | 1; y: -1 | 0 | 1 };\n  }> = this._moveEvents;\n\n  /** Arbitrary data that can be attached to the drag item. */\n  data: T;\n\n  /**\n   * Function that can be used to customize the logic of how the position of the drag item\n   * is limited while it's being dragged. Gets called with a point containing the current position\n   * of the user's pointer on the page, a reference to the item being dragged and its dimensions.\n   * Should return a point describing where the item should be rendered.\n   */\n  constrainPosition?: (\n    userPointerPosition: Point,\n    dragRef: DragRef,\n    dimensions: ClientRect,\n    pickupPositionInElement: Point\n  ) => Point;\n\n  constructor(\n    element: ElementRef<HTMLElement> | HTMLElement,\n    private _config: DragRefConfig,\n    private _document: Document,\n    private _ngZone: NgZone,\n    private _viewportRuler: ViewportRuler,\n    private _dragDropRegistry: DragDropRegistry<DragRef, DropListRef>\n  ) {\n    this.withRootElement(element).withParent(_config.parentDragRef || null);\n    this._parentPositions = new ParentPositionTracker(_document);\n    _dragDropRegistry.registerDragItem(this);\n  }\n\n  /**\n   * Returns the element that is being used as a placeholder\n   * while the current element is being dragged.\n   */\n  getPlaceholderElement(): HTMLElement {\n    return this._placeholder;\n  }\n\n  /** Returns the root draggable element. */\n  getRootElement(): HTMLElement {\n    return this._rootElement;\n  }\n\n  /**\n   * Gets the currently-visible element that represents the drag item.\n   * While dragging this is the placeholder, otherwise it's the root element.\n   */\n  getVisibleElement(): HTMLElement {\n    return this.isDragging()\n      ? this.getPlaceholderElement()\n      : this.getRootElement();\n  }\n\n  /** Registers the handles that can be used to drag the element. */\n  withHandles(handles: (HTMLElement | ElementRef<HTMLElement>)[]): this {\n    this._handles = handles.map((handle) => coerceElement(handle));\n    this._handles.forEach((handle) =>\n      toggleNativeDragInteractions(handle, this.disabled)\n    );\n    this._toggleNativeDragInteractions();\n\n    // Delete any lingering disabled handles that may have been destroyed. Note that we re-create\n    // the set, rather than iterate over it and filter out the destroyed handles, because while\n    // the ES spec allows for sets to be modified while they're being iterated over, some polyfills\n    // use an array internally which may throw an error.\n    const disabledHandles = new Set<HTMLElement>();\n    this._disabledHandles.forEach((handle) => {\n      if (this._handles.indexOf(handle) > -1) {\n        disabledHandles.add(handle);\n      }\n    });\n    this._disabledHandles = disabledHandles;\n    return this;\n  }\n\n  /**\n   * Registers the template that should be used for the drag preview.\n   * @param template Template that from which to stamp out the preview.\n   */\n  withPreviewTemplate(template: DragPreviewTemplate | null): this {\n    this._previewTemplate = template;\n    return this;\n  }\n\n  /**\n   * Registers the template that should be used for the drag placeholder.\n   * @param template Template that from which to stamp out the placeholder.\n   */\n  withPlaceholderTemplate(template: DragHelperTemplate | null): this {\n    this._placeholderTemplate = template;\n    return this;\n  }\n\n  /**\n   * Sets an alternate drag root element. The root element is the element that will be moved as\n   * the user is dragging. Passing an alternate root element is useful when trying to enable\n   * dragging on an element that you might not have access to.\n   */\n  withRootElement(rootElement: ElementRef<HTMLElement> | HTMLElement): this {\n    const element = coerceElement(rootElement);\n\n    if (element !== this._rootElement) {\n      if (this._rootElement) {\n        this._removeRootElementListeners(this._rootElement);\n      }\n\n      this._ngZone.runOutsideAngular(() => {\n        element.addEventListener(\n          'mousedown',\n          this._pointerDown,\n          activeEventListenerOptions\n        );\n        element.addEventListener(\n          'touchstart',\n          this._pointerDown,\n          passiveEventListenerOptions\n        );\n        element.addEventListener(\n          'dragstart',\n          this._nativeDragStart,\n          activeEventListenerOptions\n        );\n      });\n      this._initialTransform = undefined;\n      this._rootElement = element;\n    }\n\n    if (\n      typeof SVGElement !== 'undefined' &&\n      this._rootElement instanceof SVGElement\n    ) {\n      this._ownerSVGElement = this._rootElement.ownerSVGElement;\n    }\n\n    return this;\n  }\n\n  /**\n   * Element to which the draggable's position will be constrained.\n   */\n  withBoundaryElement(\n    boundaryElement: ElementRef<HTMLElement> | HTMLElement | null\n  ): this {\n    this._boundaryElement = boundaryElement\n      ? coerceElement(boundaryElement)\n      : null;\n    this._resizeSubscription.unsubscribe();\n    if (boundaryElement) {\n      this._resizeSubscription = this._viewportRuler\n        .change(10)\n        .subscribe(() => this._containInsideBoundaryOnResize());\n    }\n    return this;\n  }\n\n  /** Sets the parent ref that the ref is nested in.  */\n  withParent(parent: DragRef<unknown> | null): this {\n    this._parentDragRef = parent;\n    return this;\n  }\n\n  /** Removes the dragging functionality from the DOM element. */\n  dispose() {\n    this._removeRootElementListeners(this._rootElement);\n\n    // Do this check before removing from the registry since it'll\n    // stop being considered as dragged once it is removed.\n    if (this.isDragging()) {\n      // Since we move out the element to the end of the body while it's being\n      // dragged, we have to make sure that it's removed if it gets destroyed.\n      this._rootElement?.remove();\n    }\n\n    this._anchor?.remove();\n    this._destroyPreview();\n    this._destroyPlaceholder();\n    this._dragDropRegistry.removeDragItem(this);\n    this._removeSubscriptions();\n    this.beforeStarted.complete();\n    this.started.complete();\n    this.released.complete();\n    this.ended.complete();\n    this.entered.complete();\n    this.exited.complete();\n    this.dropped.complete();\n    this._moveEvents.complete();\n    this._handles = [];\n    this._disabledHandles.clear();\n    this._dropContainer = undefined;\n    this._resizeSubscription.unsubscribe();\n    this._parentPositions.clear();\n    this._boundaryElement =\n      this._rootElement =\n      this._ownerSVGElement =\n      this._placeholderTemplate =\n      this._previewTemplate =\n      this._anchor =\n      this._parentDragRef =\n      null!;\n  }\n\n  /** Checks whether the element is currently being dragged. */\n  isDragging(): boolean {\n    return this._hasStartedDragging && this._dragDropRegistry.isDragging(this);\n  }\n\n  /** Resets a standalone drag item to its initial position. */\n  reset(): void {\n    this._rootElement.style.transform = this._initialTransform || '';\n    this._activeTransform = { x: 0, y: 0 };\n    this._passiveTransform = { x: 0, y: 0 };\n  }\n\n  /**\n   * Sets a handle as disabled. While a handle is disabled, it'll capture and interrupt dragging.\n   * @param handle Handle element that should be disabled.\n   */\n  disableHandle(handle: HTMLElement) {\n    if (\n      !this._disabledHandles.has(handle) &&\n      this._handles.indexOf(handle) > -1\n    ) {\n      this._disabledHandles.add(handle);\n      toggleNativeDragInteractions(handle, true);\n    }\n  }\n\n  /**\n   * Enables a handle, if it has been disabled.\n   * @param handle Handle element to be enabled.\n   */\n  enableHandle(handle: HTMLElement) {\n    if (this._disabledHandles.has(handle)) {\n      this._disabledHandles.delete(handle);\n      toggleNativeDragInteractions(handle, this.disabled);\n    }\n  }\n\n  /** Sets the layout direction of the draggable item. */\n  withDirection(direction: Direction): this {\n    this._direction = direction;\n    return this;\n  }\n\n  /** Sets the container that the item is part of. */\n  _withDropContainer(container: DropListRef) {\n    this._dropContainer = container;\n  }\n\n  /**\n   * Gets the current position in pixels the draggable outside of a drop container.\n   */\n  getFreeDragPosition(): Readonly<Point> {\n    const position = this.isDragging()\n      ? this._activeTransform\n      : this._passiveTransform;\n    return { x: position.x, y: position.y };\n  }\n\n  /**\n   * Sets the current position in pixels the draggable outside of a drop container.\n   * @param value New position to be set.\n   */\n  setFreeDragPosition(value: Point): this {\n    this._activeTransform = { x: 0, y: 0 };\n    this._passiveTransform.x = value.x;\n    this._passiveTransform.y = value.y;\n\n    if (!this._dropContainer) {\n      this._applyRootElementTransform(value.x, value.y);\n    }\n\n    return this;\n  }\n\n  /**\n   * Sets the container into which to insert the preview element.\n   * @param value Container into which to insert the preview.\n   */\n  withPreviewContainer(value: PreviewContainer): this {\n    this._previewContainer = value;\n    return this;\n  }\n\n  /** Updates the item's sort order based on the last-known pointer position. */\n  _sortFromLastPointerPosition() {\n    const position = this._lastKnownPointerPosition;\n\n    if (position && this._dropContainer) {\n      this._updateActiveDropContainer(\n        this._getConstrainedPointerPosition(position),\n        position\n      );\n    }\n  }\n\n  /** Unsubscribes from the global subscriptions. */\n  private _removeSubscriptions() {\n    this._pointerMoveSubscription.unsubscribe();\n    this._pointerUpSubscription.unsubscribe();\n    this._scrollSubscription.unsubscribe();\n  }\n\n  /** Destroys the preview element and its ViewRef. */\n  private _destroyPreview() {\n    this._preview?.remove();\n    this._previewRef?.destroy();\n    this._preview = this._previewRef = null!;\n  }\n\n  /** Destroys the placeholder element and its ViewRef. */\n  private _destroyPlaceholder() {\n    this._placeholder?.remove();\n    this._placeholderRef?.destroy();\n    this.animPlaceholder?.remove();\n    this._placeholder = this._placeholderRef = null!;\n    this.animPlaceholder = undefined;\n  }\n\n  /** Handler for the `mousedown`/`touchstart` events. */\n  private _pointerDown = (event: MouseEvent | TouchEvent) => {\n    this.beforeStarted.next();\n\n    // Delegate the event based on whether it started from a handle or the element itself.\n    if (this._handles.length) {\n      const targetHandle = this._getTargetHandle(event);\n\n      if (\n        targetHandle &&\n        !this._disabledHandles.has(targetHandle) &&\n        !this.disabled\n      ) {\n        this._initializeDragSequence(targetHandle, event);\n      }\n    } else if (!this.disabled) {\n      this._initializeDragSequence(this._rootElement, event);\n    }\n  };\n\n  /** Handler that is invoked when the user moves their pointer after they've initiated a drag. */\n  private _pointerMove = (event: MouseEvent | TouchEvent) => {\n    const pointerPosition = this._getPointerPositionOnPage(event);\n\n    if (!this._hasStartedDragging) {\n      const distanceX = Math.abs(\n        pointerPosition.x - this._pickupPositionOnPage.x\n      );\n      const distanceY = Math.abs(\n        pointerPosition.y - this._pickupPositionOnPage.y\n      );\n      const isOverThreshold =\n        distanceX + distanceY >= this._config.dragStartThreshold;\n\n      // Only start dragging after the user has moved more than the minimum distance in either\n      // direction. Note that this is preferable over doing something like `skip(minimumDistance)`\n      // in the `pointerMove` subscription, because we're not guaranteed to have one move event\n      // per pixel of movement (e.g. if the user moves their pointer quickly).\n      if (isOverThreshold) {\n        const isDelayElapsed =\n          Date.now() >= this._dragStartTime + this._getDragStartDelay(event);\n        const container = this._dropContainer;\n\n        if (!isDelayElapsed) {\n          this._endDragSequence(event);\n          return;\n        }\n\n        // Prevent other drag sequences from starting while something in the container is still\n        // being dragged. This can happen while we're waiting for the drop animation to finish\n        // and can cause errors, because some elements might still be moving around.\n        if (\n          !container ||\n          (!container.isDragging() && !container.isReceiving())\n        ) {\n          // Prevent the default action as soon as the dragging sequence is considered as\n          // \"started\" since waiting for the next event can allow the device to begin scrolling.\n          event.preventDefault();\n          this._hasStartedDragging = true;\n          this._ngZone.run(() => this._startDragSequence(event));\n        }\n      }\n\n      return;\n    }\n\n    // We prevent the default action down here so that we know that dragging has started. This is\n    // important for touch devices where doing this too early can unnecessarily block scrolling,\n    // if there's a dragging delay.\n    event.preventDefault();\n\n    const constrainedPointerPosition =\n      this._getConstrainedPointerPosition(pointerPosition);\n    this._hasMoved = true;\n    this._lastKnownPointerPosition = pointerPosition;\n    this._updatePointerDirectionDelta(constrainedPointerPosition);\n\n    if (this._dropContainer) {\n      this._updateActiveDropContainer(\n        constrainedPointerPosition,\n        pointerPosition\n      );\n    } else {\n      // If there's a position constraint function, we want the element's top/left to be at the\n      // specific position on the page. Use the initial position as a reference if that's the case.\n      const offset = this.constrainPosition\n        ? this._initialClientRect!\n        : this._pickupPositionOnPage;\n      const activeTransform = this._activeTransform;\n      activeTransform.x =\n        constrainedPointerPosition.x - offset.x + this._passiveTransform.x;\n      activeTransform.y =\n        constrainedPointerPosition.y - offset.y + this._passiveTransform.y;\n      this._applyRootElementTransform(activeTransform.x, activeTransform.y);\n    }\n\n    // Since this event gets fired for every pixel while dragging, we only\n    // want to fire it if the consumer opted into it. Also we have to\n    // re-enter the zone because we run all of the events on the outside.\n    if (this._moveEvents.observers.length) {\n      this._ngZone.run(() => {\n        this._moveEvents.next({\n          source: this,\n          pointerPosition: constrainedPointerPosition,\n          event,\n          distance: this._getDragDistance(constrainedPointerPosition),\n          delta: this._pointerDirectionDelta,\n        });\n      });\n    }\n  };\n\n  /** Handler that is invoked when the user lifts their pointer up, after initiating a drag. */\n  private _pointerUp = (event: MouseEvent | TouchEvent) => {\n    this._endDragSequence(event);\n  };\n\n  /**\n   * Clears subscriptions and stops the dragging sequence.\n   * @param event Browser event object that ended the sequence.\n   */\n  private _endDragSequence(event: MouseEvent | TouchEvent) {\n    // Note that here we use `isDragging` from the service, rather than from `this`.\n    // The difference is that the one from the service reflects whether a dragging sequence\n    // has been initiated, whereas the one on `this` includes whether the user has passed\n    // the minimum dragging threshold.\n    if (!this._dragDropRegistry.isDragging(this)) {\n      return;\n    }\n\n    this._removeSubscriptions();\n    this._dragDropRegistry.stopDragging(this);\n    this._toggleNativeDragInteractions();\n\n    if (this._handles) {\n      (\n        this._rootElement.style as DragCSSStyleDeclaration\n      ).webkitTapHighlightColor = this._rootElementTapHighlight;\n    }\n\n    if (!this._hasStartedDragging) {\n      return;\n    }\n\n    this.released.next({ source: this, event });\n\n    if (this._dropContainer) {\n      // Stop scrolling immediately, instead of waiting for the animation to finish.\n      this._dropContainer._stopScrolling();\n      this._animatePreviewToPlaceholder().then(() => {\n        this._cleanupDragArtifacts(event);\n        this._cleanupCachedDimensions();\n        this._dragDropRegistry.stopDragging(this);\n      });\n    } else {\n      // Convert the active transform into a passive one. This means that next time\n      // the user starts dragging the item, its position will be calculated relatively\n      // to the new passive transform.\n      this._passiveTransform.x = this._activeTransform.x;\n      const pointerPosition = this._getPointerPositionOnPage(event);\n      this._passiveTransform.y = this._activeTransform.y;\n      this._ngZone.run(() => {\n        this.ended.next({\n          source: this,\n          distance: this._getDragDistance(pointerPosition),\n          dropPoint: pointerPosition,\n          event,\n        });\n      });\n      this._cleanupCachedDimensions();\n      this._dragDropRegistry.stopDragging(this);\n    }\n  }\n\n\n  /** Starts the dragging sequence. */\n  private _startDragSequence(event: MouseEvent | TouchEvent) {\n    if (isTouchEvent(event)) {\n      this._lastTouchEventTime = Date.now();\n    }\n\n    this._toggleNativeDragInteractions();\n\n    const dropContainer = this._dropContainer;\n\n    if (dropContainer) {\n      const element = this._rootElement;\n      const parent = element.parentNode as HTMLElement;\n      const placeholder = (this._placeholder =\n        this._createPlaceholderElement());\n\n      const anchor = (this._anchor =\n        this._anchor || this._document.createComment(''));\n\n      // Needs to happen before the root element is moved.\n      const shadowRoot = this._getShadowRoot();\n\n      // Insert an anchor node so that we can restore the element's position in the DOM.\n      parent.insertBefore(anchor, element);\n\n      // There's no risk of transforms stacking when inside a drop container so\n      // we can keep the initial transform up to date any time dragging starts.\n      this._initialTransform = element.style.transform || '';\n\n      // Create the preview after the initial transform has\n      // been cached, because it can be affected by the transform.\n      this._preview = this._createPreviewElement();\n\n      // We move the element out at the end of the body and we make it hidden, because keeping it in\n      // place will throw off the consumer's `:last-child` selectors. We can't remove the element\n      // from the DOM completely, because iOS will stop firing all subsequent events in the chain.\n      toggleVisibility(element, false, dragImportantProperties);\n      this._document.body.appendChild(\n        parent.replaceChild(placeholder, element)\n      );\n\n      this._getPreviewInsertionPoint(parent, shadowRoot).appendChild(\n        this._preview\n      );\n      this.started.next({ source: this, event }); // Emit before notifying the container.\n      dropContainer.start();\n      this._initialContainer = dropContainer;\n      this._initialIndex = dropContainer.getItemIndex(this);\n    } else {\n      this.started.next({ source: this, event });\n      this._initialContainer = this._initialIndex = undefined!;\n    }\n\n    // Important to run after we've called `start` on the parent container\n    // so that it has had time to resolve its scrollable parents.\n    this._parentPositions.cache(\n      dropContainer ? dropContainer.getScrollableParents() : []\n    );\n  }\n\n  /**\n   * Sets up the different variables and subscriptions\n   * that will be necessary for the dragging sequence.\n   * @param referenceElement Element that started the drag sequence.\n   * @param event Browser event object that started the sequence.\n   */\n  private _initializeDragSequence(\n    referenceElement: HTMLElement,\n    event: MouseEvent | TouchEvent\n  ) {\n    // Stop propagation if the item is inside another\n    // draggable so we don't start multiple drag sequences.\n    if (this._parentDragRef) {\n      event.stopPropagation();\n    }\n\n    const isDragging = this.isDragging();\n    const isTouchSequence = isTouchEvent(event);\n    const isAuxiliaryMouseButton =\n      !isTouchSequence && (event as MouseEvent).button !== 0;\n    const rootElement = this._rootElement;\n    const target = _getEventTarget(event);\n    const isSyntheticEvent =\n      !isTouchSequence &&\n      this._lastTouchEventTime &&\n      this._lastTouchEventTime + MOUSE_EVENT_IGNORE_TIME > Date.now();\n    const isFakeEvent = isTouchSequence\n      ? isFakeTouchstartFromScreenReader(event as TouchEvent)\n      : isFakeMousedownFromScreenReader(event as MouseEvent);\n\n    // If the event started from an element with the native HTML drag&drop, it'll interfere\n    // with our own dragging (e.g. `img` tags do it by default). Prevent the default action\n    // to stop it from happening. Note that preventing on `dragstart` also seems to work, but\n    // it's flaky and it fails if the user drags it away quickly. Also note that we only want\n    // to do this for `mousedown` since doing the same for `touchstart` will stop any `click`\n    // events from firing on touch devices.\n    if (\n      target &&\n      (target as HTMLElement).draggable &&\n      event.type === 'mousedown'\n    ) {\n      event.preventDefault();\n    }\n\n    // Abort if the user is already dragging or is using a mouse button other than the primary one.\n    if (\n      isDragging ||\n      isAuxiliaryMouseButton ||\n      isSyntheticEvent ||\n      isFakeEvent\n    ) {\n      return;\n    }\n\n    // If we've got handles, we need to disable the tap highlight on the entire root element,\n    // otherwise iOS will still add it, even though all the drag interactions on the handle\n    // are disabled.\n    if (this._handles.length) {\n      const rootStyles = rootElement.style as DragCSSStyleDeclaration;\n      this._rootElementTapHighlight = rootStyles.webkitTapHighlightColor || '';\n      rootStyles.webkitTapHighlightColor = 'transparent';\n    }\n\n    this._hasStartedDragging = this._hasMoved = false;\n\n    // Avoid multiple subscriptions and memory leaks when multi touch\n    // (isDragging check above isn't enough because of possible temporal and/or dimensional delays)\n    this._removeSubscriptions();\n    this._initialClientRect = this._rootElement.getBoundingClientRect();\n    this._pointerMoveSubscription =\n      this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);\n    this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(\n      this._pointerUp\n    );\n    this._scrollSubscription = this._dragDropRegistry\n      .scrolled(this._getShadowRoot())\n      .subscribe((scrollEvent) => this._updateOnScroll(scrollEvent));\n\n    if (this._boundaryElement) {\n      this._boundaryRect = getMutableClientRect(this._boundaryElement);\n    }\n\n    // If we have a custom preview we can't know ahead of time how large it'll be so we position\n    // it next to the cursor. The exception is when the consumer has opted into making the preview\n    // the same size as the root element, in which case we do know the size.\n    const previewTemplate = this._previewTemplate;\n    this._pickupPositionInElement =\n      previewTemplate && previewTemplate.template && !previewTemplate.matchSize\n        ? { x: 0, y: 0 }\n        : this._getPointerPositionInElement(\n          this._initialClientRect,\n          referenceElement,\n          event\n        );\n    const pointerPosition =\n      (this._pickupPositionOnPage =\n        this._lastKnownPointerPosition =\n        this._getPointerPositionOnPage(event));\n    this._pointerDirectionDelta = { x: 0, y: 0 };\n    this._pointerPositionAtLastDirectionChange = {\n      x: pointerPosition.x,\n      y: pointerPosition.y,\n    };\n    this._dragStartTime = Date.now();\n    this._dragDropRegistry.startDragging(this, event);\n  }\n\n  /** Cleans up the DOM artifacts that were added to facilitate the element being dragged. */\n  private _cleanupDragArtifacts(event: MouseEvent | TouchEvent) {\n    // Restore the element's visibility and insert it at its old position in the DOM.\n    // It's important that we maintain the position, because moving the element around in the DOM\n    // can throw off `NgFor` which does smart diffing and re-creates elements only when necessary,\n    // while moving the existing elements in all other cases.\n    toggleVisibility(this._rootElement, true, dragImportantProperties);\n    this._anchor.parentNode!.replaceChild(this._rootElement, this._anchor);\n\n    this._destroyPreview();\n    this._destroyPlaceholder();\n    this._initialClientRect =\n      this._boundaryRect =\n      this._previewRect =\n      this._initialTransform =\n      undefined;\n\n    // Re-enter the NgZone since we bound `document` events on the outside.\n    this._ngZone.run(() => {\n      const container = this._dropContainer!;\n      const currentIndex = container.getItemIndex(this);\n      const pointerPosition = this._getPointerPositionOnPage(event);\n      const distance = this._getDragDistance(pointerPosition);\n      const isPointerOverContainer = container._isOverContainer(\n        pointerPosition.x,\n        pointerPosition.y\n      );\n\n      this.ended.next({\n        source: this,\n        distance,\n        dropPoint: pointerPosition,\n        event,\n      });\n\n\n      this.dropped.next({\n        item: this,\n        currentIndex,\n        previousIndex: this._initialIndex,\n        container: container,\n        previousContainer: this._initialContainer,\n        isPointerOverContainer,\n        distance,\n        dropPoint: pointerPosition,\n        event,\n        nestInfo: this.nestInfo // changed by R2M for nesting item\n      });\n      container.drop(\n        this,\n        currentIndex,\n        this._initialIndex,\n        this._initialContainer,\n        isPointerOverContainer,\n        distance,\n        pointerPosition,\n        event,\n        this.nestInfo\n      );\n      this._dropContainer = this._initialContainer;\n    });\n  }\n\n  /**\n   * Updates the item's position in its drop container, or moves it\n   * into a new one, depending on its current drag position.\n   */\n  private _updateActiveDropContainer(\n    { x, y }: Point,\n    { x: rawX, y: rawY }: Point\n  ) {\n    // Drop container that draggable has been moved into.\n    let newContainer = this._initialContainer._getSiblingContainerFromPosition(\n      this,\n      x,\n      y\n    );\n\n    // R2M start\n    if (newContainer && this._initialContainer._isOverContainer(x, y)) {\n      let initialRect = this._initialContainer.getClientRect();\n      let newRect = newContainer?.getClientRect();\n      if (newRect && initialRect && initialRect.top > newRect.top) {\n        newContainer = undefined;\n      }\n\n    }\n    // R2M end\n\n    // If we couldn't find a new container to move the item into, and the item has left its\n    // initial container, check whether the it's over the initial container. This handles the\n    // case where two containers are connected one way and the user tries to undo dragging an\n    // item into a new container.\n    if (\n      !newContainer &&\n      this._dropContainer !== this._initialContainer &&\n      this._initialContainer._isOverContainer(x, y)\n    ) {\n\n      newContainer = this._initialContainer;\n    }\n\n    if (newContainer && newContainer !== this._dropContainer) {\n      this._ngZone.run(() => {\n        // Notify the old container that the item has left.\n        this.exited.next({ item: this, container: this._dropContainer! });\n        this._dropContainer!.exit(this);\n        this._dropContainer!._unnestIfNecessary(this);\n\n\n        // Notify the new container that the item has entered.\n        this._dropContainer = newContainer!;\n        this._dropContainer.enter(\n          this,\n          x,\n          y,\n          newContainer === this._initialContainer &&\n            // If we're re-entering the initial container and sorting is disabled,\n            // put item the into its starting index to begin with.\n            newContainer.sortingDisabled\n            ? this._initialIndex\n            : undefined\n        );\n        this.entered.next({\n          item: this,\n          container: newContainer!,\n          currentIndex: newContainer!.getItemIndex(this),\n        });\n      });\n    }\n\n    // Dragging may have been interrupted as a result of the events above.\n    if (this.isDragging()) {\n      this._dropContainer!._startScrollingIfNecessary(rawX, rawY);\n      // R2M start\n      // check if dragging item is being over the middle of item, then nesting it into item's children\n      // Just now, there is no such step.\n      if (this.constrainPosition) {\n        this._applyPreviewTransform(x, y);\n      } else {\n        this._applyPreviewTransform(\n          x - this._pickupPositionInElement.x,\n          y - this._pickupPositionInElement.y\n        );\n      }\n\n      let previewRect = this._preview.getBoundingClientRect();\n\n      // Checks if draggin element is inside in gutter area set by pagination\n      // Gutter means that non-draggable elements(tree parent node which is hidden) which _isEmpty property of CdkDropDownItem is true\n// R2M start for handle gutter\n      let isInGutter = this._dropContainer?._isInGutter(this, x, y);\n\n      if (isInGutter == true) {\n        return ;\n      }\n// R2M end\n\n      let nestIndex = this._dropContainer?._getNestIndex(this, x, y, previewRect, this._pointerDirectionDelta);\n\n      if (nestIndex !== undefined && nestIndex !== -1) {\n        this._dropContainer?._nestItem(this, nestIndex);\n        this.nestInfo = {\n          nestIndex\n        };\n      } else {\n        if (this.nestInfo && this.nestInfo.nestIndex !== -1) {\n\n          this._dropContainer!._unnestIfNecessary(this);\n        }\n        this._dropContainer!._sortItem(this, x, y, this._pointerDirectionDelta);\n      }\n\n      // R2M end\n\n\n    }\n  }\n\n  /**\n   * Creates the element that will be rendered next to the user's pointer\n   * and will be used as a preview of the element that is being dragged.\n   */\n  private _createPreviewElement(): HTMLElement {\n    const previewConfig = this._previewTemplate;\n    const previewClass = this.previewClass;\n    const previewTemplate = previewConfig ? previewConfig.template : null;\n    let preview: HTMLElement;\n\n    if (previewTemplate && previewConfig) {\n      // Measure the element before we've inserted the preview\n      // since the insertion could throw off the measurement.\n      const rootRect = previewConfig.matchSize ? this._initialClientRect : null;\n      const viewRef = previewConfig.viewContainer.createEmbeddedView(\n        previewTemplate,\n        previewConfig.context\n      );\n      viewRef.detectChanges();\n      preview = getRootNode(viewRef, this._document);\n      this._previewRef = viewRef;\n      if (previewConfig.matchSize) {\n        matchElementSize(preview, rootRect!);\n      } else {\n        preview.style.transform = getTransform(\n          this._pickupPositionOnPage.x,\n          this._pickupPositionOnPage.y\n        );\n      }\n    } else {\n      preview = deepCloneNode(this._rootElement);\n      matchElementSize(preview, this._initialClientRect!);\n\n      if (this._initialTransform) {\n        preview.style.transform = this._initialTransform;\n      }\n    }\n\n    extendStyles(\n      preview.style,\n      {\n        // It's important that we disable the pointer events on the preview, because\n        // it can throw off the `document.elementFromPoint` calls in the `CdkDropList`.\n        'pointer-events': 'none',\n        // We have to reset the margin, because it can throw off positioning relative to the viewport.\n        margin: '0',\n        position: 'fixed',\n        top: '0',\n        left: '0',\n        'z-index': `${this._config.zIndex || 1000}`,\n      },\n      dragImportantProperties\n    );\n\n    toggleNativeDragInteractions(preview, false);\n    preview.classList.add('cdk-drag-preview');\n    preview.setAttribute('dir', this._direction);\n\n    if (previewClass) {\n      if (Array.isArray(previewClass)) {\n        previewClass.forEach((className) => preview.classList.add(className));\n      } else {\n        preview.classList.add(previewClass);\n      }\n    }\n\n    return preview;\n  }\n\n  /**\n   * Animates the preview element from its current position to the location of the drop placeholder.\n   * @returns Promise that resolves when the animation completes.\n   */\n  private _animatePreviewToPlaceholder(): Promise<void> {\n    // If the user hasn't moved yet, the transitionend event won't fire.\n    if (!this._hasMoved) {\n      return Promise.resolve();\n    }\n\n    const placeholderRect = this._placeholder.getBoundingClientRect();\n\n    // Apply the class that adds a transition to the preview.\n    this._preview.classList.add('cdk-drag-animating');\n\n    // Move the preview to the placeholder position.\n    this._applyPreviewTransform(placeholderRect.left, placeholderRect.top);\n\n    // If the element doesn't have a `transition`, the `transitionend` event won't fire. Since\n    // we need to trigger a style recalculation in order for the `cdk-drag-animating` class to\n    // apply its style, we take advantage of the available info to figure out whether we need to\n    // bind the event in the first place.\n    const duration = getTransformTransitionDurationInMs(this._preview);\n\n    if (duration === 0) {\n      return Promise.resolve();\n    }\n\n    return this._ngZone.runOutsideAngular(() => {\n      return new Promise((resolve) => {\n        const handler = ((event: TransitionEvent) => {\n          if (\n            !event ||\n            (_getEventTarget(event) === this._preview &&\n              event.propertyName === 'transform')\n          ) {\n            this._preview?.removeEventListener('transitionend', handler);\n            resolve();\n            clearTimeout(timeout);\n          }\n        }) as EventListenerOrEventListenerObject;\n\n        // If a transition is short enough, the browser might not fire the `transitionend` event.\n        // Since we know how long it's supposed to take, add a timeout with a 50% buffer that'll\n        // fire if the transition hasn't completed when it was supposed to.\n        const timeout = setTimeout(handler as Function, duration * 1.5);\n        this._preview.addEventListener('transitionend', handler);\n      });\n    });\n  }\n\n  /** Creates an element that will be shown instead of the current element while dragging. */\n  private _createPlaceholderElement(): HTMLElement {\n    const placeholderConfig = this._placeholderTemplate;\n    const placeholderTemplate = placeholderConfig\n      ? placeholderConfig.template\n      : null;\n    let placeholder: HTMLElement;\n\n    if (placeholderTemplate) {\n      this._placeholderRef =\n        placeholderConfig!.viewContainer.createEmbeddedView(\n          placeholderTemplate,\n          placeholderConfig!.context\n        );\n      this._placeholderRef.detectChanges();\n      placeholder = getRootNode(this._placeholderRef, this._document);\n    } else {\n      placeholder = deepCloneNode(this._rootElement);\n    }\n\n    // Stop pointer events on the preview so the user can't\n    // interact with it while the preview is animating.\n    placeholder.style.pointerEvents = 'none';\n    placeholder.classList.add('cdk-drag-placeholder-hidden');\n\n    return placeholder;\n  }\n\n  /**\n   * Figures out the coordinates at which an element was picked up.\n   * @param referenceElement Element that initiated the dragging.\n   * @param event Event that initiated the dragging.\n   */\n  private _getPointerPositionInElement(\n    elementRect: ClientRect,\n    referenceElement: HTMLElement,\n    event: MouseEvent | TouchEvent\n  ): Point {\n    const handleElement =\n      referenceElement === this._rootElement ? null : referenceElement;\n    const referenceRect = handleElement\n      ? handleElement.getBoundingClientRect()\n      : elementRect;\n    const point = isTouchEvent(event) ? event.targetTouches[0] : event;\n    const scrollPosition = this._getViewportScrollPosition();\n    const x = point.pageX - referenceRect.left - scrollPosition.left;\n    const y = point.pageY - referenceRect.top - scrollPosition.top;\n\n    return {\n      x: referenceRect.left - elementRect.left + x,\n      y: referenceRect.top - elementRect.top + y,\n    };\n  }\n\n  /** Determines the point of the page that was touched by the user. */\n  private _getPointerPositionOnPage(event: MouseEvent | TouchEvent): Point {\n    const scrollPosition = this._getViewportScrollPosition();\n    const point = isTouchEvent(event)\n      ? // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\n      // Also note that on real devices we're guaranteed for either `touches` or `changedTouches`\n      // to have a value, but Firefox in device emulation mode has a bug where both can be empty\n      // for `touchstart` and `touchend` so we fall back to a dummy object in order to avoid\n      // throwing an error. The value returned here will be incorrect, but since this only\n      // breaks inside a developer tool and the value is only used for secondary information,\n      // we can get away with it. See https://bugzilla.mozilla.org/show_bug.cgi?id=1615824.\n      event.touches[0] || event.changedTouches[0] || { pageX: 0, pageY: 0 }\n      : event;\n\n    const x = point.pageX - scrollPosition.left;\n    const y = point.pageY - scrollPosition.top;\n\n    // if dragging SVG element, try to convert from the screen coordinate system to the SVG\n    // coordinate system\n    if (this._ownerSVGElement) {\n      const svgMatrix = this._ownerSVGElement.getScreenCTM();\n      if (svgMatrix) {\n        const svgPoint = this._ownerSVGElement.createSVGPoint();\n        svgPoint.x = x;\n        svgPoint.y = y;\n        return svgPoint.matrixTransform(svgMatrix.inverse());\n      }\n    }\n\n    return { x, y };\n  }\n\n  /** Gets the pointer position on the page, accounting for any position constraints. */\n  private _getConstrainedPointerPosition(point: Point): Point {\n    const dropContainerLock = this._dropContainer\n      ? this._dropContainer.lockAxis\n      : null;\n    let { x, y } = this.constrainPosition\n      ? this.constrainPosition(\n        point,\n        this,\n        this._initialClientRect!,\n        this._pickupPositionInElement\n      )\n      : point;\n\n    if (this.lockAxis === 'x' || dropContainerLock === 'x') {\n      y = this._pickupPositionOnPage.y;\n    } else if (this.lockAxis === 'y' || dropContainerLock === 'y') {\n      x = this._pickupPositionOnPage.x;\n    }\n\n    if (this._boundaryRect) {\n      const { x: pickupX, y: pickupY } = this._pickupPositionInElement;\n      const boundaryRect = this._boundaryRect;\n      const { width: previewWidth, height: previewHeight } =\n        this._getPreviewRect();\n      const minY = boundaryRect.top + pickupY;\n      const maxY = boundaryRect.bottom - (previewHeight - pickupY);\n      const minX = boundaryRect.left + pickupX;\n      const maxX = boundaryRect.right - (previewWidth - pickupX);\n\n      x = clamp(x, minX, maxX);\n      y = clamp(y, minY, maxY);\n    }\n\n    return { x, y };\n  }\n\n  /** Updates the current drag delta, based on the user's current pointer position on the page. */\n  private _updatePointerDirectionDelta(pointerPositionOnPage: Point) {\n    const { x, y } = pointerPositionOnPage;\n    const delta = this._pointerDirectionDelta;\n    const positionSinceLastChange = this._pointerPositionAtLastDirectionChange;\n\n    // Amount of pixels the user has dragged since the last time the direction changed.\n    const changeX = Math.abs(x - positionSinceLastChange.x);\n    const changeY = Math.abs(y - positionSinceLastChange.y);\n\n    // Because we handle pointer events on a per-pixel basis, we don't want the delta\n    // to change for every pixel, otherwise anything that depends on it can look erratic.\n    // To make the delta more consistent, we track how much the user has moved since the last\n    // delta change and we only update it after it has reached a certain threshold.\n    if (changeX > this._config.pointerDirectionChangeThreshold) {\n      delta.x = x > positionSinceLastChange.x ? 1 : -1;\n      positionSinceLastChange.x = x;\n    }\n\n    if (changeY > this._config.pointerDirectionChangeThreshold) {\n      delta.y = y > positionSinceLastChange.y ? 1 : -1;\n      positionSinceLastChange.y = y;\n    }\n\n    return delta;\n  }\n\n  \n\n  /** Toggles the native drag interactions, based on how many handles are registered. */\n  private _toggleNativeDragInteractions() {\n    if (!this._rootElement || !this._handles) {\n      return;\n    }\n\n    const shouldEnable = this._handles.length > 0 || !this.isDragging();\n\n    if (shouldEnable !== this._nativeInteractionsEnabled) {\n      this._nativeInteractionsEnabled = shouldEnable;\n      toggleNativeDragInteractions(this._rootElement, shouldEnable);\n    }\n  }\n\n  /** Removes the manually-added event listeners from the root element. */\n  private _removeRootElementListeners(element: HTMLElement) {\n    element.removeEventListener(\n      'mousedown',\n      this._pointerDown,\n      activeEventListenerOptions\n    );\n    element.removeEventListener(\n      'touchstart',\n      this._pointerDown,\n      passiveEventListenerOptions\n    );\n    element.removeEventListener(\n      'dragstart',\n      this._nativeDragStart,\n      activeEventListenerOptions\n    );\n  }\n\n  /**\n   * Applies a `transform` to the root element, taking into account any existing transforms on it.\n   * @param x New transform value along the X axis.\n   * @param y New transform value along the Y axis.\n   */\n  private _applyRootElementTransform(x: number, y: number) {\n    const transform = getTransform(x, y);\n    const styles = this._rootElement.style;\n\n    // Cache the previous transform amount only after the first drag sequence, because\n    // we don't want our own transforms to stack on top of each other.\n    // Should be excluded none because none + translate3d(x, y, x) is invalid css\n    if (this._initialTransform == null) {\n      this._initialTransform =\n        styles.transform && styles.transform != 'none' ? styles.transform : '';\n    }\n\n    // Preserve the previous `transform` value, if there was one. Note that we apply our own\n    // transform before the user's, because things like rotation can affect which direction\n    // the element will be translated towards.\n    styles.transform = combineTransforms(transform, this._initialTransform);\n  }\n\n  /**\n   * Applies a `transform` to the preview, taking into account any existing transforms on it.\n   * @param x New transform value along the X axis.\n   * @param y New transform value along the Y axis.\n   */\n  private _applyPreviewTransform(x: number, y: number) {\n    // Only apply the initial transform if the preview is a clone of the original element, otherwise\n    // it could be completely different and the transform might not make sense anymore.\n    const initialTransform = this._previewTemplate?.template\n      ? undefined\n      : this._initialTransform;\n    const transform = getTransform(x, y);\n    this._preview.style.transform = combineTransforms(\n      transform,\n      initialTransform\n    );\n  }\n\n  /**\n   * Gets the distance that the user has dragged during the current drag sequence.\n   * @param currentPosition Current position of the user's pointer.\n   */\n  private _getDragDistance(currentPosition: Point): Point {\n    const pickupPosition = this._pickupPositionOnPage;\n\n    if (pickupPosition) {\n      return {\n        x: currentPosition.x - pickupPosition.x,\n        y: currentPosition.y - pickupPosition.y,\n      };\n    }\n\n    return { x: 0, y: 0 };\n  }\n\n  /** Cleans up any cached element dimensions that we don't need after dragging has stopped. */\n  private _cleanupCachedDimensions() {\n    this._boundaryRect = this._previewRect = undefined;\n    this._parentPositions.clear();\n  }\n\n  /**\n   * Checks whether the element is still inside its boundary after the viewport has been resized.\n   * If not, the position is adjusted so that the element fits again.\n   */\n  private _containInsideBoundaryOnResize() {\n    let { x, y } = this._passiveTransform;\n\n    if ((x === 0 && y === 0) || this.isDragging() || !this._boundaryElement) {\n      return;\n    }\n\n    // Note: don't use `_clientRectAtStart` here, because we want the latest position.\n    const elementRect = this._rootElement.getBoundingClientRect();\n    const boundaryRect = this._boundaryElement.getBoundingClientRect();\n\n    // It's possible that the element got hidden away after dragging (e.g. by switching to a\n    // different tab). Don't do anything in this case so we don't clear the user's position.\n    if (\n      (boundaryRect.width === 0 && boundaryRect.height === 0) ||\n      (elementRect.width === 0 && elementRect.height === 0)\n    ) {\n      return;\n    }\n\n    const leftOverflow = boundaryRect.left - elementRect.left;\n    const rightOverflow = elementRect.right - boundaryRect.right;\n    const topOverflow = boundaryRect.top - elementRect.top;\n    const bottomOverflow = elementRect.bottom - boundaryRect.bottom;\n\n    // If the element has become wider than the boundary, we can't\n    // do much to make it fit so we just anchor it to the left.\n    if (boundaryRect.width > elementRect.width) {\n      if (leftOverflow > 0) {\n        x += leftOverflow;\n      }\n\n      if (rightOverflow > 0) {\n        x -= rightOverflow;\n      }\n    } else {\n      x = 0;\n    }\n\n    // If the element has become taller than the boundary, we can't\n    // do much to make it fit so we just anchor it to the top.\n    if (boundaryRect.height > elementRect.height) {\n      if (topOverflow > 0) {\n        y += topOverflow;\n      }\n\n      if (bottomOverflow > 0) {\n        y -= bottomOverflow;\n      }\n    } else {\n      y = 0;\n    }\n\n    if (x !== this._passiveTransform.x || y !== this._passiveTransform.y) {\n      this.setFreeDragPosition({ y, x });\n    }\n  }\n\n  /** Gets the drag start delay, based on the event type. */\n  private _getDragStartDelay(event: MouseEvent | TouchEvent): number {\n    const value = this.dragStartDelay;\n\n    if (typeof value === 'number') {\n      return value;\n    } else if (isTouchEvent(event)) {\n      return value.touch;\n    }\n\n    return value ? value.mouse : 0;\n  }\n\n  /** Updates the internal state of the draggable element when scrolling has occurred. */\n  private _updateOnScroll(event: Event) {\n    const scrollDifference = this._parentPositions.handleScroll(event);\n\n    if (scrollDifference) {\n      const target = _getEventTarget<HTMLElement | Document>(event)!;\n\n      // ClientRect dimensions are based on the scroll position of the page and its parent\n      // node so we have to update the cached boundary ClientRect if the user has scrolled.\n      if (\n        this._boundaryRect &&\n        target !== this._boundaryElement &&\n        target.contains(this._boundaryElement)\n      ) {\n        adjustClientRect(\n          this._boundaryRect,\n          scrollDifference.top,\n          scrollDifference.left\n        );\n      }\n\n      this._pickupPositionOnPage.x += scrollDifference.left;\n      this._pickupPositionOnPage.y += scrollDifference.top;\n\n      // If we're in free drag mode, we have to update the active transform, because\n      // it isn't relative to the viewport like the preview inside a drop list.\n      if (!this._dropContainer) {\n        this._activeTransform.x -= scrollDifference.left;\n        this._activeTransform.y -= scrollDifference.top;\n        this._applyRootElementTransform(\n          this._activeTransform.x,\n          this._activeTransform.y\n        );\n      }\n    }\n  }\n\n  /** Gets the scroll position of the viewport. */\n  private _getViewportScrollPosition() {\n    return (\n      this._parentPositions.positions.get(this._document)?.scrollPosition ||\n      this._parentPositions.getViewportScrollPosition()\n    );\n  }\n\n  /**\n   * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n   * than saving it in property directly on init, because we want to resolve it as late as possible\n   * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n   * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n   */\n  private _getShadowRoot(): ShadowRoot | null {\n    if (this._cachedShadowRoot === undefined) {\n      this._cachedShadowRoot = _getShadowRoot(this._rootElement);\n    }\n\n    return this._cachedShadowRoot;\n  }\n\n  /** Gets the element into which the drag preview should be inserted. */\n  private _getPreviewInsertionPoint(\n    initialParent: HTMLElement,\n    shadowRoot: ShadowRoot | null\n  ): HTMLElement {\n    const previewContainer = this._previewContainer || 'global';\n\n    if (previewContainer === 'parent') {\n      return initialParent;\n    }\n\n    if (previewContainer === 'global') {\n      const documentRef = this._document;\n\n      // We can't use the body if the user is in fullscreen mode,\n      // because the preview will render under the fullscreen element.\n      // TODO(crisbeto): dedupe this with the `FullscreenOverlayContainer` eventually.\n      return (\n        shadowRoot ||\n        documentRef.fullscreenElement ||\n        (documentRef as any).webkitFullscreenElement ||\n        (documentRef as any).mozFullScreenElement ||\n        (documentRef as any).msFullscreenElement ||\n        documentRef.body\n      );\n    }\n\n    return coerceElement(previewContainer);\n  }\n\n  /** Lazily resolves and returns the dimensions of the preview. */\n  private _getPreviewRect(): ClientRect {\n    // Cache the preview element rect if we haven't cached it already or if\n    // we cached it too early before the element dimensions were computed.\n    if (\n      !this._previewRect ||\n      (!this._previewRect.width && !this._previewRect.height)\n    ) {\n      this._previewRect = this._preview\n        ? this._preview.getBoundingClientRect()\n        : this._initialClientRect!;\n    }\n\n    return this._previewRect;\n  }\n\n  /** Handles a native `dragstart` event. */\n  private _nativeDragStart = (event: DragEvent) => {\n    if (this._handles.length) {\n      const targetHandle = this._getTargetHandle(event);\n\n      if (\n        targetHandle &&\n        !this._disabledHandles.has(targetHandle) &&\n        !this.disabled\n      ) {\n        event.preventDefault();\n      }\n    } else if (!this.disabled) {\n      // Usually this isn't necessary since the we prevent the default action in `pointerDown`,\n      // but some cases like dragging of links can slip through (see #24403).\n      event.preventDefault();\n    }\n  };\n\n  /** Gets a handle that is the target of an event. */\n  private _getTargetHandle(event: Event): HTMLElement | undefined {\n    return this._handles.find((handle) => {\n      return (\n        event.target &&\n        (event.target === handle || handle.contains(event.target as Node))\n      );\n    });\n  }\n}\n\n/**\n * Gets a 3d `transform` that can be applied to an element.\n * @param x Desired position of the element along the X axis.\n * @param y Desired position of the element along the Y axis.\n */\nfunction getTransform(x: number, y: number): string {\n  // Round the transforms since some browsers will\n  // blur the elements for sub-pixel transforms.\n  return `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)`;\n}\n\n/** Clamps a value between a minimum and a maximum. */\nfunction clamp(value: number, min: number, max: number) {\n  return Math.max(min, Math.min(max, value));\n}\n\n/** Determines whether an event is a touch event. */\nfunction isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent {\n  // This function is called for every pixel that the user has dragged so we need it to be\n  // as fast as possible. Since we only bind mouse events and touch events, we can assume\n  // that if the event's name starts with `t`, it's a touch event.\n  return event.type[0] === 't';\n}\n\n/**\n * Gets the root HTML element of an embedded view.\n * If the root is not an HTML element it gets wrapped in one.\n */\nfunction getRootNode(\n  viewRef: EmbeddedViewRef<any>,\n  _document: Document\n): HTMLElement {\n  const rootNodes: Node[] = viewRef.rootNodes;\n\n  if (\n    rootNodes.length === 1 &&\n    rootNodes[0].nodeType === _document.ELEMENT_NODE\n  ) {\n    return rootNodes[0] as HTMLElement;\n  }\n\n  const wrapper = _document.createElement('div');\n  rootNodes.forEach((node) => wrapper.appendChild(node));\n  return wrapper;\n}\n\n/**\n * Matches the target element's size to the source's size.\n * @param target Element that needs to be resized.\n * @param sourceRect Dimensions of the source element.\n */\nfunction matchElementSize(target: HTMLElement, sourceRect: ClientRect): void {\n  target.style.width = `${sourceRect.width}px`;\n  target.style.height = `${sourceRect.height}px`;\n  target.style.transform = getTransform(sourceRect.left, sourceRect.top);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Moves an item one index in an array to another.\n * @param array Array in which to move the item.\n * @param fromIndex Starting index of the item.\n * @param toIndex Index to which the item should be moved.\n */\nexport function moveItemInArray<T = any>(array: T[], fromIndex: number, toIndex: number): void {\n  const from = clamp(fromIndex, array.length - 1);\n  const to = clamp(toIndex, array.length - 1);\n\n  if (from === to) {\n    return;\n  }\n\n  const target = array[from];\n  const delta = to < from ? -1 : 1;\n\n  for (let i = from; i !== to; i += delta) {\n    array[i] = array[i + delta];\n  }\n\n  array[to] = target;\n}\n\n/**\n * Moves an item from one array to another.\n * @param currentArray Array from which to transfer the item.\n * @param targetArray Array into which to put the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n */\nexport function transferArrayItem<T = any>(\n  currentArray: T[],\n  targetArray: T[],\n  currentIndex: number,\n  targetIndex: number,\n): void {\n  const from = clamp(currentIndex, currentArray.length - 1);\n  const to = clamp(targetIndex, targetArray.length);\n\n  if (currentArray.length) {\n    targetArray.splice(to, 0, currentArray.splice(from, 1)[0]);\n  }\n}\n\n/**\n * Copies an item from one array to another, leaving it in its\n * original position in current array.\n * @param currentArray Array from which to copy the item.\n * @param targetArray Array into which is copy the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n *\n */\nexport function copyArrayItem<T = any>(\n  currentArray: T[],\n  targetArray: T[],\n  currentIndex: number,\n  targetIndex: number,\n): void {\n  const to = clamp(targetIndex, targetArray.length);\n\n  if (currentArray.length) {\n    targetArray.splice(to, 0, currentArray[currentIndex]);\n  }\n}\n\n/** Clamps a number between zero and a maximum. */\nfunction clamp(value: number, max: number): number {\n  return Math.max(0, Math.min(max, value));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { Direction } from '@angular/cdk/bidi';\nimport { coerceElement } from '@angular/cdk/coercion';\nimport { ElementRef } from '@angular/core';\nimport {\n  adjustClientRect,\n  getMutableClientRect,\n  isInsideClientRect,\n} from '../dom/client-rect';\nimport { combineTransforms } from '../dom/styling';\nimport { DragDropRegistry } from '../drag-drop-registry';\nimport { moveItemInArray } from '../drag-utils';\nimport {\n  DropListSortStrategy,\n  DropListSortStrategyItem,\n  SortPredicate,\n} from './drop-list-sort-strategy';\n\n/**\n * Entry in the position cache for draggable items.\n * @docs-private\n */\ninterface CachedItemPosition<T> {\n  /** Instance of the drag item. */\n  drag: T;\n  /** Dimensions of the item. */\n  clientRect: ClientRect;\n  /** Amount by which the item has been moved since dragging started. */\n  offset: number;\n  /** Inline transform that the drag item had when dragging started. */\n  initialTransform: string;\n}\n\n/**\n * Strategy that only supports sorting along a single axis.\n * Items are reordered using CSS transforms which allows for sorting to be animated.\n * @docs-private\n */\nexport class SingleAxisSortStrategy<T extends DropListSortStrategyItem>\n  implements DropListSortStrategy<T>\n{\n  /** Function used to determine if an item can be sorted into a specific index. */\n  private _sortPredicate: SortPredicate<T>;\n\n  /** Cache of the dimensions of all the items inside the container. */\n  private _itemPositions: CachedItemPosition<T>[] = [];\n\n  /**\n   * Draggable items that are currently active inside the container. Includes the items\n   * that were there at the start of the sequence, as well as any items that have been dragged\n   * in, but haven't been dropped yet.\n   */\n  private _activeDraggables: T[];\n\n  /** Direction in which the list is oriented. */\n  orientation: 'vertical' | 'horizontal' = 'vertical';\n\n  /** Layout direction of the drop list. */\n  direction: Direction;\n\n  constructor(\n    private _element: HTMLElement | ElementRef<HTMLElement>,\n    private _dragDropRegistry: DragDropRegistry<T, unknown>\n  ) { }\n\n  /**\n   * Keeps track of the item that was last swapped with the dragged item, as well as what direction\n   * the pointer was moving in when the swap occurred and whether the user's pointer continued to\n   * overlap with the swapped item after the swapping occurred.\n   */\n  private _previousSwap = {\n    drag: null as T | null,\n    delta: 0,\n    overlaps: false,\n  };\n\n  /**\n   * To be called when the drag sequence starts.\n   * @param items Items that are currently in the list.\n   */\n  start(items: readonly T[]) {\n    this.withItems(items);\n  }\n\n  /**\n   * To be called when an item is being sorted.\n   * @param item Item to be sorted.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param pointerDelta Direction in which the pointer is moving along each axis.\n   */\n  sort(\n    item: T,\n    pointerX: number,\n    pointerY: number,\n    pointerDelta: { x: number; y: number }\n  ) {\n    const siblings = this._itemPositions;\n    const newIndex = this._getItemIndexFromPointerPosition(\n      item,\n      pointerX,\n      pointerY,\n      pointerDelta\n    );\n\n    if (newIndex === -1 && siblings.length > 0) {\n      return null;\n    }\n\n    const isHorizontal = this.orientation === 'horizontal';\n    const currentIndex = siblings.findIndex(\n      (currentItem) => currentItem.drag === item\n    );\n\n    const siblingAtNewPosition = siblings[newIndex];\n    const currentPosition = siblings[currentIndex].clientRect;\n    const newPosition = siblingAtNewPosition.clientRect;\n    const delta = currentIndex > newIndex ? 1 : -1;\n\n    // How many pixels the item's placeholder should be offset.\n    const itemOffset = this._getItemOffsetPx(\n      currentPosition,\n      newPosition,\n      delta\n    );\n\n    // How many pixels all the other items should be offset.\n    const siblingOffset = this._getSiblingOffsetPx(\n      currentIndex,\n      siblings,\n      delta\n    );\n\n    // Save the previous order of the items before moving the item to its new index.\n    // We use this to check whether an item has been moved as a result of the sorting.\n    const oldOrder = siblings.slice();\n\n    // Shuffle the array in place.\n    moveItemInArray(siblings, currentIndex, newIndex);\n\n    siblings.forEach((sibling, index) => {\n      // Don't do anything if the position hasn't changed.\n      if (oldOrder[index] === sibling) {\n        return;\n      }\n\n      const isDraggedItem = sibling.drag === item;\n      const offset = isDraggedItem ? itemOffset : siblingOffset;\n      const elementToOffset = isDraggedItem\n        ? item.getPlaceholderElement()\n        : sibling.drag.getRootElement();\n\n      // Update the offset to reflect the new position.\n      sibling.offset += offset;\n\n      // Since we're moving the items with a `transform`, we need to adjust their cached\n      // client rects to reflect their new position, as well as swap their positions in the cache.\n      // Note that we shouldn't use `getBoundingClientRect` here to update the cache, because the\n      // elements may be mid-animation which will give us a wrong result.\n      if (isHorizontal) {\n        // Round the transforms since some browsers will\n        // blur the elements, for sub-pixel transforms.\n        elementToOffset.style.transform = combineTransforms(\n          `translate3d(${Math.round(sibling.offset)}px, 0, 0)`,\n          sibling.initialTransform\n        );\n        adjustClientRect(sibling.clientRect, 0, offset);\n      } else {\n        // elementToOffset.style.backgroundColor = 'green';\n        elementToOffset.style.transform = combineTransforms(\n          `translate3d(0, ${Math.round(sibling.offset)}px, 0)`,\n          sibling.initialTransform\n        );\n        adjustClientRect(sibling.clientRect, offset, 0);\n      }\n\n    });\n\n    // Note that it's important that we do this after the client rects have been adjusted.\n    this._previousSwap.overlaps = isInsideClientRect(\n      newPosition,\n      pointerX,\n      pointerY\n    );\n    this._previousSwap.drag = siblingAtNewPosition.drag;\n    this._previousSwap.delta = isHorizontal ? pointerDelta.x : pointerDelta.y;\n\n    return { previousIndex: currentIndex, currentIndex: newIndex };\n  }\n\n  getActiveItem(index: number): T {\n    return this._itemPositions[index].drag;\n  }\n\n  /**\n   * Called when an item is being moved into the container.\n   * @param item Item that was moved into the container.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param index Index at which the item entered. If omitted, the container will try to figure it\n   *   out automatically.\n   */\n  enter(item: T, pointerX: number, pointerY: number, index?: number): void {\n    const newIndex =\n      index == null || index < 0\n        ? // We use the coordinates of where the item entered the drop\n        // zone to figure out at which index it should be inserted.\n        this._getItemIndexFromPointerPosition(item, pointerX, pointerY)\n        : index;\n\n    const activeDraggables = this._activeDraggables;\n    const currentIndex = activeDraggables.indexOf(item);\n    const placeholder = item.getPlaceholderElement();\n    let newPositionReference: T | undefined = activeDraggables[newIndex];\n\n    // If the item at the new position is the same as the item that is being dragged,\n    // it means that we're trying to restore the item to its initial position. In this\n    // case we should use the next item from the list as the reference.\n    if (newPositionReference === item) {\n      newPositionReference = activeDraggables[newIndex + 1];\n    }\n\n    // If we didn't find a new position reference, it means that either the item didn't start off\n    // in this container, or that the item requested to be inserted at the end of the list.\n    if (\n      !newPositionReference &&\n      (newIndex == null ||\n        newIndex === -1 ||\n        newIndex < activeDraggables.length - 1) &&\n      this._shouldEnterAsFirstChild(pointerX, pointerY)\n    ) {\n      newPositionReference = activeDraggables[0];\n    }\n\n    // Since the item may be in the `activeDraggables` already (e.g. if the user dragged it\n    // into another container and back again), we have to ensure that it isn't duplicated.\n    if (currentIndex > -1) {\n      activeDraggables.splice(currentIndex, 1);\n    }\n\n    // Don't use items that are being dragged as a reference, because\n    // their element has been moved down to the bottom of the body.\n    if (\n      newPositionReference &&\n      !this._dragDropRegistry.isDragging(newPositionReference)\n    ) {\n\n      const element = newPositionReference.getRootElement();\n      element.parentElement!.insertBefore(placeholder, element);\n      activeDraggables.splice(newIndex, 0, item);\n    } else {\n      coerceElement(this._element).appendChild(placeholder);\n      activeDraggables.push(item);\n    }\n\n    // The transform needs to be cleared so it doesn't throw off the measurements.\n    placeholder.style.transform = '';\n\n    // Note that usually `start` is called together with `enter` when an item goes into a new\n    // container. This will cache item positions, but we need to refresh them since the amount\n    // of items has changed.\n    this._cacheItemPositions();\n  }\n\n  /**\n   * Called when an item is being nested into the another item.\n   * @param item Item that was nested into the target item.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param nestIndex Target Index at which the item will be neste. If omitted, the container will try to figure it\n   *   out automatically.\n   */\n  nest(item: T, nestIndex: number, currentNestIndex: number): void {\n    if (nestIndex == currentNestIndex)\n      return;\n\n    let nestPositionReference: T | undefined = this._itemPositions[nestIndex].drag;\n\n    if (nestPositionReference === item) {\n      return;\n    }\n    if (currentNestIndex >= 0) {\n      // this.unnest(item, currentNestIndex);\n    }\n\n    const placeholder = item.getPlaceholderElement();\n\n    // Don't use items that are being dragged as a reference, because\n    // their element has been moved down to the bottom of the body.\n    if (\n      nestPositionReference &&\n      !this._dragDropRegistry.isDragging(nestPositionReference)\n    ) {\n\n      const element = nestPositionReference.getRootElement();\n      element.appendChild(placeholder);\n\n      this._itemPositions.forEach((item, index) => {\n        item.drag.getRootElement().style.transform = \"\";\n      });\n\n    }\n\n    placeholder.style.transform = '';\n\n  }\n\n  unnest(item: T, nestIndex: number): void {\n    // const activeDraggables = this.getItemIndex(item);\n    if (nestIndex >= this._itemPositions.length || nestIndex < 0)\n      return;\n\n    const currentIndex = this.getItemIndex(item);\n\n    const placeholder = item.getPlaceholderElement();\n\n    let nestPositionReference: T | undefined = this._itemPositions[nestIndex]!.drag;\n    let parent = nestPositionReference!.getRootElement().parentElement;\n\n    if (nestPositionReference === item) {\n      return;\n    }\n\n    // Don't use items that are being dragged as a reference, because\n    // their element has been moved down to the bottom of the body.\n    if (\n      nestPositionReference &&\n      !this._dragDropRegistry.isDragging(nestPositionReference)\n    ) {\n\n      const element = nestPositionReference.getRootElement();\n      element.removeChild(element.lastChild as Node);\n\n      if (parent) {\n        parent.insertBefore(placeholder, parent.children[currentIndex]);\n      }\n\n    }\n\n    // The transform needs to be cleared so it doesn't throw off the measurements.\n    placeholder.style.transform = '';\n\n    // Note that usually `start` is called together with `enter` when an item goes into a new\n    // container. This will cache item positions, but we need to refresh them since the amount\n    // of items has changed.\n  }\n\n  /** Sets the items that are currently part of the list. */\n  withItems(items: readonly T[]): void {\n    this._activeDraggables = items.slice();\n    this._cacheItemPositions();\n  }\n\n  /** Assigns a sort predicate to the strategy. */\n  withSortPredicate(predicate: SortPredicate<T>): void {\n    this._sortPredicate = predicate;\n  }\n\n  /** Resets the strategy to its initial state before dragging was started. */\n  reset() {\n    // TODO(crisbeto): may have to wait for the animations to finish.\n    this._activeDraggables.forEach((item) => {\n      const rootElement = item.getRootElement();\n\n      if (rootElement) {\n        const initialTransform = this._itemPositions.find(\n          (p) => p.drag === item\n        )?.initialTransform;\n        rootElement.style.transform = initialTransform || '';\n      }\n    });\n\n    this._itemPositions = [];\n    this._activeDraggables = [];\n    this._previousSwap.drag = null;\n    this._previousSwap.delta = 0;\n    this._previousSwap.overlaps = false;\n  }\n\n  /**\n   * Gets a snapshot of items currently in the list.\n   * Can include items that we dragged in from another list.\n   */\n  getActiveItemsSnapshot(): readonly T[] {\n    return this._activeDraggables;\n  }\n\n  /** Gets the index of a specific item. */\n  getItemIndex(item: T): number {\n    // Items are sorted always by top/left in the cache, however they flow differently in RTL.\n    // The rest of the logic still stands no matter what orientation we're in, however\n    // we need to invert the array when determining the index.\n    const items =\n      this.orientation === 'horizontal' && this.direction === 'rtl'\n        ? this._itemPositions.slice().reverse()\n        : this._itemPositions;\n\n    return items.findIndex((currentItem) => currentItem.drag === item);\n  }\n\n  /** Used to notify the strategy that the scroll position has changed. */\n  updateOnScroll(topDifference: number, leftDifference: number) {\n    // Since we know the amount that the user has scrolled we can shift all of the\n    // client rectangles ourselves. This is cheaper than re-measuring everything and\n    // we can avoid inconsistent behavior where we might be measuring the element before\n    // its position has changed.\n    this._itemPositions.forEach(({ clientRect }) => {\n      adjustClientRect(clientRect, topDifference, leftDifference);\n    });\n\n    // We need two loops for this, because we want all of the cached\n    // positions to be up-to-date before we re-sort the item.\n    this._itemPositions.forEach(({ drag }) => {\n      if (this._dragDropRegistry.isDragging(drag)) {\n        // We need to re-sort the item manually, because the pointer move\n        // events won't be dispatched while the user is scrolling.\n        drag._sortFromLastPointerPosition();\n      }\n    });\n  }\n\n  /** Refreshes the position cache of the items and sibling containers. */\n  private _cacheItemPositions() {\n    const isHorizontal = this.orientation === 'horizontal';\n\n    this._itemPositions = this._activeDraggables\n      .map((drag) => {\n        const elementToMeasure = drag.getVisibleElement();\n        return {\n          drag,\n          offset: 0,\n          initialTransform: elementToMeasure.style.transform || '',\n          clientRect: getMutableClientRect(elementToMeasure),\n        };\n      })\n      .sort((a, b) => {\n        return isHorizontal\n          ? a.clientRect.left - b.clientRect.left\n          : a.clientRect.top - b.clientRect.top;\n      });\n  }\n\n  /**\n   * Gets the offset in pixels by which the item that is being dragged should be moved.\n   * @param currentPosition Current position of the item.\n   * @param newPosition Position of the item where the current item should be moved.\n   * @param delta Direction in which the user is moving.\n   */\n  private _getItemOffsetPx(\n    currentPosition: ClientRect,\n    newPosition: ClientRect,\n    delta: 1 | -1\n  ) {\n    const isHorizontal = this.orientation === 'horizontal';\n    let itemOffset = isHorizontal\n      ? newPosition.left - currentPosition.left\n      : newPosition.top - currentPosition.top;\n\n    // Account for differences in the item width/height.\n    if (delta === -1) {\n      itemOffset += isHorizontal\n        ? newPosition.width - currentPosition.width\n        : newPosition.height - currentPosition.height;\n    }\n\n    return itemOffset;\n  }\n\n  /**\n   * Gets the offset in pixels by which the items that aren't being dragged should be moved.\n   * @param currentIndex Index of the item currently being dragged.\n   * @param siblings All of the items in the list.\n   * @param delta Direction in which the user is moving.\n   */\n  private _getSiblingOffsetPx(\n    currentIndex: number,\n    siblings: CachedItemPosition<T>[],\n    delta: 1 | -1\n  ) {\n    const isHorizontal = this.orientation === 'horizontal';\n    const currentPosition = siblings[currentIndex].clientRect;\n    const immediateSibling = siblings[currentIndex + delta * -1];\n    let siblingOffset =\n      currentPosition[isHorizontal ? 'width' : 'height'] * delta;\n\n    if (immediateSibling) {\n      const start = isHorizontal ? 'left' : 'top';\n      const end = isHorizontal ? 'right' : 'bottom';\n\n      // Get the spacing between the start of the current item and the end of the one immediately\n      // after it in the direction in which the user is dragging, or vice versa. We add it to the\n      // offset in order to push the element to where it will be when it's inline and is influenced\n      // by the `margin` of its siblings.\n      if (delta === -1) {\n        siblingOffset -=\n          immediateSibling.clientRect[start] - currentPosition[end];\n      } else {\n        siblingOffset +=\n          currentPosition[start] - immediateSibling.clientRect[end];\n      }\n    }\n\n    return siblingOffset;\n  }\n\n  /**\n   * Checks if pointer is entering in the first position\n   * @param pointerX Position of the user's pointer along the X axis.\n   * @param pointerY Position of the user's pointer along the Y axis.\n   */\n  private _shouldEnterAsFirstChild(pointerX: number, pointerY: number) {\n    if (!this._activeDraggables.length) {\n      return false;\n    }\n\n    const itemPositions = this._itemPositions;\n    const isHorizontal = this.orientation === 'horizontal';\n\n    // `itemPositions` are sorted by position while `activeDraggables` are sorted by child index\n    // check if container is using some sort of \"reverse\" ordering (eg: flex-direction: row-reverse)\n    const reversed = itemPositions[0].drag !== this._activeDraggables[0];\n    if (reversed) {\n      const lastItemRect = itemPositions[itemPositions.length - 1].clientRect;\n      return isHorizontal\n        ? pointerX >= lastItemRect.right\n        : pointerY >= lastItemRect.bottom;\n    } else {\n      const firstItemRect = itemPositions[0].clientRect;\n      return isHorizontal\n        ? pointerX <= firstItemRect.left\n        : pointerY <= firstItemRect.top;\n    }\n  }\n\n  /**\n   *\n   * @returns ClientRect values of all items\n   */\n  public getItemBoundaries(): ClientRect[] {\n    return this._itemPositions.map(({ drag, clientRect }) => clientRect);\n  }\n\n  /**\n   * Gets the index of an item in the drop container, based on the position of the user's pointer.\n   * @param item Item that is being sorted.\n   * @param pointerX Position of the user's pointer along the X axis.\n   * @param pointerY Position of the user's pointer along the Y axis.\n   * @param delta Direction in which the user is moving their pointer.\n   */\n  private _getItemIndexFromPointerPosition(\n    item: T,\n    pointerX: number,\n    pointerY: number,\n    delta?: { x: number; y: number }\n  ): number {\n    const isHorizontal = this.orientation === 'horizontal';\n    const index = this._itemPositions.findIndex(({ drag, clientRect }) => {\n      // Skip the item itself.\n      if (drag === item) {\n        return false;\n      }\n\n      if (delta) {\n        const direction = isHorizontal ? delta.x : delta.y;\n\n        // If the user is still hovering over the same item as last time, their cursor hasn't left\n        // the item after we made the swap, and they didn't change the direction in which they're\n        // dragging, we don't consider it a direction swap.\n        if (\n          drag === this._previousSwap.drag &&\n          this._previousSwap.overlaps &&\n          direction === this._previousSwap.delta\n        ) {\n          return false;\n        }\n      }\n\n      return isHorizontal\n        ? // Round these down since most browsers report client rects with\n        // sub-pixel precision, whereas the pointer coordinates are rounded to pixels.\n        pointerX >= Math.floor(clientRect.left) &&\n        pointerX < Math.floor(clientRect.right)\n        : pointerY >= Math.floor(clientRect.top) &&\n        pointerY < Math.floor(clientRect.bottom);\n    });\n\n    return index === -1 || !this._sortPredicate(index, item) ? -1 : index;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { ElementRef, NgZone } from '@angular/core';\nimport { Direction } from '@angular/cdk/bidi';\nimport { coerceElement } from '@angular/cdk/coercion';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport { _getShadowRoot } from '@angular/cdk/platform';\nimport { Subject, Subscription, interval, animationFrameScheduler } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { DragDropRegistry } from './drag-drop-registry';\nimport type { DragRef, DragNestInfo, Point } from './drag-ref';\nimport { isPointerNearClientRect, isInsideClientRect } from './dom/client-rect';\nimport { ParentPositionTracker } from './dom/parent-position-tracker';\nimport { DragCSSStyleDeclaration } from './dom/styling';\nimport { DropListSortStrategy } from './sorting/drop-list-sort-strategy';\nimport { SingleAxisSortStrategy } from './sorting/single-axis-sort-strategy';\nimport { CdkDrag, CdkDropList } from './public-api';\nimport { getTransformTransitionDurationInMs } from './dom/transition-duration';\n\n/**\n * Proximity, as a ratio to width/height, at which a\n * dragged item will affect the drop container.\n */\nconst DROP_PROXIMITY_THRESHOLD = 0.05;\n\n/**\n * Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the\n * viewport. The value comes from trying it out manually until it feels right.\n */\nconst SCROLL_PROXIMITY_THRESHOLD = 0.05;\n\n/** Vertical direction in which we can auto-scroll. */\nconst enum AutoScrollVerticalDirection {\n  NONE,\n  UP,\n  DOWN,\n}\n\n/** Horizontal direction in which we can auto-scroll. */\nconst enum AutoScrollHorizontalDirection {\n  NONE,\n  LEFT,\n  RIGHT,\n}\n\ntype RootNode = DocumentOrShadowRoot & {\n  // As of TS 4.4 the built in DOM typings don't include `elementFromPoint` on `ShadowRoot`,\n  // even though it exists (see https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot).\n  // This type is a utility to avoid having to add casts everywhere.\n  elementFromPoint(x: number, y: number): Element | null;\n};\n\n/**\n * Reference to a drop list. Used to manipulate or dispose of the container.\n */\nexport class DropListRef<T = any> {\n  /** Element that the drop list is attached to. */\n  element: HTMLElement | ElementRef<HTMLElement>;\n\n  /** Whether starting a dragging sequence from this container is disabled. */\n  disabled: boolean = false;\n\n  /** Whether sorting items within the list is disabled. */\n  sortingDisabled: boolean = false;\n\n  /** Locks the position of the draggable elements inside the container along the specified axis. */\n  lockAxis: 'x' | 'y';\n\n  /**\n   * Whether auto-scrolling the view when the user\n   * moves their pointer close to the edges is disabled.\n   */\n  autoScrollDisabled: boolean = false;\n\n  /** Number of pixels to scroll for each frame when auto-scrolling an element. */\n  autoScrollStep: number = 2;\n\n  // R2M start\n  nestEnabled: boolean = true;\n\n  nestThreshold: number = 0.5;\n\n  dropGutterSize: number = 0;\n  // R2M end\n\n  /**\n   * Function that is used to determine whether an item\n   * is allowed to be moved into a drop container.\n   */\n  enterPredicate: (drag: DragRef, drop: DropListRef) => boolean = () => true;\n\n  /** Function that is used to determine whether an item can be sorted into a particular index. */\n  sortPredicate: (index: number, drag: DragRef, drop: DropListRef) => boolean =\n    () => true;\n\n  /** Emits right before dragging has started. */\n  readonly beforeStarted = new Subject<void>();\n\n  /**\n   * Emits when the user has moved a new drag item into this container.\n   */\n  readonly entered = new Subject<{\n    item: DragRef;\n    container: DropListRef;\n    currentIndex: number;\n  }>();\n\n  /**\n   * Emits when the user removes an item from the container\n   * by dragging it into another container.\n   */\n  readonly exited = new Subject<{ item: DragRef; container: DropListRef }>();\n\n  // R2M start\n  /**\n   * Emits when the user has moved a new drag item into this container.\n   */\n  readonly nested = new Subject<{\n    item: DragRef;\n    container: DropListRef;\n    nestIndex: number\n  }>();\n  // R2M end\n\n\n  /** Emits when the user drops an item inside the container. */\n  readonly dropped = new Subject<{\n    item: DragRef;\n    currentIndex: number;\n    previousIndex: number;\n    container: DropListRef;\n    previousContainer: DropListRef;\n    isPointerOverContainer: boolean;\n    distance: Point;\n    dropPoint: Point;\n    event: MouseEvent | TouchEvent;\n    nestInfo: DragNestInfo | null | undefined\n  }>();\n\n  /** Emits as the user is swapping items while actively dragging. */\n  readonly sorted = new Subject<{\n    previousIndex: number;\n    currentIndex: number;\n    container: DropListRef;\n    item: DragRef;\n  }>();\n\n  /** Emits when a dragging sequence is started in a list connected to the current one. */\n  readonly receivingStarted = new Subject<{\n    receiver: DropListRef;\n    initiator: DropListRef;\n    items: DragRef[];\n  }>();\n\n  /** Emits when a dragging sequence is stopped from a list connected to the current one. */\n  readonly receivingStopped = new Subject<{\n    receiver: DropListRef;\n    initiator: DropListRef;\n  }>();\n\n  /** Arbitrary data that can be attached to the drop list. */\n  data: T;\n\n  /** Whether an item in the list is being dragged. */\n  private _isDragging = false;\n\n  /** Keeps track of the positions of any parent scrollable elements. */\n  private _parentPositions: ParentPositionTracker;\n\n  /** Strategy being used to sort items within the list. */\n  private _sortStrategy: DropListSortStrategy<DragRef>;\n\n  /** Cached `ClientRect` of the drop list. */\n  private _clientRect: ClientRect | undefined;\n\n  /** Draggable items in the container. */\n  private _draggables: readonly DragRef[] = [];\n\n  /** Drop lists that are connected to the current one. */\n  private _siblings: readonly DropListRef[] = [];\n\n  /** Connected siblings that currently have a dragged item. */\n  private _activeSiblings = new Set<DropListRef>();\n\n  /** Subscription to the window being scrolled. */\n  private _viewportScrollSubscription = Subscription.EMPTY;\n\n  /** Vertical direction in which the list is currently scrolling. */\n  private _verticalScrollDirection = AutoScrollVerticalDirection.NONE;\n\n  /** Horizontal direction in which the list is currently scrolling. */\n  private _horizontalScrollDirection = AutoScrollHorizontalDirection.NONE;\n\n  /** Node that is being auto-scrolled. */\n  private _scrollNode: HTMLElement | Window;\n\n  /** Used to signal to the current auto-scroll sequence when to stop. */\n  private readonly _stopScrollTimers = new Subject<void>();\n\n  /** Shadow root of the current element. Necessary for `elementFromPoint` to resolve correctly. */\n  private _cachedShadowRoot: RootNode | null = null;\n\n  /** Reference to the document. */\n  private _document: Document;\n\n  /** Elements that can be scrolled while the user is dragging. */\n  private _scrollableElements: HTMLElement[];\n\n  /** Initial value for the element's `scroll-snap-type` style. */\n  private _initialScrollSnap: string;\n\n  constructor(\n    element: ElementRef<HTMLElement> | HTMLElement,\n    private _dragDropRegistry: DragDropRegistry<DragRef, DropListRef>,\n    _document: any,\n    private _ngZone: NgZone,\n    private _viewportRuler: ViewportRuler\n  ) {\n    this.element = coerceElement(element);\n    this._document = _document;\n    this.withScrollableParents([this.element]);\n    _dragDropRegistry.registerDropContainer(this);\n    this._parentPositions = new ParentPositionTracker(_document);\n    this._sortStrategy = new SingleAxisSortStrategy(\n      this.element,\n      _dragDropRegistry\n    );\n    this._sortStrategy.withSortPredicate((index, item) =>\n      this.sortPredicate(index, item, this)\n    );\n  }\n\n  /** Removes the drop list functionality from the DOM element. */\n  dispose() {\n    this._stopScrolling();\n    this._stopScrollTimers.complete();\n    this._viewportScrollSubscription.unsubscribe();\n    this.beforeStarted.complete();\n    this.entered.complete();\n    // R2M start\n    this.nested.complete();\n    // R2M end\n    this.exited.complete();\n    this.dropped.complete();\n    this.sorted.complete();\n    this.receivingStarted.complete();\n    this.receivingStopped.complete();\n    this._activeSiblings.clear();\n    this._scrollNode = null!;\n    this._parentPositions.clear();\n    this._dragDropRegistry.removeDropContainer(this);\n  }\n\n  /** Whether an item from this list is currently being dragged. */\n  isDragging() {\n    return this._isDragging;\n  }\n\n  /** Starts dragging an item. */\n  start(): void {\n    this._draggingStarted();\n    this._notifyReceivingSiblings();\n  }\n\n  /**\n   * Attempts to move an item into the container.\n   * @param item Item that was moved into the container.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param index Index at which the item entered. If omitted, the container will try to figure it\n   *   out automatically.\n   */\n  enter(\n    item: DragRef,\n    pointerX: number,\n    pointerY: number,\n    index?: number\n  ): void {\n\n    this._draggingStarted();\n\n    // If sorting is disabled, we want the item to return to its starting\n    // position if the user is returning it to its initial container.\n    if (index == null && this.sortingDisabled) {\n      index = this._draggables.indexOf(item);\n    }\n\n    this._sortStrategy.enter(item, pointerX, pointerY, index);\n\n    // Note that this usually happens inside `_draggingStarted` as well, but the dimensions\n    // can change when the sort strategy moves the item around inside `enter`.\n    this._cacheParentPositions();\n\n    // Notify siblings at the end so that the item has been inserted into the `activeDraggables`.\n    this._notifyReceivingSiblings();\n    this.entered.next({\n      item,\n      container: this,\n      currentIndex: this.getItemIndex(item),\n    });\n  }\n\n  /**\n   * Removes an item from the container after it was dragged into another container by the user.\n   * @param item Item that was dragged out.\n   */\n  exit(item: DragRef): void {\n    this._reset();\n    this.exited.next({ item, container: this });\n  }\n\n  // R2M start\n  _unnestIfNecessary(item: DragRef): void {\n\n    if (item.nestInfo && item.nestInfo.nestIndex !== -1) {\n      let targetItem = this._draggables[item.nestInfo.nestIndex];\n\n      this._sortStrategy.unnest(item, this._sortStrategy.getItemIndex(targetItem));\n      item.nestInfo = null;\n    }\n  }\n  // R2M end\n\n  /**\n   * Drops an item into this container.\n   * @param item Item being dropped into the container.\n   * @param currentIndex Index at which the item should be inserted.\n   * @param previousIndex Index of the item when dragging started.\n   * @param previousContainer Container from which the item got dragged in.\n   * @param isPointerOverContainer Whether the user's pointer was over the\n   *    container when the item was dropped.\n   * @param distance Distance the user has dragged since the start of the dragging sequence.\n   * @param event Event that triggered the dropping sequence.\n   *\n   * @breaking-change 15.0.0 `previousIndex` and `event` parameters to become required.\n   */\n  drop(\n    item: DragRef,\n    currentIndex: number,\n    previousIndex: number,\n    previousContainer: DropListRef,\n    isPointerOverContainer: boolean,\n    distance: Point,\n    dropPoint: Point,\n    event: MouseEvent | TouchEvent = {} as any,\n    nestInfo: DragNestInfo | null | undefined // added by R2M for nesting item\n  ): void {\n    this._reset();\n    this.dropped.next({\n      item,\n      currentIndex,\n      previousIndex,\n      container: this,\n      previousContainer,\n      isPointerOverContainer,\n      distance,\n      dropPoint,\n      event,\n      nestInfo\n    });\n  }\n\n  /**\n   * Sets the draggable items that are a part of this list.\n   * @param items Items that are a part of this list.\n   */\n  withItems(items: DragRef[]): this {\n    const previousItems = this._draggables;\n    this._draggables = items;\n    items.forEach((item) => item._withDropContainer(this));\n\n    if (this.isDragging()) {\n      const draggedItems = previousItems.filter((item) => item.isDragging());\n\n      // If all of the items being dragged were removed\n      // from the list, abort the current drag sequence.\n      if (draggedItems.every((item) => items.indexOf(item) === -1)) {\n        this._reset();\n      } else {\n        this._sortStrategy.withItems(this._draggables);\n      }\n    }\n\n    return this;\n  }\n\n  /** Sets the layout direction of the drop list. */\n  withDirection(direction: Direction): this {\n    this._sortStrategy.direction = direction;\n    return this;\n  }\n\n  /**\n   * Sets the containers that are connected to this one. When two or more containers are\n   * connected, the user will be allowed to transfer items between them.\n   * @param connectedTo Other containers that the current containers should be connected to.\n   */\n  connectedTo(connectedTo: DropListRef[]): this {\n    this._siblings = connectedTo.slice();\n    return this;\n  }\n\n  /**\n   * Sets the orientation of the container.\n   * @param orientation New orientation for the container.\n   */\n  withOrientation(orientation: 'vertical' | 'horizontal'): this {\n    // TODO(crisbeto): eventually we should be constructing the new sort strategy here based on\n    // the new orientation. For now we can assume that it'll always be `SingleAxisSortStrategy`.\n    (this._sortStrategy as SingleAxisSortStrategy<DragRef>).orientation =\n      orientation;\n    return this;\n  }\n\n  /**\n   * Sets which parent elements are can be scrolled while the user is dragging.\n   * @param elements Elements that can be scrolled.\n   */\n  withScrollableParents(elements: HTMLElement[]): this {\n    const element = coerceElement(this.element);\n\n    // We always allow the current element to be scrollable\n    // so we need to ensure that it's in the array.\n    this._scrollableElements =\n      elements.indexOf(element) === -1\n        ? [element, ...elements]\n        : elements.slice();\n    return this;\n  }\n\n  /** Gets the scrollable parents that are registered with this drop container. */\n  getScrollableParents(): readonly HTMLElement[] {\n    return this._scrollableElements;\n  }\n\n  /**\n   * Figures out the index of an item in the container.\n   * @param item Item whose index should be determined.\n   */\n  getItemIndex(item: DragRef): number {\n    return this._isDragging\n      ? this._sortStrategy.getItemIndex(item)\n      : this._draggables.indexOf(item);\n  }\n\n  /**\n   * Whether the list is able to receive the item that\n   * is currently being dragged inside a connected drop list.\n   */\n  isReceiving(): boolean {\n    return this._activeSiblings.size > 0;\n  }\n\n  /**\n   * create DropList inside an element of a list item if nessary,\n   * nest DragRef item into this created DropList\n   * @param item \n   * @param nestIndex \n   */\n  _nestItem(item: DragRef, nestIndex: number): void {\n    let targetItem = this._draggables[nestIndex];\n    \n    this._sortStrategy.nest(item, this._sortStrategy.getItemIndex(targetItem), item.nestInfo ? item.nestInfo.nestIndex : -1);\n    this._animatePlaceholder(item);\n\n\n    this.nested.next({\n      item,\n      container: this,\n      nestIndex: nestIndex,\n    });\n    // R2M end\n  }\n\n  \n\n  _isInGutter(\n    item: DragRef,\n    pointerX: number,\n    pointerY: number\n  ): boolean {\n\n    let currentIndex = this._sortStrategy.getItemIndex(item);\n\n    let itemRects = (this._sortStrategy as SingleAxisSortStrategy<DragRef>).getItemBoundaries();\n    let index = itemRects.findIndex((rect, index) => {\n      return index !== currentIndex && Math.floor(rect.top) <= pointerY && Math.floor(rect.bottom) >= pointerY\n    });\n\n    if (this._siblings.indexOf(this) < this.dropGutterSize && index == -1) {\n      const firstDragRect = itemRects[0];\n      if (firstDragRect) {\n        if (pointerY > firstDragRect.top)\n          return true;\n\n      }\n\n    }\n\n    return false;\n  }\n\n  /**\n   * Checks if an item is inside name field of leaf node of the list\n   * returns the index of list into which DragRef item will be nested\n   * @param item Item to be nested.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param pointerDelta Direction in which the pointer is moving along each axis.\n   */\n  _getNestIndex(\n    item: DragRef,\n    pointerX: number,\n    pointerY: number,\n    previewRect: ClientRect,\n    pointerDelta: { x: number; y: number }\n  ): number {\n    // threshold value of left position of pointer for nesting item. \n    // threshold * left + (1 - threshold) * right < pointer's left ===> NESTING!!!!\n    let thresholdNest = 0.5;\n\n    // Don't nest the item if nesting is disabled or it's out of range.\n\n    if (\n      !this.nestEnabled ||\n      !this._clientRect ||\n      !isPointerNearClientRect(\n        this._clientRect,\n        DROP_PROXIMITY_THRESHOLD,\n        pointerX,\n        pointerY\n      )\n    ) {\n      return -1;\n    }\n\n    let currentIndex = this._sortStrategy.getItemIndex(item);\n\n\n\n    // let isVertical = (this._sortStrategy as SingleAxisSortStrategy<DragRef>).orientation === 'vertical';\n    let isVertical = true;\n    let itemRects = (this._sortStrategy as SingleAxisSortStrategy<DragRef>).getItemBoundaries();\n\n    let index = isVertical ? itemRects.findIndex((rect, index) => {\n\n      return index !== currentIndex && Math.floor(rect.top) <= pointerY && Math.floor(rect.bottom) >= pointerY\n    }) : itemRects.findIndex((rect, index) => {\n      return index !== currentIndex && rect.left < pointerX && rect.right > pointerX\n    });\n\n\n    if (index == -1)\n      return -1;\n\n    if (isVertical && previewRect.x > itemRects[index].left) {\n      return this._draggables.indexOf(this._sortStrategy.getActiveItem(index));\n\n    }\n\n    if (!isVertical && pointerX < itemRects[index].left * thresholdNest + itemRects[index].right * (1 - thresholdNest)) {\n      return index;\n    }\n\n    return -1;\n  }\n\n  /**\n   * Sorts an item inside the container based on its position.\n   * @param item Item to be sorted.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param pointerDelta Direction in which the pointer is moving along each axis.\n   */\n  _sortItem(\n    item: DragRef,\n    pointerX: number,\n    pointerY: number,\n    pointerDelta: { x: number; y: number }\n  ): void {\n    // Don't sort the item if sorting is disabled or it's out of range.\n    if (\n      this.sortingDisabled ||\n      !this._clientRect ||\n      !isPointerNearClientRect(\n        this._clientRect,\n        DROP_PROXIMITY_THRESHOLD,\n        pointerX,\n        pointerY\n      )\n    ) {\n      return;\n    }\n\n    const result = this._sortStrategy.sort(\n      item,\n      pointerX,\n      pointerY,\n      pointerDelta\n    );\n\n    if (result) {\n      this._animatePlaceholder(item);\n      this.sorted.next({\n        previousIndex: result.previousIndex,\n        currentIndex: result.currentIndex,\n        container: this,\n        item,\n      });\n    }\n  }\n\n  _animatePlaceholder(item: DragRef\n  ) {\n    const afterRect = item.getPlaceholderElement().getBoundingClientRect();\n    if ( item.animPlaceholder) {\n      item.animPlaceholder.style.left = `${afterRect.x + window.scrollX}px`;\n      item.animPlaceholder.style.top = `${afterRect.y + window.scrollY}px`;\n      item.animPlaceholder.style.width = `${afterRect.width}px`;\n      item.animPlaceholder.style.height = `${afterRect.height}px`;\n    }\n  }\n\n  /**\n   * Returns clientRect of this DropListRef\n   */\n  getClientRect(): ClientRect | undefined {\n    return this._clientRect;\n\n  }\n\n  /**\n   * Checks whether the user's pointer is close to the edges of either the\n   * viewport or the drop list and starts the auto-scroll sequence.\n   * @param pointerX User's pointer position along the x axis.\n   * @param pointerY User's pointer position along the y axis.\n   */\n  _startScrollingIfNecessary(pointerX: number, pointerY: number) {\n    if (this.autoScrollDisabled) {\n      return;\n    }\n\n    let scrollNode: HTMLElement | Window | undefined;\n    let verticalScrollDirection = AutoScrollVerticalDirection.NONE;\n    let horizontalScrollDirection = AutoScrollHorizontalDirection.NONE;\n\n    // Check whether we should start scrolling any of the parent containers.\n    this._parentPositions.positions.forEach((position, element) => {\n      // We have special handling for the `document` below. Also this would be\n      // nicer with a  for...of loop, but it requires changing a compiler flag.\n      if (element === this._document || !position.clientRect || scrollNode) {\n        return;\n      }\n\n      if (\n        isPointerNearClientRect(\n          position.clientRect,\n          DROP_PROXIMITY_THRESHOLD,\n          pointerX,\n          pointerY\n        )\n      ) {\n        [verticalScrollDirection, horizontalScrollDirection] =\n          getElementScrollDirections(\n            element as HTMLElement,\n            position.clientRect,\n            pointerX,\n            pointerY\n          );\n\n        if (verticalScrollDirection || horizontalScrollDirection) {\n          scrollNode = element as HTMLElement;\n        }\n      }\n    });\n\n    // Otherwise check if we can start scrolling the viewport.\n    if (!verticalScrollDirection && !horizontalScrollDirection) {\n      const { width, height } = this._viewportRuler.getViewportSize();\n      const clientRect = {\n        width,\n        height,\n        top: 0,\n        right: width,\n        bottom: height,\n        left: 0,\n      } as ClientRect;\n      verticalScrollDirection = getVerticalScrollDirection(\n        clientRect,\n        pointerY\n      );\n      horizontalScrollDirection = getHorizontalScrollDirection(\n        clientRect,\n        pointerX\n      );\n      scrollNode = window;\n    }\n\n    if (\n      scrollNode &&\n      (verticalScrollDirection !== this._verticalScrollDirection ||\n        horizontalScrollDirection !== this._horizontalScrollDirection ||\n        scrollNode !== this._scrollNode)\n    ) {\n      this._verticalScrollDirection = verticalScrollDirection;\n      this._horizontalScrollDirection = horizontalScrollDirection;\n      this._scrollNode = scrollNode;\n\n      if (\n        (verticalScrollDirection || horizontalScrollDirection) &&\n        scrollNode\n      ) {\n        this._ngZone.runOutsideAngular(this._startScrollInterval);\n      } else {\n        this._stopScrolling();\n      }\n    }\n  }\n\n  /** Stops any currently-running auto-scroll sequences. */\n  _stopScrolling() {\n    this._stopScrollTimers.next();\n  }\n\n  /** Starts the dragging sequence within the list. */\n  private _draggingStarted() {\n    const styles = coerceElement(this.element).style as DragCSSStyleDeclaration;\n    this.beforeStarted.next();\n    this._isDragging = true;\n\n    // We need to disable scroll snapping while the user is dragging, because it breaks automatic\n    // scrolling. The browser seems to round the value based on the snapping points which means\n    // that we can't increment/decrement the scroll position.\n    this._initialScrollSnap =\n      styles.msScrollSnapType || styles.scrollSnapType || '';\n    styles.scrollSnapType = styles.msScrollSnapType = 'none';\n    this._sortStrategy.start(this._draggables);\n    this._cacheParentPositions();\n    this._viewportScrollSubscription.unsubscribe();\n    this._listenToScrollEvents();\n  }\n\n  /** Caches the positions of the configured scrollable parents. */\n  private _cacheParentPositions() {\n    const element = coerceElement(this.element);\n    this._parentPositions.cache(this._scrollableElements);\n\n    // The list element is always in the `scrollableElements`\n    // so we can take advantage of the cached `ClientRect`.\n    this._clientRect =\n      this._parentPositions.positions.get(element)!.clientRect!;\n  }\n\n  /** Resets the container to its initial state. */\n  private _reset() {\n    this._isDragging = false;\n\n    const styles = coerceElement(this.element).style as DragCSSStyleDeclaration;\n    styles.scrollSnapType = styles.msScrollSnapType = this._initialScrollSnap;\n\n    this._siblings.forEach((sibling) => sibling._stopReceiving(this));\n    this._sortStrategy.reset();\n    this._stopScrolling();\n    this._viewportScrollSubscription.unsubscribe();\n    this._parentPositions.clear();\n  }\n\n  /** Starts the interval that'll auto-scroll the element. */\n  private _startScrollInterval = () => {\n    this._stopScrolling();\n\n    interval(0, animationFrameScheduler)\n      .pipe(takeUntil(this._stopScrollTimers))\n      .subscribe(() => {\n        const node = this._scrollNode;\n        const scrollStep = this.autoScrollStep;\n\n        if (this._verticalScrollDirection === AutoScrollVerticalDirection.UP) {\n          node.scrollBy(0, -scrollStep);\n        } else if (\n          this._verticalScrollDirection === AutoScrollVerticalDirection.DOWN\n        ) {\n          node.scrollBy(0, scrollStep);\n        }\n\n        if (\n          this._horizontalScrollDirection === AutoScrollHorizontalDirection.LEFT\n        ) {\n          node.scrollBy(-scrollStep, 0);\n        } else if (\n          this._horizontalScrollDirection ===\n          AutoScrollHorizontalDirection.RIGHT\n        ) {\n          node.scrollBy(scrollStep, 0);\n        }\n      });\n  };\n\n  /**\n   * Checks whether the user's pointer is positioned over the container.\n   * @param x Pointer position along the X axis.\n   * @param y Pointer position along the Y axis.\n   */\n  _isOverContainer(x: number, y: number): boolean {\n    return (\n      this._clientRect != null && isInsideClientRect(this._clientRect, x, y)\n    );\n  }\n\n  /**\n   * Figures out whether an item should be moved into a sibling\n   * drop container, based on its current position.\n   * @param item Drag item that is being moved.\n   * @param x Position of the item along the X axis.\n   * @param y Position of the item along the Y axis.\n   */\n  _getSiblingContainerFromPosition(\n    item: DragRef,\n    x: number,\n    y: number\n  ): DropListRef | undefined {\n    // R2M start\n    let siblingContainers = this._siblings.filter((sibling) => sibling._canReceive(item, x, y));\n\n    let topContainer = this._siblings[0];\n\n    let distMin = -99999;\n    let nearestContainer = undefined;\n    // find the nearest parent of this container\n    for (let container of siblingContainers) {\n      let top = container._clientRect?.top ? container._clientRect.top : -99999;\n\n      if (top > distMin) {\n        distMin = top;\n        nearestContainer = container;\n      }\n    }\n\n\n\n    return nearestContainer;\n    // R2M end\n\n\n  }\n\n  /**\n   * Checks whether the drop list can receive the passed-in item.\n   * @param item Item that is being dragged into the list.\n   * @param x Position of the item along the X axis.\n   * @param y Position of the item along the Y axis.\n   */\n  _canReceive(item: DragRef, x: number, y: number): boolean {\n    if (\n      !this._clientRect ||\n      !isInsideClientRect(this._clientRect, x, y) ||\n      !this.enterPredicate(item, this)\n    ) {\n      return false;\n    }\n\n    const elementFromPoint = this._getShadowRoot().elementFromPoint(\n      x,\n      y\n    ) as HTMLElement | null;\n\n    // If there's no element at the pointer position, then\n    // the client rect is probably scrolled out of the view.\n    if (!elementFromPoint) {\n      return false;\n    }\n\n    const nativeElement = coerceElement(this.element);\n\n    // The `ClientRect`, that we're using to find the container over which the user is\n    // hovering, doesn't give us any information on whether the element has been scrolled\n    // out of the view or whether it's overlapping with other containers. This means that\n    // we could end up transferring the item into a container that's invisible or is positioned\n    // below another one. We use the result from `elementFromPoint` to get the top-most element\n    // at the pointer position and to find whether it's one of the intersecting drop containers.\n    return (\n      elementFromPoint === nativeElement ||\n      nativeElement.contains(elementFromPoint)\n    );\n  }\n\n  /**\n   * Called by one of the connected drop lists when a dragging sequence has started.\n   * @param sibling Sibling in which dragging has started.\n   */\n  _startReceiving(sibling: DropListRef, items: DragRef[]) {\n    const activeSiblings = this._activeSiblings;\n\n    if (\n      !activeSiblings.has(sibling) &&\n      items.every((item) => {\n        // Note that we have to add an exception to the `enterPredicate` for items that started off\n        // in this drop list. The drag ref has logic that allows an item to return to its initial\n        // container, if it has left the initial container and none of the connected containers\n        // allow it to enter. See `DragRef._updateActiveDropContainer` for more context.\n        return (\n          this.enterPredicate(item, this) || this._draggables.indexOf(item) > -1\n        );\n      })\n    ) {\n      activeSiblings.add(sibling);\n      this._cacheParentPositions();\n      this._listenToScrollEvents();\n      this.receivingStarted.next({\n        initiator: sibling,\n        receiver: this,\n        items,\n      });\n    }\n  }\n\n  /**\n   * Called by a connected drop list when dragging has stopped.\n   * @param sibling Sibling whose dragging has stopped.\n   */\n  _stopReceiving(sibling: DropListRef) {\n    this._activeSiblings.delete(sibling);\n    this._viewportScrollSubscription.unsubscribe();\n    this.receivingStopped.next({ initiator: sibling, receiver: this });\n  }\n\n  /**\n   * Starts listening to scroll events on the viewport.\n   * Used for updating the internal state of the list.\n   */\n  private _listenToScrollEvents() {\n    this._viewportScrollSubscription = this._dragDropRegistry\n      .scrolled(this._getShadowRoot())\n      .subscribe((event) => {\n        if (this.isDragging()) {\n          const scrollDifference = this._parentPositions.handleScroll(event);\n\n          if (scrollDifference) {\n            this._sortStrategy.updateOnScroll(\n              scrollDifference.top,\n              scrollDifference.left\n            );\n          }\n        } else if (this.isReceiving()) {\n          this._cacheParentPositions();\n        }\n      });\n  }\n\n  /**\n   * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n   * than saving it in property directly on init, because we want to resolve it as late as possible\n   * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n   * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n   */\n  private _getShadowRoot(): RootNode {\n    if (!this._cachedShadowRoot) {\n      const shadowRoot = _getShadowRoot(coerceElement(this.element));\n      this._cachedShadowRoot = (shadowRoot || this._document) as RootNode;\n    }\n\n    return this._cachedShadowRoot;\n  }\n\n  /** Notifies any siblings that may potentially receive the item. */\n  private _notifyReceivingSiblings() {\n    const draggedItems = this._sortStrategy\n      .getActiveItemsSnapshot()\n      .filter((item) => item.isDragging());\n    this._siblings.forEach((sibling) =>\n      sibling._startReceiving(this, draggedItems)\n    );\n  }\n}\n\n/**\n * Gets whether the vertical auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getVerticalScrollDirection(clientRect: ClientRect, pointerY: number) {\n  const { top, bottom, height } = clientRect;\n  const yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;\n\n  if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {\n    return AutoScrollVerticalDirection.UP;\n  } else if (\n    pointerY >= bottom - yThreshold &&\n    pointerY <= bottom + yThreshold\n  ) {\n    return AutoScrollVerticalDirection.DOWN;\n  }\n\n  return AutoScrollVerticalDirection.NONE;\n}\n\n/**\n * Gets whether the horizontal auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerX Position of the user's pointer along the x axis.\n */\nfunction getHorizontalScrollDirection(\n  clientRect: ClientRect,\n  pointerX: number\n) {\n  const { left, right, width } = clientRect;\n  const xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;\n\n  if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {\n    return AutoScrollHorizontalDirection.LEFT;\n  } else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {\n    return AutoScrollHorizontalDirection.RIGHT;\n  }\n\n  return AutoScrollHorizontalDirection.NONE;\n}\n\n/**\n * Gets the directions in which an element node should be scrolled,\n * assuming that the user's pointer is already within it scrollable region.\n * @param element Element for which we should calculate the scroll direction.\n * @param clientRect Bounding client rectangle of the element.\n * @param pointerX Position of the user's pointer along the x axis.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getElementScrollDirections(\n  element: HTMLElement,\n  clientRect: ClientRect,\n  pointerX: number,\n  pointerY: number\n): [AutoScrollVerticalDirection, AutoScrollHorizontalDirection] {\n  const computedVertical = getVerticalScrollDirection(clientRect, pointerY);\n  const computedHorizontal = getHorizontalScrollDirection(clientRect, pointerX);\n  let verticalScrollDirection = AutoScrollVerticalDirection.NONE;\n  let horizontalScrollDirection = AutoScrollHorizontalDirection.NONE;\n\n  // Note that we here we do some extra checks for whether the element is actually scrollable in\n  // a certain direction and we only assign the scroll direction if it is. We do this so that we\n  // can allow other elements to be scrolled, if the current element can't be scrolled anymore.\n  // This allows us to handle cases where the scroll regions of two scrollable elements overlap.\n  if (computedVertical) {\n    const scrollTop = element.scrollTop;\n\n    if (computedVertical === AutoScrollVerticalDirection.UP) {\n      if (scrollTop > 0) {\n        verticalScrollDirection = AutoScrollVerticalDirection.UP;\n      }\n    } else if (element.scrollHeight - scrollTop > element.clientHeight) {\n      verticalScrollDirection = AutoScrollVerticalDirection.DOWN;\n    }\n  }\n\n  if (computedHorizontal) {\n    const scrollLeft = element.scrollLeft;\n\n    if (computedHorizontal === AutoScrollHorizontalDirection.LEFT) {\n      if (scrollLeft > 0) {\n        horizontalScrollDirection = AutoScrollHorizontalDirection.LEFT;\n      }\n    } else if (element.scrollWidth - scrollLeft > element.clientWidth) {\n      horizontalScrollDirection = AutoScrollHorizontalDirection.RIGHT;\n    }\n  }\n\n  return [verticalScrollDirection, horizontalScrollDirection];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, NgZone, OnDestroy, Inject} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {normalizePassiveListenerOptions} from '@angular/cdk/platform';\nimport {merge, Observable, Observer, Subject} from 'rxjs';\n\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = normalizePassiveListenerOptions({\n  passive: false,\n  capture: true,\n});\n\n/**\n * Service that keeps track of all the drag item and drop container\n * instances, and manages global event listeners on the `document`.\n * @docs-private\n */\n// Note: this class is generic, rather than referencing CdkDrag and CdkDropList directly, in order\n// to avoid circular imports. If we were to reference them here, importing the registry into the\n// classes that are registering themselves will introduce a circular import.\n@Injectable({providedIn: 'root'})\nexport class DragDropRegistry<I extends {isDragging(): boolean}, C> implements OnDestroy {\n  private _document: Document;\n\n  /** Registered drop container instances. */\n  private _dropInstances = new Set<C>();\n\n  /** Registered drag item instances. */\n  private _dragInstances = new Set<I>();\n\n  /** Drag item instances that are currently being dragged. */\n  private _activeDragInstances: I[] = [];\n\n  /** Keeps track of the event listeners that we've bound to the `document`. */\n  private _globalListeners = new Map<\n    string,\n    {\n      handler: (event: Event) => void;\n      options?: AddEventListenerOptions | boolean;\n    }\n  >();\n\n  /**\n   * Predicate function to check if an item is being dragged.  Moved out into a property,\n   * because it'll be called a lot and we don't want to create a new function every time.\n   */\n  private _draggingPredicate = (item: I) => item.isDragging();\n\n  /**\n   * Emits the `touchmove` or `mousemove` events that are dispatched\n   * while the user is dragging a drag item instance.\n   */\n  readonly pointerMove: Subject<TouchEvent | MouseEvent> = new Subject<TouchEvent | MouseEvent>();\n\n  /**\n   * Emits the `touchend` or `mouseup` events that are dispatched\n   * while the user is dragging a drag item instance.\n   */\n  readonly pointerUp: Subject<TouchEvent | MouseEvent> = new Subject<TouchEvent | MouseEvent>();\n\n  /**\n   * Emits when the viewport has been scrolled while the user is dragging an item.\n   * @deprecated To be turned into a private member. Use the `scrolled` method instead.\n   * @breaking-change 13.0.0\n   */\n  readonly scroll: Subject<Event> = new Subject<Event>();\n\n  constructor(private _ngZone: NgZone, @Inject(DOCUMENT) _document: any) {\n    this._document = _document;\n  }\n\n  /** Adds a drop container to the registry. */\n  registerDropContainer(drop: C) {\n    if (!this._dropInstances.has(drop)) {\n      this._dropInstances.add(drop);\n    }\n  }\n\n  /** Adds a drag item instance to the registry. */\n  registerDragItem(drag: I) {\n    this._dragInstances.add(drag);\n\n    // The `touchmove` event gets bound once, ahead of time, because WebKit\n    // won't preventDefault on a dynamically-added `touchmove` listener.\n    // See https://bugs.webkit.org/show_bug.cgi?id=184250.\n    if (this._dragInstances.size === 1) {\n      this._ngZone.runOutsideAngular(() => {\n        // The event handler has to be explicitly active,\n        // because newer browsers make it passive by default.\n        this._document.addEventListener(\n          'touchmove',\n          this._persistentTouchmoveListener,\n          activeCapturingEventOptions,\n        );\n      });\n    }\n  }\n\n  /** Removes a drop container from the registry. */\n  removeDropContainer(drop: C) {\n    this._dropInstances.delete(drop);\n  }\n\n  /** Removes a drag item instance from the registry. */\n  removeDragItem(drag: I) {\n    this._dragInstances.delete(drag);\n    this.stopDragging(drag);\n\n    if (this._dragInstances.size === 0) {\n      this._document.removeEventListener(\n        'touchmove',\n        this._persistentTouchmoveListener,\n        activeCapturingEventOptions,\n      );\n    }\n  }\n\n  /**\n   * Starts the dragging sequence for a drag instance.\n   * @param drag Drag instance which is being dragged.\n   * @param event Event that initiated the dragging.\n   */\n  startDragging(drag: I, event: TouchEvent | MouseEvent) {\n    // Do not process the same drag twice to avoid memory leaks and redundant listeners\n    if (this._activeDragInstances.indexOf(drag) > -1) {\n      return;\n    }\n\n    this._activeDragInstances.push(drag);\n\n    if (this._activeDragInstances.length === 1) {\n      const isTouchEvent = event.type.startsWith('touch');\n\n      // We explicitly bind __active__ listeners here, because newer browsers will default to\n      // passive ones for `mousemove` and `touchmove`. The events need to be active, because we\n      // use `preventDefault` to prevent the page from scrolling while the user is dragging.\n      this._globalListeners\n        .set(isTouchEvent ? 'touchend' : 'mouseup', {\n          handler: (e: Event) => this.pointerUp.next(e as TouchEvent | MouseEvent),\n          options: true,\n        })\n        .set('scroll', {\n          handler: (e: Event) => this.scroll.next(e),\n          // Use capturing so that we pick up scroll changes in any scrollable nodes that aren't\n          // the document. See https://github.com/angular/components/issues/17144.\n          options: true,\n        })\n        // Preventing the default action on `mousemove` isn't enough to disable text selection\n        // on Safari so we need to prevent the selection event as well. Alternatively this can\n        // be done by setting `user-select: none` on the `body`, however it has causes a style\n        // recalculation which can be expensive on pages with a lot of elements.\n        .set('selectstart', {\n          handler: this._preventDefaultWhileDragging,\n          options: activeCapturingEventOptions,\n        });\n\n      // We don't have to bind a move event for touch drag sequences, because\n      // we already have a persistent global one bound from `registerDragItem`.\n      if (!isTouchEvent) {\n        this._globalListeners.set('mousemove', {\n          handler: (e: Event) => this.pointerMove.next(e as MouseEvent),\n          options: activeCapturingEventOptions,\n        });\n      }\n\n      this._ngZone.runOutsideAngular(() => {\n        this._globalListeners.forEach((config, name) => {\n          this._document.addEventListener(name, config.handler, config.options);\n        });\n      });\n    }\n  }\n\n  /** Stops dragging a drag item instance. */\n  stopDragging(drag: I) {\n    const index = this._activeDragInstances.indexOf(drag);\n\n    if (index > -1) {\n      this._activeDragInstances.splice(index, 1);\n\n      if (this._activeDragInstances.length === 0) {\n        this._clearGlobalListeners();\n      }\n    }\n  }\n\n  /** Gets whether a drag item instance is currently being dragged. */\n  isDragging(drag: I) {\n    return this._activeDragInstances.indexOf(drag) > -1;\n  }\n\n  /**\n   * Gets a stream that will emit when any element on the page is scrolled while an item is being\n   * dragged.\n   * @param shadowRoot Optional shadow root that the current dragging sequence started from.\n   *   Top-level listeners won't pick up events coming from the shadow DOM so this parameter can\n   *   be used to include an additional top-level listener at the shadow root level.\n   */\n  scrolled(shadowRoot?: DocumentOrShadowRoot | null): Observable<Event> {\n    const streams: Observable<Event>[] = [this.scroll];\n\n    if (shadowRoot && shadowRoot !== this._document) {\n      // Note that this is basically the same as `fromEvent` from rxjs, but we do it ourselves,\n      // because we want to guarantee that the event is bound outside of the `NgZone`. With\n      // `fromEvent` it'll only happen if the subscription is outside the `NgZone`.\n      streams.push(\n        new Observable((observer: Observer<Event>) => {\n          return this._ngZone.runOutsideAngular(() => {\n            const eventOptions = true;\n            const callback = (event: Event) => {\n              if (this._activeDragInstances.length) {\n                observer.next(event);\n              }\n            };\n\n            (shadowRoot as ShadowRoot).addEventListener('scroll', callback, eventOptions);\n\n            return () => {\n              (shadowRoot as ShadowRoot).removeEventListener('scroll', callback, eventOptions);\n            };\n          });\n        }),\n      );\n    }\n\n    return merge(...streams);\n  }\n\n  ngOnDestroy() {\n    this._dragInstances.forEach(instance => this.removeDragItem(instance));\n    this._dropInstances.forEach(instance => this.removeDropContainer(instance));\n    this._clearGlobalListeners();\n    this.pointerMove.complete();\n    this.pointerUp.complete();\n  }\n\n  /**\n   * Event listener that will prevent the default browser action while the user is dragging.\n   * @param event Event whose default action should be prevented.\n   */\n  private _preventDefaultWhileDragging = (event: Event) => {\n    if (this._activeDragInstances.length > 0) {\n      event.preventDefault();\n    }\n  };\n\n  /** Event listener for `touchmove` that is bound even if no dragging is happening. */\n  private _persistentTouchmoveListener = (event: TouchEvent) => {\n    if (this._activeDragInstances.length > 0) {\n      // Note that we only want to prevent the default action after dragging has actually started.\n      // Usually this is the same time at which the item is added to the `_activeDragInstances`,\n      // but it could be pushed back if the user has set up a drag delay or threshold.\n      if (this._activeDragInstances.some(this._draggingPredicate)) {\n        event.preventDefault();\n      }\n\n      this.pointerMove.next(event);\n    }\n  };\n\n  /** Clears out the global event listeners from the `document`. */\n  private _clearGlobalListeners() {\n    this._globalListeners.forEach((config, name) => {\n      this._document.removeEventListener(name, config.handler, config.options);\n    });\n\n    this._globalListeners.clear();\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { Injectable, Inject, NgZone, ElementRef } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport { DragRef, DragRefConfig } from './drag-ref';\nimport { DropListRef } from './drop-list-ref';\nimport { DragDropRegistry } from './drag-drop-registry';\n\n/** Default configuration to be used when creating a `DragRef`. */\nconst DEFAULT_CONFIG = {\n  dragStartThreshold: 5,\n  pointerDirectionChangeThreshold: 5,\n};\n\n/**\n * Service that allows for drag-and-drop functionality to be attached to DOM elements.\n */\n@Injectable({ providedIn: 'root' })\nexport class DragDrop {\n  constructor(\n    @Inject(DOCUMENT) private _document: any,\n    private _ngZone: NgZone,\n    private _viewportRuler: ViewportRuler,\n    private _dragDropRegistry: DragDropRegistry<DragRef, DropListRef>\n  ) {}\n\n  /**\n   * Turns an element into a draggable item.\n   * @param element Element to which to attach the dragging functionality.\n   * @param config Object used to configure the dragging behavior.\n   */\n  createDrag<T = any>(\n    element: ElementRef<HTMLElement> | HTMLElement,\n    config: DragRefConfig = DEFAULT_CONFIG\n  ): DragRef<T> {\n    return new DragRef<T>(\n      element,\n      config,\n      this._document,\n      this._ngZone,\n      this._viewportRuler,\n      this._dragDropRegistry\n    );\n  }\n\n  /**\n   * Turns an element into a drop list.\n   * @param element Element to which to attach the drop list functionality.\n   */\n  createDropList<T = any>(\n    element: ElementRef<HTMLElement> | HTMLElement\n  ): DropListRef<T> {\n    return new DropListRef<T>(\n      element,\n      this._dragDropRegistry,\n      this._document,\n      this._ngZone,\n      this._viewportRuler\n    );\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/**\n * Injection token that can be used for a `CdkDrag` to provide itself as a parent to the\n * drag-specific child directive (`CdkDragHandle`, `CdkDragPreview` etc.). Used primarily\n * to avoid circular imports.\n * @docs-private\n */\nexport const CDK_DRAG_PARENT = new InjectionToken<{}>('CDK_DRAG_PARENT');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport type { CdkDrag } from './directives/drag';\nimport type { CdkDropList } from './directives/drop-list';\nimport { CdkDropDownItem } from './drag-drop-tree';\nimport { DragNestInfo } from './drag-ref';\n\n/** Event emitted when the user starts dragging a draggable. */\nexport interface CdkDragStart<T = any> {\n  /** Draggable that emitted the event. */\n  source: CdkDrag<T>;\n  /** Native event that started the drag sequence. */\n  event: MouseEvent | TouchEvent;\n}\n\n/** Event emitted when the user releases an item, before any animations have started. */\nexport interface CdkDragRelease<T = any> {\n  /** Draggable that emitted the event. */\n  source: CdkDrag<T>;\n  /** Native event that caused the release event. */\n  event: MouseEvent | TouchEvent;\n}\n\n/** Event emitted when the user stops dragging a draggable. */\nexport interface CdkDragEnd<T = any> {\n  /** Draggable that emitted the event. */\n  source: CdkDrag<T>;\n  /** Distance in pixels that the user has dragged since the drag sequence started. */\n  distance: {x: number; y: number};\n  /** Position where the pointer was when the item was dropped */\n  dropPoint: {x: number; y: number};\n  /** Native event that caused the dragging to stop. */\n  event: MouseEvent | TouchEvent;\n}\n\n/** Event emitted when the user moves an item into a new drop container. */\nexport interface CdkDragEnter<T = any, I = T> {\n  /** Container into which the user has moved the item. */\n  container: CdkDropList<T>;\n  /** Item that was moved into the container. */\n  item: CdkDrag<I>;\n  /** Index at which the item has entered the container. */\n  currentIndex: number;\n}\n\n// R2M start\n/** Event emitted when the user moves an item into a new drop container. */\nexport interface CdkDragNest<T = any, I = T> {\n  /** Container into which the user has moved the item. */\n  container: CdkDropList<T>;\n  /** Item that was moved into the container. */\n  item: CdkDrag<I>;\n  /** Index at which the item has entered the container. */\n  nestIndex: number;\n}\n\nexport interface CdkNestDrop {\n  item : CdkDropDownItem,\n  parent? : CdkDropDownItem,\n  position?: number\n  isNesting : boolean,\n}\n\n// R2M end\n\n\n/**\n * Event emitted when the user removes an item from a\n * drop container by moving it into another one.\n */\nexport interface CdkDragExit<T = any, I = T> {\n  /** Container from which the user has a removed an item. */\n  container: CdkDropList<T>;\n  /** Item that was removed from the container. */\n  item: CdkDrag<I>;\n}\n\n/** Event emitted when the user drops a draggable item inside a drop container. */\nexport interface CdkDragDrop<T, O = T, I = any> {\n  /** Index of the item when it was picked up. */\n  previousIndex: number;\n  /** Current index of the item. */\n  currentIndex: number;\n  /** Item that is being dropped. */\n  item: CdkDrag<I>;\n  /** Container in which the item was dropped. */\n  container: CdkDropList<T>;\n  /** Container from which the item was picked up. Can be the same as the `container`. */\n  previousContainer: CdkDropList<O>;\n  /** Whether the user's pointer was over the container when the item was dropped. */\n  isPointerOverContainer: boolean;\n  /** Distance in pixels that the user has dragged since the drag sequence started. */\n  distance: {x: number; y: number};\n  /** Position where the pointer was when the item was dropped */\n  dropPoint: {x: number; y: number};\n  /** Native event that caused the drop event. */\n  event: MouseEvent | TouchEvent;\n  /** Nest Info for Drag Action */\n  nestInfo: DragNestInfo | null | undefined;\n}\n\n/** Event emitted as the user is dragging a draggable item. */\nexport interface CdkDragMove<T = any> {\n  /** Item that is being dragged. */\n  source: CdkDrag<T>;\n  /** Position of the user's pointer on the page. */\n  pointerPosition: {x: number; y: number};\n  /** Native event that is causing the dragging. */\n  event: MouseEvent | TouchEvent;\n  /** Distance in pixels that the user has dragged since the drag sequence started. */\n  distance: {x: number; y: number};\n  /**\n   * Indicates the direction in which the user is dragging the element along each axis.\n   * `1` means that the position is increasing (e.g. the user is moving to the right or downwards),\n   * whereas `-1` means that it's decreasing (they're moving to the left or upwards). `0` means\n   * that the position hasn't changed.\n   */\n  delta: {x: -1 | 0 | 1; y: -1 | 0 | 1};\n}\n\n/** Event emitted when the user swaps the position of two drag items. */\nexport interface CdkDragSortEvent<T = any, I = T> {\n  /** Index from which the item was sorted previously. */\n  previousIndex: number;\n  /** Index that the item is currently in. */\n  currentIndex: number;\n  /** Container that the item belongs to. */\n  container: CdkDropList<T>;\n  /** Item that is being sorted. */\n  item: CdkDrag<I>;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Asserts that a particular node is an element.\n * @param node Node to be checked.\n * @param name Name to attach to the error message.\n */\nexport function assertElementNode(node: Node, name: string): asserts node is HTMLElement {\n  if (node.nodeType !== 1) {\n    throw Error(\n      `${name} must be attached to an element node. ` + `Currently attached to \"${node.nodeName}\".`,\n    );\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n  Directive,\n  ElementRef,\n  Inject,\n  InjectionToken,\n  Input,\n  OnDestroy,\n  Optional,\n  SkipSelf,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { CDK_DRAG_PARENT } from '../drag-parent';\nimport { assertElementNode } from './assertions';\n\n/**\n * Injection token that can be used to reference instances of `CdkDragHandle`. It serves as\n * alternative token to the actual `CdkDragHandle` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DRAG_HANDLE = new InjectionToken<CdkDragHandle>(\n  'CdkDragHandle'\n);\n\n/** Handle that can be used to drag a CdkDrag instance. */\n@Directive({\n  selector: '[cdkDragHandle]',\n  standalone: true,\n  host: {\n    class: 'cdk-drag-handle',\n  },\n  providers: [{ provide: CDK_DRAG_HANDLE, useExisting: CdkDragHandle }],\n})\nexport class CdkDragHandle implements OnDestroy {\n  /** Closest parent draggable instance. */\n  _parentDrag: {} | undefined;\n\n  /** Emits when the state of the handle has changed. */\n  readonly _stateChanges = new Subject<CdkDragHandle>();\n\n  /** Whether starting to drag through this handle is disabled. */\n  @Input('cdkDragHandleDisabled')\n  get disabled(): boolean {\n    return this._disabled;\n  }\n  set disabled(value: BooleanInput) {\n    this._disabled = coerceBooleanProperty(value);\n    this._stateChanges.next(this);\n  }\n  private _disabled = false;\n\n  constructor(\n    public element: ElementRef<HTMLElement>,\n    @Inject(CDK_DRAG_PARENT) @Optional() @SkipSelf() parentDrag?: any\n  ) {\n\n    // TODO: remove all mentions of dev mode or integrate the CDK's ngDevMode\n    // if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      assertElementNode(element.nativeElement, 'cdkDragHandle');\n    // }\n\n    this._parentDrag = parentDrag;\n  }\n\n  ngOnDestroy() {\n    this._stateChanges.complete();\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef, Input, InjectionToken} from '@angular/core';\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPlaceholder`. It serves as\n * alternative token to the actual `CdkDragPlaceholder` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DRAG_PLACEHOLDER = new InjectionToken<CdkDragPlaceholder>('CdkDragPlaceholder');\n\n/**\n * Element that will be used as a template for the placeholder of a CdkDrag when\n * it is being dragged. The placeholder is displayed in place of the element being dragged.\n */\n@Directive({\n  selector: 'ng-template[cdkDragPlaceholder]',\n  standalone: true,\n  providers: [{provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder}],\n})\nexport class CdkDragPlaceholder<T = any> {\n  /** Context data to be added to the placeholder template instance. */\n  @Input() data: T;\n  constructor(public templateRef: TemplateRef<T>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Directive, InjectionToken, Input, TemplateRef} from '@angular/core';\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPreview`. It serves as\n * alternative token to the actual `CdkDragPreview` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DRAG_PREVIEW = new InjectionToken<CdkDragPreview>('CdkDragPreview');\n\n/**\n * Element that will be used as a template for the preview\n * of a CdkDrag when it is being dragged.\n */\n@Directive({\n  selector: 'ng-template[cdkDragPreview]',\n  standalone: true,\n  providers: [{provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview}],\n})\nexport class CdkDragPreview<T = any> {\n  /** Context data to be added to the preview template instance. */\n  @Input() data: T;\n\n  /** Whether the preview should preserve the same size as the item that is being dragged. */\n  @Input()\n  get matchSize(): boolean {\n    return this._matchSize;\n  }\n  set matchSize(value: BooleanInput) {\n    this._matchSize = coerceBooleanProperty(value);\n  }\n  private _matchSize = false;\n\n  constructor(public templateRef: TemplateRef<T>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport {DragRefConfig, Point, DragRef} from '../drag-ref';\n\n/** Possible values that can be used to configure the drag start delay. */\nexport type DragStartDelay = number | {touch: number; mouse: number};\n\n/** Possible axis along which dragging can be locked. */\nexport type DragAxis = 'x' | 'y';\n\n/** Function that can be used to constrain the position of a dragged element. */\nexport type DragConstrainPosition = (point: Point, dragRef: DragRef) => Point;\n\n/** Possible orientations for a drop list. */\nexport type DropListOrientation = 'horizontal' | 'vertical';\n\n/**\n * Injection token that can be used to configure the\n * behavior of the drag&drop-related components.\n */\nexport const CDK_DRAG_CONFIG = new InjectionToken<DragDropConfig>('CDK_DRAG_CONFIG');\n\n/**\n * Object that can be used to configure the drag\n * items and drop lists within a module or a component.\n */\nexport interface DragDropConfig extends Partial<DragRefConfig> {\n  lockAxis?: DragAxis;\n  dragStartDelay?: DragStartDelay;\n  constrainPosition?: DragConstrainPosition;\n  previewClass?: string | string[];\n  boundaryElement?: string;\n  rootElementSelector?: string;\n  draggingDisabled?: boolean;\n  sortingDisabled?: boolean;\n  listAutoScrollDisabled?: boolean;\n  listOrientation?: DropListOrientation;\n  zIndex?: number;\n  previewContainer?: 'global' | 'parent';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {DOCUMENT} from '@angular/common';\nimport {\n  AfterViewInit,\n  ContentChild,\n  ContentChildren,\n  Directive,\n  ElementRef,\n  EventEmitter,\n  Inject,\n  Input,\n  NgZone,\n  OnDestroy,\n  Optional,\n  Output,\n  QueryList,\n  SkipSelf,\n  ViewContainerRef,\n  OnChanges,\n  SimpleChanges,\n  ChangeDetectorRef,\n  Self,\n  InjectionToken,\n} from '@angular/core';\nimport {\n  coerceBooleanProperty,\n  coerceNumberProperty,\n  coerceElement,\n  BooleanInput,\n} from '@angular/cdk/coercion';\nimport {Observable, Observer, Subject, merge} from 'rxjs';\nimport {startWith, take, map, takeUntil, switchMap, tap} from 'rxjs/operators';\nimport type {\n  CdkDragDrop,\n  CdkDragEnd,\n  CdkDragEnter,\n  CdkDragExit,\n  CdkDragMove,\n  CdkDragStart,\n  CdkDragRelease,\n} from '../drag-events';\nimport {CDK_DRAG_HANDLE, CdkDragHandle} from './drag-handle';\nimport {CDK_DRAG_PLACEHOLDER, CdkDragPlaceholder} from './drag-placeholder';\nimport {CDK_DRAG_PREVIEW, CdkDragPreview} from './drag-preview';\nimport {CDK_DRAG_PARENT} from '../drag-parent';\nimport {DragRef, Point, PreviewContainer} from '../drag-ref';\nimport type {CdkDropList} from './drop-list';\nimport {DragDrop} from '../drag-drop';\nimport {CDK_DRAG_CONFIG, DragDropConfig, DragStartDelay, DragAxis} from './config';\nimport {assertElementNode} from './assertions';\n\nconst DRAG_HOST_CLASS = 'cdk-drag';\n\n/**\n * Injection token that can be used to reference instances of `CdkDropList`. It serves as\n * alternative token to the actual `CdkDropList` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DROP_LIST = new InjectionToken<CdkDropList>('CdkDropList');\n\n/** Element that can be moved inside a CdkDropList container. */\n@Directive({\n  selector: '[cdkDrag]',\n  exportAs: 'cdkDrag',\n  standalone: true,\n  host: {\n    'class': DRAG_HOST_CLASS,\n    '[class.cdk-drag-disabled]': 'disabled',\n    '[class.cdk-drag-dragging]': '_dragRef.isDragging()',\n  },\n  providers: [{provide: CDK_DRAG_PARENT, useExisting: CdkDrag}],\n})\nexport class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDestroy {\n  private readonly _destroyed = new Subject<void>();\n  private static _dragInstances: CdkDrag[] = [];\n\n  /** Reference to the underlying drag instance. */\n  _dragRef: DragRef<CdkDrag<T>>;\n\n  /** Elements that can be used to drag the draggable item. */\n  @ContentChildren(CDK_DRAG_HANDLE, {descendants: true}) _handles: QueryList<CdkDragHandle>;\n\n  /** Element that will be used as a template to create the draggable item's preview. */\n  @ContentChild(CDK_DRAG_PREVIEW) _previewTemplate: CdkDragPreview;\n\n  /** Template for placeholder element rendered to show where a draggable would be dropped. */\n  @ContentChild(CDK_DRAG_PLACEHOLDER) _placeholderTemplate: CdkDragPlaceholder;\n\n  /** Arbitrary data to attach to this drag instance. */\n  @Input('cdkDragData') data: T;\n\n  /** Locks the position of the dragged element along the specified axis. */\n  @Input('cdkDragLockAxis') lockAxis: DragAxis;\n\n  /**\n   * Selector that will be used to determine the root draggable element, starting from\n   * the `cdkDrag` element and going up the DOM. Passing an alternate root element is useful\n   * when trying to enable dragging on an element that you might not have access to.\n   */\n  @Input('cdkDragRootElement') rootElementSelector: string;\n\n  /**\n   * Node or selector that will be used to determine the element to which the draggable's\n   * position will be constrained. If a string is passed in, it'll be used as a selector that\n   * will be matched starting from the element's parent and going up the DOM until a match\n   * has been found.\n   */\n  @Input('cdkDragBoundary') boundaryElement: string | ElementRef<HTMLElement> | HTMLElement;\n\n  /**\n   * Amount of milliseconds to wait after the user has put their\n   * pointer down before starting to drag the element.\n   */\n  @Input('cdkDragStartDelay') dragStartDelay: DragStartDelay;\n\n  /**\n   * Sets the position of a `CdkDrag` that is outside of a drop container.\n   * Can be used to restore the element's position for a returning user.\n   */\n  @Input('cdkDragFreeDragPosition') freeDragPosition: Point;\n\n  /** Whether starting to drag this element is disabled. */\n  @Input('cdkDragDisabled')\n  get disabled(): boolean {\n    return this._disabled || (this.dropContainer && this.dropContainer.disabled);\n  }\n  set disabled(value: BooleanInput) {\n    this._disabled = coerceBooleanProperty(value);\n    this._dragRef.disabled = this._disabled;\n  }\n  private _disabled: boolean;\n\n  /**\n   * Function that can be used to customize the logic of how the position of the drag item\n   * is limited while it's being dragged. Gets called with a point containing the current position\n   * of the user's pointer on the page, a reference to the item being dragged and its dimensions.\n   * Should return a point describing where the item should be rendered.\n   */\n  @Input('cdkDragConstrainPosition') constrainPosition?: (\n    userPointerPosition: Point,\n    dragRef: DragRef,\n    dimensions: ClientRect,\n    pickupPositionInElement: Point,\n  ) => Point;\n\n  /** Class to be added to the preview element. */\n  @Input('cdkDragPreviewClass') previewClass: string | string[];\n\n  /**\n   * Configures the place into which the preview of the item will be inserted. Can be configured\n   * globally through `CDK_DROP_LIST`. Possible values:\n   * - `global` - Preview will be inserted at the bottom of the `<body>`. The advantage is that\n   * you don't have to worry about `overflow: hidden` or `z-index`, but the item won't retain\n   * its inherited styles.\n   * - `parent` - Preview will be inserted into the parent of the drag item. The advantage is that\n   * inherited styles will be preserved, but it may be clipped by `overflow: hidden` or not be\n   * visible due to `z-index`. Furthermore, the preview is going to have an effect over selectors\n   * like `:nth-child` and some flexbox configurations.\n   * - `ElementRef<HTMLElement> | HTMLElement` - Preview will be inserted into a specific element.\n   * Same advantages and disadvantages as `parent`.\n   */\n  @Input('cdkDragPreviewContainer') previewContainer: PreviewContainer;\n\n  /** Emits when the user starts dragging the item. */\n  @Output('cdkDragStarted') readonly started: EventEmitter<CdkDragStart> =\n    new EventEmitter<CdkDragStart>();\n\n  /** Emits when the user has released a drag item, before any animations have started. */\n  @Output('cdkDragReleased') readonly released: EventEmitter<CdkDragRelease> =\n    new EventEmitter<CdkDragRelease>();\n\n  /** Emits when the user stops dragging an item in the container. */\n  @Output('cdkDragEnded') readonly ended: EventEmitter<CdkDragEnd> = new EventEmitter<CdkDragEnd>();\n\n  /** Emits when the user has moved the item into a new container. */\n  @Output('cdkDragEntered') readonly entered: EventEmitter<CdkDragEnter<any>> = new EventEmitter<\n    CdkDragEnter<any>\n  >();\n\n  /** Emits when the user removes the item its container by dragging it into another container. */\n  @Output('cdkDragExited') readonly exited: EventEmitter<CdkDragExit<any>> = new EventEmitter<\n    CdkDragExit<any>\n  >();\n\n  /** Emits when the user drops the item inside a container. */\n  @Output('cdkDragDropped') readonly dropped: EventEmitter<CdkDragDrop<any>> = new EventEmitter<\n    CdkDragDrop<any>\n  >();\n\n  /**\n   * Emits as the user is dragging the item. Use with caution,\n   * because this event will fire for every pixel that the user has dragged.\n   */\n  @Output('cdkDragMoved')\n  readonly moved: Observable<CdkDragMove<T>> = new Observable(\n    (observer: Observer<CdkDragMove<T>>) => {\n      const subscription = this._dragRef.moved\n        .pipe(\n          map(movedEvent => ({\n            source: this,\n            pointerPosition: movedEvent.pointerPosition,\n            event: movedEvent.event,\n            delta: movedEvent.delta,\n            distance: movedEvent.distance,\n          })),\n        )\n        .subscribe(observer);\n\n      return () => {\n        subscription.unsubscribe();\n      };\n    },\n  );\n\n  constructor(\n    /** Element that the draggable is attached to. */\n    public element: ElementRef<HTMLElement>,\n    /** Droppable container that the draggable is a part of. */\n    @Inject(CDK_DROP_LIST) @Optional() @SkipSelf() public dropContainer: CdkDropList,\n    /**\n     * @deprecated `_document` parameter no longer being used and will be removed.\n     * @breaking-change 12.0.0\n     */\n    @Inject(DOCUMENT) _document: any,\n    private _ngZone: NgZone,\n    private _viewContainerRef: ViewContainerRef,\n    @Optional() @Inject(CDK_DRAG_CONFIG) config: DragDropConfig,\n    @Optional() private _dir: Directionality,\n    dragDrop: DragDrop,\n    private _changeDetectorRef: ChangeDetectorRef,\n    @Optional() @Self() @Inject(CDK_DRAG_HANDLE) private _selfHandle?: CdkDragHandle,\n    @Optional() @SkipSelf() @Inject(CDK_DRAG_PARENT) private _parentDrag?: CdkDrag,\n  ) {\n    this._dragRef = dragDrop.createDrag(element, {\n      dragStartThreshold:\n        config && config.dragStartThreshold != null ? config.dragStartThreshold : 5,\n      pointerDirectionChangeThreshold:\n        config && config.pointerDirectionChangeThreshold != null\n          ? config.pointerDirectionChangeThreshold\n          : 5,\n      zIndex: config?.zIndex,\n    });\n    this._dragRef.data = this;\n\n    // We have to keep track of the drag instances in order to be able to match an element to\n    // a drag instance. We can't go through the global registry of `DragRef`, because the root\n    // element could be different.\n    CdkDrag._dragInstances.push(this);\n\n    if (config) {\n      this._assignDefaults(config);\n    }\n\n    // Note that usually the container is assigned when the drop list is picks up the item, but in\n    // some cases (mainly transplanted views with OnPush, see #18341) we may end up in a situation\n    // where there are no items on the first change detection pass, but the items get picked up as\n    // soon as the user triggers another pass by dragging. This is a problem, because the item would\n    // have to switch from standalone mode to drag mode in the middle of the dragging sequence which\n    // is too late since the two modes save different kinds of information. We work around it by\n    // assigning the drop container both from here and the list.\n    if (dropContainer) {\n      this._dragRef._withDropContainer(dropContainer._dropListRef);\n      dropContainer.addItem(this);\n    }\n\n    this._syncInputs(this._dragRef);\n    this._handleEvents(this._dragRef);\n  }\n\n  /**\n   * Returns the element that is being used as a placeholder\n   * while the current element is being dragged.\n   */\n  getPlaceholderElement(): HTMLElement {\n    return this._dragRef.getPlaceholderElement();\n  }\n\n  /** Returns the root draggable element. */\n  getRootElement(): HTMLElement {\n    return this._dragRef.getRootElement();\n  }\n\n  /** Resets a standalone drag item to its initial position. */\n  reset(): void {\n    this._dragRef.reset();\n  }\n\n  /**\n   * Gets the pixel coordinates of the draggable outside of a drop container.\n   */\n  getFreeDragPosition(): Readonly<Point> {\n    return this._dragRef.getFreeDragPosition();\n  }\n\n  /**\n   * Sets the current position in pixels the draggable outside of a drop container.\n   * @param value New position to be set.\n   */\n  setFreeDragPosition(value: Point): void {\n    this._dragRef.setFreeDragPosition(value);\n  }\n\n  ngAfterViewInit() {\n    // Normally this isn't in the zone, but it can cause major performance regressions for apps\n    // using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.\n    this._ngZone.runOutsideAngular(() => {\n      // We need to wait for the zone to stabilize, in order for the reference\n      // element to be in the proper place in the DOM. This is mostly relevant\n      // for draggable elements inside portals since they get stamped out in\n      // their original DOM position and then they get transferred to the portal.\n      this._ngZone.onStable.pipe(take(1), takeUntil(this._destroyed)).subscribe(() => {\n        this._updateRootElement();\n        this._setupHandlesListener();\n\n        if (this.freeDragPosition) {\n          this._dragRef.setFreeDragPosition(this.freeDragPosition);\n        }\n      });\n    });\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    const rootSelectorChange = changes['rootElementSelector'];\n    const positionChange = changes['freeDragPosition'];\n\n    // We don't have to react to the first change since it's being\n    // handled in `ngAfterViewInit` where it needs to be deferred.\n    if (rootSelectorChange && !rootSelectorChange.firstChange) {\n      this._updateRootElement();\n    }\n\n    // Skip the first change since it's being handled in `ngAfterViewInit`.\n    if (positionChange && !positionChange.firstChange && this.freeDragPosition) {\n      this._dragRef.setFreeDragPosition(this.freeDragPosition);\n    }\n  }\n\n  ngOnDestroy() {\n    if (this.dropContainer) {\n      this.dropContainer.removeItem(this);\n    }\n\n    const index = CdkDrag._dragInstances.indexOf(this);\n    if (index > -1) {\n      CdkDrag._dragInstances.splice(index, 1);\n    }\n\n    // Unnecessary in most cases, but used to avoid extra change detections with `zone-paths-rxjs`.\n    this._ngZone.runOutsideAngular(() => {\n      this._destroyed.next();\n      this._destroyed.complete();\n      this._dragRef.dispose();\n    });\n  }\n\n  /** Syncs the root element with the `DragRef`. */\n  private _updateRootElement() {\n    const element = this.element.nativeElement as HTMLElement;\n    let rootElement = element;\n    if (this.rootElementSelector) {\n      rootElement =\n        element.closest !== undefined\n          ? (element.closest(this.rootElementSelector) as HTMLElement)\n          : // Comment tag doesn't have closest method, so use parent's one.\n            (element.parentElement?.closest(this.rootElementSelector) as HTMLElement);\n    }\n\n    // TODO: remove all mentions of dev mode or integrate the CDK's ngDevMode\n    // if (rootElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n    if (rootElement) {\n      assertElementNode(rootElement, 'cdkDrag');\n    }\n\n    this._dragRef.withRootElement(rootElement || element);\n  }\n\n  /** Gets the boundary element, based on the `boundaryElement` value. */\n  private _getBoundaryElement() {\n    const boundary = this.boundaryElement;\n\n    if (!boundary) {\n      return null;\n    }\n\n    if (typeof boundary === 'string') {\n      return this.element.nativeElement.closest<HTMLElement>(boundary);\n    }\n\n    return coerceElement(boundary);\n  }\n\n  /** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */\n  private _syncInputs(ref: DragRef<CdkDrag<T>>) {\n    ref.beforeStarted.subscribe(() => {\n      if (!ref.isDragging()) {\n        const dir = this._dir;\n        const dragStartDelay = this.dragStartDelay;\n        const placeholder = this._placeholderTemplate\n          ? {\n              template: this._placeholderTemplate.templateRef,\n              context: this._placeholderTemplate.data,\n              viewContainer: this._viewContainerRef,\n            }\n          : null;\n        const preview = this._previewTemplate\n          ? {\n              template: this._previewTemplate.templateRef,\n              context: this._previewTemplate.data,\n              matchSize: this._previewTemplate.matchSize,\n              viewContainer: this._viewContainerRef,\n            }\n          : null;\n\n        ref.disabled = this.disabled;\n        ref.lockAxis = this.lockAxis;\n        ref.dragStartDelay =\n          typeof dragStartDelay === 'object' && dragStartDelay\n            ? dragStartDelay\n            : coerceNumberProperty(dragStartDelay);\n        ref.constrainPosition = this.constrainPosition;\n        ref.previewClass = this.previewClass;\n        ref\n          .withBoundaryElement(this._getBoundaryElement())\n          .withPlaceholderTemplate(placeholder)\n          .withPreviewTemplate(preview)\n          .withPreviewContainer(this.previewContainer || 'global');\n\n        if (dir) {\n          ref.withDirection(dir.value);\n        }\n      }\n    });\n\n    // This only needs to be resolved once.\n    ref.beforeStarted.pipe(take(1)).subscribe(() => {\n      // If we managed to resolve a parent through DI, use it.\n      if (this._parentDrag) {\n        ref.withParent(this._parentDrag._dragRef);\n        return;\n      }\n\n      // Otherwise fall back to resolving the parent by looking up the DOM. This can happen if\n      // the item was projected into another item by something like `ngTemplateOutlet`.\n      let parent = this.element.nativeElement.parentElement;\n      while (parent) {\n        if (parent.classList.contains(DRAG_HOST_CLASS)) {\n          ref.withParent(\n            CdkDrag._dragInstances.find(drag => {\n              return drag.element.nativeElement === parent;\n            })?._dragRef || null,\n          );\n          break;\n        }\n        parent = parent.parentElement;\n      }\n    });\n  }\n\n  /** Handles the events from the underlying `DragRef`. */\n  private _handleEvents(ref: DragRef<CdkDrag<T>>) {\n    ref.started.subscribe(startEvent => {\n      this.started.emit({source: this, event: startEvent.event});\n\n      // Since all of these events run outside of change detection,\n      // we need to ensure that everything is marked correctly.\n      this._changeDetectorRef.markForCheck();\n    });\n\n    ref.released.subscribe(releaseEvent => {\n      this.released.emit({source: this, event: releaseEvent.event});\n    });\n\n    ref.ended.subscribe(endEvent => {\n      this.ended.emit({\n        source: this,\n        distance: endEvent.distance,\n        dropPoint: endEvent.dropPoint,\n        event: endEvent.event,\n      });\n\n      // Since all of these events run outside of change detection,\n      // we need to ensure that everything is marked correctly.\n      this._changeDetectorRef.markForCheck();\n    });\n\n    ref.entered.subscribe(enterEvent => {\n      this.entered.emit({\n        container: enterEvent.container.data,\n        item: this,\n        currentIndex: enterEvent.currentIndex,\n      });\n    });\n\n    ref.exited.subscribe(exitEvent => {\n      this.exited.emit({\n        container: exitEvent.container.data,\n        item: this,\n      });\n    });\n\n    ref.dropped.subscribe(dropEvent => {\n      this.dropped.emit({\n        previousIndex: dropEvent.previousIndex,\n        currentIndex: dropEvent.currentIndex,\n        previousContainer: dropEvent.previousContainer.data,\n        container: dropEvent.container.data,\n        isPointerOverContainer: dropEvent.isPointerOverContainer,\n        item: this,\n        distance: dropEvent.distance,\n        dropPoint: dropEvent.dropPoint,\n        event: dropEvent.event,\n        nestInfo: dropEvent.nestInfo\n      });\n    });\n  }\n\n  /** Assigns the default input values based on a provided config object. */\n  private _assignDefaults(config: DragDropConfig) {\n    const {\n      lockAxis,\n      dragStartDelay,\n      constrainPosition,\n      previewClass,\n      boundaryElement,\n      draggingDisabled,\n      rootElementSelector,\n      previewContainer,\n    } = config;\n\n    this.disabled = draggingDisabled == null ? false : draggingDisabled;\n    this.dragStartDelay = dragStartDelay || 0;\n\n    if (lockAxis) {\n      this.lockAxis = lockAxis;\n    }\n\n    if (constrainPosition) {\n      this.constrainPosition = constrainPosition;\n    }\n\n    if (previewClass) {\n      this.previewClass = previewClass;\n    }\n\n    if (boundaryElement) {\n      this.boundaryElement = boundaryElement;\n    }\n\n    if (rootElementSelector) {\n      this.rootElementSelector = rootElementSelector;\n    }\n\n    if (previewContainer) {\n      this.previewContainer = previewContainer;\n    }\n  }\n\n  /** Sets up the listener that syncs the handles with the drag ref. */\n  private _setupHandlesListener() {\n    // Listen for any newly-added handles.\n    this._handles.changes\n      .pipe(\n        startWith(this._handles),\n        // Sync the new handles with the DragRef.\n        tap((handles: QueryList<CdkDragHandle>) => {\n          const childHandleElements = handles\n            .filter(handle => handle._parentDrag === this)\n            .map(handle => handle.element);\n\n          // Usually handles are only allowed to be a descendant of the drag element, but if\n          // the consumer defined a different drag root, we should allow the drag element\n          // itself to be a handle too.\n          if (this._selfHandle && this.rootElementSelector) {\n            childHandleElements.push(this.element);\n          }\n\n          this._dragRef.withHandles(childHandleElements);\n        }),\n        // Listen if the state of any of the handles changes.\n        switchMap((handles: QueryList<CdkDragHandle>) => {\n          return merge(\n            ...handles.map(item => {\n              return item._stateChanges.pipe(startWith(item));\n            }),\n          ) as Observable<CdkDragHandle>;\n        }),\n        takeUntil(this._destroyed),\n      )\n      .subscribe(handleInstance => {\n        // Enabled/disable the handle that changed in the DragRef.\n        const dragRef = this._dragRef;\n        const handle = handleInstance.element.nativeElement;\n        handleInstance.disabled ? dragRef.disableHandle(handle) : dragRef.enableHandle(handle);\n      });\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, OnDestroy, Input, InjectionToken} from '@angular/core';\nimport {BooleanInput, NumberInput, coerceBooleanProperty} from '@angular/cdk/coercion';\n\n/**\n * Injection token that can be used to reference instances of `CdkDropListGroup`. It serves as\n * alternative token to the actual `CdkDropListGroup` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DROP_LIST_GROUP = new InjectionToken<CdkDropListGroup<unknown>>(\n  'CdkDropListGroup',\n);\n\n/**\n * Declaratively connects sibling `cdkDropList` instances together. All of the `cdkDropList`\n * elements that are placed inside a `cdkDropListGroup` will be connected to each other\n * automatically. Can be used as an alternative to the `cdkDropListConnectedTo` input\n * from `cdkDropList`.\n */\n@Directive({\n  selector: '[cdkDropListGroup]',\n  exportAs: 'cdkDropListGroup',\n  standalone: true,\n  providers: [{provide: CDK_DROP_LIST_GROUP, useExisting: CdkDropListGroup}],\n})\nexport class CdkDropListGroup<T> implements OnDestroy {\n  /** Drop lists registered inside the group. */\n  readonly _items = new Set<T>();\n\n  @Input('cdkDropGutterSize')\n  dropGutterSize: number;\n\n  /** Whether starting a dragging sequence from inside this group is disabled. */\n  @Input('cdkDropListGroupDisabled')\n  get disabled(): boolean {\n    return this._disabled;\n  }\n  set disabled(value: BooleanInput) {\n    this._disabled = coerceBooleanProperty(value);\n  }\n  private _disabled = false;\n\n  ngOnDestroy() {\n    this._items.clear();\n  }\n\n  \n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n  BooleanInput,\n  coerceArray,\n  coerceNumberProperty,\n  coerceBooleanProperty,\n  NumberInput,\n} from '@angular/cdk/coercion';\nimport {\n  ElementRef,\n  EventEmitter,\n  Input,\n  OnDestroy,\n  Output,\n  Optional,\n  Directive,\n  ChangeDetectorRef,\n  SkipSelf,\n  Inject,\n} from '@angular/core';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { ScrollDispatcher } from '@angular/cdk/scrolling';\nimport { CDK_DROP_LIST, CdkDrag } from './drag';\nimport { CdkDragDrop, CdkDragEnter, CdkDragNest, CdkDragExit, CdkDragSortEvent } from '../drag-events';\nimport { CDK_DROP_LIST_GROUP, CdkDropListGroup } from './drop-list-group';\nimport { DropListRef } from '../drop-list-ref';\nimport { DragRef } from '../drag-ref';\nimport { DragDrop } from '../drag-drop';\nimport { DropListOrientation, DragAxis, DragDropConfig, CDK_DRAG_CONFIG } from './config';\nimport { merge, Subject } from 'rxjs';\nimport { startWith, takeUntil } from 'rxjs/operators';\nimport { assertElementNode } from './assertions';\n\n/** Counter used to generate unique ids for drop zones. */\nlet _uniqueIdCounter = 0;\n\n/** Container that wraps a set of draggable items. */\n@Directive({\n  selector: '[cdkDropList], cdk-drop-list',\n  exportAs: 'cdkDropList',\n  standalone: true,\n  providers: [\n    // Prevent child drop lists from picking up the same group as their parent.\n    { provide: CDK_DROP_LIST_GROUP, useValue: undefined },\n    { provide: CDK_DROP_LIST, useExisting: CdkDropList },\n  ],\n  host: {\n    'class': 'cdk-drop-list',\n    '[attr.id]': 'id',\n    '[class.cdk-drop-list-disabled]': 'disabled',\n    '[class.cdk-drop-list-dragging]': '_dropListRef.isDragging()',\n    '[class.cdk-drop-list-receiving]': '_dropListRef.isReceiving()',\n  },\n})\nexport class CdkDropList<T = any> implements OnDestroy {\n  /** Emits when the list has been destroyed. */\n  private readonly _destroyed = new Subject<void>();\n\n  /** Whether the element's scrollable parents have been resolved. */\n  private _scrollableParentsResolved: boolean;\n\n  /** Keeps track of the drop lists that are currently on the page. */\n  private static _dropLists: CdkDropList[] = [];\n\n  /** Reference to the underlying drop list instance. */\n  _dropListRef: DropListRef<CdkDropList<T>>;\n\n  /**\n   * Other draggable containers that this container is connected to and into which the\n   * container's items can be transferred. Can either be references to other drop containers,\n   * or their unique IDs.\n   */\n  @Input('cdkDropListConnectedTo')\n  connectedTo: (CdkDropList | string)[] | CdkDropList | string = [];\n\n  /** Arbitrary data to attach to this container. */\n  @Input('cdkDropListData') data: T;\n\n  /** Direction in which the list is oriented. */\n  @Input('cdkDropListOrientation') orientation: DropListOrientation;\n\n  /**\n   * Unique ID for the drop zone. Can be used as a reference\n   * in the `connectedTo` of another `CdkDropList`.\n   */\n  @Input() id: string = `cdk-drop-list-${_uniqueIdCounter++}`;\n\n  /** Locks the position of the draggable elements inside the container along the specified axis. */\n  @Input('cdkDropListLockAxis') lockAxis: DragAxis;\n\n  /** Whether starting a dragging sequence from this container is disabled. */\n  @Input('cdkDropListDisabled')\n  get disabled(): boolean {\n    return this._disabled || (!!this._group && this._group.disabled);\n  }\n  set disabled(value: BooleanInput) {\n    // Usually we sync the directive and ref state right before dragging starts, in order to have\n    // a single point of failure and to avoid having to use setters for everything. `disabled` is\n    // a special case, because it can prevent the `beforeStarted` event from firing, which can lock\n    // the user in a disabled state, so we also need to sync it as it's being set.\n    this._dropListRef.disabled = this._disabled = coerceBooleanProperty(value);\n  }\n  private _disabled: boolean;\n\n  /** Whether sorting within this drop list is disabled. */\n  @Input('cdkDropListSortingDisabled')\n  sortingDisabled: BooleanInput;\n\n  /**\n   * Function that is used to determine whether an item\n   * is allowed to be moved into a drop container.\n   */\n  @Input('cdkDropListEnterPredicate')\n  enterPredicate: (drag: CdkDrag, drop: CdkDropList) => boolean = () => true;\n\n  /** Functions that is used to determine whether an item can be sorted into a particular index. */\n  @Input('cdkDropListSortPredicate')\n  sortPredicate: (index: number, drag: CdkDrag, drop: CdkDropList) => boolean = () => true;\n\n  /** Whether to auto-scroll the view when the user moves their pointer close to the edges. */\n  @Input('cdkDropListAutoScrollDisabled')\n  autoScrollDisabled: BooleanInput;\n\n  /** Number of pixels to scroll for each frame when auto-scrolling an element. */\n  @Input('cdkDropListAutoScrollStep')\n  autoScrollStep: NumberInput;\n  // R2M start\n  @Input('cdkDropListNestEnabled')\n  nestEnabled: BooleanInput;\n\n  @Input('cdkDropListNestThreshold')\n  nestThreshold: NumberInput;\n\n\n\n  // R2M end\n  /** Emits when the user drops an item inside the container. */\n  @Output('cdkDropListDropped')\n  readonly dropped: EventEmitter<CdkDragDrop<T, any>> = new EventEmitter<CdkDragDrop<T, any>>();\n\n  /**\n   * Emits when the user has moved a new drag item into this container.\n   */\n  @Output('cdkDropListEntered')\n  readonly entered: EventEmitter<CdkDragEnter<T>> = new EventEmitter<CdkDragEnter<T>>();\n\n  // R2M start\n  @Output('cdkDropListNested')\n  readonly nested: EventEmitter<CdkDragNest<T>> = new EventEmitter<CdkDragNest<T>>();\n  // R2M end\n  /**\n   * Emits when the user removes an item from the container\n   * by dragging it into another container.\n   */\n  @Output('cdkDropListExited')\n  readonly exited: EventEmitter<CdkDragExit<T>> = new EventEmitter<CdkDragExit<T>>();\n\n  /** Emits as the user is swapping items while actively dragging. */\n  @Output('cdkDropListSorted')\n  readonly sorted: EventEmitter<CdkDragSortEvent<T>> = new EventEmitter<CdkDragSortEvent<T>>();\n\n  /**\n   * Keeps track of the items that are registered with this container. Historically we used to\n   * do this with a `ContentChildren` query, however queries don't handle transplanted views very\n   * well which means that we can't handle cases like dragging the headers of a `mat-table`\n   * correctly. What we do instead is to have the items register themselves with the container\n   * and then we sort them based on their position in the DOM.\n   */\n  private _unsortedItems = new Set<CdkDrag>();\n\n  constructor(\n    /** Element that the drop list is attached to. */\n    public element: ElementRef<HTMLElement>,\n    dragDrop: DragDrop,\n    private _changeDetectorRef: ChangeDetectorRef,\n    private _scrollDispatcher: ScrollDispatcher,\n    @Optional() private _dir?: Directionality,\n    @Optional()\n    @Inject(CDK_DROP_LIST_GROUP)\n    @SkipSelf()\n    private _group?: CdkDropListGroup<CdkDropList>,\n    @Optional() @Inject(CDK_DRAG_CONFIG) config?: DragDropConfig,\n  ) {\n\n    // TODO: remove all mentions of dev mode or integrate the CDK's ngDevMode\n    // if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    assertElementNode(element.nativeElement, 'cdkDropList');\n    // }\n\n    this._dropListRef = dragDrop.createDropList(element);\n    this._dropListRef.data = this;\n\n    if (config) {\n      this._assignDefaults(config);\n    }\n\n    this._dropListRef.enterPredicate = (drag: DragRef<CdkDrag>, drop: DropListRef<CdkDropList>) => {\n      return this.enterPredicate(drag.data, drop.data);\n    };\n\n    this._dropListRef.sortPredicate = (\n      index: number,\n      drag: DragRef<CdkDrag>,\n      drop: DropListRef<CdkDropList>,\n    ) => {\n      return this.sortPredicate(index, drag.data, drop.data);\n    };\n\n    this._setupInputSyncSubscription(this._dropListRef);\n    this._handleEvents(this._dropListRef);\n    CdkDropList._dropLists.push(this);\n\n    if (_group) {\n      _group._items.add(this);\n    }\n  }\n\n  /** Registers an items with the drop list. */\n  addItem(item: CdkDrag): void {\n    this._unsortedItems.add(item);\n\n    if (this._dropListRef.isDragging()) {\n      this._syncItemsWithRef();\n    }\n  }\n\n  /** Removes an item from the drop list. */\n  removeItem(item: CdkDrag): void {\n    this._unsortedItems.delete(item);\n\n    if (this._dropListRef.isDragging()) {\n      this._syncItemsWithRef();\n    }\n  }\n\n  /** Gets the registered items in the list, sorted by their position in the DOM. */\n  getSortedItems(): CdkDrag[] {\n    return Array.from(this._unsortedItems).sort((a: CdkDrag, b: CdkDrag) => {\n      const documentPosition = a._dragRef\n        .getVisibleElement()\n        .compareDocumentPosition(b._dragRef.getVisibleElement());\n\n      // `compareDocumentPosition` returns a bitmask so we have to use a bitwise operator.\n      // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n      // tslint:disable-next-line:no-bitwise\n      return documentPosition & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n    });\n  }\n\n  ngOnDestroy() {\n    const index = CdkDropList._dropLists.indexOf(this);\n\n    if (index > -1) {\n      CdkDropList._dropLists.splice(index, 1);\n    }\n\n    if (this._group) {\n      this._group._items.delete(this);\n    }\n\n    this._unsortedItems.clear();\n    this._dropListRef.dispose();\n    this._destroyed.next();\n    this._destroyed.complete();\n  }\n\n  /** Syncs the inputs of the CdkDropList with the options of the underlying DropListRef. */\n  private _setupInputSyncSubscription(ref: DropListRef<CdkDropList>) {\n    if (this._dir) {\n      this._dir.change\n        .pipe(startWith(this._dir.value), takeUntil(this._destroyed))\n        .subscribe(value => ref.withDirection(value));\n    }\n\n    ref.beforeStarted.subscribe(() => {\n      const siblings = coerceArray(this.connectedTo).map(drop => {\n        if (typeof drop === 'string') {\n          const correspondingDropList = CdkDropList._dropLists.find(list => list.id === drop);\n\n          // TODO: remove all mentions of dev mode or integrate the CDK's ngDevMode\n          // if (!correspondingDropList && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n          if (!correspondingDropList) {\n            console.warn(`CdkDropList could not find connected drop list with id \"${drop}\"`);\n          }\n\n          return correspondingDropList!;\n        }\n\n        return drop;\n      });\n\n      if (this._group) {\n        this._group._items.forEach(drop => {\n          if (siblings.indexOf(drop) === -1) {\n            siblings.push(drop);\n          }\n        });\n      }\n\n      // Note that we resolve the scrollable parents here so that we delay the resolution\n      // as long as possible, ensuring that the element is in its final place in the DOM.\n      if (!this._scrollableParentsResolved) {\n        const scrollableParents = this._scrollDispatcher\n          .getAncestorScrollContainers(this.element)\n          .map(scrollable => scrollable.getElementRef().nativeElement);\n        this._dropListRef.withScrollableParents(scrollableParents);\n\n        // Only do this once since it involves traversing the DOM and the parents\n        // shouldn't be able to change without the drop list being destroyed.\n        this._scrollableParentsResolved = true;\n      }\n\n      ref.disabled = this.disabled;\n      ref.lockAxis = this.lockAxis;\n      ref.sortingDisabled = coerceBooleanProperty(this.sortingDisabled);\n      ref.autoScrollDisabled = coerceBooleanProperty(this.autoScrollDisabled);\n      ref.autoScrollStep = coerceNumberProperty(this.autoScrollStep, 2);\n      // R2M start\n      ref.nestEnabled = coerceBooleanProperty(this.nestEnabled);\n      ref.nestThreshold = coerceNumberProperty(this.nestThreshold, 0.5);\n      this._group && (ref.dropGutterSize = this._group?.dropGutterSize);\n      // R2M end\n      ref\n        .connectedTo(siblings.filter(drop => drop && drop !== this).map(list => list._dropListRef))\n        .withOrientation(this.orientation);\n    });\n  }\n\n  /** Handles events from the underlying DropListRef. */\n  private _handleEvents(ref: DropListRef<CdkDropList>) {\n    ref.beforeStarted.subscribe(() => {\n      this._syncItemsWithRef();\n      this._changeDetectorRef.markForCheck();\n    });\n\n    ref.entered.subscribe(event => {\n      this.entered.emit({\n        container: this,\n        item: event.item.data,\n        currentIndex: event.currentIndex,\n      });\n    });\n    // R2M start\n    ref.nested.subscribe(event => {\n      this.nested.emit({\n        container: this,\n        item: event.item.data,\n        nestIndex: event.nestIndex\n      });\n    });\n    // R2M end\n    ref.exited.subscribe(event => {\n      this.exited.emit({\n        container: this,\n        item: event.item.data,\n      });\n      this._changeDetectorRef.markForCheck();\n    });\n\n    ref.sorted.subscribe(event => {\n      this.sorted.emit({\n        previousIndex: event.previousIndex,\n        currentIndex: event.currentIndex,\n        container: this,\n        item: event.item.data,\n      });\n    });\n\n    ref.dropped.subscribe(dropEvent => {\n      this.dropped.emit({\n        previousIndex: dropEvent.previousIndex,\n        currentIndex: dropEvent.currentIndex,\n        previousContainer: dropEvent.previousContainer.data,\n        container: dropEvent.container.data,\n        item: dropEvent.item.data,\n        isPointerOverContainer: dropEvent.isPointerOverContainer,\n        distance: dropEvent.distance,\n        dropPoint: dropEvent.dropPoint,\n        event: dropEvent.event,\n        nestInfo: dropEvent.nestInfo\n      });\n\n      // Mark for check since all of these events run outside of change\n      // detection and we're not guaranteed for something else to have triggered it.\n      this._changeDetectorRef.markForCheck();\n    });\n\n    merge(ref.receivingStarted, ref.receivingStopped).subscribe(() =>\n      this._changeDetectorRef.markForCheck(),\n    );\n  }\n\n  /** Assigns the default input values based on a provided config object. */\n  private _assignDefaults(config: DragDropConfig) {\n    const { lockAxis, draggingDisabled, sortingDisabled, listAutoScrollDisabled, listOrientation } =\n      config;\n\n    this.disabled = draggingDisabled == null ? false : draggingDisabled;\n    this.sortingDisabled = sortingDisabled == null ? false : sortingDisabled;\n    this.autoScrollDisabled = listAutoScrollDisabled == null ? false : listAutoScrollDisabled;\n    this.orientation = listOrientation || 'vertical';\n\n    if (lockAxis) {\n      this.lockAxis = lockAxis;\n    }\n  }\n\n  /** Syncs up the registered drag items with underlying drop list ref. */\n  private _syncItemsWithRef() {\n    this._dropListRef.withItems(this.getSortedItems().map(item => item._dragRef));\n  }\n}\n","import { transferArrayItem } from \"./drag-utils\";\n\nexport interface CdkDropDownItem {\n    [key: string]: any; // a CdkDropDownItem will be an unknown data model\n    children?: CdkDropDownItem[]; // we can require `children[]`\n}\n\n\nexport interface CdkIndexTree {\n    root: CdkIndexTreeNode,\n    dropItems: CdkDropDownItem[],\n}\n\nexport interface CdkIndexTreeNode {\n\n    parent?: CdkIndexTreeNode,\n\n    itemOfList: CdkDropDownItem,\n\n    indexOfList: number,\n\n    children?: CdkIndexTreeNode[],\n}\n\nexport function getParent(roots: CdkDropDownItem[], children: CdkDropDownItem[]): CdkDropDownItem | undefined {\n    for (const root of roots) {\n        if (root.children) {\n            if ( root.children == children)\n                return root;\n            else {\n                const parent = root.children.length > 0 ?  getParent(root.children, children) : undefined;\n                if (parent !== undefined)\n                    return parent\n            }\n        } \n    }\n\n    return undefined;\n}\n\nexport function getDecendantCount(parent: CdkDropDownItem): number {\n    let count = 1;\n\n    if (parent.children && parent.children.length > 0) {\n        for (let child of parent.children) {\n            count += getDecendantCount(child);\n        }\n    }\n\n    return count;\n}\n\nexport function getTotalCount(parents: CdkDropDownItem[]): number {\n    let count = 0;\n    for (const parent of parents) {\n        count += getDecendantCount(parent);\n    }\n\n    return count;\n}\n\nexport function buildTree(children: CdkDropDownItem[]): CdkDropDownItem {\n    return {\n        _isEmpty: true,\n        children\n    }\n}\n\nexport function constructCdkIndexTree(rootNode: CdkDropDownItem): CdkIndexTree {\n    const root = _constructCdkIndexTreeNode(rootNode, -1).indexNode;\n\n    const dropItems = [];\n\n    const itemCount = getDecendantCount(rootNode) - 1;\n\n    for (let i = 0; i < itemCount; i++)\n        dropItems.push(rootNode);\n\n\n    _traverseCdkIndexTree(root, (node: CdkIndexTreeNode) => {\n        if (node.indexOfList !== -1)\n            dropItems[node.indexOfList] = node.itemOfList;\n    });\n\n    return {\n        root,\n        dropItems\n    }\n}\n\nfunction _traverseCdkIndexTree(root: CdkIndexTreeNode, cb: (node: CdkIndexTreeNode) => void) {\n\n    cb(root);\n    if (root.children && root.children.length > 0) {\n        for (let child of root.children) {\n            _traverseCdkIndexTree(child, cb);\n        }\n    }\n}\n\nfunction _getCdkIndexTreeNode(root: CdkIndexTreeNode, index: number): CdkIndexTreeNode | undefined {\n    let node: CdkIndexTreeNode | undefined;\n    if (root.indexOfList == index)\n        return root;\n\n    if (root.children && root.children.length > 0) {\n        for (let child of root.children) {\n\n            if (node = _getCdkIndexTreeNode(child, index)) {\n                return node;\n            }\n        }\n    }\n\n    return undefined;\n}\n\nfunction _constructCdkIndexTreeNode(node: CdkDropDownItem, index: number, parent?: CdkIndexTreeNode): { indexNode: CdkIndexTreeNode, index: number } {\n    let indexNode: CdkIndexTreeNode = {\n        indexOfList: index,\n        itemOfList: node,\n        parent: parent,\n    }\n\n    index++;\n\n    if (node.children && node.children.length > 0) {\n        let children: CdkIndexTreeNode[] = [];\n\n        for (let child of node.children) {\n            const { indexNode: childIndexNode, index: newIndex } = _constructCdkIndexTreeNode(child, index, indexNode);\n            children.push(childIndexNode);\n            index = newIndex;\n\n        }\n\n        indexNode.children = children;\n    }\n\n    return {\n        indexNode,\n        index\n    };\n\n}\n\n// export function getIndexOfNode(tree : CdkDropDownItem[], ) {\n\n// }\n\nexport function splitTree(tree: CdkIndexTree, startIndex: number, endIndex: number): CdkDropDownItem {\n\n\n    return _splitTree(tree.root, startIndex, endIndex).newDropItem;\n\n}\n\nfunction _splitTree(node: CdkIndexTreeNode, startIndex: number, endIndex: number): { newDropItem: CdkDropDownItem, hasReached: boolean } {\n\n    const children = node.children;\n\n    // const newDropItem = Object.assign(node.itemOfList);\n    let newDropItem: CdkDropDownItem = {};\n\n    let newDropChildren: CdkDropDownItem[] = [];\n\n    let hasReached = false;\n\n    if (node.indexOfList < startIndex || node.indexOfList > endIndex)\n        newDropItem[\"_isEmpty\"] = true;\n    else\n        newDropItem = Object.assign({}, node.itemOfList, { children: undefined });\n\n\n    if (node.indexOfList == endIndex) {\n        return { newDropItem, hasReached: true };\n    }\n\n\n    if (children && children.length > 0) {\n        for (let index = 0; index < children.length; index++) {\n            const child = children[index];\n            if (index < children.length - 1 && startIndex >= children[index + 1].indexOfList)\n                continue;\n\n            if (endIndex < child.indexOfList)\n                continue;\n\n            const { newDropItem: subtree, hasReached: reached } = _splitTree(child, startIndex, endIndex);\n\n            newDropChildren.push(subtree);\n\n            hasReached = reached;\n\n            if (hasReached) {\n                break;\n            }\n\n\n        };\n\n    }\n\n    if (newDropChildren.length > 0)\n        newDropItem.children = newDropChildren;\n\n    return { newDropItem, hasReached };\n\n\n}\n\nexport function swapTreeNodes(tree: CdkIndexTree, sourceIndex: number, targetIndex: number) {\n    const sourceNode = _getCdkIndexTreeNode(tree.root, sourceIndex);\n    const targetNode = _getCdkIndexTreeNode(tree.root, targetIndex);\n\n    if (sourceNode && targetNode) {\n\n\n        let sourceChildren = sourceNode.parent?.itemOfList.children;\n        let targetChildren = targetNode.parent?.itemOfList.children;\n\n\n        if (sourceChildren && targetChildren) {\n\n\n\n            let sourceChildIndex = sourceChildren.indexOf(sourceNode.itemOfList);\n            let targetChildIndex = targetChildren.indexOf(targetNode.itemOfList);\n\n\n\n            sourceChildIndex >= 0 && targetChildIndex >= 0 && transferArrayItem(sourceChildren, targetChildren, sourceChildIndex, targetChildIndex);\n\n        }\n    }\n\n}\n\nexport function nestTreeNode(tree: CdkIndexTree, sourceIndex: number, nestIndex: number) {\n    const sourceNode = _getCdkIndexTreeNode(tree.root, sourceIndex);\n    const targetNode = _getCdkIndexTreeNode(tree.root, nestIndex);\n\n    if (sourceNode && targetNode) {\n\n\n        let sourceChildren = sourceNode.parent?.itemOfList.children;\n\n        if (sourceChildren) {\n\n\n\n            let sourceChildIndex = sourceChildren.indexOf(sourceNode.itemOfList);\n\n            // sourceChildIndex >= 0 && targetChildIndex >= 0 && transferArrayItem(sourceChildren, targetChildren, sourceChildIndex, targetChildIndex);\n            const targetItem = targetNode.itemOfList;\n            let targetChildren = targetItem.children ? targetItem.children : [];\n\n            transferArrayItem(\n                sourceChildren,\n                targetChildren,\n                sourceChildIndex,\n                targetChildren.length\n            );\n            targetItem.children = targetChildren;\n        }\n    }\n}","import { NgFor, NgIf, NgStyle, NgTemplateOutlet } from '@angular/common';\nimport {\n  Component,\n  ElementRef,\n  EventEmitter,\n  HostListener,\n  Input,\n  Output,\n  QueryList,\n  TemplateRef,\n  ViewChild,\n  ViewChildren,\n  ViewEncapsulation,\n} from '@angular/core';\nimport { NgClass } from '@angular/common';\nimport { asapScheduler } from 'rxjs';\n\nimport { CdkDragDrop, CdkDragNest, CdkNestDrop } from '../../drag-events';\n\nimport { CdkDrag } from '../../directives/drag';\nimport { CdkDragHandle } from '../../directives/drag-handle';\nimport { CdkDragPlaceholder } from '../../directives/drag-placeholder';\nimport { CdkDragPreview } from '../../directives/drag-preview';\nimport { CdkDropList } from '../../directives/drop-list';\nimport { CdkDropListGroup } from '../../directives/drop-list-group';\nimport { DragDrop } from '../../drag-drop';\nimport { transferArrayItem } from '../../drag-utils';\n\nexport type IPageMode = 'VIRTUAL-SCROLL' | 'PAGINATION';\n\nimport { CdkDropDownItem, getParent } from '../../drag-drop-tree';\n\n// unused?\nconst TAG = 'nested-drag-drop.component.ts';\n\n// Drag&Drop connected sorting group\n@Component({\n  selector: 'nested-drag-drop',\n  templateUrl: './nested-drag-drop.component.html',\n  styleUrls: ['nested-drag-drop.component.scss'],\n  standalone: true,\n  providers: [DragDrop],\n  imports: [\n    NgFor,\n    NgIf,\n    NgTemplateOutlet,\n    CdkDropList,\n    CdkDropListGroup,\n    CdkDrag,\n    CdkDragHandle,\n    CdkDragPreview,\n    CdkDragPlaceholder,\n    NgClass,\n    NgStyle,\n  ],\n  encapsulation: ViewEncapsulation.None,\n})\nexport class CdkNestedDragDropComponent {\n  @Input('cdkNestedDropDownData')itemTreeList: CdkDropDownItem[] = [];\n  @Input('cdkListItemTemplate')itemTemplate!: TemplateRef<any>;\n  @Input('cdkPlaceholderTemplate')placeholderTemplate!: TemplateRef<any>;\n  @Input('cdkPageMode') pageMode: IPageMode = 'PAGINATION';\n  @Input('height') style_height: string = '100%';\n\n  @Output('cdkDragDropped') readonly dropped: EventEmitter<CdkNestDrop> =new EventEmitter<CdkNestDrop>();\n  @Output('cdkScrollNextPage') readonly scrollNextPage: EventEmitter<any> =new EventEmitter<any>();\n\n  @ViewChild('scrollBox') scrollBox!: ElementRef<HTMLElement>;\n  @ViewChild('scrollGap') scrollGap!: ElementRef<HTMLElement>;\n  @ViewChild('scrollContent') scrollContent!: ElementRef<HTMLElement>;\n\n  @ViewChildren(CdkDropList) private dlq: QueryList<CdkDropList>;\n\n  dropLists: CdkDropList[] = [];\n  dropGutterSize = 0;\n  isLoading = false;\n  showGap: boolean = true;\n\n  @HostListener('window:scroll', ['$event']) onScroll(event: Event) {\n    if (this.pageMode == 'VIRTUAL-SCROLL') {\n      if (\n        !this.isLoading &&\n        this.showGap &&\n        document.scrollingElement &&\n        document.scrollingElement?.scrollHeight -\n          document.scrollingElement?.scrollTop <=\n          document.scrollingElement?.clientHeight + 1\n      ) {\n        this.isLoading = true;\n        this.scrollNextPage.emit(event);\n      }\n    }\n  }\n\n  constructor() { }\n\n  ngAfterViewInit() {\n    const ldls: CdkDropList[] = [];\n    this.dlq.forEach((dl) => {\n      ldls.push(dl);\n    });\n\n    asapScheduler.schedule(() => {\n      this.dropLists = ldls;\n    });\n  }\n\n  ngAfterContentChecked() {\n    if (this.pageMode == 'VIRTUAL-SCROLL') {\n      this.showGap = true;\n    } else if (this.pageMode == 'PAGINATION') {\n      this.showGap = false;\n    }\n  }\n\n  drop(event: CdkDragDrop<any>) {\n    let prevListData: CdkDropDownItem[] = event.previousContainer.data;\n    let curListData: CdkDropDownItem[] = event.container.data;\n\n    const previousIndex =\n      prevListData.length > 0 && prevListData[0]['_isEmpty'] == true\n        ? event.previousIndex + 1\n        : event.previousIndex;\n    const currentIndex =\n      curListData.length > 0 && curListData[0]['_isEmpty'] == true\n        ? event.currentIndex + 1\n        : event.currentIndex;\n\n    let nestIndex = -1;\n    let nestInfo = event.nestInfo;\n\n    if (\n      nestInfo &&\n      nestInfo.nestIndex < curListData.length &&\n      nestInfo.nestIndex >= 0\n    ) {\n      nestIndex = nestInfo.nestIndex;\n      curListData.length > 0 &&\n        curListData[0]['_isEmpty'] == true &&\n        (nestIndex = nestIndex + 1);\n    }\n\n    if (nestIndex >= 0) {\n      let targetItem = curListData[nestIndex];\n      let targetChildren = targetItem?.children ? targetItem.children : [];\n\n      // BEGIN OF SENDING MESSAGE\n      this.dropped.emit({\n        item: prevListData[previousIndex],\n        parent: targetItem,\n        position: targetChildren.length,\n        isNesting: true,\n      });\n      // END OF SENDING MESSAGE\n\n      transferArrayItem(\n        prevListData,\n        targetChildren,\n        previousIndex,\n        targetChildren.length\n      );\n      targetItem.children = targetChildren;\n    } else {\n      // BEGIN OF SENDING MESSAGE\n      const parent = getParent(this.itemTreeList, curListData);\n      this.dropped.emit({\n        item: prevListData[previousIndex],\n        parent: parent,\n        position: currentIndex,\n        isNesting: false,\n      });\n      // END OF SENDING MESSAGE\n      transferArrayItem(prevListData, curListData, previousIndex, currentIndex);\n    }\n  }\n\n  nest(event: CdkDragNest<any>) {}\n\n  getDropGutterSize(): number {\n    this.dropGutterSize = 0;\n    return 0;\n  }\n}","<!-- <lib-pagination [pagination]=\"pagination\" [navigate]=\"false\" [loading]=\"false\" (pageUpdate)=\"onPageUpdate($event)\" /> -->\n\n<div #scrollBox class=\"scroll-box\" (scroll)=\"onScroll($event)\" [ngStyle]=\"{ height: style_height }\">\n  <div #scrollContent cdkDropListGroup [cdkDropGutterSize]=\"getDropGutterSize()\">\n    <ng-template #recursiveList let-items>\n      <div\n        class=\"cdk-nest-dragdrop-list\"\n        cdkDropList\n        [cdkDropListData]=\"items\"\n        (cdkDropListDropped)=\"drop($event)\"\n        (cdkDropListNested)=\"nest($event)\"\n        [cdkDropListConnectedTo]=\"dropLists\"\n        [cdkDropListNestEnabled]=\"true\">\n        @for (item of items; let i = $index; track 'key' + i) {  \n          @if (item?._isEmpty == undefined) {  \n            <div cdkDrag class=\"cdk-nest-dragdrop-item\" [cdkDragDisabled]=\"item.draggingDisabled\">\n              <div *cdkDragPlaceholder>\n                <ng-container *ngTemplateOutlet=\"placeholderTemplate;context: { $implicit: item }\" />\n              </div>\n  \n              @defer (on viewport) { \n                @defer(on idle) {\n                  <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\" />\n                } @placeholder {\n                  <span>Loading...</span>\n                } \n              } @placeholder {\n                <span>Loading...</span>\n              }\n  \n              @if (item.children && !!item.children.length) {\n                <div class=\"cdk-nest-dragdrop-sublist\" [ngStyle]=\"{ 'padding-top.px': 0 }\">\n                  <ng-container *ngTemplateOutlet=\"recursiveList; context: { $implicit: item.children } \" />\n                </div>\n              }\n            </div>\n          }\n  \n          @if (item?._isEmpty) {  \n            <div class=\"cdk-nest-dragdrop-item\" [ngStyle]=\"{ 'padding-top.px': 0 }\">\n              @if (item.children && !!item.children.length) {\n                <div class=\"cdk-nest-dragdrop-sublist\" [ngStyle]=\"{ 'padding-top.px': 0 }\">\n                  <ng-container *ngTemplateOutlet=\"recursiveList; context: { $implicit: item.children } \" />\n                </div>\n              }\n            </div>\n          }\n        }\n      </div>\n    </ng-template>\n    <ng-container *ngTemplateOutlet=\"recursiveList; context: { $implicit: itemTreeList }\" />\n  </div>\n\n  <!-- SCROLL GAP BOX -->\n  @if (showGap) {\n    <div #scrollGap class=\"scroll-gap\"></div>\n  }\n</div>\n\n<!--\nCopyright 2019 Google Inc. All Rights Reserved.\nUse of this source code is governed by an MIT-style license that\ncan be found in the LICENSE file at http://angular.io/license\n-->","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {DragDrop} from './drag-drop';\nexport {DragRef, DragRefConfig, Point, PreviewContainer} from './drag-ref';\nexport {DropListRef} from './drop-list-ref';\nexport {CDK_DRAG_PARENT} from './drag-parent';\n\nexport * from './drag-events';\nexport * from './drag-utils';\nexport * from './drag-drop-registry';\nexport * from './components/tree-component/nested-drag-drop.component';\nexport {CdkDropList} from './directives/drop-list';\nexport * from './directives/config';\nexport * from './directives/drop-list-group';\nexport * from './directives/drag';\nexport * from './directives/drag-handle';\nexport * from './directives/drag-preview';\nexport * from './directives/drag-placeholder';\n\nexport * from './drag-drop-tree';","/*\n * Public API Surface of sortable\n */\n\nexport * from './lib/drag-drop/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\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