"use strict";
const common_vendor = require("../../../../common/vendor.js");
function getRect(selector, _instance = null, all = false) {
  const instance = _instance || common_vendor.getCurrentInstance();
  return new Promise((resolve) => {
    common_vendor.index.createSelectorQuery().in(instance == null ? void 0 : instance.proxy)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
      if (all && Array.isArray(rect) && rect.length) {
        resolve(rect);
      }
      if (!all && rect) {
        resolve(rect);
      }
    }).exec();
  });
}
exports.getRect = getRect;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/getRect.js.map
