/******/ (() => { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ "./node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   HiddenText: () => (/* binding */ HiddenText),
/* harmony export */   LiveRegion: () => (/* binding */ LiveRegion),
/* harmony export */   useAnnouncement: () => (/* binding */ useAnnouncement)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);


const hiddenStyles = {
  display: 'none'
};
function HiddenText(_ref) {
  let {
    id,
    value
  } = _ref;
  return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
    id: id,
    style: hiddenStyles
  }, value);
}

function LiveRegion(_ref) {
  let {
    id,
    announcement,
    ariaLiveType = "assertive"
  } = _ref;
  // Hide element visually but keep it readable by screen readers
  const visuallyHidden = {
    position: 'fixed',
    top: 0,
    left: 0,
    width: 1,
    height: 1,
    margin: -1,
    border: 0,
    padding: 0,
    overflow: 'hidden',
    clip: 'rect(0 0 0 0)',
    clipPath: 'inset(100%)',
    whiteSpace: 'nowrap'
  };
  return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
    id: id,
    style: visuallyHidden,
    role: "status",
    "aria-live": ariaLiveType,
    "aria-atomic": true
  }, announcement);
}

function useAnnouncement() {
  const [announcement, setAnnouncement] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('');
  const announce = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(value => {
    if (value != null) {
      setAnnouncement(value);
    }
  }, []);
  return {
    announce,
    announcement
  };
}


//# sourceMappingURL=accessibility.esm.js.map


/***/ }),

/***/ "./node_modules/@dnd-kit/core/dist/core.esm.js":
/*!*****************************************************!*\
  !*** ./node_modules/@dnd-kit/core/dist/core.esm.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AutoScrollActivator: () => (/* binding */ AutoScrollActivator),
/* harmony export */   DndContext: () => (/* binding */ DndContext),
/* harmony export */   DragOverlay: () => (/* binding */ DragOverlay),
/* harmony export */   KeyboardCode: () => (/* binding */ KeyboardCode),
/* harmony export */   KeyboardSensor: () => (/* binding */ KeyboardSensor),
/* harmony export */   MeasuringFrequency: () => (/* binding */ MeasuringFrequency),
/* harmony export */   MeasuringStrategy: () => (/* binding */ MeasuringStrategy),
/* harmony export */   MouseSensor: () => (/* binding */ MouseSensor),
/* harmony export */   PointerSensor: () => (/* binding */ PointerSensor),
/* harmony export */   TouchSensor: () => (/* binding */ TouchSensor),
/* harmony export */   TraversalOrder: () => (/* binding */ TraversalOrder),
/* harmony export */   applyModifiers: () => (/* binding */ applyModifiers),
/* harmony export */   closestCenter: () => (/* binding */ closestCenter),
/* harmony export */   closestCorners: () => (/* binding */ closestCorners),
/* harmony export */   defaultAnnouncements: () => (/* binding */ defaultAnnouncements),
/* harmony export */   defaultCoordinates: () => (/* binding */ defaultCoordinates),
/* harmony export */   defaultDropAnimation: () => (/* binding */ defaultDropAnimationConfiguration),
/* harmony export */   defaultDropAnimationSideEffects: () => (/* binding */ defaultDropAnimationSideEffects),
/* harmony export */   defaultKeyboardCoordinateGetter: () => (/* binding */ defaultKeyboardCoordinateGetter),
/* harmony export */   defaultScreenReaderInstructions: () => (/* binding */ defaultScreenReaderInstructions),
/* harmony export */   getClientRect: () => (/* binding */ getClientRect),
/* harmony export */   getFirstCollision: () => (/* binding */ getFirstCollision),
/* harmony export */   getScrollableAncestors: () => (/* binding */ getScrollableAncestors),
/* harmony export */   pointerWithin: () => (/* binding */ pointerWithin),
/* harmony export */   rectIntersection: () => (/* binding */ rectIntersection),
/* harmony export */   useDndContext: () => (/* binding */ useDndContext),
/* harmony export */   useDndMonitor: () => (/* binding */ useDndMonitor),
/* harmony export */   useDraggable: () => (/* binding */ useDraggable),
/* harmony export */   useDroppable: () => (/* binding */ useDroppable),
/* harmony export */   useSensor: () => (/* binding */ useSensor),
/* harmony export */   useSensors: () => (/* binding */ useSensors)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dnd-kit/utilities */ "./node_modules/@dnd-kit/utilities/dist/utilities.esm.js");
/* harmony import */ var _dnd_kit_accessibility__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @dnd-kit/accessibility */ "./node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js");





const DndMonitorContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);

function useDndMonitor(listener) {
  const registerListener = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(DndMonitorContext);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (!registerListener) {
      throw new Error('useDndMonitor must be used within a children of <DndContext>');
    }

    const unsubscribe = registerListener(listener);
    return unsubscribe;
  }, [listener, registerListener]);
}

function useDndMonitorProvider() {
  const [listeners] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(() => new Set());
  const registerListener = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(listener => {
    listeners.add(listener);
    return () => listeners.delete(listener);
  }, [listeners]);
  const dispatch = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(_ref => {
    let {
      type,
      event
    } = _ref;
    listeners.forEach(listener => {
      var _listener$type;

      return (_listener$type = listener[type]) == null ? void 0 : _listener$type.call(listener, event);
    });
  }, [listeners]);
  return [dispatch, registerListener];
}

const defaultScreenReaderInstructions = {
  draggable: "\n    To pick up a draggable item, press the space bar.\n    While dragging, use the arrow keys to move the item.\n    Press space again to drop the item in its new position, or press escape to cancel.\n  "
};
const defaultAnnouncements = {
  onDragStart(_ref) {
    let {
      active
    } = _ref;
    return "Picked up draggable item " + active.id + ".";
  },

  onDragOver(_ref2) {
    let {
      active,
      over
    } = _ref2;

    if (over) {
      return "Draggable item " + active.id + " was moved over droppable area " + over.id + ".";
    }

    return "Draggable item " + active.id + " is no longer over a droppable area.";
  },

  onDragEnd(_ref3) {
    let {
      active,
      over
    } = _ref3;

    if (over) {
      return "Draggable item " + active.id + " was dropped over droppable area " + over.id;
    }

    return "Draggable item " + active.id + " was dropped.";
  },

  onDragCancel(_ref4) {
    let {
      active
    } = _ref4;
    return "Dragging was cancelled. Draggable item " + active.id + " was dropped.";
  }

};

function Accessibility(_ref) {
  let {
    announcements = defaultAnnouncements,
    container,
    hiddenTextDescribedById,
    screenReaderInstructions = defaultScreenReaderInstructions
  } = _ref;
  const {
    announce,
    announcement
  } = (0,_dnd_kit_accessibility__WEBPACK_IMPORTED_MODULE_3__.useAnnouncement)();
  const liveRegionId = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useUniqueId)("DndLiveRegion");
  const [mounted, setMounted] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    setMounted(true);
  }, []);
  useDndMonitor((0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
    onDragStart(_ref2) {
      let {
        active
      } = _ref2;
      announce(announcements.onDragStart({
        active
      }));
    },

    onDragMove(_ref3) {
      let {
        active,
        over
      } = _ref3;

      if (announcements.onDragMove) {
        announce(announcements.onDragMove({
          active,
          over
        }));
      }
    },

    onDragOver(_ref4) {
      let {
        active,
        over
      } = _ref4;
      announce(announcements.onDragOver({
        active,
        over
      }));
    },

    onDragEnd(_ref5) {
      let {
        active,
        over
      } = _ref5;
      announce(announcements.onDragEnd({
        active,
        over
      }));
    },

    onDragCancel(_ref6) {
      let {
        active,
        over
      } = _ref6;
      announce(announcements.onDragCancel({
        active,
        over
      }));
    }

  }), [announce, announcements]));

  if (!mounted) {
    return null;
  }

  const markup = react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_dnd_kit_accessibility__WEBPACK_IMPORTED_MODULE_3__.HiddenText, {
    id: hiddenTextDescribedById,
    value: screenReaderInstructions.draggable
  }), react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_dnd_kit_accessibility__WEBPACK_IMPORTED_MODULE_3__.LiveRegion, {
    id: liveRegionId,
    announcement: announcement
  }));
  return container ? (0,react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(markup, container) : markup;
}

var Action;

(function (Action) {
  Action["DragStart"] = "dragStart";
  Action["DragMove"] = "dragMove";
  Action["DragEnd"] = "dragEnd";
  Action["DragCancel"] = "dragCancel";
  Action["DragOver"] = "dragOver";
  Action["RegisterDroppable"] = "registerDroppable";
  Action["SetDroppableDisabled"] = "setDroppableDisabled";
  Action["UnregisterDroppable"] = "unregisterDroppable";
})(Action || (Action = {}));

function noop() {}

function useSensor(sensor, options) {
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
    sensor,
    options: options != null ? options : {}
  }), // eslint-disable-next-line react-hooks/exhaustive-deps
  [sensor, options]);
}

function useSensors() {
  for (var _len = arguments.length, sensors = new Array(_len), _key = 0; _key < _len; _key++) {
    sensors[_key] = arguments[_key];
  }

  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => [...sensors].filter(sensor => sensor != null), // eslint-disable-next-line react-hooks/exhaustive-deps
  [...sensors]);
}

const defaultCoordinates = /*#__PURE__*/Object.freeze({
  x: 0,
  y: 0
});

/**
 * Returns the distance between two points
 */
function distanceBetween(p1, p2) {
  return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));
}

function getRelativeTransformOrigin(event, rect) {
  const eventCoordinates = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getEventCoordinates)(event);

  if (!eventCoordinates) {
    return '0 0';
  }

  const transformOrigin = {
    x: (eventCoordinates.x - rect.left) / rect.width * 100,
    y: (eventCoordinates.y - rect.top) / rect.height * 100
  };
  return transformOrigin.x + "% " + transformOrigin.y + "%";
}

/**
 * Sort collisions from smallest to greatest value
 */
function sortCollisionsAsc(_ref, _ref2) {
  let {
    data: {
      value: a
    }
  } = _ref;
  let {
    data: {
      value: b
    }
  } = _ref2;
  return a - b;
}
/**
 * Sort collisions from greatest to smallest value
 */

function sortCollisionsDesc(_ref3, _ref4) {
  let {
    data: {
      value: a
    }
  } = _ref3;
  let {
    data: {
      value: b
    }
  } = _ref4;
  return b - a;
}
/**
 * Returns the coordinates of the corners of a given rectangle:
 * [TopLeft {x, y}, TopRight {x, y}, BottomLeft {x, y}, BottomRight {x, y}]
 */

function cornersOfRectangle(_ref5) {
  let {
    left,
    top,
    height,
    width
  } = _ref5;
  return [{
    x: left,
    y: top
  }, {
    x: left + width,
    y: top
  }, {
    x: left,
    y: top + height
  }, {
    x: left + width,
    y: top + height
  }];
}
function getFirstCollision(collisions, property) {
  if (!collisions || collisions.length === 0) {
    return null;
  }

  const [firstCollision] = collisions;
  return property ? firstCollision[property] : firstCollision;
}

/**
 * Returns the coordinates of the center of a given ClientRect
 */

function centerOfRectangle(rect, left, top) {
  if (left === void 0) {
    left = rect.left;
  }

  if (top === void 0) {
    top = rect.top;
  }

  return {
    x: left + rect.width * 0.5,
    y: top + rect.height * 0.5
  };
}
/**
 * Returns the closest rectangles from an array of rectangles to the center of a given
 * rectangle.
 */


const closestCenter = _ref => {
  let {
    collisionRect,
    droppableRects,
    droppableContainers
  } = _ref;
  const centerRect = centerOfRectangle(collisionRect, collisionRect.left, collisionRect.top);
  const collisions = [];

  for (const droppableContainer of droppableContainers) {
    const {
      id
    } = droppableContainer;
    const rect = droppableRects.get(id);

    if (rect) {
      const distBetween = distanceBetween(centerOfRectangle(rect), centerRect);
      collisions.push({
        id,
        data: {
          droppableContainer,
          value: distBetween
        }
      });
    }
  }

  return collisions.sort(sortCollisionsAsc);
};

/**
 * Returns the closest rectangles from an array of rectangles to the corners of
 * another rectangle.
 */

const closestCorners = _ref => {
  let {
    collisionRect,
    droppableRects,
    droppableContainers
  } = _ref;
  const corners = cornersOfRectangle(collisionRect);
  const collisions = [];

  for (const droppableContainer of droppableContainers) {
    const {
      id
    } = droppableContainer;
    const rect = droppableRects.get(id);

    if (rect) {
      const rectCorners = cornersOfRectangle(rect);
      const distances = corners.reduce((accumulator, corner, index) => {
        return accumulator + distanceBetween(rectCorners[index], corner);
      }, 0);
      const effectiveDistance = Number((distances / 4).toFixed(4));
      collisions.push({
        id,
        data: {
          droppableContainer,
          value: effectiveDistance
        }
      });
    }
  }

  return collisions.sort(sortCollisionsAsc);
};

/**
 * Returns the intersecting rectangle area between two rectangles
 */

function getIntersectionRatio(entry, target) {
  const top = Math.max(target.top, entry.top);
  const left = Math.max(target.left, entry.left);
  const right = Math.min(target.left + target.width, entry.left + entry.width);
  const bottom = Math.min(target.top + target.height, entry.top + entry.height);
  const width = right - left;
  const height = bottom - top;

  if (left < right && top < bottom) {
    const targetArea = target.width * target.height;
    const entryArea = entry.width * entry.height;
    const intersectionArea = width * height;
    const intersectionRatio = intersectionArea / (targetArea + entryArea - intersectionArea);
    return Number(intersectionRatio.toFixed(4));
  } // Rectangles do not overlap, or overlap has an area of zero (edge/corner overlap)


  return 0;
}
/**
 * Returns the rectangles that has the greatest intersection area with a given
 * rectangle in an array of rectangles.
 */

const rectIntersection = _ref => {
  let {
    collisionRect,
    droppableRects,
    droppableContainers
  } = _ref;
  const collisions = [];

  for (const droppableContainer of droppableContainers) {
    const {
      id
    } = droppableContainer;
    const rect = droppableRects.get(id);

    if (rect) {
      const intersectionRatio = getIntersectionRatio(rect, collisionRect);

      if (intersectionRatio > 0) {
        collisions.push({
          id,
          data: {
            droppableContainer,
            value: intersectionRatio
          }
        });
      }
    }
  }

  return collisions.sort(sortCollisionsDesc);
};

/**
 * Check if a given point is contained within a bounding rectangle
 */

function isPointWithinRect(point, rect) {
  const {
    top,
    left,
    bottom,
    right
  } = rect;
  return top <= point.y && point.y <= bottom && left <= point.x && point.x <= right;
}
/**
 * Returns the rectangles that the pointer is hovering over
 */


const pointerWithin = _ref => {
  let {
    droppableContainers,
    droppableRects,
    pointerCoordinates
  } = _ref;

  if (!pointerCoordinates) {
    return [];
  }

  const collisions = [];

  for (const droppableContainer of droppableContainers) {
    const {
      id
    } = droppableContainer;
    const rect = droppableRects.get(id);

    if (rect && isPointWithinRect(pointerCoordinates, rect)) {
      /* There may be more than a single rectangle intersecting
       * with the pointer coordinates. In order to sort the
       * colliding rectangles, we measure the distance between
       * the pointer and the corners of the intersecting rectangle
       */
      const corners = cornersOfRectangle(rect);
      const distances = corners.reduce((accumulator, corner) => {
        return accumulator + distanceBetween(pointerCoordinates, corner);
      }, 0);
      const effectiveDistance = Number((distances / 4).toFixed(4));
      collisions.push({
        id,
        data: {
          droppableContainer,
          value: effectiveDistance
        }
      });
    }
  }

  return collisions.sort(sortCollisionsAsc);
};

function adjustScale(transform, rect1, rect2) {
  return { ...transform,
    scaleX: rect1 && rect2 ? rect1.width / rect2.width : 1,
    scaleY: rect1 && rect2 ? rect1.height / rect2.height : 1
  };
}

function getRectDelta(rect1, rect2) {
  return rect1 && rect2 ? {
    x: rect1.left - rect2.left,
    y: rect1.top - rect2.top
  } : defaultCoordinates;
}

function createRectAdjustmentFn(modifier) {
  return function adjustClientRect(rect) {
    for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      adjustments[_key - 1] = arguments[_key];
    }

    return adjustments.reduce((acc, adjustment) => ({ ...acc,
      top: acc.top + modifier * adjustment.y,
      bottom: acc.bottom + modifier * adjustment.y,
      left: acc.left + modifier * adjustment.x,
      right: acc.right + modifier * adjustment.x
    }), { ...rect
    });
  };
}
const getAdjustedRect = /*#__PURE__*/createRectAdjustmentFn(1);

function parseTransform(transform) {
  if (transform.startsWith('matrix3d(')) {
    const transformArray = transform.slice(9, -1).split(/, /);
    return {
      x: +transformArray[12],
      y: +transformArray[13],
      scaleX: +transformArray[0],
      scaleY: +transformArray[5]
    };
  } else if (transform.startsWith('matrix(')) {
    const transformArray = transform.slice(7, -1).split(/, /);
    return {
      x: +transformArray[4],
      y: +transformArray[5],
      scaleX: +transformArray[0],
      scaleY: +transformArray[3]
    };
  }

  return null;
}

function inverseTransform(rect, transform, transformOrigin) {
  const parsedTransform = parseTransform(transform);

  if (!parsedTransform) {
    return rect;
  }

  const {
    scaleX,
    scaleY,
    x: translateX,
    y: translateY
  } = parsedTransform;
  const x = rect.left - translateX - (1 - scaleX) * parseFloat(transformOrigin);
  const y = rect.top - translateY - (1 - scaleY) * parseFloat(transformOrigin.slice(transformOrigin.indexOf(' ') + 1));
  const w = scaleX ? rect.width / scaleX : rect.width;
  const h = scaleY ? rect.height / scaleY : rect.height;
  return {
    width: w,
    height: h,
    top: y,
    right: x + w,
    bottom: y + h,
    left: x
  };
}

const defaultOptions = {
  ignoreTransform: false
};
/**
 * Returns the bounding client rect of an element relative to the viewport.
 */

function getClientRect(element, options) {
  if (options === void 0) {
    options = defaultOptions;
  }

  let rect = element.getBoundingClientRect();

  if (options.ignoreTransform) {
    const {
      transform,
      transformOrigin
    } = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getWindow)(element).getComputedStyle(element);

    if (transform) {
      rect = inverseTransform(rect, transform, transformOrigin);
    }
  }

  const {
    top,
    left,
    width,
    height,
    bottom,
    right
  } = rect;
  return {
    top,
    left,
    width,
    height,
    bottom,
    right
  };
}
/**
 * Returns the bounding client rect of an element relative to the viewport.
 *
 * @remarks
 * The ClientRect returned by this method does not take into account transforms
 * applied to the element it measures.
 *
 */

function getTransformAgnosticClientRect(element) {
  return getClientRect(element, {
    ignoreTransform: true
  });
}

function getWindowClientRect(element) {
  const width = element.innerWidth;
  const height = element.innerHeight;
  return {
    top: 0,
    left: 0,
    right: width,
    bottom: height,
    width,
    height
  };
}

function isFixed(node, computedStyle) {
  if (computedStyle === void 0) {
    computedStyle = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getWindow)(node).getComputedStyle(node);
  }

  return computedStyle.position === 'fixed';
}

function isScrollable(element, computedStyle) {
  if (computedStyle === void 0) {
    computedStyle = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getWindow)(element).getComputedStyle(element);
  }

  const overflowRegex = /(auto|scroll|overlay)/;
  const properties = ['overflow', 'overflowX', 'overflowY'];
  return properties.some(property => {
    const value = computedStyle[property];
    return typeof value === 'string' ? overflowRegex.test(value) : false;
  });
}

function getScrollableAncestors(element, limit) {
  const scrollParents = [];

  function findScrollableAncestors(node) {
    if (limit != null && scrollParents.length >= limit) {
      return scrollParents;
    }

    if (!node) {
      return scrollParents;
    }

    if ((0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isDocument)(node) && node.scrollingElement != null && !scrollParents.includes(node.scrollingElement)) {
      scrollParents.push(node.scrollingElement);
      return scrollParents;
    }

    if (!(0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(node) || (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isSVGElement)(node)) {
      return scrollParents;
    }

    if (scrollParents.includes(node)) {
      return scrollParents;
    }

    const computedStyle = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getWindow)(element).getComputedStyle(node);

    if (node !== element) {
      if (isScrollable(node, computedStyle)) {
        scrollParents.push(node);
      }
    }

    if (isFixed(node, computedStyle)) {
      return scrollParents;
    }

    return findScrollableAncestors(node.parentNode);
  }

  if (!element) {
    return scrollParents;
  }

  return findScrollableAncestors(element);
}
function getFirstScrollableAncestor(node) {
  const [firstScrollableAncestor] = getScrollableAncestors(node, 1);
  return firstScrollableAncestor != null ? firstScrollableAncestor : null;
}

function getScrollableElement(element) {
  if (!_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.canUseDOM || !element) {
    return null;
  }

  if ((0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isWindow)(element)) {
    return element;
  }

  if (!(0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isNode)(element)) {
    return null;
  }

  if ((0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isDocument)(element) || element === (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getOwnerDocument)(element).scrollingElement) {
    return window;
  }

  if ((0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(element)) {
    return element;
  }

  return null;
}

function getScrollXCoordinate(element) {
  if ((0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isWindow)(element)) {
    return element.scrollX;
  }

  return element.scrollLeft;
}
function getScrollYCoordinate(element) {
  if ((0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isWindow)(element)) {
    return element.scrollY;
  }

  return element.scrollTop;
}
function getScrollCoordinates(element) {
  return {
    x: getScrollXCoordinate(element),
    y: getScrollYCoordinate(element)
  };
}

var Direction;

(function (Direction) {
  Direction[Direction["Forward"] = 1] = "Forward";
  Direction[Direction["Backward"] = -1] = "Backward";
})(Direction || (Direction = {}));

function isDocumentScrollingElement(element) {
  if (!_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.canUseDOM || !element) {
    return false;
  }

  return element === document.scrollingElement;
}

function getScrollPosition(scrollingContainer) {
  const minScroll = {
    x: 0,
    y: 0
  };
  const dimensions = isDocumentScrollingElement(scrollingContainer) ? {
    height: window.innerHeight,
    width: window.innerWidth
  } : {
    height: scrollingContainer.clientHeight,
    width: scrollingContainer.clientWidth
  };
  const maxScroll = {
    x: scrollingContainer.scrollWidth - dimensions.width,
    y: scrollingContainer.scrollHeight - dimensions.height
  };
  const isTop = scrollingContainer.scrollTop <= minScroll.y;
  const isLeft = scrollingContainer.scrollLeft <= minScroll.x;
  const isBottom = scrollingContainer.scrollTop >= maxScroll.y;
  const isRight = scrollingContainer.scrollLeft >= maxScroll.x;
  return {
    isTop,
    isLeft,
    isBottom,
    isRight,
    maxScroll,
    minScroll
  };
}

const defaultThreshold = {
  x: 0.2,
  y: 0.2
};
function getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, _ref, acceleration, thresholdPercentage) {
  let {
    top,
    left,
    right,
    bottom
  } = _ref;

  if (acceleration === void 0) {
    acceleration = 10;
  }

  if (thresholdPercentage === void 0) {
    thresholdPercentage = defaultThreshold;
  }

  const {
    isTop,
    isBottom,
    isLeft,
    isRight
  } = getScrollPosition(scrollContainer);
  const direction = {
    x: 0,
    y: 0
  };
  const speed = {
    x: 0,
    y: 0
  };
  const threshold = {
    height: scrollContainerRect.height * thresholdPercentage.y,
    width: scrollContainerRect.width * thresholdPercentage.x
  };

  if (!isTop && top <= scrollContainerRect.top + threshold.height) {
    // Scroll Up
    direction.y = Direction.Backward;
    speed.y = acceleration * Math.abs((scrollContainerRect.top + threshold.height - top) / threshold.height);
  } else if (!isBottom && bottom >= scrollContainerRect.bottom - threshold.height) {
    // Scroll Down
    direction.y = Direction.Forward;
    speed.y = acceleration * Math.abs((scrollContainerRect.bottom - threshold.height - bottom) / threshold.height);
  }

  if (!isRight && right >= scrollContainerRect.right - threshold.width) {
    // Scroll Right
    direction.x = Direction.Forward;
    speed.x = acceleration * Math.abs((scrollContainerRect.right - threshold.width - right) / threshold.width);
  } else if (!isLeft && left <= scrollContainerRect.left + threshold.width) {
    // Scroll Left
    direction.x = Direction.Backward;
    speed.x = acceleration * Math.abs((scrollContainerRect.left + threshold.width - left) / threshold.width);
  }

  return {
    direction,
    speed
  };
}

function getScrollElementRect(element) {
  if (element === document.scrollingElement) {
    const {
      innerWidth,
      innerHeight
    } = window;
    return {
      top: 0,
      left: 0,
      right: innerWidth,
      bottom: innerHeight,
      width: innerWidth,
      height: innerHeight
    };
  }

  const {
    top,
    left,
    right,
    bottom
  } = element.getBoundingClientRect();
  return {
    top,
    left,
    right,
    bottom,
    width: element.clientWidth,
    height: element.clientHeight
  };
}

function getScrollOffsets(scrollableAncestors) {
  return scrollableAncestors.reduce((acc, node) => {
    return (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.add)(acc, getScrollCoordinates(node));
  }, defaultCoordinates);
}
function getScrollXOffset(scrollableAncestors) {
  return scrollableAncestors.reduce((acc, node) => {
    return acc + getScrollXCoordinate(node);
  }, 0);
}
function getScrollYOffset(scrollableAncestors) {
  return scrollableAncestors.reduce((acc, node) => {
    return acc + getScrollYCoordinate(node);
  }, 0);
}

function scrollIntoViewIfNeeded(element, measure) {
  if (measure === void 0) {
    measure = getClientRect;
  }

  if (!element) {
    return;
  }

  const {
    top,
    left,
    bottom,
    right
  } = measure(element);
  const firstScrollableAncestor = getFirstScrollableAncestor(element);

  if (!firstScrollableAncestor) {
    return;
  }

  if (bottom <= 0 || right <= 0 || top >= window.innerHeight || left >= window.innerWidth) {
    element.scrollIntoView({
      block: 'center',
      inline: 'center'
    });
  }
}

const properties = [['x', ['left', 'right'], getScrollXOffset], ['y', ['top', 'bottom'], getScrollYOffset]];
class Rect {
  constructor(rect, element) {
    this.rect = void 0;
    this.width = void 0;
    this.height = void 0;
    this.top = void 0;
    this.bottom = void 0;
    this.right = void 0;
    this.left = void 0;
    const scrollableAncestors = getScrollableAncestors(element);
    const scrollOffsets = getScrollOffsets(scrollableAncestors);
    this.rect = { ...rect
    };
    this.width = rect.width;
    this.height = rect.height;

    for (const [axis, keys, getScrollOffset] of properties) {
      for (const key of keys) {
        Object.defineProperty(this, key, {
          get: () => {
            const currentOffsets = getScrollOffset(scrollableAncestors);
            const scrollOffsetsDeltla = scrollOffsets[axis] - currentOffsets;
            return this.rect[key] + scrollOffsetsDeltla;
          },
          enumerable: true
        });
      }
    }

    Object.defineProperty(this, 'rect', {
      enumerable: false
    });
  }

}

class Listeners {
  constructor(target) {
    this.target = void 0;
    this.listeners = [];

    this.removeAll = () => {
      this.listeners.forEach(listener => {
        var _this$target;

        return (_this$target = this.target) == null ? void 0 : _this$target.removeEventListener(...listener);
      });
    };

    this.target = target;
  }

  add(eventName, handler, options) {
    var _this$target2;

    (_this$target2 = this.target) == null ? void 0 : _this$target2.addEventListener(eventName, handler, options);
    this.listeners.push([eventName, handler, options]);
  }

}

function getEventListenerTarget(target) {
  // If the `event.target` element is removed from the document events will still be targeted
  // at it, and hence won't always bubble up to the window or document anymore.
  // If there is any risk of an element being removed while it is being dragged,
  // the best practice is to attach the event listeners directly to the target.
  // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
  const {
    EventTarget
  } = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getWindow)(target);
  return target instanceof EventTarget ? target : (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getOwnerDocument)(target);
}

function hasExceededDistance(delta, measurement) {
  const dx = Math.abs(delta.x);
  const dy = Math.abs(delta.y);

  if (typeof measurement === 'number') {
    return Math.sqrt(dx ** 2 + dy ** 2) > measurement;
  }

  if ('x' in measurement && 'y' in measurement) {
    return dx > measurement.x && dy > measurement.y;
  }

  if ('x' in measurement) {
    return dx > measurement.x;
  }

  if ('y' in measurement) {
    return dy > measurement.y;
  }

  return false;
}

var EventName;

(function (EventName) {
  EventName["Click"] = "click";
  EventName["DragStart"] = "dragstart";
  EventName["Keydown"] = "keydown";
  EventName["ContextMenu"] = "contextmenu";
  EventName["Resize"] = "resize";
  EventName["SelectionChange"] = "selectionchange";
  EventName["VisibilityChange"] = "visibilitychange";
})(EventName || (EventName = {}));

function preventDefault(event) {
  event.preventDefault();
}
function stopPropagation(event) {
  event.stopPropagation();
}

var KeyboardCode;

(function (KeyboardCode) {
  KeyboardCode["Space"] = "Space";
  KeyboardCode["Down"] = "ArrowDown";
  KeyboardCode["Right"] = "ArrowRight";
  KeyboardCode["Left"] = "ArrowLeft";
  KeyboardCode["Up"] = "ArrowUp";
  KeyboardCode["Esc"] = "Escape";
  KeyboardCode["Enter"] = "Enter";
  KeyboardCode["Tab"] = "Tab";
})(KeyboardCode || (KeyboardCode = {}));

const defaultKeyboardCodes = {
  start: [KeyboardCode.Space, KeyboardCode.Enter],
  cancel: [KeyboardCode.Esc],
  end: [KeyboardCode.Space, KeyboardCode.Enter, KeyboardCode.Tab]
};
const defaultKeyboardCoordinateGetter = (event, _ref) => {
  let {
    currentCoordinates
  } = _ref;

  switch (event.code) {
    case KeyboardCode.Right:
      return { ...currentCoordinates,
        x: currentCoordinates.x + 25
      };

    case KeyboardCode.Left:
      return { ...currentCoordinates,
        x: currentCoordinates.x - 25
      };

    case KeyboardCode.Down:
      return { ...currentCoordinates,
        y: currentCoordinates.y + 25
      };

    case KeyboardCode.Up:
      return { ...currentCoordinates,
        y: currentCoordinates.y - 25
      };
  }

  return undefined;
};

class KeyboardSensor {
  constructor(props) {
    this.props = void 0;
    this.autoScrollEnabled = false;
    this.referenceCoordinates = void 0;
    this.listeners = void 0;
    this.windowListeners = void 0;
    this.props = props;
    const {
      event: {
        target
      }
    } = props;
    this.props = props;
    this.listeners = new Listeners((0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getOwnerDocument)(target));
    this.windowListeners = new Listeners((0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getWindow)(target));
    this.handleKeyDown = this.handleKeyDown.bind(this);
    this.handleCancel = this.handleCancel.bind(this);
    this.attach();
  }

  attach() {
    this.handleStart();
    this.windowListeners.add(EventName.Resize, this.handleCancel);
    this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);
    setTimeout(() => this.listeners.add(EventName.Keydown, this.handleKeyDown));
  }

  handleStart() {
    const {
      activeNode,
      onStart
    } = this.props;
    const node = activeNode.node.current;

    if (node) {
      scrollIntoViewIfNeeded(node);
    }

    onStart(defaultCoordinates);
  }

  handleKeyDown(event) {
    if ((0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isKeyboardEvent)(event)) {
      const {
        active,
        context,
        options
      } = this.props;
      const {
        keyboardCodes = defaultKeyboardCodes,
        coordinateGetter = defaultKeyboardCoordinateGetter,
        scrollBehavior = 'smooth'
      } = options;
      const {
        code
      } = event;

      if (keyboardCodes.end.includes(code)) {
        this.handleEnd(event);
        return;
      }

      if (keyboardCodes.cancel.includes(code)) {
        this.handleCancel(event);
        return;
      }

      const {
        collisionRect
      } = context.current;
      const currentCoordinates = collisionRect ? {
        x: collisionRect.left,
        y: collisionRect.top
      } : defaultCoordinates;

      if (!this.referenceCoordinates) {
        this.referenceCoordinates = currentCoordinates;
      }

      const newCoordinates = coordinateGetter(event, {
        active,
        context: context.current,
        currentCoordinates
      });

      if (newCoordinates) {
        const coordinatesDelta = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.subtract)(newCoordinates, currentCoordinates);
        const scrollDelta = {
          x: 0,
          y: 0
        };
        const {
          scrollableAncestors
        } = context.current;

        for (const scrollContainer of scrollableAncestors) {
          const direction = event.code;
          const {
            isTop,
            isRight,
            isLeft,
            isBottom,
            maxScroll,
            minScroll
          } = getScrollPosition(scrollContainer);
          const scrollElementRect = getScrollElementRect(scrollContainer);
          const clampedCoordinates = {
            x: Math.min(direction === KeyboardCode.Right ? scrollElementRect.right - scrollElementRect.width / 2 : scrollElementRect.right, Math.max(direction === KeyboardCode.Right ? scrollElementRect.left : scrollElementRect.left + scrollElementRect.width / 2, newCoordinates.x)),
            y: Math.min(direction === KeyboardCode.Down ? scrollElementRect.bottom - scrollElementRect.height / 2 : scrollElementRect.bottom, Math.max(direction === KeyboardCode.Down ? scrollElementRect.top : scrollElementRect.top + scrollElementRect.height / 2, newCoordinates.y))
          };
          const canScrollX = direction === KeyboardCode.Right && !isRight || direction === KeyboardCode.Left && !isLeft;
          const canScrollY = direction === KeyboardCode.Down && !isBottom || direction === KeyboardCode.Up && !isTop;

          if (canScrollX && clampedCoordinates.x !== newCoordinates.x) {
            const newScrollCoordinates = scrollContainer.scrollLeft + coordinatesDelta.x;
            const canScrollToNewCoordinates = direction === KeyboardCode.Right && newScrollCoordinates <= maxScroll.x || direction === KeyboardCode.Left && newScrollCoordinates >= minScroll.x;

            if (canScrollToNewCoordinates && !coordinatesDelta.y) {
              // We don't need to update coordinates, the scroll adjustment alone will trigger
              // logic to auto-detect the new container we are over
              scrollContainer.scrollTo({
                left: newScrollCoordinates,
                behavior: scrollBehavior
              });
              return;
            }

            if (canScrollToNewCoordinates) {
              scrollDelta.x = scrollContainer.scrollLeft - newScrollCoordinates;
            } else {
              scrollDelta.x = direction === KeyboardCode.Right ? scrollContainer.scrollLeft - maxScroll.x : scrollContainer.scrollLeft - minScroll.x;
            }

            if (scrollDelta.x) {
              scrollContainer.scrollBy({
                left: -scrollDelta.x,
                behavior: scrollBehavior
              });
            }

            break;
          } else if (canScrollY && clampedCoordinates.y !== newCoordinates.y) {
            const newScrollCoordinates = scrollContainer.scrollTop + coordinatesDelta.y;
            const canScrollToNewCoordinates = direction === KeyboardCode.Down && newScrollCoordinates <= maxScroll.y || direction === KeyboardCode.Up && newScrollCoordinates >= minScroll.y;

            if (canScrollToNewCoordinates && !coordinatesDelta.x) {
              // We don't need to update coordinates, the scroll adjustment alone will trigger
              // logic to auto-detect the new container we are over
              scrollContainer.scrollTo({
                top: newScrollCoordinates,
                behavior: scrollBehavior
              });
              return;
            }

            if (canScrollToNewCoordinates) {
              scrollDelta.y = scrollContainer.scrollTop - newScrollCoordinates;
            } else {
              scrollDelta.y = direction === KeyboardCode.Down ? scrollContainer.scrollTop - maxScroll.y : scrollContainer.scrollTop - minScroll.y;
            }

            if (scrollDelta.y) {
              scrollContainer.scrollBy({
                top: -scrollDelta.y,
                behavior: scrollBehavior
              });
            }

            break;
          }
        }

        this.handleMove(event, (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.add)((0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.subtract)(newCoordinates, this.referenceCoordinates), scrollDelta));
      }
    }
  }

  handleMove(event, coordinates) {
    const {
      onMove
    } = this.props;
    event.preventDefault();
    onMove(coordinates);
  }

  handleEnd(event) {
    const {
      onEnd
    } = this.props;
    event.preventDefault();
    this.detach();
    onEnd();
  }

  handleCancel(event) {
    const {
      onCancel
    } = this.props;
    event.preventDefault();
    this.detach();
    onCancel();
  }

  detach() {
    this.listeners.removeAll();
    this.windowListeners.removeAll();
  }

}
KeyboardSensor.activators = [{
  eventName: 'onKeyDown',
  handler: (event, _ref, _ref2) => {
    let {
      keyboardCodes = defaultKeyboardCodes,
      onActivation
    } = _ref;
    let {
      active
    } = _ref2;
    const {
      code
    } = event.nativeEvent;

    if (keyboardCodes.start.includes(code)) {
      const activator = active.activatorNode.current;

      if (activator && event.target !== activator) {
        return false;
      }

      event.preventDefault();
      onActivation == null ? void 0 : onActivation({
        event: event.nativeEvent
      });
      return true;
    }

    return false;
  }
}];

function isDistanceConstraint(constraint) {
  return Boolean(constraint && 'distance' in constraint);
}

function isDelayConstraint(constraint) {
  return Boolean(constraint && 'delay' in constraint);
}

class AbstractPointerSensor {
  constructor(props, events, listenerTarget) {
    var _getEventCoordinates;

    if (listenerTarget === void 0) {
      listenerTarget = getEventListenerTarget(props.event.target);
    }

    this.props = void 0;
    this.events = void 0;
    this.autoScrollEnabled = true;
    this.document = void 0;
    this.activated = false;
    this.initialCoordinates = void 0;
    this.timeoutId = null;
    this.listeners = void 0;
    this.documentListeners = void 0;
    this.windowListeners = void 0;
    this.props = props;
    this.events = events;
    const {
      event
    } = props;
    const {
      target
    } = event;
    this.props = props;
    this.events = events;
    this.document = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getOwnerDocument)(target);
    this.documentListeners = new Listeners(this.document);
    this.listeners = new Listeners(listenerTarget);
    this.windowListeners = new Listeners((0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getWindow)(target));
    this.initialCoordinates = (_getEventCoordinates = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getEventCoordinates)(event)) != null ? _getEventCoordinates : defaultCoordinates;
    this.handleStart = this.handleStart.bind(this);
    this.handleMove = this.handleMove.bind(this);
    this.handleEnd = this.handleEnd.bind(this);
    this.handleCancel = this.handleCancel.bind(this);
    this.handleKeydown = this.handleKeydown.bind(this);
    this.removeTextSelection = this.removeTextSelection.bind(this);
    this.attach();
  }

  attach() {
    const {
      events,
      props: {
        options: {
          activationConstraint,
          bypassActivationConstraint
        }
      }
    } = this;
    this.listeners.add(events.move.name, this.handleMove, {
      passive: false
    });
    this.listeners.add(events.end.name, this.handleEnd);

    if (events.cancel) {
      this.listeners.add(events.cancel.name, this.handleCancel);
    }

    this.windowListeners.add(EventName.Resize, this.handleCancel);
    this.windowListeners.add(EventName.DragStart, preventDefault);
    this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);
    this.windowListeners.add(EventName.ContextMenu, preventDefault);
    this.documentListeners.add(EventName.Keydown, this.handleKeydown);

    if (activationConstraint) {
      if (bypassActivationConstraint != null && bypassActivationConstraint({
        event: this.props.event,
        activeNode: this.props.activeNode,
        options: this.props.options
      })) {
        return this.handleStart();
      }

      if (isDelayConstraint(activationConstraint)) {
        this.timeoutId = setTimeout(this.handleStart, activationConstraint.delay);
        this.handlePending(activationConstraint);
        return;
      }

      if (isDistanceConstraint(activationConstraint)) {
        this.handlePending(activationConstraint);
        return;
      }
    }

    this.handleStart();
  }

  detach() {
    this.listeners.removeAll();
    this.windowListeners.removeAll(); // Wait until the next event loop before removing document listeners
    // This is necessary because we listen for `click` and `selection` events on the document

    setTimeout(this.documentListeners.removeAll, 50);

    if (this.timeoutId !== null) {
      clearTimeout(this.timeoutId);
      this.timeoutId = null;
    }
  }

  handlePending(constraint, offset) {
    const {
      active,
      onPending
    } = this.props;
    onPending(active, constraint, this.initialCoordinates, offset);
  }

  handleStart() {
    const {
      initialCoordinates
    } = this;
    const {
      onStart
    } = this.props;

    if (initialCoordinates) {
      this.activated = true; // Stop propagation of click events once activation constraints are met

      this.documentListeners.add(EventName.Click, stopPropagation, {
        capture: true
      }); // Remove any text selection from the document

      this.removeTextSelection(); // Prevent further text selection while dragging

      this.documentListeners.add(EventName.SelectionChange, this.removeTextSelection);
      onStart(initialCoordinates);
    }
  }

  handleMove(event) {
    var _getEventCoordinates2;

    const {
      activated,
      initialCoordinates,
      props
    } = this;
    const {
      onMove,
      options: {
        activationConstraint
      }
    } = props;

    if (!initialCoordinates) {
      return;
    }

    const coordinates = (_getEventCoordinates2 = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getEventCoordinates)(event)) != null ? _getEventCoordinates2 : defaultCoordinates;
    const delta = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.subtract)(initialCoordinates, coordinates); // Constraint validation

    if (!activated && activationConstraint) {
      if (isDistanceConstraint(activationConstraint)) {
        if (activationConstraint.tolerance != null && hasExceededDistance(delta, activationConstraint.tolerance)) {
          return this.handleCancel();
        }

        if (hasExceededDistance(delta, activationConstraint.distance)) {
          return this.handleStart();
        }
      }

      if (isDelayConstraint(activationConstraint)) {
        if (hasExceededDistance(delta, activationConstraint.tolerance)) {
          return this.handleCancel();
        }
      }

      this.handlePending(activationConstraint, delta);
      return;
    }

    if (event.cancelable) {
      event.preventDefault();
    }

    onMove(coordinates);
  }

  handleEnd() {
    const {
      onAbort,
      onEnd
    } = this.props;
    this.detach();

    if (!this.activated) {
      onAbort(this.props.active);
    }

    onEnd();
  }

  handleCancel() {
    const {
      onAbort,
      onCancel
    } = this.props;
    this.detach();

    if (!this.activated) {
      onAbort(this.props.active);
    }

    onCancel();
  }

  handleKeydown(event) {
    if (event.code === KeyboardCode.Esc) {
      this.handleCancel();
    }
  }

  removeTextSelection() {
    var _this$document$getSel;

    (_this$document$getSel = this.document.getSelection()) == null ? void 0 : _this$document$getSel.removeAllRanges();
  }

}

const events = {
  cancel: {
    name: 'pointercancel'
  },
  move: {
    name: 'pointermove'
  },
  end: {
    name: 'pointerup'
  }
};
class PointerSensor extends AbstractPointerSensor {
  constructor(props) {
    const {
      event
    } = props; // Pointer events stop firing if the target is unmounted while dragging
    // Therefore we attach listeners to the owner document instead

    const listenerTarget = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getOwnerDocument)(event.target);
    super(props, events, listenerTarget);
  }

}
PointerSensor.activators = [{
  eventName: 'onPointerDown',
  handler: (_ref, _ref2) => {
    let {
      nativeEvent: event
    } = _ref;
    let {
      onActivation
    } = _ref2;

    if (!event.isPrimary || event.button !== 0) {
      return false;
    }

    onActivation == null ? void 0 : onActivation({
      event
    });
    return true;
  }
}];

const events$1 = {
  move: {
    name: 'mousemove'
  },
  end: {
    name: 'mouseup'
  }
};
var MouseButton;

(function (MouseButton) {
  MouseButton[MouseButton["RightClick"] = 2] = "RightClick";
})(MouseButton || (MouseButton = {}));

class MouseSensor extends AbstractPointerSensor {
  constructor(props) {
    super(props, events$1, (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getOwnerDocument)(props.event.target));
  }

}
MouseSensor.activators = [{
  eventName: 'onMouseDown',
  handler: (_ref, _ref2) => {
    let {
      nativeEvent: event
    } = _ref;
    let {
      onActivation
    } = _ref2;

    if (event.button === MouseButton.RightClick) {
      return false;
    }

    onActivation == null ? void 0 : onActivation({
      event
    });
    return true;
  }
}];

const events$2 = {
  cancel: {
    name: 'touchcancel'
  },
  move: {
    name: 'touchmove'
  },
  end: {
    name: 'touchend'
  }
};
class TouchSensor extends AbstractPointerSensor {
  constructor(props) {
    super(props, events$2);
  }

  static setup() {
    // Adding a non-capture and non-passive `touchmove` listener in order
    // to force `event.preventDefault()` calls to work in dynamically added
    // touchmove event handlers. This is required for iOS Safari.
    window.addEventListener(events$2.move.name, noop, {
      capture: false,
      passive: false
    });
    return function teardown() {
      window.removeEventListener(events$2.move.name, noop);
    }; // We create a new handler because the teardown function of another sensor
    // could remove our event listener if we use a referentially equal listener.

    function noop() {}
  }

}
TouchSensor.activators = [{
  eventName: 'onTouchStart',
  handler: (_ref, _ref2) => {
    let {
      nativeEvent: event
    } = _ref;
    let {
      onActivation
    } = _ref2;
    const {
      touches
    } = event;

    if (touches.length > 1) {
      return false;
    }

    onActivation == null ? void 0 : onActivation({
      event
    });
    return true;
  }
}];

var AutoScrollActivator;

(function (AutoScrollActivator) {
  AutoScrollActivator[AutoScrollActivator["Pointer"] = 0] = "Pointer";
  AutoScrollActivator[AutoScrollActivator["DraggableRect"] = 1] = "DraggableRect";
})(AutoScrollActivator || (AutoScrollActivator = {}));

var TraversalOrder;

(function (TraversalOrder) {
  TraversalOrder[TraversalOrder["TreeOrder"] = 0] = "TreeOrder";
  TraversalOrder[TraversalOrder["ReversedTreeOrder"] = 1] = "ReversedTreeOrder";
})(TraversalOrder || (TraversalOrder = {}));

function useAutoScroller(_ref) {
  let {
    acceleration,
    activator = AutoScrollActivator.Pointer,
    canScroll,
    draggingRect,
    enabled,
    interval = 5,
    order = TraversalOrder.TreeOrder,
    pointerCoordinates,
    scrollableAncestors,
    scrollableAncestorRects,
    delta,
    threshold
  } = _ref;
  const scrollIntent = useScrollIntent({
    delta,
    disabled: !enabled
  });
  const [setAutoScrollInterval, clearAutoScrollInterval] = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useInterval)();
  const scrollSpeed = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({
    x: 0,
    y: 0
  });
  const scrollDirection = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({
    x: 0,
    y: 0
  });
  const rect = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
    switch (activator) {
      case AutoScrollActivator.Pointer:
        return pointerCoordinates ? {
          top: pointerCoordinates.y,
          bottom: pointerCoordinates.y,
          left: pointerCoordinates.x,
          right: pointerCoordinates.x
        } : null;

      case AutoScrollActivator.DraggableRect:
        return draggingRect;
    }
  }, [activator, draggingRect, pointerCoordinates]);
  const scrollContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const autoScroll = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
    const scrollContainer = scrollContainerRef.current;

    if (!scrollContainer) {
      return;
    }

    const scrollLeft = scrollSpeed.current.x * scrollDirection.current.x;
    const scrollTop = scrollSpeed.current.y * scrollDirection.current.y;
    scrollContainer.scrollBy(scrollLeft, scrollTop);
  }, []);
  const sortedScrollableAncestors = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => order === TraversalOrder.TreeOrder ? [...scrollableAncestors].reverse() : scrollableAncestors, [order, scrollableAncestors]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (!enabled || !scrollableAncestors.length || !rect) {
      clearAutoScrollInterval();
      return;
    }

    for (const scrollContainer of sortedScrollableAncestors) {
      if ((canScroll == null ? void 0 : canScroll(scrollContainer)) === false) {
        continue;
      }

      const index = scrollableAncestors.indexOf(scrollContainer);
      const scrollContainerRect = scrollableAncestorRects[index];

      if (!scrollContainerRect) {
        continue;
      }

      const {
        direction,
        speed
      } = getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, rect, acceleration, threshold);

      for (const axis of ['x', 'y']) {
        if (!scrollIntent[axis][direction[axis]]) {
          speed[axis] = 0;
          direction[axis] = 0;
        }
      }

      if (speed.x > 0 || speed.y > 0) {
        clearAutoScrollInterval();
        scrollContainerRef.current = scrollContainer;
        setAutoScrollInterval(autoScroll, interval);
        scrollSpeed.current = speed;
        scrollDirection.current = direction;
        return;
      }
    }

    scrollSpeed.current = {
      x: 0,
      y: 0
    };
    scrollDirection.current = {
      x: 0,
      y: 0
    };
    clearAutoScrollInterval();
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
  [acceleration, autoScroll, canScroll, clearAutoScrollInterval, enabled, interval, // eslint-disable-next-line react-hooks/exhaustive-deps
  JSON.stringify(rect), // eslint-disable-next-line react-hooks/exhaustive-deps
  JSON.stringify(scrollIntent), setAutoScrollInterval, scrollableAncestors, sortedScrollableAncestors, scrollableAncestorRects, // eslint-disable-next-line react-hooks/exhaustive-deps
  JSON.stringify(threshold)]);
}
const defaultScrollIntent = {
  x: {
    [Direction.Backward]: false,
    [Direction.Forward]: false
  },
  y: {
    [Direction.Backward]: false,
    [Direction.Forward]: false
  }
};

function useScrollIntent(_ref2) {
  let {
    delta,
    disabled
  } = _ref2;
  const previousDelta = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.usePrevious)(delta);
  return (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useLazyMemo)(previousIntent => {
    if (disabled || !previousDelta || !previousIntent) {
      // Reset scroll intent tracking when auto-scrolling is disabled
      return defaultScrollIntent;
    }

    const direction = {
      x: Math.sign(delta.x - previousDelta.x),
      y: Math.sign(delta.y - previousDelta.y)
    }; // Keep track of the user intent to scroll in each direction for both axis

    return {
      x: {
        [Direction.Backward]: previousIntent.x[Direction.Backward] || direction.x === -1,
        [Direction.Forward]: previousIntent.x[Direction.Forward] || direction.x === 1
      },
      y: {
        [Direction.Backward]: previousIntent.y[Direction.Backward] || direction.y === -1,
        [Direction.Forward]: previousIntent.y[Direction.Forward] || direction.y === 1
      }
    };
  }, [disabled, delta, previousDelta]);
}

function useCachedNode(draggableNodes, id) {
  const draggableNode = id != null ? draggableNodes.get(id) : undefined;
  const node = draggableNode ? draggableNode.node.current : null;
  return (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useLazyMemo)(cachedNode => {
    var _ref;

    if (id == null) {
      return null;
    } // In some cases, the draggable node can unmount while dragging
    // This is the case for virtualized lists. In those situations,
    // we fall back to the last known value for that node.


    return (_ref = node != null ? node : cachedNode) != null ? _ref : null;
  }, [node, id]);
}

function useCombineActivators(sensors, getSyntheticHandler) {
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => sensors.reduce((accumulator, sensor) => {
    const {
      sensor: Sensor
    } = sensor;
    const sensorActivators = Sensor.activators.map(activator => ({
      eventName: activator.eventName,
      handler: getSyntheticHandler(activator.handler, sensor)
    }));
    return [...accumulator, ...sensorActivators];
  }, []), [sensors, getSyntheticHandler]);
}

var MeasuringStrategy;

(function (MeasuringStrategy) {
  MeasuringStrategy[MeasuringStrategy["Always"] = 0] = "Always";
  MeasuringStrategy[MeasuringStrategy["BeforeDragging"] = 1] = "BeforeDragging";
  MeasuringStrategy[MeasuringStrategy["WhileDragging"] = 2] = "WhileDragging";
})(MeasuringStrategy || (MeasuringStrategy = {}));

var MeasuringFrequency;

(function (MeasuringFrequency) {
  MeasuringFrequency["Optimized"] = "optimized";
})(MeasuringFrequency || (MeasuringFrequency = {}));

const defaultValue = /*#__PURE__*/new Map();
function useDroppableMeasuring(containers, _ref) {
  let {
    dragging,
    dependencies,
    config
  } = _ref;
  const [queue, setQueue] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
  const {
    frequency,
    measure,
    strategy
  } = config;
  const containersRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(containers);
  const disabled = isDisabled();
  const disabledRef = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useLatestValue)(disabled);
  const measureDroppableContainers = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (ids) {
    if (ids === void 0) {
      ids = [];
    }

    if (disabledRef.current) {
      return;
    }

    setQueue(value => {
      if (value === null) {
        return ids;
      }

      return value.concat(ids.filter(id => !value.includes(id)));
    });
  }, [disabledRef]);
  const timeoutId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const droppableRects = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useLazyMemo)(previousValue => {
    if (disabled && !dragging) {
      return defaultValue;
    }

    if (!previousValue || previousValue === defaultValue || containersRef.current !== containers || queue != null) {
      const map = new Map();

      for (let container of containers) {
        if (!container) {
          continue;
        }

        if (queue && queue.length > 0 && !queue.includes(container.id) && container.rect.current) {
          // This container does not need to be re-measured
          map.set(container.id, container.rect.current);
          continue;
        }

        const node = container.node.current;
        const rect = node ? new Rect(measure(node), node) : null;
        container.rect.current = rect;

        if (rect) {
          map.set(container.id, rect);
        }
      }

      return map;
    }

    return previousValue;
  }, [containers, queue, dragging, disabled, measure]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    containersRef.current = containers;
  }, [containers]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (disabled) {
      return;
    }

    measureDroppableContainers();
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
  [dragging, disabled]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (queue && queue.length > 0) {
      setQueue(null);
    }
  }, //eslint-disable-next-line react-hooks/exhaustive-deps
  [JSON.stringify(queue)]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (disabled || typeof frequency !== 'number' || timeoutId.current !== null) {
      return;
    }

    timeoutId.current = setTimeout(() => {
      measureDroppableContainers();
      timeoutId.current = null;
    }, frequency);
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
  [frequency, disabled, measureDroppableContainers, ...dependencies]);
  return {
    droppableRects,
    measureDroppableContainers,
    measuringScheduled: queue != null
  };

  function isDisabled() {
    switch (strategy) {
      case MeasuringStrategy.Always:
        return false;

      case MeasuringStrategy.BeforeDragging:
        return dragging;

      default:
        return !dragging;
    }
  }
}

function useInitialValue(value, computeFn) {
  return (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useLazyMemo)(previousValue => {
    if (!value) {
      return null;
    }

    if (previousValue) {
      return previousValue;
    }

    return typeof computeFn === 'function' ? computeFn(value) : value;
  }, [computeFn, value]);
}

function useInitialRect(node, measure) {
  return useInitialValue(node, measure);
}

/**
 * Returns a new MutationObserver instance.
 * If `MutationObserver` is undefined in the execution environment, returns `undefined`.
 */

function useMutationObserver(_ref) {
  let {
    callback,
    disabled
  } = _ref;
  const handleMutations = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useEvent)(callback);
  const mutationObserver = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
    if (disabled || typeof window === 'undefined' || typeof window.MutationObserver === 'undefined') {
      return undefined;
    }

    const {
      MutationObserver
    } = window;
    return new MutationObserver(handleMutations);
  }, [handleMutations, disabled]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    return () => mutationObserver == null ? void 0 : mutationObserver.disconnect();
  }, [mutationObserver]);
  return mutationObserver;
}

/**
 * Returns a new ResizeObserver instance bound to the `onResize` callback.
 * If `ResizeObserver` is undefined in the execution environment, returns `undefined`.
 */

function useResizeObserver(_ref) {
  let {
    callback,
    disabled
  } = _ref;
  const handleResize = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useEvent)(callback);
  const resizeObserver = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
    if (disabled || typeof window === 'undefined' || typeof window.ResizeObserver === 'undefined') {
      return undefined;
    }

    const {
      ResizeObserver
    } = window;
    return new ResizeObserver(handleResize);
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
  [disabled]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    return () => resizeObserver == null ? void 0 : resizeObserver.disconnect();
  }, [resizeObserver]);
  return resizeObserver;
}

function defaultMeasure(element) {
  return new Rect(getClientRect(element), element);
}

function useRect(element, measure, fallbackRect) {
  if (measure === void 0) {
    measure = defaultMeasure;
  }

  const [rect, setRect] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);

  function measureRect() {
    setRect(currentRect => {
      if (!element) {
        return null;
      }

      if (element.isConnected === false) {
        var _ref;

        // Fall back to last rect we measured if the element is
        // no longer connected to the DOM.
        return (_ref = currentRect != null ? currentRect : fallbackRect) != null ? _ref : null;
      }

      const newRect = measure(element);

      if (JSON.stringify(currentRect) === JSON.stringify(newRect)) {
        return currentRect;
      }

      return newRect;
    });
  }

  const mutationObserver = useMutationObserver({
    callback(records) {
      if (!element) {
        return;
      }

      for (const record of records) {
        const {
          type,
          target
        } = record;

        if (type === 'childList' && target instanceof HTMLElement && target.contains(element)) {
          measureRect();
          break;
        }
      }
    }

  });
  const resizeObserver = useResizeObserver({
    callback: measureRect
  });
  (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useIsomorphicLayoutEffect)(() => {
    measureRect();

    if (element) {
      resizeObserver == null ? void 0 : resizeObserver.observe(element);
      mutationObserver == null ? void 0 : mutationObserver.observe(document.body, {
        childList: true,
        subtree: true
      });
    } else {
      resizeObserver == null ? void 0 : resizeObserver.disconnect();
      mutationObserver == null ? void 0 : mutationObserver.disconnect();
    }
  }, [element]);
  return rect;
}

function useRectDelta(rect) {
  const initialRect = useInitialValue(rect);
  return getRectDelta(rect, initialRect);
}

const defaultValue$1 = [];
function useScrollableAncestors(node) {
  const previousNode = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(node);
  const ancestors = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useLazyMemo)(previousValue => {
    if (!node) {
      return defaultValue$1;
    }

    if (previousValue && previousValue !== defaultValue$1 && node && previousNode.current && node.parentNode === previousNode.current.parentNode) {
      return previousValue;
    }

    return getScrollableAncestors(node);
  }, [node]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    previousNode.current = node;
  }, [node]);
  return ancestors;
}

function useScrollOffsets(elements) {
  const [scrollCoordinates, setScrollCoordinates] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
  const prevElements = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(elements); // To-do: Throttle the handleScroll callback

  const handleScroll = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(event => {
    const scrollingElement = getScrollableElement(event.target);

    if (!scrollingElement) {
      return;
    }

    setScrollCoordinates(scrollCoordinates => {
      if (!scrollCoordinates) {
        return null;
      }

      scrollCoordinates.set(scrollingElement, getScrollCoordinates(scrollingElement));
      return new Map(scrollCoordinates);
    });
  }, []);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const previousElements = prevElements.current;

    if (elements !== previousElements) {
      cleanup(previousElements);
      const entries = elements.map(element => {
        const scrollableElement = getScrollableElement(element);

        if (scrollableElement) {
          scrollableElement.addEventListener('scroll', handleScroll, {
            passive: true
          });
          return [scrollableElement, getScrollCoordinates(scrollableElement)];
        }

        return null;
      }).filter(entry => entry != null);
      setScrollCoordinates(entries.length ? new Map(entries) : null);
      prevElements.current = elements;
    }

    return () => {
      cleanup(elements);
      cleanup(previousElements);
    };

    function cleanup(elements) {
      elements.forEach(element => {
        const scrollableElement = getScrollableElement(element);
        scrollableElement == null ? void 0 : scrollableElement.removeEventListener('scroll', handleScroll);
      });
    }
  }, [handleScroll, elements]);
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
    if (elements.length) {
      return scrollCoordinates ? Array.from(scrollCoordinates.values()).reduce((acc, coordinates) => (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.add)(acc, coordinates), defaultCoordinates) : getScrollOffsets(elements);
    }

    return defaultCoordinates;
  }, [elements, scrollCoordinates]);
}

function useScrollOffsetsDelta(scrollOffsets, dependencies) {
  if (dependencies === void 0) {
    dependencies = [];
  }

  const initialScrollOffsets = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    initialScrollOffsets.current = null;
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
  dependencies);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const hasScrollOffsets = scrollOffsets !== defaultCoordinates;

    if (hasScrollOffsets && !initialScrollOffsets.current) {
      initialScrollOffsets.current = scrollOffsets;
    }

    if (!hasScrollOffsets && initialScrollOffsets.current) {
      initialScrollOffsets.current = null;
    }
  }, [scrollOffsets]);
  return initialScrollOffsets.current ? (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.subtract)(scrollOffsets, initialScrollOffsets.current) : defaultCoordinates;
}

function useSensorSetup(sensors) {
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (!_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.canUseDOM) {
      return;
    }

    const teardownFns = sensors.map(_ref => {
      let {
        sensor
      } = _ref;
      return sensor.setup == null ? void 0 : sensor.setup();
    });
    return () => {
      for (const teardown of teardownFns) {
        teardown == null ? void 0 : teardown();
      }
    };
  }, // TO-DO: Sensors length could theoretically change which would not be a valid dependency
  // eslint-disable-next-line react-hooks/exhaustive-deps
  sensors.map(_ref2 => {
    let {
      sensor
    } = _ref2;
    return sensor;
  }));
}

function useSyntheticListeners(listeners, id) {
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
    return listeners.reduce((acc, _ref) => {
      let {
        eventName,
        handler
      } = _ref;

      acc[eventName] = event => {
        handler(event, id);
      };

      return acc;
    }, {});
  }, [listeners, id]);
}

function useWindowRect(element) {
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => element ? getWindowClientRect(element) : null, [element]);
}

const defaultValue$2 = [];
function useRects(elements, measure) {
  if (measure === void 0) {
    measure = getClientRect;
  }

  const [firstElement] = elements;
  const windowRect = useWindowRect(firstElement ? (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getWindow)(firstElement) : null);
  const [rects, setRects] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultValue$2);

  function measureRects() {
    setRects(() => {
      if (!elements.length) {
        return defaultValue$2;
      }

      return elements.map(element => isDocumentScrollingElement(element) ? windowRect : new Rect(measure(element), element));
    });
  }

  const resizeObserver = useResizeObserver({
    callback: measureRects
  });
  (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useIsomorphicLayoutEffect)(() => {
    resizeObserver == null ? void 0 : resizeObserver.disconnect();
    measureRects();
    elements.forEach(element => resizeObserver == null ? void 0 : resizeObserver.observe(element));
  }, [elements]);
  return rects;
}

function getMeasurableNode(node) {
  if (!node) {
    return null;
  }

  if (node.children.length > 1) {
    return node;
  }

  const firstChild = node.children[0];
  return (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(firstChild) ? firstChild : node;
}

function useDragOverlayMeasuring(_ref) {
  let {
    measure
  } = _ref;
  const [rect, setRect] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
  const handleResize = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(entries => {
    for (const {
      target
    } of entries) {
      if ((0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(target)) {
        setRect(rect => {
          const newRect = measure(target);
          return rect ? { ...rect,
            width: newRect.width,
            height: newRect.height
          } : newRect;
        });
        break;
      }
    }
  }, [measure]);
  const resizeObserver = useResizeObserver({
    callback: handleResize
  });
  const handleNodeChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(element => {
    const node = getMeasurableNode(element);
    resizeObserver == null ? void 0 : resizeObserver.disconnect();

    if (node) {
      resizeObserver == null ? void 0 : resizeObserver.observe(node);
    }

    setRect(node ? measure(node) : null);
  }, [measure, resizeObserver]);
  const [nodeRef, setRef] = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useNodeRef)(handleNodeChange);
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
    nodeRef,
    rect,
    setRef
  }), [rect, nodeRef, setRef]);
}

const defaultSensors = [{
  sensor: PointerSensor,
  options: {}
}, {
  sensor: KeyboardSensor,
  options: {}
}];
const defaultData = {
  current: {}
};
const defaultMeasuringConfiguration = {
  draggable: {
    measure: getTransformAgnosticClientRect
  },
  droppable: {
    measure: getTransformAgnosticClientRect,
    strategy: MeasuringStrategy.WhileDragging,
    frequency: MeasuringFrequency.Optimized
  },
  dragOverlay: {
    measure: getClientRect
  }
};

class DroppableContainersMap extends Map {
  get(id) {
    var _super$get;

    return id != null ? (_super$get = super.get(id)) != null ? _super$get : undefined : undefined;
  }

  toArray() {
    return Array.from(this.values());
  }

  getEnabled() {
    return this.toArray().filter(_ref => {
      let {
        disabled
      } = _ref;
      return !disabled;
    });
  }

  getNodeFor(id) {
    var _this$get$node$curren, _this$get;

    return (_this$get$node$curren = (_this$get = this.get(id)) == null ? void 0 : _this$get.node.current) != null ? _this$get$node$curren : undefined;
  }

}

const defaultPublicContext = {
  activatorEvent: null,
  active: null,
  activeNode: null,
  activeNodeRect: null,
  collisions: null,
  containerNodeRect: null,
  draggableNodes: /*#__PURE__*/new Map(),
  droppableRects: /*#__PURE__*/new Map(),
  droppableContainers: /*#__PURE__*/new DroppableContainersMap(),
  over: null,
  dragOverlay: {
    nodeRef: {
      current: null
    },
    rect: null,
    setRef: noop
  },
  scrollableAncestors: [],
  scrollableAncestorRects: [],
  measuringConfiguration: defaultMeasuringConfiguration,
  measureDroppableContainers: noop,
  windowRect: null,
  measuringScheduled: false
};
const defaultInternalContext = {
  activatorEvent: null,
  activators: [],
  active: null,
  activeNodeRect: null,
  ariaDescribedById: {
    draggable: ''
  },
  dispatch: noop,
  draggableNodes: /*#__PURE__*/new Map(),
  over: null,
  measureDroppableContainers: noop
};
const InternalContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(defaultInternalContext);
const PublicContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(defaultPublicContext);

function getInitialState() {
  return {
    draggable: {
      active: null,
      initialCoordinates: {
        x: 0,
        y: 0
      },
      nodes: new Map(),
      translate: {
        x: 0,
        y: 0
      }
    },
    droppable: {
      containers: new DroppableContainersMap()
    }
  };
}
function reducer(state, action) {
  switch (action.type) {
    case Action.DragStart:
      return { ...state,
        draggable: { ...state.draggable,
          initialCoordinates: action.initialCoordinates,
          active: action.active
        }
      };

    case Action.DragMove:
      if (state.draggable.active == null) {
        return state;
      }

      return { ...state,
        draggable: { ...state.draggable,
          translate: {
            x: action.coordinates.x - state.draggable.initialCoordinates.x,
            y: action.coordinates.y - state.draggable.initialCoordinates.y
          }
        }
      };

    case Action.DragEnd:
    case Action.DragCancel:
      return { ...state,
        draggable: { ...state.draggable,
          active: null,
          initialCoordinates: {
            x: 0,
            y: 0
          },
          translate: {
            x: 0,
            y: 0
          }
        }
      };

    case Action.RegisterDroppable:
      {
        const {
          element
        } = action;
        const {
          id
        } = element;
        const containers = new DroppableContainersMap(state.droppable.containers);
        containers.set(id, element);
        return { ...state,
          droppable: { ...state.droppable,
            containers
          }
        };
      }

    case Action.SetDroppableDisabled:
      {
        const {
          id,
          key,
          disabled
        } = action;
        const element = state.droppable.containers.get(id);

        if (!element || key !== element.key) {
          return state;
        }

        const containers = new DroppableContainersMap(state.droppable.containers);
        containers.set(id, { ...element,
          disabled
        });
        return { ...state,
          droppable: { ...state.droppable,
            containers
          }
        };
      }

    case Action.UnregisterDroppable:
      {
        const {
          id,
          key
        } = action;
        const element = state.droppable.containers.get(id);

        if (!element || key !== element.key) {
          return state;
        }

        const containers = new DroppableContainersMap(state.droppable.containers);
        containers.delete(id);
        return { ...state,
          droppable: { ...state.droppable,
            containers
          }
        };
      }

    default:
      {
        return state;
      }
  }
}

function RestoreFocus(_ref) {
  let {
    disabled
  } = _ref;
  const {
    active,
    activatorEvent,
    draggableNodes
  } = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(InternalContext);
  const previousActivatorEvent = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.usePrevious)(activatorEvent);
  const previousActiveId = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.usePrevious)(active == null ? void 0 : active.id); // Restore keyboard focus on the activator node

  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (disabled) {
      return;
    }

    if (!activatorEvent && previousActivatorEvent && previousActiveId != null) {
      if (!(0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isKeyboardEvent)(previousActivatorEvent)) {
        return;
      }

      if (document.activeElement === previousActivatorEvent.target) {
        // No need to restore focus
        return;
      }

      const draggableNode = draggableNodes.get(previousActiveId);

      if (!draggableNode) {
        return;
      }

      const {
        activatorNode,
        node
      } = draggableNode;

      if (!activatorNode.current && !node.current) {
        return;
      }

      requestAnimationFrame(() => {
        for (const element of [activatorNode.current, node.current]) {
          if (!element) {
            continue;
          }

          const focusableNode = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.findFirstFocusableNode)(element);

          if (focusableNode) {
            focusableNode.focus();
            break;
          }
        }
      });
    }
  }, [activatorEvent, disabled, draggableNodes, previousActiveId, previousActivatorEvent]);
  return null;
}

function applyModifiers(modifiers, _ref) {
  let {
    transform,
    ...args
  } = _ref;
  return modifiers != null && modifiers.length ? modifiers.reduce((accumulator, modifier) => {
    return modifier({
      transform: accumulator,
      ...args
    });
  }, transform) : transform;
}

function useMeasuringConfiguration(config) {
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
    draggable: { ...defaultMeasuringConfiguration.draggable,
      ...(config == null ? void 0 : config.draggable)
    },
    droppable: { ...defaultMeasuringConfiguration.droppable,
      ...(config == null ? void 0 : config.droppable)
    },
    dragOverlay: { ...defaultMeasuringConfiguration.dragOverlay,
      ...(config == null ? void 0 : config.dragOverlay)
    }
  }), // eslint-disable-next-line react-hooks/exhaustive-deps
  [config == null ? void 0 : config.draggable, config == null ? void 0 : config.droppable, config == null ? void 0 : config.dragOverlay]);
}

function useLayoutShiftScrollCompensation(_ref) {
  let {
    activeNode,
    measure,
    initialRect,
    config = true
  } = _ref;
  const initialized = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
  const {
    x,
    y
  } = typeof config === 'boolean' ? {
    x: config,
    y: config
  } : config;
  (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useIsomorphicLayoutEffect)(() => {
    const disabled = !x && !y;

    if (disabled || !activeNode) {
      initialized.current = false;
      return;
    }

    if (initialized.current || !initialRect) {
      // Return early if layout shift scroll compensation was already attempted
      // or if there is no initialRect to compare to.
      return;
    } // Get the most up to date node ref for the active draggable


    const node = activeNode == null ? void 0 : activeNode.node.current;

    if (!node || node.isConnected === false) {
      // Return early if there is no attached node ref or if the node is
      // disconnected from the document.
      return;
    }

    const rect = measure(node);
    const rectDelta = getRectDelta(rect, initialRect);

    if (!x) {
      rectDelta.x = 0;
    }

    if (!y) {
      rectDelta.y = 0;
    } // Only perform layout shift scroll compensation once


    initialized.current = true;

    if (Math.abs(rectDelta.x) > 0 || Math.abs(rectDelta.y) > 0) {
      const firstScrollableAncestor = getFirstScrollableAncestor(node);

      if (firstScrollableAncestor) {
        firstScrollableAncestor.scrollBy({
          top: rectDelta.y,
          left: rectDelta.x
        });
      }
    }
  }, [activeNode, x, y, initialRect, measure]);
}

const ActiveDraggableContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({ ...defaultCoordinates,
  scaleX: 1,
  scaleY: 1
});
var Status;

(function (Status) {
  Status[Status["Uninitialized"] = 0] = "Uninitialized";
  Status[Status["Initializing"] = 1] = "Initializing";
  Status[Status["Initialized"] = 2] = "Initialized";
})(Status || (Status = {}));

const DndContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function DndContext(_ref) {
  var _sensorContext$curren, _dragOverlay$nodeRef$, _dragOverlay$rect, _over$rect;

  let {
    id,
    accessibility,
    autoScroll = true,
    children,
    sensors = defaultSensors,
    collisionDetection = rectIntersection,
    measuring,
    modifiers,
    ...props
  } = _ref;
  const store = (0,react__WEBPACK_IMPORTED_MODULE_0__.useReducer)(reducer, undefined, getInitialState);
  const [state, dispatch] = store;
  const [dispatchMonitorEvent, registerMonitorListener] = useDndMonitorProvider();
  const [status, setStatus] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(Status.Uninitialized);
  const isInitialized = status === Status.Initialized;
  const {
    draggable: {
      active: activeId,
      nodes: draggableNodes,
      translate
    },
    droppable: {
      containers: droppableContainers
    }
  } = state;
  const node = activeId != null ? draggableNodes.get(activeId) : null;
  const activeRects = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({
    initial: null,
    translated: null
  });
  const active = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
    var _node$data;

    return activeId != null ? {
      id: activeId,
      // It's possible for the active node to unmount while dragging
      data: (_node$data = node == null ? void 0 : node.data) != null ? _node$data : defaultData,
      rect: activeRects
    } : null;
  }, [activeId, node]);
  const activeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const [activeSensor, setActiveSensor] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
  const [activatorEvent, setActivatorEvent] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
  const latestProps = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useLatestValue)(props, Object.values(props));
  const draggableDescribedById = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useUniqueId)("DndDescribedBy", id);
  const enabledDroppableContainers = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => droppableContainers.getEnabled(), [droppableContainers]);
  const measuringConfiguration = useMeasuringConfiguration(measuring);
  const {
    droppableRects,
    measureDroppableContainers,
    measuringScheduled
  } = useDroppableMeasuring(enabledDroppableContainers, {
    dragging: isInitialized,
    dependencies: [translate.x, translate.y],
    config: measuringConfiguration.droppable
  });
  const activeNode = useCachedNode(draggableNodes, activeId);
  const activationCoordinates = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => activatorEvent ? (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getEventCoordinates)(activatorEvent) : null, [activatorEvent]);
  const autoScrollOptions = getAutoScrollerOptions();
  const initialActiveNodeRect = useInitialRect(activeNode, measuringConfiguration.draggable.measure);
  useLayoutShiftScrollCompensation({
    activeNode: activeId != null ? draggableNodes.get(activeId) : null,
    config: autoScrollOptions.layoutShiftCompensation,
    initialRect: initialActiveNodeRect,
    measure: measuringConfiguration.draggable.measure
  });
  const activeNodeRect = useRect(activeNode, measuringConfiguration.draggable.measure, initialActiveNodeRect);
  const containerNodeRect = useRect(activeNode ? activeNode.parentElement : null);
  const sensorContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({
    activatorEvent: null,
    active: null,
    activeNode,
    collisionRect: null,
    collisions: null,
    droppableRects,
    draggableNodes,
    draggingNode: null,
    draggingNodeRect: null,
    droppableContainers,
    over: null,
    scrollableAncestors: [],
    scrollAdjustedTranslate: null
  });
  const overNode = droppableContainers.getNodeFor((_sensorContext$curren = sensorContext.current.over) == null ? void 0 : _sensorContext$curren.id);
  const dragOverlay = useDragOverlayMeasuring({
    measure: measuringConfiguration.dragOverlay.measure
  }); // Use the rect of the drag overlay if it is mounted

  const draggingNode = (_dragOverlay$nodeRef$ = dragOverlay.nodeRef.current) != null ? _dragOverlay$nodeRef$ : activeNode;
  const draggingNodeRect = isInitialized ? (_dragOverlay$rect = dragOverlay.rect) != null ? _dragOverlay$rect : activeNodeRect : null;
  const usesDragOverlay = Boolean(dragOverlay.nodeRef.current && dragOverlay.rect); // The delta between the previous and new position of the draggable node
  // is only relevant when there is no drag overlay

  const nodeRectDelta = useRectDelta(usesDragOverlay ? null : activeNodeRect); // Get the window rect of the dragging node

  const windowRect = useWindowRect(draggingNode ? (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getWindow)(draggingNode) : null); // Get scrollable ancestors of the dragging node

  const scrollableAncestors = useScrollableAncestors(isInitialized ? overNode != null ? overNode : activeNode : null);
  const scrollableAncestorRects = useRects(scrollableAncestors); // Apply modifiers

  const modifiedTranslate = applyModifiers(modifiers, {
    transform: {
      x: translate.x - nodeRectDelta.x,
      y: translate.y - nodeRectDelta.y,
      scaleX: 1,
      scaleY: 1
    },
    activatorEvent,
    active,
    activeNodeRect,
    containerNodeRect,
    draggingNodeRect,
    over: sensorContext.current.over,
    overlayNodeRect: dragOverlay.rect,
    scrollableAncestors,
    scrollableAncestorRects,
    windowRect
  });
  const pointerCoordinates = activationCoordinates ? (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.add)(activationCoordinates, translate) : null;
  const scrollOffsets = useScrollOffsets(scrollableAncestors); // Represents the scroll delta since dragging was initiated

  const scrollAdjustment = useScrollOffsetsDelta(scrollOffsets); // Represents the scroll delta since the last time the active node rect was measured

  const activeNodeScrollDelta = useScrollOffsetsDelta(scrollOffsets, [activeNodeRect]);
  const scrollAdjustedTranslate = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.add)(modifiedTranslate, scrollAdjustment);
  const collisionRect = draggingNodeRect ? getAdjustedRect(draggingNodeRect, modifiedTranslate) : null;
  const collisions = active && collisionRect ? collisionDetection({
    active,
    collisionRect,
    droppableRects,
    droppableContainers: enabledDroppableContainers,
    pointerCoordinates
  }) : null;
  const overId = getFirstCollision(collisions, 'id');
  const [over, setOver] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // When there is no drag overlay used, we need to account for the
  // window scroll delta

  const appliedTranslate = usesDragOverlay ? modifiedTranslate : (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.add)(modifiedTranslate, activeNodeScrollDelta);
  const transform = adjustScale(appliedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect);
  const activeSensorRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const instantiateSensor = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((event, _ref2) => {
    let {
      sensor: Sensor,
      options
    } = _ref2;

    if (activeRef.current == null) {
      return;
    }

    const activeNode = draggableNodes.get(activeRef.current);

    if (!activeNode) {
      return;
    }

    const activatorEvent = event.nativeEvent;
    const sensorInstance = new Sensor({
      active: activeRef.current,
      activeNode,
      event: activatorEvent,
      options,
      // Sensors need to be instantiated with refs for arguments that change over time
      // otherwise they are frozen in time with the stale arguments
      context: sensorContext,

      onAbort(id) {
        const draggableNode = draggableNodes.get(id);

        if (!draggableNode) {
          return;
        }

        const {
          onDragAbort
        } = latestProps.current;
        const event = {
          id
        };
        onDragAbort == null ? void 0 : onDragAbort(event);
        dispatchMonitorEvent({
          type: 'onDragAbort',
          event
        });
      },

      onPending(id, constraint, initialCoordinates, offset) {
        const draggableNode = draggableNodes.get(id);

        if (!draggableNode) {
          return;
        }

        const {
          onDragPending
        } = latestProps.current;
        const event = {
          id,
          constraint,
          initialCoordinates,
          offset
        };
        onDragPending == null ? void 0 : onDragPending(event);
        dispatchMonitorEvent({
          type: 'onDragPending',
          event
        });
      },

      onStart(initialCoordinates) {
        const id = activeRef.current;

        if (id == null) {
          return;
        }

        const draggableNode = draggableNodes.get(id);

        if (!draggableNode) {
          return;
        }

        const {
          onDragStart
        } = latestProps.current;
        const event = {
          activatorEvent,
          active: {
            id,
            data: draggableNode.data,
            rect: activeRects
          }
        };
        (0,react_dom__WEBPACK_IMPORTED_MODULE_1__.unstable_batchedUpdates)(() => {
          onDragStart == null ? void 0 : onDragStart(event);
          setStatus(Status.Initializing);
          dispatch({
            type: Action.DragStart,
            initialCoordinates,
            active: id
          });
          dispatchMonitorEvent({
            type: 'onDragStart',
            event
          });
          setActiveSensor(activeSensorRef.current);
          setActivatorEvent(activatorEvent);
        });
      },

      onMove(coordinates) {
        dispatch({
          type: Action.DragMove,
          coordinates
        });
      },

      onEnd: createHandler(Action.DragEnd),
      onCancel: createHandler(Action.DragCancel)
    });
    activeSensorRef.current = sensorInstance;

    function createHandler(type) {
      return async function handler() {
        const {
          active,
          collisions,
          over,
          scrollAdjustedTranslate
        } = sensorContext.current;
        let event = null;

        if (active && scrollAdjustedTranslate) {
          const {
            cancelDrop
          } = latestProps.current;
          event = {
            activatorEvent,
            active: active,
            collisions,
            delta: scrollAdjustedTranslate,
            over
          };

          if (type === Action.DragEnd && typeof cancelDrop === 'function') {
            const shouldCancel = await Promise.resolve(cancelDrop(event));

            if (shouldCancel) {
              type = Action.DragCancel;
            }
          }
        }

        activeRef.current = null;
        (0,react_dom__WEBPACK_IMPORTED_MODULE_1__.unstable_batchedUpdates)(() => {
          dispatch({
            type
          });
          setStatus(Status.Uninitialized);
          setOver(null);
          setActiveSensor(null);
          setActivatorEvent(null);
          activeSensorRef.current = null;
          const eventName = type === Action.DragEnd ? 'onDragEnd' : 'onDragCancel';

          if (event) {
            const handler = latestProps.current[eventName];
            handler == null ? void 0 : handler(event);
            dispatchMonitorEvent({
              type: eventName,
              event
            });
          }
        });
      };
    }
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
  [draggableNodes]);
  const bindActivatorToSensorInstantiator = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((handler, sensor) => {
    return (event, active) => {
      const nativeEvent = event.nativeEvent;
      const activeDraggableNode = draggableNodes.get(active);

      if ( // Another sensor is already instantiating
      activeRef.current !== null || // No active draggable
      !activeDraggableNode || // Event has already been captured
      nativeEvent.dndKit || nativeEvent.defaultPrevented) {
        return;
      }

      const activationContext = {
        active: activeDraggableNode
      };
      const shouldActivate = handler(event, sensor.options, activationContext);

      if (shouldActivate === true) {
        nativeEvent.dndKit = {
          capturedBy: sensor.sensor
        };
        activeRef.current = active;
        instantiateSensor(event, sensor);
      }
    };
  }, [draggableNodes, instantiateSensor]);
  const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);
  useSensorSetup(sensors);
  (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useIsomorphicLayoutEffect)(() => {
    if (activeNodeRect && status === Status.Initializing) {
      setStatus(Status.Initialized);
    }
  }, [activeNodeRect, status]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const {
      onDragMove
    } = latestProps.current;
    const {
      active,
      activatorEvent,
      collisions,
      over
    } = sensorContext.current;

    if (!active || !activatorEvent) {
      return;
    }

    const event = {
      active,
      activatorEvent,
      collisions,
      delta: {
        x: scrollAdjustedTranslate.x,
        y: scrollAdjustedTranslate.y
      },
      over
    };
    (0,react_dom__WEBPACK_IMPORTED_MODULE_1__.unstable_batchedUpdates)(() => {
      onDragMove == null ? void 0 : onDragMove(event);
      dispatchMonitorEvent({
        type: 'onDragMove',
        event
      });
    });
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
  [scrollAdjustedTranslate.x, scrollAdjustedTranslate.y]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const {
      active,
      activatorEvent,
      collisions,
      droppableContainers,
      scrollAdjustedTranslate
    } = sensorContext.current;

    if (!active || activeRef.current == null || !activatorEvent || !scrollAdjustedTranslate) {
      return;
    }

    const {
      onDragOver
    } = latestProps.current;
    const overContainer = droppableContainers.get(overId);
    const over = overContainer && overContainer.rect.current ? {
      id: overContainer.id,
      rect: overContainer.rect.current,
      data: overContainer.data,
      disabled: overContainer.disabled
    } : null;
    const event = {
      active,
      activatorEvent,
      collisions,
      delta: {
        x: scrollAdjustedTranslate.x,
        y: scrollAdjustedTranslate.y
      },
      over
    };
    (0,react_dom__WEBPACK_IMPORTED_MODULE_1__.unstable_batchedUpdates)(() => {
      setOver(over);
      onDragOver == null ? void 0 : onDragOver(event);
      dispatchMonitorEvent({
        type: 'onDragOver',
        event
      });
    });
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
  [overId]);
  (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useIsomorphicLayoutEffect)(() => {
    sensorContext.current = {
      activatorEvent,
      active,
      activeNode,
      collisionRect,
      collisions,
      droppableRects,
      draggableNodes,
      draggingNode,
      draggingNodeRect,
      droppableContainers,
      over,
      scrollableAncestors,
      scrollAdjustedTranslate
    };
    activeRects.current = {
      initial: draggingNodeRect,
      translated: collisionRect
    };
  }, [active, activeNode, collisions, collisionRect, draggableNodes, draggingNode, draggingNodeRect, droppableRects, droppableContainers, over, scrollableAncestors, scrollAdjustedTranslate]);
  useAutoScroller({ ...autoScrollOptions,
    delta: translate,
    draggingRect: collisionRect,
    pointerCoordinates,
    scrollableAncestors,
    scrollableAncestorRects
  });
  const publicContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
    const context = {
      active,
      activeNode,
      activeNodeRect,
      activatorEvent,
      collisions,
      containerNodeRect,
      dragOverlay,
      draggableNodes,
      droppableContainers,
      droppableRects,
      over,
      measureDroppableContainers,
      scrollableAncestors,
      scrollableAncestorRects,
      measuringConfiguration,
      measuringScheduled,
      windowRect
    };
    return context;
  }, [active, activeNode, activeNodeRect, activatorEvent, collisions, containerNodeRect, dragOverlay, draggableNodes, droppableContainers, droppableRects, over, measureDroppableContainers, scrollableAncestors, scrollableAncestorRects, measuringConfiguration, measuringScheduled, windowRect]);
  const internalContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
    const context = {
      activatorEvent,
      activators,
      active,
      activeNodeRect,
      ariaDescribedById: {
        draggable: draggableDescribedById
      },
      dispatch,
      draggableNodes,
      over,
      measureDroppableContainers
    };
    return context;
  }, [activatorEvent, activators, active, activeNodeRect, dispatch, draggableDescribedById, draggableNodes, over, measureDroppableContainers]);
  return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(DndMonitorContext.Provider, {
    value: registerMonitorListener
  }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(InternalContext.Provider, {
    value: internalContext
  }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PublicContext.Provider, {
    value: publicContext
  }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ActiveDraggableContext.Provider, {
    value: transform
  }, children)), react__WEBPACK_IMPORTED_MODULE_0___default().createElement(RestoreFocus, {
    disabled: (accessibility == null ? void 0 : accessibility.restoreFocus) === false
  })), react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Accessibility, { ...accessibility,
    hiddenTextDescribedById: draggableDescribedById
  }));

  function getAutoScrollerOptions() {
    const activeSensorDisablesAutoscroll = (activeSensor == null ? void 0 : activeSensor.autoScrollEnabled) === false;
    const autoScrollGloballyDisabled = typeof autoScroll === 'object' ? autoScroll.enabled === false : autoScroll === false;
    const enabled = isInitialized && !activeSensorDisablesAutoscroll && !autoScrollGloballyDisabled;

    if (typeof autoScroll === 'object') {
      return { ...autoScroll,
        enabled
      };
    }

    return {
      enabled
    };
  }
});

const NullContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
const defaultRole = 'button';
const ID_PREFIX = 'Draggable';
function useDraggable(_ref) {
  let {
    id,
    data,
    disabled = false,
    attributes
  } = _ref;
  const key = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useUniqueId)(ID_PREFIX);
  const {
    activators,
    activatorEvent,
    active,
    activeNodeRect,
    ariaDescribedById,
    draggableNodes,
    over
  } = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(InternalContext);
  const {
    role = defaultRole,
    roleDescription = 'draggable',
    tabIndex = 0
  } = attributes != null ? attributes : {};
  const isDragging = (active == null ? void 0 : active.id) === id;
  const transform = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(isDragging ? ActiveDraggableContext : NullContext);
  const [node, setNodeRef] = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useNodeRef)();
  const [activatorNode, setActivatorNodeRef] = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useNodeRef)();
  const listeners = useSyntheticListeners(activators, id);
  const dataRef = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useLatestValue)(data);
  (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useIsomorphicLayoutEffect)(() => {
    draggableNodes.set(id, {
      id,
      key,
      node,
      activatorNode,
      data: dataRef
    });
    return () => {
      const node = draggableNodes.get(id);

      if (node && node.key === key) {
        draggableNodes.delete(id);
      }
    };
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
  [draggableNodes, id]);
  const memoizedAttributes = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
    role,
    tabIndex,
    'aria-disabled': disabled,
    'aria-pressed': isDragging && role === defaultRole ? true : undefined,
    'aria-roledescription': roleDescription,
    'aria-describedby': ariaDescribedById.draggable
  }), [disabled, role, tabIndex, isDragging, roleDescription, ariaDescribedById.draggable]);
  return {
    active,
    activatorEvent,
    activeNodeRect,
    attributes: memoizedAttributes,
    isDragging,
    listeners: disabled ? undefined : listeners,
    node,
    over,
    setNodeRef,
    setActivatorNodeRef,
    transform
  };
}

function useDndContext() {
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(PublicContext);
}

const ID_PREFIX$1 = 'Droppable';
const defaultResizeObserverConfig = {
  timeout: 25
};
function useDroppable(_ref) {
  let {
    data,
    disabled = false,
    id,
    resizeObserverConfig
  } = _ref;
  const key = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useUniqueId)(ID_PREFIX$1);
  const {
    active,
    dispatch,
    over,
    measureDroppableContainers
  } = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(InternalContext);
  const previous = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({
    disabled
  });
  const resizeObserverConnected = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
  const rect = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const callbackId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const {
    disabled: resizeObserverDisabled,
    updateMeasurementsFor,
    timeout: resizeObserverTimeout
  } = { ...defaultResizeObserverConfig,
    ...resizeObserverConfig
  };
  const ids = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useLatestValue)(updateMeasurementsFor != null ? updateMeasurementsFor : id);
  const handleResize = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
    if (!resizeObserverConnected.current) {
      // ResizeObserver invokes the `handleResize` callback as soon as `observe` is called,
      // assuming the element is rendered and displayed.
      resizeObserverConnected.current = true;
      return;
    }

    if (callbackId.current != null) {
      clearTimeout(callbackId.current);
    }

    callbackId.current = setTimeout(() => {
      measureDroppableContainers(Array.isArray(ids.current) ? ids.current : [ids.current]);
      callbackId.current = null;
    }, resizeObserverTimeout);
  }, //eslint-disable-next-line react-hooks/exhaustive-deps
  [resizeObserverTimeout]);
  const resizeObserver = useResizeObserver({
    callback: handleResize,
    disabled: resizeObserverDisabled || !active
  });
  const handleNodeChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((newElement, previousElement) => {
    if (!resizeObserver) {
      return;
    }

    if (previousElement) {
      resizeObserver.unobserve(previousElement);
      resizeObserverConnected.current = false;
    }

    if (newElement) {
      resizeObserver.observe(newElement);
    }
  }, [resizeObserver]);
  const [nodeRef, setNodeRef] = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useNodeRef)(handleNodeChange);
  const dataRef = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useLatestValue)(data);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (!resizeObserver || !nodeRef.current) {
      return;
    }

    resizeObserver.disconnect();
    resizeObserverConnected.current = false;
    resizeObserver.observe(nodeRef.current);
  }, [nodeRef, resizeObserver]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    dispatch({
      type: Action.RegisterDroppable,
      element: {
        id,
        key,
        disabled,
        node: nodeRef,
        rect,
        data: dataRef
      }
    });
    return () => dispatch({
      type: Action.UnregisterDroppable,
      key,
      id
    });
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
  [id]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (disabled !== previous.current.disabled) {
      dispatch({
        type: Action.SetDroppableDisabled,
        id,
        key,
        disabled
      });
      previous.current.disabled = disabled;
    }
  }, [id, key, disabled, dispatch]);
  return {
    active,
    rect,
    isOver: (over == null ? void 0 : over.id) === id,
    node: nodeRef,
    over,
    setNodeRef
  };
}

function AnimationManager(_ref) {
  let {
    animation,
    children
  } = _ref;
  const [clonedChildren, setClonedChildren] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
  const [element, setElement] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
  const previousChildren = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.usePrevious)(children);

  if (!children && !clonedChildren && previousChildren) {
    setClonedChildren(previousChildren);
  }

  (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useIsomorphicLayoutEffect)(() => {
    if (!element) {
      return;
    }

    const key = clonedChildren == null ? void 0 : clonedChildren.key;
    const id = clonedChildren == null ? void 0 : clonedChildren.props.id;

    if (key == null || id == null) {
      setClonedChildren(null);
      return;
    }

    Promise.resolve(animation(id, element)).then(() => {
      setClonedChildren(null);
    });
  }, [animation, clonedChildren, element]);
  return react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, children, clonedChildren ? (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(clonedChildren, {
    ref: setElement
  }) : null);
}

const defaultTransform = {
  x: 0,
  y: 0,
  scaleX: 1,
  scaleY: 1
};
function NullifiedContextProvider(_ref) {
  let {
    children
  } = _ref;
  return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(InternalContext.Provider, {
    value: defaultInternalContext
  }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ActiveDraggableContext.Provider, {
    value: defaultTransform
  }, children));
}

const baseStyles = {
  position: 'fixed',
  touchAction: 'none'
};

const defaultTransition = activatorEvent => {
  const isKeyboardActivator = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isKeyboardEvent)(activatorEvent);
  return isKeyboardActivator ? 'transform 250ms ease' : undefined;
};

const PositionedOverlay = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((_ref, ref) => {
  let {
    as,
    activatorEvent,
    adjustScale,
    children,
    className,
    rect,
    style,
    transform,
    transition = defaultTransition
  } = _ref;

  if (!rect) {
    return null;
  }

  const scaleAdjustedTransform = adjustScale ? transform : { ...transform,
    scaleX: 1,
    scaleY: 1
  };
  const styles = { ...baseStyles,
    width: rect.width,
    height: rect.height,
    top: rect.top,
    left: rect.left,
    transform: _dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.CSS.Transform.toString(scaleAdjustedTransform),
    transformOrigin: adjustScale && activatorEvent ? getRelativeTransformOrigin(activatorEvent, rect) : undefined,
    transition: typeof transition === 'function' ? transition(activatorEvent) : transition,
    ...style
  };
  return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(as, {
    className,
    style: styles,
    ref
  }, children);
});

const defaultDropAnimationSideEffects = options => _ref => {
  let {
    active,
    dragOverlay
  } = _ref;
  const originalStyles = {};
  const {
    styles,
    className
  } = options;

  if (styles != null && styles.active) {
    for (const [key, value] of Object.entries(styles.active)) {
      if (value === undefined) {
        continue;
      }

      originalStyles[key] = active.node.style.getPropertyValue(key);
      active.node.style.setProperty(key, value);
    }
  }

  if (styles != null && styles.dragOverlay) {
    for (const [key, value] of Object.entries(styles.dragOverlay)) {
      if (value === undefined) {
        continue;
      }

      dragOverlay.node.style.setProperty(key, value);
    }
  }

  if (className != null && className.active) {
    active.node.classList.add(className.active);
  }

  if (className != null && className.dragOverlay) {
    dragOverlay.node.classList.add(className.dragOverlay);
  }

  return function cleanup() {
    for (const [key, value] of Object.entries(originalStyles)) {
      active.node.style.setProperty(key, value);
    }

    if (className != null && className.active) {
      active.node.classList.remove(className.active);
    }
  };
};

const defaultKeyframeResolver = _ref2 => {
  let {
    transform: {
      initial,
      final
    }
  } = _ref2;
  return [{
    transform: _dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.CSS.Transform.toString(initial)
  }, {
    transform: _dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.CSS.Transform.toString(final)
  }];
};

const defaultDropAnimationConfiguration = {
  duration: 250,
  easing: 'ease',
  keyframes: defaultKeyframeResolver,
  sideEffects: /*#__PURE__*/defaultDropAnimationSideEffects({
    styles: {
      active: {
        opacity: '0'
      }
    }
  })
};
function useDropAnimation(_ref3) {
  let {
    config,
    draggableNodes,
    droppableContainers,
    measuringConfiguration
  } = _ref3;
  return (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useEvent)((id, node) => {
    if (config === null) {
      return;
    }

    const activeDraggable = draggableNodes.get(id);

    if (!activeDraggable) {
      return;
    }

    const activeNode = activeDraggable.node.current;

    if (!activeNode) {
      return;
    }

    const measurableNode = getMeasurableNode(node);

    if (!measurableNode) {
      return;
    }

    const {
      transform
    } = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.getWindow)(node).getComputedStyle(node);
    const parsedTransform = parseTransform(transform);

    if (!parsedTransform) {
      return;
    }

    const animation = typeof config === 'function' ? config : createDefaultDropAnimation(config);
    scrollIntoViewIfNeeded(activeNode, measuringConfiguration.draggable.measure);
    return animation({
      active: {
        id,
        data: activeDraggable.data,
        node: activeNode,
        rect: measuringConfiguration.draggable.measure(activeNode)
      },
      draggableNodes,
      dragOverlay: {
        node,
        rect: measuringConfiguration.dragOverlay.measure(measurableNode)
      },
      droppableContainers,
      measuringConfiguration,
      transform: parsedTransform
    });
  });
}

function createDefaultDropAnimation(options) {
  const {
    duration,
    easing,
    sideEffects,
    keyframes
  } = { ...defaultDropAnimationConfiguration,
    ...options
  };
  return _ref4 => {
    let {
      active,
      dragOverlay,
      transform,
      ...rest
    } = _ref4;

    if (!duration) {
      // Do not animate if animation duration is zero.
      return;
    }

    const delta = {
      x: dragOverlay.rect.left - active.rect.left,
      y: dragOverlay.rect.top - active.rect.top
    };
    const scale = {
      scaleX: transform.scaleX !== 1 ? active.rect.width * transform.scaleX / dragOverlay.rect.width : 1,
      scaleY: transform.scaleY !== 1 ? active.rect.height * transform.scaleY / dragOverlay.rect.height : 1
    };
    const finalTransform = {
      x: transform.x - delta.x,
      y: transform.y - delta.y,
      ...scale
    };
    const animationKeyframes = keyframes({ ...rest,
      active,
      dragOverlay,
      transform: {
        initial: transform,
        final: finalTransform
      }
    });
    const [firstKeyframe] = animationKeyframes;
    const lastKeyframe = animationKeyframes[animationKeyframes.length - 1];

    if (JSON.stringify(firstKeyframe) === JSON.stringify(lastKeyframe)) {
      // The start and end keyframes are the same, infer that there is no animation needed.
      return;
    }

    const cleanup = sideEffects == null ? void 0 : sideEffects({
      active,
      dragOverlay,
      ...rest
    });
    const animation = dragOverlay.node.animate(animationKeyframes, {
      duration,
      easing,
      fill: 'forwards'
    });
    return new Promise(resolve => {
      animation.onfinish = () => {
        cleanup == null ? void 0 : cleanup();
        resolve();
      };
    });
  };
}

let key = 0;
function useKey(id) {
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
    if (id == null) {
      return;
    }

    key++;
    return key;
  }, [id]);
}

const DragOverlay = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().memo(_ref => {
  let {
    adjustScale = false,
    children,
    dropAnimation: dropAnimationConfig,
    style,
    transition,
    modifiers,
    wrapperElement = 'div',
    className,
    zIndex = 999
  } = _ref;
  const {
    activatorEvent,
    active,
    activeNodeRect,
    containerNodeRect,
    draggableNodes,
    droppableContainers,
    dragOverlay,
    over,
    measuringConfiguration,
    scrollableAncestors,
    scrollableAncestorRects,
    windowRect
  } = useDndContext();
  const transform = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(ActiveDraggableContext);
  const key = useKey(active == null ? void 0 : active.id);
  const modifiedTransform = applyModifiers(modifiers, {
    activatorEvent,
    active,
    activeNodeRect,
    containerNodeRect,
    draggingNodeRect: dragOverlay.rect,
    over,
    overlayNodeRect: dragOverlay.rect,
    scrollableAncestors,
    scrollableAncestorRects,
    transform,
    windowRect
  });
  const initialRect = useInitialValue(activeNodeRect);
  const dropAnimation = useDropAnimation({
    config: dropAnimationConfig,
    draggableNodes,
    droppableContainers,
    measuringConfiguration
  }); // We need to wait for the active node to be measured before connecting the drag overlay ref
  // otherwise collisions can be computed against a mispositioned drag overlay

  const ref = initialRect ? dragOverlay.setRef : undefined;
  return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(NullifiedContextProvider, null, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(AnimationManager, {
    animation: dropAnimation
  }, active && key ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PositionedOverlay, {
    key: key,
    id: active.id,
    ref: ref,
    as: wrapperElement,
    activatorEvent: activatorEvent,
    adjustScale: adjustScale,
    className: className,
    transition: transition,
    rect: initialRect,
    style: {
      zIndex,
      ...style
    },
    transform: modifiedTransform
  }, children) : null));
});


//# sourceMappingURL=core.esm.js.map


/***/ }),

/***/ "./node_modules/@dnd-kit/sortable/dist/sortable.esm.js":
/*!*************************************************************!*\
  !*** ./node_modules/@dnd-kit/sortable/dist/sortable.esm.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SortableContext: () => (/* binding */ SortableContext),
/* harmony export */   arrayMove: () => (/* binding */ arrayMove),
/* harmony export */   arraySwap: () => (/* binding */ arraySwap),
/* harmony export */   defaultAnimateLayoutChanges: () => (/* binding */ defaultAnimateLayoutChanges),
/* harmony export */   defaultNewIndexGetter: () => (/* binding */ defaultNewIndexGetter),
/* harmony export */   hasSortableData: () => (/* binding */ hasSortableData),
/* harmony export */   horizontalListSortingStrategy: () => (/* binding */ horizontalListSortingStrategy),
/* harmony export */   rectSortingStrategy: () => (/* binding */ rectSortingStrategy),
/* harmony export */   rectSwappingStrategy: () => (/* binding */ rectSwappingStrategy),
/* harmony export */   sortableKeyboardCoordinates: () => (/* binding */ sortableKeyboardCoordinates),
/* harmony export */   useSortable: () => (/* binding */ useSortable),
/* harmony export */   verticalListSortingStrategy: () => (/* binding */ verticalListSortingStrategy)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @dnd-kit/core */ "./node_modules/@dnd-kit/core/dist/core.esm.js");
/* harmony import */ var _dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dnd-kit/utilities */ "./node_modules/@dnd-kit/utilities/dist/utilities.esm.js");




/**
 * Move an array item to a different position. Returns a new array with the item moved to the new position.
 */
function arrayMove(array, from, to) {
  const newArray = array.slice();
  newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);
  return newArray;
}

/**
 * Swap an array item to a different position. Returns a new array with the item swapped to the new position.
 */
function arraySwap(array, from, to) {
  const newArray = array.slice();
  newArray[from] = array[to];
  newArray[to] = array[from];
  return newArray;
}

function getSortedRects(items, rects) {
  return items.reduce((accumulator, id, index) => {
    const rect = rects.get(id);

    if (rect) {
      accumulator[index] = rect;
    }

    return accumulator;
  }, Array(items.length));
}

function isValidIndex(index) {
  return index !== null && index >= 0;
}

function itemsEqual(a, b) {
  if (a === b) {
    return true;
  }

  if (a.length !== b.length) {
    return false;
  }

  for (let i = 0; i < a.length; i++) {
    if (a[i] !== b[i]) {
      return false;
    }
  }

  return true;
}

function normalizeDisabled(disabled) {
  if (typeof disabled === 'boolean') {
    return {
      draggable: disabled,
      droppable: disabled
    };
  }

  return disabled;
}

// To-do: We should be calculating scale transformation
const defaultScale = {
  scaleX: 1,
  scaleY: 1
};
const horizontalListSortingStrategy = _ref => {
  var _rects$activeIndex;

  let {
    rects,
    activeNodeRect: fallbackActiveRect,
    activeIndex,
    overIndex,
    index
  } = _ref;
  const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;

  if (!activeNodeRect) {
    return null;
  }

  const itemGap = getItemGap(rects, index, activeIndex);

  if (index === activeIndex) {
    const newIndexRect = rects[overIndex];

    if (!newIndexRect) {
      return null;
    }

    return {
      x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,
      y: 0,
      ...defaultScale
    };
  }

  if (index > activeIndex && index <= overIndex) {
    return {
      x: -activeNodeRect.width - itemGap,
      y: 0,
      ...defaultScale
    };
  }

  if (index < activeIndex && index >= overIndex) {
    return {
      x: activeNodeRect.width + itemGap,
      y: 0,
      ...defaultScale
    };
  }

  return {
    x: 0,
    y: 0,
    ...defaultScale
  };
};

function getItemGap(rects, index, activeIndex) {
  const currentRect = rects[index];
  const previousRect = rects[index - 1];
  const nextRect = rects[index + 1];

  if (!currentRect || !previousRect && !nextRect) {
    return 0;
  }

  if (activeIndex < index) {
    return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);
  }

  return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);
}

const rectSortingStrategy = _ref => {
  let {
    rects,
    activeIndex,
    overIndex,
    index
  } = _ref;
  const newRects = arrayMove(rects, overIndex, activeIndex);
  const oldRect = rects[index];
  const newRect = newRects[index];

  if (!newRect || !oldRect) {
    return null;
  }

  return {
    x: newRect.left - oldRect.left,
    y: newRect.top - oldRect.top,
    scaleX: newRect.width / oldRect.width,
    scaleY: newRect.height / oldRect.height
  };
};

const rectSwappingStrategy = _ref => {
  let {
    activeIndex,
    index,
    rects,
    overIndex
  } = _ref;
  let oldRect;
  let newRect;

  if (index === activeIndex) {
    oldRect = rects[index];
    newRect = rects[overIndex];
  }

  if (index === overIndex) {
    oldRect = rects[index];
    newRect = rects[activeIndex];
  }

  if (!newRect || !oldRect) {
    return null;
  }

  return {
    x: newRect.left - oldRect.left,
    y: newRect.top - oldRect.top,
    scaleX: newRect.width / oldRect.width,
    scaleY: newRect.height / oldRect.height
  };
};

// To-do: We should be calculating scale transformation
const defaultScale$1 = {
  scaleX: 1,
  scaleY: 1
};
const verticalListSortingStrategy = _ref => {
  var _rects$activeIndex;

  let {
    activeIndex,
    activeNodeRect: fallbackActiveRect,
    index,
    rects,
    overIndex
  } = _ref;
  const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;

  if (!activeNodeRect) {
    return null;
  }

  if (index === activeIndex) {
    const overIndexRect = rects[overIndex];

    if (!overIndexRect) {
      return null;
    }

    return {
      x: 0,
      y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,
      ...defaultScale$1
    };
  }

  const itemGap = getItemGap$1(rects, index, activeIndex);

  if (index > activeIndex && index <= overIndex) {
    return {
      x: 0,
      y: -activeNodeRect.height - itemGap,
      ...defaultScale$1
    };
  }

  if (index < activeIndex && index >= overIndex) {
    return {
      x: 0,
      y: activeNodeRect.height + itemGap,
      ...defaultScale$1
    };
  }

  return {
    x: 0,
    y: 0,
    ...defaultScale$1
  };
};

function getItemGap$1(clientRects, index, activeIndex) {
  const currentRect = clientRects[index];
  const previousRect = clientRects[index - 1];
  const nextRect = clientRects[index + 1];

  if (!currentRect) {
    return 0;
  }

  if (activeIndex < index) {
    return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;
  }

  return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;
}

const ID_PREFIX = 'Sortable';
const Context = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({
  activeIndex: -1,
  containerId: ID_PREFIX,
  disableTransforms: false,
  items: [],
  overIndex: -1,
  useDragOverlay: false,
  sortedRects: [],
  strategy: rectSortingStrategy,
  disabled: {
    draggable: false,
    droppable: false
  }
});
function SortableContext(_ref) {
  let {
    children,
    id,
    items: userDefinedItems,
    strategy = rectSortingStrategy,
    disabled: disabledProp = false
  } = _ref;
  const {
    active,
    dragOverlay,
    droppableRects,
    over,
    measureDroppableContainers
  } = (0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.useDndContext)();
  const containerId = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useUniqueId)(ID_PREFIX, id);
  const useDragOverlay = Boolean(dragOverlay.rect !== null);
  const items = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);
  const isDragging = active != null;
  const activeIndex = active ? items.indexOf(active.id) : -1;
  const overIndex = over ? items.indexOf(over.id) : -1;
  const previousItemsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(items);
  const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);
  const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;
  const disabled = normalizeDisabled(disabledProp);
  (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useIsomorphicLayoutEffect)(() => {
    if (itemsHaveChanged && isDragging) {
      measureDroppableContainers(items);
    }
  }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    previousItemsRef.current = items;
  }, [items]);
  const contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
    activeIndex,
    containerId,
    disabled,
    disableTransforms,
    items,
    overIndex,
    useDragOverlay,
    sortedRects: getSortedRects(items, droppableRects),
    strategy
  }), // eslint-disable-next-line react-hooks/exhaustive-deps
  [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);
  return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Context.Provider, {
    value: contextValue
  }, children);
}

const defaultNewIndexGetter = _ref => {
  let {
    id,
    items,
    activeIndex,
    overIndex
  } = _ref;
  return arrayMove(items, activeIndex, overIndex).indexOf(id);
};
const defaultAnimateLayoutChanges = _ref2 => {
  let {
    containerId,
    isSorting,
    wasDragging,
    index,
    items,
    newIndex,
    previousItems,
    previousContainerId,
    transition
  } = _ref2;

  if (!transition || !wasDragging) {
    return false;
  }

  if (previousItems !== items && index === newIndex) {
    return false;
  }

  if (isSorting) {
    return true;
  }

  return newIndex !== index && containerId === previousContainerId;
};
const defaultTransition = {
  duration: 200,
  easing: 'ease'
};
const transitionProperty = 'transform';
const disabledTransition = /*#__PURE__*/_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.CSS.Transition.toString({
  property: transitionProperty,
  duration: 0,
  easing: 'linear'
});
const defaultAttributes = {
  roleDescription: 'sortable'
};

/*
 * When the index of an item changes while sorting,
 * we need to temporarily disable the transforms
 */

function useDerivedTransform(_ref) {
  let {
    disabled,
    index,
    node,
    rect
  } = _ref;
  const [derivedTransform, setDerivedtransform] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
  const previousIndex = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(index);
  (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useIsomorphicLayoutEffect)(() => {
    if (!disabled && index !== previousIndex.current && node.current) {
      const initial = rect.current;

      if (initial) {
        const current = (0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.getClientRect)(node.current, {
          ignoreTransform: true
        });
        const delta = {
          x: initial.left - current.left,
          y: initial.top - current.top,
          scaleX: initial.width / current.width,
          scaleY: initial.height / current.height
        };

        if (delta.x || delta.y) {
          setDerivedtransform(delta);
        }
      }
    }

    if (index !== previousIndex.current) {
      previousIndex.current = index;
    }
  }, [disabled, index, node, rect]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (derivedTransform) {
      setDerivedtransform(null);
    }
  }, [derivedTransform]);
  return derivedTransform;
}

function useSortable(_ref) {
  let {
    animateLayoutChanges = defaultAnimateLayoutChanges,
    attributes: userDefinedAttributes,
    disabled: localDisabled,
    data: customData,
    getNewIndex = defaultNewIndexGetter,
    id,
    strategy: localStrategy,
    resizeObserverConfig,
    transition = defaultTransition
  } = _ref;
  const {
    items,
    containerId,
    activeIndex,
    disabled: globalDisabled,
    disableTransforms,
    sortedRects,
    overIndex,
    useDragOverlay,
    strategy: globalStrategy
  } = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(Context);
  const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);
  const index = items.indexOf(id);
  const data = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
    sortable: {
      containerId,
      index,
      items
    },
    ...customData
  }), [containerId, customData, index, items]);
  const itemsAfterCurrentSortable = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => items.slice(items.indexOf(id)), [items, id]);
  const {
    rect,
    node,
    isOver,
    setNodeRef: setDroppableNodeRef
  } = (0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.useDroppable)({
    id,
    data,
    disabled: disabled.droppable,
    resizeObserverConfig: {
      updateMeasurementsFor: itemsAfterCurrentSortable,
      ...resizeObserverConfig
    }
  });
  const {
    active,
    activatorEvent,
    activeNodeRect,
    attributes,
    setNodeRef: setDraggableNodeRef,
    listeners,
    isDragging,
    over,
    setActivatorNodeRef,
    transform
  } = (0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.useDraggable)({
    id,
    data,
    attributes: { ...defaultAttributes,
      ...userDefinedAttributes
    },
    disabled: disabled.draggable
  });
  const setNodeRef = (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.useCombinedRefs)(setDroppableNodeRef, setDraggableNodeRef);
  const isSorting = Boolean(active);
  const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);
  const shouldDisplaceDragSource = !useDragOverlay && isDragging;
  const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;
  const strategy = localStrategy != null ? localStrategy : globalStrategy;
  const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({
    rects: sortedRects,
    activeNodeRect,
    activeIndex,
    overIndex,
    index
  }) : null;
  const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({
    id,
    items,
    activeIndex,
    overIndex
  }) : index;
  const activeId = active == null ? void 0 : active.id;
  const previous = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({
    activeId,
    items,
    newIndex,
    containerId
  });
  const itemsHaveChanged = items !== previous.current.items;
  const shouldAnimateLayoutChanges = animateLayoutChanges({
    active,
    containerId,
    isDragging,
    isSorting,
    id,
    index,
    items,
    newIndex: previous.current.newIndex,
    previousItems: previous.current.items,
    previousContainerId: previous.current.containerId,
    transition,
    wasDragging: previous.current.activeId != null
  });
  const derivedTransform = useDerivedTransform({
    disabled: !shouldAnimateLayoutChanges,
    index,
    node,
    rect
  });
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (isSorting && previous.current.newIndex !== newIndex) {
      previous.current.newIndex = newIndex;
    }

    if (containerId !== previous.current.containerId) {
      previous.current.containerId = containerId;
    }

    if (items !== previous.current.items) {
      previous.current.items = items;
    }
  }, [isSorting, newIndex, containerId, items]);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (activeId === previous.current.activeId) {
      return;
    }

    if (activeId != null && previous.current.activeId == null) {
      previous.current.activeId = activeId;
      return;
    }

    const timeoutId = setTimeout(() => {
      previous.current.activeId = activeId;
    }, 50);
    return () => clearTimeout(timeoutId);
  }, [activeId]);
  return {
    active,
    activeIndex,
    attributes,
    data,
    rect,
    index,
    newIndex,
    items,
    isOver,
    isSorting,
    isDragging,
    listeners,
    node,
    overIndex,
    over,
    setNodeRef,
    setActivatorNodeRef,
    setDroppableNodeRef,
    setDraggableNodeRef,
    transform: derivedTransform != null ? derivedTransform : finalTransform,
    transition: getTransition()
  };

  function getTransition() {
    if ( // Temporarily disable transitions for a single frame to set up derived transforms
    derivedTransform || // Or to prevent items jumping to back to their "new" position when items change
    itemsHaveChanged && previous.current.newIndex === index) {
      return disabledTransition;
    }

    if (shouldDisplaceDragSource && !(0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.isKeyboardEvent)(activatorEvent) || !transition) {
      return undefined;
    }

    if (isSorting || shouldAnimateLayoutChanges) {
      return _dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.CSS.Transition.toString({ ...transition,
        property: transitionProperty
      });
    }

    return undefined;
  }
}

function normalizeLocalDisabled(localDisabled, globalDisabled) {
  var _localDisabled$dragga, _localDisabled$droppa;

  if (typeof localDisabled === 'boolean') {
    return {
      draggable: localDisabled,
      // Backwards compatibility
      droppable: false
    };
  }

  return {
    draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,
    droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable
  };
}

function hasSortableData(entry) {
  if (!entry) {
    return false;
  }

  const data = entry.data.current;

  if (data && 'sortable' in data && typeof data.sortable === 'object' && 'containerId' in data.sortable && 'items' in data.sortable && 'index' in data.sortable) {
    return true;
  }

  return false;
}

const directions = [_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.KeyboardCode.Down, _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.KeyboardCode.Right, _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.KeyboardCode.Up, _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.KeyboardCode.Left];
const sortableKeyboardCoordinates = (event, _ref) => {
  let {
    context: {
      active,
      collisionRect,
      droppableRects,
      droppableContainers,
      over,
      scrollableAncestors
    }
  } = _ref;

  if (directions.includes(event.code)) {
    event.preventDefault();

    if (!active || !collisionRect) {
      return;
    }

    const filteredContainers = [];
    droppableContainers.getEnabled().forEach(entry => {
      if (!entry || entry != null && entry.disabled) {
        return;
      }

      const rect = droppableRects.get(entry.id);

      if (!rect) {
        return;
      }

      switch (event.code) {
        case _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.KeyboardCode.Down:
          if (collisionRect.top < rect.top) {
            filteredContainers.push(entry);
          }

          break;

        case _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.KeyboardCode.Up:
          if (collisionRect.top > rect.top) {
            filteredContainers.push(entry);
          }

          break;

        case _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.KeyboardCode.Left:
          if (collisionRect.left > rect.left) {
            filteredContainers.push(entry);
          }

          break;

        case _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.KeyboardCode.Right:
          if (collisionRect.left < rect.left) {
            filteredContainers.push(entry);
          }

          break;
      }
    });
    const collisions = (0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.closestCorners)({
      active,
      collisionRect: collisionRect,
      droppableRects,
      droppableContainers: filteredContainers,
      pointerCoordinates: null
    });
    let closestId = (0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.getFirstCollision)(collisions, 'id');

    if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {
      closestId = collisions[1].id;
    }

    if (closestId != null) {
      const activeDroppable = droppableContainers.get(active.id);
      const newDroppable = droppableContainers.get(closestId);
      const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;
      const newNode = newDroppable == null ? void 0 : newDroppable.node.current;

      if (newNode && newRect && activeDroppable && newDroppable) {
        const newScrollAncestors = (0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.getScrollableAncestors)(newNode);
        const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);
        const hasSameContainer = isSameContainer(activeDroppable, newDroppable);
        const isAfterActive = isAfter(activeDroppable, newDroppable);
        const offset = hasDifferentScrollAncestors || !hasSameContainer ? {
          x: 0,
          y: 0
        } : {
          x: isAfterActive ? collisionRect.width - newRect.width : 0,
          y: isAfterActive ? collisionRect.height - newRect.height : 0
        };
        const rectCoordinates = {
          x: newRect.left,
          y: newRect.top
        };
        const newCoordinates = offset.x && offset.y ? rectCoordinates : (0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.subtract)(rectCoordinates, offset);
        return newCoordinates;
      }
    }
  }

  return undefined;
};

function isSameContainer(a, b) {
  if (!hasSortableData(a) || !hasSortableData(b)) {
    return false;
  }

  return a.data.current.sortable.containerId === b.data.current.sortable.containerId;
}

function isAfter(a, b) {
  if (!hasSortableData(a) || !hasSortableData(b)) {
    return false;
  }

  if (!isSameContainer(a, b)) {
    return false;
  }

  return a.data.current.sortable.index < b.data.current.sortable.index;
}


//# sourceMappingURL=sortable.esm.js.map


/***/ }),

/***/ "./node_modules/@dnd-kit/utilities/dist/utilities.esm.js":
/*!***************************************************************!*\
  !*** ./node_modules/@dnd-kit/utilities/dist/utilities.esm.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CSS: () => (/* binding */ CSS),
/* harmony export */   add: () => (/* binding */ add),
/* harmony export */   canUseDOM: () => (/* binding */ canUseDOM),
/* harmony export */   findFirstFocusableNode: () => (/* binding */ findFirstFocusableNode),
/* harmony export */   getEventCoordinates: () => (/* binding */ getEventCoordinates),
/* harmony export */   getOwnerDocument: () => (/* binding */ getOwnerDocument),
/* harmony export */   getWindow: () => (/* binding */ getWindow),
/* harmony export */   hasViewportRelativeCoordinates: () => (/* binding */ hasViewportRelativeCoordinates),
/* harmony export */   isDocument: () => (/* binding */ isDocument),
/* harmony export */   isHTMLElement: () => (/* binding */ isHTMLElement),
/* harmony export */   isKeyboardEvent: () => (/* binding */ isKeyboardEvent),
/* harmony export */   isNode: () => (/* binding */ isNode),
/* harmony export */   isSVGElement: () => (/* binding */ isSVGElement),
/* harmony export */   isTouchEvent: () => (/* binding */ isTouchEvent),
/* harmony export */   isWindow: () => (/* binding */ isWindow),
/* harmony export */   subtract: () => (/* binding */ subtract),
/* harmony export */   useCombinedRefs: () => (/* binding */ useCombinedRefs),
/* harmony export */   useEvent: () => (/* binding */ useEvent),
/* harmony export */   useInterval: () => (/* binding */ useInterval),
/* harmony export */   useIsomorphicLayoutEffect: () => (/* binding */ useIsomorphicLayoutEffect),
/* harmony export */   useLatestValue: () => (/* binding */ useLatestValue),
/* harmony export */   useLazyMemo: () => (/* binding */ useLazyMemo),
/* harmony export */   useNodeRef: () => (/* binding */ useNodeRef),
/* harmony export */   usePrevious: () => (/* binding */ usePrevious),
/* harmony export */   useUniqueId: () => (/* binding */ useUniqueId)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);


function useCombinedRefs() {
  for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
    refs[_key] = arguments[_key];
  }

  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => node => {
    refs.forEach(ref => ref(node));
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
  refs);
}

// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
const canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';

function isWindow(element) {
  const elementString = Object.prototype.toString.call(element);
  return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]
  elementString === '[object global]';
}

function isNode(node) {
  return 'nodeType' in node;
}

function getWindow(target) {
  var _target$ownerDocument, _target$ownerDocument2;

  if (!target) {
    return window;
  }

  if (isWindow(target)) {
    return target;
  }

  if (!isNode(target)) {
    return window;
  }

  return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;
}

function isDocument(node) {
  const {
    Document
  } = getWindow(node);
  return node instanceof Document;
}

function isHTMLElement(node) {
  if (isWindow(node)) {
    return false;
  }

  return node instanceof getWindow(node).HTMLElement;
}

function isSVGElement(node) {
  return node instanceof getWindow(node).SVGElement;
}

function getOwnerDocument(target) {
  if (!target) {
    return document;
  }

  if (isWindow(target)) {
    return target.document;
  }

  if (!isNode(target)) {
    return document;
  }

  if (isDocument(target)) {
    return target;
  }

  if (isHTMLElement(target) || isSVGElement(target)) {
    return target.ownerDocument;
  }

  return document;
}

/**
 * A hook that resolves to useEffect on the server and useLayoutEffect on the client
 * @param callback {function} Callback function that is invoked when the dependencies of the hook change
 */

const useIsomorphicLayoutEffect = canUseDOM ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect;

function useEvent(handler) {
  const handlerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(handler);
  useIsomorphicLayoutEffect(() => {
    handlerRef.current = handler;
  });
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    return handlerRef.current == null ? void 0 : handlerRef.current(...args);
  }, []);
}

function useInterval() {
  const intervalRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const set = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((listener, duration) => {
    intervalRef.current = setInterval(listener, duration);
  }, []);
  const clear = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
    if (intervalRef.current !== null) {
      clearInterval(intervalRef.current);
      intervalRef.current = null;
    }
  }, []);
  return [set, clear];
}

function useLatestValue(value, dependencies) {
  if (dependencies === void 0) {
    dependencies = [value];
  }

  const valueRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value);
  useIsomorphicLayoutEffect(() => {
    if (valueRef.current !== value) {
      valueRef.current = value;
    }
  }, dependencies);
  return valueRef;
}

function useLazyMemo(callback, dependencies) {
  const valueRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
    const newValue = callback(valueRef.current);
    valueRef.current = newValue;
    return newValue;
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
  [...dependencies]);
}

function useNodeRef(onChange) {
  const onChangeHandler = useEvent(onChange);
  const node = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const setNodeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(element => {
    if (element !== node.current) {
      onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);
    }

    node.current = element;
  }, //eslint-disable-next-line
  []);
  return [node, setNodeRef];
}

function usePrevious(value) {
  const ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    ref.current = value;
  }, [value]);
  return ref.current;
}

let ids = {};
function useUniqueId(prefix, value) {
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
    if (value) {
      return value;
    }

    const id = ids[prefix] == null ? 0 : ids[prefix] + 1;
    ids[prefix] = id;
    return prefix + "-" + id;
  }, [prefix, value]);
}

function createAdjustmentFn(modifier) {
  return function (object) {
    for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      adjustments[_key - 1] = arguments[_key];
    }

    return adjustments.reduce((accumulator, adjustment) => {
      const entries = Object.entries(adjustment);

      for (const [key, valueAdjustment] of entries) {
        const value = accumulator[key];

        if (value != null) {
          accumulator[key] = value + modifier * valueAdjustment;
        }
      }

      return accumulator;
    }, { ...object
    });
  };
}

const add = /*#__PURE__*/createAdjustmentFn(1);
const subtract = /*#__PURE__*/createAdjustmentFn(-1);

function hasViewportRelativeCoordinates(event) {
  return 'clientX' in event && 'clientY' in event;
}

function isKeyboardEvent(event) {
  if (!event) {
    return false;
  }

  const {
    KeyboardEvent
  } = getWindow(event.target);
  return KeyboardEvent && event instanceof KeyboardEvent;
}

function isTouchEvent(event) {
  if (!event) {
    return false;
  }

  const {
    TouchEvent
  } = getWindow(event.target);
  return TouchEvent && event instanceof TouchEvent;
}

/**
 * Returns the normalized x and y coordinates for mouse and touch events.
 */

function getEventCoordinates(event) {
  if (isTouchEvent(event)) {
    if (event.touches && event.touches.length) {
      const {
        clientX: x,
        clientY: y
      } = event.touches[0];
      return {
        x,
        y
      };
    } else if (event.changedTouches && event.changedTouches.length) {
      const {
        clientX: x,
        clientY: y
      } = event.changedTouches[0];
      return {
        x,
        y
      };
    }
  }

  if (hasViewportRelativeCoordinates(event)) {
    return {
      x: event.clientX,
      y: event.clientY
    };
  }

  return null;
}

const CSS = /*#__PURE__*/Object.freeze({
  Translate: {
    toString(transform) {
      if (!transform) {
        return;
      }

      const {
        x,
        y
      } = transform;
      return "translate3d(" + (x ? Math.round(x) : 0) + "px, " + (y ? Math.round(y) : 0) + "px, 0)";
    }

  },
  Scale: {
    toString(transform) {
      if (!transform) {
        return;
      }

      const {
        scaleX,
        scaleY
      } = transform;
      return "scaleX(" + scaleX + ") scaleY(" + scaleY + ")";
    }

  },
  Transform: {
    toString(transform) {
      if (!transform) {
        return;
      }

      return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');
    }

  },
  Transition: {
    toString(_ref) {
      let {
        property,
        duration,
        easing
      } = _ref;
      return property + " " + duration + "ms " + easing;
    }

  }
});

const SELECTOR = 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';
function findFirstFocusableNode(element) {
  if (element.matches(SELECTOR)) {
    return element;
  }

  return element.querySelector(SELECTOR);
}


//# sourceMappingURL=utilities.esm.js.map


/***/ }),

/***/ "./node_modules/axios/lib/adapters/adapters.js":
/*!*****************************************************!*\
  !*** ./node_modules/axios/lib/adapters/adapters.js ***!
  \*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _http_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./http.js */ "./node_modules/axios/lib/helpers/null.js");
/* harmony import */ var _xhr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./xhr.js */ "./node_modules/axios/lib/adapters/xhr.js");
/* harmony import */ var _fetch_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fetch.js */ "./node_modules/axios/lib/adapters/fetch.js");
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");






const knownAdapters = {
  http: _http_js__WEBPACK_IMPORTED_MODULE_1__["default"],
  xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_2__["default"],
  fetch: {
    get: _fetch_js__WEBPACK_IMPORTED_MODULE_3__.getFetch,
  }
}

_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(knownAdapters, (fn, value) => {
  if (fn) {
    try {
      Object.defineProperty(fn, 'name', {value});
    } catch (e) {
      // eslint-disable-next-line no-empty
    }
    Object.defineProperty(fn, 'adapterName', {value});
  }
});

const renderReason = (reason) => `- ${reason}`;

const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(adapter) || adapter === null || adapter === false;

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  getAdapter: (adapters, config) => {
    adapters = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(adapters) ? adapters : [adapters];

    const {length} = adapters;
    let nameOrAdapter;
    let adapter;

    const rejectedReasons = {};

    for (let i = 0; i < length; i++) {
      nameOrAdapter = adapters[i];
      let id;

      adapter = nameOrAdapter;

      if (!isResolvedHandle(nameOrAdapter)) {
        adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];

        if (adapter === undefined) {
          throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"](`Unknown adapter '${id}'`);
        }
      }

      if (adapter && (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(adapter) || (adapter = adapter.get(config)))) {
        break;
      }

      rejectedReasons[id || '#' + i] = adapter;
    }

    if (!adapter) {

      const reasons = Object.entries(rejectedReasons)
        .map(([id, state]) => `adapter ${id} ` +
          (state === false ? 'is not supported by the environment' : 'is not available in the build')
        );

      let s = length ?
        (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
        'as no adapter specified';

      throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"](
        `There is no suitable adapter to dispatch the request ` + s,
        'ERR_NOT_SUPPORT'
      );
    }

    return adapter;
  },
  adapters: knownAdapters
});


/***/ }),

/***/ "./node_modules/axios/lib/adapters/fetch.js":
/*!**************************************************!*\
  !*** ./node_modules/axios/lib/adapters/fetch.js ***!
  \**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__),
/* harmony export */   getFetch: () => (/* binding */ getFetch)
/* harmony export */ });
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
/* harmony import */ var _helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/composeSignals.js */ "./node_modules/axios/lib/helpers/composeSignals.js");
/* harmony import */ var _helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/trackStream.js */ "./node_modules/axios/lib/helpers/trackStream.js");
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js");
/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js");
/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/settle.js */ "./node_modules/axios/lib/core/settle.js");










const DEFAULT_CHUNK_SIZE = 64 * 1024;

const {isFunction} = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];

const globalFetchAPI = (({Request, Response}) => ({
  Request, Response
}))(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global);

const {
  ReadableStream, TextEncoder
} = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global;


const test = (fn, ...args) => {
  try {
    return !!fn(...args);
  } catch (e) {
    return false
  }
}

const factory = (env) => {
  env = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call({
    skipUndefined: true
  }, globalFetchAPI, env);

  const {fetch: envFetch, Request, Response} = env;
  const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
  const isRequestSupported = isFunction(Request);
  const isResponseSupported = isFunction(Response);

  if (!isFetchSupported) {
    return false;
  }

  const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);

  const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
      ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
      async (str) => new Uint8Array(await new Request(str).arrayBuffer())
  );

  const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
    let duplexAccessed = false;

    const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
      body: new ReadableStream(),
      method: 'POST',
      get duplex() {
        duplexAccessed = true;
        return 'half';
      },
    }).headers.has('Content-Type');

    return duplexAccessed && !hasContentType;
  });

  const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
    test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(new Response('').body));

  const resolvers = {
    stream: supportsResponseStream && ((res) => res.body)
  };

  isFetchSupported && ((() => {
    ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
      !resolvers[type] && (resolvers[type] = (res, config) => {
        let method = res && res[type];

        if (method) {
          return method.call(res);
        }

        throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](`Response type '${type}' is not supported`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT, config);
      })
    });
  })());

  const getBodyLength = async (body) => {
    if (body == null) {
      return 0;
    }

    if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isBlob(body)) {
      return body.size;
    }

    if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(body)) {
      const _request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
        method: 'POST',
        body,
      });
      return (await _request.arrayBuffer()).byteLength;
    }

    if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBufferView(body) || _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBuffer(body)) {
      return body.byteLength;
    }

    if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isURLSearchParams(body)) {
      body = body + '';
    }

    if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(body)) {
      return (await encodeText(body)).byteLength;
    }
  }

  const resolveBodyLength = async (headers, body) => {
    const length = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(headers.getContentLength());

    return length == null ? getBodyLength(body) : length;
  }

  return async (config) => {
    let {
      url,
      method,
      data,
      signal,
      cancelToken,
      timeout,
      onDownloadProgress,
      onUploadProgress,
      responseType,
      headers,
      withCredentials = 'same-origin',
      fetchOptions
    } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__["default"])(config);

    let _fetch = envFetch || fetch;

    responseType = responseType ? (responseType + '').toLowerCase() : 'text';

    let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_3__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout);

    let request = null;

    const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
      composedSignal.unsubscribe();
    });

    let requestContentLength;

    try {
      if (
        onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
        (requestContentLength = await resolveBodyLength(headers, data)) !== 0
      ) {
        let _request = new Request(url, {
          method: 'POST',
          body: data,
          duplex: "half"
        });

        let contentTypeHeader;

        if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
          headers.setContentType(contentTypeHeader)
        }

        if (_request.body) {
          const [onProgress, flush] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventDecorator)(
            requestContentLength,
            (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.asyncDecorator)(onUploadProgress))
          );

          data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
        }
      }

      if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(withCredentials)) {
        withCredentials = withCredentials ? 'include' : 'omit';
      }

      // Cloudflare Workers throws when credentials are defined
      // see https://github.com/cloudflare/workerd/issues/902
      const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;

      const resolvedOptions = {
        ...fetchOptions,
        signal: composedSignal,
        method: method.toUpperCase(),
        headers: headers.normalize().toJSON(),
        body: data,
        duplex: "half",
        credentials: isCredentialsSupported ? withCredentials : undefined
      };

      request = isRequestSupported && new Request(url, resolvedOptions);

      let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));

      const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');

      if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
        const options = {};

        ['status', 'statusText', 'headers'].forEach(prop => {
          options[prop] = response[prop];
        });

        const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length'));

        const [onProgress, flush] = onDownloadProgress && (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventDecorator)(
          responseContentLength,
          (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.asyncDecorator)(onDownloadProgress), true)
        ) || [];

        response = new Response(
          (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
            flush && flush();
            unsubscribe && unsubscribe();
          }),
          options
        );
      }

      responseType = responseType || 'text';

      let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](response, config);

      !isStreamResponse && unsubscribe && unsubscribe();

      return await new Promise((resolve, reject) => {
        (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_8__["default"])(resolve, reject, {
          data: responseData,
          headers: _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(response.headers),
          status: response.status,
          statusText: response.statusText,
          config,
          request
        })
      })
    } catch (err) {
      unsubscribe && unsubscribe();

      if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
        throw Object.assign(
          new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK, config, request),
          {
            cause: err.cause || err
          }
        )
      }

      throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request);
    }
  }
}

const seedCache = new Map();

const getFetch = (config) => {
  let env = config ? config.env : {};
  const {fetch, Request, Response} = env;
  const seeds = [
    Request, Response, fetch
  ];

  let len = seeds.length, i = len,
    seed, target, map = seedCache;

  while (i--) {
    seed = seeds[i];
    target = map.get(seed);

    target === undefined && map.set(seed, target = (i ? new Map() : factory(env)))

    map = target;
  }

  return target;
};

const adapter = getFetch();

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (adapter);


/***/ }),

/***/ "./node_modules/axios/lib/adapters/xhr.js":
/*!************************************************!*\
  !*** ./node_modules/axios/lib/adapters/xhr.js ***!
  \************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../core/settle.js */ "./node_modules/axios/lib/core/settle.js");
/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../defaults/transitional.js */ "./node_modules/axios/lib/defaults/transitional.js");
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js");
/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ "./node_modules/axios/lib/helpers/parseProtocol.js");
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js");
/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js");











const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported && function (config) {
  return new Promise(function dispatchXhrRequest(resolve, reject) {
    const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_9__["default"])(config);
    let requestData = _config.data;
    const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(_config.headers).normalize();
    let {responseType, onUploadProgress, onDownloadProgress} = _config;
    let onCanceled;
    let uploadThrottled, downloadThrottled;
    let flushUpload, flushDownload;

    function done() {
      flushUpload && flushUpload(); // flush events
      flushDownload && flushDownload(); // flush events

      _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);

      _config.signal && _config.signal.removeEventListener('abort', onCanceled);
    }

    let request = new XMLHttpRequest();

    request.open(_config.method.toUpperCase(), _config.url, true);

    // Set the request timeout in MS
    request.timeout = _config.timeout;

    function onloadend() {
      if (!request) {
        return;
      }
      // Prepare the response
      const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(
        'getAllResponseHeaders' in request && request.getAllResponseHeaders()
      );
      const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
        request.responseText : request.response;
      const response = {
        data: responseData,
        status: request.status,
        statusText: request.statusText,
        headers: responseHeaders,
        config,
        request
      };

      (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function _resolve(value) {
        resolve(value);
        done();
      }, function _reject(err) {
        reject(err);
        done();
      }, response);

      // Clean up request
      request = null;
    }

    if ('onloadend' in request) {
      // Use onloadend if available
      request.onloadend = onloadend;
    } else {
      // Listen for ready state to emulate onloadend
      request.onreadystatechange = function handleLoad() {
        if (!request || request.readyState !== 4) {
          return;
        }

        // The request errored out and we didn't get a response, this will be
        // handled by onerror instead
        // With one exception: request that using file: protocol, most browsers
        // will return status as 0 even though it's a successful request
        if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
          return;
        }
        // readystate handler is calling before onerror or ontimeout handlers,
        // so we should call onloadend on the next 'tick'
        setTimeout(onloadend);
      };
    }

    // Handle browser request cancellation (as opposed to a manual cancellation)
    request.onabort = function handleAbort() {
      if (!request) {
        return;
      }

      reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request));

      // Clean up request
      request = null;
    };

    // Handle low level network errors
  request.onerror = function handleError(event) {
       // Browsers deliver a ProgressEvent in XHR onerror
       // (message may be empty; when present, surface it)
       // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
       const msg = event && event.message ? event.message : 'Network Error';
       const err = new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](msg, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request);
       // attach the underlying event for consumers who want details
       err.event = event || null;
       reject(err);
       request = null;
    };
    
    // Handle timeout
    request.ontimeout = function handleTimeout() {
      let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
      const transitional = _config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_2__["default"];
      if (_config.timeoutErrorMessage) {
        timeoutErrorMessage = _config.timeoutErrorMessage;
      }
      reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
        timeoutErrorMessage,
        transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED,
        config,
        request));

      // Clean up request
      request = null;
    };

    // Remove Content-Type if data is undefined
    requestData === undefined && requestHeaders.setContentType(null);

    // Add headers to the request
    if ('setRequestHeader' in request) {
      _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
        request.setRequestHeader(key, val);
      });
    }

    // Add withCredentials to request if needed
    if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(_config.withCredentials)) {
      request.withCredentials = !!_config.withCredentials;
    }

    // Add responseType to request if needed
    if (responseType && responseType !== 'json') {
      request.responseType = _config.responseType;
    }

    // Handle progress if needed
    if (onDownloadProgress) {
      ([downloadThrottled, flushDownload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onDownloadProgress, true));
      request.addEventListener('progress', downloadThrottled);
    }

    // Not all browsers support upload events
    if (onUploadProgress && request.upload) {
      ([uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onUploadProgress));

      request.upload.addEventListener('progress', uploadThrottled);

      request.upload.addEventListener('loadend', flushUpload);
    }

    if (_config.cancelToken || _config.signal) {
      // Handle cancellation
      // eslint-disable-next-line func-names
      onCanceled = cancel => {
        if (!request) {
          return;
        }
        reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__["default"](null, config, request) : cancel);
        request.abort();
        request = null;
      };

      _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
      if (_config.signal) {
        _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
      }
    }

    const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_config.url);

    if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.indexOf(protocol) === -1) {
      reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_BAD_REQUEST, config));
      return;
    }


    // Send the request
    request.send(requestData || null);
  });
});


/***/ }),

/***/ "./node_modules/axios/lib/axios.js":
/*!*****************************************!*\
  !*** ./node_modules/axios/lib/axios.js ***!
  \*****************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js");
/* harmony import */ var _core_Axios_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./core/Axios.js */ "./node_modules/axios/lib/core/Axios.js");
/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js");
/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaults/index.js */ "./node_modules/axios/lib/defaults/index.js");
/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js");
/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js");
/* harmony import */ var _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cancel/CancelToken.js */ "./node_modules/axios/lib/cancel/CancelToken.js");
/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js");
/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./env/data.js */ "./node_modules/axios/lib/env/data.js");
/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js");
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
/* harmony import */ var _helpers_spread_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/spread.js */ "./node_modules/axios/lib/helpers/spread.js");
/* harmony import */ var _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./helpers/isAxiosError.js */ "./node_modules/axios/lib/helpers/isAxiosError.js");
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js");
/* harmony import */ var _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/HttpStatusCode.js */ "./node_modules/axios/lib/helpers/HttpStatusCode.js");




















/**
 * Create an instance of Axios
 *
 * @param {Object} defaultConfig The default config for the instance
 *
 * @returns {Axios} A new instance of Axios
 */
function createInstance(defaultConfig) {
  const context = new _core_Axios_js__WEBPACK_IMPORTED_MODULE_2__["default"](defaultConfig);
  const instance = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_core_Axios_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype.request, context);

  // Copy axios.prototype to instance
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype, context, {allOwnKeys: true});

  // Copy context to instance
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, context, null, {allOwnKeys: true});

  // Factory for creating new instances
  instance.create = function create(instanceConfig) {
    return createInstance((0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(defaultConfig, instanceConfig));
  };

  return instance;
}

// Create the default instance to be exported
const axios = createInstance(_defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"]);

// Expose Axios class to allow class inheritance
axios.Axios = _core_Axios_js__WEBPACK_IMPORTED_MODULE_2__["default"];

// Expose Cancel & CancelToken
axios.CanceledError = _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_6__["default"];
axios.CancelToken = _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_7__["default"];
axios.isCancel = _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_8__["default"];
axios.VERSION = _env_data_js__WEBPACK_IMPORTED_MODULE_9__.VERSION;
axios.toFormData = _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_10__["default"];

// Expose AxiosError class
axios.AxiosError = _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_11__["default"];

// alias for CanceledError for backward compatibility
axios.Cancel = axios.CanceledError;

// Expose all/spread
axios.all = function all(promises) {
  return Promise.all(promises);
};

axios.spread = _helpers_spread_js__WEBPACK_IMPORTED_MODULE_12__["default"];

// Expose isAxiosError
axios.isAxiosError = _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_13__["default"];

// Expose mergeConfig
axios.mergeConfig = _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"];

axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_14__["default"];

axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(thing) ? new FormData(thing) : thing);

axios.getAdapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__["default"].getAdapter;

axios.HttpStatusCode = _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__["default"];

axios.default = axios;

// this module should only have a default export
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (axios);


/***/ }),

/***/ "./node_modules/axios/lib/cancel/CancelToken.js":
/*!******************************************************!*\
  !*** ./node_modules/axios/lib/cancel/CancelToken.js ***!
  \******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js");




/**
 * A `CancelToken` is an object that can be used to request cancellation of an operation.
 *
 * @param {Function} executor The executor function.
 *
 * @returns {CancelToken}
 */
class CancelToken {
  constructor(executor) {
    if (typeof executor !== 'function') {
      throw new TypeError('executor must be a function.');
    }

    let resolvePromise;

    this.promise = new Promise(function promiseExecutor(resolve) {
      resolvePromise = resolve;
    });

    const token = this;

    // eslint-disable-next-line func-names
    this.promise.then(cancel => {
      if (!token._listeners) return;

      let i = token._listeners.length;

      while (i-- > 0) {
        token._listeners[i](cancel);
      }
      token._listeners = null;
    });

    // eslint-disable-next-line func-names
    this.promise.then = onfulfilled => {
      let _resolve;
      // eslint-disable-next-line func-names
      const promise = new Promise(resolve => {
        token.subscribe(resolve);
        _resolve = resolve;
      }).then(onfulfilled);

      promise.cancel = function reject() {
        token.unsubscribe(_resolve);
      };

      return promise;
    };

    executor(function cancel(message, config, request) {
      if (token.reason) {
        // Cancellation has already been requested
        return;
      }

      token.reason = new _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](message, config, request);
      resolvePromise(token.reason);
    });
  }

  /**
   * Throws a `CanceledError` if cancellation has been requested.
   */
  throwIfRequested() {
    if (this.reason) {
      throw this.reason;
    }
  }

  /**
   * Subscribe to the cancel signal
   */

  subscribe(listener) {
    if (this.reason) {
      listener(this.reason);
      return;
    }

    if (this._listeners) {
      this._listeners.push(listener);
    } else {
      this._listeners = [listener];
    }
  }

  /**
   * Unsubscribe from the cancel signal
   */

  unsubscribe(listener) {
    if (!this._listeners) {
      return;
    }
    const index = this._listeners.indexOf(listener);
    if (index !== -1) {
      this._listeners.splice(index, 1);
    }
  }

  toAbortSignal() {
    const controller = new AbortController();

    const abort = (err) => {
      controller.abort(err);
    };

    this.subscribe(abort);

    controller.signal.unsubscribe = () => this.unsubscribe(abort);

    return controller.signal;
  }

  /**
   * Returns an object that contains a new `CancelToken` and a function that, when called,
   * cancels the `CancelToken`.
   */
  static source() {
    let cancel;
    const token = new CancelToken(function executor(c) {
      cancel = c;
    });
    return {
      token,
      cancel
    };
  }
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CancelToken);


/***/ }),

/***/ "./node_modules/axios/lib/cancel/CanceledError.js":
/*!********************************************************!*\
  !*** ./node_modules/axios/lib/cancel/CanceledError.js ***!
  \********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");





/**
 * A `CanceledError` is an object that is thrown when an operation is canceled.
 *
 * @param {string=} message The message.
 * @param {Object=} config The config.
 * @param {Object=} request The request.
 *
 * @returns {CanceledError} The created error.
 */
function CanceledError(message, config, request) {
  // eslint-disable-next-line no-eq-null,eqeqeq
  _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, message == null ? 'canceled' : message, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_CANCELED, config, request);
  this.name = 'CanceledError';
}

_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].inherits(CanceledError, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"], {
  __CANCEL__: true
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CanceledError);


/***/ }),

/***/ "./node_modules/axios/lib/cancel/isCancel.js":
/*!***************************************************!*\
  !*** ./node_modules/axios/lib/cancel/isCancel.js ***!
  \***************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ isCancel)
/* harmony export */ });


function isCancel(value) {
  return !!(value && value.__CANCEL__);
}


/***/ }),

/***/ "./node_modules/axios/lib/core/Axios.js":
/*!**********************************************!*\
  !*** ./node_modules/axios/lib/core/Axios.js ***!
  \**********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js");
/* harmony import */ var _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./InterceptorManager.js */ "./node_modules/axios/lib/core/InterceptorManager.js");
/* harmony import */ var _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dispatchRequest.js */ "./node_modules/axios/lib/core/dispatchRequest.js");
/* harmony import */ var _mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js");
/* harmony import */ var _buildFullPath_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js");
/* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/validator.js */ "./node_modules/axios/lib/helpers/validator.js");
/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");











const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].validators;

/**
 * Create a new instance of Axios
 *
 * @param {Object} instanceConfig The default config for the instance
 *
 * @return {Axios} A new instance of Axios
 */
class Axios {
  constructor(instanceConfig) {
    this.defaults = instanceConfig || {};
    this.interceptors = {
      request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_2__["default"](),
      response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_2__["default"]()
    };
  }

  /**
   * Dispatch a request
   *
   * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
   * @param {?Object} config
   *
   * @returns {Promise} The Promise to be fulfilled
   */
  async request(configOrUrl, config) {
    try {
      return await this._request(configOrUrl, config);
    } catch (err) {
      if (err instanceof Error) {
        let dummy = {};

        Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());

        // slice off the Error: ... line
        const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
        try {
          if (!err.stack) {
            err.stack = stack;
            // match without the 2 top stack lines
          } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
            err.stack += '\n' + stack
          }
        } catch (e) {
          // ignore the case where "stack" is an un-writable property
        }
      }

      throw err;
    }
  }

  _request(configOrUrl, config) {
    /*eslint no-param-reassign:0*/
    // Allow for axios('example/url'[, config]) a la fetch API
    if (typeof configOrUrl === 'string') {
      config = config || {};
      config.url = configOrUrl;
    } else {
      config = configOrUrl || {};
    }

    config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(this.defaults, config);

    const {transitional, paramsSerializer, headers} = config;

    if (transitional !== undefined) {
      _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(transitional, {
        silentJSONParsing: validators.transitional(validators.boolean),
        forcedJSONParsing: validators.transitional(validators.boolean),
        clarifyTimeoutError: validators.transitional(validators.boolean)
      }, false);
    }

    if (paramsSerializer != null) {
      if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(paramsSerializer)) {
        config.paramsSerializer = {
          serialize: paramsSerializer
        }
      } else {
        _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(paramsSerializer, {
          encode: validators.function,
          serialize: validators.function
        }, true);
      }
    }

    // Set config.allowAbsoluteUrls
    if (config.allowAbsoluteUrls !== undefined) {
      // do nothing
    } else if (this.defaults.allowAbsoluteUrls !== undefined) {
      config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
    } else {
      config.allowAbsoluteUrls = true;
    }

    _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(config, {
      baseUrl: validators.spelling('baseURL'),
      withXsrfToken: validators.spelling('withXSRFToken')
    }, true);

    // Set config.method
    config.method = (config.method || this.defaults.method || 'get').toLowerCase();

    // Flatten headers
    let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(
      headers.common,
      headers[config.method]
    );

    headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(
      ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
      (method) => {
        delete headers[method];
      }
    );

    config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].concat(contextHeaders, headers);

    // filter out skipped interceptors
    const requestInterceptorChain = [];
    let synchronousRequestInterceptors = true;
    this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
      if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
        return;
      }

      synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;

      requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
    });

    const responseInterceptorChain = [];
    this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
      responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
    });

    let promise;
    let i = 0;
    let len;

    if (!synchronousRequestInterceptors) {
      const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_3__["default"].bind(this), undefined];
      chain.unshift(...requestInterceptorChain);
      chain.push(...responseInterceptorChain);
      len = chain.length;

      promise = Promise.resolve(config);

      while (i < len) {
        promise = promise.then(chain[i++], chain[i++]);
      }

      return promise;
    }

    len = requestInterceptorChain.length;

    let newConfig = config;

    while (i < len) {
      const onFulfilled = requestInterceptorChain[i++];
      const onRejected = requestInterceptorChain[i++];
      try {
        newConfig = onFulfilled(newConfig);
      } catch (error) {
        onRejected.call(this, error);
        break;
      }
    }

    try {
      promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_3__["default"].call(this, newConfig);
    } catch (error) {
      return Promise.reject(error);
    }

    i = 0;
    len = responseInterceptorChain.length;

    while (i < len) {
      promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
    }

    return promise;
  }

  getUri(config) {
    config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(this.defaults, config);
    const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_5__["default"])(config.baseURL, config.url, config.allowAbsoluteUrls);
    return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_1__["default"])(fullPath, config.params, config.paramsSerializer);
  }
}

// Provide aliases for supported request methods
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
  /*eslint func-names:0*/
  Axios.prototype[method] = function(url, config) {
    return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
      method,
      url,
      data: (config || {}).data
    }));
  };
});

_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  /*eslint func-names:0*/

  function generateHTTPMethod(isForm) {
    return function httpMethod(url, data, config) {
      return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
        method,
        headers: isForm ? {
          'Content-Type': 'multipart/form-data'
        } : {},
        url,
        data
      }));
    };
  }

  Axios.prototype[method] = generateHTTPMethod();

  Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Axios);


/***/ }),

/***/ "./node_modules/axios/lib/core/AxiosError.js":
/*!***************************************************!*\
  !*** ./node_modules/axios/lib/core/AxiosError.js ***!
  \***************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");




/**
 * Create an Error with the specified message, config, error code, request and response.
 *
 * @param {string} message The error message.
 * @param {string} [code] The error code (for example, 'ECONNABORTED').
 * @param {Object} [config] The config.
 * @param {Object} [request] The request.
 * @param {Object} [response] The response.
 *
 * @returns {Error} The created error.
 */
function AxiosError(message, code, config, request, response) {
  Error.call(this);

  if (Error.captureStackTrace) {
    Error.captureStackTrace(this, this.constructor);
  } else {
    this.stack = (new Error()).stack;
  }

  this.message = message;
  this.name = 'AxiosError';
  code && (this.code = code);
  config && (this.config = config);
  request && (this.request = request);
  if (response) {
    this.response = response;
    this.status = response.status ? response.status : null;
  }
}

_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].inherits(AxiosError, Error, {
  toJSON: function toJSON() {
    return {
      // Standard
      message: this.message,
      name: this.name,
      // Microsoft
      description: this.description,
      number: this.number,
      // Mozilla
      fileName: this.fileName,
      lineNumber: this.lineNumber,
      columnNumber: this.columnNumber,
      stack: this.stack,
      // Axios
      config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config),
      code: this.code,
      status: this.status
    };
  }
});

const prototype = AxiosError.prototype;
const descriptors = {};

[
  'ERR_BAD_OPTION_VALUE',
  'ERR_BAD_OPTION',
  'ECONNABORTED',
  'ETIMEDOUT',
  'ERR_NETWORK',
  'ERR_FR_TOO_MANY_REDIRECTS',
  'ERR_DEPRECATED',
  'ERR_BAD_RESPONSE',
  'ERR_BAD_REQUEST',
  'ERR_CANCELED',
  'ERR_NOT_SUPPORT',
  'ERR_INVALID_URL'
// eslint-disable-next-line func-names
].forEach(code => {
  descriptors[code] = {value: code};
});

Object.defineProperties(AxiosError, descriptors);
Object.defineProperty(prototype, 'isAxiosError', {value: true});

// eslint-disable-next-line func-names
AxiosError.from = (error, code, config, request, response, customProps) => {
  const axiosError = Object.create(prototype);

  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(error, axiosError, function filter(obj) {
    return obj !== Error.prototype;
  }, prop => {
    return prop !== 'isAxiosError';
  });

  const msg = error && error.message ? error.message : 'Error';

  // Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
  const errCode = code == null && error ? error.code : code;
  AxiosError.call(axiosError, msg, errCode, config, request, response);

  // Chain the original error on the standard field; non-enumerable to avoid JSON noise
  if (error && axiosError.cause == null) {
    Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
  }

  axiosError.name = (error && error.name) || 'Error';

  customProps && Object.assign(axiosError, customProps);

  return axiosError;
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError);


/***/ }),

/***/ "./node_modules/axios/lib/core/AxiosHeaders.js":
/*!*****************************************************!*\
  !*** ./node_modules/axios/lib/core/AxiosHeaders.js ***!
  \*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/parseHeaders.js */ "./node_modules/axios/lib/helpers/parseHeaders.js");





const $internals = Symbol('internals');

function normalizeHeader(header) {
  return header && String(header).trim().toLowerCase();
}

function normalizeValue(value) {
  if (value === false || value == null) {
    return value;
  }

  return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : String(value);
}

function parseTokens(str) {
  const tokens = Object.create(null);
  const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
  let match;

  while ((match = tokensRE.exec(str))) {
    tokens[match[1]] = match[2];
  }

  return tokens;
}

const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());

function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(filter)) {
    return filter.call(this, value, header);
  }

  if (isHeaderNameFilter) {
    value = header;
  }

  if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(value)) return;

  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(filter)) {
    return value.indexOf(filter) !== -1;
  }

  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(filter)) {
    return filter.test(value);
  }
}

function formatHeader(header) {
  return header.trim()
    .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
      return char.toUpperCase() + str;
    });
}

function buildAccessors(obj, header) {
  const accessorName = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toCamelCase(' ' + header);

  ['get', 'set', 'has'].forEach(methodName => {
    Object.defineProperty(obj, methodName + accessorName, {
      value: function(arg1, arg2, arg3) {
        return this[methodName].call(this, header, arg1, arg2, arg3);
      },
      configurable: true
    });
  });
}

class AxiosHeaders {
  constructor(headers) {
    headers && this.set(headers);
  }

  set(header, valueOrRewrite, rewrite) {
    const self = this;

    function setHeader(_value, _header, _rewrite) {
      const lHeader = normalizeHeader(_header);

      if (!lHeader) {
        throw new Error('header name must be a non-empty string');
      }

      const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, lHeader);

      if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
        self[key || _header] = normalizeValue(_value);
      }
    }

    const setHeaders = (headers, _rewrite) =>
      _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));

    if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(header) || header instanceof this.constructor) {
      setHeaders(header, valueOrRewrite)
    } else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
      setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite);
    } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(header) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isIterable(header)) {
      let obj = {}, dest, key;
      for (const entry of header) {
        if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(entry)) {
          throw TypeError('Object iterator must return a key-value pair');
        }

        obj[key = entry[0]] = (dest = obj[key]) ?
          (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
      }

      setHeaders(obj, valueOrRewrite)
    } else {
      header != null && setHeader(valueOrRewrite, header, rewrite);
    }

    return this;
  }

  get(header, parser) {
    header = normalizeHeader(header);

    if (header) {
      const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header);

      if (key) {
        const value = this[key];

        if (!parser) {
          return value;
        }

        if (parser === true) {
          return parseTokens(value);
        }

        if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(parser)) {
          return parser.call(this, value, key);
        }

        if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(parser)) {
          return parser.exec(value);
        }

        throw new TypeError('parser must be boolean|regexp|function');
      }
    }
  }

  has(header, matcher) {
    header = normalizeHeader(header);

    if (header) {
      const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header);

      return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
    }

    return false;
  }

  delete(header, matcher) {
    const self = this;
    let deleted = false;

    function deleteHeader(_header) {
      _header = normalizeHeader(_header);

      if (_header) {
        const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, _header);

        if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
          delete self[key];

          deleted = true;
        }
      }
    }

    if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header)) {
      header.forEach(deleteHeader);
    } else {
      deleteHeader(header);
    }

    return deleted;
  }

  clear(matcher) {
    const keys = Object.keys(this);
    let i = keys.length;
    let deleted = false;

    while (i--) {
      const key = keys[i];
      if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
        delete this[key];
        deleted = true;
      }
    }

    return deleted;
  }

  normalize(format) {
    const self = this;
    const headers = {};

    _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => {
      const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(headers, header);

      if (key) {
        self[key] = normalizeValue(value);
        delete self[header];
        return;
      }

      const normalized = format ? formatHeader(header) : String(header).trim();

      if (normalized !== header) {
        delete self[header];
      }

      self[normalized] = normalizeValue(value);

      headers[normalized] = true;
    });

    return this;
  }

  concat(...targets) {
    return this.constructor.concat(this, ...targets);
  }

  toJSON(asStrings) {
    const obj = Object.create(null);

    _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => {
      value != null && value !== false && (obj[header] = asStrings && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.join(', ') : value);
    });

    return obj;
  }

  [Symbol.iterator]() {
    return Object.entries(this.toJSON())[Symbol.iterator]();
  }

  toString() {
    return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
  }

  getSetCookie() {
    return this.get("set-cookie") || [];
  }

  get [Symbol.toStringTag]() {
    return 'AxiosHeaders';
  }

  static from(thing) {
    return thing instanceof this ? thing : new this(thing);
  }

  static concat(first, ...targets) {
    const computed = new this(first);

    targets.forEach((target) => computed.set(target));

    return computed;
  }

  static accessor(header) {
    const internals = this[$internals] = (this[$internals] = {
      accessors: {}
    });

    const accessors = internals.accessors;
    const prototype = this.prototype;

    function defineAccessor(_header) {
      const lHeader = normalizeHeader(_header);

      if (!accessors[lHeader]) {
        buildAccessors(prototype, _header);
        accessors[lHeader] = true;
      }
    }

    _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);

    return this;
  }
}

AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);

// reserved names hotfix
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
  return {
    get: () => value,
    set(headerValue) {
      this[mapped] = headerValue;
    }
  }
});

_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosHeaders);


/***/ }),

/***/ "./node_modules/axios/lib/core/InterceptorManager.js":
/*!***********************************************************!*\
  !*** ./node_modules/axios/lib/core/InterceptorManager.js ***!
  \***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");




class InterceptorManager {
  constructor() {
    this.handlers = [];
  }

  /**
   * Add a new interceptor to the stack
   *
   * @param {Function} fulfilled The function to handle `then` for a `Promise`
   * @param {Function} rejected The function to handle `reject` for a `Promise`
   *
   * @return {Number} An ID used to remove interceptor later
   */
  use(fulfilled, rejected, options) {
    this.handlers.push({
      fulfilled,
      rejected,
      synchronous: options ? options.synchronous : false,
      runWhen: options ? options.runWhen : null
    });
    return this.handlers.length - 1;
  }

  /**
   * Remove an interceptor from the stack
   *
   * @param {Number} id The ID that was returned by `use`
   *
   * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
   */
  eject(id) {
    if (this.handlers[id]) {
      this.handlers[id] = null;
    }
  }

  /**
   * Clear all interceptors from the stack
   *
   * @returns {void}
   */
  clear() {
    if (this.handlers) {
      this.handlers = [];
    }
  }

  /**
   * Iterate over all the registered interceptors
   *
   * This method is particularly useful for skipping over any
   * interceptors that may have become `null` calling `eject`.
   *
   * @param {Function} fn The function to call for each interceptor
   *
   * @returns {void}
   */
  forEach(fn) {
    _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this.handlers, function forEachHandler(h) {
      if (h !== null) {
        fn(h);
      }
    });
  }
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InterceptorManager);


/***/ }),

/***/ "./node_modules/axios/lib/core/buildFullPath.js":
/*!******************************************************!*\
  !*** ./node_modules/axios/lib/core/buildFullPath.js ***!
  \******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ buildFullPath)
/* harmony export */ });
/* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/isAbsoluteURL.js */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js");
/* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/combineURLs.js */ "./node_modules/axios/lib/helpers/combineURLs.js");





/**
 * Creates a new URL by combining the baseURL with the requestedURL,
 * only when the requestedURL is not already an absolute URL.
 * If the requestURL is absolute, this function returns the requestedURL untouched.
 *
 * @param {string} baseURL The base URL
 * @param {string} requestedURL Absolute or relative URL to combine
 *
 * @returns {string} The combined full path
 */
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
  let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL);
  if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
    return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL);
  }
  return requestedURL;
}


/***/ }),

/***/ "./node_modules/axios/lib/core/dispatchRequest.js":
/*!********************************************************!*\
  !*** ./node_modules/axios/lib/core/dispatchRequest.js ***!
  \********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ dispatchRequest)
/* harmony export */ });
/* harmony import */ var _transformData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transformData.js */ "./node_modules/axios/lib/core/transformData.js");
/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js");
/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js");
/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js");
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js");









/**
 * Throws a `CanceledError` if cancellation has been requested.
 *
 * @param {Object} config The config that is to be used for the request
 *
 * @returns {void}
 */
function throwIfCancellationRequested(config) {
  if (config.cancelToken) {
    config.cancelToken.throwIfRequested();
  }

  if (config.signal && config.signal.aborted) {
    throw new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_3__["default"](null, config);
  }
}

/**
 * Dispatch a request to the server using the configured adapter.
 *
 * @param {object} config The config that is to be used for the request
 *
 * @returns {Promise} The Promise to be fulfilled
 */
function dispatchRequest(config) {
  throwIfCancellationRequested(config);

  config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(config.headers);

  // Transform request data
  config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
    config,
    config.transformRequest
  );

  if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
    config.headers.setContentType('application/x-www-form-urlencoded', false);
  }

  const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_5__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].adapter, config);

  return adapter(config).then(function onAdapterResolution(response) {
    throwIfCancellationRequested(config);

    // Transform response data
    response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
      config,
      config.transformResponse,
      response
    );

    response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(response.headers);

    return response;
  }, function onAdapterRejection(reason) {
    if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_1__["default"])(reason)) {
      throwIfCancellationRequested(config);

      // Transform response data
      if (reason && reason.response) {
        reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
          config,
          config.transformResponse,
          reason.response
        );
        reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(reason.response.headers);
      }
    }

    return Promise.reject(reason);
  });
}


/***/ }),

/***/ "./node_modules/axios/lib/core/mergeConfig.js":
/*!****************************************************!*\
  !*** ./node_modules/axios/lib/core/mergeConfig.js ***!
  \****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ mergeConfig)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");





const headersToObject = (thing) => thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"] ? { ...thing } : thing;

/**
 * Config-specific merge-function which creates a new config-object
 * by merging two configuration objects together.
 *
 * @param {Object} config1
 * @param {Object} config2
 *
 * @returns {Object} New object resulting from merging config2 to config1
 */
function mergeConfig(config1, config2) {
  // eslint-disable-next-line no-param-reassign
  config2 = config2 || {};
  const config = {};

  function getMergedValue(target, source, prop, caseless) {
    if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
      return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({caseless}, target, source);
    } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
      return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge({}, source);
    } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(source)) {
      return source.slice();
    }
    return source;
  }

  // eslint-disable-next-line consistent-return
  function mergeDeepProperties(a, b, prop , caseless) {
    if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
      return getMergedValue(a, b, prop , caseless);
    } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(a)) {
      return getMergedValue(undefined, a, prop , caseless);
    }
  }

  // eslint-disable-next-line consistent-return
  function valueFromConfig2(a, b) {
    if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
      return getMergedValue(undefined, b);
    }
  }

  // eslint-disable-next-line consistent-return
  function defaultToConfig2(a, b) {
    if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
      return getMergedValue(undefined, b);
    } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(a)) {
      return getMergedValue(undefined, a);
    }
  }

  // eslint-disable-next-line consistent-return
  function mergeDirectKeys(a, b, prop) {
    if (prop in config2) {
      return getMergedValue(a, b);
    } else if (prop in config1) {
      return getMergedValue(undefined, a);
    }
  }

  const mergeMap = {
    url: valueFromConfig2,
    method: valueFromConfig2,
    data: valueFromConfig2,
    baseURL: defaultToConfig2,
    transformRequest: defaultToConfig2,
    transformResponse: defaultToConfig2,
    paramsSerializer: defaultToConfig2,
    timeout: defaultToConfig2,
    timeoutMessage: defaultToConfig2,
    withCredentials: defaultToConfig2,
    withXSRFToken: defaultToConfig2,
    adapter: defaultToConfig2,
    responseType: defaultToConfig2,
    xsrfCookieName: defaultToConfig2,
    xsrfHeaderName: defaultToConfig2,
    onUploadProgress: defaultToConfig2,
    onDownloadProgress: defaultToConfig2,
    decompress: defaultToConfig2,
    maxContentLength: defaultToConfig2,
    maxBodyLength: defaultToConfig2,
    beforeRedirect: defaultToConfig2,
    transport: defaultToConfig2,
    httpAgent: defaultToConfig2,
    httpsAgent: defaultToConfig2,
    cancelToken: defaultToConfig2,
    socketPath: defaultToConfig2,
    responseEncoding: defaultToConfig2,
    validateStatus: mergeDirectKeys,
    headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
  };

  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
    const merge = mergeMap[prop] || mergeDeepProperties;
    const configValue = merge(config1[prop], config2[prop], prop);
    (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
  });

  return config;
}


/***/ }),

/***/ "./node_modules/axios/lib/core/settle.js":
/*!***********************************************!*\
  !*** ./node_modules/axios/lib/core/settle.js ***!
  \***********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ settle)
/* harmony export */ });
/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");




/**
 * Resolve or reject a Promise based on response status.
 *
 * @param {Function} resolve A function that resolves the promise.
 * @param {Function} reject A function that rejects the promise.
 * @param {object} response The response.
 *
 * @returns {object} The response.
 */
function settle(resolve, reject, response) {
  const validateStatus = response.config.validateStatus;
  if (!response.status || !validateStatus || validateStatus(response.status)) {
    resolve(response);
  } else {
    reject(new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
      'Request failed with status code ' + response.status,
      [_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
      response.config,
      response.request,
      response
    ));
  }
}


/***/ }),

/***/ "./node_modules/axios/lib/core/transformData.js":
/*!******************************************************!*\
  !*** ./node_modules/axios/lib/core/transformData.js ***!
  \******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ transformData)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js");
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");






/**
 * Transform the data for a request or a response
 *
 * @param {Array|Function} fns A single function or Array of functions
 * @param {?Object} response The response object
 *
 * @returns {*} The resulting transformed data
 */
function transformData(fns, response) {
  const config = this || _defaults_index_js__WEBPACK_IMPORTED_MODULE_1__["default"];
  const context = response || config;
  const headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(context.headers);
  let data = context.data;

  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(fns, function transform(fn) {
    data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
  });

  headers.normalize();

  return data;
}


/***/ }),

/***/ "./node_modules/axios/lib/defaults/index.js":
/*!**************************************************!*\
  !*** ./node_modules/axios/lib/defaults/index.js ***!
  \**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
/* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transitional.js */ "./node_modules/axios/lib/defaults/transitional.js");
/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js");
/* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ "./node_modules/axios/lib/helpers/toURLEncodedForm.js");
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js");










/**
 * It takes a string, tries to parse it, and if it fails, it returns the stringified version
 * of the input
 *
 * @param {any} rawValue - The value to be stringified.
 * @param {Function} parser - A function that parses a string into a JavaScript object.
 * @param {Function} encoder - A function that takes a value and returns a string.
 *
 * @returns {string} A stringified version of the rawValue.
 */
function stringifySafely(rawValue, parser, encoder) {
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(rawValue)) {
    try {
      (parser || JSON.parse)(rawValue);
      return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].trim(rawValue);
    } catch (e) {
      if (e.name !== 'SyntaxError') {
        throw e;
      }
    }
  }

  return (encoder || JSON.stringify)(rawValue);
}

const defaults = {

  transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_2__["default"],

  adapter: ['xhr', 'http', 'fetch'],

  transformRequest: [function transformRequest(data, headers) {
    const contentType = headers.getContentType() || '';
    const hasJSONContentType = contentType.indexOf('application/json') > -1;
    const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(data);

    if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(data)) {
      data = new FormData(data);
    }

    const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data);

    if (isFormData) {
      return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_6__["default"])(data)) : data;
    }

    if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(data) ||
      _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(data) ||
      _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStream(data) ||
      _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFile(data) ||
      _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(data) ||
      _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)
    ) {
      return data;
    }
    if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(data)) {
      return data.buffer;
    }
    if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(data)) {
      headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
      return data.toString();
    }

    let isFileList;

    if (isObjectPayload) {
      if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
        return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__["default"])(data, this.formSerializer).toString();
      }

      if ((isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
        const _FormData = this.env && this.env.FormData;

        return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
          isFileList ? {'files[]': data} : data,
          _FormData && new _FormData(),
          this.formSerializer
        );
      }
    }

    if (isObjectPayload || hasJSONContentType ) {
      headers.setContentType('application/json', false);
      return stringifySafely(data);
    }

    return data;
  }],

  transformResponse: [function transformResponse(data) {
    const transitional = this.transitional || defaults.transitional;
    const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
    const JSONRequested = this.responseType === 'json';

    if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)) {
      return data;
    }

    if (data && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
      const silentJSONParsing = transitional && transitional.silentJSONParsing;
      const strictJSONParsing = !silentJSONParsing && JSONRequested;

      try {
        return JSON.parse(data, this.parseReviver);
      } catch (e) {
        if (strictJSONParsing) {
          if (e.name === 'SyntaxError') {
            throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_RESPONSE, this, null, this.response);
          }
          throw e;
        }
      }
    }

    return data;
  }],

  /**
   * A timeout in milliseconds to abort a request. If set to 0 (default) a
   * timeout is not created.
   */
  timeout: 0,

  xsrfCookieName: 'XSRF-TOKEN',
  xsrfHeaderName: 'X-XSRF-TOKEN',

  maxContentLength: -1,
  maxBodyLength: -1,

  env: {
    FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].classes.FormData,
    Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].classes.Blob
  },

  validateStatus: function validateStatus(status) {
    return status >= 200 && status < 300;
  },

  headers: {
    common: {
      'Accept': 'application/json, text/plain, */*',
      'Content-Type': undefined
    }
  }
};

_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
  defaults.headers[method] = {};
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults);


/***/ }),

/***/ "./node_modules/axios/lib/defaults/transitional.js":
/*!*********************************************************!*\
  !*** ./node_modules/axios/lib/defaults/transitional.js ***!
  \*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });


/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  silentJSONParsing: true,
  forcedJSONParsing: true,
  clarifyTimeoutError: false
});


/***/ }),

/***/ "./node_modules/axios/lib/env/data.js":
/*!********************************************!*\
  !*** ./node_modules/axios/lib/env/data.js ***!
  \********************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   VERSION: () => (/* binding */ VERSION)
/* harmony export */ });
const VERSION = "1.12.2";

/***/ }),

/***/ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js":
/*!****************************************************************!*\
  !*** ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js ***!
  \****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js");




/**
 * It encodes a string by replacing all characters that are not in the unreserved set with
 * their percent-encoded equivalents
 *
 * @param {string} str - The string to encode.
 *
 * @returns {string} The encoded string.
 */
function encode(str) {
  const charMap = {
    '!': '%21',
    "'": '%27',
    '(': '%28',
    ')': '%29',
    '~': '%7E',
    '%20': '+',
    '%00': '\x00'
  };
  return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
    return charMap[match];
  });
}

/**
 * It takes a params object and converts it to a FormData object
 *
 * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
 * @param {Object<string, any>} options - The options object passed to the Axios constructor.
 *
 * @returns {void}
 */
function AxiosURLSearchParams(params, options) {
  this._pairs = [];

  params && (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, this, options);
}

const prototype = AxiosURLSearchParams.prototype;

prototype.append = function append(name, value) {
  this._pairs.push([name, value]);
};

prototype.toString = function toString(encoder) {
  const _encode = encoder ? function(value) {
    return encoder.call(this, value, encode);
  } : encode;

  return this._pairs.map(function each(pair) {
    return _encode(pair[0]) + '=' + _encode(pair[1]);
  }, '').join('&');
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosURLSearchParams);


/***/ }),

/***/ "./node_modules/axios/lib/helpers/HttpStatusCode.js":
/*!**********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/HttpStatusCode.js ***!
  \**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
const HttpStatusCode = {
  Continue: 100,
  SwitchingProtocols: 101,
  Processing: 102,
  EarlyHints: 103,
  Ok: 200,
  Created: 201,
  Accepted: 202,
  NonAuthoritativeInformation: 203,
  NoContent: 204,
  ResetContent: 205,
  PartialContent: 206,
  MultiStatus: 207,
  AlreadyReported: 208,
  ImUsed: 226,
  MultipleChoices: 300,
  MovedPermanently: 301,
  Found: 302,
  SeeOther: 303,
  NotModified: 304,
  UseProxy: 305,
  Unused: 306,
  TemporaryRedirect: 307,
  PermanentRedirect: 308,
  BadRequest: 400,
  Unauthorized: 401,
  PaymentRequired: 402,
  Forbidden: 403,
  NotFound: 404,
  MethodNotAllowed: 405,
  NotAcceptable: 406,
  ProxyAuthenticationRequired: 407,
  RequestTimeout: 408,
  Conflict: 409,
  Gone: 410,
  LengthRequired: 411,
  PreconditionFailed: 412,
  PayloadTooLarge: 413,
  UriTooLong: 414,
  UnsupportedMediaType: 415,
  RangeNotSatisfiable: 416,
  ExpectationFailed: 417,
  ImATeapot: 418,
  MisdirectedRequest: 421,
  UnprocessableEntity: 422,
  Locked: 423,
  FailedDependency: 424,
  TooEarly: 425,
  UpgradeRequired: 426,
  PreconditionRequired: 428,
  TooManyRequests: 429,
  RequestHeaderFieldsTooLarge: 431,
  UnavailableForLegalReasons: 451,
  InternalServerError: 500,
  NotImplemented: 501,
  BadGateway: 502,
  ServiceUnavailable: 503,
  GatewayTimeout: 504,
  HttpVersionNotSupported: 505,
  VariantAlsoNegotiates: 506,
  InsufficientStorage: 507,
  LoopDetected: 508,
  NotExtended: 510,
  NetworkAuthenticationRequired: 511,
};

Object.entries(HttpStatusCode).forEach(([key, value]) => {
  HttpStatusCode[value] = key;
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HttpStatusCode);


/***/ }),

/***/ "./node_modules/axios/lib/helpers/bind.js":
/*!************************************************!*\
  !*** ./node_modules/axios/lib/helpers/bind.js ***!
  \************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ bind)
/* harmony export */ });


function bind(fn, thisArg) {
  return function wrap() {
    return fn.apply(thisArg, arguments);
  };
}


/***/ }),

/***/ "./node_modules/axios/lib/helpers/buildURL.js":
/*!****************************************************!*\
  !*** ./node_modules/axios/lib/helpers/buildURL.js ***!
  \****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ buildURL)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js");





/**
 * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
 * URI encoded counterparts
 *
 * @param {string} val The value to be encoded.
 *
 * @returns {string} The encoded value.
 */
function encode(val) {
  return encodeURIComponent(val).
    replace(/%3A/gi, ':').
    replace(/%24/g, '$').
    replace(/%2C/gi, ',').
    replace(/%20/g, '+');
}

/**
 * Build a URL by appending params to the end
 *
 * @param {string} url The base of the url (e.g., http://www.google.com)
 * @param {object} [params] The params to be appended
 * @param {?(object|Function)} options
 *
 * @returns {string} The formatted url
 */
function buildURL(url, params, options) {
  /*eslint no-param-reassign:0*/
  if (!params) {
    return url;
  }
  
  const _encode = options && options.encode || encode;

  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(options)) {
    options = {
      serialize: options
    };
  } 

  const serializeFn = options && options.serialize;

  let serializedParams;

  if (serializeFn) {
    serializedParams = serializeFn(params, options);
  } else {
    serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params) ?
      params.toString() :
      new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, options).toString(_encode);
  }

  if (serializedParams) {
    const hashmarkIndex = url.indexOf("#");

    if (hashmarkIndex !== -1) {
      url = url.slice(0, hashmarkIndex);
    }
    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  }

  return url;
}


/***/ }),

/***/ "./node_modules/axios/lib/helpers/combineURLs.js":
/*!*******************************************************!*\
  !*** ./node_modules/axios/lib/helpers/combineURLs.js ***!
  \*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ combineURLs)
/* harmony export */ });


/**
 * Creates a new URL by combining the specified URLs
 *
 * @param {string} baseURL The base URL
 * @param {string} relativeURL The relative URL
 *
 * @returns {string} The combined URL
 */
function combineURLs(baseURL, relativeURL) {
  return relativeURL
    ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
    : baseURL;
}


/***/ }),

/***/ "./node_modules/axios/lib/helpers/composeSignals.js":
/*!**********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/composeSignals.js ***!
  \**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js");
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");




const composeSignals = (signals, timeout) => {
  const {length} = (signals = signals ? signals.filter(Boolean) : []);

  if (timeout || length) {
    let controller = new AbortController();

    let aborted;

    const onabort = function (reason) {
      if (!aborted) {
        aborted = true;
        unsubscribe();
        const err = reason instanceof Error ? reason : this.reason;
        controller.abort(err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"] ? err : new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](err instanceof Error ? err.message : err));
      }
    }

    let timer = timeout && setTimeout(() => {
      timer = null;
      onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](`timeout ${timeout} of ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ETIMEDOUT))
    }, timeout)

    const unsubscribe = () => {
      if (signals) {
        timer && clearTimeout(timer);
        timer = null;
        signals.forEach(signal => {
          signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
        });
        signals = null;
      }
    }

    signals.forEach((signal) => signal.addEventListener('abort', onabort));

    const {signal} = controller;

    signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe);

    return signal;
  }
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (composeSignals);


/***/ }),

/***/ "./node_modules/axios/lib/helpers/cookies.js":
/*!***************************************************!*\
  !*** ./node_modules/axios/lib/helpers/cookies.js ***!
  \***************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");



/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasStandardBrowserEnv ?

  // Standard browser envs support document.cookie
  {
    write(name, value, expires, path, domain, secure) {
      const cookie = [name + '=' + encodeURIComponent(value)];

      _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());

      _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(path) && cookie.push('path=' + path);

      _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(domain) && cookie.push('domain=' + domain);

      secure === true && cookie.push('secure');

      document.cookie = cookie.join('; ');
    },

    read(name) {
      const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
      return (match ? decodeURIComponent(match[3]) : null);
    },

    remove(name) {
      this.write(name, '', Date.now() - 86400000);
    }
  }

  :

  // Non-standard browser env (web workers, react-native) lack needed support.
  {
    write() {},
    read() {
      return null;
    },
    remove() {}
  });



/***/ }),

/***/ "./node_modules/axios/lib/helpers/formDataToJSON.js":
/*!**********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/formDataToJSON.js ***!
  \**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");




/**
 * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
 *
 * @param {string} name - The name of the property to get.
 *
 * @returns An array of strings.
 */
function parsePropPath(name) {
  // foo[x][y][z]
  // foo.x.y.z
  // foo-x-y-z
  // foo x y z
  return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map(match => {
    return match[0] === '[]' ? '' : match[1] || match[0];
  });
}

/**
 * Convert an array to an object.
 *
 * @param {Array<any>} arr - The array to convert to an object.
 *
 * @returns An object with the same keys and values as the array.
 */
function arrayToObject(arr) {
  const obj = {};
  const keys = Object.keys(arr);
  let i;
  const len = keys.length;
  let key;
  for (i = 0; i < len; i++) {
    key = keys[i];
    obj[key] = arr[key];
  }
  return obj;
}

/**
 * It takes a FormData object and returns a JavaScript object
 *
 * @param {string} formData The FormData object to convert to JSON.
 *
 * @returns {Object<string, any> | null} The converted object.
 */
function formDataToJSON(formData) {
  function buildPath(path, value, target, index) {
    let name = path[index++];

    if (name === '__proto__') return true;

    const isNumericKey = Number.isFinite(+name);
    const isLast = index >= path.length;
    name = !name && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target) ? target.length : name;

    if (isLast) {
      if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) {
        target[name] = [target[name], value];
      } else {
        target[name] = value;
      }

      return !isNumericKey;
    }

    if (!target[name] || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(target[name])) {
      target[name] = [];
    }

    const result = buildPath(path, value, target[name], index);

    if (result && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])) {
      target[name] = arrayToObject(target[name]);
    }

    return !isNumericKey;
  }

  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(formData.entries)) {
    const obj = {};

    _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEachEntry(formData, (name, value) => {
      buildPath(parsePropPath(name), value, obj, 0);
    });

    return obj;
  }

  return null;
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (formDataToJSON);


/***/ }),

/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js":
/*!*********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***!
  \*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ isAbsoluteURL)
/* harmony export */ });


/**
 * Determines whether the specified URL is absolute
 *
 * @param {string} url The URL to test
 *
 * @returns {boolean} True if the specified URL is absolute, otherwise false
 */
function isAbsoluteURL(url) {
  // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  // by any combination of letters, digits, plus, period, or hyphen.
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
}


/***/ }),

/***/ "./node_modules/axios/lib/helpers/isAxiosError.js":
/*!********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/isAxiosError.js ***!
  \********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ isAxiosError)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");




/**
 * Determines whether the payload is an error thrown by Axios
 *
 * @param {*} payload The value to test
 *
 * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
 */
function isAxiosError(payload) {
  return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) && (payload.isAxiosError === true);
}


/***/ }),

/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js":
/*!***********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***!
  \***********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");


/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
  url = new URL(url, _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin);

  return (
    origin.protocol === url.protocol &&
    origin.host === url.host &&
    (isMSIE || origin.port === url.port)
  );
})(
  new URL(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin),
  _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent)
) : () => true);


/***/ }),

/***/ "./node_modules/axios/lib/helpers/null.js":
/*!************************************************!*\
  !*** ./node_modules/axios/lib/helpers/null.js ***!
  \************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// eslint-disable-next-line strict
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (null);


/***/ }),

/***/ "./node_modules/axios/lib/helpers/parseHeaders.js":
/*!********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***!
  \********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");




// RawAxiosHeaders whose duplicates are ignored by node
// c.f. https://nodejs.org/api/http.html#http_message_headers
const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toObjectSet([
  'age', 'authorization', 'content-length', 'content-type', 'etag',
  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
  'last-modified', 'location', 'max-forwards', 'proxy-authorization',
  'referer', 'retry-after', 'user-agent'
]);

/**
 * Parse headers into an object
 *
 * ```
 * Date: Wed, 27 Aug 2014 08:58:49 GMT
 * Content-Type: application/json
 * Connection: keep-alive
 * Transfer-Encoding: chunked
 * ```
 *
 * @param {String} rawHeaders Headers needing to be parsed
 *
 * @returns {Object} Headers parsed into an object
 */
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rawHeaders => {
  const parsed = {};
  let key;
  let val;
  let i;

  rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
    i = line.indexOf(':');
    key = line.substring(0, i).trim().toLowerCase();
    val = line.substring(i + 1).trim();

    if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
      return;
    }

    if (key === 'set-cookie') {
      if (parsed[key]) {
        parsed[key].push(val);
      } else {
        parsed[key] = [val];
      }
    } else {
      parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
    }
  });

  return parsed;
});


/***/ }),

/***/ "./node_modules/axios/lib/helpers/parseProtocol.js":
/*!*********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/parseProtocol.js ***!
  \*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ parseProtocol)
/* harmony export */ });


function parseProtocol(url) {
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
  return match && match[1] || '';
}


/***/ }),

/***/ "./node_modules/axios/lib/helpers/progressEventReducer.js":
/*!****************************************************************!*\
  !*** ./node_modules/axios/lib/helpers/progressEventReducer.js ***!
  \****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   asyncDecorator: () => (/* binding */ asyncDecorator),
/* harmony export */   progressEventDecorator: () => (/* binding */ progressEventDecorator),
/* harmony export */   progressEventReducer: () => (/* binding */ progressEventReducer)
/* harmony export */ });
/* harmony import */ var _speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./speedometer.js */ "./node_modules/axios/lib/helpers/speedometer.js");
/* harmony import */ var _throttle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./throttle.js */ "./node_modules/axios/lib/helpers/throttle.js");
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");




const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
  let bytesNotified = 0;
  const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250);

  return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e => {
    const loaded = e.loaded;
    const total = e.lengthComputable ? e.total : undefined;
    const progressBytes = loaded - bytesNotified;
    const rate = _speedometer(progressBytes);
    const inRange = loaded <= total;

    bytesNotified = loaded;

    const data = {
      loaded,
      total,
      progress: total ? (loaded / total) : undefined,
      bytes: progressBytes,
      rate: rate ? rate : undefined,
      estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
      event: e,
      lengthComputable: total != null,
      [isDownloadStream ? 'download' : 'upload']: true
    };

    listener(data);
  }, freq);
}

const progressEventDecorator = (total, throttled) => {
  const lengthComputable = total != null;

  return [(loaded) => throttled[0]({
    lengthComputable,
    total,
    loaded
  }), throttled[1]];
}

const asyncDecorator = (fn) => (...args) => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(() => fn(...args));


/***/ }),

/***/ "./node_modules/axios/lib/helpers/resolveConfig.js":
/*!*********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/resolveConfig.js ***!
  \*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isURLSameOrigin.js */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js");
/* harmony import */ var _cookies_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cookies.js */ "./node_modules/axios/lib/helpers/cookies.js");
/* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js");
/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js");
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
/* harmony import */ var _buildURL_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js");









/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((config) => {
  const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_5__["default"])({}, config);

  let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;

  newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(headers);

  newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])((0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);

  // HTTP basic authentication
  if (auth) {
    headers.set('Authorization', 'Basic ' +
      btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
    );
  }

  if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data)) {
    if (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserWebWorkerEnv) {
      headers.setContentType(undefined); // browser handles it
    } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(data.getHeaders)) {
      // Node.js FormData (like form-data package)
      const formHeaders = data.getHeaders();
      // Only set safe headers to avoid overwriting security headers
      const allowedHeaders = ['content-type', 'content-length'];
      Object.entries(formHeaders).forEach(([key, val]) => {
        if (allowedHeaders.includes(key.toLowerCase())) {
          headers.set(key, val);
        }
      });
    }
  }  

  // Add xsrf header
  // This is only done if running in a standard browser environment.
  // Specifically not if we're in a web worker, or react-native.

  if (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv) {
    withXSRFToken && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));

    if (withXSRFToken || (withXSRFToken !== false && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_2__["default"])(newConfig.url))) {
      // Add xsrf header
      const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__WEBPACK_IMPORTED_MODULE_3__["default"].read(xsrfCookieName);

      if (xsrfValue) {
        headers.set(xsrfHeaderName, xsrfValue);
      }
    }
  }

  return newConfig;
});



/***/ }),

/***/ "./node_modules/axios/lib/helpers/speedometer.js":
/*!*******************************************************!*\
  !*** ./node_modules/axios/lib/helpers/speedometer.js ***!
  \*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });


/**
 * Calculate data maxRate
 * @param {Number} [samplesCount= 10]
 * @param {Number} [min= 1000]
 * @returns {Function}
 */
function speedometer(samplesCount, min) {
  samplesCount = samplesCount || 10;
  const bytes = new Array(samplesCount);
  const timestamps = new Array(samplesCount);
  let head = 0;
  let tail = 0;
  let firstSampleTS;

  min = min !== undefined ? min : 1000;

  return function push(chunkLength) {
    const now = Date.now();

    const startedAt = timestamps[tail];

    if (!firstSampleTS) {
      firstSampleTS = now;
    }

    bytes[head] = chunkLength;
    timestamps[head] = now;

    let i = tail;
    let bytesCount = 0;

    while (i !== head) {
      bytesCount += bytes[i++];
      i = i % samplesCount;
    }

    head = (head + 1) % samplesCount;

    if (head === tail) {
      tail = (tail + 1) % samplesCount;
    }

    if (now - firstSampleTS < min) {
      return;
    }

    const passed = startedAt && now - startedAt;

    return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
  };
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (speedometer);


/***/ }),

/***/ "./node_modules/axios/lib/helpers/spread.js":
/*!**************************************************!*\
  !*** ./node_modules/axios/lib/helpers/spread.js ***!
  \**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ spread)
/* harmony export */ });


/**
 * Syntactic sugar for invoking a function and expanding an array for arguments.
 *
 * Common use case would be to use `Function.prototype.apply`.
 *
 *  ```js
 *  function f(x, y, z) {}
 *  var args = [1, 2, 3];
 *  f.apply(null, args);
 *  ```
 *
 * With `spread` this example can be re-written.
 *
 *  ```js
 *  spread(function(x, y, z) {})([1, 2, 3]);
 *  ```
 *
 * @param {Function} callback
 *
 * @returns {Function}
 */
function spread(callback) {
  return function wrap(arr) {
    return callback.apply(null, arr);
  };
}


/***/ }),

/***/ "./node_modules/axios/lib/helpers/throttle.js":
/*!****************************************************!*\
  !*** ./node_modules/axios/lib/helpers/throttle.js ***!
  \****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/**
 * Throttle decorator
 * @param {Function} fn
 * @param {Number} freq
 * @return {Function}
 */
function throttle(fn, freq) {
  let timestamp = 0;
  let threshold = 1000 / freq;
  let lastArgs;
  let timer;

  const invoke = (args, now = Date.now()) => {
    timestamp = now;
    lastArgs = null;
    if (timer) {
      clearTimeout(timer);
      timer = null;
    }
    fn(...args);
  }

  const throttled = (...args) => {
    const now = Date.now();
    const passed = now - timestamp;
    if ( passed >= threshold) {
      invoke(args, now);
    } else {
      lastArgs = args;
      if (!timer) {
        timer = setTimeout(() => {
          timer = null;
          invoke(lastArgs)
        }, threshold - passed);
      }
    }
  }

  const flush = () => lastArgs && invoke(lastArgs);

  return [throttled, flush];
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (throttle);


/***/ }),

/***/ "./node_modules/axios/lib/helpers/toFormData.js":
/*!******************************************************!*\
  !*** ./node_modules/axios/lib/helpers/toFormData.js ***!
  \******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
/* harmony import */ var _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../platform/node/classes/FormData.js */ "./node_modules/axios/lib/helpers/null.js");




// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored


/**
 * Determines if the given thing is a array or js object.
 *
 * @param {string} thing - The object or array to be visited.
 *
 * @returns {boolean}
 */
function isVisitable(thing) {
  return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(thing) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(thing);
}

/**
 * It removes the brackets from the end of a string
 *
 * @param {string} key - The key of the parameter.
 *
 * @returns {string} the key without the brackets.
 */
function removeBrackets(key) {
  return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]') ? key.slice(0, -2) : key;
}

/**
 * It takes a path, a key, and a boolean, and returns a string
 *
 * @param {string} path - The path to the current key.
 * @param {string} key - The key of the current object being iterated over.
 * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
 *
 * @returns {string} The path to the current key.
 */
function renderKey(path, key, dots) {
  if (!path) return key;
  return path.concat(key).map(function each(token, i) {
    // eslint-disable-next-line no-param-reassign
    token = removeBrackets(token);
    return !dots && i ? '[' + token + ']' : token;
  }).join(dots ? '.' : '');
}

/**
 * If the array is an array and none of its elements are visitable, then it's a flat array.
 *
 * @param {Array<any>} arr - The array to check
 *
 * @returns {boolean}
 */
function isFlatArray(arr) {
  return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(arr) && !arr.some(isVisitable);
}

const predicates = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"], {}, null, function filter(prop) {
  return /^is[A-Z]/.test(prop);
});

/**
 * Convert a data object to FormData
 *
 * @param {Object} obj
 * @param {?Object} [formData]
 * @param {?Object} [options]
 * @param {Function} [options.visitor]
 * @param {Boolean} [options.metaTokens = true]
 * @param {Boolean} [options.dots = false]
 * @param {?Boolean} [options.indexes = false]
 *
 * @returns {Object}
 **/

/**
 * It converts an object into a FormData object
 *
 * @param {Object<any, any>} obj - The object to convert to form data.
 * @param {string} formData - The FormData object to append to.
 * @param {Object<string, any>} options
 *
 * @returns
 */
function toFormData(obj, formData, options) {
  if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) {
    throw new TypeError('target must be an object');
  }

  // eslint-disable-next-line no-param-reassign
  formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"] || FormData)();

  // eslint-disable-next-line no-param-reassign
  options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(options, {
    metaTokens: true,
    dots: false,
    indexes: false
  }, false, function defined(option, source) {
    // eslint-disable-next-line no-eq-null,eqeqeq
    return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]);
  });

  const metaTokens = options.metaTokens;
  // eslint-disable-next-line no-use-before-define
  const visitor = options.visitor || defaultVisitor;
  const dots = options.dots;
  const indexes = options.indexes;
  const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
  const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData);

  if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) {
    throw new TypeError('visitor must be a function');
  }

  function convertValue(value) {
    if (value === null) return '';

    if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isDate(value)) {
      return value.toISOString();
    }

    if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBoolean(value)) {
      return value.toString();
    }

    if (!useBlob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(value)) {
      throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('Blob is not supported. Use a Buffer instead.');
    }

    if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isTypedArray(value)) {
      return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
    }

    return value;
  }

  /**
   * Default visitor.
   *
   * @param {*} value
   * @param {String|Number} key
   * @param {Array<String|Number>} path
   * @this {FormData}
   *
   * @returns {boolean} return true to visit the each prop of the value recursively
   */
  function defaultVisitor(value, key, path) {
    let arr = value;

    if (value && !path && typeof value === 'object') {
      if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '{}')) {
        // eslint-disable-next-line no-param-reassign
        key = metaTokens ? key : key.slice(0, -2);
        // eslint-disable-next-line no-param-reassign
        value = JSON.stringify(value);
      } else if (
        (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) ||
        ((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value))
        )) {
        // eslint-disable-next-line no-param-reassign
        key = removeBrackets(key);

        arr.forEach(function each(el, index) {
          !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && formData.append(
            // eslint-disable-next-line no-nested-ternary
            indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
            convertValue(el)
          );
        });
        return false;
      }
    }

    if (isVisitable(value)) {
      return true;
    }

    formData.append(renderKey(path, key, dots), convertValue(value));

    return false;
  }

  const stack = [];

  const exposedHelpers = Object.assign(predicates, {
    defaultVisitor,
    convertValue,
    isVisitable
  });

  function build(value, path) {
    if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return;

    if (stack.indexOf(value) !== -1) {
      throw Error('Circular reference detected in ' + path.join('.'));
    }

    stack.push(value);

    _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(value, function each(el, key) {
      const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && visitor.call(
        formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers
      );

      if (result === true) {
        build(el, path ? path.concat(key) : [key]);
      }
    });

    stack.pop();
  }

  if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) {
    throw new TypeError('data must be an object');
  }

  build(obj);

  return formData;
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toFormData);


/***/ }),

/***/ "./node_modules/axios/lib/helpers/toURLEncodedForm.js":
/*!************************************************************!*\
  !*** ./node_modules/axios/lib/helpers/toURLEncodedForm.js ***!
  \************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ toURLEncodedForm)
/* harmony export */ });
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js");
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");






function toURLEncodedForm(data, options) {
  return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_1__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].classes.URLSearchParams(), {
    visitor: function(value, key, path, helpers) {
      if (_platform_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(value)) {
        this.append(key, value.toString('base64'));
        return false;
      }

      return helpers.defaultVisitor.apply(this, arguments);
    },
    ...options
  });
}


/***/ }),

/***/ "./node_modules/axios/lib/helpers/trackStream.js":
/*!*******************************************************!*\
  !*** ./node_modules/axios/lib/helpers/trackStream.js ***!
  \*******************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   readBytes: () => (/* binding */ readBytes),
/* harmony export */   streamChunk: () => (/* binding */ streamChunk),
/* harmony export */   trackStream: () => (/* binding */ trackStream)
/* harmony export */ });

const streamChunk = function* (chunk, chunkSize) {
  let len = chunk.byteLength;

  if (!chunkSize || len < chunkSize) {
    yield chunk;
    return;
  }

  let pos = 0;
  let end;

  while (pos < len) {
    end = pos + chunkSize;
    yield chunk.slice(pos, end);
    pos = end;
  }
}

const readBytes = async function* (iterable, chunkSize) {
  for await (const chunk of readStream(iterable)) {
    yield* streamChunk(chunk, chunkSize);
  }
}

const readStream = async function* (stream) {
  if (stream[Symbol.asyncIterator]) {
    yield* stream;
    return;
  }

  const reader = stream.getReader();
  try {
    for (;;) {
      const {done, value} = await reader.read();
      if (done) {
        break;
      }
      yield value;
    }
  } finally {
    await reader.cancel();
  }
}

const trackStream = (stream, chunkSize, onProgress, onFinish) => {
  const iterator = readBytes(stream, chunkSize);

  let bytes = 0;
  let done;
  let _onFinish = (e) => {
    if (!done) {
      done = true;
      onFinish && onFinish(e);
    }
  }

  return new ReadableStream({
    async pull(controller) {
      try {
        const {done, value} = await iterator.next();

        if (done) {
         _onFinish();
          controller.close();
          return;
        }

        let len = value.byteLength;
        if (onProgress) {
          let loadedBytes = bytes += len;
          onProgress(loadedBytes);
        }
        controller.enqueue(new Uint8Array(value));
      } catch (err) {
        _onFinish(err);
        throw err;
      }
    },
    cancel(reason) {
      _onFinish(reason);
      return iterator.return();
    }
  }, {
    highWaterMark: 2
  })
}


/***/ }),

/***/ "./node_modules/axios/lib/helpers/validator.js":
/*!*****************************************************!*\
  !*** ./node_modules/axios/lib/helpers/validator.js ***!
  \*****************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env/data.js */ "./node_modules/axios/lib/env/data.js");
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");





const validators = {};

// eslint-disable-next-line func-names
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
  validators[type] = function validator(thing) {
    return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
  };
});

const deprecatedWarnings = {};

/**
 * Transitional option validator
 *
 * @param {function|boolean?} validator - set to false if the transitional option has been removed
 * @param {string?} version - deprecated version / removed since version
 * @param {string?} message - some message with additional info
 *
 * @returns {function}
 */
validators.transitional = function transitional(validator, version, message) {
  function formatMessage(opt, desc) {
    return '[Axios v' + _env_data_js__WEBPACK_IMPORTED_MODULE_0__.VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
  }

  // eslint-disable-next-line func-names
  return (value, opt, opts) => {
    if (validator === false) {
      throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
        formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
        _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_DEPRECATED
      );
    }

    if (version && !deprecatedWarnings[opt]) {
      deprecatedWarnings[opt] = true;
      // eslint-disable-next-line no-console
      console.warn(
        formatMessage(
          opt,
          ' has been deprecated since v' + version + ' and will be removed in the near future'
        )
      );
    }

    return validator ? validator(value, opt, opts) : true;
  };
};

validators.spelling = function spelling(correctSpelling) {
  return (value, opt) => {
    // eslint-disable-next-line no-console
    console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
    return true;
  }
};

/**
 * Assert object's properties type
 *
 * @param {object} options
 * @param {object} schema
 * @param {boolean?} allowUnknown
 *
 * @returns {object}
 */

function assertOptions(options, schema, allowUnknown) {
  if (typeof options !== 'object') {
    throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('options must be an object', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE);
  }
  const keys = Object.keys(options);
  let i = keys.length;
  while (i-- > 0) {
    const opt = keys[i];
    const validator = schema[opt];
    if (validator) {
      const value = options[opt];
      const result = value === undefined || validator(value, opt, options);
      if (result !== true) {
        throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('option ' + opt + ' must be ' + result, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE);
      }
      continue;
    }
    if (allowUnknown !== true) {
      throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('Unknown option ' + opt, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION);
    }
  }
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  assertOptions,
  validators
});


/***/ }),

/***/ "./node_modules/axios/lib/platform/browser/classes/Blob.js":
/*!*****************************************************************!*\
  !*** ./node_modules/axios/lib/platform/browser/classes/Blob.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });


/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof Blob !== 'undefined' ? Blob : null);


/***/ }),

/***/ "./node_modules/axios/lib/platform/browser/classes/FormData.js":
/*!*********************************************************************!*\
  !*** ./node_modules/axios/lib/platform/browser/classes/FormData.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });


/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof FormData !== 'undefined' ? FormData : null);


/***/ }),

/***/ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js":
/*!****************************************************************************!*\
  !*** ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js");



/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"]);


/***/ }),

/***/ "./node_modules/axios/lib/platform/browser/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/axios/lib/platform/browser/index.js ***!
  \**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js");
/* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ "./node_modules/axios/lib/platform/browser/classes/FormData.js");
/* harmony import */ var _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/Blob.js */ "./node_modules/axios/lib/platform/browser/classes/Blob.js");




/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  isBrowser: true,
  classes: {
    URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"],
    FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"],
    Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"]
  },
  protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
});


/***/ }),

/***/ "./node_modules/axios/lib/platform/common/utils.js":
/*!*********************************************************!*\
  !*** ./node_modules/axios/lib/platform/common/utils.js ***!
  \*********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   hasBrowserEnv: () => (/* binding */ hasBrowserEnv),
/* harmony export */   hasStandardBrowserEnv: () => (/* binding */ hasStandardBrowserEnv),
/* harmony export */   hasStandardBrowserWebWorkerEnv: () => (/* binding */ hasStandardBrowserWebWorkerEnv),
/* harmony export */   navigator: () => (/* binding */ _navigator),
/* harmony export */   origin: () => (/* binding */ origin)
/* harmony export */ });
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';

const _navigator = typeof navigator === 'object' && navigator || undefined;

/**
 * Determine if we're running in a standard browser environment
 *
 * This allows axios to run in a web worker, and react-native.
 * Both environments support XMLHttpRequest, but not fully standard globals.
 *
 * web workers:
 *  typeof window -> undefined
 *  typeof document -> undefined
 *
 * react-native:
 *  navigator.product -> 'ReactNative'
 * nativescript
 *  navigator.product -> 'NativeScript' or 'NS'
 *
 * @returns {boolean}
 */
const hasStandardBrowserEnv = hasBrowserEnv &&
  (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);

/**
 * Determine if we're running in a standard browser webWorker environment
 *
 * Although the `isStandardBrowserEnv` method indicates that
 * `allows axios to run in a web worker`, the WebWorker will still be
 * filtered out due to its judgment standard
 * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
 * This leads to a problem when axios post `FormData` in webWorker
 */
const hasStandardBrowserWebWorkerEnv = (() => {
  return (
    typeof WorkerGlobalScope !== 'undefined' &&
    // eslint-disable-next-line no-undef
    self instanceof WorkerGlobalScope &&
    typeof self.importScripts === 'function'
  );
})();

const origin = hasBrowserEnv && window.location.href || 'http://localhost';




/***/ }),

/***/ "./node_modules/axios/lib/platform/index.js":
/*!**************************************************!*\
  !*** ./node_modules/axios/lib/platform/index.js ***!
  \**************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node/index.js */ "./node_modules/axios/lib/platform/browser/index.js");
/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./common/utils.js */ "./node_modules/axios/lib/platform/common/utils.js");



/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  ..._common_utils_js__WEBPACK_IMPORTED_MODULE_1__,
  ..._node_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]
});


/***/ }),

/***/ "./node_modules/axios/lib/utils.js":
/*!*****************************************!*\
  !*** ./node_modules/axios/lib/utils.js ***!
  \*****************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js");




// utils is a library of generic helper functions non-specific to axios

const {toString} = Object.prototype;
const {getPrototypeOf} = Object;
const {iterator, toStringTag} = Symbol;

const kindOf = (cache => thing => {
    const str = toString.call(thing);
    return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
})(Object.create(null));

const kindOfTest = (type) => {
  type = type.toLowerCase();
  return (thing) => kindOf(thing) === type
}

const typeOfTest = type => thing => typeof thing === type;

/**
 * Determine if a value is an Array
 *
 * @param {Object} val The value to test
 *
 * @returns {boolean} True if value is an Array, otherwise false
 */
const {isArray} = Array;

/**
 * Determine if a value is undefined
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if the value is undefined, otherwise false
 */
const isUndefined = typeOfTest('undefined');

/**
 * Determine if a value is a Buffer
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Buffer, otherwise false
 */
function isBuffer(val) {
  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
    && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
}

/**
 * Determine if a value is an ArrayBuffer
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is an ArrayBuffer, otherwise false
 */
const isArrayBuffer = kindOfTest('ArrayBuffer');


/**
 * Determine if a value is a view on an ArrayBuffer
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
 */
function isArrayBufferView(val) {
  let result;
  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
    result = ArrayBuffer.isView(val);
  } else {
    result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
  }
  return result;
}

/**
 * Determine if a value is a String
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a String, otherwise false
 */
const isString = typeOfTest('string');

/**
 * Determine if a value is a Function
 *
 * @param {*} val The value to test
 * @returns {boolean} True if value is a Function, otherwise false
 */
const isFunction = typeOfTest('function');

/**
 * Determine if a value is a Number
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Number, otherwise false
 */
const isNumber = typeOfTest('number');

/**
 * Determine if a value is an Object
 *
 * @param {*} thing The value to test
 *
 * @returns {boolean} True if value is an Object, otherwise false
 */
const isObject = (thing) => thing !== null && typeof thing === 'object';

/**
 * Determine if a value is a Boolean
 *
 * @param {*} thing The value to test
 * @returns {boolean} True if value is a Boolean, otherwise false
 */
const isBoolean = thing => thing === true || thing === false;

/**
 * Determine if a value is a plain Object
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a plain Object, otherwise false
 */
const isPlainObject = (val) => {
  if (kindOf(val) !== 'object') {
    return false;
  }

  const prototype = getPrototypeOf(val);
  return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
}

/**
 * Determine if a value is an empty object (safely handles Buffers)
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is an empty object, otherwise false
 */
const isEmptyObject = (val) => {
  // Early return for non-objects or Buffers to prevent RangeError
  if (!isObject(val) || isBuffer(val)) {
    return false;
  }

  try {
    return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
  } catch (e) {
    // Fallback for any other objects that might cause RangeError with Object.keys()
    return false;
  }
}

/**
 * Determine if a value is a Date
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Date, otherwise false
 */
const isDate = kindOfTest('Date');

/**
 * Determine if a value is a File
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a File, otherwise false
 */
const isFile = kindOfTest('File');

/**
 * Determine if a value is a Blob
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Blob, otherwise false
 */
const isBlob = kindOfTest('Blob');

/**
 * Determine if a value is a FileList
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a File, otherwise false
 */
const isFileList = kindOfTest('FileList');

/**
 * Determine if a value is a Stream
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Stream, otherwise false
 */
const isStream = (val) => isObject(val) && isFunction(val.pipe);

/**
 * Determine if a value is a FormData
 *
 * @param {*} thing The value to test
 *
 * @returns {boolean} True if value is an FormData, otherwise false
 */
const isFormData = (thing) => {
  let kind;
  return thing && (
    (typeof FormData === 'function' && thing instanceof FormData) || (
      isFunction(thing.append) && (
        (kind = kindOf(thing)) === 'formdata' ||
        // detect form-data instance
        (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
      )
    )
  )
}

/**
 * Determine if a value is a URLSearchParams object
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a URLSearchParams object, otherwise false
 */
const isURLSearchParams = kindOfTest('URLSearchParams');

const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);

/**
 * Trim excess whitespace off the beginning and end of a string
 *
 * @param {String} str The String to trim
 *
 * @returns {String} The String freed of excess whitespace
 */
const trim = (str) => str.trim ?
  str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');

/**
 * Iterate over an Array or an Object invoking a function for each item.
 *
 * If `obj` is an Array callback will be called passing
 * the value, index, and complete array for each item.
 *
 * If 'obj' is an Object callback will be called passing
 * the value, key, and complete object for each property.
 *
 * @param {Object|Array} obj The object to iterate
 * @param {Function} fn The callback to invoke for each item
 *
 * @param {Boolean} [allOwnKeys = false]
 * @returns {any}
 */
function forEach(obj, fn, {allOwnKeys = false} = {}) {
  // Don't bother if no value provided
  if (obj === null || typeof obj === 'undefined') {
    return;
  }

  let i;
  let l;

  // Force an array if not already something iterable
  if (typeof obj !== 'object') {
    /*eslint no-param-reassign:0*/
    obj = [obj];
  }

  if (isArray(obj)) {
    // Iterate over array values
    for (i = 0, l = obj.length; i < l; i++) {
      fn.call(null, obj[i], i, obj);
    }
  } else {
    // Buffer check
    if (isBuffer(obj)) {
      return;
    }

    // Iterate over object keys
    const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
    const len = keys.length;
    let key;

    for (i = 0; i < len; i++) {
      key = keys[i];
      fn.call(null, obj[key], key, obj);
    }
  }
}

function findKey(obj, key) {
  if (isBuffer(obj)){
    return null;
  }

  key = key.toLowerCase();
  const keys = Object.keys(obj);
  let i = keys.length;
  let _key;
  while (i-- > 0) {
    _key = keys[i];
    if (key === _key.toLowerCase()) {
      return _key;
    }
  }
  return null;
}

const _global = (() => {
  /*eslint no-undef:0*/
  if (typeof globalThis !== "undefined") return globalThis;
  return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
})();

const isContextDefined = (context) => !isUndefined(context) && context !== _global;

/**
 * Accepts varargs expecting each argument to be an object, then
 * immutably merges the properties of each object and returns result.
 *
 * When multiple objects contain the same key the later object in
 * the arguments list will take precedence.
 *
 * Example:
 *
 * ```js
 * var result = merge({foo: 123}, {foo: 456});
 * console.log(result.foo); // outputs 456
 * ```
 *
 * @param {Object} obj1 Object to merge
 *
 * @returns {Object} Result of all merge properties
 */
function merge(/* obj1, obj2, obj3, ... */) {
  const {caseless, skipUndefined} = isContextDefined(this) && this || {};
  const result = {};
  const assignValue = (val, key) => {
    const targetKey = caseless && findKey(result, key) || key;
    if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
      result[targetKey] = merge(result[targetKey], val);
    } else if (isPlainObject(val)) {
      result[targetKey] = merge({}, val);
    } else if (isArray(val)) {
      result[targetKey] = val.slice();
    } else if (!skipUndefined || !isUndefined(val)) {
      result[targetKey] = val;
    }
  }

  for (let i = 0, l = arguments.length; i < l; i++) {
    arguments[i] && forEach(arguments[i], assignValue);
  }
  return result;
}

/**
 * Extends object a by mutably adding to it the properties of object b.
 *
 * @param {Object} a The object to be extended
 * @param {Object} b The object to copy properties from
 * @param {Object} thisArg The object to bind function to
 *
 * @param {Boolean} [allOwnKeys]
 * @returns {Object} The resulting value of object a
 */
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
  forEach(b, (val, key) => {
    if (thisArg && isFunction(val)) {
      a[key] = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__["default"])(val, thisArg);
    } else {
      a[key] = val;
    }
  }, {allOwnKeys});
  return a;
}

/**
 * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
 *
 * @param {string} content with BOM
 *
 * @returns {string} content value without BOM
 */
const stripBOM = (content) => {
  if (content.charCodeAt(0) === 0xFEFF) {
    content = content.slice(1);
  }
  return content;
}

/**
 * Inherit the prototype methods from one constructor into another
 * @param {function} constructor
 * @param {function} superConstructor
 * @param {object} [props]
 * @param {object} [descriptors]
 *
 * @returns {void}
 */
const inherits = (constructor, superConstructor, props, descriptors) => {
  constructor.prototype = Object.create(superConstructor.prototype, descriptors);
  constructor.prototype.constructor = constructor;
  Object.defineProperty(constructor, 'super', {
    value: superConstructor.prototype
  });
  props && Object.assign(constructor.prototype, props);
}

/**
 * Resolve object with deep prototype chain to a flat object
 * @param {Object} sourceObj source object
 * @param {Object} [destObj]
 * @param {Function|Boolean} [filter]
 * @param {Function} [propFilter]
 *
 * @returns {Object}
 */
const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
  let props;
  let i;
  let prop;
  const merged = {};

  destObj = destObj || {};
  // eslint-disable-next-line no-eq-null,eqeqeq
  if (sourceObj == null) return destObj;

  do {
    props = Object.getOwnPropertyNames(sourceObj);
    i = props.length;
    while (i-- > 0) {
      prop = props[i];
      if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
        destObj[prop] = sourceObj[prop];
        merged[prop] = true;
      }
    }
    sourceObj = filter !== false && getPrototypeOf(sourceObj);
  } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);

  return destObj;
}

/**
 * Determines whether a string ends with the characters of a specified string
 *
 * @param {String} str
 * @param {String} searchString
 * @param {Number} [position= 0]
 *
 * @returns {boolean}
 */
const endsWith = (str, searchString, position) => {
  str = String(str);
  if (position === undefined || position > str.length) {
    position = str.length;
  }
  position -= searchString.length;
  const lastIndex = str.indexOf(searchString, position);
  return lastIndex !== -1 && lastIndex === position;
}


/**
 * Returns new array from array like object or null if failed
 *
 * @param {*} [thing]
 *
 * @returns {?Array}
 */
const toArray = (thing) => {
  if (!thing) return null;
  if (isArray(thing)) return thing;
  let i = thing.length;
  if (!isNumber(i)) return null;
  const arr = new Array(i);
  while (i-- > 0) {
    arr[i] = thing[i];
  }
  return arr;
}

/**
 * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
 * thing passed in is an instance of Uint8Array
 *
 * @param {TypedArray}
 *
 * @returns {Array}
 */
// eslint-disable-next-line func-names
const isTypedArray = (TypedArray => {
  // eslint-disable-next-line func-names
  return thing => {
    return TypedArray && thing instanceof TypedArray;
  };
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));

/**
 * For each entry in the object, call the function with the key and value.
 *
 * @param {Object<any, any>} obj - The object to iterate over.
 * @param {Function} fn - The function to call for each entry.
 *
 * @returns {void}
 */
const forEachEntry = (obj, fn) => {
  const generator = obj && obj[iterator];

  const _iterator = generator.call(obj);

  let result;

  while ((result = _iterator.next()) && !result.done) {
    const pair = result.value;
    fn.call(obj, pair[0], pair[1]);
  }
}

/**
 * It takes a regular expression and a string, and returns an array of all the matches
 *
 * @param {string} regExp - The regular expression to match against.
 * @param {string} str - The string to search.
 *
 * @returns {Array<boolean>}
 */
const matchAll = (regExp, str) => {
  let matches;
  const arr = [];

  while ((matches = regExp.exec(str)) !== null) {
    arr.push(matches);
  }

  return arr;
}

/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
const isHTMLForm = kindOfTest('HTMLFormElement');

const toCamelCase = str => {
  return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
    function replacer(m, p1, p2) {
      return p1.toUpperCase() + p2;
    }
  );
};

/* Creating a function that will check if an object has a property. */
const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);

/**
 * Determine if a value is a RegExp object
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a RegExp object, otherwise false
 */
const isRegExp = kindOfTest('RegExp');

const reduceDescriptors = (obj, reducer) => {
  const descriptors = Object.getOwnPropertyDescriptors(obj);
  const reducedDescriptors = {};

  forEach(descriptors, (descriptor, name) => {
    let ret;
    if ((ret = reducer(descriptor, name, obj)) !== false) {
      reducedDescriptors[name] = ret || descriptor;
    }
  });

  Object.defineProperties(obj, reducedDescriptors);
}

/**
 * Makes all methods read-only
 * @param {Object} obj
 */

const freezeMethods = (obj) => {
  reduceDescriptors(obj, (descriptor, name) => {
    // skip restricted props in strict mode
    if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
      return false;
    }

    const value = obj[name];

    if (!isFunction(value)) return;

    descriptor.enumerable = false;

    if ('writable' in descriptor) {
      descriptor.writable = false;
      return;
    }

    if (!descriptor.set) {
      descriptor.set = () => {
        throw Error('Can not rewrite read-only method \'' + name + '\'');
      };
    }
  });
}

const toObjectSet = (arrayOrString, delimiter) => {
  const obj = {};

  const define = (arr) => {
    arr.forEach(value => {
      obj[value] = true;
    });
  }

  isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));

  return obj;
}

const noop = () => {}

const toFiniteNumber = (value, defaultValue) => {
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
}



/**
 * If the thing is a FormData object, return true, otherwise return false.
 *
 * @param {unknown} thing - The thing to check.
 *
 * @returns {boolean}
 */
function isSpecCompliantForm(thing) {
  return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
}

const toJSONObject = (obj) => {
  const stack = new Array(10);

  const visit = (source, i) => {

    if (isObject(source)) {
      if (stack.indexOf(source) >= 0) {
        return;
      }

      //Buffer check
      if (isBuffer(source)) {
        return source;
      }

      if(!('toJSON' in source)) {
        stack[i] = source;
        const target = isArray(source) ? [] : {};

        forEach(source, (value, key) => {
          const reducedValue = visit(value, i + 1);
          !isUndefined(reducedValue) && (target[key] = reducedValue);
        });

        stack[i] = undefined;

        return target;
      }
    }

    return source;
  }

  return visit(obj, 0);
}

const isAsyncFn = kindOfTest('AsyncFunction');

const isThenable = (thing) =>
  thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);

// original code
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34

const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
  if (setImmediateSupported) {
    return setImmediate;
  }

  return postMessageSupported ? ((token, callbacks) => {
    _global.addEventListener("message", ({source, data}) => {
      if (source === _global && data === token) {
        callbacks.length && callbacks.shift()();
      }
    }, false);

    return (cb) => {
      callbacks.push(cb);
      _global.postMessage(token, "*");
    }
  })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
})(
  typeof setImmediate === 'function',
  isFunction(_global.postMessage)
);

const asap = typeof queueMicrotask !== 'undefined' ?
  queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);

// *********************


const isIterable = (thing) => thing != null && isFunction(thing[iterator]);


/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  isArray,
  isArrayBuffer,
  isBuffer,
  isFormData,
  isArrayBufferView,
  isString,
  isNumber,
  isBoolean,
  isObject,
  isPlainObject,
  isEmptyObject,
  isReadableStream,
  isRequest,
  isResponse,
  isHeaders,
  isUndefined,
  isDate,
  isFile,
  isBlob,
  isRegExp,
  isFunction,
  isStream,
  isURLSearchParams,
  isTypedArray,
  isFileList,
  forEach,
  merge,
  extend,
  trim,
  stripBOM,
  inherits,
  toFlatObject,
  kindOf,
  kindOfTest,
  endsWith,
  toArray,
  forEachEntry,
  matchAll,
  isHTMLForm,
  hasOwnProperty,
  hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
  reduceDescriptors,
  freezeMethods,
  toObjectSet,
  toCamelCase,
  noop,
  toFiniteNumber,
  findKey,
  global: _global,
  isContextDefined,
  isSpecCompliantForm,
  toJSONObject,
  isAsyncFn,
  isThenable,
  setImmediate: _setImmediate,
  asap,
  isIterable
});


/***/ }),

/***/ "./node_modules/react-dom/client.js":
/*!******************************************!*\
  !*** ./node_modules/react-dom/client.js ***!
  \******************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {



var m = __webpack_require__(/*! react-dom */ "react-dom");
if (false) // removed by dead control flow
{} else {
  var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
  exports.createRoot = function(c, o) {
    i.usingClientEntryPoint = true;
    try {
      return m.createRoot(c, o);
    } finally {
      i.usingClientEntryPoint = false;
    }
  };
  exports.hydrateRoot = function(c, h, o) {
    i.usingClientEntryPoint = true;
    try {
      return m.hydrateRoot(c, h, o);
    } finally {
      i.usingClientEntryPoint = false;
    }
  };
}


/***/ }),

/***/ "./src/Alert/HvnlyNabAlert.css":
/*!*************************************!*\
  !*** ./src/Alert/HvnlyNabAlert.css ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./src/Alert/HvnlyNabAlert.js":
/*!************************************!*\
  !*** ./src/Alert/HvnlyNabAlert.js ***!
  \************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _HvnlyNabAlert_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HvnlyNabAlert.css */ "./src/Alert/HvnlyNabAlert.css");




/**
 * HvnlyNabAlert - Professional Alert System for Havenlytics Nab Plugin
 * 
 * USAGE:
 * 1. Import and include this component in your main App/Layout
 * 2. Use the global window.HvnlyNabAlert methods anywhere in your plugin
 * 
 * EXAMPLE USAGE:
 * 
 * // Simple alerts
 * window.HvnlyNabAlert.success('Operation completed successfully!');
 * window.HvnlyNabAlert.error('Something went wrong!');
 * window.HvnlyNabAlert.warning('This action cannot be undone');
 * window.HvnlyNabAlert.info('New features available');
 * 
 * // Confirm dialog (returns promise)
 * window.HvnlyNabAlert.confirm('Are you sure?').then(result => {
 *   if (result === 'confirm') {
 *     // User confirmed
 *   }
 * });
 * 
 * // Prompt for input
 * window.HvnlyNabAlert.prompt('Enter your name:').then(result => {
 *   if (result !== 'cancel') {
 *     console.log('User entered:', result);
 *   }
 * });
 * 
 * // Custom alert with advanced options
 * window.HvnlyNabShowAlert({
 *   title: 'Custom Alert',
 *   message: 'This is a custom alert',
 *   icon: 'success',
 *   autoClose: 3000,
 *   buttons: [
 *     { text: 'Cancel', type: 'cancel', action: 'cancel' },
 *     { text: 'OK', type: 'success', action: 'ok' }
 *   ]
 * });
 */
/**
 * HvnlyNabAlert - Professional Alert System with Smooth Animations
 */

const HvnlyNabAlert = () => {
  const [isOpen, setIsOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [alertConfig, setAlertConfig] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
  const [resolvePromise, setResolvePromise] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
  const [shouldShake, setShouldShake] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [isMounted, setIsMounted] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    setIsMounted(true);
    window.HvnlyNabShowAlert = config => {
      return new Promise(resolve => {
        setAlertConfig(config);
        setIsOpen(true);
        setResolvePromise(() => resolve);

        // Add shake effect for error alerts
        if (config.icon === 'error') {
          setTimeout(() => {
            setShouldShake(true);
            setTimeout(() => setShouldShake(false), 500);
          }, 600);
        }
      });
    };
    window.HvnlyNabAlert = {
      success: (message, title = 'Success!') => window.HvnlyNabShowAlert({
        title,
        message,
        icon: 'success',
        buttons: [{
          text: 'OK',
          type: 'success',
          action: 'ok'
        }]
      }),
      error: (message, title = 'Error!') => window.HvnlyNabShowAlert({
        title,
        message,
        icon: 'error',
        buttons: [{
          text: 'OK',
          type: 'error',
          action: 'ok'
        }]
      }),
      warning: (message, title = 'Warning!') => window.HvnlyNabShowAlert({
        title,
        message,
        icon: 'warning',
        buttons: [{
          text: 'OK',
          type: 'warning',
          action: 'ok'
        }]
      }),
      info: (message, title = 'Information') => window.HvnlyNabShowAlert({
        title,
        message,
        icon: 'info',
        buttons: [{
          text: 'OK',
          type: 'info',
          action: 'ok'
        }]
      }),
      confirm: (message, title = 'Confirm Action') => window.HvnlyNabShowAlert({
        title,
        message,
        icon: 'question',
        allowOutsideClick: false,
        buttons: [{
          text: 'Cancel',
          type: 'cancel',
          action: 'cancel'
        }, {
          text: 'Confirm',
          type: 'success',
          action: 'confirm'
        }]
      }),
      prompt: (message, defaultValue = '', title = 'Input Required') => window.HvnlyNabShowAlert({
        title,
        message,
        icon: 'info',
        allowOutsideClick: false,
        content: `
            <input type="text" 
                   class="HvnlyNab_alert_input" 
                   placeholder="${message}" 
                   value="${defaultValue}"
                   id="HvnlyNab_prompt_input"
                   autocomplete="off">
          `,
        buttons: [{
          text: 'Cancel',
          type: 'cancel',
          action: 'cancel'
        }, {
          text: 'Submit',
          type: 'success',
          action: 'submit'
        }]
      })
    };
    if (window.HvnlyNabOverrideNativeAlerts) {
      window.alert = message => window.HvnlyNabAlert.info(message);
      window.confirm = message => window.HvnlyNabAlert.confirm(message);
    }
    return () => {
      delete window.HvnlyNabShowAlert;
      delete window.HvnlyNabAlert;
    };
  }, []);
  const handleClose = action => {
    setIsOpen(false);
    setShouldShake(false);
    if (resolvePromise) {
      let result = action;
      if (action === 'submit' && alertConfig?.content?.includes('HvnlyNab_prompt_input')) {
        const input = document.getElementById('HvnlyNab_prompt_input');
        result = input ? input.value : '';
      }
      resolvePromise(result);
      setResolvePromise(null);
    }
    setTimeout(() => {
      setAlertConfig(null);
    }, 300);
  };
  const handleOverlayClick = e => {
    if (e.target === e.currentTarget && alertConfig?.allowOutsideClick !== false) {
      handleClose('overlay');
    }
  };
  if (!alertConfig || !isMounted) return null;
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `HvnlyNab_alert_overlay ${isOpen ? 'HvnlyNab_alert_overlay--active' : ''}`,
    onClick: handleOverlayClick
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `HvnlyNab_alert_container ${isOpen ? 'HvnlyNab_alert_container--active' : ''} ${shouldShake ? 'HvnlyNab_alert_shake' : ''}`
  }, alertConfig.autoClose && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "HvnlyNab_alert_progress",
    style: {
      animationDuration: `${alertConfig.autoClose}ms`
    }
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "HvnlyNab_alert_header"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `HvnlyNab_alert_icon HvnlyNab_alert_icon--${alertConfig.icon}`
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: `fas ${getIconClass(alertConfig.icon)}`
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", {
    className: "HvnlyNab_alert_title"
  }, alertConfig.title), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: "HvnlyNab_alert_message"
  }, alertConfig.message)), alertConfig.content && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "HvnlyNab_alert_content",
    dangerouslySetInnerHTML: {
      __html: alertConfig.content
    }
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "HvnlyNab_alert_footer"
  }, alertConfig.buttons?.map((button, index) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    key: index,
    className: `HvnlyNab_alert_btn HvnlyNab_alert_btn--${button.type}`,
    onClick: () => handleClose(button.action),
    autoFocus: index === alertConfig.buttons.length - 1
  }, button.text)))));
};
const getIconClass = iconType => {
  const icons = {
    success: 'fa-check-circle',
    error: 'fa-exclamation-circle',
    warning: 'fa-exclamation-triangle',
    info: 'fa-info-circle',
    question: 'fa-question-circle'
  };
  return icons[iconType] || icons.info;
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HvnlyNabAlert);

/***/ }),

/***/ "./src/LoadingOverlay/LoadingOverlay.js":
/*!**********************************************!*\
  !*** ./src/LoadingOverlay/LoadingOverlay.js ***!
  \**********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _LoadingOverlay_module_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LoadingOverlay.module.css */ "./src/LoadingOverlay/LoadingOverlay.module.css");

// import './LoadingOverlay.css';


const LoadingOverlay = ({
  isLoading
}) => {
  if (!isLoading) return null;
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_LoadingOverlay_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['hvnly-settings-api__overlay']} ${_LoadingOverlay_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['active']}`
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _LoadingOverlay_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['loader-container']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _LoadingOverlay_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['dot-pulse']
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _LoadingOverlay_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['loader-text']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Processing your request', 'havenlytics'))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadingOverlay);

/***/ }),

/***/ "./src/LoadingOverlay/LoadingOverlay.module.css":
/*!******************************************************!*\
  !*** ./src/LoadingOverlay/LoadingOverlay.module.css ***!
  \******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// extracted by mini-css-extract-plugin
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"hvnly-app":"kfcZqEO6ayVIX8ALioyO","dark-mode":"gokRmf_v8pSNtOMNLAwN","hvnly-settings-api__overlay":"oOhKHeqnfaejKD3nQH39","active":"M5lLaaQeEYHqtGdPlJiQ","hvnly-loader-container":"BRn2FuTWvr_wNLmsAOx3","dot-pulse":"nRoKDpLLkl_xQ8D699D5","dot-pulse-before":"wKQD9Iujbbvi3DeTfVIC","dot-pulse-after":"stYzaplnCrqKxkFwytkg","loader-text":"s03cHeE7iSmRXDDKMuBq"});

/***/ }),

/***/ "./src/SettingsApp.css":
/*!*****************************!*\
  !*** ./src/SettingsApp.css ***!
  \*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./src/SettingsApp.jsx":
/*!*****************************!*\
  !*** ./src/SettingsApp.jsx ***!
  \*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Alert_HvnlyNabAlert__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Alert/HvnlyNabAlert */ "./src/Alert/HvnlyNabAlert.js");
/* harmony import */ var _hooks_useTheme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useTheme */ "./src/hooks/useTheme.js");
/* harmony import */ var _LoadingOverlay_LoadingOverlay__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./LoadingOverlay/LoadingOverlay */ "./src/LoadingOverlay/LoadingOverlay.js");
/* harmony import */ var _settings_components_Content_Content__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./settings/components/Content/Content */ "./src/settings/components/Content/Content.js");
/* harmony import */ var _settings_components_Footer_Footer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./settings/components/Footer/Footer */ "./src/settings/components/Footer/Footer.js");
/* harmony import */ var _settings_components_Header_Header__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./settings/components/Header/Header */ "./src/settings/components/Header/Header.js");
/* harmony import */ var _settings_components_Preloader_Preloader__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./settings/components/Preloader/Preloader */ "./src/settings/components/Preloader/Preloader.js");
/* harmony import */ var _settings_components_Tabs_Tabs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./settings/components/Tabs/Tabs */ "./src/settings/components/Tabs/Tabs.js");
/* harmony import */ var _settings_components_utils_constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./settings/components/utils/constants */ "./src/settings/components/utils/constants.js");
/* harmony import */ var _settings_hooks_useSettingsAPI__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./settings/hooks/useSettingsAPI */ "./src/settings/hooks/useSettingsAPI.js");
/* harmony import */ var _SettingsApp_css__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./SettingsApp.css */ "./src/SettingsApp.css");
/* harmony import */ var _Toast_Toast__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Toast/Toast */ "./src/Toast/Toast.js");















function App() {
  const [toasts, setToasts] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
  const [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const [isInitialLoading, setIsInitialLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(true);
  const [loadingStage, setLoadingStage] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Initializing Settings...", "havenlytics"));
  const [loadingProgress, setLoadingProgress] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0);
  const [activeTab, setActiveTab] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(() => {
    if (typeof window !== 'undefined') {
      const savedTab = localStorage.getItem('hvnly-active-tab');
      return savedTab ? JSON.parse(savedTab) : 'design';
    }
    return 'design';
  });
  const {
    isDarkMode,
    toggleTheme
  } = (0,_hooks_useTheme__WEBPACK_IMPORTED_MODULE_4__.useTheme)();

  // Track toast IDs to prevent duplicates
  const lastToastRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)({
    id: null,
    time: 0
  });

  // Track settings per tab for saving
  const [tabSettings, setTabSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({});

  // Track if data has been loaded from API
  const [apiDataLoaded, setApiDataLoaded] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);

  // Track if we're currently refreshing to prevent loops
  const isRefreshingRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);

  // Define showToast FIRST
  const showToast = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)((type, title, message, animation = 'bounceIn') => {
    const toastKey = `${type}-${title}-${message}-${animation}`;
    const now = Date.now();
    if (lastToastRef.current.id === toastKey && now - lastToastRef.current.time < 2000) {
      return;
    }
    lastToastRef.current = {
      id: toastKey,
      time: now
    };
    const id = Date.now() + Math.random();
    setToasts(prev => [...prev, {
      id,
      type,
      title,
      message,
      animation
    }]);
    setTimeout(() => {
      setToasts(prev => prev.filter(toast => toast.id !== id));
    }, 3000);
  }, []);

  // Now useSettingsAPI can use showToast
  const {
    settings,
    isLoading: apiLoading,
    loadAllSettings,
    saveSettingsGroup,
    resetSettingsGroup,
    saveAllSettings,
    resetAllSettings
  } = (0,_settings_hooks_useSettingsAPI__WEBPACK_IMPORTED_MODULE_12__.useSettingsAPI)(showToast);

  // Define refresh function AFTER loadAllSettings is defined
  const refreshSettingsAfterSync = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async () => {
    // Prevent multiple simultaneous refreshes
    if (isRefreshingRef.current) {
      return;
    }
    isRefreshingRef.current = true;
    try {
      const refreshedSettings = await loadAllSettings();
      if (refreshedSettings) {
        setTabSettings(refreshedSettings);
      }
    } catch (error) {
      // Silent fail
    } finally {
      // Small delay to ensure state updates are processed
      setTimeout(() => {
        isRefreshingRef.current = false;
      }, 100);
    }
  }, [loadAllSettings]);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (settings && Object.keys(settings).length > 0) {
      setTabSettings(settings);
      setApiDataLoaded(true);
    }
  }, [settings]);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (typeof window !== 'undefined') {
      localStorage.setItem('hvnly-active-tab', JSON.stringify(activeTab));
    }
  }, [activeTab]);

  // Load settings on mount
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    const loadSettings = async () => {
      await loadAllSettings();
      setTimeout(() => {
        setLoadingProgress(100);
        setTimeout(() => {
          setIsInitialLoading(false);
        }, 300);
      }, 500);
    };
    loadSettings();
  }, [loadAllSettings]);

  // Simulate loading stages for settings
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (isInitialLoading) {
      const stages = [{
        stage: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Initializing Settings Module...", "havenlytics"),
        progress: 25
      }, {
        stage: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Loading General Settings...", "havenlytics"),
        progress: 55
      }, {
        stage: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Finalizing Setup...", "havenlytics"),
        progress: 95
      }];
      let currentStage = 0;
      const progressInterval = setInterval(() => {
        if (currentStage < stages.length) {
          setLoadingStage(stages[currentStage].stage);
          setLoadingProgress(stages[currentStage].progress);
          currentStage++;
        } else {
          clearInterval(progressInterval);
        }
      }, 600);
      return () => clearInterval(progressInterval);
    }
  }, [isInitialLoading]);
  const removeToast = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(id => {
    setToasts(prev => prev.filter(toast => toast.id !== id));
  }, []);

  // Handle tab settings change
  const handleTabSettingsChange = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)((tabId, settingsData) => {
    // Check if this is a sync event from preloader or search
    if (settingsData._syncedViewType || settingsData._syncedAjaxLoadMore) {
      // For sync events, refresh all settings to get the latest data
      refreshSettingsAfterSync();
      // Remove the sync flags before updating state
      const {
        _syncedViewType,
        _syncedAjaxLoadMore,
        _searchViewType,
        _syncedPreloaderGrid,
        _syncedPreloaderList,
        _syncedLoadMorePreloader,
        _syncedPaginationPreloader,
        ...cleanData
      } = settingsData;
      settingsData = cleanData;
    }

    // Map dropdown tabs to their parent groups
    const parentGroupMap = {
      'currency': 'general',
      'misc-settings': 'general',
      'search-property': 'search',
      'search-result': 'search'
    };

    // If it's a dropdown tab, update the parent group
    if (parentGroupMap[tabId]) {
      const parentGroup = parentGroupMap[tabId];
      setTabSettings(prev => {
        const currentParentData = prev[parentGroup] || {};
        const mergedData = {
          ...currentParentData,
          ...settingsData
        };
        return {
          ...prev,
          [parentGroup]: mergedData
        };
      });
    } else {
      // For regular tabs, update directly
      setTabSettings(prev => ({
        ...prev,
        [tabId]: settingsData
      }));
    }
  }, [refreshSettingsAfterSync]);

  // Save only the current tab using the data passed from component
  const handleSaveTab = async (tabName, data) => {
    setIsLoading(true);
    const settingsToSave = data;
    if (!settingsToSave || Object.keys(settingsToSave).length === 0) {
      showToast('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('No settings to save', 'havenlytics'));
      setIsLoading(false);
      return false;
    }
    const result = await saveSettingsGroup(tabName, settingsToSave);
    if (result && result.success) {
      const tabDisplayName = tabName.charAt(0).toUpperCase() + tabName.slice(1);
      showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Success', 'havenlytics'), `${tabDisplayName} ${(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('settings saved successfully!', 'havenlytics')}`);
      // Refresh settings after save to ensure consistency
      await refreshSettingsAfterSync();
      setIsLoading(false);
      return true;
    } else {
      if (!result?.message) {
        showToast('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to save settings', 'havenlytics'));
      }
      setIsLoading(false);
      return false;
    }
  };

  // Reset only the current tab
  const handleResetTab = async tabName => {
    setIsLoading(true);
    const result = await resetSettingsGroup(tabName);
    if (result && result.success) {
      const tabDisplayName = tabName.charAt(0).toUpperCase() + tabName.slice(1);
      showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Success', 'havenlytics'), `${tabDisplayName} ${(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('settings reset to defaults!', 'havenlytics')}`);
      await refreshSettingsAfterSync();
      setIsLoading(false);
      return true;
    } else {
      if (!result?.message) {
        showToast('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to reset settings', 'havenlytics'));
      }
      setIsLoading(false);
      return false;
    }
  };

  // Save ALL tabs (used by header Save All button)
  const handleSaveAll = async () => {
    setIsLoading(true);
    const result = await saveAllSettings(tabSettings);
    if (result && result.success) {
      showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('All settings saved successfully!', 'havenlytics'));
      await refreshSettingsAfterSync();
    } else if (result && !result.success) {
      if (!result.message) {
        showToast('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to save all settings', 'havenlytics'));
      }
    }
    setIsLoading(false);
  };

  // Reset ALL tabs (used by header Reset All button)
  const handleResetAll = async () => {
    if (window.HvnlyNabAlert) {
      const result = await window.HvnlyNabAlert.confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Are you sure you want to reset ALL settings? This cannot be undone.', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Reset All Settings?', 'havenlytics'));
      if (result !== 'confirm') {
        return;
      }
    } else {
      const confirmed = window.confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Are you sure you want to reset ALL settings? This cannot be undone.', 'havenlytics'));
      if (!confirmed) return;
    }
    setIsLoading(true);
    const resetResult = await resetAllSettings();
    if (resetResult && resetResult.success) {
      showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('All settings reset to defaults!', 'havenlytics'));
      await refreshSettingsAfterSync();
    } else if (resetResult && !resetResult.success) {
      if (!resetResult.message) {
        showToast('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to reset all settings', 'havenlytics'));
      }
    }
    setIsLoading(false);
  };
  const handleTabChange = tabId => {
    setActiveTab(tabId);
  };

  // Show preloader while initial loading is true
  if (isInitialLoading) {
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_settings_components_Preloader_Preloader__WEBPACK_IMPORTED_MODULE_9__["default"], {
      stage: loadingStage,
      progress: loadingProgress,
      showProgress: true
    });
  }

  // Get current tab settings - handle dropdown tabs
  const getCurrentTabSettings = () => {
    const parentGroupMap = {
      'currency': 'general',
      'misc-settings': 'general',
      'search-property': 'search',
      'search-result': 'search'
    };
    if (parentGroupMap[activeTab]) {
      const parentGroup = parentGroupMap[activeTab];
      return tabSettings[parentGroup] || {};
    }
    return tabSettings[activeTab] || {};
  };
  const currentTabSettings = getCurrentTabSettings();
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `hvnly--settings--app ${isDarkMode ? 'dark-mode' : ''}`
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Alert_HvnlyNabAlert__WEBPACK_IMPORTED_MODULE_3__["default"], null), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__container"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_settings_components_Header_Header__WEBPACK_IMPORTED_MODULE_8__["default"], {
    onSaveAll: handleSaveAll,
    onResetAll: handleResetAll
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__main"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_settings_components_Tabs_Tabs__WEBPACK_IMPORTED_MODULE_10__["default"], {
    tabs: _settings_components_utils_constants__WEBPACK_IMPORTED_MODULE_11__.TABS,
    activeTab: activeTab,
    onTabChange: handleTabChange
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_settings_components_Content_Content__WEBPACK_IMPORTED_MODULE_6__["default"], {
    activeTab: activeTab,
    onSaveTab: handleSaveTab,
    onResetTab: handleResetTab,
    settingsData: currentTabSettings,
    onSettingsChange: handleTabSettingsChange,
    showToast: showToast,
    onSyncComplete: refreshSettingsAfterSync,
    key: activeTab
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_settings_components_Footer_Footer__WEBPACK_IMPORTED_MODULE_7__["default"], null)), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    id: "themeToggle",
    className: "dark-mode-toggle",
    onClick: toggleTheme,
    "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Toggle dark mode', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: isDarkMode ? 'fas fa-sun' : 'fas fa-moon'
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_LoadingOverlay_LoadingOverlay__WEBPACK_IMPORTED_MODULE_5__["default"], {
    isLoading: isLoading || apiLoading
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    id: "hvnlyToastContainer",
    className: "hvnly-toast-container",
    style: {
      position: 'fixed',
      top: '1.5rem',
      left: '50%',
      transform: 'translateX(-50%)',
      zIndex: 9999,
      display: 'flex',
      flexDirection: 'column',
      alignItems: 'center',
      pointerEvents: 'none'
    }
  }, toasts.map(toast => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Toast_Toast__WEBPACK_IMPORTED_MODULE_14__["default"], {
    key: toast.id,
    type: toast.type,
    title: toast.title,
    message: toast.message,
    onClose: () => removeToast(toast.id),
    autoClose: true,
    autoCloseDuration: 3000,
    position: "top-center"
  }))));
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (App);

/***/ }),

/***/ "./src/Toast/Toast.css":
/*!*****************************!*\
  !*** ./src/Toast/Toast.css ***!
  \*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./src/Toast/Toast.js":
/*!****************************!*\
  !*** ./src/Toast/Toast.js ***!
  \****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Toast_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Toast.css */ "./src/Toast/Toast.css");



const Toast = ({
  type,
  title,
  message,
  onClose,
  autoClose = true,
  autoCloseDuration = 2500,
  position = 'top-center' // Default position
}) => {
  const [isExiting, setIsExiting] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (!autoClose) return;
    const timer = setTimeout(() => {
      handleClose();
    }, autoCloseDuration);
    return () => {
      clearTimeout(timer);
    };
  }, [autoClose, autoCloseDuration]);
  const handleClose = () => {
    setIsExiting(true);
    setTimeout(() => {
      onClose();
    }, 200);
  };

  // Get icon based on type
  const getIconSvg = () => {
    if (type === 'success') {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
        width: "20",
        height: "20",
        viewBox: "0 0 24 24",
        fill: "none",
        stroke: "currentColor",
        strokeWidth: "2.5"
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("polyline", {
        points: "20 6 9 17 4 12"
      }));
    } else if (type === 'error') {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
        width: "20",
        height: "20",
        viewBox: "0 0 24 24",
        fill: "none",
        stroke: "currentColor",
        strokeWidth: "2.5"
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("line", {
        x1: "18",
        y1: "6",
        x2: "6",
        y2: "18"
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("line", {
        x1: "6",
        y1: "6",
        x2: "18",
        y2: "18"
      }));
    } else if (type === 'warning') {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
        width: "20",
        height: "20",
        viewBox: "0 0 24 24",
        fill: "none",
        stroke: "currentColor",
        strokeWidth: "2.5"
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
        d: "M12 9v4M12 17h.01",
        strokeLinecap: "round"
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
        d: "M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10z"
      }));
    } else {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
        width: "20",
        height: "20",
        viewBox: "0 0 24 24",
        fill: "none",
        stroke: "currentColor",
        strokeWidth: "2.5"
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", {
        cx: "12",
        cy: "12",
        r: "10"
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("line", {
        x1: "12",
        y1: "16",
        x2: "12",
        y2: "12"
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", {
        cx: "12",
        cy: "8",
        r: "1",
        fill: "currentColor"
      }));
    }
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `hvnly-toast ${type} ${isExiting ? 'hvnly-toast-exit' : ''}`,
    "data-position": position
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-toast-icon"
  }, getIconSvg()), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-toast-content"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-toast-title"
  }, title), message && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-toast-description"
  }, message)), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly-toast-close",
    onClick: handleClose,
    "aria-label": "close"
  }, "\u2715"));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Toast);

/***/ }),

/***/ "./src/hooks/useTheme.js":
/*!*******************************!*\
  !*** ./src/hooks/useTheme.js ***!
  \*******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   useTheme: () => (/* binding */ useTheme)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);

const useTheme = () => {
  const [isDarkMode, setIsDarkMode] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(() => {
    const savedTheme = localStorage.getItem('havenlytics-theme');
    return savedTheme === 'dark';
  });
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (isDarkMode) {
      document.body.classList.add('dark-mode');
      localStorage.setItem('havenlytics-theme', 'dark');
      // Force dark background immediately
      document.body.style.background = 'linear-gradient(135deg, #1a1a2e 0%, #16213e 100%)';
      document.documentElement.style.background = '#1a1a2e';
    } else {
      document.body.classList.remove('dark-mode');
      localStorage.setItem('havenlytics-theme', 'light');
      // Reset backgrounds
      document.body.style.background = '';
      document.documentElement.style.background = '';
    }
  }, [isDarkMode]);
  const toggleTheme = () => {
    setIsDarkMode(prev => !prev);
  };
  return {
    isDarkMode,
    toggleTheme
  };
};

/***/ }),

/***/ "./src/settings/components/Card/Card.js":
/*!**********************************************!*\
  !*** ./src/settings/components/Card/Card.js ***!
  \**********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Card_module_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Card.module.css */ "./src/settings/components/Card/Card.module.css");


// import './Card.css';

const Card = ({
  title,
  icon,
  children,
  collapsible = false,
  defaultCollapsed = false
}) => {
  const [isCollapsed, setIsCollapsed] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultCollapsed);
  const toggleCollapse = () => {
    if (collapsible) {
      setIsCollapsed(!isCollapsed);
    }
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _Card_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly-settings-api__card"]
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _Card_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly-settings-api__card-header"],
    onClick: toggleCollapse,
    style: {
      cursor: collapsible ? 'pointer' : 'default'
    }
  }, icon && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: icon
  }), title, collapsible && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: `fas fa-chevron-${isCollapsed ? 'down' : 'up'}`,
    style: {
      marginLeft: 'auto'
    }
  })), !isCollapsed && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _Card_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly-settings-api__card-body"]
  }, children));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Card);

/***/ }),

/***/ "./src/settings/components/Card/Card.module.css":
/*!******************************************************!*\
  !*** ./src/settings/components/Card/Card.module.css ***!
  \******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// extracted by mini-css-extract-plugin
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"hvnly-settings-api__card":"r9c6OGSTsMGdHsTMizek","hvnly-settings-api__card-header":"zPpp2aiq6Ww9hcXwDoaQ","hvnly-settings-api__card-body":"bs0XAF3B6r1TaDXJT9UY"});

/***/ }),

/***/ "./src/settings/components/Content/Content.js":
/*!****************************************************!*\
  !*** ./src/settings/components/Content/Content.js ***!
  \****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Content_module_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Content.module.css */ "./src/settings/components/Content/Content.module.css");
/* harmony import */ var _TabSections_DesignSettings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TabSections/DesignSettings */ "./src/settings/components/Content/TabSections/DesignSettings.js");
/* harmony import */ var _TabSections_GeneralSettings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./TabSections/GeneralSettings */ "./src/settings/components/Content/TabSections/GeneralSettings.js");
/* harmony import */ var _TabSections_MapSettings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./TabSections/MapSettings */ "./src/settings/components/Content/TabSections/MapSettings.js");
/* harmony import */ var _TabSections_PreloaderSettings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TabSections/PreloaderSettings */ "./src/settings/components/Content/TabSections/PreloaderSettings.js");
/* harmony import */ var _TabSections_PropertiesSettings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TabSections/PropertiesSettings */ "./src/settings/components/Content/TabSections/PropertiesSettings.js");
/* harmony import */ var _TabSections_PropertyDetailsSettings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TabSections/PropertyDetailsSettings */ "./src/settings/components/Content/TabSections/PropertyDetailsSettings.js");
/* harmony import */ var _TabSections_SearchSettings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./TabSections/SearchSettings */ "./src/settings/components/Content/TabSections/SearchSettings.js");
/* harmony import */ var _TabSections_ShortcodesSettings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TabSections/ShortcodesSettings */ "./src/settings/components/Content/TabSections/ShortcodesSettings.js");
/* harmony import */ var _TabSections_TabDropdown_CurrencySettings__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./TabSections/TabDropdown/CurrencySettings */ "./src/settings/components/Content/TabSections/TabDropdown/CurrencySettings.js");
/* harmony import */ var _TabSections_TabDropdown_MiscSettingsSettings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./TabSections/TabDropdown/MiscSettingsSettings */ "./src/settings/components/Content/TabSections/TabDropdown/MiscSettingsSettings.js");
/* harmony import */ var _TabSections_TabDropdown_SearchPropertyResultSettings__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./TabSections/TabDropdown/SearchPropertyResultSettings */ "./src/settings/components/Content/TabSections/TabDropdown/SearchPropertyResultSettings.js");
/* harmony import */ var _TabSections_TabDropdown_SearchPropertySettings__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./TabSections/TabDropdown/SearchPropertySettings */ "./src/settings/components/Content/TabSections/TabDropdown/SearchPropertySettings.js");




 // ADD THIS IMPORT










// Filter currency-specific fields from general settings
const getCurrencyFields = settingsData => {
  if (!settingsData) return {};
  const currencyFields = {};
  const currencyKeys = ['hvnly_EnabledCurrencyFormat', 'hvnly_thousandSeparator', 'hvnly_decimalSeparator', 'hvnly_numberOfDecimals', 'hvnly_thousandText', 'hvnly_millionText', 'hvnly_billionText', 'hvnly_currencyType', 'hvnly_currencyPositionType', 'hvnly_priceOnCallText', 'hvnly_priceFormat'];
  currencyKeys.forEach(key => {
    if (settingsData[key] !== undefined) {
      currencyFields[key] = settingsData[key];
    }
  });
  return currencyFields;
};

// Filter preloader settings fields
const getPreloaderFields = settingsData => {
  if (!settingsData) return {};
  const preloaderFields = {};
  const preloaderKeys = ['hvnly_enable_preloader', 'hvnly_preloader_animation', 'hvnly_preloader_min_display', 'hvnly_preloader_top_search', 'hvnly_preloader_filter_sidebar', 'hvnly_preloader_property_grid', 'hvnly_preloader_property_list', 'hvnly_preloader_view_controls', 'hvnly_preloader_load_more', 'hvnly_preloader_pagination'];
  preloaderKeys.forEach(key => {
    if (settingsData[key] !== undefined) {
      preloaderFields[key] = settingsData[key];
    }
  });
  return preloaderFields;
};

// Filter misc settings fields from general settings
const getMiscFields = settingsData => {
  if (!settingsData) return {};
  const miscFields = {};
  const miscKeys = ['hvnly_EnabledGutenbergEditor', 'hvnly_EnabledUserReviews', 'hvnly_EnabledGuestReviews', 'hvnly_EnabledUserFavorites', 'hvnly_EnabledSocialShare', 'hvnly_defaultCity', 'hvnly_defaultState', 'hvnly_countryType', 'hvnly_enableSocialShare'];
  miscKeys.forEach(key => {
    if (settingsData[key] !== undefined) {
      miscFields[key] = settingsData[key];
    }
  });
  return miscFields;
};

// Get ALL search settings
const getSearchPropertyFields = settingsData => {
  if (!settingsData) return {};
  return settingsData;
};

// Filter search result fields from search settings
const getSearchResultFields = settingsData => {
  if (!settingsData) return {};
  const searchResultFields = {};
  const searchResultKeys = ['hvnly_hideTopSearchTitle', 'hvnly_hideTopSearchBar', 'hvnly_hideLeftSearchBar', 'hvnly_numberOfColumns', 'hvnly_searchResultPerpage', 'hvnly_sidebarLayoutType'];
  searchResultKeys.forEach(key => {
    if (settingsData[key] !== undefined) {
      searchResultFields[key] = settingsData[key];
    }
  });
  return searchResultFields;
};

// Get map settings fields
const getMapFields = settingsData => {
  if (!settingsData) return {};
  const mapFields = {};
  const mapKeys = ['hvnly_map_provider', 'hvnly_map_api_key', 'hvnly_default_lat', 'hvnly_default_lng', 'hvnly_map_zoom', 'hvnly_map_style', 'hvnly_cluster_markers', 'hvnly_custom_marker', 'hvnly_marker_color', 'hvnly_show_fullscreen', 'hvnly_show_zoom_control', 'hvnly_show_scroll_wheel', 'hvnly_google_map_type'];
  mapKeys.forEach(key => {
    if (settingsData[key] !== undefined) {
      mapFields[key] = settingsData[key];
    }
  });
  return mapFields;
};
const Content = ({
  activeTab,
  onSaveTab,
  onResetTab,
  settingsData,
  onSettingsChange,
  showToast,
  onSyncComplete
}) => {
  const renderContent = () => {
    switch (activeTab) {
      case 'preloader':
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TabSections_PreloaderSettings__WEBPACK_IMPORTED_MODULE_5__["default"], {
          key: "preloader-settings",
          onSave: data => {
            onSaveTab('preloader', data);
          },
          onReset: () => {
            onResetTab('preloader');
          },
          settingsData: getPreloaderFields(settingsData),
          onSettingsChange: newData => {
            onSettingsChange('preloader', newData);
          },
          showToast: showToast
        });
      case 'map':
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TabSections_MapSettings__WEBPACK_IMPORTED_MODULE_4__["default"], {
          key: "map-settings",
          onSave: data => {
            onSaveTab('map', data);
          },
          onReset: () => {
            onResetTab('map');
          },
          settingsData: getMapFields(settingsData),
          onSettingsChange: newData => {
            onSettingsChange('map', newData);
          },
          showToast: showToast
        });
      case 'currency':
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TabSections_TabDropdown_CurrencySettings__WEBPACK_IMPORTED_MODULE_10__["default"], {
          key: "currency-settings",
          onSave: data => {
            onSaveTab('general', data);
          },
          onReset: () => {
            onResetTab('general');
          },
          settingsData: getCurrencyFields(settingsData),
          onSettingsChange: newData => {
            onSettingsChange('currency', newData);
          },
          showToast: showToast
        });
      case 'misc-settings':
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TabSections_TabDropdown_MiscSettingsSettings__WEBPACK_IMPORTED_MODULE_11__["default"], {
          key: "misc-settings",
          onSave: data => {
            onSaveTab('general', data);
          },
          onReset: () => {
            onResetTab('general');
          },
          settingsData: getMiscFields(settingsData),
          onSettingsChange: newData => {
            onSettingsChange('misc-settings', newData);
          },
          showToast: showToast
        });
      case 'search-property':
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TabSections_TabDropdown_SearchPropertySettings__WEBPACK_IMPORTED_MODULE_13__["default"], {
          key: "search-property",
          onSave: data => {
            onSaveTab('search', data);
          },
          onReset: () => {
            onResetTab('search');
          },
          settingsData: getSearchPropertyFields(settingsData),
          onSettingsChange: newData => {
            onSettingsChange('search-property', newData);
          },
          showToast: showToast,
          onSyncComplete: onSyncComplete
        });
      case 'search-result':
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TabSections_TabDropdown_SearchPropertyResultSettings__WEBPACK_IMPORTED_MODULE_12__["default"], {
          key: "search-result",
          onSave: data => {
            onSaveTab('search', data);
          },
          onReset: () => {
            onResetTab('search');
          },
          settingsData: getSearchResultFields(settingsData),
          onSettingsChange: newData => {
            onSettingsChange('search-result', newData);
          },
          showToast: showToast
        });
      case 'design':
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TabSections_DesignSettings__WEBPACK_IMPORTED_MODULE_2__["default"], {
          key: "design-settings",
          onSave: data => {
            onSaveTab('design', data);
          },
          onReset: () => {
            onResetTab('design');
          },
          settingsData: settingsData,
          onSettingsChange: newData => {
            onSettingsChange('design', newData);
          },
          showToast: showToast
        });
      case 'search':
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TabSections_SearchSettings__WEBPACK_IMPORTED_MODULE_8__["default"], {
          key: "search-settings",
          onSave: data => {
            onSaveTab('search', data);
          },
          onReset: () => {
            onResetTab('search');
          },
          settingsData: settingsData,
          onSettingsChange: newData => {
            onSettingsChange('search', newData);
          },
          showToast: showToast
        });
      case 'properties':
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TabSections_PropertiesSettings__WEBPACK_IMPORTED_MODULE_6__["default"], {
          key: "properties-settings",
          onSave: data => {
            onSaveTab('properties', data);
          },
          onReset: () => {
            onResetTab('properties');
          },
          settingsData: settingsData,
          onSettingsChange: newData => {
            onSettingsChange('properties', newData);
          },
          showToast: showToast
        });
      case 'property-details':
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TabSections_PropertyDetailsSettings__WEBPACK_IMPORTED_MODULE_7__["default"], {
          key: "property-details",
          onSave: data => {
            onSaveTab('property-details', data);
          },
          onReset: () => {
            onResetTab('property-details');
          },
          settingsData: settingsData,
          onSettingsChange: newData => {
            onSettingsChange('property-details', newData);
          },
          showToast: showToast
        });
      case 'shortcodes':
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TabSections_ShortcodesSettings__WEBPACK_IMPORTED_MODULE_9__["default"], {
          key: "shortcodes-settings",
          onSave: data => {
            onSaveTab('shortcodes', data);
          },
          onReset: () => {
            onResetTab('shortcodes');
          },
          settingsData: settingsData,
          onSettingsChange: newData => {
            onSettingsChange('shortcodes', newData);
          },
          showToast: showToast
        });
      default:
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TabSections_GeneralSettings__WEBPACK_IMPORTED_MODULE_3__["default"], {
          key: "general-settings",
          onSave: data => {
            onSaveTab('general', data);
          },
          onReset: () => {
            onResetTab('general');
          },
          settingsData: settingsData,
          onSettingsChange: newData => {
            onSettingsChange('general', newData);
          },
          showToast: showToast
        });
    }
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _Content_module_css__WEBPACK_IMPORTED_MODULE_1__["default"]['hvnly-settings-api__contents']
  }, renderContent());
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Content);

/***/ }),

/***/ "./src/settings/components/Content/Content.module.css":
/*!************************************************************!*\
  !*** ./src/settings/components/Content/Content.module.css ***!
  \************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// extracted by mini-css-extract-plugin
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"hvnly-settings-api__contents":"_vMvPAqqQM8Mg51E0CuQ"});

/***/ }),

/***/ "./src/settings/components/Content/TabSections/DesignSettings.js":
/*!***********************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/DesignSettings.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Card_Card__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Card/Card */ "./src/settings/components/Card/Card.js");
/* harmony import */ var _FormElements_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../FormElements/ColorPicker/ColorPicker */ "./src/settings/components/FormElements/ColorPicker/ColorPicker.js");
/* harmony import */ var _FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../FormElements/TabActionButtons/TabActionButtons */ "./src/settings/components/FormElements/TabActionButtons/TabActionButtons.js");
/* harmony import */ var _TabSections_module_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TabSections.module.css */ "./src/settings/components/Content/TabSections/TabSections.module.css");







const DesignSettings = ({
  onSave,
  onReset,
  settingsData,
  onSettingsChange,
  showToast
}) => {
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    hvnly_brandColor: '#6C60FE',
    hvnly_secondaryColor: '#764ba2',
    hvnly_linkColor: '#1E1E2F',
    hvnly_linkHoverColor: '#764ba2',
    hvnly_titleColor: '#1E1E2F',
    hvnly_primaryTextColor: '#1E1E2F',
    hvnly_secondaryTextColor: '#555555',
    hvnly_bodyFontSize: 16,
    hvnly_bodyFontWeights: '400',
    hvnly_titleFontWeights: '600',
    hvnly_bodyColor: '#333333'
  });
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (settingsData && typeof settingsData === 'object' && Object.keys(settingsData).length > 0) {
      const updatedSettings = {
        hvnly_brandColor: settingsData.hvnly_brandColor || settingsData.brand_color || '#6C60FE',
        hvnly_secondaryColor: settingsData.hvnly_secondaryColor || settingsData.secondary_color || '#764ba2',
        hvnly_linkColor: settingsData.hvnly_linkColor || settingsData.link_color || '#1E1E2F',
        hvnly_linkHoverColor: settingsData.hvnly_linkHoverColor || settingsData.link_hover_color || '#764ba2',
        hvnly_titleColor: settingsData.hvnly_titleColor || settingsData.title_color || '#1E1E2F',
        hvnly_primaryTextColor: settingsData.hvnly_primaryTextColor || settingsData.primary_text_color || '#1E1E2F',
        hvnly_secondaryTextColor: settingsData.hvnly_secondaryTextColor || settingsData.secondary_text_color || '#555555',
        hvnly_bodyFontSize: settingsData.hvnly_bodyFontSize || settingsData.body_font_size || 16,
        hvnly_bodyFontWeights: settingsData.hvnly_bodyFontWeights || settingsData.body_font_weights || '400',
        hvnly_titleFontWeights: settingsData.hvnly_titleFontWeights || settingsData.title_font_weights || '600',
        hvnly_bodyColor: settingsData.hvnly_bodyColor || settingsData.body_color || '#333333'
      };
      setSettings(prev => ({
        ...prev,
        ...updatedSettings
      }));
    }
  }, [settingsData]);
  const handleInputChange = (field, value) => {
    const newSettings = {
      ...settings,
      [field]: value
    };
    setSettings(newSettings);
    if (onSettingsChange) {
      onSettingsChange(newSettings);
    }
  };
  const handleSave = async () => {
    if (onSave) {
      await onSave(settings);
      return true;
    }
    return false;
  };
  const handleReset = async () => {
    const defaultSettings = {
      hvnly_brandColor: '#6C60FE',
      hvnly_secondaryColor: '#764ba2',
      hvnly_linkColor: '#1E1E2F',
      hvnly_linkHoverColor: '#764ba2',
      hvnly_titleColor: '#1E1E2F',
      hvnly_primaryTextColor: '#1E1E2F',
      hvnly_secondaryTextColor: '#555555',
      hvnly_bodyFontSize: 16,
      hvnly_bodyFontWeights: '400',
      hvnly_titleFontWeights: '600',
      hvnly_bodyColor: '#333333'
    };
    setSettings(defaultSettings);
    if (onSettingsChange) {
      onSettingsChange(defaultSettings);
    }
    if (onReset) {
      await onReset();
      return true;
    }
    return false;
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_6__["default"]['hvnly-settings-api__content']} ${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_6__["default"]['hvnly-settings-api__content--active']}`,
    id: "design"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Global Colors', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Global Style", "havenlytics"),
    icon: "fas fa-paintbrush",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Brand/Primary Color", "havenlytics"),
    value: settings.hvnly_brandColor,
    onChange: value => handleInputChange('hvnly_brandColor', value),
    defaultColor: "#6C60FE"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Secondary Color", "havenlytics"),
    value: settings.hvnly_secondaryColor,
    onChange: value => handleInputChange('hvnly_secondaryColor', value),
    defaultColor: "#764ba2"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Link Color", "havenlytics"),
    value: settings.hvnly_linkColor,
    onChange: value => handleInputChange('hvnly_linkColor', value),
    defaultColor: "#1E1E2F"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Link Hover Color", "havenlytics"),
    value: settings.hvnly_linkHoverColor,
    onChange: value => handleInputChange('hvnly_linkHoverColor', value),
    defaultColor: "#764ba2"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Title Text Color", "havenlytics"),
    value: settings.hvnly_titleColor,
    onChange: value => handleInputChange('hvnly_titleColor', value),
    defaultColor: "#1E1E2F"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Primary Text Color", "havenlytics"),
    value: settings.hvnly_primaryTextColor,
    onChange: value => handleInputChange('hvnly_primaryTextColor', value),
    defaultColor: "#1E1E2F"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Secondary Text Color", "havenlytics"),
    value: settings.hvnly_secondaryTextColor,
    onChange: value => handleInputChange('hvnly_secondaryTextColor', value),
    defaultColor: "#555555"
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_5__["default"], {
    onSave: handleSave,
    onReset: handleReset,
    showToast: showToast,
    saveLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Save Design Settings", "havenlytics"),
    resetLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Reset Changes", "havenlytics")
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DesignSettings);

/***/ }),

/***/ "./src/settings/components/Content/TabSections/GeneralSettings.js":
/*!************************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/GeneralSettings.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Card_Card__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Card/Card */ "./src/settings/components/Card/Card.js");
/* harmony import */ var _FormElements_RadioGroup_RadioGroup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../FormElements/RadioGroup/RadioGroup */ "./src/settings/components/FormElements/RadioGroup/RadioGroup.js");
/* harmony import */ var _FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../FormElements/TabActionButtons/TabActionButtons */ "./src/settings/components/FormElements/TabActionButtons/TabActionButtons.js");
/* harmony import */ var _FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../FormElements/ToggleSwitch/ToggleSwitch */ "./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.js");
/* harmony import */ var _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TabSections.module.css */ "./src/settings/components/Content/TabSections/TabSections.module.css");








const GeneralSettings = ({
  onSave,
  onReset,
  settingsData,
  onSettingsChange,
  showToast
}) => {
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    hvnly_analyticsEnabled: true,
    hvnly_userTrackingEnabled: false,
    hvnly_trackingMode: 'basic',
    hvnly_defaultUserRole: 'Administrator',
    hvnly_adminAccess: true,
    hvnly_editorAccess: false
  });
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (settingsData && Object.keys(settingsData).length > 0) {
      setSettings(prev => ({
        ...prev,
        ...settingsData
      }));
    }
  }, [settingsData]);
  const handleInputChange = (field, value) => {
    const newSettings = {
      ...settings,
      [field]: value
    };
    setSettings(newSettings);
    onSettingsChange?.(newSettings);
  };
  const handleSave = async () => {
    if (onSave) {
      await onSave(settings);
      return true;
    }
    return false;
  };
  const handleReset = async () => {
    const defaultSettings = {
      hvnly_analyticsEnabled: true,
      hvnly_userTrackingEnabled: false,
      hvnly_trackingMode: 'basic',
      hvnly_defaultUserRole: 'Administrator',
      hvnly_adminAccess: true,
      hvnly_editorAccess: false
    };
    setSettings(defaultSettings);
    onSettingsChange?.(defaultSettings);
    if (onReset) {
      await onReset();
      return true;
    }
    return false;
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__content']} ${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__content--active']}`,
    id: "general"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('General Settings', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Plugin Activation", "havenlytics"),
    icon: "fas fa-toggle-on",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_analyticsEnabled",
    checked: settings.hvnly_analyticsEnabled,
    onChange: e => handleInputChange('hvnly_analyticsEnabled', e.target.checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Havenlytics Analytics", "havenlytics")
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_userTrackingEnabled",
    checked: settings.hvnly_userTrackingEnabled,
    onChange: e => handleInputChange('hvnly_userTrackingEnabled', e.target.checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable User Tracking", "havenlytics")
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-label']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Tracking Mode", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_RadioGroup_RadioGroup__WEBPACK_IMPORTED_MODULE_4__["default"], {
    name: "hvnly_trackingMode",
    options: [{
      value: 'basic',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Basic Tracking', 'havenlytics')
    }, {
      value: 'enhanced',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enhanced Tracking', 'havenlytics')
    }, {
      value: 'advanced',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Advanced Tracking', 'havenlytics')
    }],
    selectedValue: settings.hvnly_trackingMode,
    onChange: value => handleInputChange('hvnly_trackingMode', value)
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("User Settings", "havenlytics"),
    icon: "fas fa-user",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-label']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Default User Role", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "text",
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-control'],
    value: settings.hvnly_defaultUserRole,
    onChange: e => handleInputChange('hvnly_defaultUserRole', e.target.value)
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-label']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Access Control", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_adminAccess",
    checked: settings.hvnly_adminAccess,
    onChange: e => handleInputChange('hvnly_adminAccess', e.target.checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Allow access to Administrators", "havenlytics")
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_editorAccess",
    checked: settings.hvnly_editorAccess,
    onChange: e => handleInputChange('hvnly_editorAccess', e.target.checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Allow access to Editors", "havenlytics")
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_5__["default"], {
    onSave: handleSave,
    onReset: handleReset,
    showToast: showToast,
    saveLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Save General Settings", "havenlytics"),
    resetLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Reset Changes", "havenlytics")
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GeneralSettings);

/***/ }),

/***/ "./src/settings/components/Content/TabSections/MapSettings.js":
/*!********************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/MapSettings.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Card_Card__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Card/Card */ "./src/settings/components/Card/Card.js");
/* harmony import */ var _FormElements_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../FormElements/ColorPicker/ColorPicker */ "./src/settings/components/FormElements/ColorPicker/ColorPicker.js");
/* harmony import */ var _FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../FormElements/InputGroup/InputGroup */ "./src/settings/components/FormElements/InputGroup/InputGroup.js");
/* harmony import */ var _FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../FormElements/SelectDropDown/SelectDropDown */ "./src/settings/components/FormElements/SelectDropDown/SelectDropDown.js");
/* harmony import */ var _FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../FormElements/TabActionButtons/TabActionButtons */ "./src/settings/components/FormElements/TabActionButtons/TabActionButtons.js");
/* harmony import */ var _FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../FormElements/ToggleSwitch/ToggleSwitch */ "./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.js");
/* harmony import */ var _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TabSections.module.css */ "./src/settings/components/Content/TabSections/TabSections.module.css");










const MapSettings = ({
  onSave,
  onReset,
  settingsData,
  onSettingsChange,
  showToast
}) => {
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    // Map Provider Configuration
    hvnly_map_provider: 'leaflet',
    hvnly_map_api_key: '',
    hvnly_enable_google_fallback: true,
    // NEW: Auto fallback to Leaflet

    // Map Display Settings
    hvnly_default_lat: '40.7128',
    hvnly_default_lng: '-74.0060',
    hvnly_map_zoom: 12,
    hvnly_map_style: 'standard',
    // Marker Settings
    hvnly_cluster_markers: true,
    hvnly_custom_marker: false,
    hvnly_marker_color: '#6C60FE',
    // Map UI Settings
    hvnly_show_fullscreen: true,
    hvnly_show_zoom_control: true,
    hvnly_show_scroll_wheel: true,
    // Google Maps Specific
    hvnly_google_map_type: 'roadmap'
  });

  // Load settings from parent
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (settingsData && Object.keys(settingsData).length > 0) {
      setSettings(prev => ({
        ...prev,
        ...settingsData
      }));
    }
  }, [settingsData]);
  const handleInputChange = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)((field, value) => {
    const newSettings = {
      ...settings,
      [field]: value
    };
    setSettings(newSettings);
    if (onSettingsChange) {
      onSettingsChange(newSettings);
    }
  }, [settings, onSettingsChange]);
  const handleSave = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async () => {
    const settingsToSave = {
      hvnly_map_provider: settings.hvnly_map_provider || 'leaflet',
      hvnly_map_api_key: settings.hvnly_map_api_key || '',
      hvnly_enable_google_fallback: settings.hvnly_enable_google_fallback === true || settings.hvnly_enable_google_fallback === 'true' || settings.hvnly_enable_google_fallback === 1,
      hvnly_default_lat: settings.hvnly_default_lat || '40.7128',
      hvnly_default_lng: settings.hvnly_default_lng || '-74.0060',
      hvnly_map_zoom: parseInt(settings.hvnly_map_zoom, 10) || 12,
      hvnly_map_style: settings.hvnly_map_style || 'standard',
      hvnly_cluster_markers: settings.hvnly_cluster_markers === true || settings.hvnly_cluster_markers === 'true' || settings.hvnly_cluster_markers === 1,
      hvnly_custom_marker: settings.hvnly_custom_marker === true || settings.hvnly_custom_marker === 'true' || settings.hvnly_custom_marker === 1,
      hvnly_marker_color: settings.hvnly_marker_color || '#6C60FE',
      hvnly_show_fullscreen: settings.hvnly_show_fullscreen === true || settings.hvnly_show_fullscreen === 'true' || settings.hvnly_show_fullscreen === 1,
      hvnly_show_zoom_control: settings.hvnly_show_zoom_control === true || settings.hvnly_show_zoom_control === 'true' || settings.hvnly_show_zoom_control === 1,
      hvnly_show_scroll_wheel: settings.hvnly_show_scroll_wheel === true || settings.hvnly_show_scroll_wheel === 'true' || settings.hvnly_show_scroll_wheel === 1,
      hvnly_google_map_type: settings.hvnly_google_map_type || 'roadmap'
    };
    if (onSave) {
      return await onSave(settingsToSave);
    }
    return false;
  }, [settings, onSave]);
  const handleReset = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async () => {
    const defaultSettings = {
      hvnly_map_provider: 'leaflet',
      hvnly_map_api_key: '',
      hvnly_enable_google_fallback: true,
      hvnly_default_lat: '40.7128',
      hvnly_default_lng: '-74.0060',
      hvnly_map_zoom: 12,
      hvnly_map_style: 'standard',
      hvnly_cluster_markers: true,
      hvnly_custom_marker: false,
      hvnly_marker_color: '#6C60FE',
      hvnly_show_fullscreen: true,
      hvnly_show_zoom_control: true,
      hvnly_show_scroll_wheel: true,
      hvnly_google_map_type: 'roadmap'
    };
    setSettings(defaultSettings);
    if (onSettingsChange) {
      onSettingsChange(defaultSettings);
    }
    if (onReset) {
      return await onReset();
    }
    return false;
  }, [onSettingsChange, onReset]);
  const mapProviderOptions = [{
    value: 'leaflet',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Leaflet (OpenStreetMap) - Free, No API Key', 'havenlytics')
  }, {
    value: 'openstreetmap',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('OpenStreetMap (Direct) - Free, No API Key', 'havenlytics')
  }, {
    value: 'google',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Google Maps - Requires API Key (Billing Required)', 'havenlytics')
  }];
  const mapStyleOptions = [{
    value: 'standard',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Standard', 'havenlytics')
  }, {
    value: 'satellite',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Satellite', 'havenlytics')
  }, {
    value: 'hybrid',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Hybrid', 'havenlytics')
  }, {
    value: 'terrain',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Terrain', 'havenlytics')
  }];
  const googleMapTypeOptions = [{
    value: 'roadmap',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Roadmap', 'havenlytics')
  }, {
    value: 'satellite',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Satellite', 'havenlytics')
  }, {
    value: 'hybrid',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Hybrid', 'havenlytics')
  }, {
    value: 'terrain',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Terrain', 'havenlytics')
  }];
  const zoomOptions = [{
    value: 8,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('8 (Far - City Level)', 'havenlytics')
  }, {
    value: 10,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('10 (City Level)', 'havenlytics')
  }, {
    value: 12,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('12 (Street Level)', 'havenlytics')
  }, {
    value: 14,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('14 (Detailed)', 'havenlytics')
  }, {
    value: 16,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('16 (Building Level)', 'havenlytics')
  }, {
    value: 18,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('18 (Very Detailed)', 'havenlytics')
  }];
  const isGoogleMaps = settings.hvnly_map_provider === 'google';
  const hasApiKey = settings.hvnly_map_api_key && settings.hvnly_map_api_key.trim() !== '';
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__content']} ${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__content--active']}`,
    id: "map"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Map Settings', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Configure map provider and display settings for property listings. Choose between Leaflet (free, OpenStreetMap) or Google Maps (requires API key with billing enabled).', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Map Provider", "havenlytics"),
    icon: "fas fa-map",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_6__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Select Map Provider", "havenlytics"),
    id: "hvnly_map_provider",
    value: settings.hvnly_map_provider,
    options: mapProviderOptions,
    onChange: value => handleInputChange('hvnly_map_provider', value)
  }), isGoogleMaps && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__form-group",
    style: {
      marginTop: '15px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_8__["default"], {
    id: "hvnly_enable_google_fallback",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Auto Fallback to Leaflet", "havenlytics"),
    checked: settings.hvnly_enable_google_fallback === true || settings.hvnly_enable_google_fallback === 'true' || settings.hvnly_enable_google_fallback === 1,
    onChange: checked => handleInputChange('hvnly_enable_google_fallback', checked)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Automatically switch to Leaflet (OpenStreetMap) when Google Maps quota is exceeded. This ensures your map never breaks.', 'havenlytics'))), isGoogleMaps && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-google-maps-section"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_5__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Google Maps API Key", "havenlytics"),
    id: "hvnly_map_api_key",
    type: "text",
    value: settings.hvnly_map_api_key,
    onChange: value => handleInputChange('hvnly_map_api_key', value),
    placeholder: "AIzaSy...",
    info: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enter your Google Maps API key. Billing MUST be enabled in Google Cloud Console.', 'havenlytics')
  }), !hasApiKey && isGoogleMaps && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__info-message",
    style: {
      marginTop: '10px',
      padding: '12px 15px',
      background: 'rgba(255, 77, 79, 0.08)',
      borderLeft: '3px solid #FF4D4F',
      borderRadius: '6px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-exclamation-circle",
    style: {
      color: '#FF4D4F',
      marginRight: '8px'
    }
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('API Key Required', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    style: {
      margin: '8px 0 0 0',
      fontSize: '12px',
      color: '#666'
    }
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Google Maps requires a valid API key with billing enabled. Without a key, the map will not display. Get a key from Google Cloud Console → Credentials.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__info-message",
    style: {
      marginTop: '20px',
      padding: '18px 20px',
      background: '#f8f9fa',
      borderLeft: '4px solid #6C60FE',
      borderRadius: '8px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", {
    style: {
      display: 'block',
      marginBottom: '12px',
      fontSize: '14px',
      color: '#1E1E2F'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-check-circle",
    style: {
      color: '#00B46A',
      marginRight: '8px'
    }
  }), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Required Google APIs (Must be enabled in Google Cloud Console)', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      marginBottom: '15px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      marginBottom: '12px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      display: 'flex',
      alignItems: 'center',
      marginBottom: '4px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-map",
    style: {
      color: '#6C60FE',
      width: '24px'
    }
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", {
    style: {
      marginLeft: '8px'
    }
  }, "Maps JavaScript API"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    style: {
      marginLeft: '10px',
      background: '#FFB507',
      color: '#1E1E2F',
      padding: '2px 8px',
      borderRadius: '20px',
      fontSize: '10px',
      fontWeight: 'bold'
    }
  }, "REQUIRED")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    style: {
      margin: '4px 0 0 32px',
      fontSize: '12px',
      color: '#555'
    }
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Required for displaying the map. Without this, no map will appear.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      marginBottom: '12px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      display: 'flex',
      alignItems: 'center',
      marginBottom: '4px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-location-dot",
    style: {
      color: '#6C60FE',
      width: '24px'
    }
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", {
    style: {
      marginLeft: '8px'
    }
  }, "Geocoding API"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    style: {
      marginLeft: '10px',
      background: '#FFB507',
      color: '#1E1E2F',
      padding: '2px 8px',
      borderRadius: '20px',
      fontSize: '10px',
      fontWeight: 'bold'
    }
  }, "REQUIRED")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    style: {
      margin: '4px 0 0 32px',
      fontSize: '12px',
      color: '#555'
    }
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Required for address search and reverse geocoding (converting lat/lng to address). Without this, dragging the marker will NOT update the address field.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      display: 'flex',
      alignItems: 'center',
      marginBottom: '4px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-store",
    style: {
      color: '#6C60FE',
      width: '24px'
    }
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", {
    style: {
      marginLeft: '8px'
    }
  }, "Places API"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    style: {
      marginLeft: '10px',
      background: '#6C60FE',
      color: '#fff',
      padding: '2px 8px',
      borderRadius: '20px',
      fontSize: '10px',
      fontWeight: 'bold'
    }
  }, "OPTIONAL")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    style: {
      margin: '4px 0 0 32px',
      fontSize: '12px',
      color: '#555'
    }
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Provides address autocomplete suggestions while typing for better user experience.', 'havenlytics')))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      marginTop: '15px',
      padding: '12px 15px',
      background: '#fff8e1',
      borderRadius: '6px',
      borderLeft: '3px solid #FFB507'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-lightbulb",
    style: {
      color: '#FFB507',
      marginRight: '8px'
    }
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", {
    style: {
      fontSize: '12px'
    }
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Quick Links to Enable APIs:', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      marginTop: '8px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
    href: "https://console.cloud.google.com/apis/library/maps-backend.googleapis.com",
    target: "_blank",
    rel: "noopener noreferrer",
    style: {
      color: '#6C60FE',
      textDecoration: 'none',
      fontSize: '12px',
      display: 'inline-block',
      marginRight: '15px'
    }
  }, "\uD83D\uDD17 ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Maps JavaScript API', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
    href: "https://console.cloud.google.com/apis/library/geocoding-backend.googleapis.com",
    target: "_blank",
    rel: "noopener noreferrer",
    style: {
      color: '#6C60FE',
      textDecoration: 'none',
      fontSize: '12px',
      display: 'inline-block'
    }
  }, "\uD83D\uDD17 ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Geocoding API', 'havenlytics'))))), hasApiKey && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__info-message",
    style: {
      marginTop: '15px',
      padding: '15px 18px',
      background: 'rgba(108, 96, 254, 0.05)',
      borderLeft: '3px solid #6C60FE',
      borderRadius: '6px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-chart-line",
    style: {
      color: '#6C60FE',
      marginRight: '8px'
    }
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", {
    style: {
      fontSize: '13px'
    }
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Google Maps Quota Information:', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      fontSize: '12px',
      color: '#555',
      marginTop: '8px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    style: {
      margin: '4px 0'
    }
  }, "\u2022 ", (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, "Free Tier:"), " $200 monthly credit (approx. 28,000 map loads per month)"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    style: {
      margin: '4px 0'
    }
  }, "\u2022 ", (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, "Quota Exceeded:"), " If quota is exceeded, the map will automatically fallback to Leaflet (if enabled)"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    style: {
      margin: '4px 0'
    }
  }, "\u2022 ", (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, "Billing Required:"), " You must enable billing in Google Cloud Console even for free tier"))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_6__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Google Map Type", "havenlytics"),
    id: "hvnly_google_map_type",
    value: settings.hvnly_google_map_type,
    options: googleMapTypeOptions,
    onChange: value => handleInputChange('hvnly_google_map_type', value)
  })), !isGoogleMaps && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__info-message",
    style: {
      marginTop: '15px',
      padding: '12px 15px',
      background: 'rgba(0, 180, 106, 0.08)',
      borderLeft: '3px solid #00B46A',
      borderRadius: '6px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-check-circle",
    style: {
      color: '#00B46A',
      marginRight: '8px'
    }
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Leaflet/OpenStreetMap Features:', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", {
    style: {
      margin: '8px 0 0 20px',
      fontSize: '12px',
      color: '#555'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, "\u2705 ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Completely free - No API key required', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, "\u2705 ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('No daily quota limits', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, "\u2705 ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Works out of the box', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, "\u2705 ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Supports custom tile layers', 'havenlytics'))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Map Display Settings", "havenlytics"),
    icon: "fas fa-eye",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__two-columns']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_5__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Default Latitude", "havenlytics"),
    id: "hvnly_default_lat",
    type: "text",
    value: settings.hvnly_default_lat,
    onChange: value => handleInputChange('hvnly_default_lat', value),
    info: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Default center latitude when no properties are loaded.', 'havenlytics')
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_5__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Default Longitude", "havenlytics"),
    id: "hvnly_default_lng",
    type: "text",
    value: settings.hvnly_default_lng,
    onChange: value => handleInputChange('hvnly_default_lng', value),
    info: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Default center longitude when no properties are loaded.', 'havenlytics')
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_6__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Default Zoom Level", "havenlytics"),
    id: "hvnly_map_zoom",
    value: String(settings.hvnly_map_zoom),
    options: zoomOptions,
    onChange: value => handleInputChange('hvnly_map_zoom', parseInt(value, 10))
  }), !isGoogleMaps && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_6__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Map Tile Style", "havenlytics"),
    id: "hvnly_map_style",
    value: settings.hvnly_map_style,
    options: mapStyleOptions,
    onChange: value => handleInputChange('hvnly_map_style', value),
    info: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Visual style for the map tiles (applies to Leaflet/OpenStreetMap only).', 'havenlytics')
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Marker Settings", "havenlytics"),
    icon: "fas fa-map-marker-alt",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_8__["default"], {
    id: "hvnly_cluster_markers",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Marker Clustering", "havenlytics"),
    checked: settings.hvnly_cluster_markers === true || settings.hvnly_cluster_markers === 'true' || settings.hvnly_cluster_markers === 1,
    onChange: checked => handleInputChange('hvnly_cluster_markers', checked)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Group nearby markers together when zoomed out for better performance and cleaner display.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_8__["default"], {
    id: "hvnly_custom_marker",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Use Custom Marker Style", "havenlytics"),
    checked: settings.hvnly_custom_marker === true || settings.hvnly_custom_marker === 'true' || settings.hvnly_custom_marker === 1,
    onChange: checked => handleInputChange('hvnly_custom_marker', checked)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable custom styled markers instead of default map markers.', 'havenlytics'))), (settings.hvnly_custom_marker === true || settings.hvnly_custom_marker === 'true' || settings.hvnly_custom_marker === 1) && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Marker Color", "havenlytics"),
    value: settings.hvnly_marker_color,
    onChange: value => handleInputChange('hvnly_marker_color', value),
    defaultColor: "#6C60FE"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__info-message",
    style: {
      marginTop: '15px',
      padding: '10px 12px',
      background: 'rgba(108, 96, 254, 0.08)',
      borderLeft: '3px solid var(--hvnly-brand-primary)',
      borderRadius: '4px',
      fontSize: '12px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-palette"
  }), ' ', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Custom markers can also be overridden by adding custom-marker.php template in your theme: your-theme/havenlytics/map/custom-marker.php', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Map Controls", "havenlytics"),
    icon: "fas fa-sliders-h",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_8__["default"], {
    id: "hvnly_show_fullscreen",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Show Fullscreen Button", "havenlytics"),
    checked: settings.hvnly_show_fullscreen === true || settings.hvnly_show_fullscreen === 'true' || settings.hvnly_show_fullscreen === 1,
    onChange: checked => handleInputChange('hvnly_show_fullscreen', checked)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Display button to toggle fullscreen mode on the map.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_8__["default"], {
    id: "hvnly_show_zoom_control",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Show Zoom Controls", "havenlytics"),
    checked: settings.hvnly_show_zoom_control === true || settings.hvnly_show_zoom_control === 'true' || settings.hvnly_show_zoom_control === 1,
    onChange: checked => handleInputChange('hvnly_show_zoom_control', checked)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Display + and - buttons for zooming in and out.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_8__["default"], {
    id: "hvnly_show_scroll_wheel",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Scroll Wheel Zoom", "havenlytics"),
    checked: settings.hvnly_show_scroll_wheel === true || settings.hvnly_show_scroll_wheel === 'true' || settings.hvnly_show_scroll_wheel === 1,
    onChange: checked => handleInputChange('hvnly_show_scroll_wheel', checked)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_9__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Allow users to zoom the map using mouse scroll wheel.', 'havenlytics')))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Developer Info - Template Overrides", "havenlytics"),
    icon: "fas fa-code",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__info-message",
    style: {
      padding: '15px',
      background: '#f8f9fa',
      borderRadius: '8px',
      border: '1px solid #e9ecef'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", {
    style: {
      marginTop: 0,
      marginBottom: '10px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-folder-open"
  }), ' ', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Map Templates can be overridden in your theme:', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", {
    style: {
      margin: 0,
      paddingLeft: '20px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, "your-theme/havenlytics/map/map-container.php"), " - ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Main map container', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, "your-theme/havenlytics/map/custom-marker.php"), " - ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Custom marker HTML', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, "your-theme/havenlytics/map/map-error.php"), " - ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error message display', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, "your-theme/havenlytics/map/property-popup.php"), " - ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Property popup content', 'havenlytics'))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_7__["default"], {
    onSave: handleSave,
    onReset: handleReset,
    showToast: showToast,
    saveLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Save Map Settings", "havenlytics"),
    resetLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Reset to Defaults", "havenlytics")
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MapSettings);

/***/ }),

/***/ "./src/settings/components/Content/TabSections/PreloaderSettings.js":
/*!**************************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/PreloaderSettings.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Card_Card__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Card/Card */ "./src/settings/components/Card/Card.js");
/* harmony import */ var _FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../FormElements/SelectDropDown/SelectDropDown */ "./src/settings/components/FormElements/SelectDropDown/SelectDropDown.js");
/* harmony import */ var _FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../FormElements/TabActionButtons/TabActionButtons */ "./src/settings/components/FormElements/TabActionButtons/TabActionButtons.js");
/* harmony import */ var _FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../FormElements/ToggleSwitch/ToggleSwitch */ "./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.js");
/* harmony import */ var _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TabSections.module.css */ "./src/settings/components/Content/TabSections/TabSections.module.css");








const PreloaderSettings = ({
  onSave,
  onReset,
  settingsData,
  onSettingsChange,
  showToast,
  onSyncComplete
}) => {
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    hvnly_enable_preloader: false,
    hvnly_preloader_animation: 'shimmer',
    hvnly_preloader_min_display: 300,
    hvnly_preloader_top_search: false,
    hvnly_preloader_filter_sidebar: false,
    hvnly_preloader_property_grid: false,
    hvnly_preloader_property_list: false,
    hvnly_preloader_view_controls: false,
    hvnly_preloader_load_more: false,
    hvnly_preloader_pagination: false
  });
  const [isSyncing, setIsSyncing] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const [pendingSync, setPendingSync] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null);

  // Track if this is the first time enabling the preloader
  const wasPreviouslyEnabled = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
  const isUpdatingFromParent = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);

  // Update local state when parent data changes, but avoid loops
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (settingsData && Object.keys(settingsData).length > 0) {
      // Mark that we're updating from parent to avoid sending updates back
      isUpdatingFromParent.current = true;
      setSettings(prev => {
        const newSettings = {
          ...prev,
          ...settingsData
        };
        return newSettings;
      });

      // Track previous enabled state
      if (settingsData.hvnly_enable_preloader !== undefined) {
        wasPreviouslyEnabled.current = settingsData.hvnly_enable_preloader === true || settingsData.hvnly_enable_preloader === 'true' || settingsData.hvnly_enable_preloader === 1;
      }

      // Reset the flag after a short delay
      setTimeout(() => {
        isUpdatingFromParent.current = false;
      }, 100);
    }
  }, [settingsData]);
  const syncViewTypeWithAPI = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async viewType => {
    if (isSyncing) return;
    setIsSyncing(true);
    try {
      const apiBase = window.HavenlyticsData?.hvnlyNabApi?.url || '/wp-json/hvnlynab/v1';
      const nonce = window.HavenlyticsData?.hvnlyNabApi?.nonce || '';
      const response = await fetch(`${apiBase}/plugin-settings/sync-view-type`, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'X-WP-Nonce': nonce
        },
        body: JSON.stringify({
          view_type: viewType
        })
      });
      const result = await response.json();
      if (result.success) {
        if (showToast) {
          showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Property view synced with Search settings', 'havenlytics'));
        }
      }
    } catch (error) {
      // Silent fail
    } finally {
      setIsSyncing(false);
    }
  }, [isSyncing, showToast]);
  const syncAjaxLoadMoreWithAPI = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async isEnabled => {
    if (isSyncing) return;
    setIsSyncing(true);
    try {
      const apiBase = window.HavenlyticsData?.hvnlyNabApi?.url || '/wp-json/hvnlynab/v1';
      const nonce = window.HavenlyticsData?.hvnlyNabApi?.nonce || '';
      const response = await fetch(`${apiBase}/plugin-settings/sync-ajax-load-more`, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'X-WP-Nonce': nonce
        },
        body: JSON.stringify({
          ajax_load_more_enabled: isEnabled
        })
      });
      const result = await response.json();
      if (result.success) {
        if (showToast) {
          if (isEnabled) {
            showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('AJAX Load More enabled, Load More Preloader activated', 'havenlytics'));
          } else {
            showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('AJAX Load More disabled, Pagination Preloader activated', 'havenlytics'));
          }
        }
      }
    } catch (error) {
      // Silent fail
    } finally {
      setIsSyncing(false);
    }
  }, [isSyncing, showToast]);
  const handleInputChange = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async (field, value) => {
    // Prevent updates during sync or when updating from parent
    if (isSyncing || isUpdatingFromParent.current) {
      return;
    }

    // Create updated settings
    let newSettings = {
      ...settings,
      [field]: value
    };

    // Auto-enable component preloaders when user first enables the global preloader
    if (field === 'hvnly_enable_preloader' && value === true && wasPreviouslyEnabled.current === false) {
      newSettings.hvnly_preloader_top_search = true;
      newSettings.hvnly_preloader_filter_sidebar = true;
      newSettings.hvnly_preloader_property_grid = true;
      newSettings.hvnly_preloader_view_controls = true;
      newSettings.hvnly_preloader_load_more = true;
      if (showToast) {
        showToast('info', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Auto-Enabled', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Common preloaders have been automatically enabled. You can adjust any settings below.', 'havenlytics'));
      }
    }

    // Mutual exclusivity: Grid ON → List OFF
    if (field === 'hvnly_preloader_property_grid' && value === true) {
      newSettings.hvnly_preloader_property_list = false;
    }
    // Mutual exclusivity: List ON → Grid OFF
    if (field === 'hvnly_preloader_property_list' && value === true) {
      newSettings.hvnly_preloader_property_grid = false;
    }

    // Mutual exclusivity: Load More ON → Pagination OFF
    if (field === 'hvnly_preloader_load_more' && value === true) {
      newSettings.hvnly_preloader_pagination = false;
    }
    // Mutual exclusivity: Pagination ON → Load More OFF
    if (field === 'hvnly_preloader_pagination' && value === true) {
      newSettings.hvnly_preloader_load_more = false;
    }

    // Update local state immediately
    setSettings(newSettings);

    // Update wasPreviouslyEnabled for future checks
    if (field === 'hvnly_enable_preloader') {
      wasPreviouslyEnabled.current = value === true;
    }

    // Notify parent of changes
    if (onSettingsChange) {
      onSettingsChange(newSettings);
    }

    // Handle API syncs
    if ((field === 'hvnly_preloader_property_grid' || field === 'hvnly_preloader_property_list') && !isSyncing) {
      const newViewType = newSettings.hvnly_preloader_property_grid ? 'GRID' : newSettings.hvnly_preloader_property_list ? 'LIST' : null;
      if (newViewType) {
        await syncViewTypeWithAPI(newViewType);
      }
    }

    // When Load More or Pagination changes, sync with AJAX Load More
    if ((field === 'hvnly_preloader_load_more' || field === 'hvnly_preloader_pagination') && !isSyncing) {
      let newAjaxStatus = null;
      if (field === 'hvnly_preloader_load_more' && value === true) {
        newAjaxStatus = true;
      } else if (field === 'hvnly_preloader_pagination' && value === true) {
        newAjaxStatus = false;
      }
      if (newAjaxStatus !== null) {
        await syncAjaxLoadMoreWithAPI(newAjaxStatus);
      }
    }
  }, [settings, onSettingsChange, isSyncing, syncViewTypeWithAPI, syncAjaxLoadMoreWithAPI, showToast]);
  const handleSave = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async () => {
    const settingsToSave = {
      hvnly_enable_preloader: settings.hvnly_enable_preloader === true || settings.hvnly_enable_preloader === 'true' || settings.hvnly_enable_preloader === 1,
      hvnly_preloader_animation: settings.hvnly_preloader_animation || 'shimmer',
      hvnly_preloader_min_display: parseInt(settings.hvnly_preloader_min_display, 10) || 300,
      hvnly_preloader_filter_sidebar: settings.hvnly_preloader_filter_sidebar === true || settings.hvnly_preloader_filter_sidebar === 'true' || settings.hvnly_preloader_filter_sidebar === 1,
      hvnly_preloader_property_grid: settings.hvnly_preloader_property_grid === true || settings.hvnly_preloader_property_grid === 'true' || settings.hvnly_preloader_property_grid === 1,
      hvnly_preloader_property_list: settings.hvnly_preloader_property_list === true || settings.hvnly_preloader_property_list === 'true' || settings.hvnly_preloader_property_list === 1,
      hvnly_preloader_top_search: settings.hvnly_preloader_top_search === true || settings.hvnly_preloader_top_search === 'true' || settings.hvnly_preloader_top_search === 1,
      hvnly_preloader_view_controls: settings.hvnly_preloader_view_controls === true || settings.hvnly_preloader_view_controls === 'true' || settings.hvnly_preloader_view_controls === 1,
      hvnly_preloader_load_more: settings.hvnly_preloader_load_more === true || settings.hvnly_preloader_load_more === 'true' || settings.hvnly_preloader_load_more === 1,
      hvnly_preloader_pagination: settings.hvnly_preloader_pagination === true || settings.hvnly_preloader_pagination === 'true' || settings.hvnly_preloader_pagination === 1
    };
    if (onSave) {
      return await onSave(settingsToSave);
    }
    return false;
  }, [settings, onSave]);
  const handleReset = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async () => {
    const defaultSettings = {
      hvnly_enable_preloader: false,
      hvnly_preloader_animation: 'shimmer',
      hvnly_preloader_min_display: 300,
      hvnly_preloader_top_search: false,
      hvnly_preloader_filter_sidebar: false,
      hvnly_preloader_property_grid: false,
      hvnly_preloader_property_list: false,
      hvnly_preloader_view_controls: false,
      hvnly_preloader_load_more: false,
      hvnly_preloader_pagination: false
    };
    setSettings(defaultSettings);
    wasPreviouslyEnabled.current = false;
    if (onSettingsChange) {
      onSettingsChange(defaultSettings);
    }
    if (onReset) {
      return await onReset();
    }
    return false;
  }, [onSettingsChange, onReset]);
  const animationOptions = [{
    value: 'shimmer',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Shimmer Animation', 'havenlytics')
  }, {
    value: 'pulse',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Pulse Animation', 'havenlytics')
  }, {
    value: 'wave',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Wave Animation', 'havenlytics')
  }, {
    value: 'bounce',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Bounce Animation', 'havenlytics')
  }, {
    value: 'fade',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Fade Animation', 'havenlytics')
  }, {
    value: 'slide',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Slide Animation', 'havenlytics')
  }, {
    value: 'glow',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Glow Animation', 'havenlytics')
  }, {
    value: 'skeleton',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Skeleton Loading', 'havenlytics')
  }, {
    value: 'gradient-flow',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Gradient Flow', 'havenlytics')
  }, {
    value: 'breathing',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Breathing Effect', 'havenlytics')
  }];
  const durationOptions = [{
    value: 0,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Instant (0ms)', 'havenlytics')
  }, {
    value: 150,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Fast (150ms)', 'havenlytics')
  }, {
    value: 300,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Normal (300ms)', 'havenlytics')
  }, {
    value: 500,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Slow (500ms)', 'havenlytics')
  }, {
    value: 800,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Very Slow (800ms)', 'havenlytics')
  }, {
    value: 1000,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('1 Second (1000ms)', 'havenlytics')
  }, {
    value: 1500,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('1.5 Seconds (1500ms)', 'havenlytics')
  }, {
    value: 2000,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('2 Seconds (2000ms)', 'havenlytics')
  }, {
    value: 3000,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('3 Seconds (3000ms)', 'havenlytics')
  }, {
    value: 5000,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('5 Seconds (5000ms)', 'havenlytics')
  }, {
    value: 8000,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('8 Seconds (8000ms)', 'havenlytics')
  }, {
    value: 10000,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('10 Seconds (10000ms)', 'havenlytics')
  }];
  const isGlobalEnabled = settings.hvnly_enable_preloader === true || settings.hvnly_enable_preloader === 'true' || settings.hvnly_enable_preloader === 1;
  const getDisabledClass = disabled => {
    return disabled ? _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__disabled'] : '';
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__content']} ${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__content--active']}`,
    id: "preloader"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Preloader Settings', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Configure animated placeholder preloaders to prevent layout shift and improve perceived performance.', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Global Preloader Configuration", "havenlytics"),
    icon: "fas fa-spinner",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_enable_preloader",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Preloader System", "havenlytics"),
    checked: isGlobalEnabled,
    onChange: checked => handleInputChange('hvnly_enable_preloader', checked)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Master switch to enable or disable ALL preloader placeholders across your property listings.', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__description'],
    style: {
      color: '#6C60FE',
      marginTop: '8px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-magic"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Tip: When you enable this for the first time, common preloaders (Top Search, Filter Sidebar, Property Grid, View Controls, Load More) will be automatically enabled for you.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Animation Style", "havenlytics"),
    id: "hvnly_preloader_animation",
    value: settings.hvnly_preloader_animation,
    options: animationOptions,
    onChange: value => handleInputChange('hvnly_preloader_animation', value),
    disabled: !isGlobalEnabled
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Choose the animation effect for preloader placeholders.', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Minimum Display Time", "havenlytics"),
    id: "hvnly_preloader_min_display",
    value: String(settings.hvnly_preloader_min_display),
    options: durationOptions,
    onChange: value => handleInputChange('hvnly_preloader_min_display', parseInt(value, 10)),
    disabled: !isGlobalEnabled
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Minimum time preloader should be visible (prevents flashing on fast connections).', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Component Preloader Settings", "havenlytics"),
    icon: "fas fa-cubes",
    collapsible: true,
    disabled: !isGlobalEnabled
  }, !isGlobalEnabled ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__info-message",
    style: {
      marginBottom: '15px',
      padding: '12px 15px',
      background: 'rgba(255, 181, 7, 0.1)',
      borderLeft: '3px solid #FFB507',
      borderRadius: '4px',
      fontSize: '13px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-lock"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Component settings are locked because "Enable Preloader System" is turned OFF. Please enable the master switch above first.', 'havenlytics')) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__info-message",
    style: {
      marginBottom: '15px',
      padding: '8px 12px',
      background: 'rgba(108, 96, 254, 0.08)',
      borderLeft: '3px solid var(--hvnly-brand-primary)',
      borderRadius: '4px',
      fontSize: '12px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-unlock-alt"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Component settings are now editable. Toggle individual preloaders below.', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-group']} ${getDisabledClass(!isGlobalEnabled)}`
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_preloader_top_search",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Top Search Bar Preloader", "havenlytics"),
    checked: settings.hvnly_preloader_top_search === true || settings.hvnly_preloader_top_search === 'true' || settings.hvnly_preloader_top_search === 1,
    onChange: checked => handleInputChange('hvnly_preloader_top_search', checked),
    disabled: !isGlobalEnabled
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Show animated placeholders for the top search bar while loading.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-group']} ${getDisabledClass(!isGlobalEnabled)}`
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_preloader_filter_sidebar",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Filter Sidebar Preloader", "havenlytics"),
    checked: settings.hvnly_preloader_filter_sidebar === true || settings.hvnly_preloader_filter_sidebar === 'true' || settings.hvnly_preloader_filter_sidebar === 1,
    onChange: checked => handleInputChange('hvnly_preloader_filter_sidebar', checked),
    disabled: !isGlobalEnabled
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Show animated placeholders for the left filter sidebar while content loads.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-group']} ${getDisabledClass(!isGlobalEnabled)}`
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_preloader_property_grid",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Property Grid Preloader", "havenlytics"),
    checked: settings.hvnly_preloader_property_grid === true || settings.hvnly_preloader_property_grid === 'true' || settings.hvnly_preloader_property_grid === 1,
    onChange: checked => handleInputChange('hvnly_preloader_property_grid', checked),
    disabled: !isGlobalEnabled
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Show animated placeholders for property grid cards while loading.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-group']} ${getDisabledClass(!isGlobalEnabled)}`
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_preloader_property_list",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Property List Preloader", "havenlytics"),
    checked: settings.hvnly_preloader_property_list === true || settings.hvnly_preloader_property_list === 'true' || settings.hvnly_preloader_property_list === 1,
    onChange: checked => handleInputChange('hvnly_preloader_property_list', checked),
    disabled: !isGlobalEnabled
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Show animated placeholders for property list view while loading.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-group']} ${getDisabledClass(!isGlobalEnabled)}`
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_preloader_view_controls",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("View Controls Preloader", "havenlytics"),
    checked: settings.hvnly_preloader_view_controls === true || settings.hvnly_preloader_view_controls === 'true' || settings.hvnly_preloader_view_controls === 1,
    onChange: checked => handleInputChange('hvnly_preloader_view_controls', checked),
    disabled: !isGlobalEnabled
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Show animated placeholders for sort/view controls bar while loading.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-group']} ${getDisabledClass(!isGlobalEnabled)}`
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_preloader_load_more",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Load More Preloader", "havenlytics"),
    checked: settings.hvnly_preloader_load_more === true || settings.hvnly_preloader_load_more === 'true' || settings.hvnly_preloader_load_more === 1,
    onChange: checked => handleInputChange('hvnly_preloader_load_more', checked),
    disabled: !isGlobalEnabled
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Show animated placeholders for load more button while loading. (When enabled, AJAX Load More will be automatically enabled)', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__form-group']} ${getDisabledClass(!isGlobalEnabled)}`
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_preloader_pagination",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Pagination Preloader", "havenlytics"),
    checked: settings.hvnly_preloader_pagination === true || settings.hvnly_preloader_pagination === 'true' || settings.hvnly_preloader_pagination === 1,
    onChange: checked => handleInputChange('hvnly_preloader_pagination', checked),
    disabled: !isGlobalEnabled
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_7__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Show animated placeholders for pagination buttons while loading. (When enabled, AJAX Load More will be automatically disabled - traditional pagination)', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__info-message",
    style: {
      marginTop: '15px',
      padding: '10px 12px',
      background: 'rgba(108, 96, 254, 0.1)',
      borderLeft: '3px solid var(--hvnly-brand-primary)',
      borderRadius: '4px',
      fontSize: '12px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-sync-alt"
  }), ' ', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Changes to Grid/List Preloader will automatically sync with the Default Property View in Search Property settings.', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__info-message",
    style: {
      marginTop: '10px',
      padding: '10px 12px',
      background: 'rgba(255, 181, 7, 0.1)',
      borderLeft: '3px solid #FFB507',
      borderRadius: '4px',
      fontSize: '12px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-info-circle"
  }), ' ', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Note: Load More Preloader and Pagination Preloader are mutually exclusive. Enabling one will automatically sync with the AJAX Load More setting in Search Property.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_5__["default"], {
    onSave: handleSave,
    onReset: handleReset,
    showToast: showToast,
    saveLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Save Preloader Settings", "havenlytics"),
    resetLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Reset to Defaults", "havenlytics")
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PreloaderSettings);

/***/ }),

/***/ "./src/settings/components/Content/TabSections/PropertiesSettings.js":
/*!***************************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/PropertiesSettings.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Card_Card__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Card/Card */ "./src/settings/components/Card/Card.js");
/* harmony import */ var _FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../FormElements/SelectDropDown/SelectDropDown */ "./src/settings/components/FormElements/SelectDropDown/SelectDropDown.js");
/* harmony import */ var _FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../FormElements/TabActionButtons/TabActionButtons */ "./src/settings/components/FormElements/TabActionButtons/TabActionButtons.js");
/* harmony import */ var _TabSections_module_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TabSections.module.css */ "./src/settings/components/Content/TabSections/TabSections.module.css");







const PropertiesSettings = ({
  onSave,
  onReset,
  settingsData,
  onSettingsChange,
  showToast
}) => {
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    // Responsive View Settings
    hvnly_propertyColumnsGapGrid: '10',
    hvnly_propertyTabletView: '2',
    hvnly_propertySmallTabletView: '2',
    hvnly_propertyMobileTabletView: '1',
    // Main Container Width Settings
    hvnly_container_width_xs: '100%',
    hvnly_container_width_sm: '540px',
    hvnly_container_width_md: '720px',
    hvnly_container_width_lg: '960px',
    hvnly_container_width_xl: '1140px',
    hvnly_container_width_xxl: '1320px',
    hvnly_container_width_xxxl: '1399px',
    hvnly_container_width_4k: '1400px'
  });
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (settingsData && Object.keys(settingsData).length > 0) {
      setSettings(prev => ({
        ...prev,
        ...settingsData
      }));
    }
  }, [settingsData]);
  const handleInputChange = (field, value) => {
    const newSettings = {
      ...settings,
      [field]: value
    };
    setSettings(newSettings);
    if (onSettingsChange) {
      onSettingsChange(newSettings);
    }
  };
  const handleSave = async () => {
    if (onSave) {
      await onSave(settings);
      return true;
    }
    return false;
  };
  const handleReset = async () => {
    const defaultSettings = {
      hvnly_propertyColumnsGapGrid: '10',
      hvnly_propertyTabletView: '2',
      hvnly_propertySmallTabletView: '2',
      hvnly_propertyMobileTabletView: '1',
      hvnly_container_width_xs: '100%',
      hvnly_container_width_sm: '540px',
      hvnly_container_width_md: '720px',
      hvnly_container_width_lg: '960px',
      hvnly_container_width_xl: '1140px',
      hvnly_container_width_xxl: '1320px',
      hvnly_container_width_xxxl: '1399px',
      hvnly_container_width_4k: '1400px'
    };
    setSettings(defaultSettings);
    if (onSettingsChange) {
      onSettingsChange(defaultSettings);
    }
    if (onReset) {
      await onReset();
      return true;
    }
    return false;
  };
  const propertyColumnsGapOptions = [{
    value: '0',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('0px', 'havenlytics')
  }, {
    value: '10',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('10px', 'havenlytics')
  }, {
    value: '20',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('20px', 'havenlytics')
  }, {
    value: '30',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('30px', 'havenlytics')
  }];
  const propertyTabletViewOptions = [{
    value: '2',
    label: '2'
  }, {
    value: '3',
    label: '3'
  }, {
    value: '4',
    label: '4'
  }, {
    value: '5',
    label: '5'
  }, {
    value: '6',
    label: '6'
  }];
  const propertySmallTabletViewOptions = [{
    value: '2',
    label: '2'
  }, {
    value: '3',
    label: '3'
  }, {
    value: '4',
    label: '4'
  }, {
    value: '5',
    label: '5'
  }, {
    value: '6',
    label: '6'
  }];
  const propertySmallMobileViewOptions = [{
    value: '1',
    label: '1'
  }, {
    value: '2',
    label: '2'
  }, {
    value: '3',
    label: '3'
  }, {
    value: '4',
    label: '4'
  }, {
    value: '5',
    label: '5'
  }, {
    value: '6',
    label: '6'
  }];
  const containerWidthOptions = [{
    value: '100%',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('100% (Full Width)', 'havenlytics')
  }, {
    value: '540px',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('540px', 'havenlytics')
  }, {
    value: '720px',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('720px', 'havenlytics')
  }, {
    value: '960px',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('960px', 'havenlytics')
  }, {
    value: '1140px',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('1140px', 'havenlytics')
  }, {
    value: '1320px',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('1320px', 'havenlytics')
  }, {
    value: '1399px',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('1399px', 'havenlytics')
  }, {
    value: '1400px',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('1400px', 'havenlytics')
  }, {
    value: '1600px',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('1600px', 'havenlytics')
  }, {
    value: '1800px',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('1800px', 'havenlytics')
  }];
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_6__["default"]['hvnly-settings-api__content']} ${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_6__["default"]['hvnly-settings-api__content--active']}`,
    id: "properties"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Properties Archive Settings', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Main Container Width", "havenlytics"),
    icon: "fas fa-arrows-alt-h",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_6__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_6__["default"]['hvnly-settings-api__description']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Configure the maximum width of the main container at different screen sizes. These values control the responsive behavior of your property pages.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Extra Small (XS) - Mobile (< 480px)", "havenlytics"),
    id: "hvnly_container_width_xs",
    value: settings.hvnly_container_width_xs,
    options: containerWidthOptions,
    onChange: value => handleInputChange('hvnly_container_width_xs', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Small (SM) - Mobile Landscape (480px - 639px)", "havenlytics"),
    id: "hvnly_container_width_sm",
    value: settings.hvnly_container_width_sm,
    options: containerWidthOptions,
    onChange: value => handleInputChange('hvnly_container_width_sm', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Medium (MD) - Tablet (640px - 767px)", "havenlytics"),
    id: "hvnly_container_width_md",
    value: settings.hvnly_container_width_md,
    options: containerWidthOptions,
    onChange: value => handleInputChange('hvnly_container_width_md', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Large (LG) - Tablet Landscape (768px - 991px)", "havenlytics"),
    id: "hvnly_container_width_lg",
    value: settings.hvnly_container_width_lg,
    options: containerWidthOptions,
    onChange: value => handleInputChange('hvnly_container_width_lg', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Extra Large (XL) - Laptop (992px - 1199px)", "havenlytics"),
    id: "hvnly_container_width_xl",
    value: settings.hvnly_container_width_xl,
    options: containerWidthOptions,
    onChange: value => handleInputChange('hvnly_container_width_xl', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("2X Large (XXL) - Desktop (1200px - 1439px)", "havenlytics"),
    id: "hvnly_container_width_xxl",
    value: settings.hvnly_container_width_xxl,
    options: containerWidthOptions,
    onChange: value => handleInputChange('hvnly_container_width_xxl', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("3X Large (XXXL) - Large Desktop (1440px - 1919px)", "havenlytics"),
    id: "hvnly_container_width_xxxl",
    value: settings.hvnly_container_width_xxxl,
    options: containerWidthOptions,
    onChange: value => handleInputChange('hvnly_container_width_xxxl', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("4K / Ultra HD (2560px and above)", "havenlytics"),
    id: "hvnly_container_width_4k",
    value: settings.hvnly_container_width_4k,
    options: containerWidthOptions,
    onChange: value => handleInputChange('hvnly_container_width_4k', value)
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_5__["default"], {
    onSave: handleSave,
    onReset: handleReset,
    showToast: showToast,
    saveLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Save Properties Settings", "havenlytics"),
    resetLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Reset Changes", "havenlytics")
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PropertiesSettings);

/***/ }),

/***/ "./src/settings/components/Content/TabSections/PropertyDetailsSettings.js":
/*!********************************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/PropertyDetailsSettings.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Card_Card__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Card/Card */ "./src/settings/components/Card/Card.js");
/* harmony import */ var _FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../FormElements/TabActionButtons/TabActionButtons */ "./src/settings/components/FormElements/TabActionButtons/TabActionButtons.js");
/* harmony import */ var _FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../FormElements/ToggleSwitch/ToggleSwitch */ "./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.js");
/* harmony import */ var _TabSections_module_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TabSections.module.css */ "./src/settings/components/Content/TabSections/TabSections.module.css");







const PropertyDetailsSettings = ({
  onSave,
  onReset,
  settingsData,
  onSettingsChange,
  showToast
}) => {
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    // User Experience Settings
    hvnly_EnableBreadcrumbs: true,
    hvnly_EnableBackToTop: true,
    hvnly_EnablePrintButton: true,
    hvnly_EnableSaveProperty: true,
    hvnly_EnableShareButton: true
  });

  // Load settings from props when available
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (settingsData && typeof settingsData === 'object' && Object.keys(settingsData).length > 0) {
      const updatedSettings = {
        hvnly_EnableBreadcrumbs: settingsData.hvnly_EnableBreadcrumbs !== undefined ? settingsData.hvnly_EnableBreadcrumbs : settings.hvnly_EnableBreadcrumbs,
        hvnly_EnableBackToTop: settingsData.hvnly_EnableBackToTop !== undefined ? settingsData.hvnly_EnableBackToTop : settings.hvnly_EnableBackToTop,
        hvnly_EnablePrintButton: settingsData.hvnly_EnablePrintButton !== undefined ? settingsData.hvnly_EnablePrintButton : settings.hvnly_EnablePrintButton,
        hvnly_EnableSaveProperty: settingsData.hvnly_EnableSaveProperty !== undefined ? settingsData.hvnly_EnableSaveProperty : settings.hvnly_EnableSaveProperty,
        hvnly_EnableShareButton: settingsData.hvnly_EnableShareButton !== undefined ? settingsData.hvnly_EnableShareButton : settings.hvnly_EnableShareButton
      };
      setSettings(prev => ({
        ...prev,
        ...updatedSettings
      }));
    }
  }, [settingsData]);

  // Handle individual toggle changes
  const handleInputChange = (field, value) => {
    const newSettings = {
      ...settings,
      [field]: value
    };
    setSettings(newSettings);

    // Notify parent component of changes
    if (onSettingsChange && typeof onSettingsChange === 'function') {
      onSettingsChange(newSettings);
    }
  };

  // Handle save action
  const handleSave = async () => {
    if (onSave && typeof onSave === 'function') {
      const result = await onSave(settings);
      return result === true || result === undefined;
    }
    return false;
  };

  // Handle reset action
  const handleReset = async () => {
    // Default settings as defined in DefaultSettingsData.php and SettingsSchema.php
    const defaultSettings = {
      hvnly_EnableBreadcrumbs: true,
      hvnly_EnableBackToTop: true,
      hvnly_EnablePrintButton: true,
      hvnly_EnableSaveProperty: true,
      hvnly_EnableShareButton: true
    };
    setSettings(defaultSettings);

    // Notify parent component of reset
    if (onSettingsChange && typeof onSettingsChange === 'function') {
      onSettingsChange(defaultSettings);
    }

    // Call parent reset handler
    if (onReset && typeof onReset === 'function') {
      await onReset();
      return true;
    }
    return false;
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_6__["default"]['hvnly-settings-api__content']} ${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_6__["default"]['hvnly-settings-api__content--active']}`,
    id: "property-details"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Single Property Page', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: "hvnly-settings-description"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Configure the display and functionality of your single property pages.', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("User Experience Settings", "havenlytics"),
    icon: "fas fa-user-friends",
    collapsible: true,
    defaultExpanded: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-field-group"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_5__["default"], {
    id: "hvnly_EnableBreadcrumbs",
    checked: settings.hvnly_EnableBreadcrumbs === true || settings.hvnly_EnableBreadcrumbs === 'true' || settings.hvnly_EnableBreadcrumbs === 1,
    onChange: checked => handleInputChange('hvnly_EnableBreadcrumbs', checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Breadcrumbs Navigation", "havenlytics")
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: "hvnly-field-description"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Display breadcrumb navigation to help users navigate back to property listings.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-field-group"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_5__["default"], {
    id: "hvnly_EnableBackToTop",
    checked: settings.hvnly_EnableBackToTop === true || settings.hvnly_EnableBackToTop === 'true' || settings.hvnly_EnableBackToTop === 1,
    onChange: checked => handleInputChange('hvnly_EnableBackToTop', checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Back to Top Button", "havenlytics")
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: "hvnly-field-description"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Show a "Back to Top" button that appears when users scroll down the page.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-field-group"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_5__["default"], {
    id: "hvnly_EnablePrintButton",
    checked: settings.hvnly_EnablePrintButton === true || settings.hvnly_EnablePrintButton === 'true' || settings.hvnly_EnablePrintButton === 1,
    onChange: checked => handleInputChange('hvnly_EnablePrintButton', checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Print Button on Property Pages", "havenlytics")
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: "hvnly-field-description"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Allow users to print property details directly from the property page.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-field-group"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_5__["default"], {
    id: "hvnly_EnableSaveProperty",
    checked: settings.hvnly_EnableSaveProperty === true || settings.hvnly_EnableSaveProperty === 'true' || settings.hvnly_EnableSaveProperty === 1,
    onChange: checked => handleInputChange('hvnly_EnableSaveProperty', checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Save Property Button", "havenlytics")
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: "hvnly-field-description"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Allow registered users to save properties to their favorites list.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-field-group"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_5__["default"], {
    id: "hvnly_EnableShareButton",
    checked: settings.hvnly_EnableShareButton === true || settings.hvnly_EnableShareButton === 'true' || settings.hvnly_EnableShareButton === 1,
    onChange: checked => handleInputChange('hvnly_EnableShareButton', checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Share Button", "havenlytics")
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: "hvnly-field-description"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Allow users to share properties on social media platforms.', 'havenlytics')))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_4__["default"], {
    onSave: handleSave,
    onReset: handleReset,
    showToast: showToast,
    saveLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Save Property Details Settings", "havenlytics"),
    resetLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Reset to Defaults", "havenlytics")
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PropertyDetailsSettings);

/***/ }),

/***/ "./src/settings/components/Content/TabSections/SearchSettings.js":
/*!***********************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/SearchSettings.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Card_Card__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Card/Card */ "./src/settings/components/Card/Card.js");
/* harmony import */ var _FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../FormElements/TabActionButtons/TabActionButtons */ "./src/settings/components/FormElements/TabActionButtons/TabActionButtons.js");
/* harmony import */ var _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TabSections.module.css */ "./src/settings/components/Content/TabSections/TabSections.module.css");






const SearchSettings = ({
  onSave,
  onReset,
  settingsData,
  onSettingsChange,
  showToast
}) => {
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    hvnly_searchResultsPerPage: 12,
    hvnly_enableAjaxSearch: true,
    hvnly_searchPlaceholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search properties...', 'havenlytics'),
    hvnly_enableLocationSearch: true,
    hvnly_searchRadius: 25
  });
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (settingsData && Object.keys(settingsData).length > 0) {
      setSettings(prev => ({
        ...prev,
        ...settingsData
      }));
    }
  }, [settingsData]);
  const handleInputChange = (field, value) => {
    const newSettings = {
      ...settings,
      [field]: value
    };
    setSettings(newSettings);
    if (onSettingsChange) {
      onSettingsChange(newSettings);
    }
  };
  const handleSave = async () => {
    if (onSave) {
      await onSave(settings);
      return true;
    }
    return false;
  };
  const handleReset = async () => {
    const defaultSettings = {
      hvnly_searchResultsPerPage: 12,
      hvnly_enableAjaxSearch: true,
      hvnly_searchPlaceholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search properties...', 'havenlytics'),
      hvnly_enableLocationSearch: true,
      hvnly_searchRadius: 25
    };
    setSettings(defaultSettings);
    if (onSettingsChange) {
      onSettingsChange(defaultSettings);
    }
    if (onReset) {
      await onReset();
      return true;
    }
    return false;
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__content']} ${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__content--active']}`,
    id: "search"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search Settings', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Search Configuration", "havenlytics"),
    icon: "fas fa-search",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__form-label']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Search Results Per Page", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "number",
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__form-control'],
    value: settings.hvnly_searchResultsPerPage,
    onChange: e => handleInputChange('hvnly_searchResultsPerPage', parseInt(e.target.value)),
    min: "1",
    max: "100",
    id: "hvnly_searchResultsPerPage"
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__form-label']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Search Placeholder Text", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "text",
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__form-control'],
    value: settings.hvnly_searchPlaceholder,
    onChange: e => handleInputChange('hvnly_searchPlaceholder', e.target.value),
    placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enter placeholder text...", "havenlytics"),
    id: "hvnly_searchPlaceholder"
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__form-label']
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Search Radius (km)", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "number",
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__form-control'],
    value: settings.hvnly_searchRadius,
    onChange: e => handleInputChange('hvnly_searchRadius', parseInt(e.target.value)),
    min: "1",
    max: "500",
    id: "hvnly_searchRadius"
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_4__["default"], {
    onSave: handleSave,
    onReset: handleReset,
    showToast: showToast,
    saveLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Save Search Settings", "havenlytics"),
    resetLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Reset Changes", "havenlytics")
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchSettings);

/***/ }),

/***/ "./src/settings/components/Content/TabSections/ShortcodesSettings.js":
/*!***************************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/ShortcodesSettings.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Card_Card__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Card/Card */ "./src/settings/components/Card/Card.js");
/* harmony import */ var _FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../FormElements/CopyShortcodeInput/CopyShortcodeInput */ "./src/settings/components/FormElements/CopyShortcodeInput/CopyShortcodeInput.jsx");
/* harmony import */ var _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TabSections.module.css */ "./src/settings/components/Content/TabSections/TabSections.module.css");






const ShortcodesSettings = ({
  onSave,
  onReset,
  settingsData,
  onSettingsChange,
  showToast
}) => {
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    hvnly_propertySearch: "[hvnly_property_search]",
    hvnly_propertyGrid: "[hvnly_property_grid]",
    hvnly_propertyLists: "[hvnly_property_lists]",
    // Property Grid Variations
    hvnly_propertyGridColumns2: "[hvnly_property_grid columns='2']",
    hvnly_propertyGridColumns3: "[hvnly_property_grid columns='3']",
    hvnly_propertyGridColumns4: "[hvnly_property_grid columns='4']",
    hvnly_propertyGridColumns5: "[hvnly_property_grid columns='5']",
    hvnly_propertyGridColumns6: "[hvnly_property_grid columns='6']",
    hvnly_propertyGridFeatured: "[hvnly_property_grid featured_only='yes']",
    hvnly_propertyGridRent: "[hvnly_property_grid department='rent']",
    hvnly_propertyGridSale: "[hvnly_property_grid department='sale']",
    hvnly_propertyGridCommercial: "[hvnly_property_grid department='commercial']",
    hvnly_propertyGridLet: "[hvnly_property_grid department='let']",
    hvnly_propertyGridFeaturedRent: "[hvnly_property_grid department='rent' featured_only='yes']",
    hvnly_propertyGridFeaturedSale: "[hvnly_property_grid department='sale' featured_only='yes']",
    hvnly_propertyGridPriceRangeRent: "[hvnly_property_grid department='rent' min_price='200000' max_price='500000']",
    hvnly_propertyGridPriceRangeSale: "[hvnly_property_grid department='sale' min_price='500000' max_price='1000000']",
    hvnly_propertyGridBedrooms: "[hvnly_property_grid department='rent' bedrooms='3']",
    hvnly_propertyGridBedroomsSale: "[hvnly_property_grid department='sale' bedrooms='4']",
    hvnly_propertyGridBedroomsFeatured: "[hvnly_property_grid department='rent' bedrooms='2' featured_only='yes']",
    hvnly_propertyGridBathrooms: "[hvnly_property_grid department='rent' bathrooms='2']",
    hvnly_propertyGridBathroomsSale: "[hvnly_property_grid department='sale' bathrooms='3']",
    hvnly_propertyGridReceptionRooms: "[hvnly_property_grid department='rent' reception_rooms='2']",
    hvnly_propertyGridMultipleFilters: "[hvnly_property_grid department='rent' bedrooms='3' bathrooms='2' featured_only='yes']",
    hvnly_propertyGridMultipleFiltersSale: "[hvnly_property_grid department='sale' bedrooms='4' bathrooms='3' min_price='500000']",
    hvnly_propertyGridPropertyTypeApartment: "[hvnly_property_grid property_type='apartment' department='rent']",
    hvnly_propertyGridPropertyTypeHouse: "[hvnly_property_grid type='house' department='sale']",
    hvnly_propertyGridPropertyTypeCondo: "[hvnly_property_grid category='condo' department='rent']",
    hvnly_propertyGridLocationNY: "[hvnly_property_grid location='new-york' department='rent']",
    hvnly_propertyGridLocationLA: "[hvnly_property_grid location='los-angeles' department='sale']",
    hvnly_propertyGridStatusSale: "[hvnly_property_grid status='for-sale' department='sale']",
    hvnly_propertyGridStatusRent: "[hvnly_property_grid status='for-rent' department='rent']",
    hvnly_propertyGridFeaturePool: "[hvnly_property_grid feature='pool' department='rent']",
    hvnly_propertyGridFeaturesGarageGarden: "[hvnly_property_grid features='garage,garden' department='sale']",
    hvnly_propertyGridTagLuxury: "[hvnly_property_grid tag='luxury' department='rent']",
    hvnly_propertyGridTagsWaterfront: "[hvnly_property_grid tags='waterfront,new' department='sale']",
    hvnly_propertyGridBadgeFeatured: "[hvnly_property_grid badge='featured' department='rent']",
    hvnly_propertyGridBadgesNew: "[hvnly_property_grid badges='new,popular' department='sale']",
    hvnly_propertyGridAreaSqft: "[hvnly_property_grid department='rent' sqft='1500']",
    hvnly_propertyGridArea: "[hvnly_property_grid department='sale' area='2000']",
    hvnly_propertyGridGarage: "[hvnly_property_grid department='rent' garage='2']",
    hvnly_propertyGridYearBuilt: "[hvnly_property_grid department='rent' year_built='2020']",
    hvnly_propertyGridPostsPerPage10: "[hvnly_property_grid department='rent' posts_per_page='10']",
    hvnly_propertyGridPostsPerPage15: "[hvnly_property_grid department='sale' posts_per_page='15']",
    hvnly_propertyGridSpecificIds: "[hvnly_property_grid ids='PR-2025-00000001,PR-2025-00000005']",
    hvnly_propertyGridExcludeIds: "[hvnly_property_grid department='rent' exclude='PR-2025-00000003']",
    hvnly_propertyGridOrderByPriceLow: "[hvnly_property_grid department='rent' orderby='price_low']",
    hvnly_propertyGridOrderByPriceHigh: "[hvnly_property_grid department='sale' orderby='price_high']",
    hvnly_propertyGridOrderByDateAsc: "[hvnly_property_grid department='rent' orderby='date_asc']",
    hvnly_propertyGridOrderByDateDesc: "[hvnly_property_grid department='rent' orderby='date_desc']",
    hvnly_propertyGridOrderByTitleAsc: "[hvnly_property_grid department='rent' orderby='title_asc']",
    hvnly_propertyGridOrderByTitleDesc: "[hvnly_property_grid department='rent' orderby='title_desc']",
    hvnly_propertyGridOrderByBedrooms: "[hvnly_property_grid department='rent' orderby='bedrooms']",
    hvnly_propertyGridOrderByBathrooms: "[hvnly_property_grid department='rent' orderby='bathrooms']",
    hvnly_propertyGridOrderByArea: "[hvnly_property_grid department='rent' orderby='area']",
    hvnly_propertyGridOrderByRand: "[hvnly_property_grid department='rent' orderby='rand']",
    hvnly_propertyGridHidePagination: "[hvnly_property_grid department='rent' show_pagination='no' posts_per_page='5']",
    hvnly_propertyGridCustomClass: "[hvnly_property_grid department='rent' class='my-custom-grid' id='rent-properties']",
    hvnly_propertyGridResultsBarTop: "[hvnly_property_grid department='rent' results_bar_position='top']",
    hvnly_propertyGridResultsBarBottom: "[hvnly_property_grid department='rent' results_bar_position='bottom']",
    hvnly_propertyGridResultsBarBoth: "[hvnly_property_grid department='rent' results_bar_position='both']",
    hvnly_propertyGridHideResultsCount: "[hvnly_property_grid department='rent' show_results_count='no']",
    // Property List Variations
    hvnly_propertyListBasic: "[hvnly_property_list]",
    hvnly_propertyListFeatured: "[hvnly_property_list featured_only='yes']",
    hvnly_propertyListRent: "[hvnly_property_list department='rent']",
    hvnly_propertyListSale: "[hvnly_property_list department='sale']",
    hvnly_propertyListCommercial: "[hvnly_property_list department='commercial']",
    hvnly_propertyListLet: "[hvnly_property_list department='let']",
    hvnly_propertyListFeaturedRent: "[hvnly_property_list department='rent' featured_only='yes']",
    hvnly_propertyListFeaturedSale: "[hvnly_property_list department='sale' featured_only='yes']",
    hvnly_propertyListPriceRangeRent: "[hvnly_property_list department='rent' min_price='200000' max_price='500000']",
    hvnly_propertyListPriceRangeSale: "[hvnly_property_list department='sale' min_price='500000' max_price='1000000']",
    hvnly_propertyListBedrooms: "[hvnly_property_list department='rent' bedrooms='3']",
    hvnly_propertyListBedroomsSale: "[hvnly_property_list department='sale' bedrooms='4']",
    hvnly_propertyListBedroomsFeatured: "[hvnly_property_list department='rent' bedrooms='2' featured_only='yes']",
    hvnly_propertyListBathrooms: "[hvnly_property_list department='rent' bathrooms='2']",
    hvnly_propertyListBathroomsSale: "[hvnly_property_list department='sale' bathrooms='3']",
    hvnly_propertyListMultipleFilters: "[hvnly_property_list department='rent' bedrooms='3' bathrooms='2' featured_only='yes']",
    hvnly_propertyListMultipleFiltersSale: "[hvnly_property_list department='sale' bedrooms='4' bathrooms='3' min_price='500000']",
    hvnly_propertyListPropertyTypeApartment: "[hvnly_property_list property_type='apartment' department='rent']",
    hvnly_propertyListPropertyTypeHouse: "[hvnly_property_list type='house' department='sale']",
    hvnly_propertyListPropertyTypeCondo: "[hvnly_property_list category='condo' department='rent']",
    hvnly_propertyListLocationNY: "[hvnly_property_list location='new-york' department='rent']",
    hvnly_propertyListLocationLA: "[hvnly_property_list location='los-angeles' department='sale']",
    hvnly_propertyListStatusSale: "[hvnly_property_list status='for-sale' department='sale']",
    hvnly_propertyListStatusRent: "[hvnly_property_list status='for-rent' department='rent']",
    hvnly_propertyListFeaturePool: "[hvnly_property_list feature='pool' department='rent']",
    hvnly_propertyListFeaturesGarageGarden: "[hvnly_property_list features='garage,garden' department='sale']",
    hvnly_propertyListTagLuxury: "[hvnly_property_list tag='luxury' department='rent']",
    hvnly_propertyListTagsWaterfront: "[hvnly_property_list tags='waterfront,new' department='sale']",
    hvnly_propertyListBadgeFeatured: "[hvnly_property_list badge='featured' department='rent']",
    hvnly_propertyListBadgesNew: "[hvnly_property_list badges='new,popular' department='sale']",
    hvnly_propertyListAreaSqft: "[hvnly_property_list department='rent' sqft='1500']",
    hvnly_propertyListArea: "[hvnly_property_list department='sale' area='2000']",
    hvnly_propertyListGarage: "[hvnly_property_list department='rent' garage='2']",
    hvnly_propertyListYearBuilt: "[hvnly_property_list department='rent' year_built='2020']",
    hvnly_propertyListPostsPerPage10: "[hvnly_property_list department='rent' posts_per_page='10']",
    hvnly_propertyListPostsPerPage15: "[hvnly_property_list department='sale' posts_per_page='15']",
    hvnly_propertyListSpecificIds: "[hvnly_property_list ids='PR-2025-00000001,PR-2025-00000005']",
    hvnly_propertyListExcludeIds: "[hvnly_property_list department='rent' exclude='PR-2025-00000003']",
    hvnly_propertyListOrderByPriceLow: "[hvnly_property_list department='rent' orderby='price_low']",
    hvnly_propertyListOrderByPriceHigh: "[hvnly_property_list department='sale' orderby='price_high']",
    hvnly_propertyListOrderByDateAsc: "[hvnly_property_list department='rent' orderby='date_asc']",
    hvnly_propertyListOrderByDateDesc: "[hvnly_property_list department='rent' orderby='date_desc']",
    hvnly_propertyListOrderByTitleAsc: "[hvnly_property_list department='rent' orderby='title_asc']",
    hvnly_propertyListOrderByTitleDesc: "[hvnly_property_list department='rent' orderby='title_desc']",
    hvnly_propertyListOrderByBedrooms: "[hvnly_property_list department='rent' orderby='bedrooms']",
    hvnly_propertyListOrderByBathrooms: "[hvnly_property_list department='rent' orderby='bathrooms']",
    hvnly_propertyListOrderByArea: "[hvnly_property_list department='rent' orderby='area']",
    hvnly_propertyListOrderByRand: "[hvnly_property_list department='rent' orderby='rand']",
    hvnly_propertyListHidePagination: "[hvnly_property_list department='rent' show_pagination='no' posts_per_page='5']",
    hvnly_propertyListCustomClass: "[hvnly_property_list department='rent' class='my-custom-list' id='rent-properties']",
    hvnly_propertyListResultsBarTop: "[hvnly_property_list department='rent' results_bar_position='top']",
    hvnly_propertyListResultsBarBottom: "[hvnly_property_list department='rent' results_bar_position='bottom']",
    hvnly_propertyListResultsBarBoth: "[hvnly_property_list department='rent' results_bar_position='both']",
    hvnly_propertyListHideResultsCount: "[hvnly_property_list department='rent' show_results_count='no']"
  });
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (settingsData && Object.keys(settingsData).length > 0) {
      setSettings(prev => ({
        ...prev,
        ...settingsData
      }));
    }
  }, [settingsData]);
  const handleInputChange = (field, value) => {
    const newSettings = {
      ...settings,
      [field]: value
    };
    setSettings(newSettings);
    if (onSettingsChange) {
      onSettingsChange(newSettings);
    }
  };
  const handleSave = async () => {
    if (onSave) {
      await onSave(settings);
      return true;
    }
    return false;
  };
  const handleReset = async () => {
    const defaultSettings = {
      hvnly_propertySearch: "[hvnly_property_search]",
      hvnly_propertyGrid: "[hvnly_property_grid]",
      hvnly_propertyLists: "[hvnly_property_lists]",
      // Property Grid Variations
      hvnly_propertyGridColumns2: "[hvnly_property_grid columns='2']",
      hvnly_propertyGridColumns3: "[hvnly_property_grid columns='3']",
      hvnly_propertyGridColumns4: "[hvnly_property_grid columns='4']",
      hvnly_propertyGridColumns5: "[hvnly_property_grid columns='5']",
      hvnly_propertyGridColumns6: "[hvnly_property_grid columns='6']",
      hvnly_propertyGridFeatured: "[hvnly_property_grid featured_only='yes']",
      hvnly_propertyGridRent: "[hvnly_property_grid department='rent']",
      hvnly_propertyGridSale: "[hvnly_property_grid department='sale']",
      hvnly_propertyGridCommercial: "[hvnly_property_grid department='commercial']",
      hvnly_propertyGridLet: "[hvnly_property_grid department='let']",
      hvnly_propertyGridFeaturedRent: "[hvnly_property_grid department='rent' featured_only='yes']",
      hvnly_propertyGridFeaturedSale: "[hvnly_property_grid department='sale' featured_only='yes']",
      hvnly_propertyGridPriceRangeRent: "[hvnly_property_grid department='rent' min_price='200000' max_price='500000']",
      hvnly_propertyGridPriceRangeSale: "[hvnly_property_grid department='sale' min_price='500000' max_price='1000000']",
      hvnly_propertyGridBedrooms: "[hvnly_property_grid department='rent' bedrooms='3']",
      hvnly_propertyGridBedroomsSale: "[hvnly_property_grid department='sale' bedrooms='4']",
      hvnly_propertyGridBedroomsFeatured: "[hvnly_property_grid department='rent' bedrooms='2' featured_only='yes']",
      hvnly_propertyGridBathrooms: "[hvnly_property_grid department='rent' bathrooms='2']",
      hvnly_propertyGridBathroomsSale: "[hvnly_property_grid department='sale' bathrooms='3']",
      hvnly_propertyGridReceptionRooms: "[hvnly_property_grid department='rent' reception_rooms='2']",
      hvnly_propertyGridMultipleFilters: "[hvnly_property_grid department='rent' bedrooms='3' bathrooms='2' featured_only='yes']",
      hvnly_propertyGridMultipleFiltersSale: "[hvnly_property_grid department='sale' bedrooms='4' bathrooms='3' min_price='500000']",
      hvnly_propertyGridPropertyTypeApartment: "[hvnly_property_grid property_type='apartment' department='rent']",
      hvnly_propertyGridPropertyTypeHouse: "[hvnly_property_grid type='house' department='sale']",
      hvnly_propertyGridPropertyTypeCondo: "[hvnly_property_grid category='condo' department='rent']",
      hvnly_propertyGridLocationNY: "[hvnly_property_grid location='new-york' department='rent']",
      hvnly_propertyGridLocationLA: "[hvnly_property_grid location='los-angeles' department='sale']",
      hvnly_propertyGridStatusSale: "[hvnly_property_grid status='for-sale' department='sale']",
      hvnly_propertyGridStatusRent: "[hvnly_property_grid status='for-rent' department='rent']",
      hvnly_propertyGridFeaturePool: "[hvnly_property_grid feature='pool' department='rent']",
      hvnly_propertyGridFeaturesGarageGarden: "[hvnly_property_grid features='garage,garden' department='sale']",
      hvnly_propertyGridTagLuxury: "[hvnly_property_grid tag='luxury' department='rent']",
      hvnly_propertyGridTagsWaterfront: "[hvnly_property_grid tags='waterfront,new' department='sale']",
      hvnly_propertyGridBadgeFeatured: "[hvnly_property_grid badge='featured' department='rent']",
      hvnly_propertyGridBadgesNew: "[hvnly_property_grid badges='new,popular' department='sale']",
      hvnly_propertyGridAreaSqft: "[hvnly_property_grid department='rent' sqft='1500']",
      hvnly_propertyGridArea: "[hvnly_property_grid department='sale' area='2000']",
      hvnly_propertyGridGarage: "[hvnly_property_grid department='rent' garage='2']",
      hvnly_propertyGridYearBuilt: "[hvnly_property_grid department='rent' year_built='2020']",
      hvnly_propertyGridPostsPerPage10: "[hvnly_property_grid department='rent' posts_per_page='10']",
      hvnly_propertyGridPostsPerPage15: "[hvnly_property_grid department='sale' posts_per_page='15']",
      hvnly_propertyGridSpecificIds: "[hvnly_property_grid ids='PR-2025-00000001,PR-2025-00000005']",
      hvnly_propertyGridExcludeIds: "[hvnly_property_grid department='rent' exclude='PR-2025-00000003']",
      hvnly_propertyGridOrderByPriceLow: "[hvnly_property_grid department='rent' orderby='price_low']",
      hvnly_propertyGridOrderByPriceHigh: "[hvnly_property_grid department='sale' orderby='price_high']",
      hvnly_propertyGridOrderByDateAsc: "[hvnly_property_grid department='rent' orderby='date_asc']",
      hvnly_propertyGridOrderByDateDesc: "[hvnly_property_grid department='rent' orderby='date_desc']",
      hvnly_propertyGridOrderByTitleAsc: "[hvnly_property_grid department='rent' orderby='title_asc']",
      hvnly_propertyGridOrderByTitleDesc: "[hvnly_property_grid department='rent' orderby='title_desc']",
      hvnly_propertyGridOrderByBedrooms: "[hvnly_property_grid department='rent' orderby='bedrooms']",
      hvnly_propertyGridOrderByBathrooms: "[hvnly_property_grid department='rent' orderby='bathrooms']",
      hvnly_propertyGridOrderByArea: "[hvnly_property_grid department='rent' orderby='area']",
      hvnly_propertyGridOrderByRand: "[hvnly_property_grid department='rent' orderby='rand']",
      hvnly_propertyGridHidePagination: "[hvnly_property_grid department='rent' show_pagination='no' posts_per_page='5']",
      hvnly_propertyGridCustomClass: "[hvnly_property_grid department='rent' class='my-custom-grid' id='rent-properties']",
      hvnly_propertyGridResultsBarTop: "[hvnly_property_grid department='rent' results_bar_position='top']",
      hvnly_propertyGridResultsBarBottom: "[hvnly_property_grid department='rent' results_bar_position='bottom']",
      hvnly_propertyGridResultsBarBoth: "[hvnly_property_grid department='rent' results_bar_position='both']",
      hvnly_propertyGridHideResultsCount: "[hvnly_property_grid department='rent' show_results_count='no']",
      // Property List Variations
      hvnly_propertyListBasic: "[hvnly_property_list]",
      hvnly_propertyListFeatured: "[hvnly_property_list featured_only='yes']",
      hvnly_propertyListRent: "[hvnly_property_list department='rent']",
      hvnly_propertyListSale: "[hvnly_property_list department='sale']",
      hvnly_propertyListCommercial: "[hvnly_property_list department='commercial']",
      hvnly_propertyListLet: "[hvnly_property_list department='let']",
      hvnly_propertyListFeaturedRent: "[hvnly_property_list department='rent' featured_only='yes']",
      hvnly_propertyListFeaturedSale: "[hvnly_property_list department='sale' featured_only='yes']",
      hvnly_propertyListPriceRangeRent: "[hvnly_property_list department='rent' min_price='200000' max_price='500000']",
      hvnly_propertyListPriceRangeSale: "[hvnly_property_list department='sale' min_price='500000' max_price='1000000']",
      hvnly_propertyListBedrooms: "[hvnly_property_list department='rent' bedrooms='3']",
      hvnly_propertyListBedroomsSale: "[hvnly_property_list department='sale' bedrooms='4']",
      hvnly_propertyListBedroomsFeatured: "[hvnly_property_list department='rent' bedrooms='2' featured_only='yes']",
      hvnly_propertyListBathrooms: "[hvnly_property_list department='rent' bathrooms='2']",
      hvnly_propertyListBathroomsSale: "[hvnly_property_list department='sale' bathrooms='3']",
      hvnly_propertyListMultipleFilters: "[hvnly_property_list department='rent' bedrooms='3' bathrooms='2' featured_only='yes']",
      hvnly_propertyListMultipleFiltersSale: "[hvnly_property_list department='sale' bedrooms='4' bathrooms='3' min_price='500000']",
      hvnly_propertyListPropertyTypeApartment: "[hvnly_property_list property_type='apartment' department='rent']",
      hvnly_propertyListPropertyTypeHouse: "[hvnly_property_list type='house' department='sale']",
      hvnly_propertyListPropertyTypeCondo: "[hvnly_property_list category='condo' department='rent']",
      hvnly_propertyListLocationNY: "[hvnly_property_list location='new-york' department='rent']",
      hvnly_propertyListLocationLA: "[hvnly_property_list location='los-angeles' department='sale']",
      hvnly_propertyListStatusSale: "[hvnly_property_list status='for-sale' department='sale']",
      hvnly_propertyListStatusRent: "[hvnly_property_list status='for-rent' department='rent']",
      hvnly_propertyListFeaturePool: "[hvnly_property_list feature='pool' department='rent']",
      hvnly_propertyListFeaturesGarageGarden: "[hvnly_property_list features='garage,garden' department='sale']",
      hvnly_propertyListTagLuxury: "[hvnly_property_list tag='luxury' department='rent']",
      hvnly_propertyListTagsWaterfront: "[hvnly_property_list tags='waterfront,new' department='sale']",
      hvnly_propertyListBadgeFeatured: "[hvnly_property_list badge='featured' department='rent']",
      hvnly_propertyListBadgesNew: "[hvnly_property_list badges='new,popular' department='sale']",
      hvnly_propertyListAreaSqft: "[hvnly_property_list department='rent' sqft='1500']",
      hvnly_propertyListArea: "[hvnly_property_list department='sale' area='2000']",
      hvnly_propertyListGarage: "[hvnly_property_list department='rent' garage='2']",
      hvnly_propertyListYearBuilt: "[hvnly_property_list department='rent' year_built='2020']",
      hvnly_propertyListPostsPerPage10: "[hvnly_property_list department='rent' posts_per_page='10']",
      hvnly_propertyListPostsPerPage15: "[hvnly_property_list department='sale' posts_per_page='15']",
      hvnly_propertyListSpecificIds: "[hvnly_property_list ids='PR-2025-00000001,PR-2025-00000005']",
      hvnly_propertyListExcludeIds: "[hvnly_property_list department='rent' exclude='PR-2025-00000003']",
      hvnly_propertyListOrderByPriceLow: "[hvnly_property_list department='rent' orderby='price_low']",
      hvnly_propertyListOrderByPriceHigh: "[hvnly_property_list department='sale' orderby='price_high']",
      hvnly_propertyListOrderByDateAsc: "[hvnly_property_list department='rent' orderby='date_asc']",
      hvnly_propertyListOrderByDateDesc: "[hvnly_property_list department='rent' orderby='date_desc']",
      hvnly_propertyListOrderByTitleAsc: "[hvnly_property_list department='rent' orderby='title_asc']",
      hvnly_propertyListOrderByTitleDesc: "[hvnly_property_list department='rent' orderby='title_desc']",
      hvnly_propertyListOrderByBedrooms: "[hvnly_property_list department='rent' orderby='bedrooms']",
      hvnly_propertyListOrderByBathrooms: "[hvnly_property_list department='rent' orderby='bathrooms']",
      hvnly_propertyListOrderByArea: "[hvnly_property_list department='rent' orderby='area']",
      hvnly_propertyListOrderByRand: "[hvnly_property_list department='rent' orderby='rand']",
      hvnly_propertyListHidePagination: "[hvnly_property_list department='rent' show_pagination='no' posts_per_page='5']",
      hvnly_propertyListCustomClass: "[hvnly_property_list department='rent' class='my-custom-list' id='rent-properties']",
      hvnly_propertyListResultsBarTop: "[hvnly_property_list department='rent' results_bar_position='top']",
      hvnly_propertyListResultsBarBottom: "[hvnly_property_list department='rent' results_bar_position='bottom']",
      hvnly_propertyListResultsBarBoth: "[hvnly_property_list department='rent' results_bar_position='both']",
      hvnly_propertyListHideResultsCount: "[hvnly_property_list department='rent' show_results_count='no']"
    };
    setSettings(defaultSettings);
    if (onSettingsChange) {
      onSettingsChange(defaultSettings);
    }
    if (onReset) {
      await onReset();
      return true;
    }
    return false;
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__content']} ${_TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__content--active']}`,
    id: "shortcodes"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Shortcodes', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Basic Shortcodes", "havenlytics"),
    icon: "fas fa-code",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Property Search Shortcode", "havenlytics"),
    id: "hvnly_shortcode_property_search",
    value: settings.hvnly_propertySearch,
    onChange: val => handleInputChange("hvnly_propertySearch", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Property Grid Shortcode", "havenlytics"),
    id: "hvnly_shortcode_property_grid",
    value: settings.hvnly_propertyGrid,
    onChange: val => handleInputChange("hvnly_propertyGrid", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Property Lists Shortcode", "havenlytics"),
    id: "hvnly_shortcode_property_lists",
    value: settings.hvnly_propertyLists,
    onChange: val => handleInputChange("hvnly_propertyLists", val)
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Property Grid Variations", "havenlytics"),
    icon: "fas fa-th",
    collapsible: true,
    defaultCollapsed: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Columns", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("2 Columns", "havenlytics"),
    id: "hvnly_shortcode_grid_columns_2",
    value: settings.hvnly_propertyGridColumns2,
    onChange: val => handleInputChange("hvnly_propertyGridColumns2", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("3 Columns", "havenlytics"),
    id: "hvnly_shortcode_grid_columns_3",
    value: settings.hvnly_propertyGridColumns3,
    onChange: val => handleInputChange("hvnly_propertyGridColumns3", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("4 Columns", "havenlytics"),
    id: "hvnly_shortcode_grid_columns_4",
    value: settings.hvnly_propertyGridColumns4,
    onChange: val => handleInputChange("hvnly_propertyGridColumns4", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("5 Columns", "havenlytics"),
    id: "hvnly_shortcode_grid_columns_5",
    value: settings.hvnly_propertyGridColumns5,
    onChange: val => handleInputChange("hvnly_propertyGridColumns5", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("6 Columns", "havenlytics"),
    id: "hvnly_shortcode_grid_columns_6",
    value: settings.hvnly_propertyGridColumns6,
    onChange: val => handleInputChange("hvnly_propertyGridColumns6", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Featured Properties", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Featured Only", "havenlytics"),
    id: "hvnly_shortcode_grid_featured",
    value: settings.hvnly_propertyGridFeatured,
    onChange: val => handleInputChange("hvnly_propertyGridFeatured", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Department Filters", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent", "havenlytics"),
    id: "hvnly_shortcode_grid_rent",
    value: settings.hvnly_propertyGridRent,
    onChange: val => handleInputChange("hvnly_propertyGridRent", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale", "havenlytics"),
    id: "hvnly_shortcode_grid_sale",
    value: settings.hvnly_propertyGridSale,
    onChange: val => handleInputChange("hvnly_propertyGridSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Commercial", "havenlytics"),
    id: "hvnly_shortcode_grid_commercial",
    value: settings.hvnly_propertyGridCommercial,
    onChange: val => handleInputChange("hvnly_propertyGridCommercial", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Let", "havenlytics"),
    id: "hvnly_shortcode_grid_let",
    value: settings.hvnly_propertyGridLet,
    onChange: val => handleInputChange("hvnly_propertyGridLet", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Featured + Department", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Featured Rent", "havenlytics"),
    id: "hvnly_shortcode_grid_featured_rent",
    value: settings.hvnly_propertyGridFeaturedRent,
    onChange: val => handleInputChange("hvnly_propertyGridFeaturedRent", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Featured Sale", "havenlytics"),
    id: "hvnly_shortcode_grid_featured_sale",
    value: settings.hvnly_propertyGridFeaturedSale,
    onChange: val => handleInputChange("hvnly_propertyGridFeaturedSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Price Range", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent ($200k - $500k)", "havenlytics"),
    id: "hvnly_shortcode_grid_price_range_rent",
    value: settings.hvnly_propertyGridPriceRangeRent,
    onChange: val => handleInputChange("hvnly_propertyGridPriceRangeRent", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale ($500k - $1M)", "havenlytics"),
    id: "hvnly_shortcode_grid_price_range_sale",
    value: settings.hvnly_propertyGridPriceRangeSale,
    onChange: val => handleInputChange("hvnly_propertyGridPriceRangeSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Bedrooms Filter", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - 3 Bedrooms", "havenlytics"),
    id: "hvnly_shortcode_grid_bedrooms",
    value: settings.hvnly_propertyGridBedrooms,
    onChange: val => handleInputChange("hvnly_propertyGridBedrooms", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale - 4 Bedrooms", "havenlytics"),
    id: "hvnly_shortcode_grid_bedrooms_sale",
    value: settings.hvnly_propertyGridBedroomsSale,
    onChange: val => handleInputChange("hvnly_propertyGridBedroomsSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - 2 Bedrooms Featured", "havenlytics"),
    id: "hvnly_shortcode_grid_bedrooms_featured",
    value: settings.hvnly_propertyGridBedroomsFeatured,
    onChange: val => handleInputChange("hvnly_propertyGridBedroomsFeatured", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Bathrooms Filter", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - 2 Bathrooms", "havenlytics"),
    id: "hvnly_shortcode_grid_bathrooms",
    value: settings.hvnly_propertyGridBathrooms,
    onChange: val => handleInputChange("hvnly_propertyGridBathrooms", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale - 3 Bathrooms", "havenlytics"),
    id: "hvnly_shortcode_grid_bathrooms_sale",
    value: settings.hvnly_propertyGridBathroomsSale,
    onChange: val => handleInputChange("hvnly_propertyGridBathroomsSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Reception Rooms", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - 2 Reception Rooms", "havenlytics"),
    id: "hvnly_shortcode_grid_reception_rooms",
    value: settings.hvnly_propertyGridReceptionRooms,
    onChange: val => handleInputChange("hvnly_propertyGridReceptionRooms", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Multiple Filters", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent: 3 Bed, 2 Bath, Featured", "havenlytics"),
    id: "hvnly_shortcode_grid_multiple_filters",
    value: settings.hvnly_propertyGridMultipleFilters,
    onChange: val => handleInputChange("hvnly_propertyGridMultipleFilters", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale: 4 Bed, 3 Bath, Min $500k", "havenlytics"),
    id: "hvnly_shortcode_grid_multiple_filters_sale",
    value: settings.hvnly_propertyGridMultipleFiltersSale,
    onChange: val => handleInputChange("hvnly_propertyGridMultipleFiltersSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Property Type", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Apartment for Rent", "havenlytics"),
    id: "hvnly_shortcode_grid_property_type_apartment",
    value: settings.hvnly_propertyGridPropertyTypeApartment,
    onChange: val => handleInputChange("hvnly_propertyGridPropertyTypeApartment", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("House for Sale", "havenlytics"),
    id: "hvnly_shortcode_grid_property_type_house",
    value: settings.hvnly_propertyGridPropertyTypeHouse,
    onChange: val => handleInputChange("hvnly_propertyGridPropertyTypeHouse", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Condo for Rent", "havenlytics"),
    id: "hvnly_shortcode_grid_property_type_condo",
    value: settings.hvnly_propertyGridPropertyTypeCondo,
    onChange: val => handleInputChange("hvnly_propertyGridPropertyTypeCondo", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Location Filters", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("New York - Rent", "havenlytics"),
    id: "hvnly_shortcode_grid_location_ny",
    value: settings.hvnly_propertyGridLocationNY,
    onChange: val => handleInputChange("hvnly_propertyGridLocationNY", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Los Angeles - Sale", "havenlytics"),
    id: "hvnly_shortcode_grid_location_la",
    value: settings.hvnly_propertyGridLocationLA,
    onChange: val => handleInputChange("hvnly_propertyGridLocationLA", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Status Filters", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("For Sale", "havenlytics"),
    id: "hvnly_shortcode_grid_status_sale",
    value: settings.hvnly_propertyGridStatusSale,
    onChange: val => handleInputChange("hvnly_propertyGridStatusSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("For Rent", "havenlytics"),
    id: "hvnly_shortcode_grid_status_rent",
    value: settings.hvnly_propertyGridStatusRent,
    onChange: val => handleInputChange("hvnly_propertyGridStatusRent", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Features", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Pool - Rent", "havenlytics"),
    id: "hvnly_shortcode_grid_feature_pool",
    value: settings.hvnly_propertyGridFeaturePool,
    onChange: val => handleInputChange("hvnly_propertyGridFeaturePool", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Garage & Garden - Sale", "havenlytics"),
    id: "hvnly_shortcode_grid_features_garage_garden",
    value: settings.hvnly_propertyGridFeaturesGarageGarden,
    onChange: val => handleInputChange("hvnly_propertyGridFeaturesGarageGarden", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Tags", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Luxury - Rent", "havenlytics"),
    id: "hvnly_shortcode_grid_tag_luxury",
    value: settings.hvnly_propertyGridTagLuxury,
    onChange: val => handleInputChange("hvnly_propertyGridTagLuxury", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Waterfront & New - Sale", "havenlytics"),
    id: "hvnly_shortcode_grid_tags_waterfront",
    value: settings.hvnly_propertyGridTagsWaterfront,
    onChange: val => handleInputChange("hvnly_propertyGridTagsWaterfront", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Badges", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Featured - Rent", "havenlytics"),
    id: "hvnly_shortcode_grid_badge_featured",
    value: settings.hvnly_propertyGridBadgeFeatured,
    onChange: val => handleInputChange("hvnly_propertyGridBadgeFeatured", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("New & Popular - Sale", "havenlytics"),
    id: "hvnly_shortcode_grid_badges_new",
    value: settings.hvnly_propertyGridBadgesNew,
    onChange: val => handleInputChange("hvnly_propertyGridBadgesNew", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Area / Square Footage", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - 1500 sqft", "havenlytics"),
    id: "hvnly_shortcode_grid_area_sqft",
    value: settings.hvnly_propertyGridAreaSqft,
    onChange: val => handleInputChange("hvnly_propertyGridAreaSqft", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale - 2000 area", "havenlytics"),
    id: "hvnly_shortcode_grid_area",
    value: settings.hvnly_propertyGridArea,
    onChange: val => handleInputChange("hvnly_propertyGridArea", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Garage", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - 2 Garages", "havenlytics"),
    id: "hvnly_shortcode_grid_garage",
    value: settings.hvnly_propertyGridGarage,
    onChange: val => handleInputChange("hvnly_propertyGridGarage", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Year Built", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - Built 2020", "havenlytics"),
    id: "hvnly_shortcode_grid_year_built",
    value: settings.hvnly_propertyGridYearBuilt,
    onChange: val => handleInputChange("hvnly_propertyGridYearBuilt", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Posts Per Page", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - 10 per page", "havenlytics"),
    id: "hvnly_shortcode_grid_posts_per_page_10",
    value: settings.hvnly_propertyGridPostsPerPage10,
    onChange: val => handleInputChange("hvnly_propertyGridPostsPerPage10", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale - 15 per page", "havenlytics"),
    id: "hvnly_shortcode_grid_posts_per_page_15",
    value: settings.hvnly_propertyGridPostsPerPage15,
    onChange: val => handleInputChange("hvnly_propertyGridPostsPerPage15", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Specific Property IDs", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Include Specific Properties", "havenlytics"),
    id: "hvnly_shortcode_grid_specific_ids",
    value: settings.hvnly_propertyGridSpecificIds,
    onChange: val => handleInputChange("hvnly_propertyGridSpecificIds", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Exclude Property IDs", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Exclude Specific Properties", "havenlytics"),
    id: "hvnly_shortcode_grid_exclude_ids",
    value: settings.hvnly_propertyGridExcludeIds,
    onChange: val => handleInputChange("hvnly_propertyGridExcludeIds", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Custom Ordering", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Price: Low to High", "havenlytics"),
    id: "hvnly_shortcode_grid_order_price_low",
    value: settings.hvnly_propertyGridOrderByPriceLow,
    onChange: val => handleInputChange("hvnly_propertyGridOrderByPriceLow", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Price: High to Low", "havenlytics"),
    id: "hvnly_shortcode_grid_order_price_high",
    value: settings.hvnly_propertyGridOrderByPriceHigh,
    onChange: val => handleInputChange("hvnly_propertyGridOrderByPriceHigh", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Date: Oldest First", "havenlytics"),
    id: "hvnly_shortcode_grid_order_date_asc",
    value: settings.hvnly_propertyGridOrderByDateAsc,
    onChange: val => handleInputChange("hvnly_propertyGridOrderByDateAsc", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Date: Newest First", "havenlytics"),
    id: "hvnly_shortcode_grid_order_date_desc",
    value: settings.hvnly_propertyGridOrderByDateDesc,
    onChange: val => handleInputChange("hvnly_propertyGridOrderByDateDesc", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Title: A to Z", "havenlytics"),
    id: "hvnly_shortcode_grid_order_title_asc",
    value: settings.hvnly_propertyGridOrderByTitleAsc,
    onChange: val => handleInputChange("hvnly_propertyGridOrderByTitleAsc", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Title: Z to A", "havenlytics"),
    id: "hvnly_shortcode_grid_order_title_desc",
    value: settings.hvnly_propertyGridOrderByTitleDesc,
    onChange: val => handleInputChange("hvnly_propertyGridOrderByTitleDesc", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("By Bedrooms", "havenlytics"),
    id: "hvnly_shortcode_grid_order_bedrooms",
    value: settings.hvnly_propertyGridOrderByBedrooms,
    onChange: val => handleInputChange("hvnly_propertyGridOrderByBedrooms", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("By Bathrooms", "havenlytics"),
    id: "hvnly_shortcode_grid_order_bathrooms",
    value: settings.hvnly_propertyGridOrderByBathrooms,
    onChange: val => handleInputChange("hvnly_propertyGridOrderByBathrooms", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("By Area", "havenlytics"),
    id: "hvnly_shortcode_grid_order_area",
    value: settings.hvnly_propertyGridOrderByArea,
    onChange: val => handleInputChange("hvnly_propertyGridOrderByArea", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Random Order", "havenlytics"),
    id: "hvnly_shortcode_grid_order_rand",
    value: settings.hvnly_propertyGridOrderByRand,
    onChange: val => handleInputChange("hvnly_propertyGridOrderByRand", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Pagination", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Pagination", "havenlytics"),
    id: "hvnly_shortcode_grid_hide_pagination",
    value: settings.hvnly_propertyGridHidePagination,
    onChange: val => handleInputChange("hvnly_propertyGridHidePagination", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Custom Class & ID", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Custom CSS Class & ID", "havenlytics"),
    id: "hvnly_shortcode_grid_custom_class",
    value: settings.hvnly_propertyGridCustomClass,
    onChange: val => handleInputChange("hvnly_propertyGridCustomClass", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Results Bar Position", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Top", "havenlytics"),
    id: "hvnly_shortcode_grid_results_bar_top",
    value: settings.hvnly_propertyGridResultsBarTop,
    onChange: val => handleInputChange("hvnly_propertyGridResultsBarTop", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Bottom", "havenlytics"),
    id: "hvnly_shortcode_grid_results_bar_bottom",
    value: settings.hvnly_propertyGridResultsBarBottom,
    onChange: val => handleInputChange("hvnly_propertyGridResultsBarBottom", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Both", "havenlytics"),
    id: "hvnly_shortcode_grid_results_bar_both",
    value: settings.hvnly_propertyGridResultsBarBoth,
    onChange: val => handleInputChange("hvnly_propertyGridResultsBarBoth", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Results Count", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Results Count", "havenlytics"),
    id: "hvnly_shortcode_grid_hide_results_count",
    value: settings.hvnly_propertyGridHideResultsCount,
    onChange: val => handleInputChange("hvnly_propertyGridHideResultsCount", val)
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Property List Variations", "havenlytics"),
    icon: "fas fa-list",
    collapsible: true,
    defaultCollapsed: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _TabSections_module_css__WEBPACK_IMPORTED_MODULE_5__["default"]['hvnly-settings-api__form-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Basic List Views", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Basic List", "havenlytics"),
    id: "hvnly_shortcode_list_basic",
    value: settings.hvnly_propertyListBasic,
    onChange: val => handleInputChange("hvnly_propertyListBasic", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Featured Only", "havenlytics"),
    id: "hvnly_shortcode_list_featured",
    value: settings.hvnly_propertyListFeatured,
    onChange: val => handleInputChange("hvnly_propertyListFeatured", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Department Filters", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent", "havenlytics"),
    id: "hvnly_shortcode_list_rent",
    value: settings.hvnly_propertyListRent,
    onChange: val => handleInputChange("hvnly_propertyListRent", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale", "havenlytics"),
    id: "hvnly_shortcode_list_sale",
    value: settings.hvnly_propertyListSale,
    onChange: val => handleInputChange("hvnly_propertyListSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Commercial", "havenlytics"),
    id: "hvnly_shortcode_list_commercial",
    value: settings.hvnly_propertyListCommercial,
    onChange: val => handleInputChange("hvnly_propertyListCommercial", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Let", "havenlytics"),
    id: "hvnly_shortcode_list_let",
    value: settings.hvnly_propertyListLet,
    onChange: val => handleInputChange("hvnly_propertyListLet", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Featured + Department", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Featured Rent", "havenlytics"),
    id: "hvnly_shortcode_list_featured_rent",
    value: settings.hvnly_propertyListFeaturedRent,
    onChange: val => handleInputChange("hvnly_propertyListFeaturedRent", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Featured Sale", "havenlytics"),
    id: "hvnly_shortcode_list_featured_sale",
    value: settings.hvnly_propertyListFeaturedSale,
    onChange: val => handleInputChange("hvnly_propertyListFeaturedSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Price Range", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent ($200k - $500k)", "havenlytics"),
    id: "hvnly_shortcode_list_price_range_rent",
    value: settings.hvnly_propertyListPriceRangeRent,
    onChange: val => handleInputChange("hvnly_propertyListPriceRangeRent", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale ($500k - $1M)", "havenlytics"),
    id: "hvnly_shortcode_list_price_range_sale",
    value: settings.hvnly_propertyListPriceRangeSale,
    onChange: val => handleInputChange("hvnly_propertyListPriceRangeSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Bedrooms Filter", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - 3 Bedrooms", "havenlytics"),
    id: "hvnly_shortcode_list_bedrooms",
    value: settings.hvnly_propertyListBedrooms,
    onChange: val => handleInputChange("hvnly_propertyListBedrooms", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale - 4 Bedrooms", "havenlytics"),
    id: "hvnly_shortcode_list_bedrooms_sale",
    value: settings.hvnly_propertyListBedroomsSale,
    onChange: val => handleInputChange("hvnly_propertyListBedroomsSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - 2 Bedrooms Featured", "havenlytics"),
    id: "hvnly_shortcode_list_bedrooms_featured",
    value: settings.hvnly_propertyListBedroomsFeatured,
    onChange: val => handleInputChange("hvnly_propertyListBedroomsFeatured", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Bathrooms Filter", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - 2 Bathrooms", "havenlytics"),
    id: "hvnly_shortcode_list_bathrooms",
    value: settings.hvnly_propertyListBathrooms,
    onChange: val => handleInputChange("hvnly_propertyListBathrooms", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale - 3 Bathrooms", "havenlytics"),
    id: "hvnly_shortcode_list_bathrooms_sale",
    value: settings.hvnly_propertyListBathroomsSale,
    onChange: val => handleInputChange("hvnly_propertyListBathroomsSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Multiple Filters", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent: 3 Bed, 2 Bath, Featured", "havenlytics"),
    id: "hvnly_shortcode_list_multiple_filters",
    value: settings.hvnly_propertyListMultipleFilters,
    onChange: val => handleInputChange("hvnly_propertyListMultipleFilters", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale: 4 Bed, 3 Bath, Min $500k", "havenlytics"),
    id: "hvnly_shortcode_list_multiple_filters_sale",
    value: settings.hvnly_propertyListMultipleFiltersSale,
    onChange: val => handleInputChange("hvnly_propertyListMultipleFiltersSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Property Type", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Apartment for Rent", "havenlytics"),
    id: "hvnly_shortcode_list_property_type_apartment",
    value: settings.hvnly_propertyListPropertyTypeApartment,
    onChange: val => handleInputChange("hvnly_propertyListPropertyTypeApartment", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("House for Sale", "havenlytics"),
    id: "hvnly_shortcode_list_property_type_house",
    value: settings.hvnly_propertyListPropertyTypeHouse,
    onChange: val => handleInputChange("hvnly_propertyListPropertyTypeHouse", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Condo for Rent", "havenlytics"),
    id: "hvnly_shortcode_list_property_type_condo",
    value: settings.hvnly_propertyListPropertyTypeCondo,
    onChange: val => handleInputChange("hvnly_propertyListPropertyTypeCondo", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Location Filters", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("New York - Rent", "havenlytics"),
    id: "hvnly_shortcode_list_location_ny",
    value: settings.hvnly_propertyListLocationNY,
    onChange: val => handleInputChange("hvnly_propertyListLocationNY", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Los Angeles - Sale", "havenlytics"),
    id: "hvnly_shortcode_list_location_la",
    value: settings.hvnly_propertyListLocationLA,
    onChange: val => handleInputChange("hvnly_propertyListLocationLA", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Status Filters", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("For Sale", "havenlytics"),
    id: "hvnly_shortcode_list_status_sale",
    value: settings.hvnly_propertyListStatusSale,
    onChange: val => handleInputChange("hvnly_propertyListStatusSale", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("For Rent", "havenlytics"),
    id: "hvnly_shortcode_list_status_rent",
    value: settings.hvnly_propertyListStatusRent,
    onChange: val => handleInputChange("hvnly_propertyListStatusRent", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Features", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Pool - Rent", "havenlytics"),
    id: "hvnly_shortcode_list_feature_pool",
    value: settings.hvnly_propertyListFeaturePool,
    onChange: val => handleInputChange("hvnly_propertyListFeaturePool", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Garage & Garden - Sale", "havenlytics"),
    id: "hvnly_shortcode_list_features_garage_garden",
    value: settings.hvnly_propertyListFeaturesGarageGarden,
    onChange: val => handleInputChange("hvnly_propertyListFeaturesGarageGarden", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Tags", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Luxury - Rent", "havenlytics"),
    id: "hvnly_shortcode_list_tag_luxury",
    value: settings.hvnly_propertyListTagLuxury,
    onChange: val => handleInputChange("hvnly_propertyListTagLuxury", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Waterfront & New - Sale", "havenlytics"),
    id: "hvnly_shortcode_list_tags_waterfront",
    value: settings.hvnly_propertyListTagsWaterfront,
    onChange: val => handleInputChange("hvnly_propertyListTagsWaterfront", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Badges", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Featured - Rent", "havenlytics"),
    id: "hvnly_shortcode_list_badge_featured",
    value: settings.hvnly_propertyListBadgeFeatured,
    onChange: val => handleInputChange("hvnly_propertyListBadgeFeatured", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("New & Popular - Sale", "havenlytics"),
    id: "hvnly_shortcode_list_badges_new",
    value: settings.hvnly_propertyListBadgesNew,
    onChange: val => handleInputChange("hvnly_propertyListBadgesNew", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Area / Square Footage", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - 1500 sqft", "havenlytics"),
    id: "hvnly_shortcode_list_area_sqft",
    value: settings.hvnly_propertyListAreaSqft,
    onChange: val => handleInputChange("hvnly_propertyListAreaSqft", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale - 2000 area", "havenlytics"),
    id: "hvnly_shortcode_list_area",
    value: settings.hvnly_propertyListArea,
    onChange: val => handleInputChange("hvnly_propertyListArea", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Garage", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - 2 Garages", "havenlytics"),
    id: "hvnly_shortcode_list_garage",
    value: settings.hvnly_propertyListGarage,
    onChange: val => handleInputChange("hvnly_propertyListGarage", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Year Built", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - Built 2020", "havenlytics"),
    id: "hvnly_shortcode_list_year_built",
    value: settings.hvnly_propertyListYearBuilt,
    onChange: val => handleInputChange("hvnly_propertyListYearBuilt", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Posts Per Page", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rent - 10 per page", "havenlytics"),
    id: "hvnly_shortcode_list_posts_per_page_10",
    value: settings.hvnly_propertyListPostsPerPage10,
    onChange: val => handleInputChange("hvnly_propertyListPostsPerPage10", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Sale - 15 per page", "havenlytics"),
    id: "hvnly_shortcode_list_posts_per_page_15",
    value: settings.hvnly_propertyListPostsPerPage15,
    onChange: val => handleInputChange("hvnly_propertyListPostsPerPage15", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Specific Property IDs", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Include Specific Properties", "havenlytics"),
    id: "hvnly_shortcode_list_specific_ids",
    value: settings.hvnly_propertyListSpecificIds,
    onChange: val => handleInputChange("hvnly_propertyListSpecificIds", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Exclude Property IDs", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Exclude Specific Properties", "havenlytics"),
    id: "hvnly_shortcode_list_exclude_ids",
    value: settings.hvnly_propertyListExcludeIds,
    onChange: val => handleInputChange("hvnly_propertyListExcludeIds", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Custom Ordering", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Price: Low to High", "havenlytics"),
    id: "hvnly_shortcode_list_order_price_low",
    value: settings.hvnly_propertyListOrderByPriceLow,
    onChange: val => handleInputChange("hvnly_propertyListOrderByPriceLow", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Price: High to Low", "havenlytics"),
    id: "hvnly_shortcode_list_order_price_high",
    value: settings.hvnly_propertyListOrderByPriceHigh,
    onChange: val => handleInputChange("hvnly_propertyListOrderByPriceHigh", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Date: Oldest First", "havenlytics"),
    id: "hvnly_shortcode_list_order_date_asc",
    value: settings.hvnly_propertyListOrderByDateAsc,
    onChange: val => handleInputChange("hvnly_propertyListOrderByDateAsc", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Date: Newest First", "havenlytics"),
    id: "hvnly_shortcode_list_order_date_desc",
    value: settings.hvnly_propertyListOrderByDateDesc,
    onChange: val => handleInputChange("hvnly_propertyListOrderByDateDesc", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Title: A to Z", "havenlytics"),
    id: "hvnly_shortcode_list_order_title_asc",
    value: settings.hvnly_propertyListOrderByTitleAsc,
    onChange: val => handleInputChange("hvnly_propertyListOrderByTitleAsc", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Title: Z to A", "havenlytics"),
    id: "hvnly_shortcode_list_order_title_desc",
    value: settings.hvnly_propertyListOrderByTitleDesc,
    onChange: val => handleInputChange("hvnly_propertyListOrderByTitleDesc", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("By Bedrooms", "havenlytics"),
    id: "hvnly_shortcode_list_order_bedrooms",
    value: settings.hvnly_propertyListOrderByBedrooms,
    onChange: val => handleInputChange("hvnly_propertyListOrderByBedrooms", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("By Bathrooms", "havenlytics"),
    id: "hvnly_shortcode_list_order_bathrooms",
    value: settings.hvnly_propertyListOrderByBathrooms,
    onChange: val => handleInputChange("hvnly_propertyListOrderByBathrooms", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("By Area", "havenlytics"),
    id: "hvnly_shortcode_list_order_area",
    value: settings.hvnly_propertyListOrderByArea,
    onChange: val => handleInputChange("hvnly_propertyListOrderByArea", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Random Order", "havenlytics"),
    id: "hvnly_shortcode_list_order_rand",
    value: settings.hvnly_propertyListOrderByRand,
    onChange: val => handleInputChange("hvnly_propertyListOrderByRand", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Pagination", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Pagination", "havenlytics"),
    id: "hvnly_shortcode_list_hide_pagination",
    value: settings.hvnly_propertyListHidePagination,
    onChange: val => handleInputChange("hvnly_propertyListHidePagination", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Custom Class & ID", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Custom CSS Class & ID", "havenlytics"),
    id: "hvnly_shortcode_list_custom_class",
    value: settings.hvnly_propertyListCustomClass,
    onChange: val => handleInputChange("hvnly_propertyListCustomClass", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Results Bar Position", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Top", "havenlytics"),
    id: "hvnly_shortcode_list_results_bar_top",
    value: settings.hvnly_propertyListResultsBarTop,
    onChange: val => handleInputChange("hvnly_propertyListResultsBarTop", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Bottom", "havenlytics"),
    id: "hvnly_shortcode_list_results_bar_bottom",
    value: settings.hvnly_propertyListResultsBarBottom,
    onChange: val => handleInputChange("hvnly_propertyListResultsBarBottom", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Both", "havenlytics"),
    id: "hvnly_shortcode_list_results_bar_both",
    value: settings.hvnly_propertyListResultsBarBoth,
    onChange: val => handleInputChange("hvnly_propertyListResultsBarBoth", val)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Results Count", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CopyShortcodeInput_CopyShortcodeInput__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Results Count", "havenlytics"),
    id: "hvnly_shortcode_list_hide_results_count",
    value: settings.hvnly_propertyListHideResultsCount,
    onChange: val => handleInputChange("hvnly_propertyListHideResultsCount", val)
  }))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShortcodesSettings);

/***/ }),

/***/ "./src/settings/components/Content/TabSections/TabDropdown/CurrencySettings.js":
/*!*************************************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/TabDropdown/CurrencySettings.js ***!
  \*************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js");
/* harmony import */ var _Card_Card__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Card/Card */ "./src/settings/components/Card/Card.js");
/* harmony import */ var _FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../FormElements/InputGroup/InputGroup */ "./src/settings/components/FormElements/InputGroup/InputGroup.js");
/* harmony import */ var _FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../FormElements/SelectDropDown/SelectDropDown */ "./src/settings/components/FormElements/SelectDropDown/SelectDropDown.js");
/* harmony import */ var _FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../FormElements/TabActionButtons/TabActionButtons */ "./src/settings/components/FormElements/TabActionButtons/TabActionButtons.js");
/* harmony import */ var _FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../FormElements/ToggleSwitch/ToggleSwitch */ "./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.js");
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../utils/helpers */ "./src/settings/components/utils/helpers.js");
/* harmony import */ var _TabDropdown_css__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./TabDropdown.css */ "./src/settings/components/Content/TabSections/TabDropdown/TabDropdown.css");











const CurrencySettings = ({
  onSave,
  onReset,
  settingsData,
  onSettingsChange,
  showToast
}) => {
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    hvnly_EnabledCurrencyFormat: false,
    hvnly_thousandSeparator: ',',
    hvnly_decimalSeparator: '.',
    hvnly_numberOfDecimals: '0',
    hvnly_thousandText: 'K',
    hvnly_millionText: 'M',
    hvnly_billionText: 'B',
    hvnly_currencyType: 'USD',
    hvnly_currencyPositionType: 'LEFT',
    hvnly_priceOnCallText: 'priceOnCallNone',
    hvnly_priceFormat: 'comma'
  });
  const [allOptions, setAllOptions] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
  const [isLoadingOptions, setIsLoadingOptions] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const [showCustomForm, setShowCustomForm] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const [newCustomLabel, setNewCustomLabel] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('');
  const [editingOption, setEditingOption] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null);
  const [isDeleting, setIsDeleting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const API_BASE = window.HavenlyticsData?.hvnlyNabApi?.url || '/wp-json/hvnlynab/v1';
  const API_NONCE = window.HavenlyticsData?.hvnlyNabApi?.nonce || '';
  const loadAllOptions = async () => {
    setIsLoadingOptions(true);
    try {
      const response = await axios__WEBPACK_IMPORTED_MODULE_3__["default"].get(`${API_BASE}/price-on-call-texts`, {
        headers: {
          'X-WP-Nonce': API_NONCE
        }
      });
      if (response.data?.success && response.data?.data) {
        setAllOptions(response.data.data);
      }
    } catch (error) {
      console.error('Failed to load options:', error);
    } finally {
      setIsLoadingOptions(false);
    }
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    loadAllOptions();
  }, []);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (settingsData && typeof settingsData === 'object' && Object.keys(settingsData).length > 0) {
      setSettings(prev => ({
        ...prev,
        ...settingsData
      }));
    }
  }, [settingsData]);
  const handleInputChange = (field, value) => {
    const newSettings = {
      ...settings,
      [field]: value
    };
    setSettings(newSettings);
    if (onSettingsChange) {
      onSettingsChange(newSettings);
    }
  };
  const getPriceOnCallOptions = () => {
    return allOptions.map(opt => ({
      value: opt.value,
      label: opt.label,
      id: opt.id,
      isDefault: opt.is_default === 1 || opt.is_default === '1'
    }));
  };

  // UPDATED: Removed auto-selection of the newly created option
  const handleCreateCustomOption = async () => {
    if (!newCustomLabel.trim()) {
      showToast?.('warning', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Warning', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Please enter a label', 'havenlytics'));
      return;
    }
    setIsLoadingOptions(true);
    try {
      const response = await axios__WEBPACK_IMPORTED_MODULE_3__["default"].post(`${API_BASE}/price-on-call-texts`, {
        label: newCustomLabel.trim()
      }, {
        headers: {
          'X-WP-Nonce': API_NONCE,
          'Content-Type': 'application/json'
        }
      });
      if (response.data?.success) {
        await loadAllOptions();

        // REMOVED: Auto-select the newly created option
        // Just show success message and reset form
        setNewCustomLabel('');
        setShowCustomForm(false);
        setEditingOption(null);
        showToast?.('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Success', 'havenlytics'), response.data.message);
      } else {
        showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), response.data?.message || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to create option', 'havenlytics'));
      }
    } catch (error) {
      const message = error.response?.data?.message || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to create custom option', 'havenlytics');
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), message);
    } finally {
      setIsLoadingOptions(false);
    }
  };
  const handleUpdateCustomOption = async () => {
    if (!editingOption || !newCustomLabel.trim()) {
      return;
    }
    const oldValue = editingOption.value;
    const wasSelected = settings.hvnly_priceOnCallText === oldValue;
    setIsLoadingOptions(true);
    try {
      const response = await (0,axios__WEBPACK_IMPORTED_MODULE_3__["default"])({
        method: 'put',
        url: `${API_BASE}/price-on-call-texts/${editingOption.id}`,
        data: {
          label: newCustomLabel.trim()
        },
        headers: {
          'X-WP-Nonce': API_NONCE,
          'Content-Type': 'application/json'
        }
      });
      if (response.data?.success) {
        await loadAllOptions();

        // If this option was selected, update the selection to the new value
        if (wasSelected && response.data.data?.value) {
          handleInputChange('hvnly_priceOnCallText', response.data.data.value);
        }
        setEditingOption(null);
        setNewCustomLabel('');
        setShowCustomForm(false);
        showToast?.('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Success', 'havenlytics'), response.data.message);
      } else {
        showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), response.data?.message || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to update option', 'havenlytics'));
      }
    } catch (error) {
      console.error('Update error:', error);
      const message = error.response?.data?.message || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to update custom option', 'havenlytics');
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), message);
    } finally {
      setIsLoadingOptions(false);
    }
  };
  const handleDeleteCustomOption = async (optionId, optionLabel, optionValue) => {
    const wasSelected = settings.hvnly_priceOnCallText === optionValue;
    if (window.HvnlyNabAlert) {
      const result = await window.HvnlyNabAlert.confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Are you sure you want to delete "%s"? This cannot be undone.', 'havenlytics'), optionLabel), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Delete Custom Option?', 'havenlytics'));
      if (result !== 'confirm') {
        return;
      }
    } else {
      if (!confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Are you sure you want to delete "%s"?', 'havenlytics'), optionLabel))) {
        return;
      }
    }
    setIsDeleting(true);
    try {
      const response = await (0,axios__WEBPACK_IMPORTED_MODULE_3__["default"])({
        method: 'delete',
        url: `${API_BASE}/price-on-call-texts/${optionId}`,
        headers: {
          'X-WP-Nonce': API_NONCE
        }
      });
      if (response.data?.success === true) {
        await loadAllOptions();

        // If the deleted option was selected, reset to "None"
        if (wasSelected) {
          handleInputChange('hvnly_priceOnCallText', 'priceOnCallNone');
        }
        showToast?.('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Success', 'havenlytics'), response.data.message);
      } else {
        showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), response.data?.message || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to delete option', 'havenlytics'));
      }
    } catch (error) {
      console.error('Delete error:', error);
      let errorMessage = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to delete custom option', 'havenlytics');
      if (error.response?.data?.message) {
        errorMessage = error.response.data.message;
      } else if (error.response?.status === 403) {
        errorMessage = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Default options cannot be deleted', 'havenlytics');
      }
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), errorMessage);
    } finally {
      setIsDeleting(false);
    }
  };

  // Helper function to sanitize title (same as PHP sanitize_title)
  const sanitizeTitle = text => {
    return text.toLowerCase().replace(/[^a-z0-9\s-]/g, '').replace(/\s+/g, '-').replace(/-+/g, '-');
  };
  const startEditing = option => {
    setEditingOption(option);
    setNewCustomLabel(option.label);
    setShowCustomForm(true);
  };
  const cancelCustomForm = () => {
    setEditingOption(null);
    setNewCustomLabel('');
    setShowCustomForm(false);
  };
  const handleSave = async () => {
    if (onSave) {
      await onSave(settings);
      return true;
    }
    return false;
  };
  const handleReset = async () => {
    const defaultSettings = {
      hvnly_EnabledCurrencyFormat: false,
      hvnly_thousandSeparator: ',',
      hvnly_decimalSeparator: '.',
      hvnly_numberOfDecimals: '0',
      hvnly_thousandText: 'K',
      hvnly_millionText: 'M',
      hvnly_billionText: 'B',
      hvnly_currencyType: 'USD',
      hvnly_currencyPositionType: 'LEFT',
      hvnly_priceOnCallText: 'priceOnCallNone',
      hvnly_priceFormat: 'comma'
    };
    setSettings(defaultSettings);
    if (onSettingsChange) {
      onSettingsChange(defaultSettings);
    }
    if (onReset) {
      await onReset(defaultSettings);
      return true;
    }
    return false;
  };
  const currencyOptions = _utils_helpers__WEBPACK_IMPORTED_MODULE_9__.currencyData;
  const currencyPositionOptions = [{
    value: 'LEFT',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Left', 'havenlytics')
  }, {
    value: 'RIGHT',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Right', 'havenlytics')
  }];
  const formatOptions = [{
    value: 'comma',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('1,000.00 (Comma separator)', 'havenlytics')
  }, {
    value: 'dot',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('1.000,00 (Dot separator)', 'havenlytics')
  }, {
    value: 'space',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('1 000.00 (Space separator)', 'havenlytics')
  }];
  const priceOnCallOptions = getPriceOnCallOptions();

  // Filter only user-created options (not default ones)
  const userCreatedOptions = allOptions.filter(opt => {
    const isDefault = parseInt(opt.is_default) === 1;
    return !isDefault;
  });
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__content hvnly-settings-api__content--active",
    id: "currency"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Currency', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_4__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Currency Options", "havenlytics"),
    icon: "fas fa-dollar-sign",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_6__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Select Currency", "havenlytics"),
    id: "hvnly_currencyType",
    value: settings.hvnly_currencyType,
    options: currencyOptions,
    onChange: value => handleInputChange('hvnly_currencyType', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_6__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Currency Position", "havenlytics"),
    id: "hvnly_currencyPositionType",
    value: settings.hvnly_currencyPositionType,
    options: currencyPositionOptions,
    onChange: value => handleInputChange('hvnly_currencyPositionType', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_6__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Price on call Text", "havenlytics"),
    id: "hvnly_priceOnCallText",
    value: settings.hvnly_priceOnCallText,
    options: priceOnCallOptions,
    onChange: value => handleInputChange('hvnly_priceOnCallText', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-custom-options-management",
    style: {
      marginTop: '15px',
      marginBottom: '15px',
      padding: '15px',
      background: 'var(--hvnly-color-bg-light)',
      borderRadius: 'var(--hvnly-border-radius-md)',
      border: '1px solid var(--hvnly-border-color)'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      display: 'flex',
      justifyContent: 'space-between',
      alignItems: 'center',
      marginBottom: '10px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", {
    style: {
      margin: 0,
      fontSize: '14px',
      fontWeight: '600',
      color: 'var(--hvnly-text-primary)'
    }
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Manage Custom Options', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    type: "button",
    className: "hvnly-settings-api__modern-btn hvnly-settings-api__modern-btn--outline",
    onClick: () => {
      setShowCustomForm(!showCustomForm);
      if (!showCustomForm) {
        setEditingOption(null);
        setNewCustomLabel('');
      }
    },
    style: {
      fontSize: '12px',
      padding: '5px 12px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-plus"
  }), showCustomForm ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cancel', 'havenlytics') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add Custom', 'havenlytics'))), showCustomForm && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-custom-option-form",
    style: {
      marginTop: '10px',
      padding: '12px',
      background: 'var(--hvnly-color-bg-white)',
      borderRadius: 'var(--hvnly-border-radius-sm)'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_5__["default"], {
    label: editingOption ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Edit Label', 'havenlytics') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('New Custom Label', 'havenlytics'),
    id: "custom_price_on_call_label",
    type: "text",
    value: newCustomLabel,
    onChange: value => setNewCustomLabel(value),
    placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('e.g., Contact Agent, Negotiable, Upon Request', 'havenlytics')
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      display: 'flex',
      gap: '10px',
      marginTop: '10px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    type: "button",
    className: "hvnly-settings-api__modern-btn hvnly-settings-api__modern-btn--primary",
    onClick: editingOption ? handleUpdateCustomOption : handleCreateCustomOption,
    disabled: isLoadingOptions || !newCustomLabel.trim(),
    style: {
      fontSize: '13px',
      padding: '8px 16px'
    }
  }, isLoadingOptions ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-spinner fa-spin"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Saving...', 'havenlytics')) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, editingOption ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Update', 'havenlytics') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Create', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    type: "button",
    className: "hvnly-settings-api__modern-btn hvnly-settings-api__modern-btn--secondary",
    onClick: cancelCustomForm,
    style: {
      fontSize: '13px',
      padding: '8px 16px'
    }
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cancel', 'havenlytics')))), userCreatedOptions.length > 0 && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      marginTop: '15px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      display: 'flex',
      flexDirection: 'column',
      gap: '8px'
    }
  }, userCreatedOptions.map(option => {
    const isSelected = settings.hvnly_priceOnCallText === option.value;
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: option.id,
      style: {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'space-between',
        padding: '8px 12px',
        background: isSelected ? 'rgba(108, 96, 254, 0.1)' : 'var(--hvnly-color-bg-white)',
        border: `1px solid ${isSelected ? 'var(--hvnly-brand-primary)' : 'var(--hvnly-border-color)'}`,
        borderRadius: 'var(--hvnly-border-radius-sm)'
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      style: {
        fontWeight: isSelected ? '600' : '500',
        color: isSelected ? 'var(--hvnly-brand-primary)' : 'var(--hvnly-text-primary)'
      }
    }, option.label, isSelected && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      style: {
        marginLeft: '8px',
        fontSize: '10px',
        color: 'var(--hvnly-brand-primary)',
        fontWeight: 'normal'
      }
    }, "(", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Selected', 'havenlytics'), ")")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      style: {
        fontSize: '11px',
        color: 'var(--hvnly-text-secondary)',
        marginLeft: '8px'
      }
    }, "(", option.value, ")")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      style: {
        display: 'flex',
        gap: '8px'
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "button-link",
      onClick: () => startEditing(option),
      style: {
        color: 'var(--hvnly-brand-primary)',
        textDecoration: 'none',
        cursor: 'pointer',
        background: 'none',
        border: 'none',
        padding: '4px 8px',
        borderRadius: 'var(--hvnly-border-radius-sm)',
        transition: 'all var(--hvnly-transition-time)'
      },
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Edit', 'havenlytics')
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-edit"
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "button-link",
      onClick: () => handleDeleteCustomOption(option.id, option.label, option.value),
      disabled: isDeleting,
      style: {
        color: 'var(--hvnly-brand-error)',
        textDecoration: 'none',
        cursor: 'pointer',
        background: 'none',
        border: 'none',
        padding: '4px 8px',
        borderRadius: 'var(--hvnly-border-radius-sm)',
        transition: 'all var(--hvnly-transition-time)'
      },
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Delete', 'havenlytics')
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-trash-alt"
    }))));
  }))), userCreatedOptions.length === 0 && !showCustomForm && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    style: {
      margin: '10px 0 0 0',
      fontSize: '12px',
      color: 'var(--hvnly-text-secondary)',
      fontStyle: 'italic'
    }
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('No custom options yet. Click "Add Custom" to create one.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_6__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Price Format", "havenlytics"),
    id: "hvnly_priceFormat",
    value: settings.hvnly_priceFormat,
    options: formatOptions,
    onChange: value => handleInputChange('hvnly_priceFormat', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_5__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Thousand Separator", "havenlytics"),
    id: "hvnly_thousandSeparator",
    type: "text",
    value: settings.hvnly_thousandSeparator,
    onChange: value => handleInputChange("hvnly_thousandSeparator", value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_5__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Decimal Separator", "havenlytics"),
    id: "hvnly_decimalSeparator",
    type: "text",
    value: settings.hvnly_decimalSeparator,
    onChange: value => handleInputChange("hvnly_decimalSeparator", value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_5__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Number of Decimals", "havenlytics"),
    id: "hvnly_numberOfDecimals",
    type: "text",
    value: settings.hvnly_numberOfDecimals,
    onChange: value => handleInputChange("hvnly_numberOfDecimals", value)
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_4__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Currency Thousand/Million/Billion Format", "havenlytics"),
    icon: "fas fa-chart-line",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_5__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Thousand Text - K or Thousand", "havenlytics"),
    id: "hvnly_thousandText",
    type: "text",
    value: settings.hvnly_thousandText,
    onChange: value => handleInputChange("hvnly_thousandText", value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_5__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Million Text - M or Million", "havenlytics"),
    id: "hvnly_millionText",
    type: "text",
    value: settings.hvnly_millionText,
    onChange: value => handleInputChange("hvnly_millionText", value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_5__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Billion Text - B or Billion", "havenlytics"),
    id: "hvnly_billionText",
    type: "text",
    value: settings.hvnly_billionText,
    onChange: value => handleInputChange("hvnly_billionText", value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_8__["default"], {
    id: "hvnly_EnabledCurrencyFormat",
    checked: settings.hvnly_EnabledCurrencyFormat,
    onChange: checked => handleInputChange('hvnly_EnabledCurrencyFormat', checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Currency Text Format", "havenlytics")
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_7__["default"], {
    onSave: handleSave,
    onReset: handleReset,
    showToast: showToast,
    saveLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Save Currency Settings", "havenlytics"),
    resetLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Reset Changes", "havenlytics")
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CurrencySettings);

/***/ }),

/***/ "./src/settings/components/Content/TabSections/TabDropdown/MiscSettingsSettings.js":
/*!*****************************************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/TabDropdown/MiscSettingsSettings.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Card_Card__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Card/Card */ "./src/settings/components/Card/Card.js");
/* harmony import */ var _FormElements_CheckboxGroup_CheckboxGroup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../FormElements/CheckboxGroup/CheckboxGroup */ "./src/settings/components/FormElements/CheckboxGroup/CheckboxGroup.js");
/* harmony import */ var _FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../FormElements/TabActionButtons/TabActionButtons */ "./src/settings/components/FormElements/TabActionButtons/TabActionButtons.js");
/* harmony import */ var _FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../FormElements/ToggleSwitch/ToggleSwitch */ "./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.js");
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/helpers */ "./src/settings/components/utils/helpers.js");
/* harmony import */ var _TabDropdown_module_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./TabDropdown.module.css */ "./src/settings/components/Content/TabSections/TabDropdown/TabDropdown.module.css");









const MiscSettingsSettings = ({
  onSave,
  onReset,
  settingsData,
  onSettingsChange,
  showToast
}) => {
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    // Editor Settings
    hvnly_EnabledGutenbergEditor: false,
    // Social Share
    hvnly_EnabledSocialShare: true,
    hvnly_enableSocialShare: ['facebook', 'twitter', 'linkedin', 'pinterest', 'email', 'whatsapp', 'telegram', 'reddit', 'tumblr', 'viber', 'line', 'copy_link'],
    // Location Defaults
    hvnly_defaultCity: 'Birmingham',
    hvnly_defaultState: 'Scotland',
    hvnly_countryType: 'GB',
    hvnly_defaultZipCode: '',
    hvnly_defaultNeighborhood: ''
  });

  // Load settings from props when available
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (settingsData && typeof settingsData === 'object' && Object.keys(settingsData).length > 0) {
      const miscFields = {
        hvnly_EnabledGutenbergEditor: settingsData.hvnly_EnabledGutenbergEditor !== undefined ? settingsData.hvnly_EnabledGutenbergEditor : settings.hvnly_EnabledGutenbergEditor,
        hvnly_EnabledSocialShare: settingsData.hvnly_EnabledSocialShare !== undefined ? settingsData.hvnly_EnabledSocialShare : settings.hvnly_EnabledSocialShare,
        hvnly_enableSocialShare: settingsData.hvnly_enableSocialShare !== undefined ? settingsData.hvnly_enableSocialShare : settings.hvnly_enableSocialShare,
        hvnly_defaultCity: settingsData.hvnly_defaultCity !== undefined ? settingsData.hvnly_defaultCity : settings.hvnly_defaultCity,
        hvnly_defaultState: settingsData.hvnly_defaultState !== undefined ? settingsData.hvnly_defaultState : settings.hvnly_defaultState,
        hvnly_countryType: settingsData.hvnly_countryType !== undefined ? settingsData.hvnly_countryType : settings.hvnly_countryType,
        hvnly_defaultZipCode: settingsData.hvnly_defaultZipCode !== undefined ? settingsData.hvnly_defaultZipCode : settings.hvnly_defaultZipCode,
        hvnly_defaultNeighborhood: settingsData.hvnly_defaultNeighborhood !== undefined ? settingsData.hvnly_defaultNeighborhood : settings.hvnly_defaultNeighborhood
      };
      setSettings(prev => ({
        ...prev,
        ...miscFields
      }));
    }
  }, [settingsData]);
  const handleInputChange = (field, value) => {
    const newSettings = {
      ...settings,
      [field]: value
    };
    setSettings(newSettings);
    if (onSettingsChange) {
      onSettingsChange(newSettings);
    }
  };
  const handleSave = async () => {
    if (onSave) {
      await onSave(settings);
      return true;
    }
    return false;
  };
  const handleReset = async () => {
    const defaultSettings = {
      hvnly_EnabledGutenbergEditor: false,
      hvnly_EnabledSocialShare: true,
      hvnly_enableSocialShare: ['facebook', 'twitter', 'linkedin', 'pinterest', 'email', 'whatsapp'],
      hvnly_defaultCity: 'Birmingham',
      hvnly_defaultState: 'Scotland',
      hvnly_countryType: 'GB',
      hvnly_defaultZipCode: '',
      hvnly_defaultNeighborhood: ''
    };
    setSettings(defaultSettings);
    if (onSettingsChange) {
      onSettingsChange(defaultSettings);
    }
    if (onReset) {
      await onReset(defaultSettings);
      return true;
    }
    return false;
  };
  const countryOptions = _utils_helpers__WEBPACK_IMPORTED_MODULE_7__.countriesData;
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `${_TabDropdown_module_css__WEBPACK_IMPORTED_MODULE_8__["default"]['hvnly-settings-api__content']} ${_TabDropdown_module_css__WEBPACK_IMPORTED_MODULE_8__["default"]['hvnly-settings-api__content--active']}`,
    id: "misc-settings"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Misc Settings', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Editor Settings", "havenlytics"),
    icon: "fas fa-edit",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_EnabledGutenbergEditor",
    checked: settings.hvnly_EnabledGutenbergEditor,
    onChange: checked => handleInputChange('hvnly_EnabledGutenbergEditor', checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Gutenberg Editor for Properties", "havenlytics")
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Social Share", "havenlytics"),
    icon: "fas fa-share-alt",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_6__["default"], {
    id: "hvnly_EnabledSocialShare",
    checked: settings.hvnly_EnabledSocialShare,
    onChange: checked => handleInputChange('hvnly_EnabledSocialShare', checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Social Share Buttons", "havenlytics")
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_CheckboxGroup_CheckboxGroup__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable Social Share Platforms", "havenlytics"),
    options: [{
      value: 'facebook',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Facebook', 'havenlytics')
    }, {
      value: 'twitter',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Twitter/X', 'havenlytics')
    }, {
      value: 'linkedin',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('LinkedIn', 'havenlytics')
    }, {
      value: 'pinterest',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Pinterest', 'havenlytics')
    }, {
      value: 'email',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Email', 'havenlytics')
    }, {
      value: 'whatsapp',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('WhatsApp', 'havenlytics')
    }, {
      value: 'telegram',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Telegram', 'havenlytics')
    }, {
      value: 'reddit',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Reddit', 'havenlytics')
    }, {
      value: 'tumblr',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Tumblr', 'havenlytics')
    }, {
      value: 'viber',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Viber', 'havenlytics')
    }, {
      value: 'line',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Line', 'havenlytics')
    }, {
      value: 'copy_link',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Copy Link', 'havenlytics')
    }],
    selectedValues: settings.hvnly_enableSocialShare,
    onChange: values => handleInputChange('hvnly_enableSocialShare', values)
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_5__["default"], {
    onSave: handleSave,
    onReset: handleReset,
    showToast: showToast,
    saveLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Save Misc Settings", "havenlytics"),
    resetLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Reset Changes", "havenlytics")
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MiscSettingsSettings);

/***/ }),

/***/ "./src/settings/components/Content/TabSections/TabDropdown/SearchPropertyResultSettings.js":
/*!*************************************************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/TabDropdown/SearchPropertyResultSettings.js ***!
  \*************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Card_Card__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Card/Card */ "./src/settings/components/Card/Card.js");
/* harmony import */ var _FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../FormElements/InputGroup/InputGroup */ "./src/settings/components/FormElements/InputGroup/InputGroup.js");
/* harmony import */ var _FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../FormElements/SelectDropDown/SelectDropDown */ "./src/settings/components/FormElements/SelectDropDown/SelectDropDown.js");
/* harmony import */ var _FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../FormElements/TabActionButtons/TabActionButtons */ "./src/settings/components/FormElements/TabActionButtons/TabActionButtons.js");
/* harmony import */ var _FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../FormElements/ToggleSwitch/ToggleSwitch */ "./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.js");
/* harmony import */ var _TabDropdown_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./TabDropdown.css */ "./src/settings/components/Content/TabSections/TabDropdown/TabDropdown.css");









const SearchPropertyResultSettings = ({
  onSave,
  onReset,
  settingsData,
  onSettingsChange,
  showToast
}) => {
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    hvnly_hideTopSearchTitle: false,
    hvnly_hideTopSearchBar: false,
    hvnly_hideLeftSearchBar: false,
    hvnly_numberOfColumns: '3',
    hvnly_searchResultPerpage: '6',
    hvnly_sidebarLayoutType: 'LEFT'
  });
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (settingsData && typeof settingsData === 'object' && Object.keys(settingsData).length > 0) {
      const searchResultFields = {
        hvnly_hideTopSearchTitle: settingsData.hvnly_hideTopSearchTitle !== undefined ? settingsData.hvnly_hideTopSearchTitle : settings.hvnly_hideTopSearchTitle,
        hvnly_hideTopSearchBar: settingsData.hvnly_hideTopSearchBar !== undefined ? settingsData.hvnly_hideTopSearchBar : settings.hvnly_hideTopSearchBar,
        hvnly_hideLeftSearchBar: settingsData.hvnly_hideLeftSearchBar !== undefined ? settingsData.hvnly_hideLeftSearchBar : settings.hvnly_hideLeftSearchBar,
        hvnly_numberOfColumns: settingsData.hvnly_numberOfColumns !== undefined ? settingsData.hvnly_numberOfColumns : settings.hvnly_numberOfColumns,
        hvnly_searchResultPerpage: settingsData.hvnly_searchResultPerpage !== undefined ? settingsData.hvnly_searchResultPerpage : settings.hvnly_searchResultPerpage,
        hvnly_sidebarLayoutType: settingsData.hvnly_sidebarLayoutType !== undefined ? settingsData.hvnly_sidebarLayoutType : settings.hvnly_sidebarLayoutType
      };
      setSettings(prev => ({
        ...prev,
        ...searchResultFields
      }));
    }
  }, [settingsData]);
  const handleInputChange = (field, value) => {
    const newSettings = {
      ...settings,
      [field]: value
    };
    setSettings(newSettings);
    if (onSettingsChange) {
      onSettingsChange(newSettings);
    }
  };
  const handleSave = async () => {
    if (onSave) {
      await onSave(settings);
      return true;
    }
    return false;
  };
  const handleReset = async () => {
    const defaultSettings = {
      hvnly_hideTopSearchTitle: false,
      hvnly_hideTopSearchBar: false,
      hvnly_hideLeftSearchBar: false,
      hvnly_numberOfColumns: '3',
      hvnly_searchResultPerpage: '6',
      hvnly_sidebarLayoutType: 'LEFT'
    };
    setSettings(defaultSettings);
    if (onSettingsChange) {
      onSettingsChange(defaultSettings);
    }
    if (onReset) {
      await onReset(defaultSettings);
      return true;
    }
    return false;
  };
  const sidebarLayoutOptions = [{
    value: 'LEFT',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Left Sidebar Filter', 'havenlytics')
  }, {
    value: 'RIGHT',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Right Sidebar Filter', 'havenlytics')
  }];
  const numberOfColumnsOptions = [{
    value: '1',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('1 Column', 'havenlytics')
  }, {
    value: '2',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('2 Columns', 'havenlytics')
  }, {
    value: '3',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('3 Columns', 'havenlytics')
  }, {
    value: '4',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('4 Columns', 'havenlytics')
  }];
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__content hvnly-settings-api__content--active",
    id: "search-result"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Layout & Search Result Page', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Top Search Page Title", "havenlytics"),
    icon: "fas fa-heading",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_7__["default"], {
    id: "hvnly_hideTopSearchTitle",
    checked: settings.hvnly_hideTopSearchTitle,
    onChange: e => handleInputChange('hvnly_hideTopSearchTitle', e.target.checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Top Search Title", "havenlytics")
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Top Search Bar", "havenlytics"),
    icon: "fas fa-search",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_7__["default"], {
    id: "hvnly_hideTopSearchBar",
    checked: settings.hvnly_hideTopSearchBar,
    onChange: e => handleInputChange('hvnly_hideTopSearchBar', e.target.checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Top Search Bar", "havenlytics")
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Left Search Filter Sidebar", "havenlytics"),
    icon: "fas fa-filter",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_7__["default"], {
    id: "hvnly_hideLeftSearchBar",
    checked: settings.hvnly_hideLeftSearchBar,
    onChange: e => handleInputChange('hvnly_hideLeftSearchBar', e.target.checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Left Search Filter Sidebar", "havenlytics")
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Search Property Layout", "havenlytics"),
    icon: "fas fa-th-large",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_5__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Select Sidebar Layout", "havenlytics"),
    id: "hvnly_sidebarLayoutType",
    value: settings.hvnly_sidebarLayoutType,
    options: sidebarLayoutOptions,
    onChange: value => handleInputChange('hvnly_sidebarLayoutType', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_5__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Number of Columns", "havenlytics"),
    id: "hvnly_numberOfColumns",
    value: settings.hvnly_numberOfColumns,
    options: numberOfColumnsOptions,
    onChange: value => handleInputChange("hvnly_numberOfColumns", value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Search Results Per Page", "havenlytics"),
    id: "hvnly_searchResultPerpage",
    type: "number",
    value: settings.hvnly_searchResultPerpage,
    onChange: value => handleInputChange("hvnly_searchResultPerpage", value)
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_6__["default"], {
    onSave: handleSave,
    onReset: handleReset,
    showToast: showToast,
    saveLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Save Search Result Settings", "havenlytics"),
    resetLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Reset Changes", "havenlytics")
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchPropertyResultSettings);

/***/ }),

/***/ "./src/settings/components/Content/TabSections/TabDropdown/SearchPropertySettings.js":
/*!*******************************************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/TabDropdown/SearchPropertySettings.js ***!
  \*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Card_Card__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Card/Card */ "./src/settings/components/Card/Card.js");
/* harmony import */ var _FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../FormElements/InputGroup/InputGroup */ "./src/settings/components/FormElements/InputGroup/InputGroup.js");
/* harmony import */ var _FormElements_MainSearchFields_MainSearchFieldsDragDrop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../FormElements/MainSearchFields/MainSearchFieldsDragDrop */ "./src/settings/components/FormElements/MainSearchFields/MainSearchFieldsDragDrop.jsx");
/* harmony import */ var _FormElements_SearchDragDropFields_SearchDragDropFields__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../FormElements/SearchDragDropFields/SearchDragDropFields */ "./src/settings/components/FormElements/SearchDragDropFields/SearchDragDropFields.jsx");
/* harmony import */ var _FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../FormElements/SelectDropDown/SelectDropDown */ "./src/settings/components/FormElements/SelectDropDown/SelectDropDown.js");
/* harmony import */ var _FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../FormElements/TabActionButtons/TabActionButtons */ "./src/settings/components/FormElements/TabActionButtons/TabActionButtons.js");
/* harmony import */ var _FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../FormElements/ToggleSwitch/ToggleSwitch */ "./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.js");
/* harmony import */ var _FormElements_TopSearchFields_TopSearchFieldsDragDrop__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../FormElements/TopSearchFields/TopSearchFieldsDragDrop */ "./src/settings/components/FormElements/TopSearchFields/TopSearchFieldsDragDrop.jsx");
/* harmony import */ var _TabDropdown_css__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./TabDropdown.css */ "./src/settings/components/Content/TabSections/TabDropdown/TabDropdown.css");












const SearchPropertySettings = ({
  onSave,
  onReset,
  settingsData,
  onSettingsChange,
  showToast,
  onSyncComplete
}) => {
  // Use a ref to track if initial load has happened
  const isInitialLoadRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(true);
  const isUpdatingFromParentRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
  const isInternalUpdateRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    hvnly_searchBarTitle: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search Properties', 'havenlytics'),
    hvnly_searchButtonText: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search', 'havenlytics'),
    hvnly_hideTopSearchTitle: false,
    hvnly_hideTopSearchBar: false,
    hvnly_hideLeftSearchBar: false,
    hvnly_propertyViewType: 'GRID',
    hvnly_propertyOrderByType: 'TITLE',
    hvnly_propertySortByType: 'date',
    hvnly_propertyDepartmentOrderByType: 'RENT',
    hvnly_propertyThumbnailSize: 'thumbnail',
    hvnly_propertiesPerPage: 12,
    hvnly_enableAjaxLoadMore: true,
    hvnly_AjaxLoadMoreButtonText: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Load More', 'havenlytics'),
    hvnly_search_fields: [],
    hvnly_top_search_fields: [],
    hvnly_main_search_fields: []
  });

  // Sync state
  const [isSyncingView, setIsSyncingView] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);

  // Helper function to convert value to boolean
  const toBoolean = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(value => {
    if (typeof value === 'boolean') return value;
    if (value === 1 || value === '1' || value === true) return true;
    if (value === 0 || value === '0' || value === false) return false;
    return !!value;
  }, []);

  // Sync function for GRID/LIST view
  const syncViewTypeWithAPI = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async viewType => {
    if (isSyncingView) return;
    isInternalUpdateRef.current = true;
    setIsSyncingView(true);
    try {
      const apiBase = window.HavenlyticsData?.hvnlyNabApi?.url || '/wp-json/hvnlynab/v1';
      const nonce = window.HavenlyticsData?.hvnlyNabApi?.nonce || '';
      const response = await fetch(`${apiBase}/plugin-settings/sync-view-type`, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'X-WP-Nonce': nonce
        },
        body: JSON.stringify({
          view_type: viewType
        })
      });
      const result = await response.json();
      if (result.success && result.data && onSettingsChange) {
        if (onSyncComplete) {
          await onSyncComplete();
        }
        if (result.data.preloader) {
          onSettingsChange({
            ...settings,
            _syncedViewType: viewType,
            hvnly_preloader_property_grid: result.data.preloader.hvnly_preloader_property_grid,
            hvnly_preloader_property_list: result.data.preloader.hvnly_preloader_property_list
          });
        }
        if (showToast) {
          showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Property view synced with Preloader settings', 'havenlytics'));
        }
      }
    } catch (error) {
      // Silent fail
    } finally {
      setIsSyncingView(false);
      setTimeout(() => {
        isInternalUpdateRef.current = false;
      }, 100);
    }
  }, [isSyncingView, settings, onSettingsChange, showToast, onSyncComplete]);

  // Sync function for AJAX Load More
  const syncAjaxLoadMoreWithAPI = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async isEnabled => {
    if (isSyncingView) return;
    isInternalUpdateRef.current = true;
    setIsSyncingView(true);
    try {
      const apiBase = window.HavenlyticsData?.hvnlyNabApi?.url || '/wp-json/hvnlynab/v1';
      const nonce = window.HavenlyticsData?.hvnlyNabApi?.nonce || '';
      const response = await fetch(`${apiBase}/plugin-settings/sync-ajax-load-more`, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'X-WP-Nonce': nonce
        },
        body: JSON.stringify({
          ajax_load_more_enabled: isEnabled
        })
      });
      const result = await response.json();
      if (result.success && result.data && onSettingsChange) {
        if (onSyncComplete) {
          await onSyncComplete();
        }
        if (result.data.search) {
          setSettings(prev => ({
            ...prev,
            hvnly_enableAjaxLoadMore: result.data.search.hvnly_enableAjaxLoadMore !== undefined ? result.data.search.hvnly_enableAjaxLoadMore : isEnabled
          }));
        }
        if (result.data.preloader) {
          onSettingsChange({
            ...settings,
            _syncedAjaxLoadMore: isEnabled,
            hvnly_preloader_load_more: result.data.preloader.hvnly_preloader_load_more,
            hvnly_preloader_pagination: result.data.preloader.hvnly_preloader_pagination
          });
        }
        if (showToast) {
          if (isEnabled) {
            showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('AJAX Load More enabled, Load More Preloader activated', 'havenlytics'));
          } else {
            showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('AJAX Load More disabled, Pagination Preloader activated', 'havenlytics'));
          }
        }
      }
    } catch (error) {
      // Silent fail
    } finally {
      setIsSyncingView(false);
      setTimeout(() => {
        isInternalUpdateRef.current = false;
      }, 100);
    }
  }, [isSyncingView, settings, onSettingsChange, showToast, onSyncComplete]);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    // Skip if we're updating from internal sync
    if (isInternalUpdateRef.current) {
      return;
    }

    // Skip if we're updating from parent to avoid loops
    if (isUpdatingFromParentRef.current) {
      isUpdatingFromParentRef.current = false;
      return;
    }
    if (settingsData && typeof settingsData === 'object' && Object.keys(settingsData).length > 0) {
      const searchPropertyFields = {
        hvnly_searchBarTitle: settingsData.hvnly_searchBarTitle !== undefined ? settingsData.hvnly_searchBarTitle : settings.hvnly_searchBarTitle,
        hvnly_searchButtonText: settingsData.hvnly_searchButtonText !== undefined ? settingsData.hvnly_searchButtonText : settings.hvnly_searchButtonText,
        hvnly_hideTopSearchTitle: settingsData.hvnly_hideTopSearchTitle !== undefined ? toBoolean(settingsData.hvnly_hideTopSearchTitle) : settings.hvnly_hideTopSearchTitle,
        hvnly_hideTopSearchBar: settingsData.hvnly_hideTopSearchBar !== undefined ? toBoolean(settingsData.hvnly_hideTopSearchBar) : settings.hvnly_hideTopSearchBar,
        hvnly_hideLeftSearchBar: settingsData.hvnly_hideLeftSearchBar !== undefined ? toBoolean(settingsData.hvnly_hideLeftSearchBar) : settings.hvnly_hideLeftSearchBar,
        hvnly_propertyViewType: settingsData.hvnly_propertyViewType !== undefined ? settingsData.hvnly_propertyViewType : settings.hvnly_propertyViewType,
        hvnly_propertyOrderByType: settingsData.hvnly_propertyOrderByType !== undefined ? settingsData.hvnly_propertyOrderByType : settings.hvnly_propertyOrderByType,
        hvnly_propertySortByType: settingsData.hvnly_propertySortByType !== undefined ? settingsData.hvnly_propertySortByType : settings.hvnly_propertySortByType,
        hvnly_propertyDepartmentOrderByType: settingsData.hvnly_propertyDepartmentOrderByType !== undefined ? settingsData.hvnly_propertyDepartmentOrderByType : settings.hvnly_propertyDepartmentOrderByType,
        hvnly_propertyThumbnailSize: settingsData.hvnly_propertyThumbnailSize !== undefined ? settingsData.hvnly_propertyThumbnailSize : settings.hvnly_propertyThumbnailSize,
        hvnly_propertiesPerPage: settingsData.hvnly_propertiesPerPage !== undefined && settingsData.hvnly_propertiesPerPage !== null ? typeof settingsData.hvnly_propertiesPerPage === 'number' ? settingsData.hvnly_propertiesPerPage : parseInt(settingsData.hvnly_propertiesPerPage, 10) || 12 : settings.hvnly_propertiesPerPage,
        hvnly_enableAjaxLoadMore: settingsData.hvnly_enableAjaxLoadMore !== undefined ? toBoolean(settingsData.hvnly_enableAjaxLoadMore) : settings.hvnly_enableAjaxLoadMore,
        hvnly_AjaxLoadMoreButtonText: settingsData.hvnly_AjaxLoadMoreButtonText !== undefined ? settingsData.hvnly_AjaxLoadMoreButtonText : settings.hvnly_AjaxLoadMoreButtonText,
        hvnly_search_fields: settingsData.hvnly_search_fields !== undefined ? settingsData.hvnly_search_fields : settings.hvnly_search_fields,
        hvnly_top_search_fields: settingsData.hvnly_top_search_fields !== undefined ? settingsData.hvnly_top_search_fields : settings.hvnly_top_search_fields,
        hvnly_main_search_fields: settingsData.hvnly_main_search_fields !== undefined ? settingsData.hvnly_main_search_fields : settings.hvnly_main_search_fields
      };
      const hasChanges = Object.keys(searchPropertyFields).some(key => JSON.stringify(settings[key]) !== JSON.stringify(searchPropertyFields[key]));
      if (hasChanges) {
        setSettings(prev => ({
          ...prev,
          ...searchPropertyFields
        }));
      }
    }
    isInitialLoadRef.current = false;
  }, [settingsData, toBoolean]);
  const handleInputChange = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)((field, value) => {
    // Prevent updates during internal sync
    if (isInternalUpdateRef.current) {
      return;
    }
    setSettings(prev => {
      const newSettings = {
        ...prev,
        [field]: value
      };
      if (field === 'hvnly_propertyViewType' && !isSyncingView) {
        syncViewTypeWithAPI(value);
      }
      if (field === 'hvnly_enableAjaxLoadMore' && !isSyncingView) {
        syncAjaxLoadMoreWithAPI(value);
      }
      isUpdatingFromParentRef.current = true;
      if (onSettingsChange) {
        onSettingsChange(newSettings);
      }
      return newSettings;
    });
  }, [onSettingsChange, isSyncingView, syncViewTypeWithAPI, syncAjaxLoadMoreWithAPI]);
  const handleMainSearchFieldsChange = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(fields => {
    handleInputChange('hvnly_main_search_fields', fields);
  }, [handleInputChange]);
  const handleSearchFieldsChange = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(fields => {
    handleInputChange('hvnly_search_fields', fields);
  }, [handleInputChange]);
  const handleTopSearchFieldsChange = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(fields => {
    const fieldsToSave = Array.isArray(fields) ? fields : Object.values(fields);
    handleInputChange('hvnly_top_search_fields', fieldsToSave);
  }, [handleInputChange]);
  const handleSave = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async () => {
    if (onSave) {
      await onSave(settings);
      return true;
    }
    return false;
  }, [settings, onSave]);
  const handleReset = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async () => {
    const defaultSettings = {
      hvnly_searchBarTitle: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search Properties', 'havenlytics'),
      hvnly_searchButtonText: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search', 'havenlytics'),
      hvnly_hideTopSearchTitle: false,
      hvnly_hideTopSearchBar: false,
      hvnly_hideLeftSearchBar: false,
      hvnly_propertyViewType: 'GRID',
      hvnly_propertyOrderByType: 'TITLE',
      hvnly_propertySortByType: 'date',
      hvnly_propertyDepartmentOrderByType: 'RENT',
      hvnly_propertyThumbnailSize: 'thumbnail',
      hvnly_propertiesPerPage: 12,
      hvnly_enableAjaxLoadMore: true,
      hvnly_AjaxLoadMoreButtonText: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Load More', 'havenlytics'),
      hvnly_search_fields: [],
      hvnly_top_search_fields: [],
      hvnly_main_search_fields: []
    };
    setSettings(defaultSettings);
    isUpdatingFromParentRef.current = true;
    if (onSettingsChange) {
      onSettingsChange(defaultSettings);
    }
    if (onReset) {
      await onReset(defaultSettings);
      return true;
    }
    return false;
  }, [onSettingsChange, onReset]);
  const propertyViewOptions = [{
    value: 'SELECT',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Select One', 'havenlytics')
  }, {
    value: 'GRID',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Grid View', 'havenlytics')
  }, {
    value: 'LIST',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('List View', 'havenlytics')
  }];
  const propertySortByOptions = [{
    value: 'a-to-z-title',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('A to Z (title)', 'havenlytics')
  }, {
    value: 'z-to-a-title',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Z to A (title)', 'havenlytics')
  }, {
    value: 'date',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Newest', 'havenlytics')
  }, {
    value: 'date_oldest',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Oldest', 'havenlytics')
  }, {
    value: 'price_low',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Price: Low to High', 'havenlytics')
  }, {
    value: 'price_high',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Price: High to Low', 'havenlytics')
  }, {
    value: 'area',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Square Footage', 'havenlytics')
  }, {
    value: 'bedrooms',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Number of Bedrooms', 'havenlytics')
  }, {
    value: 'views',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('View Counts', 'havenlytics')
  }, {
    value: 'rating',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Rating', 'havenlytics')
  }, {
    value: 'rand_property',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Random Property', 'havenlytics')
  }];
  const topSearchFieldsForComponent = Array.isArray(settings.hvnly_top_search_fields) ? settings.hvnly_top_search_fields : Object.values(settings.hvnly_top_search_fields || {});
  const isTopSearchBarHidden = settings.hvnly_hideTopSearchBar === true;
  const isLeftSearchBarHidden = settings.hvnly_hideLeftSearchBar === true;
  const isAjaxLoadMoreEnabled = settings.hvnly_enableAjaxLoadMore === true || settings.hvnly_enableAjaxLoadMore === 'true' || settings.hvnly_enableAjaxLoadMore === 1;
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__content hvnly-settings-api__content--active",
    id: "search-property"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search Property', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Property Search Bar", "havenlytics"),
    icon: "fas fa-search",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Search Properties", "havenlytics"),
    id: "hvnly_searchBarTitle",
    type: "text",
    value: settings.hvnly_searchBarTitle,
    onChange: value => handleInputChange("hvnly_searchBarTitle", value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Search Button Text", "havenlytics"),
    id: "hvnly_searchButtonText",
    type: "text",
    value: settings.hvnly_searchButtonText,
    onChange: value => handleInputChange("hvnly_searchButtonText", value)
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("AJAX Load More", "havenlytics"),
    icon: "fas fa-sync-alt",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_9__["default"], {
    id: "hvnly_enableAjaxLoadMore",
    checked: isAjaxLoadMoreEnabled,
    onChange: checked => handleInputChange('hvnly_enableAjaxLoadMore', checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enable AJAX Load More Button", "havenlytics")
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__description",
    style: {
      marginTop: '10px',
      marginBottom: '10px',
      fontSize: '12px',
      color: '#666'
    }
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("When enabled, properties will load via AJAX without page refresh using a \"Load More\" button. When disabled, traditional pagination will be used.", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Rename Ajax Load More Properties", "havenlytics"),
    id: "hvnly_AjaxLoadMoreButtonText",
    type: "text",
    value: settings.hvnly_AjaxLoadMoreButtonText,
    onChange: value => handleInputChange("hvnly_AjaxLoadMoreButtonText", value)
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Top Search Page Title", "havenlytics"),
    icon: "fas fa-heading",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_9__["default"], {
    id: "hvnly_hideTopSearchTitle",
    checked: settings.hvnly_hideTopSearchTitle === true || settings.hvnly_hideTopSearchTitle === 'true' || settings.hvnly_hideTopSearchTitle === 1,
    onChange: checked => handleInputChange('hvnly_hideTopSearchTitle', checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Top Search Title", "havenlytics")
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Top Search Bar", "havenlytics"),
    icon: "fas fa-search",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_9__["default"], {
    id: "hvnly_hideTopSearchBar",
    checked: settings.hvnly_hideTopSearchBar === true || settings.hvnly_hideTopSearchBar === 'true' || settings.hvnly_hideTopSearchBar === 1,
    onChange: checked => handleInputChange('hvnly_hideTopSearchBar', checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Top Search Bar", "havenlytics")
  }), isTopSearchBarHidden && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__info-message",
    style: {
      marginTop: '10px',
      padding: '8px 12px',
      background: 'rgba(255, 181, 7, 0.1)',
      borderLeft: '3px solid #FFB507',
      borderRadius: '4px',
      fontSize: '12px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-info-circle"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Main Search Fields and Top Search Fields are disabled because "Hide Top Search Bar" is enabled.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Left Search Filter Sidebar", "havenlytics"),
    icon: "fas fa-filter",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_9__["default"], {
    id: "hvnly_hideLeftSearchBar",
    checked: settings.hvnly_hideLeftSearchBar === true || settings.hvnly_hideLeftSearchBar === 'true' || settings.hvnly_hideLeftSearchBar === 1,
    onChange: checked => handleInputChange('hvnly_hideLeftSearchBar', checked),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Hide Left Search Filter Sidebar", "havenlytics")
  }), isLeftSearchBarHidden && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__info-message",
    style: {
      marginTop: '10px',
      padding: '8px 12px',
      background: 'rgba(255, 181, 7, 0.1)',
      borderLeft: '3px solid #FFB507',
      borderRadius: '4px',
      fontSize: '12px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-info-circle"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Manage Search Filter Fields is disabled because "Hide Left Search Filter Sidebar" is enabled.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__three-columns"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__column"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Main Search Fields", "havenlytics"),
    icon: "fas fa-search",
    collapsible: true,
    disabled: isTopSearchBarHidden
  }, isTopSearchBarHidden ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__disabled-message",
    style: {
      padding: '20px',
      textAlign: 'center',
      color: '#999'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-lock",
    style: {
      marginRight: '8px'
    }
  }), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('This section is disabled because "Hide Top Search Bar" is enabled.', 'havenlytics')) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_MainSearchFields_MainSearchFieldsDragDrop__WEBPACK_IMPORTED_MODULE_5__["default"], {
    showToast: showToast,
    onFieldsChange: handleMainSearchFieldsChange,
    initialFields: settings.hvnly_main_search_fields
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__column"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Top Search Fields", "havenlytics"),
    icon: "fas fa-layer-group",
    collapsible: true,
    disabled: isTopSearchBarHidden
  }, isTopSearchBarHidden ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__disabled-message",
    style: {
      padding: '20px',
      textAlign: 'center',
      color: '#999'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-lock",
    style: {
      marginRight: '8px'
    }
  }), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('This section is disabled because "Hide Top Search Bar" is enabled.', 'havenlytics')) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_TopSearchFields_TopSearchFieldsDragDrop__WEBPACK_IMPORTED_MODULE_10__["default"], {
    showToast: showToast,
    onFieldsChange: handleTopSearchFieldsChange,
    initialFields: topSearchFieldsForComponent
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__column"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Manage Search Filter Fields", "havenlytics"),
    icon: "fas fa-arrows-alt-v",
    collapsible: true,
    disabled: isLeftSearchBarHidden
  }, isLeftSearchBarHidden ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__disabled-message",
    style: {
      padding: '20px',
      textAlign: 'center',
      color: '#999'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-lock",
    style: {
      marginRight: '8px'
    }
  }), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('This section is disabled because "Hide Left Search Filter Sidebar" is enabled.', 'havenlytics')) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SearchDragDropFields_SearchDragDropFields__WEBPACK_IMPORTED_MODULE_6__["default"], {
    showToast: showToast,
    onFieldsChange: handleSearchFieldsChange,
    initialFields: settings.hvnly_search_fields
  })))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Card_Card__WEBPACK_IMPORTED_MODULE_3__["default"], {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Property View Types", "havenlytics"),
    icon: "fas fa-th-large",
    collapsible: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_7__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Default Property View", "havenlytics"),
    id: "hvnly_propertyViewType",
    value: settings.hvnly_propertyViewType,
    options: propertyViewOptions,
    onChange: value => handleInputChange('hvnly_propertyViewType', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_SelectDropDown_SelectDropDown__WEBPACK_IMPORTED_MODULE_7__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Property Sort By", "havenlytics"),
    id: "hvnly_propertySortByType",
    value: settings.hvnly_propertySortByType,
    options: propertySortByOptions,
    onChange: value => handleInputChange('hvnly_propertySortByType', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Properties Per Page", "havenlytics"),
    info: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Number of properties to display per page. Enter a number between 1 and 100.", "havenlytics"),
    id: "hvnly_propertiesPerPage",
    type: "number",
    min: "1",
    max: "100",
    step: "1",
    value: settings.hvnly_propertiesPerPage,
    onChange: value => {
      const numValue = parseInt(value, 10);
      if (!isNaN(numValue) && numValue >= 1 && numValue <= 100) {
        handleInputChange("hvnly_propertiesPerPage", numValue);
      } else if (value === '') {
        handleInputChange("hvnly_propertiesPerPage", 12);
      }
    }
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_4__["default"], {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Property Thumbnail Size", "havenlytics"),
    info: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enter image size ('thumbnail', 'medium', 'large', 'full') or custom size like '400x300'", "havenlytics"),
    id: "hvnly_propertyThumbnailSize",
    type: "text",
    value: settings.hvnly_propertyThumbnailSize,
    onChange: value => handleInputChange("hvnly_propertyThumbnailSize", value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__info-message",
    style: {
      marginTop: '15px',
      padding: '10px 12px',
      background: 'rgba(108, 96, 254, 0.1)',
      borderLeft: '3px solid var(--hvnly-brand-primary)',
      borderRadius: '4px',
      fontSize: '12px'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-sync-alt"
  }), ' ', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Changes to Default Property View will automatically sync with the Grid/List Preloader settings.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormElements_TabActionButtons_TabActionButtons__WEBPACK_IMPORTED_MODULE_8__["default"], {
    onSave: handleSave,
    onReset: handleReset,
    showToast: showToast,
    saveLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Save Search Property Settings", "havenlytics"),
    resetLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Reset Changes", "havenlytics")
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchPropertySettings);

/***/ }),

/***/ "./src/settings/components/Content/TabSections/TabDropdown/TabDropdown.css":
/*!*********************************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/TabDropdown/TabDropdown.css ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./src/settings/components/Content/TabSections/TabDropdown/TabDropdown.module.css":
/*!****************************************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/TabDropdown/TabDropdown.module.css ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// extracted by mini-css-extract-plugin
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"hvnly-settings-api__content":"Rja2z8wcEnJYwprWw4SV","fadeIn":"TAFTBLuLRxttusKe99uj","hvnly-settings-api__content--active":"y_xHZreAWRqJylc8vmhM"});

/***/ }),

/***/ "./src/settings/components/Content/TabSections/TabSections.module.css":
/*!****************************************************************************!*\
  !*** ./src/settings/components/Content/TabSections/TabSections.module.css ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// extracted by mini-css-extract-plugin
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"hvnly-settings-api__content":"bFsrJUGXDzUltNFsMhZw","fadeIn":"VuNx1kqcYrlGJoeC04Ke","hvnly-settings-api__content--active":"UZxijA65H1xNvcKpVkv3","hvnly-settings-api__disabled":"SvmvHD0ey8Pgll6UZZNP","hvnly-property-switch":"sZp_jPTsFQQtcezUFreg"});

/***/ }),

/***/ "./src/settings/components/Footer/Footer.css":
/*!***************************************************!*\
  !*** ./src/settings/components/Footer/Footer.css ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./src/settings/components/Footer/Footer.js":
/*!**************************************************!*\
  !*** ./src/settings/components/Footer/Footer.js ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Footer_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Footer.css */ "./src/settings/components/Footer/Footer.css");




const Footer = () => {
  const [version, setVersion] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('');
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    // Get version from WordPress localized data
    if (window.HavenlyticsData?.version) {
      setVersion(window.HavenlyticsData.version);
    } else if (window.hvnlyNabAdmin?.version) {
      setVersion(window.hvnlyNabAdmin.version);
    } else {
      // Fallback to fetching from API
      fetchVersion();
    }
  }, []);
  const fetchVersion = async () => {
    try {
      const response = await fetch('/wp-json/hvnlynab/v1/plugin-info');
      const data = await response.json();
      if (data.version) {
        setVersion(data.version);
      }
    } catch (error) {
      console.error('Failed to fetch version:', error);
    }
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("footer", {
    className: "hvnly-settings-api__footer"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__version"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Havenlytics', 'havenlytics'), " ", version && `v${version}`), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__footer-links"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
    target: "_blank",
    href: "https://havenlytics.com/documentation/",
    className: "hvnly-settings-api__footer-link"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-book"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Documentation', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
    target: "_blank",
    href: "https://wordpress.org/support/plugin/havenlytics/",
    className: "hvnly-settings-api__footer-link"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-question-circle"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Supports', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
    target: "_blank",
    href: "https://github.com/havenlytics/havenlytics",
    className: "hvnly-settings-api__footer-link"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-bug"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Report Issue', 'havenlytics'))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Footer);

/***/ }),

/***/ "./src/settings/components/FormElements/CheckboxGroup/CheckboxGroup.js":
/*!*****************************************************************************!*\
  !*** ./src/settings/components/FormElements/CheckboxGroup/CheckboxGroup.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _CheckboxGroup_module_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CheckboxGroup.module.css */ "./src/settings/components/FormElements/CheckboxGroup/CheckboxGroup.module.css");



const CheckboxGroup = ({
  label,
  options = [],
  selectedValues = [],
  onChange
}) => {
  const [checkedValues, setCheckedValues] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(selectedValues);

  // Update internal state when selectedValues prop changes
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    console.log('🔄 [CheckboxGroup] selectedValues prop changed:', selectedValues);
    setCheckedValues(selectedValues);
  }, [selectedValues]);
  const handleCheckboxChange = value => {
    let updatedValues;
    if (checkedValues.includes(value)) {
      updatedValues = checkedValues.filter(v => v !== value);
    } else {
      updatedValues = [...checkedValues, value];
    }
    console.log('✅ [CheckboxGroup] Checkbox changed:', value, 'New values:', updatedValues);
    setCheckedValues(updatedValues);
    if (onChange) onChange(updatedValues);
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _CheckboxGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__form-group"]
  }, label && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: _CheckboxGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__form-label"]
  }, label), options.map(option => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _CheckboxGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__checkbox-group"],
    key: option.value
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "checkbox",
    id: option.id || `checkbox-${option.value}`,
    checked: checkedValues.includes(option.value),
    onChange: () => handleCheckboxChange(option.value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    htmlFor: option.id || `checkbox-${option.value}`,
    className: _CheckboxGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__checkbox"]
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: _CheckboxGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__toggle-label"]
  }, option.label))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CheckboxGroup);

/***/ }),

/***/ "./src/settings/components/FormElements/CheckboxGroup/CheckboxGroup.module.css":
/*!*************************************************************************************!*\
  !*** ./src/settings/components/FormElements/CheckboxGroup/CheckboxGroup.module.css ***!
  \*************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// extracted by mini-css-extract-plugin
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"hvnly_settings_api__form-group":"xKinIZqQhD5IsGm0z_sQ","hvnly_settings_api__checkbox-group":"SdklBFi7e0qPaDWUUpd5","hvnly_settings_api__form-label":"avWHLvzaFeRiYW7XpHnm","hvnly_settings_api__checkbox":"zOe9JxgM21QPOR1ZF8w9"});

/***/ }),

/***/ "./src/settings/components/FormElements/ColorPicker/ColorPicker.js":
/*!*************************************************************************!*\
  !*** ./src/settings/components/FormElements/ColorPicker/ColorPicker.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-dom */ "react-dom");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ColorPicker.module.css */ "./src/settings/components/FormElements/ColorPicker/ColorPicker.module.css");





const ColorPicker = ({
  label,
  id,
  value: initialValue = "#333333",
  onChange,
  defaultColor = null
}) => {
  const [color, setColor] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(initialValue);
  const [showPicker, setShowPicker] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const [portalPosition, setPortalPosition] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    top: 0,
    left: 0
  });
  const triggerRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
  const pickerRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);

  // Get the default color to use for reset
  const getDefaultColor = () => {
    return defaultColor || initialValue || "#333333";
  };

  // Update internal color when prop changes
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    setColor(initialValue);
  }, [initialValue, label]);

  // Close color picker when clicking outside
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    const handleClickOutside = event => {
      if (pickerRef.current && !pickerRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
        setShowPicker(false);
      }
    };
    document.addEventListener("mousedown", handleClickOutside);
    return () => {
      document.removeEventListener("mousedown", handleClickOutside);
    };
  }, []);

  // Calculate position when picker opens
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (showPicker && triggerRef.current) {
      const rect = triggerRef.current.getBoundingClientRect();
      const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
      const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;
      const pickerHeight = 430; // Slightly increased to accommodate reset button
      const spaceBelow = window.innerHeight - rect.bottom;
      const spaceAbove = rect.top;
      let top;
      // Open upward if not enough space below, otherwise open downward
      if (spaceBelow < pickerHeight && spaceAbove > pickerHeight) {
        // Position above the trigger
        top = rect.top + scrollTop - pickerHeight - 8;
      } else {
        // Position below the trigger
        top = rect.bottom + scrollTop + 8;
      }
      setPortalPosition({
        top: top,
        left: rect.left + scrollLeft + 55 // 55px offset for the color preview square
      });
    }
  }, [showPicker]);
  const handleChange = e => {
    const newColor = e.target.value;
    setColor(newColor);
    if (onChange) onChange(newColor);
  };
  const handleColorPreviewClick = () => {
    setShowPicker(!showPicker);
  };
  const handlePresetColorClick = presetColor => {
    setColor(presetColor);
    if (onChange) onChange(presetColor);
    setShowPicker(false);
  };
  const handleResetToDefault = () => {
    const defaultColorValue = getDefaultColor();
    setColor(defaultColorValue);
    if (onChange) onChange(defaultColorValue);
    setShowPicker(false);
  };

  // Common color presets
  const colorPresets = ["#333333", "#FFFFFF", "#FF0000", "#00FF00", "#0000FF", "#FFFF00", "#00FFFF", "#FF00FF", "#C0C0C0", "#808080", "#800000", "#808000", "#008000", "#800080", "#008080", "#000080", "#FFA500", "#FFC0CB", "#FFD700", "#ADD8E6"];
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__["default"]["hvnly_settings_api__form-group"]
  }, label && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    htmlFor: id,
    className: _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__["default"]["hvnly_settings_api__form-label"]
  }, label), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__["default"]["hvnly_settings_api__color-picker"]
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    ref: triggerRef,
    className: _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__["default"]["hvnly_settings_api__color-preview"],
    style: {
      backgroundColor: color
    },
    onClick: handleColorPreviewClick
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "text",
    id: id,
    className: _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__["default"]["hvnly_settings_api__form-control"],
    value: color,
    onChange: handleChange,
    placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Enter hex color", "havenlytics")
  }), showPicker && (0,react_dom__WEBPACK_IMPORTED_MODULE_3__.createPortal)((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    ref: pickerRef,
    className: _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__["default"]["hvnly_settings_api__color-palette-portal"],
    style: {
      position: 'absolute',
      top: `${portalPosition.top}px`,
      left: `${portalPosition.left}px`,
      zIndex: 9999999
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__["default"]["hvnly_settings_api__color-palette-header"]
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Select a color", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    onClick: () => setShowPicker(false),
    className: _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__["default"]["hvnly_settings_api__color-palette-close"]
  }, "\xD7")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "color",
    value: color,
    onChange: handleChange,
    className: _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__["default"]["hvnly_settings_api__color-input"]
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__["default"]["hvnly_settings_api__color-presets"]
  }, colorPresets.map((presetColor, index) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    key: index,
    className: _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__["default"]["hvnly_settings_api__color-preset"],
    style: {
      backgroundColor: presetColor
    },
    onClick: () => handlePresetColorClick(presetColor)
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__["default"]["hvnly_settings_api__color-reset-container"]
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    type: "button",
    onClick: handleResetToDefault,
    className: _ColorPicker_module_css__WEBPACK_IMPORTED_MODULE_4__["default"]["hvnly_settings_api__color-reset-btn"]
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-undo-alt"
  }), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Reset to Default", "havenlytics")))), document.body)));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ColorPicker);

/***/ }),

/***/ "./src/settings/components/FormElements/ColorPicker/ColorPicker.module.css":
/*!*********************************************************************************!*\
  !*** ./src/settings/components/FormElements/ColorPicker/ColorPicker.module.css ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// extracted by mini-css-extract-plugin
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"hvnly_settings_api__form-group":"yeDRpaqXSKEXi97AG7ZQ","hvnly_settings_api__color-picker":"rowA4nRnAincISrK8gIr","hvnly_settings_api__color-preview":"ncHnG5xShfY8aTJgyWxA","hvnly_settings_api__color-palette-portal":"BhDUSPiaTbNETNXOs6uB","fadeInScale":"CZVCVXD6zbINuW6XWpMr","hvnly_settings_api__color-palette-header":"qP8KdE2o6Kdg_6yQ9wVY","hvnly_settings_api__color-palette-close":"EUEzGj1Xpv8BQ9oByHcb","hvnly_settings_api__color-input":"jN83y_zONUJtZZyK3VK_","hvnly_settings_api__color-presets":"DLB15jpmrMV_kgNXlczk","hvnly_settings_api__color-preset":"eEBOkdrqZlaJim5ijXhp","hvnly_settings_api__color-reset-container":"z4N98lKl4pCdUJH9ucaw","hvnly_settings_api__color-reset-btn":"BprbWckTpcDo8AecZDca","hvnly_settings_api__form-label":"o5H3HaWNXmSIYpP8O4eX","hvnly_settings_api__form-control":"LsalrICkCCUCXJNsnK56"});

/***/ }),

/***/ "./src/settings/components/FormElements/CopyShortcodeInput/CopyShortcodeInput.jsx":
/*!****************************************************************************************!*\
  !*** ./src/settings/components/FormElements/CopyShortcodeInput/CopyShortcodeInput.jsx ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _InputGroup_module_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./InputGroup.module.css */ "./src/settings/components/FormElements/CopyShortcodeInput/InputGroup.module.css");




const CopyShortcodeInput = ({
  label,
  id,
  placeholder = "",
  value: defaultValue = ""
}) => {
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultValue);
  const [isCopied, setIsCopied] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const copyToClipboard = text => {
    // Fallback method for environments where navigator.clipboard isn't available
    if (navigator.clipboard && window.isSecureContext) {
      // Modern method with clipboard API
      return navigator.clipboard.writeText(text);
    } else {
      // Fallback method for older browsers
      const textArea = document.createElement("textarea");
      textArea.value = text;
      textArea.style.position = "fixed";
      textArea.style.opacity = "0";
      document.body.appendChild(textArea);
      textArea.focus();
      textArea.select();
      try {
        const successful = document.execCommand("copy");
        if (!successful) {
          throw new Error("Copy command failed");
        }
        return Promise.resolve();
      } catch (err) {
        return Promise.reject(err);
      } finally {
        document.body.removeChild(textArea);
      }
    }
  };
  const handleCopy = async () => {
    try {
      await copyToClipboard(value);
      setIsCopied(true);

      // Reset copied status after 2 seconds
      setTimeout(() => setIsCopied(false), 2000);
    } catch (err) {
      console.error('Failed to copy:', err);
      setIsCopied(false);

      // Optional: Show error message if needed
      // alert('Failed to copy to clipboard. Please try again.');
    }
  };
  const handleFocus = e => {
    e.target.select();
  };
  const handleClick = () => {
    handleCopy();
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _InputGroup_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]["hvnly_settings_api__form-group"]
  }, label && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: _InputGroup_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]["hvnly_settings_api__form-label"],
    htmlFor: id
  }, label), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _InputGroup_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]["hvnly_settings_api__input-wrapper"]
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "text",
    id: id,
    className: `${_InputGroup_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]["hvnly_settings_api__form-control"]} ${_InputGroup_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]["hvnly_settings_api__copy-input"]}`,
    value: value,
    placeholder: placeholder,
    onFocus: handleFocus,
    onClick: handleClick,
    readOnly: true
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    type: "button",
    className: _InputGroup_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]["hvnly_settings_api__copy-button"],
    onClick: handleCopy,
    "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Copy to clipboard", "havenlytics")
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
    width: "16",
    height: "16",
    viewBox: "0 0 24 24",
    fill: "none",
    stroke: "currentColor",
    strokeWidth: "2"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
    x: "9",
    y: "9",
    width: "13",
    height: "13",
    rx: "2",
    ry: "2"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
    d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"
  }))), isCopied && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _InputGroup_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]["hvnly_settings_api__copy-toast"]
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
    width: "14",
    height: "14",
    viewBox: "0 0 24 24",
    fill: "none",
    stroke: "currentColor",
    strokeWidth: "3"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("polyline", {
    points: "20 6 9 17 4 12"
  })), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Copied to clipboard", "havenlytics"))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CopyShortcodeInput);

/***/ }),

/***/ "./src/settings/components/FormElements/CopyShortcodeInput/InputGroup.module.css":
/*!***************************************************************************************!*\
  !*** ./src/settings/components/FormElements/CopyShortcodeInput/InputGroup.module.css ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// extracted by mini-css-extract-plugin
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"hvnly_settings_api__form-group":"tAbwFz0Q802ZZZWecBW5","hvnly_settings_api__form-label":"E38lu4MeXJhnkWz8Q2_r","hvnly_settings_api__form-control":"XxM8oQjVnF2v5uGI0qXS","hvnly_settings_api__textarea":"jeRRPjb4o9iwynUBpObd","hvnly_settings_api__input-wrapper":"KJBuXjE1xBqzksmw0eap","hvnly_settings_api__copy-input":"F0Not_lTJxEKvdq_RcBN","hvnly_settings_api__copy-button":"sbmwa4ZcxtV3J9OnciYH","hvnly_settings_api__copy-toast":"aDI4wqJI910ECtcZGYKq","slideDown":"KnF_r73MhxgV33FdvjxG"});

/***/ }),

/***/ "./src/settings/components/FormElements/InputGroup/InputGroup.js":
/*!***********************************************************************!*\
  !*** ./src/settings/components/FormElements/InputGroup/InputGroup.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _InputGroup_module_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./InputGroup.module.css */ "./src/settings/components/FormElements/InputGroup/InputGroup.module.css");



const InputGroup = ({
  label,
  id,
  type = "text",
  placeholder = "",
  value: defaultValue = "",
  onChange,
  info = "",
  min,
  max,
  step
}) => {
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultValue);

  // Update local state when prop value changes from parent
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    setValue(defaultValue);
  }, [defaultValue]);
  const handleChange = e => {
    let newValue = e.target.value;

    // For number type, validate min/max
    if (type === "number" && min !== undefined && max !== undefined) {
      let numValue = parseInt(newValue, 10);
      if (!isNaN(numValue)) {
        if (numValue < parseInt(min, 10)) numValue = parseInt(min, 10);
        if (numValue > parseInt(max, 10)) numValue = parseInt(max, 10);
        newValue = numValue;
      }
    }
    setValue(newValue);
    if (onChange) onChange(newValue);
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _InputGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__form-group"]
  }, label && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: _InputGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__form-label"],
    htmlFor: id
  }, label), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: type,
    id: id,
    className: _InputGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__form-control"],
    value: value,
    placeholder: placeholder,
    onChange: handleChange,
    min: min,
    max: max,
    step: step
  }), info && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("small", {
    className: _InputGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__form-inputgroup-info"]
  }, info));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InputGroup);

/***/ }),

/***/ "./src/settings/components/FormElements/InputGroup/InputGroup.module.css":
/*!*******************************************************************************!*\
  !*** ./src/settings/components/FormElements/InputGroup/InputGroup.module.css ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// extracted by mini-css-extract-plugin
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"hvnly_settings_api__form-group":"iwCJOgEDkBQbmVh0PoTK","hvnly_settings_api__form-label":"OXfnBoLylS4nmRGycUAq","hvnly_settings_api__form-control":"nMod6WoiH9paeyc0TVIq","hvnly_settings_api__textarea":"Ao5gQnkgDqjUFUgwPqTb","hvnly_settings_api__form-inputgroup-info":"Yf_GwpqhUgMml4LZjTtx"});

/***/ }),

/***/ "./src/settings/components/FormElements/MainSearchFields/MainFieldConfigModal.jsx":
/*!****************************************************************************************!*\
  !*** ./src/settings/components/FormElements/MainSearchFields/MainFieldConfigModal.jsx ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../InputGroup/InputGroup */ "./src/settings/components/FormElements/InputGroup/InputGroup.js");
/* harmony import */ var _Modal_Modal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Modal/Modal */ "./src/settings/components/FormElements/Modal/Modal.jsx");





const MainFieldConfigModal = ({
  isOpen,
  onClose,
  field,
  onSave,
  showToast
}) => {
  const [config, setConfig] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({});
  const [isSaving, setIsSaving] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (field && isOpen) {
      setConfig(field.config || {});
    }
  }, [field, isOpen]);
  if (!field) return null;
  const handleConfigChange = (key, value) => {
    setConfig(prev => ({
      ...prev,
      [key]: value
    }));
  };
  const handleSave = async () => {
    setIsSaving(true);
    try {
      const updatedField = {
        ...field,
        config: config
      };
      await onSave(updatedField);
      onClose();
    } catch (error) {
      console.error('Failed to save field config:', error);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to save field configuration', 'havenlytics'));
    } finally {
      setIsSaving(false);
    }
  };

  /**
   * Get the taxonomy edit link URL
   */
  const getTaxonomyEditLink = () => {
    let taxonomy = '';
    if (field.id === 'property_type') {
      taxonomy = 'hvnly_prop_types';
    } else if (field.id === 'location') {
      taxonomy = 'hvnly_prop_locations';
    } else if (field.config?.taxonomy) {
      taxonomy = field.config.taxonomy;
    } else {
      taxonomy = 'hvnly_prop_types';
    }
    return `/wp-admin/edit-tags.php?taxonomy=${taxonomy}&post_type=hvnly_property`;
  };

  /**
   * Get taxonomy label for display
   */
  const getTaxonomyLabel = () => {
    if (field.id === 'property_type') {
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Property Types', 'havenlytics');
    } else if (field.id === 'location') {
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Locations', 'havenlytics');
    } else if (field.config?.taxonomy) {
      const labels = {
        'hvnly_prop_types': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Property Types', 'havenlytics'),
        'hvnly_prop_locations': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Locations', 'havenlytics'),
        'hvnly_prop_features': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Features', 'havenlytics'),
        'hvnly_prop_tags': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Tags', 'havenlytics'),
        'hvnly_prop_badges': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Badges', 'havenlytics'),
        'hvnly_prop_depts': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Status/Department', 'havenlytics')
      };
      return labels[field.config.taxonomy] || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Taxonomy Terms', 'havenlytics');
    }
    return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Taxonomy Terms', 'havenlytics');
  };
  const renderConfigContent = () => {
    if (field.type === 'text') {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: "hvnly-main-field-config"
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: "hvnly-main-field-config__section"
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Text Field Settings', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Placeholder', 'havenlytics'),
        id: "placeholder",
        value: config.placeholder || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search Address', 'havenlytics'),
        onChange: value => handleConfigChange('placeholder', value)
      })));
    }
    if (field.type === 'taxonomy') {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: "hvnly-main-field-config"
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: "hvnly-main-field-config__section"
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Taxonomy Field Settings', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Placeholder', 'havenlytics'),
        id: "placeholder",
        value: config.placeholder || (field.id === 'property_type' ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Property Type', 'havenlytics') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search Location', 'havenlytics')),
        onChange: value => handleConfigChange('placeholder', value)
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: "hvnly-main-field-config__info"
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
        className: "fas fa-info-circle"
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, getTaxonomyLabel())), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('This field uses taxonomy terms. Terms are managed in WordPress admin under:', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
        style: {
          marginTop: '8px'
        }
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Properties → Property Taxonomies', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
        style: {
          marginTop: '12px'
        }
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
        href: getTaxonomyEditLink(),
        target: "_blank",
        rel: "noopener noreferrer",
        style: {
          display: 'inline-flex',
          alignItems: 'center',
          gap: '6px',
          color: 'var(--hvnly-brand-primary)',
          textDecoration: 'none'
        }
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
        className: "fas fa-external-link-alt"
      }), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Manage taxonomy terms', 'havenlytics')))))));
    }
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-main-field-config__info"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-info-circle"
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('This field type does not require additional configuration.', 'havenlytics')));
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Modal_Modal__WEBPACK_IMPORTED_MODULE_4__["default"], {
    isOpen: isOpen,
    onClose: onClose,
    onConfirm: handleSave,
    title: `${(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Configure', 'havenlytics')}: ${field.title}`,
    size: "large",
    confirmText: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Save Configuration', 'havenlytics'),
    isLoading: isSaving
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-main-field-config-modal-content"
  }, renderConfigContent()));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MainFieldConfigModal);

/***/ }),

/***/ "./src/settings/components/FormElements/MainSearchFields/MainSearchFields.css":
/*!************************************************************************************!*\
  !*** ./src/settings/components/FormElements/MainSearchFields/MainSearchFields.css ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./src/settings/components/FormElements/MainSearchFields/MainSearchFieldsDragDrop.jsx":
/*!********************************************************************************************!*\
  !*** ./src/settings/components/FormElements/MainSearchFields/MainSearchFieldsDragDrop.jsx ***!
  \********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @dnd-kit/core */ "./node_modules/@dnd-kit/core/dist/core.esm.js");
/* harmony import */ var _dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dnd-kit/sortable */ "./node_modules/@dnd-kit/sortable/dist/sortable.esm.js");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js");
/* harmony import */ var _MainFieldConfigModal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MainFieldConfigModal */ "./src/settings/components/FormElements/MainSearchFields/MainFieldConfigModal.jsx");
/* harmony import */ var _MainSearchFields_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./MainSearchFields.css */ "./src/settings/components/FormElements/MainSearchFields/MainSearchFields.css");
/* harmony import */ var _SortableMainFieldItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SortableMainFieldItem */ "./src/settings/components/FormElements/MainSearchFields/SortableMainFieldItem.jsx");









const MainSearchFieldsDragDrop = ({
  showToast,
  onFieldsChange,
  initialFields = []
}) => {
  const [searchFields, setSearchFields] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)([]);
  const [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(true);
  const [editingField, setEditingField] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(null);
  const [editTitle, setEditTitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)('');

  // Config modal state
  const [configModalOpen, setConfigModalOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(false);
  const [configField, setConfigField] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(null);
  const isSavingRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(false);
  const pendingSaveRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);
  const API_BASE = window.HavenlyticsData?.hvnlyNabApi?.url || '/wp-json/hvnlynab/v1';
  const API_NONCE = window.HavenlyticsData?.hvnlyNabApi?.nonce || '';
  const SETTINGS_ENDPOINT = `${API_BASE}/plugin-settings/search`;
  const AXIOS_CONFIG = {
    headers: {
      'X-WP-Nonce': API_NONCE,
      'Content-Type': 'application/json'
    }
  };
  const sensors = (0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.useSensors)((0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.useSensor)(_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.PointerSensor, {
    activationConstraint: {
      distance: 5
    }
  }), (0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.useSensor)(_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.KeyboardSensor));
  const DEFAULT_MAIN_FIELDS = [{
    id: 'keyword_search',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Keyword Search', 'havenlytics'),
    type: 'text',
    enabled: true,
    order: 1,
    is_default: true,
    config: {
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Search Address', 'havenlytics'),
      isAjax: true
    }
  }, {
    id: 'property_type',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Property Type', 'havenlytics'),
    type: 'taxonomy',
    enabled: true,
    order: 2,
    is_default: true,
    config: {
      taxonomy: 'hvnly_prop_types',
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Property Type', 'havenlytics'),
      useTaxonomy: true
    }
  }, {
    id: 'location',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Location', 'havenlytics'),
    type: 'taxonomy',
    enabled: true,
    order: 3,
    is_default: true,
    config: {
      taxonomy: 'hvnly_prop_locations',
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Search Location', 'havenlytics'),
      useTaxonomy: true
    }
  }];
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
    if (initialFields && initialFields.length > 0) {
      const sortedFields = [...initialFields].sort((a, b) => (a.order || 0) - (b.order || 0));
      setSearchFields(sortedFields);
      setIsLoading(false);
    } else {
      loadMainSearchFields();
    }
  }, [initialFields]);
  const loadMainSearchFields = async () => {
    setIsLoading(true);
    try {
      const response = await axios__WEBPACK_IMPORTED_MODULE_5__["default"].get(SETTINGS_ENDPOINT, AXIOS_CONFIG);
      if (response.data?.success && response.data?.data) {
        const searchData = response.data.data;
        let fields = searchData.hvnly_main_search_fields || [];
        if (fields.length > 0) {
          fields.sort((a, b) => (a.order || 0) - (b.order || 0));
          setSearchFields(fields);
          if (onFieldsChange) {
            onFieldsChange(fields);
          }
        } else {
          setSearchFields([...DEFAULT_MAIN_FIELDS]);
        }
      } else {
        setSearchFields([...DEFAULT_MAIN_FIELDS]);
      }
    } catch (error) {
      console.error('Failed to load main search fields:', error);
      setSearchFields([...DEFAULT_MAIN_FIELDS]);
      if (showToast) {
        showToast('warning', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Notice', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Using default main search fields', 'havenlytics'));
      }
    } finally {
      setIsLoading(false);
    }
  };
  const saveMainSearchFields = async fields => {
    if (isSavingRef.current) {
      pendingSaveRef.current = fields;
      return;
    }
    isSavingRef.current = true;
    try {
      const response = await axios__WEBPACK_IMPORTED_MODULE_5__["default"].get(SETTINGS_ENDPOINT, AXIOS_CONFIG);
      const currentSettings = response.data?.data || {};
      const updatedSettings = {
        ...currentSettings
      };
      updatedSettings.hvnly_main_search_fields = fields;
      const saveResponse = await axios__WEBPACK_IMPORTED_MODULE_5__["default"].post(SETTINGS_ENDPOINT, updatedSettings, AXIOS_CONFIG);
      if (saveResponse.data?.success) {
        if (onFieldsChange) {
          onFieldsChange(fields);
        }
        if (pendingSaveRef.current) {
          const pending = pendingSaveRef.current;
          pendingSaveRef.current = null;
          setTimeout(() => saveMainSearchFields(pending), 100);
        }
        return true;
      }
      return false;
    } catch (error) {
      console.error('Failed to save main search fields:', error);
      if (showToast) {
        showToast('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Failed to save main search fields', 'havenlytics'));
      }
      return false;
    } finally {
      isSavingRef.current = false;
    }
  };
  const moveFieldUp = id => {
    setSearchFields(prev => {
      const index = prev.findIndex(field => field.id === id);
      if (index === 0) return prev;
      const newFields = [...prev];
      [newFields[index - 1], newFields[index]] = [newFields[index], newFields[index - 1]];
      newFields.forEach((field, idx) => {
        field.order = idx + 1;
      });
      setTimeout(() => saveMainSearchFields(newFields), 0);
      return newFields;
    });
  };
  const moveFieldDown = id => {
    setSearchFields(prev => {
      const index = prev.findIndex(field => field.id === id);
      if (index === prev.length - 1) return prev;
      const newFields = [...prev];
      [newFields[index], newFields[index + 1]] = [newFields[index + 1], newFields[index]];
      newFields.forEach((field, idx) => {
        field.order = idx + 1;
      });
      setTimeout(() => saveMainSearchFields(newFields), 0);
      return newFields;
    });
  };
  const toggleField = id => {
    setSearchFields(prev => {
      const newFields = prev.map(field => field.id === id ? {
        ...field,
        enabled: !field.enabled
      } : field);
      setTimeout(() => saveMainSearchFields(newFields), 0);
      return newFields;
    });
  };
  const startEditing = field => {
    setEditingField(field.id);
    setEditTitle(field.title);
  };
  const saveEdit = () => {
    if (!editTitle.trim()) {
      if (showToast) {
        showToast('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Field title cannot be empty', 'havenlytics'));
      }
      return;
    }
    setSearchFields(prev => {
      const newFields = prev.map(field => field.id === editingField ? {
        ...field,
        title: editTitle
      } : field);
      setTimeout(() => saveMainSearchFields(newFields), 0);
      return newFields;
    });
    setEditingField(null);
    if (showToast) {
      showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Field title updated!', 'havenlytics'));
    }
  };
  const cancelEdit = () => {
    setEditingField(null);
  };
  const handleConfigureField = field => {
    setConfigField(field);
    setConfigModalOpen(true);
  };
  const handleSaveFieldConfig = async updatedField => {
    setSearchFields(prev => {
      const newFields = prev.map(field => field.id === updatedField.id ? updatedField : field);
      setTimeout(() => saveMainSearchFields(newFields), 0);
      return newFields;
    });
    showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Field configuration saved!', 'havenlytics'));
  };
  const handleDragEnd = event => {
    const {
      active,
      over
    } = event;
    if (active.id !== over.id) {
      setSearchFields(items => {
        const oldIndex = items.findIndex(item => item.id === active.id);
        const newIndex = items.findIndex(item => item.id === over.id);
        const newItems = [...items];
        const [movedItem] = newItems.splice(oldIndex, 1);
        newItems.splice(newIndex, 0, movedItem);
        newItems.forEach((item, index) => {
          item.order = index + 1;
        });
        setTimeout(() => saveMainSearchFields(newItems), 0);
        return newItems;
      });
    }
  };
  const getTypeLabel = type => {
    const types = {
      'text': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Text', 'havenlytics'),
      'taxonomy': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Taxonomy', 'havenlytics')
    };
    return types[type] || type;
  };
  if (isLoading) {
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly_main_search_fields_drag_drop_builder"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly_main_search_fields_drag_drop_loading"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-spinner fa-spin"
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Loading main search fields...', 'havenlytics'))));
  }
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_main_search_fields_drag_drop_builder"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_main_search_fields_drag_drop_header"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-search"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Main Search Fields', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "hvnly_main_search_fields_drag_drop_hint"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Drag to reorder | Click Edit to rename | Click Configure to set options', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_main_search_fields_drag_drop_body"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.DndContext, {
    sensors: sensors,
    collisionDetection: _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.closestCenter,
    onDragEnd: handleDragEnd
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_2__.SortableContext, {
    items: searchFields.map(f => f.id),
    strategy: _dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_2__.verticalListSortingStrategy
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_main_search_fields_drag_drop_list"
  }, searchFields.length > 0 ? searchFields.map((field, index) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_SortableMainFieldItem__WEBPACK_IMPORTED_MODULE_8__["default"], {
    key: field.id,
    field: {
      ...field,
      typeLabel: getTypeLabel(field.type)
    },
    index: index,
    onMoveUp: moveFieldUp,
    onMoveDown: moveFieldDown,
    onToggle: toggleField,
    onEdit: startEditing,
    onConfigure: handleConfigureField,
    isEditing: editingField === field.id,
    editTitle: editTitle,
    onEditTitleChange: setEditTitle,
    onSaveEdit: saveEdit,
    onCancelEdit: cancelEdit,
    fieldsLength: searchFields.length,
    isDefault: field.is_default
  })) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    style: {
      textAlign: 'center',
      padding: '40px'
    }
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('No main search fields found.', 'havenlytics')))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_MainFieldConfigModal__WEBPACK_IMPORTED_MODULE_6__["default"], {
    isOpen: configModalOpen,
    onClose: () => {
      setConfigModalOpen(false);
      setConfigField(null);
    },
    field: configField,
    onSave: handleSaveFieldConfig,
    showToast: showToast
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MainSearchFieldsDragDrop);

/***/ }),

/***/ "./src/settings/components/FormElements/MainSearchFields/SortableMainFieldItem.jsx":
/*!*****************************************************************************************!*\
  !*** ./src/settings/components/FormElements/MainSearchFields/SortableMainFieldItem.jsx ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @dnd-kit/sortable */ "./node_modules/@dnd-kit/sortable/dist/sortable.esm.js");
/* harmony import */ var _dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dnd-kit/utilities */ "./node_modules/@dnd-kit/utilities/dist/utilities.esm.js");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);




const SortableMainFieldItem = ({
  field,
  index,
  onMoveUp,
  onMoveDown,
  onToggle,
  onEdit,
  onConfigure,
  isEditing,
  editTitle,
  onEditTitleChange,
  onSaveEdit,
  onCancelEdit,
  fieldsLength,
  isDefault
}) => {
  const {
    attributes,
    listeners,
    setNodeRef,
    transform,
    transition,
    isDragging
  } = (0,_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.useSortable)({
    id: field.id
  });
  const style = {
    transform: _dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.CSS.Transform.toString(transform),
    transition,
    opacity: isDragging ? 0.6 : 1
  };
  const hasConfigurableOptions = () => {
    return field.type === 'text' || field.type === 'taxonomy';
  };
  const hasConfig = () => {
    return field.config && Object.keys(field.config).length > 0;
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    ref: setNodeRef,
    style: style,
    className: `hvnly_main_search_fields_drag_drop_builder_item ${isDragging ? 'dragging' : ''}`
  }, isEditing ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_main_search_fields_drag_drop_edit_form"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_main_search_fields__form-group"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "text",
    className: "hvnly_main_search_fields__form-control",
    value: editTitle,
    onChange: e => onEditTitleChange(e.target.value),
    placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Field title', 'havenlytics')
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_main_search_fields_drag_drop_edit_actions"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_main_search_fields__modern-btn hvnly_main_search_fields__modern-btn--primary",
    onClick: onSaveEdit
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-check"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Save', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_main_search_fields__modern-btn hvnly_main_search_fields__modern-btn--secondary",
    onClick: onCancelEdit
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-times"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Cancel', 'havenlytics')))) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_main_search_fields_drag_drop_builder_item_handle",
    ...attributes,
    ...listeners
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-grip-vertical"
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_main_search_fields_drag_drop_builder_item_content"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_main_search_fields_drag_drop_builder_item_title"
  }, field.title, isDefault && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "hvnly-main-default-badge"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Default', 'havenlytics')), hasConfig() && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "hvnly-main-configured-badge"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-check-circle"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Configured', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_main_search_fields_drag_drop_builder_item_type"
  }, field.typeLabel || field.type)), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_main_search_fields_drag_drop_builder_item_actions"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_main_search_fields_drag_drop_builder_item_action_btn",
    onClick: () => onToggle(field.id),
    title: field.enabled ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Disable', 'havenlytics') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Enable', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: field.enabled ? 'fas fa-toggle-on' : 'fas fa-toggle-off'
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_main_search_fields_drag_drop_builder_item_action_btn",
    onClick: () => onMoveUp(field.id),
    disabled: index === 0,
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Move Up', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-arrow-up"
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_main_search_fields_drag_drop_builder_item_action_btn",
    onClick: () => onMoveDown(field.id),
    disabled: index === fieldsLength - 1,
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Move Down', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-arrow-down"
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_main_search_fields_drag_drop_builder_item_action_btn",
    onClick: () => onEdit(field),
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Edit Title', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-edit"
  })), hasConfigurableOptions() && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_main_search_fields_drag_drop_builder_item_action_btn",
    onClick: () => onConfigure(field),
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Configure Field Options', 'havenlytics'),
    style: {
      color: 'var(--hvnly-brand-primary)'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-cog"
  })))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SortableMainFieldItem);

/***/ }),

/***/ "./src/settings/components/FormElements/Modal/Modal.css":
/*!**************************************************************!*\
  !*** ./src/settings/components/FormElements/Modal/Modal.css ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./src/settings/components/FormElements/Modal/Modal.jsx":
/*!**************************************************************!*\
  !*** ./src/settings/components/FormElements/Modal/Modal.jsx ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-dom */ "react-dom");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _Modal_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Modal.css */ "./src/settings/components/FormElements/Modal/Modal.css");





const Modal = ({
  isOpen,
  onClose,
  onConfirm,
  title,
  children,
  size = 'medium',
  confirmText = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Save', 'havenlytics'),
  cancelText = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cancel', 'havenlytics'),
  showConfirm = true,
  showCancel = true,
  isLoading = false,
  closeOnOverlayClick = true
}) => {
  const modalRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
  const [mounted, setMounted] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    setMounted(true);
    return () => setMounted(false);
  }, []);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    const handleEsc = event => {
      if (event.key === 'Escape' && isOpen) {
        onClose();
      }
    };
    if (isOpen) {
      document.addEventListener('keydown', handleEsc);
      document.body.style.overflow = 'hidden';
      // Add class to body for additional styling if needed
      document.body.classList.add('hvnly-modal-open');
    }
    return () => {
      document.removeEventListener('keydown', handleEsc);
      document.body.style.overflow = '';
      document.body.classList.remove('hvnly-modal-open');
    };
  }, [isOpen, onClose]);
  const handleOverlayClick = e => {
    if (closeOnOverlayClick && e.target === e.currentTarget) {
      onClose();
    }
  };
  const handleConfirm = () => {
    if (onConfirm && !isLoading) {
      onConfirm();
    }
  };
  if (!isOpen || !mounted) return null;
  const sizeClasses = {
    small: 'hvnly-modal--small',
    medium: 'hvnly-modal--medium',
    large: 'hvnly-modal--large',
    xlarge: 'hvnly-modal--xlarge'
  };

  // Render modal directly to document.body using Portal
  return (0,react_dom__WEBPACK_IMPORTED_MODULE_3__.createPortal)((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-modal-overlay",
    onClick: handleOverlayClick
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    ref: modalRef,
    className: `hvnly-modal ${sizeClasses[size] || sizeClasses.medium}`
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-modal__header"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", {
    className: "hvnly-modal__title"
  }, title), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly-modal__close-btn",
    onClick: onClose,
    "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Close', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-times"
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-modal__body"
  }, children), (showConfirm || showCancel) && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-modal__footer"
  }, showCancel && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    type: "button",
    className: "hvnly-modal__btn hvnly-modal__btn--secondary",
    onClick: onClose,
    disabled: isLoading
  }, cancelText), showConfirm && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    type: "button",
    className: "hvnly-modal__btn hvnly-modal__btn--primary",
    onClick: handleConfirm,
    disabled: isLoading
  }, isLoading ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-spinner fa-spin"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Saving...', 'havenlytics'))) : confirmText)))), document.body);
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Modal);

/***/ }),

/***/ "./src/settings/components/FormElements/RadioGroup/RadioGroup.js":
/*!***********************************************************************!*\
  !*** ./src/settings/components/FormElements/RadioGroup/RadioGroup.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _RadioGroup_module_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RadioGroup.module.css */ "./src/settings/components/FormElements/RadioGroup/RadioGroup.module.css");



const RadioGroup = ({
  label,
  name,
  options = [],
  selectedValue,
  onChange
}) => {
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(selectedValue || "");

  // Update internal value when prop changes
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    // Production: Debug log removed
    // console.log(`🔘 [RadioGroup] ${label} - prop selectedValue changed:`, selectedValue);
    setValue(selectedValue || "");
  }, [selectedValue, label]);
  const handleChange = e => {
    // Production: Debug log removed
    // console.log(`🔘 [RadioGroup] ${label} - handleChange:`, e.target.value);
    setValue(e.target.value);
    if (onChange) onChange(e.target.value);
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _RadioGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__form-group"]
  }, label && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: _RadioGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__form-label"]
  }, label), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _RadioGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__radio-group"]
  }, options.map(option => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    key: option.value,
    className: _RadioGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__radio-option"]
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "radio",
    name: name,
    value: option.value,
    checked: value === option.value,
    onChange: handleChange
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: _RadioGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__radio"]
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: _RadioGroup_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]["hvnly_settings_api__radio-label"]
  }, option.label)))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RadioGroup);

/***/ }),

/***/ "./src/settings/components/FormElements/RadioGroup/RadioGroup.module.css":
/*!*******************************************************************************!*\
  !*** ./src/settings/components/FormElements/RadioGroup/RadioGroup.module.css ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// extracted by mini-css-extract-plugin
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"hvnly_settings_api__form-group":"nANXQtVTNY1qYDAeZRRH","hvnly_settings_api__radio-group":"V2Vi_tNYeOZfkrW6iCvn","hvnly_settings_api__radio-option":"mLTWOhFstmzy2An8rvdw","hvnly_settings_api__radio":"twKeEehWjhE5L9qiirsz","hvnly_settings_api__radio-label":"mJe2aHYSHCPfLoitz7C6"});

/***/ }),

/***/ "./src/settings/components/FormElements/SearchDragDropFields/FieldConfigModal.jsx":
/*!****************************************************************************************!*\
  !*** ./src/settings/components/FormElements/SearchDragDropFields/FieldConfigModal.jsx ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../InputGroup/InputGroup */ "./src/settings/components/FormElements/InputGroup/InputGroup.js");
/* harmony import */ var _Modal_Modal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Modal/Modal */ "./src/settings/components/FormElements/Modal/Modal.jsx");
/* harmony import */ var _ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ToggleSwitch/ToggleSwitch */ "./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.js");







/**
 * Field Configuration Modal Component
 *
 * Provides a modal interface for configuring search filter fields
 * with type-specific configuration options.
 * 
 * NOTE: Taxonomy terms are managed in WordPress admin under 
 * "Properties -> Property Taxonomies". This modal only shows info message.
 *
 * @since 2.1.0
 * @param {Object} props Component properties
 * @param {boolean} props.isOpen Modal open state
 * @param {Function} props.onClose Close modal callback
 * @param {Object} props.field Field configuration object
 * @param {Function} props.onSave Save configuration callback
 * @param {Function} props.showToast Toast notification function
 */
const FieldConfigModal = ({
  isOpen,
  onClose,
  field,
  onSave,
  showToast
}) => {
  // State management
  const [config, setConfig] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({});
  const [isSaving, setIsSaving] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);

  // Regular option states
  const [newOptionValue, setNewOptionValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('');
  const [newOptionLabel, setNewOptionLabel] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('');
  const [optionValueError, setOptionValueError] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);

  // Min/Max price option states
  const [newMinOption, setNewMinOption] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('');
  const [newMaxOption, setNewMaxOption] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('');
  const [minOptionError, setMinOptionError] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const [maxOptionError, setMaxOptionError] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);

  // Number preset option state
  const [newPresetOption, setNewPresetOption] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('');
  const [presetOptionError, setPresetOptionError] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);

  // Group field states
  const [groupNewOptionValues, setGroupNewOptionValues] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({});
  const [groupOptionErrors, setGroupOptionErrors] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({});
  const [groupEditingOptionIndex, setGroupEditingOptionIndex] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({});
  const [groupEditOptionValue, setGroupEditOptionValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({});

  /**
   * Initialize configuration when modal opens or field changes
   */
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (field && isOpen) {
      setConfig(field.config || {});
      // Reset all states when field changes
      setOptionValueError(false);
      setMinOptionError(false);
      setMaxOptionError(false);
      setPresetOptionError(false);
      setGroupOptionErrors({});
      setGroupNewOptionValues({});
      setGroupEditingOptionIndex({});
      setGroupEditOptionValue({});
      setNewOptionValue('');
      setNewOptionLabel('');
      setNewMinOption('');
      setNewMaxOption('');
      setNewPresetOption('');
    }
  }, [field, isOpen]);

  // Early return if no field is provided
  if (!field) return null;

  /**
   * Update configuration value
   *
   * @param {string} key Configuration key
   * @param {mixed} value Configuration value
   */
  const handleConfigChange = (key, value) => {
    setConfig(prev => ({
      ...prev,
      [key]: value
    }));
  };

  // =========================================================================
  // Regular Option Handlers (Dropdown & Checkbox)
  // =========================================================================

  /**
   * Add a new option to the options list
   */
  const handleAddOption = () => {
    if (!newOptionValue.trim()) {
      setOptionValueError(true);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Option value is required', 'havenlytics'));
      return;
    }
    setOptionValueError(false);
    const currentOptions = config.options || [];
    const newOption = {
      value: newOptionValue.trim(),
      label: newOptionLabel.trim() || newOptionValue.trim()
    };
    setConfig(prev => ({
      ...prev,
      options: [...currentOptions, newOption]
    }));
    setNewOptionValue('');
    setNewOptionLabel('');
  };

  /**
   * Remove an option from the options list
   *
   * @param {number} index Option index to remove
   */
  const handleRemoveOption = index => {
    const currentOptions = [...(config.options || [])];
    currentOptions.splice(index, 1);
    setConfig(prev => ({
      ...prev,
      options: currentOptions
    }));
  };

  /**
   * Update an option value or label
   *
   * @param {number} index Option index
   * @param {string} fieldName Field to update ('value' or 'label')
   * @param {string} value New value
   */
  const handleUpdateOption = (index, fieldName, value) => {
    const currentOptions = [...(config.options || [])];
    currentOptions[index] = {
      ...currentOptions[index],
      [fieldName]: value
    };
    setConfig(prev => ({
      ...prev,
      options: currentOptions
    }));
  };

  // =========================================================================
  // Min Price Option Handlers (Range Field)
  // =========================================================================

  /**
   * Add a new min price option
   */
  const handleAddMinOption = () => {
    if (!newMinOption.trim()) {
      setMinOptionError(true);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Min price option value is required', 'havenlytics'));
      return;
    }
    setMinOptionError(false);
    const currentOptions = [...(config.minOptions || [])];
    setConfig(prev => ({
      ...prev,
      minOptions: [...currentOptions, newMinOption.trim()]
    }));
    setNewMinOption('');
  };

  /**
   * Remove a min price option
   *
   * @param {number} index Option index to remove
   */
  const handleRemoveMinOption = index => {
    const currentOptions = [...(config.minOptions || [])];
    currentOptions.splice(index, 1);
    setConfig(prev => ({
      ...prev,
      minOptions: currentOptions
    }));
  };

  /**
   * Update a min price option value
   *
   * @param {number} index Option index
   * @param {string} value New value
   */
  const handleUpdateMinOption = (index, value) => {
    const currentOptions = [...(config.minOptions || [])];
    currentOptions[index] = value;
    setConfig(prev => ({
      ...prev,
      minOptions: currentOptions
    }));
  };

  // =========================================================================
  // Max Price Option Handlers (Range Field)
  // =========================================================================

  /**
   * Add a new max price option
   */
  const handleAddMaxOption = () => {
    if (!newMaxOption.trim()) {
      setMaxOptionError(true);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Max price option value is required', 'havenlytics'));
      return;
    }
    setMaxOptionError(false);
    const currentOptions = [...(config.maxOptions || [])];
    setConfig(prev => ({
      ...prev,
      maxOptions: [...currentOptions, newMaxOption.trim()]
    }));
    setNewMaxOption('');
  };

  /**
   * Remove a max price option
   *
   * @param {number} index Option index to remove
   */
  const handleRemoveMaxOption = index => {
    const currentOptions = [...(config.maxOptions || [])];
    currentOptions.splice(index, 1);
    setConfig(prev => ({
      ...prev,
      maxOptions: currentOptions
    }));
  };

  /**
   * Update a max price option value
   *
   * @param {number} index Option index
   * @param {string} value New value
   */
  const handleUpdateMaxOption = (index, value) => {
    const currentOptions = [...(config.maxOptions || [])];
    currentOptions[index] = value;
    setConfig(prev => ({
      ...prev,
      maxOptions: currentOptions
    }));
  };

  // =========================================================================
  // Preset Option Handlers (Number Field)
  // =========================================================================

  /**
   * Add a new preset option
   */
  const handleAddPresetOption = () => {
    if (!newPresetOption.trim()) {
      setPresetOptionError(true);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Preset option value is required', 'havenlytics'));
      return;
    }
    setPresetOptionError(false);
    const currentOptions = [...(config.options || [])];
    setConfig(prev => ({
      ...prev,
      options: [...currentOptions, newPresetOption.trim()]
    }));
    setNewPresetOption('');
  };

  /**
   * Remove a preset option
   *
   * @param {number} index Option index to remove
   */
  const handleRemovePresetOption = index => {
    const currentOptions = [...(config.options || [])];
    currentOptions.splice(index, 1);
    setConfig(prev => ({
      ...prev,
      options: currentOptions
    }));
  };

  /**
   * Update a preset option value
   *
   * @param {number} index Option index
   * @param {string} value New value
   */
  const handleUpdatePresetOption = (index, value) => {
    const currentOptions = [...(config.options || [])];
    currentOptions[index] = value;
    setConfig(prev => ({
      ...prev,
      options: currentOptions
    }));
  };

  // =========================================================================
  // Group Field Option Handlers
  // =========================================================================

  /**
   * Add an option to a group sub-field
   *
   * @param {number} subFieldIndex Sub-field index
   */
  const handleGroupAddOption = subFieldIndex => {
    const currentValue = groupNewOptionValues[subFieldIndex] || '';
    if (!currentValue.trim()) {
      setGroupOptionErrors(prev => ({
        ...prev,
        [subFieldIndex]: true
      }));
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Option value is required', 'havenlytics'));
      return;
    }
    setGroupOptionErrors(prev => ({
      ...prev,
      [subFieldIndex]: false
    }));
    const newSubFields = [...(config.subFields || [])];
    const currentOptions = newSubFields[subFieldIndex].options || [];
    newSubFields[subFieldIndex] = {
      ...newSubFields[subFieldIndex],
      options: [...currentOptions, currentValue.trim()]
    };
    handleConfigChange('subFields', newSubFields);
    setGroupNewOptionValues(prev => ({
      ...prev,
      [subFieldIndex]: ''
    }));
  };

  /**
   * Remove an option from a group sub-field
   *
   * @param {number} subFieldIndex Sub-field index
   * @param {number} optionIndex Option index to remove
   */
  const handleGroupRemoveOption = (subFieldIndex, optionIndex) => {
    const newSubFields = [...(config.subFields || [])];
    const currentOptions = [...(newSubFields[subFieldIndex].options || [])];
    currentOptions.splice(optionIndex, 1);
    newSubFields[subFieldIndex] = {
      ...newSubFields[subFieldIndex],
      options: currentOptions
    };
    handleConfigChange('subFields', newSubFields);
  };

  /**
   * Update an option value in a group sub-field
   *
   * @param {number} subFieldIndex Sub-field index
   * @param {number} optionIndex Option index
   * @param {string} value New value
   */
  const handleGroupUpdateOption = (subFieldIndex, optionIndex, value) => {
    const newSubFields = [...(config.subFields || [])];
    const currentOptions = [...(newSubFields[subFieldIndex].options || [])];
    currentOptions[optionIndex] = value;
    newSubFields[subFieldIndex] = {
      ...newSubFields[subFieldIndex],
      options: currentOptions
    };
    handleConfigChange('subFields', newSubFields);
  };

  /**
   * Start editing a group option
   *
   * @param {number} subFieldIndex Sub-field index
   * @param {number} optionIndex Option index
   * @param {string} currentValue Current option value
   */
  const startGroupEditOption = (subFieldIndex, optionIndex, currentValue) => {
    setGroupEditingOptionIndex(prev => ({
      ...prev,
      [`${subFieldIndex}-${optionIndex}`]: true
    }));
    setGroupEditOptionValue(prev => ({
      ...prev,
      [`${subFieldIndex}-${optionIndex}`]: currentValue
    }));
  };

  /**
   * Save edited group option
   *
   * @param {number} subFieldIndex Sub-field index
   * @param {number} optionIndex Option index
   */
  const saveGroupEditOption = (subFieldIndex, optionIndex) => {
    const newValue = groupEditOptionValue[`${subFieldIndex}-${optionIndex}`];
    if (!newValue || !newValue.trim()) {
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Option value cannot be empty', 'havenlytics'));
      return;
    }
    handleGroupUpdateOption(subFieldIndex, optionIndex, newValue.trim());
    setGroupEditingOptionIndex(prev => {
      const newState = {
        ...prev
      };
      delete newState[`${subFieldIndex}-${optionIndex}`];
      return newState;
    });
    setGroupEditOptionValue(prev => {
      const newState = {
        ...prev
      };
      delete newState[`${subFieldIndex}-${optionIndex}`];
      return newState;
    });
  };

  /**
   * Cancel editing a group option
   *
   * @param {number} subFieldIndex Sub-field index
   * @param {number} optionIndex Option index
   */
  const cancelGroupEditOption = (subFieldIndex, optionIndex) => {
    setGroupEditingOptionIndex(prev => {
      const newState = {
        ...prev
      };
      delete newState[`${subFieldIndex}-${optionIndex}`];
      return newState;
    });
    setGroupEditOptionValue(prev => {
      const newState = {
        ...prev
      };
      delete newState[`${subFieldIndex}-${optionIndex}`];
      return newState;
    });
  };

  /**
   * Save the field configuration
   */
  const handleSave = async () => {
    setIsSaving(true);
    try {
      const updatedField = {
        ...field,
        config: config
      };
      await onSave(updatedField);
      onClose();
    } catch (error) {
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to save field configuration', 'havenlytics'));
    } finally {
      setIsSaving(false);
    }
  };

  /**
   * Render taxonomy info message (without sprintf to avoid errors)
   *
   * @returns {JSX.Element}
   */
  const renderTaxonomyInfo = () => {
    let taxonomyLabel = '';
    if (config.taxonomy) {
      const labels = {
        'hvnly_prop_types': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Property Types', 'havenlytics'),
        'hvnly_prop_locations': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Locations', 'havenlytics'),
        'hvnly_prop_features': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Features', 'havenlytics'),
        'hvnly_prop_tags': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Tags', 'havenlytics'),
        'hvnly_prop_badges': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Badges', 'havenlytics'),
        'hvnly_prop_depts': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Status/Department', 'havenlytics')
      };
      taxonomyLabel = labels[config.taxonomy] || config.taxonomy;
    }
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__info hvnly-field-config__info--taxonomy"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-info-circle"
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Taxonomy Field', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('This field uses taxonomy terms. Terms are managed in WordPress admin under:', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
      style: {
        marginTop: '8px'
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Properties → Property Taxonomies', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
      style: {
        marginTop: '8px',
        fontSize: '12px',
        color: 'var(--hvnly-text-secondary)'
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-external-link-alt"
    }), ' ', (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
      href: "/wp-admin/edit-tags.php?taxonomy=hvnly_prop_types&post_type=hvnly_property",
      target: "_blank",
      rel: "noopener noreferrer"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Manage taxonomy terms', 'havenlytics')))));
  };

  /**
   * Render configuration content based on field type
   *
   * @returns {JSX.Element} Configuration UI for the field type
   */
  const renderConfigContent = () => {
    switch (field.type) {
      case 'range':
        return renderRangeConfig();
      case 'dropdown':
        // If using taxonomy, show info message instead of options
        if (config.useTaxonomy) {
          return renderTaxonomyInfo();
        }
        return renderDropdownConfig();
      case 'checkbox':
        // If using taxonomy, show info message instead of options
        if (config.useTaxonomy) {
          return renderTaxonomyInfo();
        }
        return renderCheckboxConfig();
      case 'number':
        return renderNumberConfig();
      case 'group':
        return renderGroupConfig();
      default:
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
          className: "hvnly-field-config__info"
        }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
          className: "fas fa-info-circle"
        }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('This field type does not require additional configuration.', 'havenlytics')));
    }
  };

  /**
   * Render configuration for range (price) field type
   *
   * @returns {JSX.Element} Range field configuration UI
   */
  const renderRangeConfig = () => {
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__section"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Price Range Settings', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__["default"], {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Min Price Placeholder', 'havenlytics'),
      id: "minPlaceholder",
      value: config.minPlaceholder || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Min Price', 'havenlytics'),
      onChange: value => handleConfigChange('minPlaceholder', value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__["default"], {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Max Price Placeholder', 'havenlytics'),
      id: "maxPlaceholder",
      value: config.maxPlaceholder || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Max Price', 'havenlytics'),
      onChange: value => handleConfigChange('maxPlaceholder', value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__options-list"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
      className: "hvnly-field-config__label"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Min Price Options', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__options-group"
    }, (config.minOptions || ['100000', '200000', '300000', '400000', '500000', '600000', '700000', '800000', '900000', '1000000']).map((opt, idx) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: idx,
      className: "hvnly-field-config__option-item"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: "hvnly-field-config__option-input",
      value: opt,
      onChange: e => handleUpdateMinOption(idx, e.target.value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__option-remove",
      onClick: () => handleRemoveMinOption(idx)
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-trash"
    })))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__add-option-form"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: `hvnly-field-config__option-input ${minOptionError ? 'hvnly-field-config__option-input--error' : ''}`,
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add Min Price Option', 'havenlytics'),
      value: newMinOption,
      onChange: e => {
        setNewMinOption(e.target.value);
        if (minOptionError) setMinOptionError(false);
      },
      onKeyPress: e => {
        if (e.key === 'Enter') {
          handleAddMinOption();
        }
      }
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__add-option",
      onClick: handleAddMinOption
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-plus"
    }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add Min Price Option', 'havenlytics'))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__options-list"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
      className: "hvnly-field-config__label"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Max Price Options', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__options-group"
    }, (config.maxOptions || ['200000', '300000', '400000', '500000', '600000', '700000', '800000', '900000', '1000000', '1500000']).map((opt, idx) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: idx,
      className: "hvnly-field-config__option-item"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: "hvnly-field-config__option-input",
      value: opt,
      onChange: e => handleUpdateMaxOption(idx, e.target.value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__option-remove",
      onClick: () => handleRemoveMaxOption(idx)
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-trash"
    })))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__add-option-form"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: `hvnly-field-config__option-input ${maxOptionError ? 'hvnly-field-config__option-input--error' : ''}`,
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add Max Price Option', 'havenlytics'),
      value: newMaxOption,
      onChange: e => {
        setNewMaxOption(e.target.value);
        if (maxOptionError) setMaxOptionError(false);
      },
      onKeyPress: e => {
        if (e.key === 'Enter') {
          handleAddMaxOption();
        }
      }
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__add-option",
      onClick: handleAddMaxOption
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-plus"
    }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add Max Price Option', 'havenlytics'))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_5__["default"], {
      id: "usePresetValues",
      checked: config.usePresetValues !== false,
      onChange: checked => handleConfigChange('usePresetValues', checked),
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Use Preset Values (Dropdown instead of input)', 'havenlytics')
    })));
  };

  /**
   * Render configuration for dropdown field type (non-taxonomy)
   *
   * @returns {JSX.Element} Dropdown field configuration UI
   */
  const renderDropdownConfig = () => {
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__section"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Dropdown Options', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__["default"], {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Placeholder', 'havenlytics'),
      id: "placeholder",
      value: config.placeholder || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Select an option', 'havenlytics'),
      onChange: value => handleConfigChange('placeholder', value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__options-list"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
      className: "hvnly-field-config__label"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Options', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__options-group"
    }, (config.options || []).map((opt, idx) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: idx,
      className: "hvnly-field-config__option-item"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: "hvnly-field-config__option-input",
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Value', 'havenlytics'),
      value: opt.value,
      onChange: e => handleUpdateOption(idx, 'value', e.target.value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: "hvnly-field-config__option-input",
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Label', 'havenlytics'),
      value: opt.label,
      onChange: e => handleUpdateOption(idx, 'label', e.target.value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__option-remove",
      onClick: () => handleRemoveOption(idx)
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-trash"
    })))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__add-option-form"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: `hvnly-field-config__option-input ${optionValueError ? 'hvnly-field-config__option-input--error' : ''}`,
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Option Value', 'havenlytics'),
      value: newOptionValue,
      onChange: e => {
        setNewOptionValue(e.target.value);
        if (optionValueError) setOptionValueError(false);
      }
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: "hvnly-field-config__option-input",
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Option Label', 'havenlytics'),
      value: newOptionLabel,
      onChange: e => setNewOptionLabel(e.target.value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__add-option",
      onClick: handleAddOption
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-plus"
    }))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_5__["default"], {
      id: "allowCustom",
      checked: config.allowCustom || false,
      onChange: checked => handleConfigChange('allowCustom', checked),
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Allow custom value input', 'havenlytics')
    })));
  };

  /**
   * Render configuration for checkbox field type (non-taxonomy)
   *
   * @returns {JSX.Element} Checkbox field configuration UI
   */
  const renderCheckboxConfig = () => {
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__section"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Checkbox Options', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__options-list"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
      className: "hvnly-field-config__label"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Checkbox Items', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__options-group"
    }, (config.options || []).map((opt, idx) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: idx,
      className: "hvnly-field-config__option-item"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: "hvnly-field-config__option-input",
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Value', 'havenlytics'),
      value: opt.value,
      onChange: e => handleUpdateOption(idx, 'value', e.target.value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: "hvnly-field-config__option-input",
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Label', 'havenlytics'),
      value: opt.label,
      onChange: e => handleUpdateOption(idx, 'label', e.target.value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__option-remove",
      onClick: () => handleRemoveOption(idx)
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-trash"
    })))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__add-option-form"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: `hvnly-field-config__option-input ${optionValueError ? 'hvnly-field-config__option-input--error' : ''}`,
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Option Value', 'havenlytics'),
      value: newOptionValue,
      onChange: e => {
        setNewOptionValue(e.target.value);
        if (optionValueError) setOptionValueError(false);
      }
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: "hvnly-field-config__option-input",
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Option Label', 'havenlytics'),
      value: newOptionLabel,
      onChange: e => setNewOptionLabel(e.target.value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__add-option",
      onClick: handleAddOption
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-plus"
    }))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_5__["default"], {
      id: "selectAllOption",
      checked: config.selectAllOption || false,
      onChange: checked => handleConfigChange('selectAllOption', checked),
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Show "Select All" option', 'havenlytics')
    })));
  };

  /**
   * Render configuration for number field type
   *
   * @returns {JSX.Element} Number field configuration UI
   */
  const renderNumberConfig = () => {
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__section"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Number Field Settings', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__["default"], {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Minimum Value', 'havenlytics'),
      id: "min",
      type: "number",
      value: config.min || 0,
      onChange: value => handleConfigChange('min', parseInt(value, 10))
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__["default"], {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Maximum Value', 'havenlytics'),
      id: "max",
      type: "number",
      value: config.max || 100,
      onChange: value => handleConfigChange('max', parseInt(value, 10))
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__["default"], {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Placeholder', 'havenlytics'),
      id: "placeholder",
      value: config.placeholder || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enter value', 'havenlytics'),
      onChange: value => handleConfigChange('placeholder', value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__options-list"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
      className: "hvnly-field-config__label"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Preset Options (Optional)', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__options-group"
    }, (config.options || []).map((opt, idx) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: idx,
      className: "hvnly-field-config__option-item"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: "hvnly-field-config__option-input",
      value: opt,
      onChange: e => handleUpdatePresetOption(idx, e.target.value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__option-remove",
      onClick: () => handleRemovePresetOption(idx)
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-trash"
    })))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__add-option-form"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: `hvnly-field-config__option-input ${presetOptionError ? 'hvnly-field-config__option-input--error' : ''}`,
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add Preset Option', 'havenlytics'),
      value: newPresetOption,
      onChange: e => {
        setNewPresetOption(e.target.value);
        if (presetOptionError) setPresetOptionError(false);
      },
      onKeyPress: e => {
        if (e.key === 'Enter') {
          handleAddPresetOption();
        }
      }
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__add-option",
      onClick: handleAddPresetOption
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-plus"
    }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add Preset Option', 'havenlytics')))))));
  };

  /**
   * Render configuration for group field type
   *
   * @returns {JSX.Element} Group field configuration UI
   */
  const renderGroupConfig = () => {
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__info"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-layer-group"
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('This is a group field. Configure its sub-fields below.', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__section"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Sub-Fields Configuration', 'havenlytics')), (config.subFields || []).map((subField, idx) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: idx,
      className: "hvnly-field-config__subfield"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h5", null, subField.label), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__["default"], {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Label', 'havenlytics'),
      value: subField.label,
      onChange: value => {
        const newSubFields = [...(config.subFields || [])];
        newSubFields[idx] = {
          ...newSubFields[idx],
          label: value
        };
        handleConfigChange('subFields', newSubFields);
      }
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__options-list"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
      className: "hvnly-field-config__label"
    }, subField.label, " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Options', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__options-group"
    }, (subField.options || []).map((opt, optIdx) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: optIdx,
      className: "hvnly-field-config__option-item"
    }, groupEditingOptionIndex[`${idx}-${optIdx}`] ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: "hvnly-field-config__option-input",
      value: groupEditOptionValue[`${idx}-${optIdx}`] || '',
      onChange: e => setGroupEditOptionValue(prev => ({
        ...prev,
        [`${idx}-${optIdx}`]: e.target.value
      })),
      autoFocus: true
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__option-save",
      onClick: () => saveGroupEditOption(idx, optIdx),
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Save', 'havenlytics')
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-check"
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__option-cancel",
      onClick: () => cancelGroupEditOption(idx, optIdx),
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cancel', 'havenlytics')
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-times"
    }))) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "hvnly-field-config__option-value"
    }, opt), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__option-edit",
      onClick: () => startGroupEditOption(idx, optIdx, opt),
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Edit', 'havenlytics')
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-edit"
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__option-remove",
      onClick: () => handleGroupRemoveOption(idx, optIdx),
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Delete', 'havenlytics')
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-trash"
    }))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-field-config__add-option-form"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: `hvnly-field-config__option-input ${groupOptionErrors[idx] ? 'hvnly-field-config__option-input--error' : ''}`,
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add new option', 'havenlytics'),
      value: groupNewOptionValues[idx] || '',
      onChange: e => {
        setGroupNewOptionValues(prev => ({
          ...prev,
          [idx]: e.target.value
        }));
        if (groupOptionErrors[idx]) {
          setGroupOptionErrors(prev => ({
            ...prev,
            [idx]: false
          }));
        }
      },
      onKeyPress: e => {
        if (e.key === 'Enter') {
          handleGroupAddOption(idx);
        }
      }
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-field-config__add-option",
      onClick: () => handleGroupAddOption(idx)
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-plus"
    }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add Option', 'havenlytics')))))))));
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Modal_Modal__WEBPACK_IMPORTED_MODULE_4__["default"], {
    isOpen: isOpen,
    onClose: onClose,
    onConfirm: handleSave,
    title: `${(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Configure', 'havenlytics')}: ${field.title}`,
    size: "large",
    confirmText: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Save Configuration', 'havenlytics'),
    isLoading: isSaving
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-field-config-modal-content"
  }, renderConfigContent()));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FieldConfigModal);

/***/ }),

/***/ "./src/settings/components/FormElements/SearchDragDropFields/SearchDragDropFields.css":
/*!********************************************************************************************!*\
  !*** ./src/settings/components/FormElements/SearchDragDropFields/SearchDragDropFields.css ***!
  \********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./src/settings/components/FormElements/SearchDragDropFields/SearchDragDropFields.jsx":
/*!********************************************************************************************!*\
  !*** ./src/settings/components/FormElements/SearchDragDropFields/SearchDragDropFields.jsx ***!
  \********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @dnd-kit/core */ "./node_modules/@dnd-kit/core/dist/core.esm.js");
/* harmony import */ var _dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dnd-kit/sortable */ "./node_modules/@dnd-kit/sortable/dist/sortable.esm.js");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js");
/* harmony import */ var _FieldConfigModal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./FieldConfigModal */ "./src/settings/components/FormElements/SearchDragDropFields/FieldConfigModal.jsx");
/* harmony import */ var _SearchDragDropFields_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SearchDragDropFields.css */ "./src/settings/components/FormElements/SearchDragDropFields/SearchDragDropFields.css");
/* harmony import */ var _SortableFieldItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SortableFieldItem */ "./src/settings/components/FormElements/SearchDragDropFields/SortableFieldItem.jsx");










/**
 * Search Drag and Drop Fields Component
 *
 * Provides an interactive interface for managing dynamic search filter fields
 * with drag-and-drop reordering, enable/disable toggles, inline editing,
 * and configuration options for each field type.
 *
 * @since 2.1.0
 * @param {Object} props Component properties
 * @param {Function} props.showToast Toast notification function
 * @param {Function} props.onFieldsChange Callback when fields are modified
 * @param {Array} props.initialFields Initial field configuration array
 */
const SearchDragDropFields = ({
  showToast,
  onFieldsChange,
  initialFields = []
}) => {
  // State management
  const [searchFields, setSearchFields] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)([]);
  const [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(true);
  const [editingField, setEditingField] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(null);
  const [editTitle, setEditTitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)('');
  const [editType, setEditType] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)('text');

  // Config modal state
  const [configModalOpen, setConfigModalOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(false);
  const [configField, setConfigField] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(null);

  // Ref to prevent race conditions during save operations
  const isSavingRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(false);
  const pendingSaveRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);

  // API configuration
  const API_BASE = window.HavenlyticsData?.hvnlyNabApi?.url || '/wp-json/hvnlynab/v1';
  const API_NONCE = window.HavenlyticsData?.hvnlyNabApi?.nonce || '';
  const SETTINGS_ENDPOINT = `${API_BASE}/plugin-settings/search`;
  const AXIOS_CONFIG = {
    headers: {
      'X-WP-Nonce': API_NONCE,
      'Content-Type': 'application/json'
    }
  };

  // Configure drag-and-drop sensors
  const sensors = (0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.useSensors)((0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.useSensor)(_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.PointerSensor, {
    activationConstraint: {
      distance: 5 // Minimum drag distance before activation
    }
  }), (0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.useSensor)(_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.KeyboardSensor));

  /**
   * Default search fields configuration
   * Provides sensible defaults for all field types with their respective
   * configuration options and settings.
   */
  const DEFAULT_SEARCH_FIELDS = [{
    id: 'price',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Price', 'havenlytics'),
    type: 'range',
    enabled: true,
    order: 1,
    is_default: true,
    config: {
      minPlaceholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Min Price', 'havenlytics'),
      maxPlaceholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Max Price', 'havenlytics'),
      minOptions: ['100000', '200000', '300000', '400000', '500000', '600000', '700000', '800000', '900000', '1000000'],
      maxOptions: ['200000', '300000', '400000', '500000', '600000', '700000', '800000', '900000', '1000000', '1500000'],
      usePresetValues: true
    }
  }, {
    id: 'status',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Status', 'havenlytics'),
    type: 'dropdown',
    enabled: true,
    order: 2,
    is_default: true,
    config: {
      useTaxonomy: true,
      taxonomy: 'hvnly_prop_depts',
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select Status', 'havenlytics')
    }
  }, {
    id: 'bedrooms_bathrooms',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Bedrooms & Bathrooms', 'havenlytics'),
    type: 'group',
    enabled: true,
    order: 3,
    is_default: true,
    config: {
      subFields: [{
        id: 'bedrooms',
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Bedrooms', 'havenlytics'),
        type: 'number',
        options: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
      }, {
        id: 'bathrooms',
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Bathrooms', 'havenlytics'),
        type: 'number',
        options: ['0', '1', '2', '3', '4', '5', '6', '7', '8']
      }]
    }
  }, {
    id: 'reception_rooms',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Reception Rooms', 'havenlytics'),
    type: 'number',
    enabled: true,
    order: 4,
    is_default: true,
    config: {
      min: 0,
      max: 10,
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Any', 'havenlytics'),
      options: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
    }
  }, {
    id: 'property_types',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Property Types', 'havenlytics'),
    type: 'checkbox',
    enabled: true,
    order: 5,
    is_default: true,
    config: {
      useTaxonomy: true,
      taxonomy: 'hvnly_prop_types',
      selectAllOption: true
    }
  }, {
    id: 'locations',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Locations', 'havenlytics'),
    type: 'dropdown',
    enabled: true,
    order: 6,
    is_default: true,
    config: {
      useTaxonomy: true,
      taxonomy: 'hvnly_prop_locations',
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select Location', 'havenlytics')
    }
  }, {
    id: 'features',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Features', 'havenlytics'),
    type: 'checkbox',
    enabled: true,
    order: 7,
    is_default: true,
    config: {
      useTaxonomy: true,
      taxonomy: 'hvnly_prop_features',
      selectAllOption: true
    }
  }, {
    id: 'tags',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Tags', 'havenlytics'),
    type: 'dropdown',
    enabled: true,
    order: 8,
    is_default: true,
    config: {
      useTaxonomy: true,
      taxonomy: 'hvnly_prop_tags',
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select Tags', 'havenlytics')
    }
  }, {
    id: 'badges',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Badges', 'havenlytics'),
    type: 'checkbox',
    enabled: true,
    order: 9,
    is_default: true,
    config: {
      useTaxonomy: true,
      taxonomy: 'hvnly_prop_badges',
      selectAllOption: true
    }
  }, {
    id: 'property_id',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Property ID', 'havenlytics'),
    type: 'text',
    enabled: true,
    order: 10,
    is_default: true,
    config: {
      isLocked: true,
      cannotDelete: true,
      cannotEdit: true
    }
  }];

  /**
   * Initialize component with initial fields or load from API
   */
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
    if (initialFields && initialFields.length > 0) {
      const sortedFields = [...initialFields].sort((a, b) => (a.order || 0) - (b.order || 0));
      setSearchFields(sortedFields);
      setIsLoading(false);
    } else {
      loadSearchFields();
    }
  }, [initialFields]);

  /**
   * Load search fields from REST API
   * Fetches saved field configuration or falls back to defaults
   */
  const loadSearchFields = async () => {
    setIsLoading(true);
    try {
      const response = await axios__WEBPACK_IMPORTED_MODULE_5__["default"].get(SETTINGS_ENDPOINT, AXIOS_CONFIG);
      if (response.data?.success && response.data?.data) {
        const searchData = response.data.data;
        let fields = searchData.hvnly_search_fields || searchData.search_fields || [];
        if (fields.length > 0) {
          fields.sort((a, b) => (a.order || 0) - (b.order || 0));
          setSearchFields(fields);
          if (onFieldsChange) {
            onFieldsChange(fields);
          }
        } else {
          // If no fields, use defaults
          setSearchFields([...DEFAULT_SEARCH_FIELDS]);
          if (onFieldsChange) {
            onFieldsChange([...DEFAULT_SEARCH_FIELDS]);
          }
        }
      } else {
        // If API fails, use defaults
        setSearchFields([...DEFAULT_SEARCH_FIELDS]);
        if (onFieldsChange) {
          onFieldsChange([...DEFAULT_SEARCH_FIELDS]);
        }
      }
    } catch (error) {
      // On error, use defaults
      setSearchFields([...DEFAULT_SEARCH_FIELDS]);
      if (onFieldsChange) {
        onFieldsChange([...DEFAULT_SEARCH_FIELDS]);
      }
      if (showToast) {
        showToast('warning', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Notice', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Using default search fields', 'havenlytics'));
      }
    } finally {
      setIsLoading(false);
    }
  };

  /**
   * Save search fields to REST API with race condition prevention
   * Uses refs to queue pending saves while an active save is in progress
   *
   * @param {Array} fields Field configuration to save
   * @returns {Promise<boolean>} Save success status
   */
  const saveSearchFields = async fields => {
    if (isSavingRef.current) {
      pendingSaveRef.current = fields;
      return;
    }
    isSavingRef.current = true;
    try {
      const response = await axios__WEBPACK_IMPORTED_MODULE_5__["default"].get(SETTINGS_ENDPOINT, AXIOS_CONFIG);
      const currentSettings = response.data?.data || {};
      const updatedSettings = {
        ...currentSettings
      };
      updatedSettings.hvnly_search_fields = fields;
      if (updatedSettings.search_fields) {
        delete updatedSettings.search_fields;
      }
      const saveResponse = await axios__WEBPACK_IMPORTED_MODULE_5__["default"].post(SETTINGS_ENDPOINT, updatedSettings, AXIOS_CONFIG);
      if (saveResponse.data?.success) {
        if (onFieldsChange) {
          onFieldsChange(fields);
        }
        if (pendingSaveRef.current) {
          const pending = pendingSaveRef.current;
          pendingSaveRef.current = null;
          setTimeout(() => saveSearchFields(pending), 100);
        }
        return true;
      }
      return false;
    } catch (error) {
      if (showToast) {
        showToast('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Failed to save search fields', 'havenlytics'));
      }
      return false;
    } finally {
      isSavingRef.current = false;
    }
  };

  /**
   * Move field up in order
   *
   * @param {string} id Field ID to move
   */
  const moveFieldUp = id => {
    setSearchFields(prev => {
      const index = prev.findIndex(field => field.id === id);
      if (index === 0) return prev;
      const newFields = [...prev];
      [newFields[index - 1], newFields[index]] = [newFields[index], newFields[index - 1]];

      // Update order numbers
      newFields.forEach((field, idx) => {
        field.order = idx + 1;
      });
      setTimeout(() => saveSearchFields(newFields), 0);
      return newFields;
    });
  };

  /**
   * Move field down in order
   *
   * @param {string} id Field ID to move
   */
  const moveFieldDown = id => {
    setSearchFields(prev => {
      const index = prev.findIndex(field => field.id === id);
      if (index === prev.length - 1) return prev;
      const newFields = [...prev];
      [newFields[index], newFields[index + 1]] = [newFields[index + 1], newFields[index]];

      // Update order numbers
      newFields.forEach((field, idx) => {
        field.order = idx + 1;
      });
      setTimeout(() => saveSearchFields(newFields), 0);
      return newFields;
    });
  };

  /**
   * Toggle field enabled/disabled status
   *
   * @param {string} id Field ID to toggle
   */
  const toggleField = id => {
    setSearchFields(prev => {
      const newFields = prev.map(field => field.id === id ? {
        ...field,
        enabled: !field.enabled
      } : field);
      setTimeout(() => saveSearchFields(newFields), 0);
      return newFields;
    });
  };

  /**
   * Start inline editing for a field
   *
   * @param {Object} field Field to edit
   */
  const startEditing = field => {
    setEditingField(field.id);
    setEditTitle(field.title);
    setEditType(field.type);
  };

  /**
   * Save inline edit changes
   */
  const saveEdit = () => {
    if (!editTitle.trim()) {
      if (showToast) {
        showToast('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Field title cannot be empty', 'havenlytics'));
      }
      return;
    }
    setSearchFields(prev => {
      const newFields = prev.map(field => field.id === editingField ? {
        ...field,
        title: editTitle,
        type: editType
      } : field);
      setTimeout(() => saveSearchFields(newFields), 0);
      return newFields;
    });
    setEditingField(null);
    if (showToast) {
      showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Field title updated!', 'havenlytics'));
    }
  };

  /**
   * Cancel inline editing
   */
  const cancelEdit = () => {
    setEditingField(null);
  };

  /**
   * Open configuration modal for a field
   *
   * @param {Object} field Field to configure
   */
  const handleConfigureField = field => {
    setConfigField(field);
    setConfigModalOpen(true);
  };

  /**
   * Save field configuration changes
   *
   * @param {Object} updatedField Updated field configuration
   */
  const handleSaveFieldConfig = async updatedField => {
    setSearchFields(prev => {
      const newFields = prev.map(field => field.id === updatedField.id ? updatedField : field);
      setTimeout(() => saveSearchFields(newFields), 0);
      return newFields;
    });
    showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Field configuration saved!', 'havenlytics'));
  };

  /**
   * Handle drag-and-drop reordering
   *
   * @param {Object} event Drag end event
   */
  const handleDragEnd = event => {
    const {
      active,
      over
    } = event;
    if (active.id !== over.id) {
      setSearchFields(items => {
        const oldIndex = items.findIndex(item => item.id === active.id);
        const newIndex = items.findIndex(item => item.id === over.id);
        const newItems = [...items];
        const [movedItem] = newItems.splice(oldIndex, 1);
        newItems.splice(newIndex, 0, movedItem);

        // Update order numbers
        newItems.forEach((item, index) => {
          item.order = index + 1;
        });
        setTimeout(() => saveSearchFields(newItems), 0);
        return newItems;
      });
    }
  };

  /**
   * Get human-readable label for field type
   *
   * @param {string} type Field type identifier
   * @returns {string} Display label
   */
  const getTypeLabel = type => {
    const types = {
      'text': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Text', 'havenlytics'),
      'number': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Number', 'havenlytics'),
      'dropdown': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Dropdown', 'havenlytics'),
      'checkbox': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Checkbox', 'havenlytics'),
      'range': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Range', 'havenlytics'),
      'group': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Group', 'havenlytics'),
      'date': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Date', 'havenlytics')
    };
    return types[type] || type;
  };

  // Loading state
  if (isLoading) {
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly_settings_api_search_drag_drop_builder"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly_settings_api_search_drag_drop_loading"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-spinner fa-spin"
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Loading search fields...', 'havenlytics'))));
  }
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_settings_api_search_drag_drop_builder"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_settings_api_search_drag_drop_header"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-list"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Manage Search Filter Fields', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "hvnly_settings_api_search_drag_drop_hint"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Drag to reorder | Click Edit to rename | Click Configure to set options', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_settings_api_search_drag_drop_body"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.DndContext, {
    sensors: sensors,
    collisionDetection: _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.closestCenter,
    onDragEnd: handleDragEnd
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_2__.SortableContext, {
    items: searchFields.map(f => f.id),
    strategy: _dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_2__.verticalListSortingStrategy
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_settings_api_search_drag_drop_list"
  }, searchFields.length > 0 ? searchFields.map((field, index) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_SortableFieldItem__WEBPACK_IMPORTED_MODULE_8__["default"], {
    key: field.id,
    field: {
      ...field,
      typeLabel: getTypeLabel(field.type)
    },
    index: index,
    onMoveUp: moveFieldUp,
    onMoveDown: moveFieldDown,
    onToggle: toggleField,
    onEdit: startEditing,
    onConfigure: handleConfigureField,
    isEditing: editingField === field.id,
    editTitle: editTitle,
    editType: editType,
    onEditTitleChange: setEditTitle,
    onEditTypeChange: setEditType,
    onSaveEdit: saveEdit,
    onCancelEdit: cancelEdit,
    fieldsLength: searchFields.length,
    isDefault: field.is_default
  })) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    style: {
      textAlign: 'center',
      padding: '40px'
    }
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('No search fields found.', 'havenlytics')))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FieldConfigModal__WEBPACK_IMPORTED_MODULE_6__["default"], {
    isOpen: configModalOpen,
    onClose: () => {
      setConfigModalOpen(false);
      setConfigField(null);
    },
    field: configField,
    onSave: handleSaveFieldConfig,
    showToast: showToast
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchDragDropFields);

/***/ }),

/***/ "./src/settings/components/FormElements/SearchDragDropFields/SortableFieldItem.jsx":
/*!*****************************************************************************************!*\
  !*** ./src/settings/components/FormElements/SearchDragDropFields/SortableFieldItem.jsx ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @dnd-kit/sortable */ "./node_modules/@dnd-kit/sortable/dist/sortable.esm.js");
/* harmony import */ var _dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dnd-kit/utilities */ "./node_modules/@dnd-kit/utilities/dist/utilities.esm.js");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);




const SortableFieldItem = ({
  field,
  index,
  onMoveUp,
  onMoveDown,
  onToggle,
  onEdit,
  onConfigure,
  isEditing,
  editTitle,
  editType,
  onEditTitleChange,
  onEditTypeChange,
  onSaveEdit,
  onCancelEdit,
  fieldsLength,
  isDefault
}) => {
  const {
    attributes,
    listeners,
    setNodeRef,
    transform,
    transition,
    isDragging
  } = (0,_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.useSortable)({
    id: field.id
  });
  const style = {
    transform: _dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.CSS.Transform.toString(transform),
    transition,
    opacity: isDragging ? 0.6 : 1
  };
  const hasConfigurableOptions = () => {
    const configurableTypes = ['range', 'dropdown', 'checkbox', 'number', 'group'];
    return configurableTypes.includes(field.type);
  };
  const hasConfig = () => {
    return field.config && Object.keys(field.config).length > 0;
  };

  // Check if field is locked (Property ID cannot be configured)
  const isLocked = field.id === 'property_id';
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    ref: setNodeRef,
    style: style,
    className: `hvnly_settings_api_search_drag_drop_builder_item ${isDragging ? 'dragging' : ''}`
  }, isEditing ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_settings_api_search_drag_drop_builder_edit_form"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_settings_api__form-group"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "text",
    className: "hvnly_settings_api__form-control",
    value: editTitle,
    onChange: e => onEditTitleChange(e.target.value),
    placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Field title', 'havenlytics')
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_settings_api_search_drag_drop_builder_edit_actions"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_settings_api__modern-btn hvnly_settings_api__modern-btn--primary",
    onClick: onSaveEdit
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-check"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Save', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_settings_api__modern-btn hvnly_settings_api__modern-btn--secondary",
    onClick: onCancelEdit
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-times"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Cancel', 'havenlytics')))) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_settings_api_search_drag_drop_builder_item_handle",
    ...attributes,
    ...listeners
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-grip-vertical"
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_settings_api_search_drag_drop_builder_item_content"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_settings_api_search_drag_drop_builder_item_title"
  }, field.title, isDefault && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "hvnly-default-badge"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Default', 'havenlytics')), isLocked && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "hvnly-locked-badge"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-lock"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Locked', 'havenlytics')), hasConfig() && !isLocked && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "hvnly-configured-badge"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-check-circle"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Configured', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_settings_api_search_drag_drop_builder_item_type"
  }, field.typeLabel || field.type)), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_settings_api_search_drag_drop_builder_item_actions"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_settings_api_search_drag_drop_builder_item_action_btn",
    onClick: () => onToggle(field.id),
    title: field.enabled ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Disable', 'havenlytics') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Enable', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: field.enabled ? 'fas fa-toggle-on' : 'fas fa-toggle-off'
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_settings_api_search_drag_drop_builder_item_action_btn",
    onClick: () => onMoveUp(field.id),
    disabled: index === 0,
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Move Up', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-arrow-up"
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_settings_api_search_drag_drop_builder_item_action_btn",
    onClick: () => onMoveDown(field.id),
    disabled: index === fieldsLength - 1,
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Move Down', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-arrow-down"
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_settings_api_search_drag_drop_builder_item_action_btn",
    onClick: () => onEdit(field),
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Edit Title', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-edit"
  })), hasConfigurableOptions() && !isLocked && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_settings_api_search_drag_drop_builder_item_action_btn",
    onClick: () => onConfigure(field),
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Configure Field Options', 'havenlytics'),
    style: {
      color: 'var(--hvnly-brand-primary)'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-cog"
  })))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SortableFieldItem);

/***/ }),

/***/ "./src/settings/components/FormElements/SelectDropDown/SelectDropDown.js":
/*!*******************************************************************************!*\
  !*** ./src/settings/components/FormElements/SelectDropDown/SelectDropDown.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _SelectDropDown_module_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SelectDropDown.module.css */ "./src/settings/components/FormElements/SelectDropDown/SelectDropDown.module.css");




const SelectDropDown = ({
  label,
  id,
  value,
  options,
  onChange,
  disabled = false
}) => {
  const [isOpen, setIsOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const [dropdownPosition, setDropdownPosition] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({
    top: 0,
    left: 0,
    width: 0
  });
  const triggerRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
  const dropdownRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);

  // Close dropdown when clicking outside
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    const handleClickOutside = event => {
      if (triggerRef.current && !triggerRef.current.contains(event.target) && dropdownRef.current && !dropdownRef.current.contains(event.target)) {
        setIsOpen(false);
      }
    };
    document.addEventListener("mousedown", handleClickOutside);
    return () => {
      document.removeEventListener("mousedown", handleClickOutside);
    };
  }, []);

  // Calculate dropdown position when open
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (isOpen && triggerRef.current) {
      const rect = triggerRef.current.getBoundingClientRect();
      const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
      const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;
      const spaceBelow = window.innerHeight - rect.bottom;
      const dropdownHeight = 250; // Max height of dropdown

      let top;
      if (spaceBelow < dropdownHeight && rect.top > dropdownHeight) {
        // Position above
        top = rect.top + scrollTop - dropdownHeight - 5;
      } else {
        // Position below
        top = rect.bottom + scrollTop + 5;
      }
      setDropdownPosition({
        top: top,
        left: rect.left + scrollLeft,
        width: rect.width
      });
    }
  }, [isOpen]);
  const handleSelectChange = selectedValue => {
    if (disabled) return; // Don't allow selection when disabled
    onChange(selectedValue);
    setIsOpen(false);
  };
  const toggleDropdown = () => {
    if (disabled) return; // Don't toggle when disabled
    setIsOpen(!isOpen);
  };
  const selectedOption = options.find(opt => String(opt.value) === String(value));
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _SelectDropDown_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]["hvnly_settings_api__form-group"]
  }, label && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    htmlFor: id,
    className: `${_SelectDropDown_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]["hvnly_settings_api__form-label"]} ${disabled ? _SelectDropDown_module_css__WEBPACK_IMPORTED_MODULE_3__["default"].disabled_label : ''}`
  }, label), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    ref: triggerRef,
    className: `${_SelectDropDown_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]["hvnly_settings_api__form-control"]} ${_SelectDropDown_module_css__WEBPACK_IMPORTED_MODULE_3__["default"].custom_dropdown} ${disabled ? _SelectDropDown_module_css__WEBPACK_IMPORTED_MODULE_3__["default"].disabled : ''}`,
    onClick: toggleDropdown,
    tabIndex: disabled ? -1 : 0,
    "aria-haspopup": "listbox",
    "aria-expanded": isOpen,
    "aria-disabled": disabled
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, selectedOption?.label || "Select an option"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
    className: `${_SelectDropDown_module_css__WEBPACK_IMPORTED_MODULE_3__["default"].dropdown_icon} ${isOpen ? _SelectDropDown_module_css__WEBPACK_IMPORTED_MODULE_3__["default"].rotate : ""}`,
    width: "16",
    height: "16",
    viewBox: "0 0 24 24",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
    d: "M6 9L12 15L18 9",
    stroke: "currentColor",
    strokeWidth: "2",
    strokeLinecap: "round",
    strokeLinejoin: "round"
  }))), isOpen && !disabled && (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.createPortal)((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    ref: dropdownRef,
    className: _SelectDropDown_module_css__WEBPACK_IMPORTED_MODULE_3__["default"].dropdown_options_portal,
    style: {
      position: 'absolute',
      top: `${dropdownPosition.top}px`,
      left: `${dropdownPosition.left}px`,
      width: `${dropdownPosition.width}px`,
      zIndex: 999999
    },
    role: "listbox",
    "aria-labelledby": id
  }, options.map(opt => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    key: opt.value,
    className: `${_SelectDropDown_module_css__WEBPACK_IMPORTED_MODULE_3__["default"].option} ${String(value) === String(opt.value) ? _SelectDropDown_module_css__WEBPACK_IMPORTED_MODULE_3__["default"].selected : ""}`,
    onClick: () => handleSelectChange(opt.value),
    role: "option",
    "aria-selected": String(value) === String(opt.value)
  }, opt.label))), document.body));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SelectDropDown);

/***/ }),

/***/ "./src/settings/components/FormElements/SelectDropDown/SelectDropDown.module.css":
/*!***************************************************************************************!*\
  !*** ./src/settings/components/FormElements/SelectDropDown/SelectDropDown.module.css ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// extracted by mini-css-extract-plugin
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"hvnly_settings_api__form-group":"NTLFMCm5qKVP2GLi9vrh","hvnly_settings_api__form-label":"V3cmKoSkNLv0vj6IQOta","hvnly_settings_api__form-control":"GC0zRjJ4zUQZY9NNn4pW","custom_dropdown":"E2XROm4mKPiJwglJIX4B","dropdown_icon":"Z0Z4n18yC3SNcX4zyFfF","rotate":"uC5OVFf2qJGusg6KmkSb","dropdown_options_portal":"NGqdVGLoPTqFGqYZBT9q","option":"xHs6Ho0LKj2fKfhZtyim","selected":"lfu6dfbcyYqsLhhTMXYi","disabled":"LWlPVvko76OZJUmUHGVS","disabled_label":"dA2_U3K8N5uXs_smaB64"});

/***/ }),

/***/ "./src/settings/components/FormElements/TabActionButtons/TabActionButtons.js":
/*!***********************************************************************************!*\
  !*** ./src/settings/components/FormElements/TabActionButtons/TabActionButtons.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);



// import './TabActionButtons.css';

const TabActionButtons = ({
  onSave,
  onReset,
  showToast,
  saveLabel,
  resetLabel,
  className = '',
  disabled = false
}) => {
  const [isSaving, setIsSaving] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const [isResetting, setIsResetting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const handleSave = async () => {
    if (isSaving || isResetting || !onSave) return;
    setIsSaving(true);
    try {
      await onSave();
    } catch (error) {
      console.error('Save error:', error);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), error.message || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to save settings', 'havenlytics'));
    } finally {
      setIsSaving(false);
    }
  };
  const handleReset = async () => {
    if (isSaving || isResetting || !onReset) return;

    // Use custom alert for confirmation dialog only
    if (window.HvnlyNabAlert) {
      const confirmed = await window.HvnlyNabAlert.confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Are you sure you want to reset all settings? This cannot be undone.', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Reset Settings?', 'havenlytics'));
      if (confirmed !== 'confirm') return;
    } else {
      // Fallback to native confirm if custom alert not available
      const confirmed = window.confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Are you sure you want to reset all settings? This cannot be undone.', 'havenlytics'));
      if (!confirmed) return;
    }
    setIsResetting(true);
    try {
      // Call the parent's onReset function and wait for it to complete
      const result = await onReset();
      console.log('TabActionButtons - Reset result:', result);
      // The success toast is handled by the parent component (SettingsApp)
    } catch (error) {
      console.error('Reset error:', error);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), error.message || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to reset settings', 'havenlytics'));
    } finally {
      setIsResetting(false);
    }
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `hvnly-settings-api__tab-actions ${className}`
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    type: "button",
    className: "hvnly-settings-api__modern-btn hvnly-settings-api__modern-btn--secondary",
    onClick: handleReset,
    disabled: disabled || isSaving || isResetting
  }, isResetting ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-spinner fa-spin"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Resetting...', 'havenlytics'))) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-undo"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, resetLabel || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Reset Changes', 'havenlytics')))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    type: "button",
    className: "hvnly-settings-api__modern-btn hvnly-settings-api__modern-btn--primary",
    onClick: handleSave,
    disabled: disabled || isSaving || isResetting
  }, isSaving ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-spinner fa-spin"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Saving...', 'havenlytics'))) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-save"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, saveLabel || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Save Settings', 'havenlytics')))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TabActionButtons);

/***/ }),

/***/ "./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.js":
/*!***************************************************************************!*\
  !*** ./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _ToggleSwitch_module_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ToggleSwitch.module.css */ "./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.module.css");



const ToggleSwitch = ({
  id,
  checked,
  onChange,
  label
}) => {
  // Use internal state to track the checked value
  const [isChecked, setIsChecked] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);

  // Update internal state when prop changes
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    // Ensure checked is a boolean - handle all possible values
    const checkedValue = checked === true || checked === 1 || checked === '1' || checked === 'true';
    setIsChecked(checkedValue);
  }, [checked]);
  const handleChange = e => {
    const newValue = e.target.checked;
    setIsChecked(newValue);
    if (onChange) {
      onChange(newValue);
    }
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _ToggleSwitch_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['hvnly-settings-api__toggle-group']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: _ToggleSwitch_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['hvnly-settings-api__toggle']
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "checkbox",
    id: id,
    checked: isChecked,
    onChange: handleChange
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: _ToggleSwitch_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['hvnly-settings-api__slider']
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: _ToggleSwitch_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['hvnly-settings-api__toggle-label']
  }, label));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ToggleSwitch);

/***/ }),

/***/ "./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.module.css":
/*!***********************************************************************************!*\
  !*** ./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.module.css ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// extracted by mini-css-extract-plugin
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"hvnly_settings_api__form-group":"RqBcfMS2pfmTyAcOAnTK","hvnly-settings-api__toggle":"o4HhavOJDJ378yv5sVDy","hvnly-settings-api__slider":"FDmv2IiiC_fGRLIY_vv7","hvnly-settings-api__toggle-label":"eX8lWN9OlPAetMfRLVJO","hvnly-settings-api__toggle-group":"_mzrl8aSU6NJtq185gul"});

/***/ }),

/***/ "./src/settings/components/FormElements/TopSearchFields/SortableTopFieldItem.jsx":
/*!***************************************************************************************!*\
  !*** ./src/settings/components/FormElements/TopSearchFields/SortableTopFieldItem.jsx ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @dnd-kit/sortable */ "./node_modules/@dnd-kit/sortable/dist/sortable.esm.js");
/* harmony import */ var _dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dnd-kit/utilities */ "./node_modules/@dnd-kit/utilities/dist/utilities.esm.js");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);




const SortableTopFieldItem = ({
  field,
  index,
  onMoveUp,
  onMoveDown,
  onToggle,
  onEdit,
  onConfigure,
  isEditing,
  editTitle,
  onEditTitleChange,
  onSaveEdit,
  onCancelEdit,
  fieldsLength,
  isDefault
}) => {
  const {
    attributes,
    listeners,
    setNodeRef,
    transform,
    transition,
    isDragging
  } = (0,_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.useSortable)({
    id: field.id
  });
  const style = {
    transform: _dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.CSS.Transform.toString(transform),
    transition,
    opacity: isDragging ? 0.6 : 1
  };
  const hasConfigurableOptions = () => {
    const configurableTypes = ['range', 'dropdown', 'checkbox', 'number', 'group'];
    return configurableTypes.includes(field.type);
  };
  const hasConfig = () => {
    return field.config && Object.keys(field.config).length > 0;
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    ref: setNodeRef,
    style: style,
    className: `hvnly_top_search_fields_drag_drop_builder_item ${isDragging ? 'dragging' : ''}`
  }, isEditing ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_top_search_fields_drag_drop_edit_form"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_top_search_fields__form-group"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "text",
    className: "hvnly_top_search_fields__form-control",
    value: editTitle,
    onChange: e => onEditTitleChange(e.target.value),
    placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Field title', 'havenlytics')
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_top_search_fields_drag_drop_edit_actions"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_top_search_fields__modern-btn hvnly_top_search_fields__modern-btn--primary",
    onClick: onSaveEdit
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-check"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Save', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_top_search_fields__modern-btn hvnly_top_search_fields__modern-btn--secondary",
    onClick: onCancelEdit
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-times"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Cancel', 'havenlytics')))) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_top_search_fields_drag_drop_builder_item_handle",
    ...attributes,
    ...listeners
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-grip-vertical"
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_top_search_fields_drag_drop_builder_item_content"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_top_search_fields_drag_drop_builder_item_title"
  }, field.title, isDefault && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "hvnly-top-default-badge"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Default', 'havenlytics')), hasConfig() && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "hvnly-top-configured-badge"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-check-circle"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Configured', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_top_search_fields_drag_drop_builder_item_type"
  }, field.typeLabel || field.type)), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_top_search_fields_drag_drop_builder_item_actions"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_top_search_fields_drag_drop_builder_item_action_btn",
    onClick: () => onToggle(field.id),
    title: field.enabled ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Disable', 'havenlytics') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Enable', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: field.enabled ? 'fas fa-toggle-on' : 'fas fa-toggle-off'
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_top_search_fields_drag_drop_builder_item_action_btn",
    onClick: () => onMoveUp(field.id),
    disabled: index === 0,
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Move Up', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-arrow-up"
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_top_search_fields_drag_drop_builder_item_action_btn",
    onClick: () => onMoveDown(field.id),
    disabled: index === fieldsLength - 1,
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Move Down', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-arrow-down"
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_top_search_fields_drag_drop_builder_item_action_btn",
    onClick: () => onEdit(field),
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Edit Title', 'havenlytics')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-edit"
  })), hasConfigurableOptions() && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly_top_search_fields_drag_drop_builder_item_action_btn",
    onClick: () => onConfigure(field),
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Configure Field Options', 'havenlytics'),
    style: {
      color: 'var(--hvnly-brand-primary)'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-cog"
  })))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SortableTopFieldItem);

/***/ }),

/***/ "./src/settings/components/FormElements/TopSearchFields/TopFieldConfigModal.jsx":
/*!**************************************************************************************!*\
  !*** ./src/settings/components/FormElements/TopSearchFields/TopFieldConfigModal.jsx ***!
  \**************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../InputGroup/InputGroup */ "./src/settings/components/FormElements/InputGroup/InputGroup.js");
/* harmony import */ var _Modal_Modal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Modal/Modal */ "./src/settings/components/FormElements/Modal/Modal.jsx");
/* harmony import */ var _ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ToggleSwitch/ToggleSwitch */ "./src/settings/components/FormElements/ToggleSwitch/ToggleSwitch.js");






const TopFieldConfigModal = ({
  isOpen,
  onClose,
  field,
  onSave,
  showToast
}) => {
  const [config, setConfig] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({});
  const [isSaving, setIsSaving] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const [newOptionValue, setNewOptionValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('');
  const [optionError, setOptionError] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (field && isOpen) {
      setConfig(field.config || {});
    }
  }, [field, isOpen]);
  if (!field) return null;
  const handleConfigChange = (key, value) => {
    setConfig(prev => ({
      ...prev,
      [key]: value
    }));
  };
  const handleAddOption = () => {
    if (!newOptionValue.trim()) {
      setOptionError(true);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Option value is required', 'havenlytics'));
      return;
    }
    setOptionError(false);
    const currentOptions = config.options || [];
    setConfig(prev => ({
      ...prev,
      options: [...currentOptions, newOptionValue.trim()]
    }));
    setNewOptionValue('');
  };
  const handleRemoveOption = index => {
    const currentOptions = [...(config.options || [])];
    currentOptions.splice(index, 1);
    setConfig(prev => ({
      ...prev,
      options: currentOptions
    }));
  };
  const handleUpdateOption = (index, value) => {
    const currentOptions = [...(config.options || [])];
    currentOptions[index] = value;
    setConfig(prev => ({
      ...prev,
      options: currentOptions
    }));
  };
  const handleSave = async () => {
    setIsSaving(true);
    try {
      const updatedField = {
        ...field,
        config: config
      };
      await onSave(updatedField);
      onClose();
    } catch (error) {
      console.error('Failed to save field config:', error);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to save field configuration', 'havenlytics'));
    } finally {
      setIsSaving(false);
    }
  };
  const renderConfigContent = () => {
    switch (field.type) {
      case 'range':
        return renderRangeConfig();
      case 'number':
        return renderNumberConfig();
      default:
        return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
          className: "hvnly-top-field-config__info"
        }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
          className: "fas fa-info-circle"
        }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('This field type does not require additional configuration.', 'havenlytics')));
    }
  };
  const renderRangeConfig = () => {
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-top-field-config"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-top-field-config__section"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Price Range Settings', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__["default"], {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Placeholder', 'havenlytics'),
      id: "placeholder",
      value: config.placeholder || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Any', 'havenlytics'),
      onChange: value => handleConfigChange('placeholder', value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-top-field-config__options-list"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
      className: "hvnly-top-field-config__label"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Options', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-top-field-config__options-group"
    }, (config.options || []).map((opt, idx) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: idx,
      className: "hvnly-top-field-config__option-item"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: "hvnly-top-field-config__option-input",
      value: opt,
      onChange: e => handleUpdateOption(idx, e.target.value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-top-field-config__option-remove",
      onClick: () => handleRemoveOption(idx)
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-trash"
    })))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-top-field-config__add-option-form"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: `hvnly-top-field-config__option-input ${optionError ? 'hvnly-top-field-config__option-input--error' : ''}`,
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add Option', 'havenlytics'),
      value: newOptionValue,
      onChange: e => {
        setNewOptionValue(e.target.value);
        if (optionError) setOptionError(false);
      },
      onKeyPress: e => {
        if (e.key === 'Enter') {
          handleAddOption();
        }
      }
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-top-field-config__add-option",
      onClick: handleAddOption
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-plus"
    }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add Option', 'havenlytics'))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_5__["default"], {
      id: "usePresetValues",
      checked: config.usePresetValues !== false,
      onChange: checked => handleConfigChange('usePresetValues', checked),
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Use Preset Values (Dropdown instead of input)', 'havenlytics')
    })));
  };
  const renderNumberConfig = () => {
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-top-field-config"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-top-field-config__section"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Number Field Settings', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__["default"], {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Minimum Value', 'havenlytics'),
      id: "min",
      type: "number",
      value: config.min || 1,
      onChange: value => handleConfigChange('min', parseInt(value, 10))
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__["default"], {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Maximum Value', 'havenlytics'),
      id: "max",
      type: "number",
      value: config.max || 10,
      onChange: value => handleConfigChange('max', parseInt(value, 10))
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InputGroup_InputGroup__WEBPACK_IMPORTED_MODULE_3__["default"], {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Placeholder', 'havenlytics'),
      id: "placeholder",
      value: config.placeholder || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Any', 'havenlytics'),
      onChange: value => handleConfigChange('placeholder', value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-top-field-config__options-list"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
      className: "hvnly-top-field-config__label"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Preset Options', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-top-field-config__options-group"
    }, (config.options || []).map((opt, idx) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: idx,
      className: "hvnly-top-field-config__option-item"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: "hvnly-top-field-config__option-input",
      value: opt,
      onChange: e => handleUpdateOption(idx, e.target.value)
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-top-field-config__option-remove",
      onClick: () => handleRemoveOption(idx)
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-trash"
    })))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly-top-field-config__add-option-form"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
      type: "text",
      className: `hvnly-top-field-config__option-input ${optionError ? 'hvnly-top-field-config__option-input--error' : ''}`,
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add Option', 'havenlytics'),
      value: newOptionValue,
      onChange: e => {
        setNewOptionValue(e.target.value);
        if (optionError) setOptionError(false);
      },
      onKeyPress: e => {
        if (e.key === 'Enter') {
          handleAddOption();
        }
      }
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      type: "button",
      className: "hvnly-top-field-config__add-option",
      onClick: handleAddOption
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-plus"
    }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add Option', 'havenlytics'))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_5__["default"], {
      id: "usePresetValues",
      checked: config.usePresetValues !== false,
      onChange: checked => handleConfigChange('usePresetValues', checked),
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Use Preset Values (Dropdown instead of input)', 'havenlytics')
    })));
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Modal_Modal__WEBPACK_IMPORTED_MODULE_4__["default"], {
    isOpen: isOpen,
    onClose: onClose,
    onConfirm: handleSave,
    title: `${(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Configure', 'havenlytics')}: ${field.title}`,
    size: "large",
    confirmText: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Save Configuration', 'havenlytics'),
    isLoading: isSaving
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-top-field-config-modal-content"
  }, renderConfigContent()));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TopFieldConfigModal);

/***/ }),

/***/ "./src/settings/components/FormElements/TopSearchFields/TopSearchFields.css":
/*!**********************************************************************************!*\
  !*** ./src/settings/components/FormElements/TopSearchFields/TopSearchFields.css ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./src/settings/components/FormElements/TopSearchFields/TopSearchFieldsDragDrop.jsx":
/*!******************************************************************************************!*\
  !*** ./src/settings/components/FormElements/TopSearchFields/TopSearchFieldsDragDrop.jsx ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @dnd-kit/core */ "./node_modules/@dnd-kit/core/dist/core.esm.js");
/* harmony import */ var _dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dnd-kit/sortable */ "./node_modules/@dnd-kit/sortable/dist/sortable.esm.js");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js");
/* harmony import */ var _SortableTopFieldItem__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SortableTopFieldItem */ "./src/settings/components/FormElements/TopSearchFields/SortableTopFieldItem.jsx");
/* harmony import */ var _TopFieldConfigModal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TopFieldConfigModal */ "./src/settings/components/FormElements/TopSearchFields/TopFieldConfigModal.jsx");
/* harmony import */ var _TopSearchFields_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./TopSearchFields.css */ "./src/settings/components/FormElements/TopSearchFields/TopSearchFields.css");









const TopSearchFieldsDragDrop = ({
  showToast,
  onFieldsChange,
  initialFields = []
}) => {
  const [searchFields, setSearchFields] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)([]);
  const [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(true);
  const [editingField, setEditingField] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(null);
  const [editTitle, setEditTitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)('');

  // Config modal state
  const [configModalOpen, setConfigModalOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(false);
  const [configField, setConfigField] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(null);

  // Add a ref to track if we're currently saving to prevent race conditions
  const isSavingRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(false);
  const pendingSaveRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);
  const API_BASE = window.HavenlyticsData?.hvnlyNabApi?.url || '/wp-json/hvnlynab/v1';
  const API_NONCE = window.HavenlyticsData?.hvnlyNabApi?.nonce || '';
  const SETTINGS_ENDPOINT = `${API_BASE}/plugin-settings/search`;
  const AXIOS_CONFIG = {
    headers: {
      'X-WP-Nonce': API_NONCE,
      'Content-Type': 'application/json'
    }
  };
  const sensors = (0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.useSensors)((0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.useSensor)(_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.PointerSensor, {
    activationConstraint: {
      distance: 5
    }
  }), (0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.useSensor)(_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.KeyboardSensor));

  // Default top search fields
  const DEFAULT_TOP_FIELDS = [{
    id: 'bedrooms',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Bedrooms', 'havenlytics'),
    type: 'number',
    enabled: true,
    order: 1,
    is_default: true,
    config: {
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Any', 'havenlytics'),
      options: ['1', '2', '3', '4', '5'],
      min: 1,
      max: 10,
      usePresetValues: true
    }
  }, {
    id: 'bathrooms',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Bathrooms', 'havenlytics'),
    type: 'number',
    enabled: true,
    order: 2,
    is_default: true,
    config: {
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Any', 'havenlytics'),
      options: ['1', '2', '3', '4', '5'],
      min: 1,
      max: 10,
      usePresetValues: true
    }
  }, {
    id: 'min_price',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Min Price', 'havenlytics'),
    type: 'range',
    enabled: true,
    order: 3,
    is_default: true,
    config: {
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Any', 'havenlytics'),
      options: ['50000', '75000', '100000', '200000', '300000', '400000', '500000'],
      usePresetValues: true
    }
  }, {
    id: 'max_price',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Max Price', 'havenlytics'),
    type: 'range',
    enabled: true,
    order: 4,
    is_default: true,
    config: {
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Any', 'havenlytics'),
      options: ['500000', '600000', '700000', '800000', '900000', '1000000'],
      usePresetValues: true
    }
  }];
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
    if (initialFields && initialFields.length > 0) {
      const sortedFields = [...initialFields].sort((a, b) => (a.order || 0) - (b.order || 0));
      setSearchFields(sortedFields);
      setIsLoading(false);
    } else {
      loadTopSearchFields();
    }
  }, [initialFields]);
  const loadTopSearchFields = async () => {
    setIsLoading(true);
    try {
      const response = await axios__WEBPACK_IMPORTED_MODULE_5__["default"].get(SETTINGS_ENDPOINT, AXIOS_CONFIG);
      if (response.data?.success && response.data?.data) {
        const searchData = response.data.data;
        let fields = searchData.hvnly_top_search_fields || [];

        // Convert object format to array if needed
        if (fields && !Array.isArray(fields)) {
          fields = Object.values(fields);
        }
        if (fields.length > 0) {
          fields.sort((a, b) => (a.order || 0) - (b.order || 0));
          setSearchFields(fields);
          if (onFieldsChange) {
            onFieldsChange(fields);
          }
        } else {
          setSearchFields([...DEFAULT_TOP_FIELDS]);
        }
      } else {
        setSearchFields([...DEFAULT_TOP_FIELDS]);
      }
    } catch (error) {
      console.error('Failed to load top search fields:', error);
      setSearchFields([...DEFAULT_TOP_FIELDS]);
      if (showToast) {
        showToast('warning', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Notice', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Using default top search fields', 'havenlytics'));
      }
    } finally {
      setIsLoading(false);
    }
  };
  const saveTopSearchFields = async fields => {
    if (isSavingRef.current) {
      pendingSaveRef.current = fields;
      return;
    }
    isSavingRef.current = true;
    try {
      const response = await axios__WEBPACK_IMPORTED_MODULE_5__["default"].get(SETTINGS_ENDPOINT, AXIOS_CONFIG);
      const currentSettings = response.data?.data || {};
      const updatedSettings = {
        ...currentSettings
      };
      updatedSettings.hvnly_top_search_fields = fields;
      const saveResponse = await axios__WEBPACK_IMPORTED_MODULE_5__["default"].post(SETTINGS_ENDPOINT, updatedSettings, AXIOS_CONFIG);
      if (saveResponse.data?.success) {
        if (onFieldsChange) {
          onFieldsChange(fields);
        }
        if (pendingSaveRef.current) {
          const pending = pendingSaveRef.current;
          pendingSaveRef.current = null;
          setTimeout(() => saveTopSearchFields(pending), 100);
        }
        return true;
      }
      return false;
    } catch (error) {
      console.error('Failed to save top search fields:', error);
      if (showToast) {
        showToast('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Failed to save top search fields', 'havenlytics'));
      }
      return false;
    } finally {
      isSavingRef.current = false;
    }
  };
  const moveFieldUp = id => {
    setSearchFields(prev => {
      const index = prev.findIndex(field => field.id === id);
      if (index === 0) return prev;
      const newFields = [...prev];
      [newFields[index - 1], newFields[index]] = [newFields[index], newFields[index - 1]];
      newFields.forEach((field, idx) => {
        field.order = idx + 1;
      });
      setTimeout(() => saveTopSearchFields(newFields), 0);
      return newFields;
    });
  };
  const moveFieldDown = id => {
    setSearchFields(prev => {
      const index = prev.findIndex(field => field.id === id);
      if (index === prev.length - 1) return prev;
      const newFields = [...prev];
      [newFields[index], newFields[index + 1]] = [newFields[index + 1], newFields[index]];
      newFields.forEach((field, idx) => {
        field.order = idx + 1;
      });
      setTimeout(() => saveTopSearchFields(newFields), 0);
      return newFields;
    });
  };
  const toggleField = id => {
    setSearchFields(prev => {
      const newFields = prev.map(field => field.id === id ? {
        ...field,
        enabled: !field.enabled
      } : field);
      setTimeout(() => saveTopSearchFields(newFields), 0);
      return newFields;
    });
  };
  const startEditing = field => {
    setEditingField(field.id);
    setEditTitle(field.title);
  };
  const saveEdit = () => {
    if (!editTitle.trim()) {
      if (showToast) {
        showToast('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Field title cannot be empty', 'havenlytics'));
      }
      return;
    }
    setSearchFields(prev => {
      const newFields = prev.map(field => field.id === editingField ? {
        ...field,
        title: editTitle
      } : field);
      setTimeout(() => saveTopSearchFields(newFields), 0);
      return newFields;
    });
    setEditingField(null);
    if (showToast) {
      showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Field title updated!', 'havenlytics'));
    }
  };
  const cancelEdit = () => {
    setEditingField(null);
  };
  const handleConfigureField = field => {
    setConfigField(field);
    setConfigModalOpen(true);
  };
  const handleSaveFieldConfig = async updatedField => {
    setSearchFields(prev => {
      const newFields = prev.map(field => field.id === updatedField.id ? updatedField : field);
      setTimeout(() => saveTopSearchFields(newFields), 0);
      return newFields;
    });
    showToast('success', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Success', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Field configuration saved!', 'havenlytics'));
  };
  const handleDragEnd = event => {
    const {
      active,
      over
    } = event;
    if (active.id !== over.id) {
      setSearchFields(items => {
        const oldIndex = items.findIndex(item => item.id === active.id);
        const newIndex = items.findIndex(item => item.id === over.id);
        const newItems = [...items];
        const [movedItem] = newItems.splice(oldIndex, 1);
        newItems.splice(newIndex, 0, movedItem);
        newItems.forEach((item, index) => {
          item.order = index + 1;
        });
        setTimeout(() => saveTopSearchFields(newItems), 0);
        return newItems;
      });
    }
  };
  const getTypeLabel = type => {
    const types = {
      'text': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Text', 'havenlytics'),
      'number': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Number', 'havenlytics'),
      'dropdown': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Dropdown', 'havenlytics'),
      'checkbox': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Checkbox', 'havenlytics'),
      'range': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Range', 'havenlytics'),
      'group': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Group', 'havenlytics'),
      'date': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Date', 'havenlytics')
    };
    return types[type] || type;
  };
  if (isLoading) {
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly_top_search_fields_drag_drop_builder"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "hvnly_top_search_fields_drag_drop_loading"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "fas fa-spinner fa-spin"
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Loading top search fields...', 'havenlytics'))));
  }
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_top_search_fields_drag_drop_builder"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_top_search_fields_drag_drop_header"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-list"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Manage Top Search Fields', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "hvnly_top_search_fields_drag_drop_hint"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Drag to reorder | Click Edit to rename | Click Configure to set options', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_top_search_fields_drag_drop_body"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.DndContext, {
    sensors: sensors,
    collisionDetection: _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.closestCenter,
    onDragEnd: handleDragEnd
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_2__.SortableContext, {
    items: searchFields.map(f => f.id),
    strategy: _dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_2__.verticalListSortingStrategy
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly_top_search_fields_drag_drop_list"
  }, searchFields.length > 0 ? searchFields.map((field, index) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_SortableTopFieldItem__WEBPACK_IMPORTED_MODULE_6__["default"], {
    key: field.id,
    field: {
      ...field,
      typeLabel: getTypeLabel(field.type)
    },
    index: index,
    onMoveUp: moveFieldUp,
    onMoveDown: moveFieldDown,
    onToggle: toggleField,
    onEdit: startEditing,
    onConfigure: handleConfigureField,
    isEditing: editingField === field.id,
    editTitle: editTitle,
    onEditTitleChange: setEditTitle,
    onSaveEdit: saveEdit,
    onCancelEdit: cancelEdit,
    fieldsLength: searchFields.length,
    isDefault: field.is_default
  })) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    style: {
      textAlign: 'center',
      padding: '40px'
    }
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('No top search fields found.', 'havenlytics')))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TopFieldConfigModal__WEBPACK_IMPORTED_MODULE_7__["default"], {
    isOpen: configModalOpen,
    onClose: () => {
      setConfigModalOpen(false);
      setConfigField(null);
    },
    field: configField,
    onSave: handleSaveFieldConfig,
    showToast: showToast
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TopSearchFieldsDragDrop);

/***/ }),

/***/ "./src/settings/components/Header/Header.css":
/*!***************************************************!*\
  !*** ./src/settings/components/Header/Header.css ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./src/settings/components/Header/Header.js":
/*!**************************************************!*\
  !*** ./src/settings/components/Header/Header.js ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Header_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Header.css */ "./src/settings/components/Header/Header.css");



const Header = ({
  onSaveAll,
  onResetAll
}) => {
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("header", {
    className: "hvnly-settings-api__header"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__logo"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h1", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Havenlytics Settings', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-api__actions"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly-settings-api__btn hvnly-settings-api__btn--secondary",
    onClick: onResetAll
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-sync-alt"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Reset All', 'havenlytics')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "hvnly-settings-api__btn hvnly-settings-api__btn--primary",
    onClick: onSaveAll
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-save"
  }), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Save All Settings', 'havenlytics'))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Header);

/***/ }),

/***/ "./src/settings/components/Preloader/Preloader.css":
/*!*********************************************************!*\
  !*** ./src/settings/components/Preloader/Preloader.css ***!
  \*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./src/settings/components/Preloader/Preloader.js":
/*!********************************************************!*\
  !*** ./src/settings/components/Preloader/Preloader.js ***!
  \********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Preloader_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Preloader.css */ "./src/settings/components/Preloader/Preloader.css");



const Preloader = ({
  stage = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Preparing your dashboard...", "havenlytics"),
  progress = 0,
  showProgress = true
}) => {
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-preloader"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-preloader__content"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-preloader__icon-wrapper"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-preloader__icon"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
    viewBox: "0 0 24 24",
    fill: "none",
    stroke: "currentColor",
    strokeWidth: "1",
    strokeLinecap: "round",
    strokeLinejoin: "round"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
    d: "M3 10L12 3L21 10"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
    x: "5",
    y: "10",
    width: "14",
    height: "11",
    rx: "0.5"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
    x: "10",
    y: "15",
    width: "4",
    height: "6",
    rx: "0.5"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
    x: "7",
    y: "12",
    width: "2",
    height: "2",
    rx: "0.2"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
    x: "15",
    y: "12",
    width: "2",
    height: "2",
    rx: "0.2"
  })))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", {
    className: "hvnly-settings-preloader__title"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Settings Dashboard", "havenlytics")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
    className: "hvnly-settings-preloader__stage"
  }, stage), showProgress && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-preloader__progress-wrapper"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-preloader__progress-track"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-preloader__progress-bar",
    style: {
      width: `${progress}%`
    }
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-preloader__progress-stats"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "hvnly-settings-preloader__progress-percent"
  }, Math.round(progress), "%"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "hvnly-settings-preloader__progress-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Loading Complete", "havenlytics")))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hvnly-settings-preloader__tips"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: "fas fa-lightbulb"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("💡 Tip: Configure your settings to optimize your property management workflow", "havenlytics")))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Preloader);

/***/ }),

/***/ "./src/settings/components/Tabs/DropdownTab.js":
/*!*****************************************************!*\
  !*** ./src/settings/components/Tabs/DropdownTab.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Tabs_module_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Tabs.module.css */ "./src/settings/components/Tabs/Tabs.module.css");



const DropdownTab = ({
  tab,
  isActive,
  onTabClick,
  children
}) => {
  const [isOpen, setIsOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const dropdownRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
  const handleToggle = e => {
    e.stopPropagation();
    setIsOpen(!isOpen);
  };
  const handleItemClick = tabId => {
    onTabClick(tabId);
    // Don't close dropdown when clicking items inside it
  };

  // Close dropdown when clicking outside
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    const handleClickOutside = event => {
      if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
        setIsOpen(false);
      }
    };
    document.addEventListener('mousedown', handleClickOutside);
    return () => {
      document.removeEventListener('mousedown', handleClickOutside);
    };
  }, []);
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _Tabs_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['hvnly-settings-api__dropdown-tab'],
    ref: dropdownRef
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    type: "button",
    className: `${_Tabs_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['hvnly-settings-api__tab']} ${isActive ? _Tabs_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['hvnly-settings-api__tab--active'] : ''} ${_Tabs_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['hvnly-settings-api__dropdown-tab-toggle']}`,
    onClick: handleToggle
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: tab.icon
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, tab.label), tab.badge && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: _Tabs_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['hvnly-settings-api__tab-badge']
  }, tab.badge), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: `fas fa-chevron-down ${_Tabs_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['hvnly-settings-api__dropdown-chevron']} ${isOpen ? _Tabs_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['hvnly-settings-api__dropdown-chevron--open'] : ''}`
  })), isOpen && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: _Tabs_module_css__WEBPACK_IMPORTED_MODULE_2__["default"]['hvnly-settings-api__dropdown-menu']
  }, children(handleItemClick)));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DropdownTab);

/***/ }),

/***/ "./src/settings/components/Tabs/Tabs.js":
/*!**********************************************!*\
  !*** ./src/settings/components/Tabs/Tabs.js ***!
  \**********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _DropdownTab__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DropdownTab */ "./src/settings/components/Tabs/DropdownTab.js");
/* harmony import */ var _Tabs_module_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Tabs.module.css */ "./src/settings/components/Tabs/Tabs.module.css");




const Tabs = ({
  tabs,
  activeTab,
  onTabChange
}) => {
  const handleTabClick = tabId => {
    onTabChange(tabId);
  };

  // Check if a tab is in the general dropdown
  const isGeneralTab = tabId => {
    return ['general', 'currency', 'misc-settings'].includes(tabId);
  };
  // Check if a tab is in the Search dropdown
  const isSearchTab = tabId => {
    // return ['search','search-property', 'search-result'].includes(tabId);
    return ['search', 'search-property'].includes(tabId);
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("nav", {
    className: _Tabs_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]['hvnly-settings-api__tabs']
  }, tabs.map(tab => {
    // Make General a dropdown tab
    if (tab.id === 'general') {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_DropdownTab__WEBPACK_IMPORTED_MODULE_2__["default"], {
        key: tab.id,
        tab: tab,
        isActive: isGeneralTab(activeTab),
        onTabClick: handleTabClick
      }, handleItemClick => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
        type: "button",
        className: `${_Tabs_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]['hvnly-settings-api__dropdown-item']} ${activeTab === 'currency' ? _Tabs_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]['hvnly-settings-api__dropdown-item--active'] : ''}`,
        onClick: () => handleItemClick('currency')
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
        className: "fas fa-dollar-sign"
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Currency', 'havenlytics'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
        type: "button",
        className: `${_Tabs_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]['hvnly-settings-api__dropdown-item']} ${activeTab === 'misc-settings' ? _Tabs_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]['hvnly-settings-api__dropdown-item--active'] : ''}`,
        onClick: () => handleItemClick('misc-settings')
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
        className: "fas fa-tools"
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Misc Settings', 'havenlytics')))));
    }
    // Make Search a dropdown tab
    if (tab.id === 'search') {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_DropdownTab__WEBPACK_IMPORTED_MODULE_2__["default"], {
        key: tab.id,
        tab: tab,
        isActive: isSearchTab(activeTab),
        onTabClick: handleTabClick
      }, handleItemClick => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
        type: "button",
        className: `${_Tabs_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]['hvnly-settings-api__dropdown-item']} ${activeTab === 'search-property' ? _Tabs_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]['hvnly-settings-api__dropdown-item--active'] : ''}`,
        onClick: () => handleItemClick('search-property')
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
        className: "fas fa-city"
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search Property', 'havenlytics')))));
    }

    // Regular tab
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      key: tab.id,
      type: "button",
      className: `${_Tabs_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]['hvnly-settings-api__tab']} ${activeTab === tab.id ? _Tabs_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]['hvnly-settings-api__tab--active'] : ''}`,
      onClick: () => handleTabClick(tab.id)
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: tab.icon
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, tab.label), tab.badge && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: _Tabs_module_css__WEBPACK_IMPORTED_MODULE_3__["default"]['hvnly-settings-api__tab-badge']
    }, tab.badge));
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Tabs);

/***/ }),

/***/ "./src/settings/components/Tabs/Tabs.module.css":
/*!******************************************************!*\
  !*** ./src/settings/components/Tabs/Tabs.module.css ***!
  \******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// extracted by mini-css-extract-plugin
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"hvnly-settings-api__tabs":"CzGgDJhmp4GZ14nr_6zn","hvnly-settings-api__tab":"G0ymqrAfKHRSzEPYJgji","hvnly-settings-api__tab--active":"zyiPR1JPpC2C9KSHdGZT","tabIndicator":"IEzDZ0v0RBt01A1JJ5e3","hvnly-settings-api__tab-badge":"Wqv5UOmhmOpUZyr9zd7B","hvnly-settings-api__dropdown-tab":"EUkBZnN9kDhvj1leFI4h","hvnly-settings-api__dropdown-tab-toggle":"sUzXsaaHPQ4zgvna2ffj","hvnly-settings-api__dropdown-chevron":"QFfJ1sokBYOUR__VaQXY","hvnly-settings-api__dropdown-chevron--open":"IbyyK6YSe_QIFxfP16AX","hvnly-settings-api__dropdown-menu":"cDrS1aBf0J5g1Hg0deEu","dropdownFadeIn":"OIy4pjqQrRW8g8sXcfqX","hvnly-settings-api__dropdown-item":"DBF3RJ12iWW2vKh7OHll","hvnly-settings-api__dropdown-item--active":"vadDMS17kM49HmWwfM0f","hvnly--settings--app":"MaWrYYZkw7cFijDexNib","dark-mode":"k8hXSqpUehL8xja9CIUI"});

/***/ }),

/***/ "./src/settings/components/utils/constants.js":
/*!****************************************************!*\
  !*** ./src/settings/components/utils/constants.js ***!
  \****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   FONT_WEIGHTS: () => (/* binding */ FONT_WEIGHTS),
/* harmony export */   GOOGLE_FONTS: () => (/* binding */ GOOGLE_FONTS),
/* harmony export */   TABS: () => (/* binding */ TABS)
/* harmony export */ });
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);


// export const TABS = [
//   { id: 'analytics', label: 'Analytics', icon: 'fas fa-chart-line' }, // This will be a dropdown
//   { id: 'general', label: 'General', icon: 'fas fa-cog' },
//   { id: 'typography', label: 'Typography', icon: 'fas fa-font' },
//   { id: 'integration', label: 'Integration', icon: 'fas fa-plug', badge: 'New' },
//   { id: 'design', label: 'Design Options', icon: 'fas fa-palette' },
//   { id: 'advanced', label: 'Advanced', icon: 'fas fa-sliders-h' },
//   { id: 'support', label: 'Support', icon: 'fas fa-life-ring' }
// ];

const TABS = [{
  id: 'general',
  label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('General', 'havenlytics'),
  icon: 'fas fa-cog'
},
// { id: 'page-setup', label: __('Page Setup & Permalink', 'havenlytics'), icon: 'fas fa-link' },
{
  id: 'design',
  label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Design', 'havenlytics'),
  icon: 'fas fa-palette'
}, {
  id: 'search',
  label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Search', 'havenlytics'),
  icon: 'fas fa-search'
}, {
  id: 'properties',
  label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Properties', 'havenlytics'),
  icon: 'fas fa-building'
}, {
  id: 'property-details',
  label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Property Details', 'havenlytics'),
  icon: 'fas fa-info-circle'
},
// dropdown later
// { id: 'user-agent', label: __('User & Agent', 'havenlytics'), icon: 'fas fa-users' },
// { id: 'email', label: __('Email', 'havenlytics'), icon: 'fas fa-envelope' },
{
  id: 'preloader',
  label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Preloader', 'havenlytics'),
  icon: 'fas fa-spinner',
  badge: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('New', 'havenlytics')
}, {
  id: 'map',
  label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Map', 'havenlytics'),
  icon: 'fas fa-map-marked-alt',
  badge: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('New', 'havenlytics')
},
// NEW MAP TAB
{
  id: 'shortcodes',
  label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Shortcodes', 'havenlytics'),
  icon: 'fas fa-code'
}
// { id: 'import-export', label: __('Import & Export', 'havenlytics'), icon: 'fas fa-exchange-alt', badge: __('New', 'havenlytics') },
// { id: 'integration', label: __('AI Integration', 'havenlytics'), icon: 'fas fa-robot', badge: __('Soon', 'havenlytics') },
// { id: 'advanced', label: __('Advanced', 'havenlytics'), icon: 'fas fa-sliders-h' },
];
const GOOGLE_FONTS = ['Plus Jakarta Sans', 'Montserrat', 'Roboto', 'Open Sans', 'Lato', 'Poppins', 'Raleway', 'Merriweather', 'Playfair Display', 'Quicksand', 'Nunito', 'Ubuntu', 'Rubik', 'Inter', 'Work Sans', 'Karla', 'Archivo', 'Manrope', 'Hind', 'Source Sans Pro', 'Exo 2', 'Oswald', 'Fira Sans'];
const FONT_WEIGHTS = [{
  value: '300',
  label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Light (300)', 'havenlytics')
}, {
  value: '400',
  label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Regular (400)', 'havenlytics')
}, {
  value: '500',
  label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Medium (500)', 'havenlytics')
}, {
  value: '600',
  label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Semi-Bold (600)', 'havenlytics')
}, {
  value: '700',
  label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Bold (700)', 'havenlytics')
}];

/***/ }),

/***/ "./src/settings/components/utils/helpers.js":
/*!**************************************************!*\
  !*** ./src/settings/components/utils/helpers.js ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   countriesData: () => (/* binding */ countriesData),
/* harmony export */   currencyData: () => (/* binding */ currencyData)
/* harmony export */ });
// Country Data
const countriesData = [{
  value: 'AF',
  label: 'Afghanistan'
}, {
  value: 'AL',
  label: 'Albania'
}, {
  value: 'DZ',
  label: 'Algeria'
}, {
  value: 'AS',
  label: 'American Samoa'
}, {
  value: 'AD',
  label: 'Andorra'
}, {
  value: 'AO',
  label: 'Angola'
}, {
  value: 'AI',
  label: 'Anguilla'
}, {
  value: 'AQ',
  label: 'Antarctica'
}, {
  value: 'AG',
  label: 'Antigua and Barbuda'
}, {
  value: 'AR',
  label: 'Argentina'
}, {
  value: 'AM',
  label: 'Armenia'
}, {
  value: 'AW',
  label: 'Aruba'
}, {
  value: 'AU',
  label: 'Australia'
}, {
  value: 'AT',
  label: 'Austria'
}, {
  value: 'AZ',
  label: 'Azerbaijan'
}, {
  value: 'BS',
  label: 'Bahamas'
}, {
  value: 'BH',
  label: 'Bahrain'
}, {
  value: 'BD',
  label: 'Bangladesh'
}, {
  value: 'BB',
  label: 'Barbados'
}, {
  value: 'BY',
  label: 'Belarus'
}, {
  value: 'BE',
  label: 'Belgium'
}, {
  value: 'BZ',
  label: 'Belize'
}, {
  value: 'BJ',
  label: 'Benin'
}, {
  value: 'BM',
  label: 'Bermuda'
}, {
  value: 'BT',
  label: 'Bhutan'
}, {
  value: 'BO',
  label: 'Bolivia'
}, {
  value: 'BA',
  label: 'Bosnia and Herzegovina'
}, {
  value: 'BW',
  label: 'Botswana'
}, {
  value: 'BR',
  label: 'Brazil'
}, {
  value: 'BN',
  label: 'Brunei Darussalam'
}, {
  value: 'BG',
  label: 'Bulgaria'
}, {
  value: 'BF',
  label: 'Burkina Faso'
}, {
  value: 'BI',
  label: 'Burundi'
}, {
  value: 'KH',
  label: 'Cambodia'
}, {
  value: 'CM',
  label: 'Cameroon'
}, {
  value: 'CA',
  label: 'Canada'
}, {
  value: 'CV',
  label: 'Cape Verde'
}, {
  value: 'KY',
  label: 'Cayman Islands'
}, {
  value: 'CF',
  label: 'Central African Republic'
}, {
  value: 'TD',
  label: 'Chad'
}, {
  value: 'CL',
  label: 'Chile'
}, {
  value: 'CN',
  label: 'China'
}, {
  value: 'CO',
  label: 'Colombia'
}, {
  value: 'KM',
  label: 'Comoros'
}, {
  value: 'CG',
  label: 'Congo'
}, {
  value: 'CD',
  label: 'Congo, Democratic Republic of the'
}, {
  value: 'CR',
  label: 'Costa Rica'
}, {
  value: 'HR',
  label: 'Croatia'
}, {
  value: 'CU',
  label: 'Cuba'
}, {
  value: 'CY',
  label: 'Cyprus'
}, {
  value: 'CZ',
  label: 'Czech Republic'
}, {
  value: 'DK',
  label: 'Denmark'
}, {
  value: 'DJ',
  label: 'Djibouti'
}, {
  value: 'DM',
  label: 'Dominica'
}, {
  value: 'DO',
  label: 'Dominican Republic'
}, {
  value: 'EC',
  label: 'Ecuador'
}, {
  value: 'EG',
  label: 'Egypt'
}, {
  value: 'SV',
  label: 'El Salvador'
}, {
  value: 'GQ',
  label: 'Equatorial Guinea'
}, {
  value: 'ER',
  label: 'Eritrea'
}, {
  value: 'EE',
  label: 'Estonia'
}, {
  value: 'ET',
  label: 'Ethiopia'
}, {
  value: 'FJ',
  label: 'Fiji'
}, {
  value: 'FI',
  label: 'Finland'
}, {
  value: 'FR',
  label: 'France'
}, {
  value: 'GA',
  label: 'Gabon'
}, {
  value: 'GM',
  label: 'Gambia'
}, {
  value: 'GE',
  label: 'Georgia'
}, {
  value: 'DE',
  label: 'Germany'
}, {
  value: 'GH',
  label: 'Ghana'
}, {
  value: 'GR',
  label: 'Greece'
}, {
  value: 'GD',
  label: 'Grenada'
}, {
  value: 'GU',
  label: 'Guam'
}, {
  value: 'GT',
  label: 'Guatemala'
}, {
  value: 'GN',
  label: 'Guinea'
}, {
  value: 'GW',
  label: 'Guinea-Bissau'
}, {
  value: 'GY',
  label: 'Guyana'
}, {
  value: 'HT',
  label: 'Haiti'
}, {
  value: 'HN',
  label: 'Honduras'
}, {
  value: 'HK',
  label: 'Hong Kong'
}, {
  value: 'HU',
  label: 'Hungary'
}, {
  value: 'IS',
  label: 'Iceland'
}, {
  value: 'IN',
  label: 'India'
}, {
  value: 'ID',
  label: 'Indonesia'
}, {
  value: 'IR',
  label: 'Iran'
}, {
  value: 'IQ',
  label: 'Iraq'
}, {
  value: 'IE',
  label: 'Ireland'
}, {
  value: 'IL',
  label: 'Israel'
}, {
  value: 'IT',
  label: 'Italy'
}, {
  value: 'JM',
  label: 'Jamaica'
}, {
  value: 'JP',
  label: 'Japan'
}, {
  value: 'JO',
  label: 'Jordan'
}, {
  value: 'KZ',
  label: 'Kazakhstan'
}, {
  value: 'KE',
  label: 'Kenya'
}, {
  value: 'KI',
  label: 'Kiribati'
}, {
  value: 'KR',
  label: 'Korea, Republic of'
}, {
  value: 'KW',
  label: 'Kuwait'
}, {
  value: 'KG',
  label: 'Kyrgyzstan'
}, {
  value: 'LA',
  label: 'Lao People\'s Democratic Republic'
}, {
  value: 'LV',
  label: 'Latvia'
}, {
  value: 'LB',
  label: 'Lebanon'
}, {
  value: 'LS',
  label: 'Lesotho'
}, {
  value: 'LR',
  label: 'Liberia'
}, {
  value: 'LY',
  label: 'Libya'
}, {
  value: 'LI',
  label: 'Liechtenstein'
}, {
  value: 'LT',
  label: 'Lithuania'
}, {
  value: 'LU',
  label: 'Luxembourg'
}, {
  value: 'MO',
  label: 'Macao'
}, {
  value: 'MK',
  label: 'Macedonia'
}, {
  value: 'MG',
  label: 'Madagascar'
}, {
  value: 'MW',
  label: 'Malawi'
}, {
  value: 'MY',
  label: 'Malaysia'
}, {
  value: 'MV',
  label: 'Maldives'
}, {
  value: 'ML',
  label: 'Mali'
}, {
  value: 'MT',
  label: 'Malta'
}, {
  value: 'MH',
  label: 'Marshall Islands'
}, {
  value: 'MQ',
  label: 'Martinique'
}, {
  value: 'MR',
  label: 'Mauritania'
}, {
  value: 'MU',
  label: 'Mauritius'
}, {
  value: 'MX',
  label: 'Mexico'
}, {
  value: 'FM',
  label: 'Micronesia'
}, {
  value: 'MD',
  label: 'Moldova'
}, {
  value: 'MC',
  label: 'Monaco'
}, {
  value: 'MN',
  label: 'Mongolia'
}, {
  value: 'ME',
  label: 'Montenegro'
}, {
  value: 'MA',
  label: 'Morocco'
}, {
  value: 'MZ',
  label: 'Mozambique'
}, {
  value: 'MM',
  label: 'Myanmar'
}, {
  value: 'NA',
  label: 'Namibia'
}, {
  value: 'NR',
  label: 'Nauru'
}, {
  value: 'NP',
  label: 'Nepal'
}, {
  value: 'NL',
  label: 'Netherlands'
}, {
  value: 'NZ',
  label: 'New Zealand'
}, {
  value: 'NI',
  label: 'Nicaragua'
}, {
  value: 'NE',
  label: 'Niger'
}, {
  value: 'NG',
  label: 'Nigeria'
}, {
  value: 'NO',
  label: 'Norway'
}, {
  value: 'OM',
  label: 'Oman'
}, {
  value: 'PK',
  label: 'Pakistan'
}, {
  value: 'PW',
  label: 'Palau'
}, {
  value: 'PS',
  label: 'Palestine'
}, {
  value: 'PA',
  label: 'Panama'
}, {
  value: 'PG',
  label: 'Papua New Guinea'
}, {
  value: 'PY',
  label: 'Paraguay'
}, {
  value: 'PE',
  label: 'Peru'
}, {
  value: 'PH',
  label: 'Philippines'
}, {
  value: 'PL',
  label: 'Poland'
}, {
  value: 'PT',
  label: 'Portugal'
}, {
  value: 'QA',
  label: 'Qatar'
}, {
  value: 'RO',
  label: 'Romania'
}, {
  value: 'RU',
  label: 'Russian Federation'
}, {
  value: 'RW',
  label: 'Rwanda'
}, {
  value: 'KN',
  label: 'Saint Kitts and Nevis'
}, {
  value: 'LC',
  label: 'Saint Lucia'
}, {
  value: 'VC',
  label: 'Saint Vincent and the Grenadines'
}, {
  value: 'WS',
  label: 'Samoa'
}, {
  value: 'SM',
  label: 'San Marino'
}, {
  value: 'ST',
  label: 'Sao Tome and Principe'
}, {
  value: 'SA',
  label: 'Saudi Arabia'
}, {
  value: 'SN',
  label: 'Senegal'
}, {
  value: 'RS',
  label: 'Serbia'
}, {
  value: 'SC',
  label: 'Seychelles'
}, {
  value: 'SL',
  label: 'Sierra Leone'
}, {
  value: 'SG',
  label: 'Singapore'
}, {
  value: 'SK',
  label: 'Slovakia'
}, {
  value: 'SI',
  label: 'Slovenia'
}, {
  value: 'SB',
  label: 'Solomon Islands'
}, {
  value: 'SO',
  label: 'Somalia'
}, {
  value: 'ZA',
  label: 'South Africa'
}, {
  value: 'ES',
  label: 'Spain'
}, {
  value: 'LK',
  label: 'Sri Lanka'
}, {
  value: 'SD',
  label: 'Sudan'
}, {
  value: 'SR',
  label: 'Suriname'
}, {
  value: 'SZ',
  label: 'Swaziland'
}, {
  value: 'SE',
  label: 'Sweden'
}, {
  value: 'CH',
  label: 'Switzerland'
}, {
  value: 'SY',
  label: 'Syrian Arab Republic'
}, {
  value: 'TW',
  label: 'Taiwan'
}, {
  value: 'TJ',
  label: 'Tajikistan'
}, {
  value: 'TZ',
  label: 'Tanzania'
}, {
  value: 'TH',
  label: 'Thailand'
}, {
  value: 'TL',
  label: 'Timor-Leste'
}, {
  value: 'TG',
  label: 'Togo'
}, {
  value: 'TO',
  label: 'Tonga'
}, {
  value: 'TT',
  label: 'Trinidad and Tobago'
}, {
  value: 'TN',
  label: 'Tunisia'
}, {
  value: 'TR',
  label: 'Turkey'
}, {
  value: 'TM',
  label: 'Turkmenistan'
}, {
  value: 'TV',
  label: 'Tuvalu'
}, {
  value: 'UG',
  label: 'Uganda'
}, {
  value: 'UA',
  label: 'Ukraine'
}, {
  value: 'AE',
  label: 'United Arab Emirates'
}, {
  value: 'GB',
  label: 'United Kingdom'
}, {
  value: 'US',
  label: 'United States'
}, {
  value: 'UY',
  label: 'Uruguay'
}, {
  value: 'UZ',
  label: 'Uzbekistan'
}, {
  value: 'VU',
  label: 'Vanuatu'
}, {
  value: 'VE',
  label: 'Venezuela'
}, {
  value: 'VN',
  label: 'Viet Nam'
}, {
  value: 'YE',
  label: 'Yemen'
}, {
  value: 'ZM',
  label: 'Zambia'
}, {
  value: 'ZW',
  label: 'Zimbabwe'
}];

// Currency Data
const currencyData = [{
  value: "AED",
  label: "United Arab Emirates dirham (د.إ)"
}, {
  value: "AFN",
  label: "Afghan afghani (؋)"
}, {
  value: "ALL",
  label: "Albanian lek (L)"
}, {
  value: "AMD",
  label: "Armenian dram (AMD)"
}, {
  value: "ANG",
  label: "Netherlands Antillean guilder (ƒ)"
}, {
  value: "AOA",
  label: "Angolan kwanza (Kz)"
}, {
  value: "ARS",
  label: "Argentine peso ($)"
}, {
  value: "AUD",
  label: "Australian dollar ($)"
}, {
  value: "AWG",
  label: "Aruban florin (Afl.)"
}, {
  value: "AZN",
  label: "Azerbaijani manat (AZN)"
}, {
  value: "BAM",
  label: "Bosnia and Herzegovina convertible mark (KM)"
}, {
  value: "BBD",
  label: "Barbadian dollar ($)"
}, {
  value: "BDT",
  label: "Bangladeshi taka (৳)"
}, {
  value: "BGN",
  label: "Bulgarian lev (лв.)"
}, {
  value: "BHD",
  label: "Bahraini dinar (.د.ب)"
}, {
  value: "BIF",
  label: "Burundian franc (Fr)"
}, {
  value: "BMD",
  label: "Bermudian dollar ($)"
}, {
  value: "BND",
  label: "Brunei dollar ($)"
}, {
  value: "BOB",
  label: "Bolivian boliviano (Bs.)"
}, {
  value: "BRL",
  label: "Brazilian real (R$)"
}, {
  value: "BSD",
  label: "Bahamian dollar ($)"
}, {
  value: "BTC",
  label: "Bitcoin (฿)"
}, {
  value: "BTN",
  label: "Bhutanese ngultrum (Nu.)"
}, {
  value: "BWP",
  label: "Botswana pula (P)"
}, {
  value: "BYR",
  label: "Belarusian ruble (old) (Br)"
}, {
  value: "BYN",
  label: "Belarusian ruble (Br)"
}, {
  value: "BZD",
  label: "Belize dollar ($)"
}, {
  value: "CAD",
  label: "Canadian dollar ($)"
}, {
  value: "CDF",
  label: "Congolese franc (Fr)"
}, {
  value: "CHF",
  label: "Swiss franc (CHF)"
}, {
  value: "CLP",
  label: "Chilean peso ($)"
}, {
  value: "CNY",
  label: "Chinese yuan (¥)"
}, {
  value: "COP",
  label: "Colombian peso ($)"
}, {
  value: "CRC",
  label: "Costa Rican colón (₡)"
}, {
  value: "CUC",
  label: "Cuban convertible peso ($)"
}, {
  value: "CUP",
  label: "Cuban peso ($)"
}, {
  value: "CVE",
  label: "Cape Verdean escudo ($)"
}, {
  value: "CZK",
  label: "Czech koruna (Kč)"
}, {
  value: "DJF",
  label: "Djiboutian franc (Fr)"
}, {
  value: "DKK",
  label: "Danish krone (DKK)"
}, {
  value: "DOP",
  label: "Dominican peso (RD$)"
}, {
  value: "DZD",
  label: "Algerian dinar (د.ج)"
}, {
  value: "EGP",
  label: "Egyptian pound (EGP)"
}, {
  value: "ERN",
  label: "Eritrean nakfa (Nfk)"
}, {
  value: "ETB",
  label: "Ethiopian birr (Br)"
}, {
  value: "EUR",
  label: "Euro (€)"
}, {
  value: "FJD",
  label: "Fijian dollar ($)"
}, {
  value: "FKP",
  label: "Falkland Islands pound (£)"
}, {
  value: "GBP",
  label: "Pound sterling (£)"
}, {
  value: "GEL",
  label: "Georgian lari (ლ)"
}, {
  value: "GGP",
  label: "Guernsey pound (£)"
}, {
  value: "GHS",
  label: "Ghana cedi (₵)"
}, {
  value: "GIP",
  label: "Gibraltar pound (£)"
}, {
  value: "GMD",
  label: "Gambian dalasi (D)"
}, {
  value: "GNF",
  label: "Guinean franc (Fr)"
}, {
  value: "GTQ",
  label: "Guatemalan quetzal (Q)"
}, {
  value: "GYD",
  label: "Guyanese dollar ($)"
}, {
  value: "HKD",
  label: "Hong Kong dollar (HK$)"
}, {
  value: "HNL",
  label: "Honduran lempira (L)"
}, {
  value: "HRK",
  label: "Croatian kuna (Kn)"
}, {
  value: "HTG",
  label: "Haitian gourde (G)"
}, {
  value: "HUF",
  label: "Hungarian forint (Ft)"
}, {
  value: "IDR",
  label: "Indonesian rupiah (Rp)"
}, {
  value: "ILS",
  label: "Israeli new shekel (₪)"
}, {
  value: "IMP",
  label: "Manx pound (£)"
}, {
  value: "INR",
  label: "Indian rupee (₹)"
}, {
  value: "IQD",
  label: "Iraqi dinar (ع.د)"
}, {
  value: "IRR",
  label: "Iranian rial (﷼)"
}, {
  value: "IRT",
  label: "Iranian toman (تومان)"
}, {
  value: "ISK",
  label: "Icelandic króna (kr.)"
}, {
  value: "JEP",
  label: "Jersey pound (£)"
}, {
  value: "JMD",
  label: "Jamaican dollar ($)"
}, {
  value: "JOD",
  label: "Jordanian dinar (د.ا)"
}, {
  value: "JPY",
  label: "Japanese yen (¥)"
}, {
  value: "KES",
  label: "Kenyan shilling (KSh)"
}, {
  value: "KGS",
  label: "Kyrgyzstani som (сом)"
}, {
  value: "KHR",
  label: "Cambodian riel (៛)"
}, {
  value: "KMF",
  label: "Comorian franc (Fr)"
}, {
  value: "KPW",
  label: "North Korean won (₩)"
}, {
  value: "KRW",
  label: "South Korean won (₩)"
}, {
  value: "KWD",
  label: "Kuwaiti dinar (د.ك)"
}, {
  value: "KYD",
  label: "Cayman Islands dollar ($)"
}, {
  value: "KZT",
  label: "Kazakhstani tenge (KZT)"
}, {
  value: "LAK",
  label: "Lao kip (₭)"
}, {
  value: "LBP",
  label: "Lebanese pound (ل.ل)"
}, {
  value: "LKR",
  label: "Sri Lankan rupee (රු)"
}, {
  value: "LRD",
  label: "Liberian dollar ($)"
}, {
  value: "LSL",
  label: "Lesotho loti (L)"
}, {
  value: "LYD",
  label: "Libyan dinar (ل.د)"
}, {
  value: "MAD",
  label: "Moroccan dirham (د.م.)"
}, {
  value: "MDL",
  label: "Moldovan leu (MDL)"
}, {
  value: "MGA",
  label: "Malagasy ariary (Ar)"
}, {
  value: "MKD",
  label: "Macedonian denar (ден)"
}, {
  value: "MMK",
  label: "Burmese kyat (Ks)"
}, {
  value: "MNT",
  label: "Mongolian tögrög (₮)"
}, {
  value: "MOP",
  label: "Macanese pataca (MOP$)"
}, {
  value: "MRO",
  label: "Mauritanian ouguiya (UM)"
}, {
  value: "MUR",
  label: "Mauritian rupee (₨)"
}, {
  value: "MVR",
  label: "Maldivian rufiyaa (.ރ)"
}, {
  value: "MWK",
  label: "Malawian kwacha (MK)"
}, {
  value: "MXN",
  label: "Mexican peso ($)"
}, {
  value: "MYR",
  label: "Malaysian ringgit (RM)"
}, {
  value: "MZN",
  label: "Mozambican metical (MT)"
}, {
  value: "NAD",
  label: "Namibian dollar (N$)"
}, {
  value: "NGN",
  label: "Nigerian naira (₦)"
}, {
  value: "NIO",
  label: "Nicaraguan córdoba (C$)"
}, {
  value: "NOK",
  label: "Norwegian krone (kr)"
}, {
  value: "NPR",
  label: "Nepalese rupee (₨)"
}, {
  value: "NZD",
  label: "New Zealand dollar ($)"
}, {
  value: "OMR",
  label: "Omani rial (ر.ع.)"
}, {
  value: "PAB",
  label: "Panamanian balboa (B/.)"
}, {
  value: "PEN",
  label: "Peruvian nuevo sol (S/.)"
}, {
  value: "PGK",
  label: "Papua New Guinean kina (K)"
}, {
  value: "PHP",
  label: "Philippine peso (₱)"
}, {
  value: "PKR",
  label: "Pakistani rupee (₨)"
}, {
  value: "PLN",
  label: "Polish złoty (zł)"
}, {
  value: "PRB",
  label: "Transnistrian ruble (р.)"
}, {
  value: "PYG",
  label: "Paraguayan guaraní (₲)"
}, {
  value: "QAR",
  label: "Qatari riyal (ر.ق)"
}, {
  value: "RON",
  label: "Romanian leu (lei)"
}, {
  value: "RSD",
  label: "Serbian dinar (дин.)"
}, {
  value: "RUB",
  label: "Russian ruble (₽)"
}, {
  value: "RWF",
  label: "Rwandan franc (Fr)"
}, {
  value: "SAR",
  label: "Saudi riyal (ر.س)"
}, {
  value: "SBD",
  label: "Solomon Islands dollar ($)"
}, {
  value: "SCR",
  label: "Seychellois rupee (₨)"
}, {
  value: "SDG",
  label: "Sudanese pound (ج.س.)"
}, {
  value: "SEK",
  label: "Swedish krona (kr)"
}, {
  value: "SGD",
  label: "Singapore dollar ($)"
}, {
  value: "SHP",
  label: "Saint Helena pound (£)"
}, {
  value: "SLL",
  label: "Sierra Leonean leone (Le)"
}, {
  value: "SOS",
  label: "Somali shilling (Sh)"
}, {
  value: "SRD",
  label: "Surinamese dollar ($)"
}, {
  value: "SSP",
  label: "South Sudanese pound (£)"
}, {
  value: "STD",
  label: "São Tomé and Príncipe dobra (Db)"
}, {
  value: "SYP",
  label: "Syrian pound (ل.س)"
}, {
  value: "SZL",
  label: "Swazi lilangeni (L)"
}, {
  value: "THB",
  label: "Thai baht (฿)"
}, {
  value: "TJS",
  label: "Tajikistani somoni (ЅМ)"
}, {
  value: "TMT",
  label: "Turkmenistan manat (m)"
}, {
  value: "TND",
  label: "Tunisian dinar (د.ت)"
}, {
  value: "TOP",
  label: "Tongan paʻanga (T$)"
}, {
  value: "TRY",
  label: "Turkish lira (₺)"
}, {
  value: "TTD",
  label: "Trinidad and Tobago dollar ($)"
}, {
  value: "TWD",
  label: "New Taiwan dollar (NT$)"
}, {
  value: "TZS",
  label: "Tanzanian shilling (Sh)"
}, {
  value: "UAH",
  label: "Ukrainian hryvnia (₴)"
}, {
  value: "UGX",
  label: "Ugandan shilling (UGX)"
}, {
  value: "USD",
  label: "United States dollar ($)"
}, {
  value: "UYU",
  label: "Uruguayan peso ($)"
}, {
  value: "UZS",
  label: "Uzbekistani som (UZS)"
}, {
  value: "VEF",
  label: "Venezuelan bolívar (Bs F)"
}, {
  value: "VND",
  label: "Vietnamese đồng (₫)"
}, {
  value: "VUV",
  label: "Vanuatu vatu (Vt)"
}, {
  value: "WST",
  label: "Samoan tālā (T)"
}, {
  value: "XAF",
  label: "Central African CFA franc (CFA)"
}, {
  value: "XCD",
  label: "East Caribbean dollar ($)"
}, {
  value: "XOF",
  label: "West African CFA franc (CFA)"
}, {
  value: "XPF",
  label: "CFP franc (Fr)"
}, {
  value: "YER",
  label: "Yemeni rial (﷼)"
}, {
  value: "ZAR",
  label: "South African rand (R)"
}, {
  value: "ZMW",
  label: "Zambian kwacha (ZK)"
}];

/***/ }),

/***/ "./src/settings/hooks/useSettingsAPI.js":
/*!**********************************************!*\
  !*** ./src/settings/hooks/useSettingsAPI.js ***!
  \**********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   useSettingsAPI: () => (/* binding */ useSettingsAPI)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js");



const useSettingsAPI = showToast => {
  const [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({});
  const API_BASE = window.HavenlyticsData?.hvnlyNabApi?.url || '/wp-json/hvnlynab/v1';
  const API_NONCE = window.HavenlyticsData?.hvnlyNabApi?.nonce || '';
  const SETTINGS_ENDPOINT = `${API_BASE}/plugin-settings`;
  const AXIOS_CONFIG = {
    headers: {
      'X-WP-Nonce': API_NONCE,
      'Content-Type': 'application/json'
    }
  };

  /**
   * Load all settings
   */
  const loadAllSettings = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async () => {
    // console.log('🔄 [API] loadAllSettings - Starting...');
    setIsLoading(true);
    try {
      const response = await axios__WEBPACK_IMPORTED_MODULE_2__["default"].get(SETTINGS_ENDPOINT, AXIOS_CONFIG);
      if (response.data?.success) {
        setSettings(response.data.data);
        return response.data.data;
      }
      throw new Error(response.data?.message || 'Failed to load settings');
    } catch (error) {
      // console.error('❌ [API] loadAllSettings - Error:', error);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Failed to load settings', 'havenlytics'));
      return null;
    } finally {
      setIsLoading(false);
    }
  }, [showToast]);

  /**
   * Save settings by group
   */
  const saveSettingsGroup = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async (group, data) => {
    // console.log(`💾 [API] saveSettingsGroup - Group: ${group}`);
    setIsLoading(true);
    try {
      const response = await axios__WEBPACK_IMPORTED_MODULE_2__["default"].post(`${SETTINGS_ENDPOINT}/${group}`, data, AXIOS_CONFIG);
      if (response.data?.success) {
        setSettings(prev => ({
          ...prev,
          [group]: response.data.data
        }));
        // REMOVED: showToast from here - let component handle it
        return {
          success: true,
          message: response.data.message,
          data: response.data.data
        };
      }
      throw new Error(response.data?.message || 'Failed to save settings');
    } catch (error) {
      // console.error(`❌ [API] saveSettingsGroup - Error for ${group}:`, error);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Error', 'havenlytics'), error.response?.data?.message || `Failed to save ${group} settings`);
      return {
        success: false,
        message: error.response?.data?.message || `Failed to save ${group} settings`
      };
    } finally {
      setIsLoading(false);
    }
  }, [showToast]);

  /**
   * Reset settings by group
   */
  const resetSettingsGroup = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async group => {
    // console.log(`🔄 [API] resetSettingsGroup - Group: ${group}`);
    setIsLoading(true);
    try {
      const response = await axios__WEBPACK_IMPORTED_MODULE_2__["default"].post(`${SETTINGS_ENDPOINT}/${group}/reset`, {}, AXIOS_CONFIG);
      if (response.data?.success) {
        setSettings(prev => ({
          ...prev,
          [group]: response.data.data
        }));
        // REMOVED: showToast from here - let component handle it
        return {
          success: true,
          message: response.data.message,
          data: response.data.data
        };
      }
      throw new Error(response.data?.message || 'Failed to reset settings');
    } catch (error) {
      // console.error(`❌ [API] resetSettingsGroup - Error for ${group}:`, error);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Error', 'havenlytics'), error.response?.data?.message || `Failed to reset ${group} settings`);
      return {
        success: false,
        message: error.response?.data?.message || `Failed to reset ${group} settings`
      };
    } finally {
      setIsLoading(false);
    }
  }, [showToast]);

  /**
   * Save all settings
   */
  const saveAllSettings = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async allData => {
    setIsLoading(true);
    try {
      const payload = {
        tabs: allData
      };
      const response = await axios__WEBPACK_IMPORTED_MODULE_2__["default"].post(`${SETTINGS_ENDPOINT}/save-all`, payload, AXIOS_CONFIG);
      if (response.data?.success) {
        setSettings(response.data.data);
        return {
          success: true,
          message: response.data.message,
          data: response.data.data
        };
      }
      throw new Error(response.data?.message || 'Failed to save settings');
    } catch (error) {
      // console.error('❌ [API] saveAllSettings - Error:', error);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Error', 'havenlytics'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Failed to save all settings', 'havenlytics'));
      return {
        success: false,
        message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Failed to save all settings', 'havenlytics')
      };
    } finally {
      setIsLoading(false);
    }
  }, [showToast]);

  /**
   * Reset all settings
   */
  const resetAllSettings = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async () => {
    setIsLoading(true);
    try {
      const response = await axios__WEBPACK_IMPORTED_MODULE_2__["default"].post(`${SETTINGS_ENDPOINT}/reset-all`, {}, AXIOS_CONFIG);
      if (response.data?.success) {
        setSettings(response.data.data);
        return {
          success: true,
          message: response.data.message,
          data: response.data.data
        };
      }
      throw new Error(response.data?.message || 'Failed to reset settings');
    } catch (error) {
      // console.error('❌ [API] resetAllSettings - Error:', error);
      showToast?.('error', (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Error', 'havenlytics'), error.response?.data?.message || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Failed to reset all settings', 'havenlytics'));
      return {
        success: false,
        message: error.response?.data?.message || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Failed to reset all settings', 'havenlytics')
      };
    } finally {
      setIsLoading(false);
    }
  }, [showToast]);
  return {
    settings,
    isLoading,
    loadAllSettings,
    saveSettingsGroup,
    resetSettingsGroup,
    saveAllSettings,
    resetAllSettings
  };
};

/***/ }),

/***/ "@wordpress/element":
/*!*********************************!*\
  !*** external ["wp","element"] ***!
  \*********************************/
/***/ ((module) => {

module.exports = window["wp"]["element"];

/***/ }),

/***/ "@wordpress/i18n":
/*!******************************!*\
  !*** external ["wp","i18n"] ***!
  \******************************/
/***/ ((module) => {

module.exports = window["wp"]["i18n"];

/***/ }),

/***/ "react":
/*!************************!*\
  !*** external "React" ***!
  \************************/
/***/ ((module) => {

module.exports = window["React"];

/***/ }),

/***/ "react-dom":
/*!***************************!*\
  !*** external "ReactDOM" ***!
  \***************************/
/***/ ((module) => {

module.exports = window["ReactDOM"];

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
(() => {
/*!**********************************!*\
  !*** ./src/settings/settings.js ***!
  \**********************************/
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom/client */ "./node_modules/react-dom/client.js");
/* harmony import */ var _SettingsApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SettingsApp */ "./src/SettingsApp.jsx");




// Run this IMMEDIATELY before anything else
(function () {
  const savedTheme = localStorage.getItem('havenlytics-theme');
  if (savedTheme === 'dark') {
    // Add class and force background
    document.body.classList.add('dark-mode');
    document.body.style.background = 'linear-gradient(135deg, #1a1a2e 0%, #16213e 100%)';
    document.body.style.backgroundColor = '#1a1a2e';
    document.documentElement.style.background = '#1a1a2e';
  }
})();
const initHavenlyticsAdminSettings = () => {
  const container = document.getElementById('HvnlyNab_admin_dashboard');
  if (!container) return;
  const root = (0,react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot)(container);
  root.render((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_SettingsApp__WEBPACK_IMPORTED_MODULE_2__["default"], null));
};
if (document.readyState === 'loading') {
  document.addEventListener('DOMContentLoaded', initHavenlyticsAdminSettings);
} else {
  initHavenlyticsAdminSettings();
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (initHavenlyticsAdminSettings);
})();

/******/ })()
;
//# sourceMappingURL=settings.js.map