"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __esm = (fn, res) => function __init() {
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// ../../node_modules/xtend/immutable.js
var require_immutable = __commonJS({
  "../../node_modules/xtend/immutable.js"(exports2, module2) {
    module2.exports = extend;
    var hasOwnProperty = Object.prototype.hasOwnProperty;
    function extend() {
      var target = {};
      for (var i5 = 0; i5 < arguments.length; i5++) {
        var source = arguments[i5];
        for (var key in source) {
          if (hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
      return target;
    }
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/stream.js
var require_stream = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) {
    module2.exports = require("stream");
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/buffer_list.js
var require_buffer_list = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2, module2) {
    "use strict";
    function ownKeys2(object, enumerableOnly) {
      var keys = Object.keys(object);
      if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        enumerableOnly && (symbols = symbols.filter(function(sym) {
          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
        })), keys.push.apply(keys, symbols);
      }
      return keys;
    }
    function _objectSpread(target) {
      for (var i5 = 1; i5 < arguments.length; i5++) {
        var source = null != arguments[i5] ? arguments[i5] : {};
        i5 % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
          _defineProperty(target, key, source[key]);
        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
        });
      }
      return target;
    }
    function _defineProperty(obj, key, value) {
      key = _toPropertyKey(key);
      if (key in obj) {
        Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }
      return obj;
    }
    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }
    function _defineProperties(target, props) {
      for (var i5 = 0; i5 < props.length; i5++) {
        var descriptor = props[i5];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
      }
    }
    function _createClass(Constructor, protoProps, staticProps) {
      if (protoProps) _defineProperties(Constructor.prototype, protoProps);
      if (staticProps) _defineProperties(Constructor, staticProps);
      Object.defineProperty(Constructor, "prototype", { writable: false });
      return Constructor;
    }
    function _toPropertyKey(arg) {
      var key = _toPrimitive(arg, "string");
      return typeof key === "symbol" ? key : String(key);
    }
    function _toPrimitive(input, hint) {
      if (typeof input !== "object" || input === null) return input;
      var prim = input[Symbol.toPrimitive];
      if (prim !== void 0) {
        var res = prim.call(input, hint || "default");
        if (typeof res !== "object") return res;
        throw new TypeError("@@toPrimitive must return a primitive value.");
      }
      return (hint === "string" ? String : Number)(input);
    }
    var _require = require("buffer");
    var Buffer2 = _require.Buffer;
    var _require2 = require("util");
    var inspect = _require2.inspect;
    var custom = inspect && inspect.custom || "inspect";
    function copyBuffer(src, target, offset) {
      Buffer2.prototype.copy.call(src, target, offset);
    }
    module2.exports = /* @__PURE__ */ (function() {
      function BufferList() {
        _classCallCheck(this, BufferList);
        this.head = null;
        this.tail = null;
        this.length = 0;
      }
      _createClass(BufferList, [{
        key: "push",
        value: function push(v) {
          var entry = {
            data: v,
            next: null
          };
          if (this.length > 0) this.tail.next = entry;
          else this.head = entry;
          this.tail = entry;
          ++this.length;
        }
      }, {
        key: "unshift",
        value: function unshift(v) {
          var entry = {
            data: v,
            next: this.head
          };
          if (this.length === 0) this.tail = entry;
          this.head = entry;
          ++this.length;
        }
      }, {
        key: "shift",
        value: function shift() {
          if (this.length === 0) return;
          var ret = this.head.data;
          if (this.length === 1) this.head = this.tail = null;
          else this.head = this.head.next;
          --this.length;
          return ret;
        }
      }, {
        key: "clear",
        value: function clear() {
          this.head = this.tail = null;
          this.length = 0;
        }
      }, {
        key: "join",
        value: function join(s) {
          if (this.length === 0) return "";
          var p2 = this.head;
          var ret = "" + p2.data;
          while (p2 = p2.next) ret += s + p2.data;
          return ret;
        }
      }, {
        key: "concat",
        value: function concat(n2) {
          if (this.length === 0) return Buffer2.alloc(0);
          var ret = Buffer2.allocUnsafe(n2 >>> 0);
          var p2 = this.head;
          var i5 = 0;
          while (p2) {
            copyBuffer(p2.data, ret, i5);
            i5 += p2.data.length;
            p2 = p2.next;
          }
          return ret;
        }
        // Consumes a specified amount of bytes or characters from the buffered data.
      }, {
        key: "consume",
        value: function consume(n2, hasStrings) {
          var ret;
          if (n2 < this.head.data.length) {
            ret = this.head.data.slice(0, n2);
            this.head.data = this.head.data.slice(n2);
          } else if (n2 === this.head.data.length) {
            ret = this.shift();
          } else {
            ret = hasStrings ? this._getString(n2) : this._getBuffer(n2);
          }
          return ret;
        }
      }, {
        key: "first",
        value: function first() {
          return this.head.data;
        }
        // Consumes a specified amount of characters from the buffered data.
      }, {
        key: "_getString",
        value: function _getString(n2) {
          var p2 = this.head;
          var c5 = 1;
          var ret = p2.data;
          n2 -= ret.length;
          while (p2 = p2.next) {
            var str = p2.data;
            var nb = n2 > str.length ? str.length : n2;
            if (nb === str.length) ret += str;
            else ret += str.slice(0, n2);
            n2 -= nb;
            if (n2 === 0) {
              if (nb === str.length) {
                ++c5;
                if (p2.next) this.head = p2.next;
                else this.head = this.tail = null;
              } else {
                this.head = p2;
                p2.data = str.slice(nb);
              }
              break;
            }
            ++c5;
          }
          this.length -= c5;
          return ret;
        }
        // Consumes a specified amount of bytes from the buffered data.
      }, {
        key: "_getBuffer",
        value: function _getBuffer(n2) {
          var ret = Buffer2.allocUnsafe(n2);
          var p2 = this.head;
          var c5 = 1;
          p2.data.copy(ret);
          n2 -= p2.data.length;
          while (p2 = p2.next) {
            var buf = p2.data;
            var nb = n2 > buf.length ? buf.length : n2;
            buf.copy(ret, ret.length - n2, 0, nb);
            n2 -= nb;
            if (n2 === 0) {
              if (nb === buf.length) {
                ++c5;
                if (p2.next) this.head = p2.next;
                else this.head = this.tail = null;
              } else {
                this.head = p2;
                p2.data = buf.slice(nb);
              }
              break;
            }
            ++c5;
          }
          this.length -= c5;
          return ret;
        }
        // Make sure the linked list only shows the minimal necessary information.
      }, {
        key: custom,
        value: function value(_, options) {
          return inspect(this, _objectSpread(_objectSpread({}, options), {}, {
            // Only inspect one level.
            depth: 0,
            // It should not recurse.
            customInspect: false
          }));
        }
      }]);
      return BufferList;
    })();
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/destroy.js
var require_destroy = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) {
    "use strict";
    function destroy(err, cb) {
      var _this = this;
      var readableDestroyed = this._readableState && this._readableState.destroyed;
      var writableDestroyed = this._writableState && this._writableState.destroyed;
      if (readableDestroyed || writableDestroyed) {
        if (cb) {
          cb(err);
        } else if (err) {
          if (!this._writableState) {
            process.nextTick(emitErrorNT, this, err);
          } else if (!this._writableState.errorEmitted) {
            this._writableState.errorEmitted = true;
            process.nextTick(emitErrorNT, this, err);
          }
        }
        return this;
      }
      if (this._readableState) {
        this._readableState.destroyed = true;
      }
      if (this._writableState) {
        this._writableState.destroyed = true;
      }
      this._destroy(err || null, function(err2) {
        if (!cb && err2) {
          if (!_this._writableState) {
            process.nextTick(emitErrorAndCloseNT, _this, err2);
          } else if (!_this._writableState.errorEmitted) {
            _this._writableState.errorEmitted = true;
            process.nextTick(emitErrorAndCloseNT, _this, err2);
          } else {
            process.nextTick(emitCloseNT, _this);
          }
        } else if (cb) {
          process.nextTick(emitCloseNT, _this);
          cb(err2);
        } else {
          process.nextTick(emitCloseNT, _this);
        }
      });
      return this;
    }
    function emitErrorAndCloseNT(self2, err) {
      emitErrorNT(self2, err);
      emitCloseNT(self2);
    }
    function emitCloseNT(self2) {
      if (self2._writableState && !self2._writableState.emitClose) return;
      if (self2._readableState && !self2._readableState.emitClose) return;
      self2.emit("close");
    }
    function undestroy() {
      if (this._readableState) {
        this._readableState.destroyed = false;
        this._readableState.reading = false;
        this._readableState.ended = false;
        this._readableState.endEmitted = false;
      }
      if (this._writableState) {
        this._writableState.destroyed = false;
        this._writableState.ended = false;
        this._writableState.ending = false;
        this._writableState.finalCalled = false;
        this._writableState.prefinished = false;
        this._writableState.finished = false;
        this._writableState.errorEmitted = false;
      }
    }
    function emitErrorNT(self2, err) {
      self2.emit("error", err);
    }
    function errorOrDestroy(stream, err) {
      var rState = stream._readableState;
      var wState = stream._writableState;
      if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);
      else stream.emit("error", err);
    }
    module2.exports = {
      destroy,
      undestroy,
      errorOrDestroy
    };
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/errors.js
var require_errors = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/errors.js"(exports2, module2) {
    "use strict";
    var codes = {};
    function createErrorType(code, message, Base) {
      if (!Base) {
        Base = Error;
      }
      function getMessage(arg1, arg2, arg3) {
        if (typeof message === "string") {
          return message;
        } else {
          return message(arg1, arg2, arg3);
        }
      }
      class NodeError extends Base {
        constructor(arg1, arg2, arg3) {
          super(getMessage(arg1, arg2, arg3));
        }
      }
      NodeError.prototype.name = Base.name;
      NodeError.prototype.code = code;
      codes[code] = NodeError;
    }
    function oneOf(expected, thing) {
      if (Array.isArray(expected)) {
        const len = expected.length;
        expected = expected.map((i5) => String(i5));
        if (len > 2) {
          return `one of ${thing} ${expected.slice(0, len - 1).join(", ")}, or ` + expected[len - 1];
        } else if (len === 2) {
          return `one of ${thing} ${expected[0]} or ${expected[1]}`;
        } else {
          return `of ${thing} ${expected[0]}`;
        }
      } else {
        return `of ${thing} ${String(expected)}`;
      }
    }
    function startsWith(str, search, pos) {
      return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
    }
    function endsWith(str, search, this_len) {
      if (this_len === void 0 || this_len > str.length) {
        this_len = str.length;
      }
      return str.substring(this_len - search.length, this_len) === search;
    }
    function includes(str, search, start) {
      if (typeof start !== "number") {
        start = 0;
      }
      if (start + search.length > str.length) {
        return false;
      } else {
        return str.indexOf(search, start) !== -1;
      }
    }
    createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) {
      return 'The value "' + value + '" is invalid for option "' + name + '"';
    }, TypeError);
    createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
      let determiner;
      if (typeof expected === "string" && startsWith(expected, "not ")) {
        determiner = "must not be";
        expected = expected.replace(/^not /, "");
      } else {
        determiner = "must be";
      }
      let msg;
      if (endsWith(name, " argument")) {
        msg = `The ${name} ${determiner} ${oneOf(expected, "type")}`;
      } else {
        const type = includes(name, ".") ? "property" : "argument";
        msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, "type")}`;
      }
      msg += `. Received type ${typeof actual}`;
      return msg;
    }, TypeError);
    createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
    createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) {
      return "The " + name + " method is not implemented";
    });
    createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
    createErrorType("ERR_STREAM_DESTROYED", function(name) {
      return "Cannot call " + name + " after a stream was destroyed";
    });
    createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
    createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
    createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end");
    createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError);
    createErrorType("ERR_UNKNOWN_ENCODING", function(arg) {
      return "Unknown encoding: " + arg;
    }, TypeError);
    createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
    module2.exports.codes = codes;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/state.js
var require_state = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/state.js"(exports2, module2) {
    "use strict";
    var ERR_INVALID_OPT_VALUE = require_errors().codes.ERR_INVALID_OPT_VALUE;
    function highWaterMarkFrom(options, isDuplex, duplexKey) {
      return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
    }
    function getHighWaterMark(state2, options, duplexKey, isDuplex) {
      var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
      if (hwm != null) {
        if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
          var name = isDuplex ? duplexKey : "highWaterMark";
          throw new ERR_INVALID_OPT_VALUE(name, hwm);
        }
        return Math.floor(hwm);
      }
      return state2.objectMode ? 16 : 16 * 1024;
    }
    module2.exports = {
      getHighWaterMark
    };
  }
});

// ../../node_modules/inherits/inherits_browser.js
var require_inherits_browser = __commonJS({
  "../../node_modules/inherits/inherits_browser.js"(exports2, module2) {
    if (typeof Object.create === "function") {
      module2.exports = function inherits(ctor, superCtor) {
        if (superCtor) {
          ctor.super_ = superCtor;
          ctor.prototype = Object.create(superCtor.prototype, {
            constructor: {
              value: ctor,
              enumerable: false,
              writable: true,
              configurable: true
            }
          });
        }
      };
    } else {
      module2.exports = function inherits(ctor, superCtor) {
        if (superCtor) {
          ctor.super_ = superCtor;
          var TempCtor = function() {
          };
          TempCtor.prototype = superCtor.prototype;
          ctor.prototype = new TempCtor();
          ctor.prototype.constructor = ctor;
        }
      };
    }
  }
});

// ../../node_modules/inherits/inherits.js
var require_inherits = __commonJS({
  "../../node_modules/inherits/inherits.js"(exports2, module2) {
    try {
      util = require("util");
      if (typeof util.inherits !== "function") throw "";
      module2.exports = util.inherits;
    } catch (e5) {
      module2.exports = require_inherits_browser();
    }
    var util;
  }
});

// ../../node_modules/util-deprecate/node.js
var require_node = __commonJS({
  "../../node_modules/util-deprecate/node.js"(exports2, module2) {
    module2.exports = require("util").deprecate;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/_stream_writable.js
var require_stream_writable = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) {
    "use strict";
    module2.exports = Writable;
    function CorkedRequest(state2) {
      var _this = this;
      this.next = null;
      this.entry = null;
      this.finish = function() {
        onCorkedFinish(_this, state2);
      };
    }
    var Duplex;
    Writable.WritableState = WritableState;
    var internalUtil = {
      deprecate: require_node()
    };
    var Stream = require_stream();
    var Buffer2 = require("buffer").Buffer;
    var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
    };
    function _uint8ArrayToBuffer(chunk) {
      return Buffer2.from(chunk);
    }
    function _isUint8Array(obj) {
      return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
    }
    var destroyImpl = require_destroy();
    var _require = require_state();
    var getHighWaterMark = _require.getHighWaterMark;
    var _require$codes = require_errors().codes;
    var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE;
    var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
    var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK;
    var ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE;
    var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
    var ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES;
    var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END;
    var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
    var errorOrDestroy = destroyImpl.errorOrDestroy;
    require_inherits()(Writable, Stream);
    function nop() {
    }
    function WritableState(options, stream, isDuplex) {
      Duplex = Duplex || require_stream_duplex();
      options = options || {};
      if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex;
      this.objectMode = !!options.objectMode;
      if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
      this.highWaterMark = getHighWaterMark(this, options, "writableHighWaterMark", isDuplex);
      this.finalCalled = false;
      this.needDrain = false;
      this.ending = false;
      this.ended = false;
      this.finished = false;
      this.destroyed = false;
      var noDecode = options.decodeStrings === false;
      this.decodeStrings = !noDecode;
      this.defaultEncoding = options.defaultEncoding || "utf8";
      this.length = 0;
      this.writing = false;
      this.corked = 0;
      this.sync = true;
      this.bufferProcessing = false;
      this.onwrite = function(er) {
        onwrite(stream, er);
      };
      this.writecb = null;
      this.writelen = 0;
      this.bufferedRequest = null;
      this.lastBufferedRequest = null;
      this.pendingcb = 0;
      this.prefinished = false;
      this.errorEmitted = false;
      this.emitClose = options.emitClose !== false;
      this.autoDestroy = !!options.autoDestroy;
      this.bufferedRequestCount = 0;
      this.corkedRequestsFree = new CorkedRequest(this);
    }
    WritableState.prototype.getBuffer = function getBuffer() {
      var current = this.bufferedRequest;
      var out = [];
      while (current) {
        out.push(current);
        current = current.next;
      }
      return out;
    };
    (function() {
      try {
        Object.defineProperty(WritableState.prototype, "buffer", {
          get: internalUtil.deprecate(function writableStateBufferGetter() {
            return this.getBuffer();
          }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
        });
      } catch (_) {
      }
    })();
    var realHasInstance;
    if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") {
      realHasInstance = Function.prototype[Symbol.hasInstance];
      Object.defineProperty(Writable, Symbol.hasInstance, {
        value: function value(object) {
          if (realHasInstance.call(this, object)) return true;
          if (this !== Writable) return false;
          return object && object._writableState instanceof WritableState;
        }
      });
    } else {
      realHasInstance = function realHasInstance2(object) {
        return object instanceof this;
      };
    }
    function Writable(options) {
      Duplex = Duplex || require_stream_duplex();
      var isDuplex = this instanceof Duplex;
      if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);
      this._writableState = new WritableState(options, this, isDuplex);
      this.writable = true;
      if (options) {
        if (typeof options.write === "function") this._write = options.write;
        if (typeof options.writev === "function") this._writev = options.writev;
        if (typeof options.destroy === "function") this._destroy = options.destroy;
        if (typeof options.final === "function") this._final = options.final;
      }
      Stream.call(this);
    }
    Writable.prototype.pipe = function() {
      errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
    };
    function writeAfterEnd(stream, cb) {
      var er = new ERR_STREAM_WRITE_AFTER_END();
      errorOrDestroy(stream, er);
      process.nextTick(cb, er);
    }
    function validChunk(stream, state2, chunk, cb) {
      var er;
      if (chunk === null) {
        er = new ERR_STREAM_NULL_VALUES();
      } else if (typeof chunk !== "string" && !state2.objectMode) {
        er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk);
      }
      if (er) {
        errorOrDestroy(stream, er);
        process.nextTick(cb, er);
        return false;
      }
      return true;
    }
    Writable.prototype.write = function(chunk, encoding, cb) {
      var state2 = this._writableState;
      var ret = false;
      var isBuf = !state2.objectMode && _isUint8Array(chunk);
      if (isBuf && !Buffer2.isBuffer(chunk)) {
        chunk = _uint8ArrayToBuffer(chunk);
      }
      if (typeof encoding === "function") {
        cb = encoding;
        encoding = null;
      }
      if (isBuf) encoding = "buffer";
      else if (!encoding) encoding = state2.defaultEncoding;
      if (typeof cb !== "function") cb = nop;
      if (state2.ending) writeAfterEnd(this, cb);
      else if (isBuf || validChunk(this, state2, chunk, cb)) {
        state2.pendingcb++;
        ret = writeOrBuffer(this, state2, isBuf, chunk, encoding, cb);
      }
      return ret;
    };
    Writable.prototype.cork = function() {
      this._writableState.corked++;
    };
    Writable.prototype.uncork = function() {
      var state2 = this._writableState;
      if (state2.corked) {
        state2.corked--;
        if (!state2.writing && !state2.corked && !state2.bufferProcessing && state2.bufferedRequest) clearBuffer(this, state2);
      }
    };
    Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
      if (typeof encoding === "string") encoding = encoding.toLowerCase();
      if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);
      this._writableState.defaultEncoding = encoding;
      return this;
    };
    Object.defineProperty(Writable.prototype, "writableBuffer", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._writableState && this._writableState.getBuffer();
      }
    });
    function decodeChunk(state2, chunk, encoding) {
      if (!state2.objectMode && state2.decodeStrings !== false && typeof chunk === "string") {
        chunk = Buffer2.from(chunk, encoding);
      }
      return chunk;
    }
    Object.defineProperty(Writable.prototype, "writableHighWaterMark", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._writableState.highWaterMark;
      }
    });
    function writeOrBuffer(stream, state2, isBuf, chunk, encoding, cb) {
      if (!isBuf) {
        var newChunk = decodeChunk(state2, chunk, encoding);
        if (chunk !== newChunk) {
          isBuf = true;
          encoding = "buffer";
          chunk = newChunk;
        }
      }
      var len = state2.objectMode ? 1 : chunk.length;
      state2.length += len;
      var ret = state2.length < state2.highWaterMark;
      if (!ret) state2.needDrain = true;
      if (state2.writing || state2.corked) {
        var last = state2.lastBufferedRequest;
        state2.lastBufferedRequest = {
          chunk,
          encoding,
          isBuf,
          callback: cb,
          next: null
        };
        if (last) {
          last.next = state2.lastBufferedRequest;
        } else {
          state2.bufferedRequest = state2.lastBufferedRequest;
        }
        state2.bufferedRequestCount += 1;
      } else {
        doWrite(stream, state2, false, len, chunk, encoding, cb);
      }
      return ret;
    }
    function doWrite(stream, state2, writev, len, chunk, encoding, cb) {
      state2.writelen = len;
      state2.writecb = cb;
      state2.writing = true;
      state2.sync = true;
      if (state2.destroyed) state2.onwrite(new ERR_STREAM_DESTROYED("write"));
      else if (writev) stream._writev(chunk, state2.onwrite);
      else stream._write(chunk, encoding, state2.onwrite);
      state2.sync = false;
    }
    function onwriteError(stream, state2, sync, er, cb) {
      --state2.pendingcb;
      if (sync) {
        process.nextTick(cb, er);
        process.nextTick(finishMaybe, stream, state2);
        stream._writableState.errorEmitted = true;
        errorOrDestroy(stream, er);
      } else {
        cb(er);
        stream._writableState.errorEmitted = true;
        errorOrDestroy(stream, er);
        finishMaybe(stream, state2);
      }
    }
    function onwriteStateUpdate(state2) {
      state2.writing = false;
      state2.writecb = null;
      state2.length -= state2.writelen;
      state2.writelen = 0;
    }
    function onwrite(stream, er) {
      var state2 = stream._writableState;
      var sync = state2.sync;
      var cb = state2.writecb;
      if (typeof cb !== "function") throw new ERR_MULTIPLE_CALLBACK();
      onwriteStateUpdate(state2);
      if (er) onwriteError(stream, state2, sync, er, cb);
      else {
        var finished = needFinish(state2) || stream.destroyed;
        if (!finished && !state2.corked && !state2.bufferProcessing && state2.bufferedRequest) {
          clearBuffer(stream, state2);
        }
        if (sync) {
          process.nextTick(afterWrite, stream, state2, finished, cb);
        } else {
          afterWrite(stream, state2, finished, cb);
        }
      }
    }
    function afterWrite(stream, state2, finished, cb) {
      if (!finished) onwriteDrain(stream, state2);
      state2.pendingcb--;
      cb();
      finishMaybe(stream, state2);
    }
    function onwriteDrain(stream, state2) {
      if (state2.length === 0 && state2.needDrain) {
        state2.needDrain = false;
        stream.emit("drain");
      }
    }
    function clearBuffer(stream, state2) {
      state2.bufferProcessing = true;
      var entry = state2.bufferedRequest;
      if (stream._writev && entry && entry.next) {
        var l3 = state2.bufferedRequestCount;
        var buffer = new Array(l3);
        var holder = state2.corkedRequestsFree;
        holder.entry = entry;
        var count = 0;
        var allBuffers = true;
        while (entry) {
          buffer[count] = entry;
          if (!entry.isBuf) allBuffers = false;
          entry = entry.next;
          count += 1;
        }
        buffer.allBuffers = allBuffers;
        doWrite(stream, state2, true, state2.length, buffer, "", holder.finish);
        state2.pendingcb++;
        state2.lastBufferedRequest = null;
        if (holder.next) {
          state2.corkedRequestsFree = holder.next;
          holder.next = null;
        } else {
          state2.corkedRequestsFree = new CorkedRequest(state2);
        }
        state2.bufferedRequestCount = 0;
      } else {
        while (entry) {
          var chunk = entry.chunk;
          var encoding = entry.encoding;
          var cb = entry.callback;
          var len = state2.objectMode ? 1 : chunk.length;
          doWrite(stream, state2, false, len, chunk, encoding, cb);
          entry = entry.next;
          state2.bufferedRequestCount--;
          if (state2.writing) {
            break;
          }
        }
        if (entry === null) state2.lastBufferedRequest = null;
      }
      state2.bufferedRequest = entry;
      state2.bufferProcessing = false;
    }
    Writable.prototype._write = function(chunk, encoding, cb) {
      cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"));
    };
    Writable.prototype._writev = null;
    Writable.prototype.end = function(chunk, encoding, cb) {
      var state2 = this._writableState;
      if (typeof chunk === "function") {
        cb = chunk;
        chunk = null;
        encoding = null;
      } else if (typeof encoding === "function") {
        cb = encoding;
        encoding = null;
      }
      if (chunk !== null && chunk !== void 0) this.write(chunk, encoding);
      if (state2.corked) {
        state2.corked = 1;
        this.uncork();
      }
      if (!state2.ending) endWritable(this, state2, cb);
      return this;
    };
    Object.defineProperty(Writable.prototype, "writableLength", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._writableState.length;
      }
    });
    function needFinish(state2) {
      return state2.ending && state2.length === 0 && state2.bufferedRequest === null && !state2.finished && !state2.writing;
    }
    function callFinal(stream, state2) {
      stream._final(function(err) {
        state2.pendingcb--;
        if (err) {
          errorOrDestroy(stream, err);
        }
        state2.prefinished = true;
        stream.emit("prefinish");
        finishMaybe(stream, state2);
      });
    }
    function prefinish(stream, state2) {
      if (!state2.prefinished && !state2.finalCalled) {
        if (typeof stream._final === "function" && !state2.destroyed) {
          state2.pendingcb++;
          state2.finalCalled = true;
          process.nextTick(callFinal, stream, state2);
        } else {
          state2.prefinished = true;
          stream.emit("prefinish");
        }
      }
    }
    function finishMaybe(stream, state2) {
      var need = needFinish(state2);
      if (need) {
        prefinish(stream, state2);
        if (state2.pendingcb === 0) {
          state2.finished = true;
          stream.emit("finish");
          if (state2.autoDestroy) {
            var rState = stream._readableState;
            if (!rState || rState.autoDestroy && rState.endEmitted) {
              stream.destroy();
            }
          }
        }
      }
      return need;
    }
    function endWritable(stream, state2, cb) {
      state2.ending = true;
      finishMaybe(stream, state2);
      if (cb) {
        if (state2.finished) process.nextTick(cb);
        else stream.once("finish", cb);
      }
      state2.ended = true;
      stream.writable = false;
    }
    function onCorkedFinish(corkReq, state2, err) {
      var entry = corkReq.entry;
      corkReq.entry = null;
      while (entry) {
        var cb = entry.callback;
        state2.pendingcb--;
        cb(err);
        entry = entry.next;
      }
      state2.corkedRequestsFree.next = corkReq;
    }
    Object.defineProperty(Writable.prototype, "destroyed", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        if (this._writableState === void 0) {
          return false;
        }
        return this._writableState.destroyed;
      },
      set: function set(value) {
        if (!this._writableState) {
          return;
        }
        this._writableState.destroyed = value;
      }
    });
    Writable.prototype.destroy = destroyImpl.destroy;
    Writable.prototype._undestroy = destroyImpl.undestroy;
    Writable.prototype._destroy = function(err, cb) {
      cb(err);
    };
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/_stream_duplex.js
var require_stream_duplex = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) {
    "use strict";
    var objectKeys = Object.keys || function(obj) {
      var keys2 = [];
      for (var key in obj) keys2.push(key);
      return keys2;
    };
    module2.exports = Duplex;
    var Readable = require_stream_readable();
    var Writable = require_stream_writable();
    require_inherits()(Duplex, Readable);
    {
      keys = objectKeys(Writable.prototype);
      for (v = 0; v < keys.length; v++) {
        method = keys[v];
        if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
      }
    }
    var keys;
    var method;
    var v;
    function Duplex(options) {
      if (!(this instanceof Duplex)) return new Duplex(options);
      Readable.call(this, options);
      Writable.call(this, options);
      this.allowHalfOpen = true;
      if (options) {
        if (options.readable === false) this.readable = false;
        if (options.writable === false) this.writable = false;
        if (options.allowHalfOpen === false) {
          this.allowHalfOpen = false;
          this.once("end", onend);
        }
      }
    }
    Object.defineProperty(Duplex.prototype, "writableHighWaterMark", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._writableState.highWaterMark;
      }
    });
    Object.defineProperty(Duplex.prototype, "writableBuffer", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._writableState && this._writableState.getBuffer();
      }
    });
    Object.defineProperty(Duplex.prototype, "writableLength", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._writableState.length;
      }
    });
    function onend() {
      if (this._writableState.ended) return;
      process.nextTick(onEndNT, this);
    }
    function onEndNT(self2) {
      self2.end();
    }
    Object.defineProperty(Duplex.prototype, "destroyed", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        if (this._readableState === void 0 || this._writableState === void 0) {
          return false;
        }
        return this._readableState.destroyed && this._writableState.destroyed;
      },
      set: function set(value) {
        if (this._readableState === void 0 || this._writableState === void 0) {
          return;
        }
        this._readableState.destroyed = value;
        this._writableState.destroyed = value;
      }
    });
  }
});

// ../../node_modules/string_decoder/node_modules/safe-buffer/index.js
var require_safe_buffer = __commonJS({
  "../../node_modules/string_decoder/node_modules/safe-buffer/index.js"(exports2, module2) {
    var buffer = require("buffer");
    var Buffer2 = buffer.Buffer;
    function copyProps(src, dst) {
      for (var key in src) {
        dst[key] = src[key];
      }
    }
    if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) {
      module2.exports = buffer;
    } else {
      copyProps(buffer, exports2);
      exports2.Buffer = SafeBuffer;
    }
    function SafeBuffer(arg, encodingOrOffset, length) {
      return Buffer2(arg, encodingOrOffset, length);
    }
    copyProps(Buffer2, SafeBuffer);
    SafeBuffer.from = function(arg, encodingOrOffset, length) {
      if (typeof arg === "number") {
        throw new TypeError("Argument must not be a number");
      }
      return Buffer2(arg, encodingOrOffset, length);
    };
    SafeBuffer.alloc = function(size, fill, encoding) {
      if (typeof size !== "number") {
        throw new TypeError("Argument must be a number");
      }
      var buf = Buffer2(size);
      if (fill !== void 0) {
        if (typeof encoding === "string") {
          buf.fill(fill, encoding);
        } else {
          buf.fill(fill);
        }
      } else {
        buf.fill(0);
      }
      return buf;
    };
    SafeBuffer.allocUnsafe = function(size) {
      if (typeof size !== "number") {
        throw new TypeError("Argument must be a number");
      }
      return Buffer2(size);
    };
    SafeBuffer.allocUnsafeSlow = function(size) {
      if (typeof size !== "number") {
        throw new TypeError("Argument must be a number");
      }
      return buffer.SlowBuffer(size);
    };
  }
});

// ../../node_modules/string_decoder/lib/string_decoder.js
var require_string_decoder = __commonJS({
  "../../node_modules/string_decoder/lib/string_decoder.js"(exports2) {
    "use strict";
    var Buffer2 = require_safe_buffer().Buffer;
    var isEncoding = Buffer2.isEncoding || function(encoding) {
      encoding = "" + encoding;
      switch (encoding && encoding.toLowerCase()) {
        case "hex":
        case "utf8":
        case "utf-8":
        case "ascii":
        case "binary":
        case "base64":
        case "ucs2":
        case "ucs-2":
        case "utf16le":
        case "utf-16le":
        case "raw":
          return true;
        default:
          return false;
      }
    };
    function _normalizeEncoding(enc) {
      if (!enc) return "utf8";
      var retried;
      while (true) {
        switch (enc) {
          case "utf8":
          case "utf-8":
            return "utf8";
          case "ucs2":
          case "ucs-2":
          case "utf16le":
          case "utf-16le":
            return "utf16le";
          case "latin1":
          case "binary":
            return "latin1";
          case "base64":
          case "ascii":
          case "hex":
            return enc;
          default:
            if (retried) return;
            enc = ("" + enc).toLowerCase();
            retried = true;
        }
      }
    }
    function normalizeEncoding(enc) {
      var nenc = _normalizeEncoding(enc);
      if (typeof nenc !== "string" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc))) throw new Error("Unknown encoding: " + enc);
      return nenc || enc;
    }
    exports2.StringDecoder = StringDecoder;
    function StringDecoder(encoding) {
      this.encoding = normalizeEncoding(encoding);
      var nb;
      switch (this.encoding) {
        case "utf16le":
          this.text = utf16Text;
          this.end = utf16End;
          nb = 4;
          break;
        case "utf8":
          this.fillLast = utf8FillLast;
          nb = 4;
          break;
        case "base64":
          this.text = base64Text;
          this.end = base64End;
          nb = 3;
          break;
        default:
          this.write = simpleWrite;
          this.end = simpleEnd;
          return;
      }
      this.lastNeed = 0;
      this.lastTotal = 0;
      this.lastChar = Buffer2.allocUnsafe(nb);
    }
    StringDecoder.prototype.write = function(buf) {
      if (buf.length === 0) return "";
      var r5;
      var i5;
      if (this.lastNeed) {
        r5 = this.fillLast(buf);
        if (r5 === void 0) return "";
        i5 = this.lastNeed;
        this.lastNeed = 0;
      } else {
        i5 = 0;
      }
      if (i5 < buf.length) return r5 ? r5 + this.text(buf, i5) : this.text(buf, i5);
      return r5 || "";
    };
    StringDecoder.prototype.end = utf8End;
    StringDecoder.prototype.text = utf8Text;
    StringDecoder.prototype.fillLast = function(buf) {
      if (this.lastNeed <= buf.length) {
        buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
        return this.lastChar.toString(this.encoding, 0, this.lastTotal);
      }
      buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
      this.lastNeed -= buf.length;
    };
    function utf8CheckByte(byte) {
      if (byte <= 127) return 0;
      else if (byte >> 5 === 6) return 2;
      else if (byte >> 4 === 14) return 3;
      else if (byte >> 3 === 30) return 4;
      return byte >> 6 === 2 ? -1 : -2;
    }
    function utf8CheckIncomplete(self2, buf, i5) {
      var j5 = buf.length - 1;
      if (j5 < i5) return 0;
      var nb = utf8CheckByte(buf[j5]);
      if (nb >= 0) {
        if (nb > 0) self2.lastNeed = nb - 1;
        return nb;
      }
      if (--j5 < i5 || nb === -2) return 0;
      nb = utf8CheckByte(buf[j5]);
      if (nb >= 0) {
        if (nb > 0) self2.lastNeed = nb - 2;
        return nb;
      }
      if (--j5 < i5 || nb === -2) return 0;
      nb = utf8CheckByte(buf[j5]);
      if (nb >= 0) {
        if (nb > 0) {
          if (nb === 2) nb = 0;
          else self2.lastNeed = nb - 3;
        }
        return nb;
      }
      return 0;
    }
    function utf8CheckExtraBytes(self2, buf, p2) {
      if ((buf[0] & 192) !== 128) {
        self2.lastNeed = 0;
        return "\uFFFD";
      }
      if (self2.lastNeed > 1 && buf.length > 1) {
        if ((buf[1] & 192) !== 128) {
          self2.lastNeed = 1;
          return "\uFFFD";
        }
        if (self2.lastNeed > 2 && buf.length > 2) {
          if ((buf[2] & 192) !== 128) {
            self2.lastNeed = 2;
            return "\uFFFD";
          }
        }
      }
    }
    function utf8FillLast(buf) {
      var p2 = this.lastTotal - this.lastNeed;
      var r5 = utf8CheckExtraBytes(this, buf, p2);
      if (r5 !== void 0) return r5;
      if (this.lastNeed <= buf.length) {
        buf.copy(this.lastChar, p2, 0, this.lastNeed);
        return this.lastChar.toString(this.encoding, 0, this.lastTotal);
      }
      buf.copy(this.lastChar, p2, 0, buf.length);
      this.lastNeed -= buf.length;
    }
    function utf8Text(buf, i5) {
      var total = utf8CheckIncomplete(this, buf, i5);
      if (!this.lastNeed) return buf.toString("utf8", i5);
      this.lastTotal = total;
      var end = buf.length - (total - this.lastNeed);
      buf.copy(this.lastChar, 0, end);
      return buf.toString("utf8", i5, end);
    }
    function utf8End(buf) {
      var r5 = buf && buf.length ? this.write(buf) : "";
      if (this.lastNeed) return r5 + "\uFFFD";
      return r5;
    }
    function utf16Text(buf, i5) {
      if ((buf.length - i5) % 2 === 0) {
        var r5 = buf.toString("utf16le", i5);
        if (r5) {
          var c5 = r5.charCodeAt(r5.length - 1);
          if (c5 >= 55296 && c5 <= 56319) {
            this.lastNeed = 2;
            this.lastTotal = 4;
            this.lastChar[0] = buf[buf.length - 2];
            this.lastChar[1] = buf[buf.length - 1];
            return r5.slice(0, -1);
          }
        }
        return r5;
      }
      this.lastNeed = 1;
      this.lastTotal = 2;
      this.lastChar[0] = buf[buf.length - 1];
      return buf.toString("utf16le", i5, buf.length - 1);
    }
    function utf16End(buf) {
      var r5 = buf && buf.length ? this.write(buf) : "";
      if (this.lastNeed) {
        var end = this.lastTotal - this.lastNeed;
        return r5 + this.lastChar.toString("utf16le", 0, end);
      }
      return r5;
    }
    function base64Text(buf, i5) {
      var n2 = (buf.length - i5) % 3;
      if (n2 === 0) return buf.toString("base64", i5);
      this.lastNeed = 3 - n2;
      this.lastTotal = 3;
      if (n2 === 1) {
        this.lastChar[0] = buf[buf.length - 1];
      } else {
        this.lastChar[0] = buf[buf.length - 2];
        this.lastChar[1] = buf[buf.length - 1];
      }
      return buf.toString("base64", i5, buf.length - n2);
    }
    function base64End(buf) {
      var r5 = buf && buf.length ? this.write(buf) : "";
      if (this.lastNeed) return r5 + this.lastChar.toString("base64", 0, 3 - this.lastNeed);
      return r5;
    }
    function simpleWrite(buf) {
      return buf.toString(this.encoding);
    }
    function simpleEnd(buf) {
      return buf && buf.length ? this.write(buf) : "";
    }
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
var require_end_of_stream = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) {
    "use strict";
    var ERR_STREAM_PREMATURE_CLOSE = require_errors().codes.ERR_STREAM_PREMATURE_CLOSE;
    function once(callback) {
      var called = false;
      return function() {
        if (called) return;
        called = true;
        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }
        callback.apply(this, args);
      };
    }
    function noop() {
    }
    function isRequest(stream) {
      return stream.setHeader && typeof stream.abort === "function";
    }
    function eos(stream, opts, callback) {
      if (typeof opts === "function") return eos(stream, null, opts);
      if (!opts) opts = {};
      callback = once(callback || noop);
      var readable = opts.readable || opts.readable !== false && stream.readable;
      var writable = opts.writable || opts.writable !== false && stream.writable;
      var onlegacyfinish = function onlegacyfinish2() {
        if (!stream.writable) onfinish();
      };
      var writableEnded = stream._writableState && stream._writableState.finished;
      var onfinish = function onfinish2() {
        writable = false;
        writableEnded = true;
        if (!readable) callback.call(stream);
      };
      var readableEnded = stream._readableState && stream._readableState.endEmitted;
      var onend = function onend2() {
        readable = false;
        readableEnded = true;
        if (!writable) callback.call(stream);
      };
      var onerror = function onerror2(err) {
        callback.call(stream, err);
      };
      var onclose = function onclose2() {
        var err;
        if (readable && !readableEnded) {
          if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
          return callback.call(stream, err);
        }
        if (writable && !writableEnded) {
          if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
          return callback.call(stream, err);
        }
      };
      var onrequest = function onrequest2() {
        stream.req.on("finish", onfinish);
      };
      if (isRequest(stream)) {
        stream.on("complete", onfinish);
        stream.on("abort", onclose);
        if (stream.req) onrequest();
        else stream.on("request", onrequest);
      } else if (writable && !stream._writableState) {
        stream.on("end", onlegacyfinish);
        stream.on("close", onlegacyfinish);
      }
      stream.on("end", onend);
      stream.on("finish", onfinish);
      if (opts.error !== false) stream.on("error", onerror);
      stream.on("close", onclose);
      return function() {
        stream.removeListener("complete", onfinish);
        stream.removeListener("abort", onclose);
        stream.removeListener("request", onrequest);
        if (stream.req) stream.req.removeListener("finish", onfinish);
        stream.removeListener("end", onlegacyfinish);
        stream.removeListener("close", onlegacyfinish);
        stream.removeListener("finish", onfinish);
        stream.removeListener("end", onend);
        stream.removeListener("error", onerror);
        stream.removeListener("close", onclose);
      };
    }
    module2.exports = eos;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/async_iterator.js
var require_async_iterator = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) {
    "use strict";
    var _Object$setPrototypeO;
    function _defineProperty(obj, key, value) {
      key = _toPropertyKey(key);
      if (key in obj) {
        Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }
      return obj;
    }
    function _toPropertyKey(arg) {
      var key = _toPrimitive(arg, "string");
      return typeof key === "symbol" ? key : String(key);
    }
    function _toPrimitive(input, hint) {
      if (typeof input !== "object" || input === null) return input;
      var prim = input[Symbol.toPrimitive];
      if (prim !== void 0) {
        var res = prim.call(input, hint || "default");
        if (typeof res !== "object") return res;
        throw new TypeError("@@toPrimitive must return a primitive value.");
      }
      return (hint === "string" ? String : Number)(input);
    }
    var finished = require_end_of_stream();
    var kLastResolve = /* @__PURE__ */ Symbol("lastResolve");
    var kLastReject = /* @__PURE__ */ Symbol("lastReject");
    var kError = /* @__PURE__ */ Symbol("error");
    var kEnded = /* @__PURE__ */ Symbol("ended");
    var kLastPromise = /* @__PURE__ */ Symbol("lastPromise");
    var kHandlePromise = /* @__PURE__ */ Symbol("handlePromise");
    var kStream = /* @__PURE__ */ Symbol("stream");
    function createIterResult(value, done) {
      return {
        value,
        done
      };
    }
    function readAndResolve(iter) {
      var resolve = iter[kLastResolve];
      if (resolve !== null) {
        var data2 = iter[kStream].read();
        if (data2 !== null) {
          iter[kLastPromise] = null;
          iter[kLastResolve] = null;
          iter[kLastReject] = null;
          resolve(createIterResult(data2, false));
        }
      }
    }
    function onReadable(iter) {
      process.nextTick(readAndResolve, iter);
    }
    function wrapForNext(lastPromise, iter) {
      return function(resolve, reject) {
        lastPromise.then(function() {
          if (iter[kEnded]) {
            resolve(createIterResult(void 0, true));
            return;
          }
          iter[kHandlePromise](resolve, reject);
        }, reject);
      };
    }
    var AsyncIteratorPrototype = Object.getPrototypeOf(function() {
    });
    var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
      get stream() {
        return this[kStream];
      },
      next: function next() {
        var _this = this;
        var error3 = this[kError];
        if (error3 !== null) {
          return Promise.reject(error3);
        }
        if (this[kEnded]) {
          return Promise.resolve(createIterResult(void 0, true));
        }
        if (this[kStream].destroyed) {
          return new Promise(function(resolve, reject) {
            process.nextTick(function() {
              if (_this[kError]) {
                reject(_this[kError]);
              } else {
                resolve(createIterResult(void 0, true));
              }
            });
          });
        }
        var lastPromise = this[kLastPromise];
        var promise;
        if (lastPromise) {
          promise = new Promise(wrapForNext(lastPromise, this));
        } else {
          var data2 = this[kStream].read();
          if (data2 !== null) {
            return Promise.resolve(createIterResult(data2, false));
          }
          promise = new Promise(this[kHandlePromise]);
        }
        this[kLastPromise] = promise;
        return promise;
      }
    }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() {
      return this;
    }), _defineProperty(_Object$setPrototypeO, "return", function _return() {
      var _this2 = this;
      return new Promise(function(resolve, reject) {
        _this2[kStream].destroy(null, function(err) {
          if (err) {
            reject(err);
            return;
          }
          resolve(createIterResult(void 0, true));
        });
      });
    }), _Object$setPrototypeO), AsyncIteratorPrototype);
    var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) {
      var _Object$create;
      var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {
        value: stream,
        writable: true
      }), _defineProperty(_Object$create, kLastResolve, {
        value: null,
        writable: true
      }), _defineProperty(_Object$create, kLastReject, {
        value: null,
        writable: true
      }), _defineProperty(_Object$create, kError, {
        value: null,
        writable: true
      }), _defineProperty(_Object$create, kEnded, {
        value: stream._readableState.endEmitted,
        writable: true
      }), _defineProperty(_Object$create, kHandlePromise, {
        value: function value(resolve, reject) {
          var data2 = iterator[kStream].read();
          if (data2) {
            iterator[kLastPromise] = null;
            iterator[kLastResolve] = null;
            iterator[kLastReject] = null;
            resolve(createIterResult(data2, false));
          } else {
            iterator[kLastResolve] = resolve;
            iterator[kLastReject] = reject;
          }
        },
        writable: true
      }), _Object$create));
      iterator[kLastPromise] = null;
      finished(stream, function(err) {
        if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") {
          var reject = iterator[kLastReject];
          if (reject !== null) {
            iterator[kLastPromise] = null;
            iterator[kLastResolve] = null;
            iterator[kLastReject] = null;
            reject(err);
          }
          iterator[kError] = err;
          return;
        }
        var resolve = iterator[kLastResolve];
        if (resolve !== null) {
          iterator[kLastPromise] = null;
          iterator[kLastResolve] = null;
          iterator[kLastReject] = null;
          resolve(createIterResult(void 0, true));
        }
        iterator[kEnded] = true;
      });
      stream.on("readable", onReadable.bind(null, iterator));
      return iterator;
    };
    module2.exports = createReadableStreamAsyncIterator;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/from.js
var require_from = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) {
    "use strict";
    function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
      try {
        var info2 = gen[key](arg);
        var value = info2.value;
      } catch (error3) {
        reject(error3);
        return;
      }
      if (info2.done) {
        resolve(value);
      } else {
        Promise.resolve(value).then(_next, _throw);
      }
    }
    function _asyncToGenerator(fn) {
      return function() {
        var self2 = this, args = arguments;
        return new Promise(function(resolve, reject) {
          var gen = fn.apply(self2, args);
          function _next(value) {
            asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
          }
          function _throw(err) {
            asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
          }
          _next(void 0);
        });
      };
    }
    function ownKeys2(object, enumerableOnly) {
      var keys = Object.keys(object);
      if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        enumerableOnly && (symbols = symbols.filter(function(sym) {
          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
        })), keys.push.apply(keys, symbols);
      }
      return keys;
    }
    function _objectSpread(target) {
      for (var i5 = 1; i5 < arguments.length; i5++) {
        var source = null != arguments[i5] ? arguments[i5] : {};
        i5 % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
          _defineProperty(target, key, source[key]);
        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
        });
      }
      return target;
    }
    function _defineProperty(obj, key, value) {
      key = _toPropertyKey(key);
      if (key in obj) {
        Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }
      return obj;
    }
    function _toPropertyKey(arg) {
      var key = _toPrimitive(arg, "string");
      return typeof key === "symbol" ? key : String(key);
    }
    function _toPrimitive(input, hint) {
      if (typeof input !== "object" || input === null) return input;
      var prim = input[Symbol.toPrimitive];
      if (prim !== void 0) {
        var res = prim.call(input, hint || "default");
        if (typeof res !== "object") return res;
        throw new TypeError("@@toPrimitive must return a primitive value.");
      }
      return (hint === "string" ? String : Number)(input);
    }
    var ERR_INVALID_ARG_TYPE = require_errors().codes.ERR_INVALID_ARG_TYPE;
    function from(Readable, iterable, opts) {
      var iterator;
      if (iterable && typeof iterable.next === "function") {
        iterator = iterable;
      } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();
      else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();
      else throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable);
      var readable = new Readable(_objectSpread({
        objectMode: true
      }, opts));
      var reading = false;
      readable._read = function() {
        if (!reading) {
          reading = true;
          next();
        }
      };
      function next() {
        return _next2.apply(this, arguments);
      }
      function _next2() {
        _next2 = _asyncToGenerator(function* () {
          try {
            var _yield$iterator$next = yield iterator.next(), value = _yield$iterator$next.value, done = _yield$iterator$next.done;
            if (done) {
              readable.push(null);
            } else if (readable.push(yield value)) {
              next();
            } else {
              reading = false;
            }
          } catch (err) {
            readable.destroy(err);
          }
        });
        return _next2.apply(this, arguments);
      }
      return readable;
    }
    module2.exports = from;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/_stream_readable.js
var require_stream_readable = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) {
    "use strict";
    module2.exports = Readable;
    var Duplex;
    Readable.ReadableState = ReadableState;
    var EE = require("events").EventEmitter;
    var EElistenerCount = function EElistenerCount2(emitter, type) {
      return emitter.listeners(type).length;
    };
    var Stream = require_stream();
    var Buffer2 = require("buffer").Buffer;
    var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
    };
    function _uint8ArrayToBuffer(chunk) {
      return Buffer2.from(chunk);
    }
    function _isUint8Array(obj) {
      return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
    }
    var debugUtil = require("util");
    var debug;
    if (debugUtil && debugUtil.debuglog) {
      debug = debugUtil.debuglog("stream");
    } else {
      debug = function debug2() {
      };
    }
    var BufferList = require_buffer_list();
    var destroyImpl = require_destroy();
    var _require = require_state();
    var getHighWaterMark = _require.getHighWaterMark;
    var _require$codes = require_errors().codes;
    var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE;
    var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF;
    var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
    var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
    var StringDecoder;
    var createReadableStreamAsyncIterator;
    var from;
    require_inherits()(Readable, Stream);
    var errorOrDestroy = destroyImpl.errorOrDestroy;
    var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
    function prependListener(emitter, event, fn) {
      if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn);
      if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);
      else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);
      else emitter._events[event] = [fn, emitter._events[event]];
    }
    function ReadableState(options, stream, isDuplex) {
      Duplex = Duplex || require_stream_duplex();
      options = options || {};
      if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex;
      this.objectMode = !!options.objectMode;
      if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
      this.highWaterMark = getHighWaterMark(this, options, "readableHighWaterMark", isDuplex);
      this.buffer = new BufferList();
      this.length = 0;
      this.pipes = null;
      this.pipesCount = 0;
      this.flowing = null;
      this.ended = false;
      this.endEmitted = false;
      this.reading = false;
      this.sync = true;
      this.needReadable = false;
      this.emittedReadable = false;
      this.readableListening = false;
      this.resumeScheduled = false;
      this.paused = true;
      this.emitClose = options.emitClose !== false;
      this.autoDestroy = !!options.autoDestroy;
      this.destroyed = false;
      this.defaultEncoding = options.defaultEncoding || "utf8";
      this.awaitDrain = 0;
      this.readingMore = false;
      this.decoder = null;
      this.encoding = null;
      if (options.encoding) {
        if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder;
        this.decoder = new StringDecoder(options.encoding);
        this.encoding = options.encoding;
      }
    }
    function Readable(options) {
      Duplex = Duplex || require_stream_duplex();
      if (!(this instanceof Readable)) return new Readable(options);
      var isDuplex = this instanceof Duplex;
      this._readableState = new ReadableState(options, this, isDuplex);
      this.readable = true;
      if (options) {
        if (typeof options.read === "function") this._read = options.read;
        if (typeof options.destroy === "function") this._destroy = options.destroy;
      }
      Stream.call(this);
    }
    Object.defineProperty(Readable.prototype, "destroyed", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        if (this._readableState === void 0) {
          return false;
        }
        return this._readableState.destroyed;
      },
      set: function set(value) {
        if (!this._readableState) {
          return;
        }
        this._readableState.destroyed = value;
      }
    });
    Readable.prototype.destroy = destroyImpl.destroy;
    Readable.prototype._undestroy = destroyImpl.undestroy;
    Readable.prototype._destroy = function(err, cb) {
      cb(err);
    };
    Readable.prototype.push = function(chunk, encoding) {
      var state2 = this._readableState;
      var skipChunkCheck;
      if (!state2.objectMode) {
        if (typeof chunk === "string") {
          encoding = encoding || state2.defaultEncoding;
          if (encoding !== state2.encoding) {
            chunk = Buffer2.from(chunk, encoding);
            encoding = "";
          }
          skipChunkCheck = true;
        }
      } else {
        skipChunkCheck = true;
      }
      return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
    };
    Readable.prototype.unshift = function(chunk) {
      return readableAddChunk(this, chunk, null, true, false);
    };
    function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
      debug("readableAddChunk", chunk);
      var state2 = stream._readableState;
      if (chunk === null) {
        state2.reading = false;
        onEofChunk(stream, state2);
      } else {
        var er;
        if (!skipChunkCheck) er = chunkInvalid(state2, chunk);
        if (er) {
          errorOrDestroy(stream, er);
        } else if (state2.objectMode || chunk && chunk.length > 0) {
          if (typeof chunk !== "string" && !state2.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) {
            chunk = _uint8ArrayToBuffer(chunk);
          }
          if (addToFront) {
            if (state2.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());
            else addChunk(stream, state2, chunk, true);
          } else if (state2.ended) {
            errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());
          } else if (state2.destroyed) {
            return false;
          } else {
            state2.reading = false;
            if (state2.decoder && !encoding) {
              chunk = state2.decoder.write(chunk);
              if (state2.objectMode || chunk.length !== 0) addChunk(stream, state2, chunk, false);
              else maybeReadMore(stream, state2);
            } else {
              addChunk(stream, state2, chunk, false);
            }
          }
        } else if (!addToFront) {
          state2.reading = false;
          maybeReadMore(stream, state2);
        }
      }
      return !state2.ended && (state2.length < state2.highWaterMark || state2.length === 0);
    }
    function addChunk(stream, state2, chunk, addToFront) {
      if (state2.flowing && state2.length === 0 && !state2.sync) {
        state2.awaitDrain = 0;
        stream.emit("data", chunk);
      } else {
        state2.length += state2.objectMode ? 1 : chunk.length;
        if (addToFront) state2.buffer.unshift(chunk);
        else state2.buffer.push(chunk);
        if (state2.needReadable) emitReadable(stream);
      }
      maybeReadMore(stream, state2);
    }
    function chunkInvalid(state2, chunk) {
      var er;
      if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state2.objectMode) {
        er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk);
      }
      return er;
    }
    Readable.prototype.isPaused = function() {
      return this._readableState.flowing === false;
    };
    Readable.prototype.setEncoding = function(enc) {
      if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder;
      var decoder = new StringDecoder(enc);
      this._readableState.decoder = decoder;
      this._readableState.encoding = this._readableState.decoder.encoding;
      var p2 = this._readableState.buffer.head;
      var content = "";
      while (p2 !== null) {
        content += decoder.write(p2.data);
        p2 = p2.next;
      }
      this._readableState.buffer.clear();
      if (content !== "") this._readableState.buffer.push(content);
      this._readableState.length = content.length;
      return this;
    };
    var MAX_HWM = 1073741824;
    function computeNewHighWaterMark(n2) {
      if (n2 >= MAX_HWM) {
        n2 = MAX_HWM;
      } else {
        n2--;
        n2 |= n2 >>> 1;
        n2 |= n2 >>> 2;
        n2 |= n2 >>> 4;
        n2 |= n2 >>> 8;
        n2 |= n2 >>> 16;
        n2++;
      }
      return n2;
    }
    function howMuchToRead(n2, state2) {
      if (n2 <= 0 || state2.length === 0 && state2.ended) return 0;
      if (state2.objectMode) return 1;
      if (n2 !== n2) {
        if (state2.flowing && state2.length) return state2.buffer.head.data.length;
        else return state2.length;
      }
      if (n2 > state2.highWaterMark) state2.highWaterMark = computeNewHighWaterMark(n2);
      if (n2 <= state2.length) return n2;
      if (!state2.ended) {
        state2.needReadable = true;
        return 0;
      }
      return state2.length;
    }
    Readable.prototype.read = function(n2) {
      debug("read", n2);
      n2 = parseInt(n2, 10);
      var state2 = this._readableState;
      var nOrig = n2;
      if (n2 !== 0) state2.emittedReadable = false;
      if (n2 === 0 && state2.needReadable && ((state2.highWaterMark !== 0 ? state2.length >= state2.highWaterMark : state2.length > 0) || state2.ended)) {
        debug("read: emitReadable", state2.length, state2.ended);
        if (state2.length === 0 && state2.ended) endReadable(this);
        else emitReadable(this);
        return null;
      }
      n2 = howMuchToRead(n2, state2);
      if (n2 === 0 && state2.ended) {
        if (state2.length === 0) endReadable(this);
        return null;
      }
      var doRead = state2.needReadable;
      debug("need readable", doRead);
      if (state2.length === 0 || state2.length - n2 < state2.highWaterMark) {
        doRead = true;
        debug("length less than watermark", doRead);
      }
      if (state2.ended || state2.reading) {
        doRead = false;
        debug("reading or ended", doRead);
      } else if (doRead) {
        debug("do read");
        state2.reading = true;
        state2.sync = true;
        if (state2.length === 0) state2.needReadable = true;
        this._read(state2.highWaterMark);
        state2.sync = false;
        if (!state2.reading) n2 = howMuchToRead(nOrig, state2);
      }
      var ret;
      if (n2 > 0) ret = fromList(n2, state2);
      else ret = null;
      if (ret === null) {
        state2.needReadable = state2.length <= state2.highWaterMark;
        n2 = 0;
      } else {
        state2.length -= n2;
        state2.awaitDrain = 0;
      }
      if (state2.length === 0) {
        if (!state2.ended) state2.needReadable = true;
        if (nOrig !== n2 && state2.ended) endReadable(this);
      }
      if (ret !== null) this.emit("data", ret);
      return ret;
    };
    function onEofChunk(stream, state2) {
      debug("onEofChunk");
      if (state2.ended) return;
      if (state2.decoder) {
        var chunk = state2.decoder.end();
        if (chunk && chunk.length) {
          state2.buffer.push(chunk);
          state2.length += state2.objectMode ? 1 : chunk.length;
        }
      }
      state2.ended = true;
      if (state2.sync) {
        emitReadable(stream);
      } else {
        state2.needReadable = false;
        if (!state2.emittedReadable) {
          state2.emittedReadable = true;
          emitReadable_(stream);
        }
      }
    }
    function emitReadable(stream) {
      var state2 = stream._readableState;
      debug("emitReadable", state2.needReadable, state2.emittedReadable);
      state2.needReadable = false;
      if (!state2.emittedReadable) {
        debug("emitReadable", state2.flowing);
        state2.emittedReadable = true;
        process.nextTick(emitReadable_, stream);
      }
    }
    function emitReadable_(stream) {
      var state2 = stream._readableState;
      debug("emitReadable_", state2.destroyed, state2.length, state2.ended);
      if (!state2.destroyed && (state2.length || state2.ended)) {
        stream.emit("readable");
        state2.emittedReadable = false;
      }
      state2.needReadable = !state2.flowing && !state2.ended && state2.length <= state2.highWaterMark;
      flow(stream);
    }
    function maybeReadMore(stream, state2) {
      if (!state2.readingMore) {
        state2.readingMore = true;
        process.nextTick(maybeReadMore_, stream, state2);
      }
    }
    function maybeReadMore_(stream, state2) {
      while (!state2.reading && !state2.ended && (state2.length < state2.highWaterMark || state2.flowing && state2.length === 0)) {
        var len = state2.length;
        debug("maybeReadMore read 0");
        stream.read(0);
        if (len === state2.length)
          break;
      }
      state2.readingMore = false;
    }
    Readable.prototype._read = function(n2) {
      errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()"));
    };
    Readable.prototype.pipe = function(dest, pipeOpts) {
      var src = this;
      var state2 = this._readableState;
      switch (state2.pipesCount) {
        case 0:
          state2.pipes = dest;
          break;
        case 1:
          state2.pipes = [state2.pipes, dest];
          break;
        default:
          state2.pipes.push(dest);
          break;
      }
      state2.pipesCount += 1;
      debug("pipe count=%d opts=%j", state2.pipesCount, pipeOpts);
      var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
      var endFn = doEnd ? onend : unpipe;
      if (state2.endEmitted) process.nextTick(endFn);
      else src.once("end", endFn);
      dest.on("unpipe", onunpipe);
      function onunpipe(readable, unpipeInfo) {
        debug("onunpipe");
        if (readable === src) {
          if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
            unpipeInfo.hasUnpiped = true;
            cleanup();
          }
        }
      }
      function onend() {
        debug("onend");
        dest.end();
      }
      var ondrain = pipeOnDrain(src);
      dest.on("drain", ondrain);
      var cleanedUp = false;
      function cleanup() {
        debug("cleanup");
        dest.removeListener("close", onclose);
        dest.removeListener("finish", onfinish);
        dest.removeListener("drain", ondrain);
        dest.removeListener("error", onerror);
        dest.removeListener("unpipe", onunpipe);
        src.removeListener("end", onend);
        src.removeListener("end", unpipe);
        src.removeListener("data", ondata);
        cleanedUp = true;
        if (state2.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
      }
      src.on("data", ondata);
      function ondata(chunk) {
        debug("ondata");
        var ret = dest.write(chunk);
        debug("dest.write", ret);
        if (ret === false) {
          if ((state2.pipesCount === 1 && state2.pipes === dest || state2.pipesCount > 1 && indexOf(state2.pipes, dest) !== -1) && !cleanedUp) {
            debug("false write response, pause", state2.awaitDrain);
            state2.awaitDrain++;
          }
          src.pause();
        }
      }
      function onerror(er) {
        debug("onerror", er);
        unpipe();
        dest.removeListener("error", onerror);
        if (EElistenerCount(dest, "error") === 0) errorOrDestroy(dest, er);
      }
      prependListener(dest, "error", onerror);
      function onclose() {
        dest.removeListener("finish", onfinish);
        unpipe();
      }
      dest.once("close", onclose);
      function onfinish() {
        debug("onfinish");
        dest.removeListener("close", onclose);
        unpipe();
      }
      dest.once("finish", onfinish);
      function unpipe() {
        debug("unpipe");
        src.unpipe(dest);
      }
      dest.emit("pipe", src);
      if (!state2.flowing) {
        debug("pipe resume");
        src.resume();
      }
      return dest;
    };
    function pipeOnDrain(src) {
      return function pipeOnDrainFunctionResult() {
        var state2 = src._readableState;
        debug("pipeOnDrain", state2.awaitDrain);
        if (state2.awaitDrain) state2.awaitDrain--;
        if (state2.awaitDrain === 0 && EElistenerCount(src, "data")) {
          state2.flowing = true;
          flow(src);
        }
      };
    }
    Readable.prototype.unpipe = function(dest) {
      var state2 = this._readableState;
      var unpipeInfo = {
        hasUnpiped: false
      };
      if (state2.pipesCount === 0) return this;
      if (state2.pipesCount === 1) {
        if (dest && dest !== state2.pipes) return this;
        if (!dest) dest = state2.pipes;
        state2.pipes = null;
        state2.pipesCount = 0;
        state2.flowing = false;
        if (dest) dest.emit("unpipe", this, unpipeInfo);
        return this;
      }
      if (!dest) {
        var dests = state2.pipes;
        var len = state2.pipesCount;
        state2.pipes = null;
        state2.pipesCount = 0;
        state2.flowing = false;
        for (var i5 = 0; i5 < len; i5++) dests[i5].emit("unpipe", this, {
          hasUnpiped: false
        });
        return this;
      }
      var index = indexOf(state2.pipes, dest);
      if (index === -1) return this;
      state2.pipes.splice(index, 1);
      state2.pipesCount -= 1;
      if (state2.pipesCount === 1) state2.pipes = state2.pipes[0];
      dest.emit("unpipe", this, unpipeInfo);
      return this;
    };
    Readable.prototype.on = function(ev, fn) {
      var res = Stream.prototype.on.call(this, ev, fn);
      var state2 = this._readableState;
      if (ev === "data") {
        state2.readableListening = this.listenerCount("readable") > 0;
        if (state2.flowing !== false) this.resume();
      } else if (ev === "readable") {
        if (!state2.endEmitted && !state2.readableListening) {
          state2.readableListening = state2.needReadable = true;
          state2.flowing = false;
          state2.emittedReadable = false;
          debug("on readable", state2.length, state2.reading);
          if (state2.length) {
            emitReadable(this);
          } else if (!state2.reading) {
            process.nextTick(nReadingNextTick, this);
          }
        }
      }
      return res;
    };
    Readable.prototype.addListener = Readable.prototype.on;
    Readable.prototype.removeListener = function(ev, fn) {
      var res = Stream.prototype.removeListener.call(this, ev, fn);
      if (ev === "readable") {
        process.nextTick(updateReadableListening, this);
      }
      return res;
    };
    Readable.prototype.removeAllListeners = function(ev) {
      var res = Stream.prototype.removeAllListeners.apply(this, arguments);
      if (ev === "readable" || ev === void 0) {
        process.nextTick(updateReadableListening, this);
      }
      return res;
    };
    function updateReadableListening(self2) {
      var state2 = self2._readableState;
      state2.readableListening = self2.listenerCount("readable") > 0;
      if (state2.resumeScheduled && !state2.paused) {
        state2.flowing = true;
      } else if (self2.listenerCount("data") > 0) {
        self2.resume();
      }
    }
    function nReadingNextTick(self2) {
      debug("readable nexttick read 0");
      self2.read(0);
    }
    Readable.prototype.resume = function() {
      var state2 = this._readableState;
      if (!state2.flowing) {
        debug("resume");
        state2.flowing = !state2.readableListening;
        resume(this, state2);
      }
      state2.paused = false;
      return this;
    };
    function resume(stream, state2) {
      if (!state2.resumeScheduled) {
        state2.resumeScheduled = true;
        process.nextTick(resume_, stream, state2);
      }
    }
    function resume_(stream, state2) {
      debug("resume", state2.reading);
      if (!state2.reading) {
        stream.read(0);
      }
      state2.resumeScheduled = false;
      stream.emit("resume");
      flow(stream);
      if (state2.flowing && !state2.reading) stream.read(0);
    }
    Readable.prototype.pause = function() {
      debug("call pause flowing=%j", this._readableState.flowing);
      if (this._readableState.flowing !== false) {
        debug("pause");
        this._readableState.flowing = false;
        this.emit("pause");
      }
      this._readableState.paused = true;
      return this;
    };
    function flow(stream) {
      var state2 = stream._readableState;
      debug("flow", state2.flowing);
      while (state2.flowing && stream.read() !== null) ;
    }
    Readable.prototype.wrap = function(stream) {
      var _this = this;
      var state2 = this._readableState;
      var paused = false;
      stream.on("end", function() {
        debug("wrapped end");
        if (state2.decoder && !state2.ended) {
          var chunk = state2.decoder.end();
          if (chunk && chunk.length) _this.push(chunk);
        }
        _this.push(null);
      });
      stream.on("data", function(chunk) {
        debug("wrapped data");
        if (state2.decoder) chunk = state2.decoder.write(chunk);
        if (state2.objectMode && (chunk === null || chunk === void 0)) return;
        else if (!state2.objectMode && (!chunk || !chunk.length)) return;
        var ret = _this.push(chunk);
        if (!ret) {
          paused = true;
          stream.pause();
        }
      });
      for (var i5 in stream) {
        if (this[i5] === void 0 && typeof stream[i5] === "function") {
          this[i5] = /* @__PURE__ */ (function methodWrap(method) {
            return function methodWrapReturnFunction() {
              return stream[method].apply(stream, arguments);
            };
          })(i5);
        }
      }
      for (var n2 = 0; n2 < kProxyEvents.length; n2++) {
        stream.on(kProxyEvents[n2], this.emit.bind(this, kProxyEvents[n2]));
      }
      this._read = function(n3) {
        debug("wrapped _read", n3);
        if (paused) {
          paused = false;
          stream.resume();
        }
      };
      return this;
    };
    if (typeof Symbol === "function") {
      Readable.prototype[Symbol.asyncIterator] = function() {
        if (createReadableStreamAsyncIterator === void 0) {
          createReadableStreamAsyncIterator = require_async_iterator();
        }
        return createReadableStreamAsyncIterator(this);
      };
    }
    Object.defineProperty(Readable.prototype, "readableHighWaterMark", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._readableState.highWaterMark;
      }
    });
    Object.defineProperty(Readable.prototype, "readableBuffer", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._readableState && this._readableState.buffer;
      }
    });
    Object.defineProperty(Readable.prototype, "readableFlowing", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._readableState.flowing;
      },
      set: function set(state2) {
        if (this._readableState) {
          this._readableState.flowing = state2;
        }
      }
    });
    Readable._fromList = fromList;
    Object.defineProperty(Readable.prototype, "readableLength", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._readableState.length;
      }
    });
    function fromList(n2, state2) {
      if (state2.length === 0) return null;
      var ret;
      if (state2.objectMode) ret = state2.buffer.shift();
      else if (!n2 || n2 >= state2.length) {
        if (state2.decoder) ret = state2.buffer.join("");
        else if (state2.buffer.length === 1) ret = state2.buffer.first();
        else ret = state2.buffer.concat(state2.length);
        state2.buffer.clear();
      } else {
        ret = state2.buffer.consume(n2, state2.decoder);
      }
      return ret;
    }
    function endReadable(stream) {
      var state2 = stream._readableState;
      debug("endReadable", state2.endEmitted);
      if (!state2.endEmitted) {
        state2.ended = true;
        process.nextTick(endReadableNT, state2, stream);
      }
    }
    function endReadableNT(state2, stream) {
      debug("endReadableNT", state2.endEmitted, state2.length);
      if (!state2.endEmitted && state2.length === 0) {
        state2.endEmitted = true;
        stream.readable = false;
        stream.emit("end");
        if (state2.autoDestroy) {
          var wState = stream._writableState;
          if (!wState || wState.autoDestroy && wState.finished) {
            stream.destroy();
          }
        }
      }
    }
    if (typeof Symbol === "function") {
      Readable.from = function(iterable, opts) {
        if (from === void 0) {
          from = require_from();
        }
        return from(Readable, iterable, opts);
      };
    }
    function indexOf(xs, x) {
      for (var i5 = 0, l3 = xs.length; i5 < l3; i5++) {
        if (xs[i5] === x) return i5;
      }
      return -1;
    }
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/_stream_transform.js
var require_stream_transform = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) {
    "use strict";
    module2.exports = Transform;
    var _require$codes = require_errors().codes;
    var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
    var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK;
    var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING;
    var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
    var Duplex = require_stream_duplex();
    require_inherits()(Transform, Duplex);
    function afterTransform(er, data2) {
      var ts = this._transformState;
      ts.transforming = false;
      var cb = ts.writecb;
      if (cb === null) {
        return this.emit("error", new ERR_MULTIPLE_CALLBACK());
      }
      ts.writechunk = null;
      ts.writecb = null;
      if (data2 != null)
        this.push(data2);
      cb(er);
      var rs = this._readableState;
      rs.reading = false;
      if (rs.needReadable || rs.length < rs.highWaterMark) {
        this._read(rs.highWaterMark);
      }
    }
    function Transform(options) {
      if (!(this instanceof Transform)) return new Transform(options);
      Duplex.call(this, options);
      this._transformState = {
        afterTransform: afterTransform.bind(this),
        needTransform: false,
        transforming: false,
        writecb: null,
        writechunk: null,
        writeencoding: null
      };
      this._readableState.needReadable = true;
      this._readableState.sync = false;
      if (options) {
        if (typeof options.transform === "function") this._transform = options.transform;
        if (typeof options.flush === "function") this._flush = options.flush;
      }
      this.on("prefinish", prefinish);
    }
    function prefinish() {
      var _this = this;
      if (typeof this._flush === "function" && !this._readableState.destroyed) {
        this._flush(function(er, data2) {
          done(_this, er, data2);
        });
      } else {
        done(this, null, null);
      }
    }
    Transform.prototype.push = function(chunk, encoding) {
      this._transformState.needTransform = false;
      return Duplex.prototype.push.call(this, chunk, encoding);
    };
    Transform.prototype._transform = function(chunk, encoding, cb) {
      cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));
    };
    Transform.prototype._write = function(chunk, encoding, cb) {
      var ts = this._transformState;
      ts.writecb = cb;
      ts.writechunk = chunk;
      ts.writeencoding = encoding;
      if (!ts.transforming) {
        var rs = this._readableState;
        if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
      }
    };
    Transform.prototype._read = function(n2) {
      var ts = this._transformState;
      if (ts.writechunk !== null && !ts.transforming) {
        ts.transforming = true;
        this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
      } else {
        ts.needTransform = true;
      }
    };
    Transform.prototype._destroy = function(err, cb) {
      Duplex.prototype._destroy.call(this, err, function(err2) {
        cb(err2);
      });
    };
    function done(stream, er, data2) {
      if (er) return stream.emit("error", er);
      if (data2 != null)
        stream.push(data2);
      if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();
      if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
      return stream.push(null);
    }
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/_stream_passthrough.js
var require_stream_passthrough = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) {
    "use strict";
    module2.exports = PassThrough;
    var Transform = require_stream_transform();
    require_inherits()(PassThrough, Transform);
    function PassThrough(options) {
      if (!(this instanceof PassThrough)) return new PassThrough(options);
      Transform.call(this, options);
    }
    PassThrough.prototype._transform = function(chunk, encoding, cb) {
      cb(null, chunk);
    };
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/pipeline.js
var require_pipeline = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) {
    "use strict";
    var eos;
    function once(callback) {
      var called = false;
      return function() {
        if (called) return;
        called = true;
        callback.apply(void 0, arguments);
      };
    }
    var _require$codes = require_errors().codes;
    var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
    var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
    function noop(err) {
      if (err) throw err;
    }
    function isRequest(stream) {
      return stream.setHeader && typeof stream.abort === "function";
    }
    function destroyer(stream, reading, writing, callback) {
      callback = once(callback);
      var closed = false;
      stream.on("close", function() {
        closed = true;
      });
      if (eos === void 0) eos = require_end_of_stream();
      eos(stream, {
        readable: reading,
        writable: writing
      }, function(err) {
        if (err) return callback(err);
        closed = true;
        callback();
      });
      var destroyed = false;
      return function(err) {
        if (closed) return;
        if (destroyed) return;
        destroyed = true;
        if (isRequest(stream)) return stream.abort();
        if (typeof stream.destroy === "function") return stream.destroy();
        callback(err || new ERR_STREAM_DESTROYED("pipe"));
      };
    }
    function call(fn) {
      fn();
    }
    function pipe(from, to) {
      return from.pipe(to);
    }
    function popCallback(streams) {
      if (!streams.length) return noop;
      if (typeof streams[streams.length - 1] !== "function") return noop;
      return streams.pop();
    }
    function pipeline() {
      for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {
        streams[_key] = arguments[_key];
      }
      var callback = popCallback(streams);
      if (Array.isArray(streams[0])) streams = streams[0];
      if (streams.length < 2) {
        throw new ERR_MISSING_ARGS("streams");
      }
      var error3;
      var destroys = streams.map(function(stream, i5) {
        var reading = i5 < streams.length - 1;
        var writing = i5 > 0;
        return destroyer(stream, reading, writing, function(err) {
          if (!error3) error3 = err;
          if (err) destroys.forEach(call);
          if (reading) return;
          destroys.forEach(call);
          callback(error3);
        });
      });
      return streams.reduce(pipe);
    }
    module2.exports = pipeline;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/readable.js
var require_readable = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/readable-stream/readable.js"(exports2, module2) {
    var Stream = require("stream");
    if (process.env.READABLE_STREAM === "disable" && Stream) {
      module2.exports = Stream.Readable;
      Object.assign(module2.exports, Stream);
      module2.exports.Stream = Stream;
    } else {
      exports2 = module2.exports = require_stream_readable();
      exports2.Stream = Stream || exports2;
      exports2.Readable = exports2;
      exports2.Writable = require_stream_writable();
      exports2.Duplex = require_stream_duplex();
      exports2.Transform = require_stream_transform();
      exports2.PassThrough = require_stream_passthrough();
      exports2.finished = require_end_of_stream();
      exports2.pipeline = require_pipeline();
    }
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/store.js
var require_store = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/store.js"(exports2, module2) {
    "use strict";
    var xtend = require_immutable();
    var Readable = require_readable().Readable;
    var streamsOpts = { objectMode: true };
    var defaultStoreOptions = {
      clean: true
    };
    function Store(options) {
      if (!(this instanceof Store)) {
        return new Store(options);
      }
      this.options = options || {};
      this.options = xtend(defaultStoreOptions, options);
      this._inflights = /* @__PURE__ */ new Map();
    }
    Store.prototype.put = function(packet, cb) {
      this._inflights.set(packet.messageId, packet);
      if (cb) {
        cb();
      }
      return this;
    };
    Store.prototype.createStream = function() {
      var stream = new Readable(streamsOpts);
      var destroyed = false;
      var values = [];
      var i5 = 0;
      this._inflights.forEach(function(value, key) {
        values.push(value);
      });
      stream._read = function() {
        if (!destroyed && i5 < values.length) {
          this.push(values[i5++]);
        } else {
          this.push(null);
        }
      };
      stream.destroy = function() {
        if (destroyed) {
          return;
        }
        var self2 = this;
        destroyed = true;
        setTimeout(function() {
          self2.emit("close");
        }, 0);
      };
      return stream;
    };
    Store.prototype.del = function(packet, cb) {
      packet = this._inflights.get(packet.messageId);
      if (packet) {
        this._inflights.delete(packet.messageId);
        cb(null, packet);
      } else if (cb) {
        cb(new Error("missing packet"));
      }
      return this;
    };
    Store.prototype.get = function(packet, cb) {
      packet = this._inflights.get(packet.messageId);
      if (packet) {
        cb(null, packet);
      } else if (cb) {
        cb(new Error("missing packet"));
      }
      return this;
    };
    Store.prototype.close = function(cb) {
      if (this.options.clean) {
        this._inflights = null;
      }
      if (cb) {
        cb();
      }
    };
    module2.exports = Store;
  }
});

// ../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream.js
var require_stream2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) {
    module2.exports = require("stream");
  }
});

// ../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/buffer_list.js
var require_buffer_list2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2, module2) {
    "use strict";
    function ownKeys2(object, enumerableOnly) {
      var keys = Object.keys(object);
      if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        enumerableOnly && (symbols = symbols.filter(function(sym) {
          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
        })), keys.push.apply(keys, symbols);
      }
      return keys;
    }
    function _objectSpread(target) {
      for (var i5 = 1; i5 < arguments.length; i5++) {
        var source = null != arguments[i5] ? arguments[i5] : {};
        i5 % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
          _defineProperty(target, key, source[key]);
        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
        });
      }
      return target;
    }
    function _defineProperty(obj, key, value) {
      key = _toPropertyKey(key);
      if (key in obj) {
        Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }
      return obj;
    }
    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }
    function _defineProperties(target, props) {
      for (var i5 = 0; i5 < props.length; i5++) {
        var descriptor = props[i5];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
      }
    }
    function _createClass(Constructor, protoProps, staticProps) {
      if (protoProps) _defineProperties(Constructor.prototype, protoProps);
      if (staticProps) _defineProperties(Constructor, staticProps);
      Object.defineProperty(Constructor, "prototype", { writable: false });
      return Constructor;
    }
    function _toPropertyKey(arg) {
      var key = _toPrimitive(arg, "string");
      return typeof key === "symbol" ? key : String(key);
    }
    function _toPrimitive(input, hint) {
      if (typeof input !== "object" || input === null) return input;
      var prim = input[Symbol.toPrimitive];
      if (prim !== void 0) {
        var res = prim.call(input, hint || "default");
        if (typeof res !== "object") return res;
        throw new TypeError("@@toPrimitive must return a primitive value.");
      }
      return (hint === "string" ? String : Number)(input);
    }
    var _require = require("buffer");
    var Buffer2 = _require.Buffer;
    var _require2 = require("util");
    var inspect = _require2.inspect;
    var custom = inspect && inspect.custom || "inspect";
    function copyBuffer(src, target, offset) {
      Buffer2.prototype.copy.call(src, target, offset);
    }
    module2.exports = /* @__PURE__ */ (function() {
      function BufferList() {
        _classCallCheck(this, BufferList);
        this.head = null;
        this.tail = null;
        this.length = 0;
      }
      _createClass(BufferList, [{
        key: "push",
        value: function push(v) {
          var entry = {
            data: v,
            next: null
          };
          if (this.length > 0) this.tail.next = entry;
          else this.head = entry;
          this.tail = entry;
          ++this.length;
        }
      }, {
        key: "unshift",
        value: function unshift(v) {
          var entry = {
            data: v,
            next: this.head
          };
          if (this.length === 0) this.tail = entry;
          this.head = entry;
          ++this.length;
        }
      }, {
        key: "shift",
        value: function shift() {
          if (this.length === 0) return;
          var ret = this.head.data;
          if (this.length === 1) this.head = this.tail = null;
          else this.head = this.head.next;
          --this.length;
          return ret;
        }
      }, {
        key: "clear",
        value: function clear() {
          this.head = this.tail = null;
          this.length = 0;
        }
      }, {
        key: "join",
        value: function join(s) {
          if (this.length === 0) return "";
          var p2 = this.head;
          var ret = "" + p2.data;
          while (p2 = p2.next) ret += s + p2.data;
          return ret;
        }
      }, {
        key: "concat",
        value: function concat(n2) {
          if (this.length === 0) return Buffer2.alloc(0);
          var ret = Buffer2.allocUnsafe(n2 >>> 0);
          var p2 = this.head;
          var i5 = 0;
          while (p2) {
            copyBuffer(p2.data, ret, i5);
            i5 += p2.data.length;
            p2 = p2.next;
          }
          return ret;
        }
        // Consumes a specified amount of bytes or characters from the buffered data.
      }, {
        key: "consume",
        value: function consume(n2, hasStrings) {
          var ret;
          if (n2 < this.head.data.length) {
            ret = this.head.data.slice(0, n2);
            this.head.data = this.head.data.slice(n2);
          } else if (n2 === this.head.data.length) {
            ret = this.shift();
          } else {
            ret = hasStrings ? this._getString(n2) : this._getBuffer(n2);
          }
          return ret;
        }
      }, {
        key: "first",
        value: function first() {
          return this.head.data;
        }
        // Consumes a specified amount of characters from the buffered data.
      }, {
        key: "_getString",
        value: function _getString(n2) {
          var p2 = this.head;
          var c5 = 1;
          var ret = p2.data;
          n2 -= ret.length;
          while (p2 = p2.next) {
            var str = p2.data;
            var nb = n2 > str.length ? str.length : n2;
            if (nb === str.length) ret += str;
            else ret += str.slice(0, n2);
            n2 -= nb;
            if (n2 === 0) {
              if (nb === str.length) {
                ++c5;
                if (p2.next) this.head = p2.next;
                else this.head = this.tail = null;
              } else {
                this.head = p2;
                p2.data = str.slice(nb);
              }
              break;
            }
            ++c5;
          }
          this.length -= c5;
          return ret;
        }
        // Consumes a specified amount of bytes from the buffered data.
      }, {
        key: "_getBuffer",
        value: function _getBuffer(n2) {
          var ret = Buffer2.allocUnsafe(n2);
          var p2 = this.head;
          var c5 = 1;
          p2.data.copy(ret);
          n2 -= p2.data.length;
          while (p2 = p2.next) {
            var buf = p2.data;
            var nb = n2 > buf.length ? buf.length : n2;
            buf.copy(ret, ret.length - n2, 0, nb);
            n2 -= nb;
            if (n2 === 0) {
              if (nb === buf.length) {
                ++c5;
                if (p2.next) this.head = p2.next;
                else this.head = this.tail = null;
              } else {
                this.head = p2;
                p2.data = buf.slice(nb);
              }
              break;
            }
            ++c5;
          }
          this.length -= c5;
          return ret;
        }
        // Make sure the linked list only shows the minimal necessary information.
      }, {
        key: custom,
        value: function value(_, options) {
          return inspect(this, _objectSpread(_objectSpread({}, options), {}, {
            // Only inspect one level.
            depth: 0,
            // It should not recurse.
            customInspect: false
          }));
        }
      }]);
      return BufferList;
    })();
  }
});

// ../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/destroy.js
var require_destroy2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) {
    "use strict";
    function destroy(err, cb) {
      var _this = this;
      var readableDestroyed = this._readableState && this._readableState.destroyed;
      var writableDestroyed = this._writableState && this._writableState.destroyed;
      if (readableDestroyed || writableDestroyed) {
        if (cb) {
          cb(err);
        } else if (err) {
          if (!this._writableState) {
            process.nextTick(emitErrorNT, this, err);
          } else if (!this._writableState.errorEmitted) {
            this._writableState.errorEmitted = true;
            process.nextTick(emitErrorNT, this, err);
          }
        }
        return this;
      }
      if (this._readableState) {
        this._readableState.destroyed = true;
      }
      if (this._writableState) {
        this._writableState.destroyed = true;
      }
      this._destroy(err || null, function(err2) {
        if (!cb && err2) {
          if (!_this._writableState) {
            process.nextTick(emitErrorAndCloseNT, _this, err2);
          } else if (!_this._writableState.errorEmitted) {
            _this._writableState.errorEmitted = true;
            process.nextTick(emitErrorAndCloseNT, _this, err2);
          } else {
            process.nextTick(emitCloseNT, _this);
          }
        } else if (cb) {
          process.nextTick(emitCloseNT, _this);
          cb(err2);
        } else {
          process.nextTick(emitCloseNT, _this);
        }
      });
      return this;
    }
    function emitErrorAndCloseNT(self2, err) {
      emitErrorNT(self2, err);
      emitCloseNT(self2);
    }
    function emitCloseNT(self2) {
      if (self2._writableState && !self2._writableState.emitClose) return;
      if (self2._readableState && !self2._readableState.emitClose) return;
      self2.emit("close");
    }
    function undestroy() {
      if (this._readableState) {
        this._readableState.destroyed = false;
        this._readableState.reading = false;
        this._readableState.ended = false;
        this._readableState.endEmitted = false;
      }
      if (this._writableState) {
        this._writableState.destroyed = false;
        this._writableState.ended = false;
        this._writableState.ending = false;
        this._writableState.finalCalled = false;
        this._writableState.prefinished = false;
        this._writableState.finished = false;
        this._writableState.errorEmitted = false;
      }
    }
    function emitErrorNT(self2, err) {
      self2.emit("error", err);
    }
    function errorOrDestroy(stream, err) {
      var rState = stream._readableState;
      var wState = stream._writableState;
      if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);
      else stream.emit("error", err);
    }
    module2.exports = {
      destroy,
      undestroy,
      errorOrDestroy
    };
  }
});

// ../../node_modules/bl/node_modules/readable-stream/errors.js
var require_errors2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/errors.js"(exports2, module2) {
    "use strict";
    var codes = {};
    function createErrorType(code, message, Base) {
      if (!Base) {
        Base = Error;
      }
      function getMessage(arg1, arg2, arg3) {
        if (typeof message === "string") {
          return message;
        } else {
          return message(arg1, arg2, arg3);
        }
      }
      class NodeError extends Base {
        constructor(arg1, arg2, arg3) {
          super(getMessage(arg1, arg2, arg3));
        }
      }
      NodeError.prototype.name = Base.name;
      NodeError.prototype.code = code;
      codes[code] = NodeError;
    }
    function oneOf(expected, thing) {
      if (Array.isArray(expected)) {
        const len = expected.length;
        expected = expected.map((i5) => String(i5));
        if (len > 2) {
          return `one of ${thing} ${expected.slice(0, len - 1).join(", ")}, or ` + expected[len - 1];
        } else if (len === 2) {
          return `one of ${thing} ${expected[0]} or ${expected[1]}`;
        } else {
          return `of ${thing} ${expected[0]}`;
        }
      } else {
        return `of ${thing} ${String(expected)}`;
      }
    }
    function startsWith(str, search, pos) {
      return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
    }
    function endsWith(str, search, this_len) {
      if (this_len === void 0 || this_len > str.length) {
        this_len = str.length;
      }
      return str.substring(this_len - search.length, this_len) === search;
    }
    function includes(str, search, start) {
      if (typeof start !== "number") {
        start = 0;
      }
      if (start + search.length > str.length) {
        return false;
      } else {
        return str.indexOf(search, start) !== -1;
      }
    }
    createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) {
      return 'The value "' + value + '" is invalid for option "' + name + '"';
    }, TypeError);
    createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
      let determiner;
      if (typeof expected === "string" && startsWith(expected, "not ")) {
        determiner = "must not be";
        expected = expected.replace(/^not /, "");
      } else {
        determiner = "must be";
      }
      let msg;
      if (endsWith(name, " argument")) {
        msg = `The ${name} ${determiner} ${oneOf(expected, "type")}`;
      } else {
        const type = includes(name, ".") ? "property" : "argument";
        msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, "type")}`;
      }
      msg += `. Received type ${typeof actual}`;
      return msg;
    }, TypeError);
    createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
    createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) {
      return "The " + name + " method is not implemented";
    });
    createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
    createErrorType("ERR_STREAM_DESTROYED", function(name) {
      return "Cannot call " + name + " after a stream was destroyed";
    });
    createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
    createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
    createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end");
    createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError);
    createErrorType("ERR_UNKNOWN_ENCODING", function(arg) {
      return "Unknown encoding: " + arg;
    }, TypeError);
    createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
    module2.exports.codes = codes;
  }
});

// ../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/state.js
var require_state2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/state.js"(exports2, module2) {
    "use strict";
    var ERR_INVALID_OPT_VALUE = require_errors2().codes.ERR_INVALID_OPT_VALUE;
    function highWaterMarkFrom(options, isDuplex, duplexKey) {
      return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
    }
    function getHighWaterMark(state2, options, duplexKey, isDuplex) {
      var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
      if (hwm != null) {
        if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
          var name = isDuplex ? duplexKey : "highWaterMark";
          throw new ERR_INVALID_OPT_VALUE(name, hwm);
        }
        return Math.floor(hwm);
      }
      return state2.objectMode ? 16 : 16 * 1024;
    }
    module2.exports = {
      getHighWaterMark
    };
  }
});

// ../../node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js
var require_stream_writable2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) {
    "use strict";
    module2.exports = Writable;
    function CorkedRequest(state2) {
      var _this = this;
      this.next = null;
      this.entry = null;
      this.finish = function() {
        onCorkedFinish(_this, state2);
      };
    }
    var Duplex;
    Writable.WritableState = WritableState;
    var internalUtil = {
      deprecate: require_node()
    };
    var Stream = require_stream2();
    var Buffer2 = require("buffer").Buffer;
    var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
    };
    function _uint8ArrayToBuffer(chunk) {
      return Buffer2.from(chunk);
    }
    function _isUint8Array(obj) {
      return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
    }
    var destroyImpl = require_destroy2();
    var _require = require_state2();
    var getHighWaterMark = _require.getHighWaterMark;
    var _require$codes = require_errors2().codes;
    var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE;
    var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
    var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK;
    var ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE;
    var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
    var ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES;
    var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END;
    var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
    var errorOrDestroy = destroyImpl.errorOrDestroy;
    require_inherits()(Writable, Stream);
    function nop() {
    }
    function WritableState(options, stream, isDuplex) {
      Duplex = Duplex || require_stream_duplex2();
      options = options || {};
      if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex;
      this.objectMode = !!options.objectMode;
      if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
      this.highWaterMark = getHighWaterMark(this, options, "writableHighWaterMark", isDuplex);
      this.finalCalled = false;
      this.needDrain = false;
      this.ending = false;
      this.ended = false;
      this.finished = false;
      this.destroyed = false;
      var noDecode = options.decodeStrings === false;
      this.decodeStrings = !noDecode;
      this.defaultEncoding = options.defaultEncoding || "utf8";
      this.length = 0;
      this.writing = false;
      this.corked = 0;
      this.sync = true;
      this.bufferProcessing = false;
      this.onwrite = function(er) {
        onwrite(stream, er);
      };
      this.writecb = null;
      this.writelen = 0;
      this.bufferedRequest = null;
      this.lastBufferedRequest = null;
      this.pendingcb = 0;
      this.prefinished = false;
      this.errorEmitted = false;
      this.emitClose = options.emitClose !== false;
      this.autoDestroy = !!options.autoDestroy;
      this.bufferedRequestCount = 0;
      this.corkedRequestsFree = new CorkedRequest(this);
    }
    WritableState.prototype.getBuffer = function getBuffer() {
      var current = this.bufferedRequest;
      var out = [];
      while (current) {
        out.push(current);
        current = current.next;
      }
      return out;
    };
    (function() {
      try {
        Object.defineProperty(WritableState.prototype, "buffer", {
          get: internalUtil.deprecate(function writableStateBufferGetter() {
            return this.getBuffer();
          }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
        });
      } catch (_) {
      }
    })();
    var realHasInstance;
    if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") {
      realHasInstance = Function.prototype[Symbol.hasInstance];
      Object.defineProperty(Writable, Symbol.hasInstance, {
        value: function value(object) {
          if (realHasInstance.call(this, object)) return true;
          if (this !== Writable) return false;
          return object && object._writableState instanceof WritableState;
        }
      });
    } else {
      realHasInstance = function realHasInstance2(object) {
        return object instanceof this;
      };
    }
    function Writable(options) {
      Duplex = Duplex || require_stream_duplex2();
      var isDuplex = this instanceof Duplex;
      if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);
      this._writableState = new WritableState(options, this, isDuplex);
      this.writable = true;
      if (options) {
        if (typeof options.write === "function") this._write = options.write;
        if (typeof options.writev === "function") this._writev = options.writev;
        if (typeof options.destroy === "function") this._destroy = options.destroy;
        if (typeof options.final === "function") this._final = options.final;
      }
      Stream.call(this);
    }
    Writable.prototype.pipe = function() {
      errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
    };
    function writeAfterEnd(stream, cb) {
      var er = new ERR_STREAM_WRITE_AFTER_END();
      errorOrDestroy(stream, er);
      process.nextTick(cb, er);
    }
    function validChunk(stream, state2, chunk, cb) {
      var er;
      if (chunk === null) {
        er = new ERR_STREAM_NULL_VALUES();
      } else if (typeof chunk !== "string" && !state2.objectMode) {
        er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk);
      }
      if (er) {
        errorOrDestroy(stream, er);
        process.nextTick(cb, er);
        return false;
      }
      return true;
    }
    Writable.prototype.write = function(chunk, encoding, cb) {
      var state2 = this._writableState;
      var ret = false;
      var isBuf = !state2.objectMode && _isUint8Array(chunk);
      if (isBuf && !Buffer2.isBuffer(chunk)) {
        chunk = _uint8ArrayToBuffer(chunk);
      }
      if (typeof encoding === "function") {
        cb = encoding;
        encoding = null;
      }
      if (isBuf) encoding = "buffer";
      else if (!encoding) encoding = state2.defaultEncoding;
      if (typeof cb !== "function") cb = nop;
      if (state2.ending) writeAfterEnd(this, cb);
      else if (isBuf || validChunk(this, state2, chunk, cb)) {
        state2.pendingcb++;
        ret = writeOrBuffer(this, state2, isBuf, chunk, encoding, cb);
      }
      return ret;
    };
    Writable.prototype.cork = function() {
      this._writableState.corked++;
    };
    Writable.prototype.uncork = function() {
      var state2 = this._writableState;
      if (state2.corked) {
        state2.corked--;
        if (!state2.writing && !state2.corked && !state2.bufferProcessing && state2.bufferedRequest) clearBuffer(this, state2);
      }
    };
    Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
      if (typeof encoding === "string") encoding = encoding.toLowerCase();
      if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);
      this._writableState.defaultEncoding = encoding;
      return this;
    };
    Object.defineProperty(Writable.prototype, "writableBuffer", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._writableState && this._writableState.getBuffer();
      }
    });
    function decodeChunk(state2, chunk, encoding) {
      if (!state2.objectMode && state2.decodeStrings !== false && typeof chunk === "string") {
        chunk = Buffer2.from(chunk, encoding);
      }
      return chunk;
    }
    Object.defineProperty(Writable.prototype, "writableHighWaterMark", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._writableState.highWaterMark;
      }
    });
    function writeOrBuffer(stream, state2, isBuf, chunk, encoding, cb) {
      if (!isBuf) {
        var newChunk = decodeChunk(state2, chunk, encoding);
        if (chunk !== newChunk) {
          isBuf = true;
          encoding = "buffer";
          chunk = newChunk;
        }
      }
      var len = state2.objectMode ? 1 : chunk.length;
      state2.length += len;
      var ret = state2.length < state2.highWaterMark;
      if (!ret) state2.needDrain = true;
      if (state2.writing || state2.corked) {
        var last = state2.lastBufferedRequest;
        state2.lastBufferedRequest = {
          chunk,
          encoding,
          isBuf,
          callback: cb,
          next: null
        };
        if (last) {
          last.next = state2.lastBufferedRequest;
        } else {
          state2.bufferedRequest = state2.lastBufferedRequest;
        }
        state2.bufferedRequestCount += 1;
      } else {
        doWrite(stream, state2, false, len, chunk, encoding, cb);
      }
      return ret;
    }
    function doWrite(stream, state2, writev, len, chunk, encoding, cb) {
      state2.writelen = len;
      state2.writecb = cb;
      state2.writing = true;
      state2.sync = true;
      if (state2.destroyed) state2.onwrite(new ERR_STREAM_DESTROYED("write"));
      else if (writev) stream._writev(chunk, state2.onwrite);
      else stream._write(chunk, encoding, state2.onwrite);
      state2.sync = false;
    }
    function onwriteError(stream, state2, sync, er, cb) {
      --state2.pendingcb;
      if (sync) {
        process.nextTick(cb, er);
        process.nextTick(finishMaybe, stream, state2);
        stream._writableState.errorEmitted = true;
        errorOrDestroy(stream, er);
      } else {
        cb(er);
        stream._writableState.errorEmitted = true;
        errorOrDestroy(stream, er);
        finishMaybe(stream, state2);
      }
    }
    function onwriteStateUpdate(state2) {
      state2.writing = false;
      state2.writecb = null;
      state2.length -= state2.writelen;
      state2.writelen = 0;
    }
    function onwrite(stream, er) {
      var state2 = stream._writableState;
      var sync = state2.sync;
      var cb = state2.writecb;
      if (typeof cb !== "function") throw new ERR_MULTIPLE_CALLBACK();
      onwriteStateUpdate(state2);
      if (er) onwriteError(stream, state2, sync, er, cb);
      else {
        var finished = needFinish(state2) || stream.destroyed;
        if (!finished && !state2.corked && !state2.bufferProcessing && state2.bufferedRequest) {
          clearBuffer(stream, state2);
        }
        if (sync) {
          process.nextTick(afterWrite, stream, state2, finished, cb);
        } else {
          afterWrite(stream, state2, finished, cb);
        }
      }
    }
    function afterWrite(stream, state2, finished, cb) {
      if (!finished) onwriteDrain(stream, state2);
      state2.pendingcb--;
      cb();
      finishMaybe(stream, state2);
    }
    function onwriteDrain(stream, state2) {
      if (state2.length === 0 && state2.needDrain) {
        state2.needDrain = false;
        stream.emit("drain");
      }
    }
    function clearBuffer(stream, state2) {
      state2.bufferProcessing = true;
      var entry = state2.bufferedRequest;
      if (stream._writev && entry && entry.next) {
        var l3 = state2.bufferedRequestCount;
        var buffer = new Array(l3);
        var holder = state2.corkedRequestsFree;
        holder.entry = entry;
        var count = 0;
        var allBuffers = true;
        while (entry) {
          buffer[count] = entry;
          if (!entry.isBuf) allBuffers = false;
          entry = entry.next;
          count += 1;
        }
        buffer.allBuffers = allBuffers;
        doWrite(stream, state2, true, state2.length, buffer, "", holder.finish);
        state2.pendingcb++;
        state2.lastBufferedRequest = null;
        if (holder.next) {
          state2.corkedRequestsFree = holder.next;
          holder.next = null;
        } else {
          state2.corkedRequestsFree = new CorkedRequest(state2);
        }
        state2.bufferedRequestCount = 0;
      } else {
        while (entry) {
          var chunk = entry.chunk;
          var encoding = entry.encoding;
          var cb = entry.callback;
          var len = state2.objectMode ? 1 : chunk.length;
          doWrite(stream, state2, false, len, chunk, encoding, cb);
          entry = entry.next;
          state2.bufferedRequestCount--;
          if (state2.writing) {
            break;
          }
        }
        if (entry === null) state2.lastBufferedRequest = null;
      }
      state2.bufferedRequest = entry;
      state2.bufferProcessing = false;
    }
    Writable.prototype._write = function(chunk, encoding, cb) {
      cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"));
    };
    Writable.prototype._writev = null;
    Writable.prototype.end = function(chunk, encoding, cb) {
      var state2 = this._writableState;
      if (typeof chunk === "function") {
        cb = chunk;
        chunk = null;
        encoding = null;
      } else if (typeof encoding === "function") {
        cb = encoding;
        encoding = null;
      }
      if (chunk !== null && chunk !== void 0) this.write(chunk, encoding);
      if (state2.corked) {
        state2.corked = 1;
        this.uncork();
      }
      if (!state2.ending) endWritable(this, state2, cb);
      return this;
    };
    Object.defineProperty(Writable.prototype, "writableLength", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._writableState.length;
      }
    });
    function needFinish(state2) {
      return state2.ending && state2.length === 0 && state2.bufferedRequest === null && !state2.finished && !state2.writing;
    }
    function callFinal(stream, state2) {
      stream._final(function(err) {
        state2.pendingcb--;
        if (err) {
          errorOrDestroy(stream, err);
        }
        state2.prefinished = true;
        stream.emit("prefinish");
        finishMaybe(stream, state2);
      });
    }
    function prefinish(stream, state2) {
      if (!state2.prefinished && !state2.finalCalled) {
        if (typeof stream._final === "function" && !state2.destroyed) {
          state2.pendingcb++;
          state2.finalCalled = true;
          process.nextTick(callFinal, stream, state2);
        } else {
          state2.prefinished = true;
          stream.emit("prefinish");
        }
      }
    }
    function finishMaybe(stream, state2) {
      var need = needFinish(state2);
      if (need) {
        prefinish(stream, state2);
        if (state2.pendingcb === 0) {
          state2.finished = true;
          stream.emit("finish");
          if (state2.autoDestroy) {
            var rState = stream._readableState;
            if (!rState || rState.autoDestroy && rState.endEmitted) {
              stream.destroy();
            }
          }
        }
      }
      return need;
    }
    function endWritable(stream, state2, cb) {
      state2.ending = true;
      finishMaybe(stream, state2);
      if (cb) {
        if (state2.finished) process.nextTick(cb);
        else stream.once("finish", cb);
      }
      state2.ended = true;
      stream.writable = false;
    }
    function onCorkedFinish(corkReq, state2, err) {
      var entry = corkReq.entry;
      corkReq.entry = null;
      while (entry) {
        var cb = entry.callback;
        state2.pendingcb--;
        cb(err);
        entry = entry.next;
      }
      state2.corkedRequestsFree.next = corkReq;
    }
    Object.defineProperty(Writable.prototype, "destroyed", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        if (this._writableState === void 0) {
          return false;
        }
        return this._writableState.destroyed;
      },
      set: function set(value) {
        if (!this._writableState) {
          return;
        }
        this._writableState.destroyed = value;
      }
    });
    Writable.prototype.destroy = destroyImpl.destroy;
    Writable.prototype._undestroy = destroyImpl.undestroy;
    Writable.prototype._destroy = function(err, cb) {
      cb(err);
    };
  }
});

// ../../node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js
var require_stream_duplex2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) {
    "use strict";
    var objectKeys = Object.keys || function(obj) {
      var keys2 = [];
      for (var key in obj) keys2.push(key);
      return keys2;
    };
    module2.exports = Duplex;
    var Readable = require_stream_readable2();
    var Writable = require_stream_writable2();
    require_inherits()(Duplex, Readable);
    {
      keys = objectKeys(Writable.prototype);
      for (v = 0; v < keys.length; v++) {
        method = keys[v];
        if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
      }
    }
    var keys;
    var method;
    var v;
    function Duplex(options) {
      if (!(this instanceof Duplex)) return new Duplex(options);
      Readable.call(this, options);
      Writable.call(this, options);
      this.allowHalfOpen = true;
      if (options) {
        if (options.readable === false) this.readable = false;
        if (options.writable === false) this.writable = false;
        if (options.allowHalfOpen === false) {
          this.allowHalfOpen = false;
          this.once("end", onend);
        }
      }
    }
    Object.defineProperty(Duplex.prototype, "writableHighWaterMark", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._writableState.highWaterMark;
      }
    });
    Object.defineProperty(Duplex.prototype, "writableBuffer", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._writableState && this._writableState.getBuffer();
      }
    });
    Object.defineProperty(Duplex.prototype, "writableLength", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._writableState.length;
      }
    });
    function onend() {
      if (this._writableState.ended) return;
      process.nextTick(onEndNT, this);
    }
    function onEndNT(self2) {
      self2.end();
    }
    Object.defineProperty(Duplex.prototype, "destroyed", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        if (this._readableState === void 0 || this._writableState === void 0) {
          return false;
        }
        return this._readableState.destroyed && this._writableState.destroyed;
      },
      set: function set(value) {
        if (this._readableState === void 0 || this._writableState === void 0) {
          return;
        }
        this._readableState.destroyed = value;
        this._writableState.destroyed = value;
      }
    });
  }
});

// ../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
var require_end_of_stream2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) {
    "use strict";
    var ERR_STREAM_PREMATURE_CLOSE = require_errors2().codes.ERR_STREAM_PREMATURE_CLOSE;
    function once(callback) {
      var called = false;
      return function() {
        if (called) return;
        called = true;
        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }
        callback.apply(this, args);
      };
    }
    function noop() {
    }
    function isRequest(stream) {
      return stream.setHeader && typeof stream.abort === "function";
    }
    function eos(stream, opts, callback) {
      if (typeof opts === "function") return eos(stream, null, opts);
      if (!opts) opts = {};
      callback = once(callback || noop);
      var readable = opts.readable || opts.readable !== false && stream.readable;
      var writable = opts.writable || opts.writable !== false && stream.writable;
      var onlegacyfinish = function onlegacyfinish2() {
        if (!stream.writable) onfinish();
      };
      var writableEnded = stream._writableState && stream._writableState.finished;
      var onfinish = function onfinish2() {
        writable = false;
        writableEnded = true;
        if (!readable) callback.call(stream);
      };
      var readableEnded = stream._readableState && stream._readableState.endEmitted;
      var onend = function onend2() {
        readable = false;
        readableEnded = true;
        if (!writable) callback.call(stream);
      };
      var onerror = function onerror2(err) {
        callback.call(stream, err);
      };
      var onclose = function onclose2() {
        var err;
        if (readable && !readableEnded) {
          if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
          return callback.call(stream, err);
        }
        if (writable && !writableEnded) {
          if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
          return callback.call(stream, err);
        }
      };
      var onrequest = function onrequest2() {
        stream.req.on("finish", onfinish);
      };
      if (isRequest(stream)) {
        stream.on("complete", onfinish);
        stream.on("abort", onclose);
        if (stream.req) onrequest();
        else stream.on("request", onrequest);
      } else if (writable && !stream._writableState) {
        stream.on("end", onlegacyfinish);
        stream.on("close", onlegacyfinish);
      }
      stream.on("end", onend);
      stream.on("finish", onfinish);
      if (opts.error !== false) stream.on("error", onerror);
      stream.on("close", onclose);
      return function() {
        stream.removeListener("complete", onfinish);
        stream.removeListener("abort", onclose);
        stream.removeListener("request", onrequest);
        if (stream.req) stream.req.removeListener("finish", onfinish);
        stream.removeListener("end", onlegacyfinish);
        stream.removeListener("close", onlegacyfinish);
        stream.removeListener("finish", onfinish);
        stream.removeListener("end", onend);
        stream.removeListener("error", onerror);
        stream.removeListener("close", onclose);
      };
    }
    module2.exports = eos;
  }
});

// ../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/async_iterator.js
var require_async_iterator2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) {
    "use strict";
    var _Object$setPrototypeO;
    function _defineProperty(obj, key, value) {
      key = _toPropertyKey(key);
      if (key in obj) {
        Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }
      return obj;
    }
    function _toPropertyKey(arg) {
      var key = _toPrimitive(arg, "string");
      return typeof key === "symbol" ? key : String(key);
    }
    function _toPrimitive(input, hint) {
      if (typeof input !== "object" || input === null) return input;
      var prim = input[Symbol.toPrimitive];
      if (prim !== void 0) {
        var res = prim.call(input, hint || "default");
        if (typeof res !== "object") return res;
        throw new TypeError("@@toPrimitive must return a primitive value.");
      }
      return (hint === "string" ? String : Number)(input);
    }
    var finished = require_end_of_stream2();
    var kLastResolve = /* @__PURE__ */ Symbol("lastResolve");
    var kLastReject = /* @__PURE__ */ Symbol("lastReject");
    var kError = /* @__PURE__ */ Symbol("error");
    var kEnded = /* @__PURE__ */ Symbol("ended");
    var kLastPromise = /* @__PURE__ */ Symbol("lastPromise");
    var kHandlePromise = /* @__PURE__ */ Symbol("handlePromise");
    var kStream = /* @__PURE__ */ Symbol("stream");
    function createIterResult(value, done) {
      return {
        value,
        done
      };
    }
    function readAndResolve(iter) {
      var resolve = iter[kLastResolve];
      if (resolve !== null) {
        var data2 = iter[kStream].read();
        if (data2 !== null) {
          iter[kLastPromise] = null;
          iter[kLastResolve] = null;
          iter[kLastReject] = null;
          resolve(createIterResult(data2, false));
        }
      }
    }
    function onReadable(iter) {
      process.nextTick(readAndResolve, iter);
    }
    function wrapForNext(lastPromise, iter) {
      return function(resolve, reject) {
        lastPromise.then(function() {
          if (iter[kEnded]) {
            resolve(createIterResult(void 0, true));
            return;
          }
          iter[kHandlePromise](resolve, reject);
        }, reject);
      };
    }
    var AsyncIteratorPrototype = Object.getPrototypeOf(function() {
    });
    var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
      get stream() {
        return this[kStream];
      },
      next: function next() {
        var _this = this;
        var error3 = this[kError];
        if (error3 !== null) {
          return Promise.reject(error3);
        }
        if (this[kEnded]) {
          return Promise.resolve(createIterResult(void 0, true));
        }
        if (this[kStream].destroyed) {
          return new Promise(function(resolve, reject) {
            process.nextTick(function() {
              if (_this[kError]) {
                reject(_this[kError]);
              } else {
                resolve(createIterResult(void 0, true));
              }
            });
          });
        }
        var lastPromise = this[kLastPromise];
        var promise;
        if (lastPromise) {
          promise = new Promise(wrapForNext(lastPromise, this));
        } else {
          var data2 = this[kStream].read();
          if (data2 !== null) {
            return Promise.resolve(createIterResult(data2, false));
          }
          promise = new Promise(this[kHandlePromise]);
        }
        this[kLastPromise] = promise;
        return promise;
      }
    }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() {
      return this;
    }), _defineProperty(_Object$setPrototypeO, "return", function _return() {
      var _this2 = this;
      return new Promise(function(resolve, reject) {
        _this2[kStream].destroy(null, function(err) {
          if (err) {
            reject(err);
            return;
          }
          resolve(createIterResult(void 0, true));
        });
      });
    }), _Object$setPrototypeO), AsyncIteratorPrototype);
    var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) {
      var _Object$create;
      var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {
        value: stream,
        writable: true
      }), _defineProperty(_Object$create, kLastResolve, {
        value: null,
        writable: true
      }), _defineProperty(_Object$create, kLastReject, {
        value: null,
        writable: true
      }), _defineProperty(_Object$create, kError, {
        value: null,
        writable: true
      }), _defineProperty(_Object$create, kEnded, {
        value: stream._readableState.endEmitted,
        writable: true
      }), _defineProperty(_Object$create, kHandlePromise, {
        value: function value(resolve, reject) {
          var data2 = iterator[kStream].read();
          if (data2) {
            iterator[kLastPromise] = null;
            iterator[kLastResolve] = null;
            iterator[kLastReject] = null;
            resolve(createIterResult(data2, false));
          } else {
            iterator[kLastResolve] = resolve;
            iterator[kLastReject] = reject;
          }
        },
        writable: true
      }), _Object$create));
      iterator[kLastPromise] = null;
      finished(stream, function(err) {
        if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") {
          var reject = iterator[kLastReject];
          if (reject !== null) {
            iterator[kLastPromise] = null;
            iterator[kLastResolve] = null;
            iterator[kLastReject] = null;
            reject(err);
          }
          iterator[kError] = err;
          return;
        }
        var resolve = iterator[kLastResolve];
        if (resolve !== null) {
          iterator[kLastPromise] = null;
          iterator[kLastResolve] = null;
          iterator[kLastReject] = null;
          resolve(createIterResult(void 0, true));
        }
        iterator[kEnded] = true;
      });
      stream.on("readable", onReadable.bind(null, iterator));
      return iterator;
    };
    module2.exports = createReadableStreamAsyncIterator;
  }
});

// ../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/from.js
var require_from2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) {
    "use strict";
    function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
      try {
        var info2 = gen[key](arg);
        var value = info2.value;
      } catch (error3) {
        reject(error3);
        return;
      }
      if (info2.done) {
        resolve(value);
      } else {
        Promise.resolve(value).then(_next, _throw);
      }
    }
    function _asyncToGenerator(fn) {
      return function() {
        var self2 = this, args = arguments;
        return new Promise(function(resolve, reject) {
          var gen = fn.apply(self2, args);
          function _next(value) {
            asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
          }
          function _throw(err) {
            asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
          }
          _next(void 0);
        });
      };
    }
    function ownKeys2(object, enumerableOnly) {
      var keys = Object.keys(object);
      if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        enumerableOnly && (symbols = symbols.filter(function(sym) {
          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
        })), keys.push.apply(keys, symbols);
      }
      return keys;
    }
    function _objectSpread(target) {
      for (var i5 = 1; i5 < arguments.length; i5++) {
        var source = null != arguments[i5] ? arguments[i5] : {};
        i5 % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
          _defineProperty(target, key, source[key]);
        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
        });
      }
      return target;
    }
    function _defineProperty(obj, key, value) {
      key = _toPropertyKey(key);
      if (key in obj) {
        Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }
      return obj;
    }
    function _toPropertyKey(arg) {
      var key = _toPrimitive(arg, "string");
      return typeof key === "symbol" ? key : String(key);
    }
    function _toPrimitive(input, hint) {
      if (typeof input !== "object" || input === null) return input;
      var prim = input[Symbol.toPrimitive];
      if (prim !== void 0) {
        var res = prim.call(input, hint || "default");
        if (typeof res !== "object") return res;
        throw new TypeError("@@toPrimitive must return a primitive value.");
      }
      return (hint === "string" ? String : Number)(input);
    }
    var ERR_INVALID_ARG_TYPE = require_errors2().codes.ERR_INVALID_ARG_TYPE;
    function from(Readable, iterable, opts) {
      var iterator;
      if (iterable && typeof iterable.next === "function") {
        iterator = iterable;
      } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();
      else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();
      else throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable);
      var readable = new Readable(_objectSpread({
        objectMode: true
      }, opts));
      var reading = false;
      readable._read = function() {
        if (!reading) {
          reading = true;
          next();
        }
      };
      function next() {
        return _next2.apply(this, arguments);
      }
      function _next2() {
        _next2 = _asyncToGenerator(function* () {
          try {
            var _yield$iterator$next = yield iterator.next(), value = _yield$iterator$next.value, done = _yield$iterator$next.done;
            if (done) {
              readable.push(null);
            } else if (readable.push(yield value)) {
              next();
            } else {
              reading = false;
            }
          } catch (err) {
            readable.destroy(err);
          }
        });
        return _next2.apply(this, arguments);
      }
      return readable;
    }
    module2.exports = from;
  }
});

// ../../node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js
var require_stream_readable2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) {
    "use strict";
    module2.exports = Readable;
    var Duplex;
    Readable.ReadableState = ReadableState;
    var EE = require("events").EventEmitter;
    var EElistenerCount = function EElistenerCount2(emitter, type) {
      return emitter.listeners(type).length;
    };
    var Stream = require_stream2();
    var Buffer2 = require("buffer").Buffer;
    var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
    };
    function _uint8ArrayToBuffer(chunk) {
      return Buffer2.from(chunk);
    }
    function _isUint8Array(obj) {
      return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
    }
    var debugUtil = require("util");
    var debug;
    if (debugUtil && debugUtil.debuglog) {
      debug = debugUtil.debuglog("stream");
    } else {
      debug = function debug2() {
      };
    }
    var BufferList = require_buffer_list2();
    var destroyImpl = require_destroy2();
    var _require = require_state2();
    var getHighWaterMark = _require.getHighWaterMark;
    var _require$codes = require_errors2().codes;
    var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE;
    var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF;
    var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
    var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
    var StringDecoder;
    var createReadableStreamAsyncIterator;
    var from;
    require_inherits()(Readable, Stream);
    var errorOrDestroy = destroyImpl.errorOrDestroy;
    var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
    function prependListener(emitter, event, fn) {
      if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn);
      if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);
      else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);
      else emitter._events[event] = [fn, emitter._events[event]];
    }
    function ReadableState(options, stream, isDuplex) {
      Duplex = Duplex || require_stream_duplex2();
      options = options || {};
      if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex;
      this.objectMode = !!options.objectMode;
      if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
      this.highWaterMark = getHighWaterMark(this, options, "readableHighWaterMark", isDuplex);
      this.buffer = new BufferList();
      this.length = 0;
      this.pipes = null;
      this.pipesCount = 0;
      this.flowing = null;
      this.ended = false;
      this.endEmitted = false;
      this.reading = false;
      this.sync = true;
      this.needReadable = false;
      this.emittedReadable = false;
      this.readableListening = false;
      this.resumeScheduled = false;
      this.paused = true;
      this.emitClose = options.emitClose !== false;
      this.autoDestroy = !!options.autoDestroy;
      this.destroyed = false;
      this.defaultEncoding = options.defaultEncoding || "utf8";
      this.awaitDrain = 0;
      this.readingMore = false;
      this.decoder = null;
      this.encoding = null;
      if (options.encoding) {
        if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder;
        this.decoder = new StringDecoder(options.encoding);
        this.encoding = options.encoding;
      }
    }
    function Readable(options) {
      Duplex = Duplex || require_stream_duplex2();
      if (!(this instanceof Readable)) return new Readable(options);
      var isDuplex = this instanceof Duplex;
      this._readableState = new ReadableState(options, this, isDuplex);
      this.readable = true;
      if (options) {
        if (typeof options.read === "function") this._read = options.read;
        if (typeof options.destroy === "function") this._destroy = options.destroy;
      }
      Stream.call(this);
    }
    Object.defineProperty(Readable.prototype, "destroyed", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        if (this._readableState === void 0) {
          return false;
        }
        return this._readableState.destroyed;
      },
      set: function set(value) {
        if (!this._readableState) {
          return;
        }
        this._readableState.destroyed = value;
      }
    });
    Readable.prototype.destroy = destroyImpl.destroy;
    Readable.prototype._undestroy = destroyImpl.undestroy;
    Readable.prototype._destroy = function(err, cb) {
      cb(err);
    };
    Readable.prototype.push = function(chunk, encoding) {
      var state2 = this._readableState;
      var skipChunkCheck;
      if (!state2.objectMode) {
        if (typeof chunk === "string") {
          encoding = encoding || state2.defaultEncoding;
          if (encoding !== state2.encoding) {
            chunk = Buffer2.from(chunk, encoding);
            encoding = "";
          }
          skipChunkCheck = true;
        }
      } else {
        skipChunkCheck = true;
      }
      return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
    };
    Readable.prototype.unshift = function(chunk) {
      return readableAddChunk(this, chunk, null, true, false);
    };
    function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
      debug("readableAddChunk", chunk);
      var state2 = stream._readableState;
      if (chunk === null) {
        state2.reading = false;
        onEofChunk(stream, state2);
      } else {
        var er;
        if (!skipChunkCheck) er = chunkInvalid(state2, chunk);
        if (er) {
          errorOrDestroy(stream, er);
        } else if (state2.objectMode || chunk && chunk.length > 0) {
          if (typeof chunk !== "string" && !state2.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) {
            chunk = _uint8ArrayToBuffer(chunk);
          }
          if (addToFront) {
            if (state2.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());
            else addChunk(stream, state2, chunk, true);
          } else if (state2.ended) {
            errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());
          } else if (state2.destroyed) {
            return false;
          } else {
            state2.reading = false;
            if (state2.decoder && !encoding) {
              chunk = state2.decoder.write(chunk);
              if (state2.objectMode || chunk.length !== 0) addChunk(stream, state2, chunk, false);
              else maybeReadMore(stream, state2);
            } else {
              addChunk(stream, state2, chunk, false);
            }
          }
        } else if (!addToFront) {
          state2.reading = false;
          maybeReadMore(stream, state2);
        }
      }
      return !state2.ended && (state2.length < state2.highWaterMark || state2.length === 0);
    }
    function addChunk(stream, state2, chunk, addToFront) {
      if (state2.flowing && state2.length === 0 && !state2.sync) {
        state2.awaitDrain = 0;
        stream.emit("data", chunk);
      } else {
        state2.length += state2.objectMode ? 1 : chunk.length;
        if (addToFront) state2.buffer.unshift(chunk);
        else state2.buffer.push(chunk);
        if (state2.needReadable) emitReadable(stream);
      }
      maybeReadMore(stream, state2);
    }
    function chunkInvalid(state2, chunk) {
      var er;
      if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state2.objectMode) {
        er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk);
      }
      return er;
    }
    Readable.prototype.isPaused = function() {
      return this._readableState.flowing === false;
    };
    Readable.prototype.setEncoding = function(enc) {
      if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder;
      var decoder = new StringDecoder(enc);
      this._readableState.decoder = decoder;
      this._readableState.encoding = this._readableState.decoder.encoding;
      var p2 = this._readableState.buffer.head;
      var content = "";
      while (p2 !== null) {
        content += decoder.write(p2.data);
        p2 = p2.next;
      }
      this._readableState.buffer.clear();
      if (content !== "") this._readableState.buffer.push(content);
      this._readableState.length = content.length;
      return this;
    };
    var MAX_HWM = 1073741824;
    function computeNewHighWaterMark(n2) {
      if (n2 >= MAX_HWM) {
        n2 = MAX_HWM;
      } else {
        n2--;
        n2 |= n2 >>> 1;
        n2 |= n2 >>> 2;
        n2 |= n2 >>> 4;
        n2 |= n2 >>> 8;
        n2 |= n2 >>> 16;
        n2++;
      }
      return n2;
    }
    function howMuchToRead(n2, state2) {
      if (n2 <= 0 || state2.length === 0 && state2.ended) return 0;
      if (state2.objectMode) return 1;
      if (n2 !== n2) {
        if (state2.flowing && state2.length) return state2.buffer.head.data.length;
        else return state2.length;
      }
      if (n2 > state2.highWaterMark) state2.highWaterMark = computeNewHighWaterMark(n2);
      if (n2 <= state2.length) return n2;
      if (!state2.ended) {
        state2.needReadable = true;
        return 0;
      }
      return state2.length;
    }
    Readable.prototype.read = function(n2) {
      debug("read", n2);
      n2 = parseInt(n2, 10);
      var state2 = this._readableState;
      var nOrig = n2;
      if (n2 !== 0) state2.emittedReadable = false;
      if (n2 === 0 && state2.needReadable && ((state2.highWaterMark !== 0 ? state2.length >= state2.highWaterMark : state2.length > 0) || state2.ended)) {
        debug("read: emitReadable", state2.length, state2.ended);
        if (state2.length === 0 && state2.ended) endReadable(this);
        else emitReadable(this);
        return null;
      }
      n2 = howMuchToRead(n2, state2);
      if (n2 === 0 && state2.ended) {
        if (state2.length === 0) endReadable(this);
        return null;
      }
      var doRead = state2.needReadable;
      debug("need readable", doRead);
      if (state2.length === 0 || state2.length - n2 < state2.highWaterMark) {
        doRead = true;
        debug("length less than watermark", doRead);
      }
      if (state2.ended || state2.reading) {
        doRead = false;
        debug("reading or ended", doRead);
      } else if (doRead) {
        debug("do read");
        state2.reading = true;
        state2.sync = true;
        if (state2.length === 0) state2.needReadable = true;
        this._read(state2.highWaterMark);
        state2.sync = false;
        if (!state2.reading) n2 = howMuchToRead(nOrig, state2);
      }
      var ret;
      if (n2 > 0) ret = fromList(n2, state2);
      else ret = null;
      if (ret === null) {
        state2.needReadable = state2.length <= state2.highWaterMark;
        n2 = 0;
      } else {
        state2.length -= n2;
        state2.awaitDrain = 0;
      }
      if (state2.length === 0) {
        if (!state2.ended) state2.needReadable = true;
        if (nOrig !== n2 && state2.ended) endReadable(this);
      }
      if (ret !== null) this.emit("data", ret);
      return ret;
    };
    function onEofChunk(stream, state2) {
      debug("onEofChunk");
      if (state2.ended) return;
      if (state2.decoder) {
        var chunk = state2.decoder.end();
        if (chunk && chunk.length) {
          state2.buffer.push(chunk);
          state2.length += state2.objectMode ? 1 : chunk.length;
        }
      }
      state2.ended = true;
      if (state2.sync) {
        emitReadable(stream);
      } else {
        state2.needReadable = false;
        if (!state2.emittedReadable) {
          state2.emittedReadable = true;
          emitReadable_(stream);
        }
      }
    }
    function emitReadable(stream) {
      var state2 = stream._readableState;
      debug("emitReadable", state2.needReadable, state2.emittedReadable);
      state2.needReadable = false;
      if (!state2.emittedReadable) {
        debug("emitReadable", state2.flowing);
        state2.emittedReadable = true;
        process.nextTick(emitReadable_, stream);
      }
    }
    function emitReadable_(stream) {
      var state2 = stream._readableState;
      debug("emitReadable_", state2.destroyed, state2.length, state2.ended);
      if (!state2.destroyed && (state2.length || state2.ended)) {
        stream.emit("readable");
        state2.emittedReadable = false;
      }
      state2.needReadable = !state2.flowing && !state2.ended && state2.length <= state2.highWaterMark;
      flow(stream);
    }
    function maybeReadMore(stream, state2) {
      if (!state2.readingMore) {
        state2.readingMore = true;
        process.nextTick(maybeReadMore_, stream, state2);
      }
    }
    function maybeReadMore_(stream, state2) {
      while (!state2.reading && !state2.ended && (state2.length < state2.highWaterMark || state2.flowing && state2.length === 0)) {
        var len = state2.length;
        debug("maybeReadMore read 0");
        stream.read(0);
        if (len === state2.length)
          break;
      }
      state2.readingMore = false;
    }
    Readable.prototype._read = function(n2) {
      errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()"));
    };
    Readable.prototype.pipe = function(dest, pipeOpts) {
      var src = this;
      var state2 = this._readableState;
      switch (state2.pipesCount) {
        case 0:
          state2.pipes = dest;
          break;
        case 1:
          state2.pipes = [state2.pipes, dest];
          break;
        default:
          state2.pipes.push(dest);
          break;
      }
      state2.pipesCount += 1;
      debug("pipe count=%d opts=%j", state2.pipesCount, pipeOpts);
      var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
      var endFn = doEnd ? onend : unpipe;
      if (state2.endEmitted) process.nextTick(endFn);
      else src.once("end", endFn);
      dest.on("unpipe", onunpipe);
      function onunpipe(readable, unpipeInfo) {
        debug("onunpipe");
        if (readable === src) {
          if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
            unpipeInfo.hasUnpiped = true;
            cleanup();
          }
        }
      }
      function onend() {
        debug("onend");
        dest.end();
      }
      var ondrain = pipeOnDrain(src);
      dest.on("drain", ondrain);
      var cleanedUp = false;
      function cleanup() {
        debug("cleanup");
        dest.removeListener("close", onclose);
        dest.removeListener("finish", onfinish);
        dest.removeListener("drain", ondrain);
        dest.removeListener("error", onerror);
        dest.removeListener("unpipe", onunpipe);
        src.removeListener("end", onend);
        src.removeListener("end", unpipe);
        src.removeListener("data", ondata);
        cleanedUp = true;
        if (state2.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
      }
      src.on("data", ondata);
      function ondata(chunk) {
        debug("ondata");
        var ret = dest.write(chunk);
        debug("dest.write", ret);
        if (ret === false) {
          if ((state2.pipesCount === 1 && state2.pipes === dest || state2.pipesCount > 1 && indexOf(state2.pipes, dest) !== -1) && !cleanedUp) {
            debug("false write response, pause", state2.awaitDrain);
            state2.awaitDrain++;
          }
          src.pause();
        }
      }
      function onerror(er) {
        debug("onerror", er);
        unpipe();
        dest.removeListener("error", onerror);
        if (EElistenerCount(dest, "error") === 0) errorOrDestroy(dest, er);
      }
      prependListener(dest, "error", onerror);
      function onclose() {
        dest.removeListener("finish", onfinish);
        unpipe();
      }
      dest.once("close", onclose);
      function onfinish() {
        debug("onfinish");
        dest.removeListener("close", onclose);
        unpipe();
      }
      dest.once("finish", onfinish);
      function unpipe() {
        debug("unpipe");
        src.unpipe(dest);
      }
      dest.emit("pipe", src);
      if (!state2.flowing) {
        debug("pipe resume");
        src.resume();
      }
      return dest;
    };
    function pipeOnDrain(src) {
      return function pipeOnDrainFunctionResult() {
        var state2 = src._readableState;
        debug("pipeOnDrain", state2.awaitDrain);
        if (state2.awaitDrain) state2.awaitDrain--;
        if (state2.awaitDrain === 0 && EElistenerCount(src, "data")) {
          state2.flowing = true;
          flow(src);
        }
      };
    }
    Readable.prototype.unpipe = function(dest) {
      var state2 = this._readableState;
      var unpipeInfo = {
        hasUnpiped: false
      };
      if (state2.pipesCount === 0) return this;
      if (state2.pipesCount === 1) {
        if (dest && dest !== state2.pipes) return this;
        if (!dest) dest = state2.pipes;
        state2.pipes = null;
        state2.pipesCount = 0;
        state2.flowing = false;
        if (dest) dest.emit("unpipe", this, unpipeInfo);
        return this;
      }
      if (!dest) {
        var dests = state2.pipes;
        var len = state2.pipesCount;
        state2.pipes = null;
        state2.pipesCount = 0;
        state2.flowing = false;
        for (var i5 = 0; i5 < len; i5++) dests[i5].emit("unpipe", this, {
          hasUnpiped: false
        });
        return this;
      }
      var index = indexOf(state2.pipes, dest);
      if (index === -1) return this;
      state2.pipes.splice(index, 1);
      state2.pipesCount -= 1;
      if (state2.pipesCount === 1) state2.pipes = state2.pipes[0];
      dest.emit("unpipe", this, unpipeInfo);
      return this;
    };
    Readable.prototype.on = function(ev, fn) {
      var res = Stream.prototype.on.call(this, ev, fn);
      var state2 = this._readableState;
      if (ev === "data") {
        state2.readableListening = this.listenerCount("readable") > 0;
        if (state2.flowing !== false) this.resume();
      } else if (ev === "readable") {
        if (!state2.endEmitted && !state2.readableListening) {
          state2.readableListening = state2.needReadable = true;
          state2.flowing = false;
          state2.emittedReadable = false;
          debug("on readable", state2.length, state2.reading);
          if (state2.length) {
            emitReadable(this);
          } else if (!state2.reading) {
            process.nextTick(nReadingNextTick, this);
          }
        }
      }
      return res;
    };
    Readable.prototype.addListener = Readable.prototype.on;
    Readable.prototype.removeListener = function(ev, fn) {
      var res = Stream.prototype.removeListener.call(this, ev, fn);
      if (ev === "readable") {
        process.nextTick(updateReadableListening, this);
      }
      return res;
    };
    Readable.prototype.removeAllListeners = function(ev) {
      var res = Stream.prototype.removeAllListeners.apply(this, arguments);
      if (ev === "readable" || ev === void 0) {
        process.nextTick(updateReadableListening, this);
      }
      return res;
    };
    function updateReadableListening(self2) {
      var state2 = self2._readableState;
      state2.readableListening = self2.listenerCount("readable") > 0;
      if (state2.resumeScheduled && !state2.paused) {
        state2.flowing = true;
      } else if (self2.listenerCount("data") > 0) {
        self2.resume();
      }
    }
    function nReadingNextTick(self2) {
      debug("readable nexttick read 0");
      self2.read(0);
    }
    Readable.prototype.resume = function() {
      var state2 = this._readableState;
      if (!state2.flowing) {
        debug("resume");
        state2.flowing = !state2.readableListening;
        resume(this, state2);
      }
      state2.paused = false;
      return this;
    };
    function resume(stream, state2) {
      if (!state2.resumeScheduled) {
        state2.resumeScheduled = true;
        process.nextTick(resume_, stream, state2);
      }
    }
    function resume_(stream, state2) {
      debug("resume", state2.reading);
      if (!state2.reading) {
        stream.read(0);
      }
      state2.resumeScheduled = false;
      stream.emit("resume");
      flow(stream);
      if (state2.flowing && !state2.reading) stream.read(0);
    }
    Readable.prototype.pause = function() {
      debug("call pause flowing=%j", this._readableState.flowing);
      if (this._readableState.flowing !== false) {
        debug("pause");
        this._readableState.flowing = false;
        this.emit("pause");
      }
      this._readableState.paused = true;
      return this;
    };
    function flow(stream) {
      var state2 = stream._readableState;
      debug("flow", state2.flowing);
      while (state2.flowing && stream.read() !== null) ;
    }
    Readable.prototype.wrap = function(stream) {
      var _this = this;
      var state2 = this._readableState;
      var paused = false;
      stream.on("end", function() {
        debug("wrapped end");
        if (state2.decoder && !state2.ended) {
          var chunk = state2.decoder.end();
          if (chunk && chunk.length) _this.push(chunk);
        }
        _this.push(null);
      });
      stream.on("data", function(chunk) {
        debug("wrapped data");
        if (state2.decoder) chunk = state2.decoder.write(chunk);
        if (state2.objectMode && (chunk === null || chunk === void 0)) return;
        else if (!state2.objectMode && (!chunk || !chunk.length)) return;
        var ret = _this.push(chunk);
        if (!ret) {
          paused = true;
          stream.pause();
        }
      });
      for (var i5 in stream) {
        if (this[i5] === void 0 && typeof stream[i5] === "function") {
          this[i5] = /* @__PURE__ */ (function methodWrap(method) {
            return function methodWrapReturnFunction() {
              return stream[method].apply(stream, arguments);
            };
          })(i5);
        }
      }
      for (var n2 = 0; n2 < kProxyEvents.length; n2++) {
        stream.on(kProxyEvents[n2], this.emit.bind(this, kProxyEvents[n2]));
      }
      this._read = function(n3) {
        debug("wrapped _read", n3);
        if (paused) {
          paused = false;
          stream.resume();
        }
      };
      return this;
    };
    if (typeof Symbol === "function") {
      Readable.prototype[Symbol.asyncIterator] = function() {
        if (createReadableStreamAsyncIterator === void 0) {
          createReadableStreamAsyncIterator = require_async_iterator2();
        }
        return createReadableStreamAsyncIterator(this);
      };
    }
    Object.defineProperty(Readable.prototype, "readableHighWaterMark", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._readableState.highWaterMark;
      }
    });
    Object.defineProperty(Readable.prototype, "readableBuffer", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._readableState && this._readableState.buffer;
      }
    });
    Object.defineProperty(Readable.prototype, "readableFlowing", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._readableState.flowing;
      },
      set: function set(state2) {
        if (this._readableState) {
          this._readableState.flowing = state2;
        }
      }
    });
    Readable._fromList = fromList;
    Object.defineProperty(Readable.prototype, "readableLength", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function get2() {
        return this._readableState.length;
      }
    });
    function fromList(n2, state2) {
      if (state2.length === 0) return null;
      var ret;
      if (state2.objectMode) ret = state2.buffer.shift();
      else if (!n2 || n2 >= state2.length) {
        if (state2.decoder) ret = state2.buffer.join("");
        else if (state2.buffer.length === 1) ret = state2.buffer.first();
        else ret = state2.buffer.concat(state2.length);
        state2.buffer.clear();
      } else {
        ret = state2.buffer.consume(n2, state2.decoder);
      }
      return ret;
    }
    function endReadable(stream) {
      var state2 = stream._readableState;
      debug("endReadable", state2.endEmitted);
      if (!state2.endEmitted) {
        state2.ended = true;
        process.nextTick(endReadableNT, state2, stream);
      }
    }
    function endReadableNT(state2, stream) {
      debug("endReadableNT", state2.endEmitted, state2.length);
      if (!state2.endEmitted && state2.length === 0) {
        state2.endEmitted = true;
        stream.readable = false;
        stream.emit("end");
        if (state2.autoDestroy) {
          var wState = stream._writableState;
          if (!wState || wState.autoDestroy && wState.finished) {
            stream.destroy();
          }
        }
      }
    }
    if (typeof Symbol === "function") {
      Readable.from = function(iterable, opts) {
        if (from === void 0) {
          from = require_from2();
        }
        return from(Readable, iterable, opts);
      };
    }
    function indexOf(xs, x) {
      for (var i5 = 0, l3 = xs.length; i5 < l3; i5++) {
        if (xs[i5] === x) return i5;
      }
      return -1;
    }
  }
});

// ../../node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js
var require_stream_transform2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) {
    "use strict";
    module2.exports = Transform;
    var _require$codes = require_errors2().codes;
    var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
    var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK;
    var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING;
    var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
    var Duplex = require_stream_duplex2();
    require_inherits()(Transform, Duplex);
    function afterTransform(er, data2) {
      var ts = this._transformState;
      ts.transforming = false;
      var cb = ts.writecb;
      if (cb === null) {
        return this.emit("error", new ERR_MULTIPLE_CALLBACK());
      }
      ts.writechunk = null;
      ts.writecb = null;
      if (data2 != null)
        this.push(data2);
      cb(er);
      var rs = this._readableState;
      rs.reading = false;
      if (rs.needReadable || rs.length < rs.highWaterMark) {
        this._read(rs.highWaterMark);
      }
    }
    function Transform(options) {
      if (!(this instanceof Transform)) return new Transform(options);
      Duplex.call(this, options);
      this._transformState = {
        afterTransform: afterTransform.bind(this),
        needTransform: false,
        transforming: false,
        writecb: null,
        writechunk: null,
        writeencoding: null
      };
      this._readableState.needReadable = true;
      this._readableState.sync = false;
      if (options) {
        if (typeof options.transform === "function") this._transform = options.transform;
        if (typeof options.flush === "function") this._flush = options.flush;
      }
      this.on("prefinish", prefinish);
    }
    function prefinish() {
      var _this = this;
      if (typeof this._flush === "function" && !this._readableState.destroyed) {
        this._flush(function(er, data2) {
          done(_this, er, data2);
        });
      } else {
        done(this, null, null);
      }
    }
    Transform.prototype.push = function(chunk, encoding) {
      this._transformState.needTransform = false;
      return Duplex.prototype.push.call(this, chunk, encoding);
    };
    Transform.prototype._transform = function(chunk, encoding, cb) {
      cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));
    };
    Transform.prototype._write = function(chunk, encoding, cb) {
      var ts = this._transformState;
      ts.writecb = cb;
      ts.writechunk = chunk;
      ts.writeencoding = encoding;
      if (!ts.transforming) {
        var rs = this._readableState;
        if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
      }
    };
    Transform.prototype._read = function(n2) {
      var ts = this._transformState;
      if (ts.writechunk !== null && !ts.transforming) {
        ts.transforming = true;
        this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
      } else {
        ts.needTransform = true;
      }
    };
    Transform.prototype._destroy = function(err, cb) {
      Duplex.prototype._destroy.call(this, err, function(err2) {
        cb(err2);
      });
    };
    function done(stream, er, data2) {
      if (er) return stream.emit("error", er);
      if (data2 != null)
        stream.push(data2);
      if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();
      if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
      return stream.push(null);
    }
  }
});

// ../../node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js
var require_stream_passthrough2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) {
    "use strict";
    module2.exports = PassThrough;
    var Transform = require_stream_transform2();
    require_inherits()(PassThrough, Transform);
    function PassThrough(options) {
      if (!(this instanceof PassThrough)) return new PassThrough(options);
      Transform.call(this, options);
    }
    PassThrough.prototype._transform = function(chunk, encoding, cb) {
      cb(null, chunk);
    };
  }
});

// ../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/pipeline.js
var require_pipeline2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) {
    "use strict";
    var eos;
    function once(callback) {
      var called = false;
      return function() {
        if (called) return;
        called = true;
        callback.apply(void 0, arguments);
      };
    }
    var _require$codes = require_errors2().codes;
    var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
    var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
    function noop(err) {
      if (err) throw err;
    }
    function isRequest(stream) {
      return stream.setHeader && typeof stream.abort === "function";
    }
    function destroyer(stream, reading, writing, callback) {
      callback = once(callback);
      var closed = false;
      stream.on("close", function() {
        closed = true;
      });
      if (eos === void 0) eos = require_end_of_stream2();
      eos(stream, {
        readable: reading,
        writable: writing
      }, function(err) {
        if (err) return callback(err);
        closed = true;
        callback();
      });
      var destroyed = false;
      return function(err) {
        if (closed) return;
        if (destroyed) return;
        destroyed = true;
        if (isRequest(stream)) return stream.abort();
        if (typeof stream.destroy === "function") return stream.destroy();
        callback(err || new ERR_STREAM_DESTROYED("pipe"));
      };
    }
    function call(fn) {
      fn();
    }
    function pipe(from, to) {
      return from.pipe(to);
    }
    function popCallback(streams) {
      if (!streams.length) return noop;
      if (typeof streams[streams.length - 1] !== "function") return noop;
      return streams.pop();
    }
    function pipeline() {
      for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {
        streams[_key] = arguments[_key];
      }
      var callback = popCallback(streams);
      if (Array.isArray(streams[0])) streams = streams[0];
      if (streams.length < 2) {
        throw new ERR_MISSING_ARGS("streams");
      }
      var error3;
      var destroys = streams.map(function(stream, i5) {
        var reading = i5 < streams.length - 1;
        var writing = i5 > 0;
        return destroyer(stream, reading, writing, function(err) {
          if (!error3) error3 = err;
          if (err) destroys.forEach(call);
          if (reading) return;
          destroys.forEach(call);
          callback(error3);
        });
      });
      return streams.reduce(pipe);
    }
    module2.exports = pipeline;
  }
});

// ../../node_modules/bl/node_modules/readable-stream/readable.js
var require_readable2 = __commonJS({
  "../../node_modules/bl/node_modules/readable-stream/readable.js"(exports2, module2) {
    var Stream = require("stream");
    if (process.env.READABLE_STREAM === "disable" && Stream) {
      module2.exports = Stream.Readable;
      Object.assign(module2.exports, Stream);
      module2.exports.Stream = Stream;
    } else {
      exports2 = module2.exports = require_stream_readable2();
      exports2.Stream = Stream || exports2;
      exports2.Readable = exports2;
      exports2.Writable = require_stream_writable2();
      exports2.Duplex = require_stream_duplex2();
      exports2.Transform = require_stream_transform2();
      exports2.PassThrough = require_stream_passthrough2();
      exports2.finished = require_end_of_stream2();
      exports2.pipeline = require_pipeline2();
    }
  }
});

// ../../node_modules/bl/BufferList.js
var require_BufferList = __commonJS({
  "../../node_modules/bl/BufferList.js"(exports2, module2) {
    "use strict";
    var { Buffer: Buffer2 } = require("buffer");
    var symbol = /* @__PURE__ */ Symbol.for("BufferList");
    function BufferList(buf) {
      if (!(this instanceof BufferList)) {
        return new BufferList(buf);
      }
      BufferList._init.call(this, buf);
    }
    BufferList._init = function _init(buf) {
      Object.defineProperty(this, symbol, { value: true });
      this._bufs = [];
      this.length = 0;
      if (buf) {
        this.append(buf);
      }
    };
    BufferList.prototype._new = function _new(buf) {
      return new BufferList(buf);
    };
    BufferList.prototype._offset = function _offset2(offset) {
      if (offset === 0) {
        return [0, 0];
      }
      let tot = 0;
      for (let i5 = 0; i5 < this._bufs.length; i5++) {
        const _t = tot + this._bufs[i5].length;
        if (offset < _t || i5 === this._bufs.length - 1) {
          return [i5, offset - tot];
        }
        tot = _t;
      }
    };
    BufferList.prototype._reverseOffset = function(blOffset) {
      const bufferId = blOffset[0];
      let offset = blOffset[1];
      for (let i5 = 0; i5 < bufferId; i5++) {
        offset += this._bufs[i5].length;
      }
      return offset;
    };
    BufferList.prototype.get = function get2(index) {
      if (index > this.length || index < 0) {
        return void 0;
      }
      const offset = this._offset(index);
      return this._bufs[offset[0]][offset[1]];
    };
    BufferList.prototype.slice = function slice(start, end) {
      if (typeof start === "number" && start < 0) {
        start += this.length;
      }
      if (typeof end === "number" && end < 0) {
        end += this.length;
      }
      return this.copy(null, 0, start, end);
    };
    BufferList.prototype.copy = function copy(dst, dstStart, srcStart, srcEnd) {
      if (typeof srcStart !== "number" || srcStart < 0) {
        srcStart = 0;
      }
      if (typeof srcEnd !== "number" || srcEnd > this.length) {
        srcEnd = this.length;
      }
      if (srcStart >= this.length) {
        return dst || Buffer2.alloc(0);
      }
      if (srcEnd <= 0) {
        return dst || Buffer2.alloc(0);
      }
      const copy2 = !!dst;
      const off = this._offset(srcStart);
      const len = srcEnd - srcStart;
      let bytes = len;
      let bufoff = copy2 && dstStart || 0;
      let start = off[1];
      if (srcStart === 0 && srcEnd === this.length) {
        if (!copy2) {
          return this._bufs.length === 1 ? this._bufs[0] : Buffer2.concat(this._bufs, this.length);
        }
        for (let i5 = 0; i5 < this._bufs.length; i5++) {
          this._bufs[i5].copy(dst, bufoff);
          bufoff += this._bufs[i5].length;
        }
        return dst;
      }
      if (bytes <= this._bufs[off[0]].length - start) {
        return copy2 ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) : this._bufs[off[0]].slice(start, start + bytes);
      }
      if (!copy2) {
        dst = Buffer2.allocUnsafe(len);
      }
      for (let i5 = off[0]; i5 < this._bufs.length; i5++) {
        const l3 = this._bufs[i5].length - start;
        if (bytes > l3) {
          this._bufs[i5].copy(dst, bufoff, start);
          bufoff += l3;
        } else {
          this._bufs[i5].copy(dst, bufoff, start, start + bytes);
          bufoff += l3;
          break;
        }
        bytes -= l3;
        if (start) {
          start = 0;
        }
      }
      if (dst.length > bufoff) return dst.slice(0, bufoff);
      return dst;
    };
    BufferList.prototype.shallowSlice = function shallowSlice(start, end) {
      start = start || 0;
      end = typeof end !== "number" ? this.length : end;
      if (start < 0) {
        start += this.length;
      }
      if (end < 0) {
        end += this.length;
      }
      if (start === end) {
        return this._new();
      }
      const startOffset = this._offset(start);
      const endOffset = this._offset(end);
      const buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1);
      if (endOffset[1] === 0) {
        buffers.pop();
      } else {
        buffers[buffers.length - 1] = buffers[buffers.length - 1].slice(0, endOffset[1]);
      }
      if (startOffset[1] !== 0) {
        buffers[0] = buffers[0].slice(startOffset[1]);
      }
      return this._new(buffers);
    };
    BufferList.prototype.toString = function toString(encoding, start, end) {
      return this.slice(start, end).toString(encoding);
    };
    BufferList.prototype.consume = function consume(bytes) {
      bytes = Math.trunc(bytes);
      if (Number.isNaN(bytes) || bytes <= 0) return this;
      while (this._bufs.length) {
        if (bytes >= this._bufs[0].length) {
          bytes -= this._bufs[0].length;
          this.length -= this._bufs[0].length;
          this._bufs.shift();
        } else {
          this._bufs[0] = this._bufs[0].slice(bytes);
          this.length -= bytes;
          break;
        }
      }
      return this;
    };
    BufferList.prototype.duplicate = function duplicate() {
      const copy = this._new();
      for (let i5 = 0; i5 < this._bufs.length; i5++) {
        copy.append(this._bufs[i5]);
      }
      return copy;
    };
    BufferList.prototype.append = function append(buf) {
      if (buf == null) {
        return this;
      }
      if (buf.buffer) {
        this._appendBuffer(Buffer2.from(buf.buffer, buf.byteOffset, buf.byteLength));
      } else if (Array.isArray(buf)) {
        for (let i5 = 0; i5 < buf.length; i5++) {
          this.append(buf[i5]);
        }
      } else if (this._isBufferList(buf)) {
        for (let i5 = 0; i5 < buf._bufs.length; i5++) {
          this.append(buf._bufs[i5]);
        }
      } else {
        if (typeof buf === "number") {
          buf = buf.toString();
        }
        this._appendBuffer(Buffer2.from(buf));
      }
      return this;
    };
    BufferList.prototype._appendBuffer = function appendBuffer(buf) {
      this._bufs.push(buf);
      this.length += buf.length;
    };
    BufferList.prototype.indexOf = function(search, offset, encoding) {
      if (encoding === void 0 && typeof offset === "string") {
        encoding = offset;
        offset = void 0;
      }
      if (typeof search === "function" || Array.isArray(search)) {
        throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');
      } else if (typeof search === "number") {
        search = Buffer2.from([search]);
      } else if (typeof search === "string") {
        search = Buffer2.from(search, encoding);
      } else if (this._isBufferList(search)) {
        search = search.slice();
      } else if (Array.isArray(search.buffer)) {
        search = Buffer2.from(search.buffer, search.byteOffset, search.byteLength);
      } else if (!Buffer2.isBuffer(search)) {
        search = Buffer2.from(search);
      }
      offset = Number(offset || 0);
      if (isNaN(offset)) {
        offset = 0;
      }
      if (offset < 0) {
        offset = this.length + offset;
      }
      if (offset < 0) {
        offset = 0;
      }
      if (search.length === 0) {
        return offset > this.length ? this.length : offset;
      }
      const blOffset = this._offset(offset);
      let blIndex = blOffset[0];
      let buffOffset = blOffset[1];
      for (; blIndex < this._bufs.length; blIndex++) {
        const buff = this._bufs[blIndex];
        while (buffOffset < buff.length) {
          const availableWindow = buff.length - buffOffset;
          if (availableWindow >= search.length) {
            const nativeSearchResult = buff.indexOf(search, buffOffset);
            if (nativeSearchResult !== -1) {
              return this._reverseOffset([blIndex, nativeSearchResult]);
            }
            buffOffset = buff.length - search.length + 1;
          } else {
            const revOffset = this._reverseOffset([blIndex, buffOffset]);
            if (this._match(revOffset, search)) {
              return revOffset;
            }
            buffOffset++;
          }
        }
        buffOffset = 0;
      }
      return -1;
    };
    BufferList.prototype._match = function(offset, search) {
      if (this.length - offset < search.length) {
        return false;
      }
      for (let searchOffset = 0; searchOffset < search.length; searchOffset++) {
        if (this.get(offset + searchOffset) !== search[searchOffset]) {
          return false;
        }
      }
      return true;
    };
    (function() {
      const methods = {
        readDoubleBE: 8,
        readDoubleLE: 8,
        readFloatBE: 4,
        readFloatLE: 4,
        readInt32BE: 4,
        readInt32LE: 4,
        readUInt32BE: 4,
        readUInt32LE: 4,
        readInt16BE: 2,
        readInt16LE: 2,
        readUInt16BE: 2,
        readUInt16LE: 2,
        readInt8: 1,
        readUInt8: 1,
        readIntBE: null,
        readIntLE: null,
        readUIntBE: null,
        readUIntLE: null
      };
      for (const m3 in methods) {
        (function(m4) {
          if (methods[m4] === null) {
            BufferList.prototype[m4] = function(offset, byteLength) {
              return this.slice(offset, offset + byteLength)[m4](0, byteLength);
            };
          } else {
            BufferList.prototype[m4] = function(offset = 0) {
              return this.slice(offset, offset + methods[m4])[m4](0);
            };
          }
        })(m3);
      }
    })();
    BufferList.prototype._isBufferList = function _isBufferList(b5) {
      return b5 instanceof BufferList || BufferList.isBufferList(b5);
    };
    BufferList.isBufferList = function isBufferList(b5) {
      return b5 != null && b5[symbol];
    };
    module2.exports = BufferList;
  }
});

// ../../node_modules/bl/bl.js
var require_bl = __commonJS({
  "../../node_modules/bl/bl.js"(exports2, module2) {
    "use strict";
    var DuplexStream = require_readable2().Duplex;
    var inherits = require_inherits();
    var BufferList = require_BufferList();
    function BufferListStream(callback) {
      if (!(this instanceof BufferListStream)) {
        return new BufferListStream(callback);
      }
      if (typeof callback === "function") {
        this._callback = callback;
        const piper = function piper2(err) {
          if (this._callback) {
            this._callback(err);
            this._callback = null;
          }
        }.bind(this);
        this.on("pipe", function onPipe(src) {
          src.on("error", piper);
        });
        this.on("unpipe", function onUnpipe(src) {
          src.removeListener("error", piper);
        });
        callback = null;
      }
      BufferList._init.call(this, callback);
      DuplexStream.call(this);
    }
    inherits(BufferListStream, DuplexStream);
    Object.assign(BufferListStream.prototype, BufferList.prototype);
    BufferListStream.prototype._new = function _new(callback) {
      return new BufferListStream(callback);
    };
    BufferListStream.prototype._write = function _write(buf, encoding, callback) {
      this._appendBuffer(buf);
      if (typeof callback === "function") {
        callback();
      }
    };
    BufferListStream.prototype._read = function _read(size) {
      if (!this.length) {
        return this.push(null);
      }
      size = Math.min(size, this.length);
      this.push(this.slice(0, size));
      this.consume(size);
    };
    BufferListStream.prototype.end = function end(chunk) {
      DuplexStream.prototype.end.call(this, chunk);
      if (this._callback) {
        this._callback(null, this.slice());
        this._callback = null;
      }
    };
    BufferListStream.prototype._destroy = function _destroy(err, cb) {
      this._bufs.length = 0;
      this.length = 0;
      cb(err);
    };
    BufferListStream.prototype._isBufferList = function _isBufferList(b5) {
      return b5 instanceof BufferListStream || b5 instanceof BufferList || BufferListStream.isBufferList(b5);
    };
    BufferListStream.isBufferList = BufferList.isBufferList;
    module2.exports = BufferListStream;
    module2.exports.BufferListStream = BufferListStream;
    module2.exports.BufferList = BufferList;
  }
});

// ../../node_modules/mqtt-packet/packet.js
var require_packet = __commonJS({
  "../../node_modules/mqtt-packet/packet.js"(exports2, module2) {
    var Packet = class {
      constructor() {
        this.cmd = null;
        this.retain = false;
        this.qos = 0;
        this.dup = false;
        this.length = -1;
        this.topic = null;
        this.payload = null;
      }
    };
    module2.exports = Packet;
  }
});

// ../../node_modules/mqtt-packet/constants.js
var require_constants = __commonJS({
  "../../node_modules/mqtt-packet/constants.js"(exports2, module2) {
    var protocol = module2.exports;
    protocol.types = {
      0: "reserved",
      1: "connect",
      2: "connack",
      3: "publish",
      4: "puback",
      5: "pubrec",
      6: "pubrel",
      7: "pubcomp",
      8: "subscribe",
      9: "suback",
      10: "unsubscribe",
      11: "unsuback",
      12: "pingreq",
      13: "pingresp",
      14: "disconnect",
      15: "auth"
    };
    protocol.codes = {};
    for (const k5 in protocol.types) {
      const v = protocol.types[k5];
      protocol.codes[v] = k5;
    }
    protocol.CMD_SHIFT = 4;
    protocol.CMD_MASK = 240;
    protocol.DUP_MASK = 8;
    protocol.QOS_MASK = 3;
    protocol.QOS_SHIFT = 1;
    protocol.RETAIN_MASK = 1;
    protocol.VARBYTEINT_MASK = 127;
    protocol.VARBYTEINT_FIN_MASK = 128;
    protocol.VARBYTEINT_MAX = 268435455;
    protocol.SESSIONPRESENT_MASK = 1;
    protocol.SESSIONPRESENT_HEADER = Buffer.from([protocol.SESSIONPRESENT_MASK]);
    protocol.CONNACK_HEADER = Buffer.from([protocol.codes.connack << protocol.CMD_SHIFT]);
    protocol.USERNAME_MASK = 128;
    protocol.PASSWORD_MASK = 64;
    protocol.WILL_RETAIN_MASK = 32;
    protocol.WILL_QOS_MASK = 24;
    protocol.WILL_QOS_SHIFT = 3;
    protocol.WILL_FLAG_MASK = 4;
    protocol.CLEAN_SESSION_MASK = 2;
    protocol.CONNECT_HEADER = Buffer.from([protocol.codes.connect << protocol.CMD_SHIFT]);
    protocol.properties = {
      sessionExpiryInterval: 17,
      willDelayInterval: 24,
      receiveMaximum: 33,
      maximumPacketSize: 39,
      topicAliasMaximum: 34,
      requestResponseInformation: 25,
      requestProblemInformation: 23,
      userProperties: 38,
      authenticationMethod: 21,
      authenticationData: 22,
      payloadFormatIndicator: 1,
      messageExpiryInterval: 2,
      contentType: 3,
      responseTopic: 8,
      correlationData: 9,
      maximumQoS: 36,
      retainAvailable: 37,
      assignedClientIdentifier: 18,
      reasonString: 31,
      wildcardSubscriptionAvailable: 40,
      subscriptionIdentifiersAvailable: 41,
      sharedSubscriptionAvailable: 42,
      serverKeepAlive: 19,
      responseInformation: 26,
      serverReference: 28,
      topicAlias: 35,
      subscriptionIdentifier: 11
    };
    protocol.propertiesCodes = {};
    for (const prop in protocol.properties) {
      const id = protocol.properties[prop];
      protocol.propertiesCodes[id] = prop;
    }
    protocol.propertiesTypes = {
      sessionExpiryInterval: "int32",
      willDelayInterval: "int32",
      receiveMaximum: "int16",
      maximumPacketSize: "int32",
      topicAliasMaximum: "int16",
      requestResponseInformation: "byte",
      requestProblemInformation: "byte",
      userProperties: "pair",
      authenticationMethod: "string",
      authenticationData: "binary",
      payloadFormatIndicator: "byte",
      messageExpiryInterval: "int32",
      contentType: "string",
      responseTopic: "string",
      correlationData: "binary",
      maximumQoS: "int8",
      retainAvailable: "byte",
      assignedClientIdentifier: "string",
      reasonString: "string",
      wildcardSubscriptionAvailable: "byte",
      subscriptionIdentifiersAvailable: "byte",
      sharedSubscriptionAvailable: "byte",
      serverKeepAlive: "int16",
      responseInformation: "string",
      serverReference: "string",
      topicAlias: "int16",
      subscriptionIdentifier: "var"
    };
    function genHeader(type) {
      return [0, 1, 2].map((qos) => {
        return [0, 1].map((dup) => {
          return [0, 1].map((retain) => {
            const buf = Buffer.alloc(1);
            buf.writeUInt8(
              protocol.codes[type] << protocol.CMD_SHIFT | (dup ? protocol.DUP_MASK : 0) | qos << protocol.QOS_SHIFT | retain,
              0,
              true
            );
            return buf;
          });
        });
      });
    }
    protocol.PUBLISH_HEADER = genHeader("publish");
    protocol.SUBSCRIBE_HEADER = genHeader("subscribe");
    protocol.SUBSCRIBE_OPTIONS_QOS_MASK = 3;
    protocol.SUBSCRIBE_OPTIONS_NL_MASK = 1;
    protocol.SUBSCRIBE_OPTIONS_NL_SHIFT = 2;
    protocol.SUBSCRIBE_OPTIONS_RAP_MASK = 1;
    protocol.SUBSCRIBE_OPTIONS_RAP_SHIFT = 3;
    protocol.SUBSCRIBE_OPTIONS_RH_MASK = 3;
    protocol.SUBSCRIBE_OPTIONS_RH_SHIFT = 4;
    protocol.SUBSCRIBE_OPTIONS_RH = [0, 16, 32];
    protocol.SUBSCRIBE_OPTIONS_NL = 4;
    protocol.SUBSCRIBE_OPTIONS_RAP = 8;
    protocol.SUBSCRIBE_OPTIONS_QOS = [0, 1, 2];
    protocol.UNSUBSCRIBE_HEADER = genHeader("unsubscribe");
    protocol.ACKS = {
      unsuback: genHeader("unsuback"),
      puback: genHeader("puback"),
      pubcomp: genHeader("pubcomp"),
      pubrel: genHeader("pubrel"),
      pubrec: genHeader("pubrec")
    };
    protocol.SUBACK_HEADER = Buffer.from([protocol.codes.suback << protocol.CMD_SHIFT]);
    protocol.VERSION3 = Buffer.from([3]);
    protocol.VERSION4 = Buffer.from([4]);
    protocol.VERSION5 = Buffer.from([5]);
    protocol.VERSION131 = Buffer.from([131]);
    protocol.VERSION132 = Buffer.from([132]);
    protocol.QOS = [0, 1, 2].map((qos) => {
      return Buffer.from([qos]);
    });
    protocol.EMPTY = {
      pingreq: Buffer.from([protocol.codes.pingreq << 4, 0]),
      pingresp: Buffer.from([protocol.codes.pingresp << 4, 0]),
      disconnect: Buffer.from([protocol.codes.disconnect << 4, 0])
    };
  }
});

// ../../node_modules/ms/index.js
var require_ms = __commonJS({
  "../../node_modules/ms/index.js"(exports2, module2) {
    var s = 1e3;
    var m3 = s * 60;
    var h5 = m3 * 60;
    var d5 = h5 * 24;
    var w = d5 * 7;
    var y = d5 * 365.25;
    module2.exports = function(val, options) {
      options = options || {};
      var type = typeof val;
      if (type === "string" && val.length > 0) {
        return parse(val);
      } else if (type === "number" && isFinite(val)) {
        return options.long ? fmtLong(val) : fmtShort(val);
      }
      throw new Error(
        "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
      );
    };
    function parse(str) {
      str = String(str);
      if (str.length > 100) {
        return;
      }
      var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
        str
      );
      if (!match) {
        return;
      }
      var n2 = parseFloat(match[1]);
      var type = (match[2] || "ms").toLowerCase();
      switch (type) {
        case "years":
        case "year":
        case "yrs":
        case "yr":
        case "y":
          return n2 * y;
        case "weeks":
        case "week":
        case "w":
          return n2 * w;
        case "days":
        case "day":
        case "d":
          return n2 * d5;
        case "hours":
        case "hour":
        case "hrs":
        case "hr":
        case "h":
          return n2 * h5;
        case "minutes":
        case "minute":
        case "mins":
        case "min":
        case "m":
          return n2 * m3;
        case "seconds":
        case "second":
        case "secs":
        case "sec":
        case "s":
          return n2 * s;
        case "milliseconds":
        case "millisecond":
        case "msecs":
        case "msec":
        case "ms":
          return n2;
        default:
          return void 0;
      }
    }
    function fmtShort(ms) {
      var msAbs = Math.abs(ms);
      if (msAbs >= d5) {
        return Math.round(ms / d5) + "d";
      }
      if (msAbs >= h5) {
        return Math.round(ms / h5) + "h";
      }
      if (msAbs >= m3) {
        return Math.round(ms / m3) + "m";
      }
      if (msAbs >= s) {
        return Math.round(ms / s) + "s";
      }
      return ms + "ms";
    }
    function fmtLong(ms) {
      var msAbs = Math.abs(ms);
      if (msAbs >= d5) {
        return plural(ms, msAbs, d5, "day");
      }
      if (msAbs >= h5) {
        return plural(ms, msAbs, h5, "hour");
      }
      if (msAbs >= m3) {
        return plural(ms, msAbs, m3, "minute");
      }
      if (msAbs >= s) {
        return plural(ms, msAbs, s, "second");
      }
      return ms + " ms";
    }
    function plural(ms, msAbs, n2, name) {
      var isPlural = msAbs >= n2 * 1.5;
      return Math.round(ms / n2) + " " + name + (isPlural ? "s" : "");
    }
  }
});

// ../../node_modules/debug/src/common.js
var require_common = __commonJS({
  "../../node_modules/debug/src/common.js"(exports2, module2) {
    function setup(env2) {
      createDebug.debug = createDebug;
      createDebug.default = createDebug;
      createDebug.coerce = coerce;
      createDebug.disable = disable;
      createDebug.enable = enable;
      createDebug.enabled = enabled;
      createDebug.humanize = require_ms();
      createDebug.destroy = destroy;
      Object.keys(env2).forEach((key) => {
        createDebug[key] = env2[key];
      });
      createDebug.names = [];
      createDebug.skips = [];
      createDebug.formatters = {};
      function selectColor(namespace) {
        let hash = 0;
        for (let i5 = 0; i5 < namespace.length; i5++) {
          hash = (hash << 5) - hash + namespace.charCodeAt(i5);
          hash |= 0;
        }
        return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
      }
      createDebug.selectColor = selectColor;
      function createDebug(namespace) {
        let prevTime;
        let enableOverride = null;
        let namespacesCache;
        let enabledCache;
        function debug(...args) {
          if (!debug.enabled) {
            return;
          }
          const self2 = debug;
          const curr = Number(/* @__PURE__ */ new Date());
          const ms = curr - (prevTime || curr);
          self2.diff = ms;
          self2.prev = prevTime;
          self2.curr = curr;
          prevTime = curr;
          args[0] = createDebug.coerce(args[0]);
          if (typeof args[0] !== "string") {
            args.unshift("%O");
          }
          let index = 0;
          args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format2) => {
            if (match === "%%") {
              return "%";
            }
            index++;
            const formatter = createDebug.formatters[format2];
            if (typeof formatter === "function") {
              const val = args[index];
              match = formatter.call(self2, val);
              args.splice(index, 1);
              index--;
            }
            return match;
          });
          createDebug.formatArgs.call(self2, args);
          const logFn = self2.log || createDebug.log;
          logFn.apply(self2, args);
        }
        debug.namespace = namespace;
        debug.useColors = createDebug.useColors();
        debug.color = createDebug.selectColor(namespace);
        debug.extend = extend;
        debug.destroy = createDebug.destroy;
        Object.defineProperty(debug, "enabled", {
          enumerable: true,
          configurable: false,
          get: () => {
            if (enableOverride !== null) {
              return enableOverride;
            }
            if (namespacesCache !== createDebug.namespaces) {
              namespacesCache = createDebug.namespaces;
              enabledCache = createDebug.enabled(namespace);
            }
            return enabledCache;
          },
          set: (v) => {
            enableOverride = v;
          }
        });
        if (typeof createDebug.init === "function") {
          createDebug.init(debug);
        }
        return debug;
      }
      function extend(namespace, delimiter) {
        const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
        newDebug.log = this.log;
        return newDebug;
      }
      function enable(namespaces) {
        createDebug.save(namespaces);
        createDebug.namespaces = namespaces;
        createDebug.names = [];
        createDebug.skips = [];
        const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
        for (const ns of split) {
          if (ns[0] === "-") {
            createDebug.skips.push(ns.slice(1));
          } else {
            createDebug.names.push(ns);
          }
        }
      }
      function matchesTemplate(search, template) {
        let searchIndex = 0;
        let templateIndex = 0;
        let starIndex = -1;
        let matchIndex = 0;
        while (searchIndex < search.length) {
          if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
            if (template[templateIndex] === "*") {
              starIndex = templateIndex;
              matchIndex = searchIndex;
              templateIndex++;
            } else {
              searchIndex++;
              templateIndex++;
            }
          } else if (starIndex !== -1) {
            templateIndex = starIndex + 1;
            matchIndex++;
            searchIndex = matchIndex;
          } else {
            return false;
          }
        }
        while (templateIndex < template.length && template[templateIndex] === "*") {
          templateIndex++;
        }
        return templateIndex === template.length;
      }
      function disable() {
        const namespaces = [
          ...createDebug.names,
          ...createDebug.skips.map((namespace) => "-" + namespace)
        ].join(",");
        createDebug.enable("");
        return namespaces;
      }
      function enabled(name) {
        for (const skip of createDebug.skips) {
          if (matchesTemplate(name, skip)) {
            return false;
          }
        }
        for (const ns of createDebug.names) {
          if (matchesTemplate(name, ns)) {
            return true;
          }
        }
        return false;
      }
      function coerce(val) {
        if (val instanceof Error) {
          return val.stack || val.message;
        }
        return val;
      }
      function destroy() {
        console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
      }
      createDebug.enable(createDebug.load());
      return createDebug;
    }
    module2.exports = setup;
  }
});

// ../../node_modules/debug/src/browser.js
var require_browser = __commonJS({
  "../../node_modules/debug/src/browser.js"(exports2, module2) {
    exports2.formatArgs = formatArgs;
    exports2.save = save;
    exports2.load = load;
    exports2.useColors = useColors;
    exports2.storage = localstorage();
    exports2.destroy = /* @__PURE__ */ (() => {
      let warned = false;
      return () => {
        if (!warned) {
          warned = true;
          console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
        }
      };
    })();
    exports2.colors = [
      "#0000CC",
      "#0000FF",
      "#0033CC",
      "#0033FF",
      "#0066CC",
      "#0066FF",
      "#0099CC",
      "#0099FF",
      "#00CC00",
      "#00CC33",
      "#00CC66",
      "#00CC99",
      "#00CCCC",
      "#00CCFF",
      "#3300CC",
      "#3300FF",
      "#3333CC",
      "#3333FF",
      "#3366CC",
      "#3366FF",
      "#3399CC",
      "#3399FF",
      "#33CC00",
      "#33CC33",
      "#33CC66",
      "#33CC99",
      "#33CCCC",
      "#33CCFF",
      "#6600CC",
      "#6600FF",
      "#6633CC",
      "#6633FF",
      "#66CC00",
      "#66CC33",
      "#9900CC",
      "#9900FF",
      "#9933CC",
      "#9933FF",
      "#99CC00",
      "#99CC33",
      "#CC0000",
      "#CC0033",
      "#CC0066",
      "#CC0099",
      "#CC00CC",
      "#CC00FF",
      "#CC3300",
      "#CC3333",
      "#CC3366",
      "#CC3399",
      "#CC33CC",
      "#CC33FF",
      "#CC6600",
      "#CC6633",
      "#CC9900",
      "#CC9933",
      "#CCCC00",
      "#CCCC33",
      "#FF0000",
      "#FF0033",
      "#FF0066",
      "#FF0099",
      "#FF00CC",
      "#FF00FF",
      "#FF3300",
      "#FF3333",
      "#FF3366",
      "#FF3399",
      "#FF33CC",
      "#FF33FF",
      "#FF6600",
      "#FF6633",
      "#FF9900",
      "#FF9933",
      "#FFCC00",
      "#FFCC33"
    ];
    function useColors() {
      if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
        return true;
      }
      if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
        return false;
      }
      let m3;
      return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
      typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
      // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
      typeof navigator !== "undefined" && navigator.userAgent && (m3 = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m3[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
      typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
    }
    function formatArgs(args) {
      args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
      if (!this.useColors) {
        return;
      }
      const c5 = "color: " + this.color;
      args.splice(1, 0, c5, "color: inherit");
      let index = 0;
      let lastC = 0;
      args[0].replace(/%[a-zA-Z%]/g, (match) => {
        if (match === "%%") {
          return;
        }
        index++;
        if (match === "%c") {
          lastC = index;
        }
      });
      args.splice(lastC, 0, c5);
    }
    exports2.log = console.debug || console.log || (() => {
    });
    function save(namespaces) {
      try {
        if (namespaces) {
          exports2.storage.setItem("debug", namespaces);
        } else {
          exports2.storage.removeItem("debug");
        }
      } catch (error3) {
      }
    }
    function load() {
      let r5;
      try {
        r5 = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
      } catch (error3) {
      }
      if (!r5 && typeof process !== "undefined" && "env" in process) {
        r5 = process.env.DEBUG;
      }
      return r5;
    }
    function localstorage() {
      try {
        return localStorage;
      } catch (error3) {
      }
    }
    module2.exports = require_common()(exports2);
    var { formatters } = module2.exports;
    formatters.j = function(v) {
      try {
        return JSON.stringify(v);
      } catch (error3) {
        return "[UnexpectedJSONParseError]: " + error3.message;
      }
    };
  }
});

// ../../node_modules/has-flag/index.js
var require_has_flag = __commonJS({
  "../../node_modules/has-flag/index.js"(exports2, module2) {
    "use strict";
    module2.exports = (flag, argv = process.argv) => {
      const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
      const position = argv.indexOf(prefix + flag);
      const terminatorPosition = argv.indexOf("--");
      return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
    };
  }
});

// ../../node_modules/supports-color/index.js
var require_supports_color = __commonJS({
  "../../node_modules/supports-color/index.js"(exports2, module2) {
    "use strict";
    var os2 = require("os");
    var tty2 = require("tty");
    var hasFlag2 = require_has_flag();
    var { env: env2 } = process;
    var flagForceColor2;
    if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
      flagForceColor2 = 0;
    } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
      flagForceColor2 = 1;
    }
    function envForceColor2() {
      if ("FORCE_COLOR" in env2) {
        if (env2.FORCE_COLOR === "true") {
          return 1;
        }
        if (env2.FORCE_COLOR === "false") {
          return 0;
        }
        return env2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3);
      }
    }
    function translateLevel2(level) {
      if (level === 0) {
        return false;
      }
      return {
        level,
        hasBasic: true,
        has256: level >= 2,
        has16m: level >= 3
      };
    }
    function supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
      const noFlagForceColor = envForceColor2();
      if (noFlagForceColor !== void 0) {
        flagForceColor2 = noFlagForceColor;
      }
      const forceColor = sniffFlags ? flagForceColor2 : noFlagForceColor;
      if (forceColor === 0) {
        return 0;
      }
      if (sniffFlags) {
        if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
          return 3;
        }
        if (hasFlag2("color=256")) {
          return 2;
        }
      }
      if (haveStream && !streamIsTTY && forceColor === void 0) {
        return 0;
      }
      const min = forceColor || 0;
      if (env2.TERM === "dumb") {
        return min;
      }
      if (process.platform === "win32") {
        const osRelease = os2.release().split(".");
        if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
          return Number(osRelease[2]) >= 14931 ? 3 : 2;
        }
        return 1;
      }
      if ("CI" in env2) {
        if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
          return 1;
        }
        return min;
      }
      if ("TEAMCITY_VERSION" in env2) {
        return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
      }
      if (env2.COLORTERM === "truecolor") {
        return 3;
      }
      if ("TERM_PROGRAM" in env2) {
        const version = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
        switch (env2.TERM_PROGRAM) {
          case "iTerm.app":
            return version >= 3 ? 3 : 2;
          case "Apple_Terminal":
            return 2;
        }
      }
      if (/-256(color)?$/i.test(env2.TERM)) {
        return 2;
      }
      if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
        return 1;
      }
      if ("COLORTERM" in env2) {
        return 1;
      }
      return min;
    }
    function getSupportLevel(stream, options = {}) {
      const level = supportsColor2(stream, {
        streamIsTTY: stream && stream.isTTY,
        ...options
      });
      return translateLevel2(level);
    }
    module2.exports = {
      supportsColor: getSupportLevel,
      stdout: getSupportLevel({ isTTY: tty2.isatty(1) }),
      stderr: getSupportLevel({ isTTY: tty2.isatty(2) })
    };
  }
});

// ../../node_modules/debug/src/node.js
var require_node2 = __commonJS({
  "../../node_modules/debug/src/node.js"(exports2, module2) {
    var tty2 = require("tty");
    var util = require("util");
    exports2.init = init;
    exports2.log = log2;
    exports2.formatArgs = formatArgs;
    exports2.save = save;
    exports2.load = load;
    exports2.useColors = useColors;
    exports2.destroy = util.deprecate(
      () => {
      },
      "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
    );
    exports2.colors = [6, 2, 3, 4, 5, 1];
    try {
      const supportsColor2 = require_supports_color();
      if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
        exports2.colors = [
          20,
          21,
          26,
          27,
          32,
          33,
          38,
          39,
          40,
          41,
          42,
          43,
          44,
          45,
          56,
          57,
          62,
          63,
          68,
          69,
          74,
          75,
          76,
          77,
          78,
          79,
          80,
          81,
          92,
          93,
          98,
          99,
          112,
          113,
          128,
          129,
          134,
          135,
          148,
          149,
          160,
          161,
          162,
          163,
          164,
          165,
          166,
          167,
          168,
          169,
          170,
          171,
          172,
          173,
          178,
          179,
          184,
          185,
          196,
          197,
          198,
          199,
          200,
          201,
          202,
          203,
          204,
          205,
          206,
          207,
          208,
          209,
          214,
          215,
          220,
          221
        ];
      }
    } catch (error3) {
    }
    exports2.inspectOpts = Object.keys(process.env).filter((key) => {
      return /^debug_/i.test(key);
    }).reduce((obj, key) => {
      const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k5) => {
        return k5.toUpperCase();
      });
      let val = process.env[key];
      if (/^(yes|on|true|enabled)$/i.test(val)) {
        val = true;
      } else if (/^(no|off|false|disabled)$/i.test(val)) {
        val = false;
      } else if (val === "null") {
        val = null;
      } else {
        val = Number(val);
      }
      obj[prop] = val;
      return obj;
    }, {});
    function useColors() {
      return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
    }
    function formatArgs(args) {
      const { namespace: name, useColors: useColors2 } = this;
      if (useColors2) {
        const c5 = this.color;
        const colorCode = "\x1B[3" + (c5 < 8 ? c5 : "8;5;" + c5);
        const prefix = `  ${colorCode};1m${name} \x1B[0m`;
        args[0] = prefix + args[0].split("\n").join("\n" + prefix);
        args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
      } else {
        args[0] = getDate() + name + " " + args[0];
      }
    }
    function getDate() {
      if (exports2.inspectOpts.hideDate) {
        return "";
      }
      return (/* @__PURE__ */ new Date()).toISOString() + " ";
    }
    function log2(...args) {
      return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
    }
    function save(namespaces) {
      if (namespaces) {
        process.env.DEBUG = namespaces;
      } else {
        delete process.env.DEBUG;
      }
    }
    function load() {
      return process.env.DEBUG;
    }
    function init(debug) {
      debug.inspectOpts = {};
      const keys = Object.keys(exports2.inspectOpts);
      for (let i5 = 0; i5 < keys.length; i5++) {
        debug.inspectOpts[keys[i5]] = exports2.inspectOpts[keys[i5]];
      }
    }
    module2.exports = require_common()(exports2);
    var { formatters } = module2.exports;
    formatters.o = function(v) {
      this.inspectOpts.colors = this.useColors;
      return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
    };
    formatters.O = function(v) {
      this.inspectOpts.colors = this.useColors;
      return util.inspect(v, this.inspectOpts);
    };
  }
});

// ../../node_modules/debug/src/index.js
var require_src = __commonJS({
  "../../node_modules/debug/src/index.js"(exports2, module2) {
    if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
      module2.exports = require_browser();
    } else {
      module2.exports = require_node2();
    }
  }
});

// ../../node_modules/mqtt-packet/parser.js
var require_parser = __commonJS({
  "../../node_modules/mqtt-packet/parser.js"(exports2, module2) {
    var bl = require_bl();
    var EventEmitter = require("events");
    var Packet = require_packet();
    var constants = require_constants();
    var debug = require_src()("mqtt-packet:parser");
    var Parser = class _Parser extends EventEmitter {
      constructor() {
        super();
        this.parser = this.constructor.parser;
      }
      static parser(opt) {
        if (!(this instanceof _Parser)) return new _Parser().parser(opt);
        this.settings = opt || {};
        this._states = [
          "_parseHeader",
          "_parseLength",
          "_parsePayload",
          "_newPacket"
        ];
        this._resetState();
        return this;
      }
      _resetState() {
        debug("_resetState: resetting packet, error, _list, and _stateCounter");
        this.packet = new Packet();
        this.error = null;
        this._list = bl();
        this._stateCounter = 0;
      }
      parse(buf) {
        if (this.error) this._resetState();
        this._list.append(buf);
        debug("parse: current state: %s", this._states[this._stateCounter]);
        while ((this.packet.length !== -1 || this._list.length > 0) && this[this._states[this._stateCounter]]() && !this.error) {
          this._stateCounter++;
          debug("parse: state complete. _stateCounter is now: %d", this._stateCounter);
          debug("parse: packet.length: %d, buffer list length: %d", this.packet.length, this._list.length);
          if (this._stateCounter >= this._states.length) this._stateCounter = 0;
        }
        debug("parse: exited while loop. packet: %d, buffer list length: %d", this.packet.length, this._list.length);
        return this._list.length;
      }
      _parseHeader() {
        const zero = this._list.readUInt8(0);
        this.packet.cmd = constants.types[zero >> constants.CMD_SHIFT];
        this.packet.retain = (zero & constants.RETAIN_MASK) !== 0;
        this.packet.qos = zero >> constants.QOS_SHIFT & constants.QOS_MASK;
        this.packet.dup = (zero & constants.DUP_MASK) !== 0;
        debug("_parseHeader: packet: %o", this.packet);
        this._list.consume(1);
        return true;
      }
      _parseLength() {
        const result = this._parseVarByteNum(true);
        if (result) {
          this.packet.length = result.value;
          this._list.consume(result.bytes);
        }
        debug("_parseLength %d", result.value);
        return !!result;
      }
      _parsePayload() {
        debug("_parsePayload: payload %O", this._list);
        let result = false;
        if (this.packet.length === 0 || this._list.length >= this.packet.length) {
          this._pos = 0;
          switch (this.packet.cmd) {
            case "connect":
              this._parseConnect();
              break;
            case "connack":
              this._parseConnack();
              break;
            case "publish":
              this._parsePublish();
              break;
            case "puback":
            case "pubrec":
            case "pubrel":
            case "pubcomp":
              this._parseConfirmation();
              break;
            case "subscribe":
              this._parseSubscribe();
              break;
            case "suback":
              this._parseSuback();
              break;
            case "unsubscribe":
              this._parseUnsubscribe();
              break;
            case "unsuback":
              this._parseUnsuback();
              break;
            case "pingreq":
            case "pingresp":
              break;
            case "disconnect":
              this._parseDisconnect();
              break;
            case "auth":
              this._parseAuth();
              break;
            default:
              this._emitError(new Error("Not supported"));
          }
          result = true;
        }
        debug("_parsePayload complete result: %s", result);
        return result;
      }
      _parseConnect() {
        debug("_parseConnect");
        let topic2;
        let payload2;
        let password;
        let username;
        const flags = {};
        const packet = this.packet;
        const protocolId = this._parseString();
        if (protocolId === null) return this._emitError(new Error("Cannot parse protocolId"));
        if (protocolId !== "MQTT" && protocolId !== "MQIsdp") {
          return this._emitError(new Error("Invalid protocolId"));
        }
        packet.protocolId = protocolId;
        if (this._pos >= this._list.length) return this._emitError(new Error("Packet too short"));
        packet.protocolVersion = this._list.readUInt8(this._pos);
        if (packet.protocolVersion >= 128) {
          packet.bridgeMode = true;
          packet.protocolVersion = packet.protocolVersion - 128;
        }
        if (packet.protocolVersion !== 3 && packet.protocolVersion !== 4 && packet.protocolVersion !== 5) {
          return this._emitError(new Error("Invalid protocol version"));
        }
        this._pos++;
        if (this._pos >= this._list.length) {
          return this._emitError(new Error("Packet too short"));
        }
        flags.username = this._list.readUInt8(this._pos) & constants.USERNAME_MASK;
        flags.password = this._list.readUInt8(this._pos) & constants.PASSWORD_MASK;
        flags.will = this._list.readUInt8(this._pos) & constants.WILL_FLAG_MASK;
        if (flags.will) {
          packet.will = {};
          packet.will.retain = (this._list.readUInt8(this._pos) & constants.WILL_RETAIN_MASK) !== 0;
          packet.will.qos = (this._list.readUInt8(this._pos) & constants.WILL_QOS_MASK) >> constants.WILL_QOS_SHIFT;
        }
        packet.clean = (this._list.readUInt8(this._pos) & constants.CLEAN_SESSION_MASK) !== 0;
        this._pos++;
        packet.keepalive = this._parseNum();
        if (packet.keepalive === -1) return this._emitError(new Error("Packet too short"));
        if (packet.protocolVersion === 5) {
          const properties = this._parseProperties();
          if (Object.getOwnPropertyNames(properties).length) {
            packet.properties = properties;
          }
        }
        const clientId = this._parseString();
        if (clientId === null) return this._emitError(new Error("Packet too short"));
        packet.clientId = clientId;
        debug("_parseConnect: packet.clientId: %s", packet.clientId);
        if (flags.will) {
          if (packet.protocolVersion === 5) {
            const willProperties = this._parseProperties();
            if (Object.getOwnPropertyNames(willProperties).length) {
              packet.will.properties = willProperties;
            }
          }
          topic2 = this._parseString();
          if (topic2 === null) return this._emitError(new Error("Cannot parse will topic"));
          packet.will.topic = topic2;
          debug("_parseConnect: packet.will.topic: %s", packet.will.topic);
          payload2 = this._parseBuffer();
          if (payload2 === null) return this._emitError(new Error("Cannot parse will payload"));
          packet.will.payload = payload2;
          debug("_parseConnect: packet.will.paylaod: %s", packet.will.payload);
        }
        if (flags.username) {
          username = this._parseString();
          if (username === null) return this._emitError(new Error("Cannot parse username"));
          packet.username = username;
          debug("_parseConnect: packet.username: %s", packet.username);
        }
        if (flags.password) {
          password = this._parseBuffer();
          if (password === null) return this._emitError(new Error("Cannot parse password"));
          packet.password = password;
        }
        this.settings = packet;
        debug("_parseConnect: complete");
        return packet;
      }
      _parseConnack() {
        debug("_parseConnack");
        const packet = this.packet;
        if (this._list.length < 1) return null;
        packet.sessionPresent = !!(this._list.readUInt8(this._pos++) & constants.SESSIONPRESENT_MASK);
        if (this.settings.protocolVersion === 5) {
          if (this._list.length >= 2) {
            packet.reasonCode = this._list.readUInt8(this._pos++);
          } else {
            packet.reasonCode = 0;
          }
        } else {
          if (this._list.length < 2) return null;
          packet.returnCode = this._list.readUInt8(this._pos++);
        }
        if (packet.returnCode === -1 || packet.reasonCode === -1) return this._emitError(new Error("Cannot parse return code"));
        if (this.settings.protocolVersion === 5) {
          const properties = this._parseProperties();
          if (Object.getOwnPropertyNames(properties).length) {
            packet.properties = properties;
          }
        }
        debug("_parseConnack: complete");
      }
      _parsePublish() {
        debug("_parsePublish");
        const packet = this.packet;
        packet.topic = this._parseString();
        if (packet.topic === null) return this._emitError(new Error("Cannot parse topic"));
        if (packet.qos > 0) {
          if (!this._parseMessageId()) {
            return;
          }
        }
        if (this.settings.protocolVersion === 5) {
          const properties = this._parseProperties();
          if (Object.getOwnPropertyNames(properties).length) {
            packet.properties = properties;
          }
        }
        packet.payload = this._list.slice(this._pos, packet.length);
        debug("_parsePublish: payload from buffer list: %o", packet.payload);
      }
      _parseSubscribe() {
        debug("_parseSubscribe");
        const packet = this.packet;
        let topic2;
        let options;
        let qos;
        let rh;
        let rap;
        let nl;
        let subscription;
        if (packet.qos !== 1) {
          return this._emitError(new Error("Wrong subscribe header"));
        }
        packet.subscriptions = [];
        if (!this._parseMessageId()) {
          return;
        }
        if (this.settings.protocolVersion === 5) {
          const properties = this._parseProperties();
          if (Object.getOwnPropertyNames(properties).length) {
            packet.properties = properties;
          }
        }
        while (this._pos < packet.length) {
          topic2 = this._parseString();
          if (topic2 === null) return this._emitError(new Error("Cannot parse topic"));
          if (this._pos >= packet.length) return this._emitError(new Error("Malformed Subscribe Payload"));
          options = this._parseByte();
          qos = options & constants.SUBSCRIBE_OPTIONS_QOS_MASK;
          nl = (options >> constants.SUBSCRIBE_OPTIONS_NL_SHIFT & constants.SUBSCRIBE_OPTIONS_NL_MASK) !== 0;
          rap = (options >> constants.SUBSCRIBE_OPTIONS_RAP_SHIFT & constants.SUBSCRIBE_OPTIONS_RAP_MASK) !== 0;
          rh = options >> constants.SUBSCRIBE_OPTIONS_RH_SHIFT & constants.SUBSCRIBE_OPTIONS_RH_MASK;
          subscription = { topic: topic2, qos };
          if (this.settings.protocolVersion === 5) {
            subscription.nl = nl;
            subscription.rap = rap;
            subscription.rh = rh;
          } else if (this.settings.bridgeMode) {
            subscription.rh = 0;
            subscription.rap = true;
            subscription.nl = true;
          }
          debug("_parseSubscribe: push subscription `%s` to subscription", subscription);
          packet.subscriptions.push(subscription);
        }
      }
      _parseSuback() {
        debug("_parseSuback");
        const packet = this.packet;
        this.packet.granted = [];
        if (!this._parseMessageId()) {
          return;
        }
        if (this.settings.protocolVersion === 5) {
          const properties = this._parseProperties();
          if (Object.getOwnPropertyNames(properties).length) {
            packet.properties = properties;
          }
        }
        while (this._pos < this.packet.length) {
          this.packet.granted.push(this._list.readUInt8(this._pos++));
        }
      }
      _parseUnsubscribe() {
        debug("_parseUnsubscribe");
        const packet = this.packet;
        packet.unsubscriptions = [];
        if (!this._parseMessageId()) {
          return;
        }
        if (this.settings.protocolVersion === 5) {
          const properties = this._parseProperties();
          if (Object.getOwnPropertyNames(properties).length) {
            packet.properties = properties;
          }
        }
        while (this._pos < packet.length) {
          const topic2 = this._parseString();
          if (topic2 === null) return this._emitError(new Error("Cannot parse topic"));
          debug("_parseUnsubscribe: push topic `%s` to unsubscriptions", topic2);
          packet.unsubscriptions.push(topic2);
        }
      }
      _parseUnsuback() {
        debug("_parseUnsuback");
        const packet = this.packet;
        if (!this._parseMessageId()) return this._emitError(new Error("Cannot parse messageId"));
        if (this.settings.protocolVersion === 5) {
          const properties = this._parseProperties();
          if (Object.getOwnPropertyNames(properties).length) {
            packet.properties = properties;
          }
          packet.granted = [];
          while (this._pos < this.packet.length) {
            this.packet.granted.push(this._list.readUInt8(this._pos++));
          }
        }
      }
      // parse packets like puback, pubrec, pubrel, pubcomp
      _parseConfirmation() {
        debug("_parseConfirmation: packet.cmd: `%s`", this.packet.cmd);
        const packet = this.packet;
        this._parseMessageId();
        if (this.settings.protocolVersion === 5) {
          if (packet.length > 2) {
            packet.reasonCode = this._parseByte();
            debug("_parseConfirmation: packet.reasonCode `%d`", packet.reasonCode);
          } else {
            packet.reasonCode = 0;
          }
          if (packet.length > 3) {
            const properties = this._parseProperties();
            if (Object.getOwnPropertyNames(properties).length) {
              packet.properties = properties;
            }
          }
        }
        return true;
      }
      // parse disconnect packet
      _parseDisconnect() {
        const packet = this.packet;
        debug("_parseDisconnect");
        if (this.settings.protocolVersion === 5) {
          if (this._list.length > 0) {
            packet.reasonCode = this._parseByte();
          } else {
            packet.reasonCode = 0;
          }
          const properties = this._parseProperties();
          if (Object.getOwnPropertyNames(properties).length) {
            packet.properties = properties;
          }
        }
        debug("_parseDisconnect result: true");
        return true;
      }
      // parse auth packet
      _parseAuth() {
        debug("_parseAuth");
        const packet = this.packet;
        if (this.settings.protocolVersion !== 5) {
          return this._emitError(new Error("Not supported auth packet for this version MQTT"));
        }
        packet.reasonCode = this._parseByte();
        const properties = this._parseProperties();
        if (Object.getOwnPropertyNames(properties).length) {
          packet.properties = properties;
        }
        debug("_parseAuth: result: true");
        return true;
      }
      _parseMessageId() {
        const packet = this.packet;
        packet.messageId = this._parseNum();
        if (packet.messageId === null) {
          this._emitError(new Error("Cannot parse messageId"));
          return false;
        }
        debug("_parseMessageId: packet.messageId %d", packet.messageId);
        return true;
      }
      _parseString(maybeBuffer) {
        const length = this._parseNum();
        const end = length + this._pos;
        if (length === -1 || end > this._list.length || end > this.packet.length) return null;
        const result = this._list.toString("utf8", this._pos, end);
        this._pos += length;
        debug("_parseString: result: %s", result);
        return result;
      }
      _parseStringPair() {
        debug("_parseStringPair");
        return {
          name: this._parseString(),
          value: this._parseString()
        };
      }
      _parseBuffer() {
        const length = this._parseNum();
        const end = length + this._pos;
        if (length === -1 || end > this._list.length || end > this.packet.length) return null;
        const result = this._list.slice(this._pos, end);
        this._pos += length;
        debug("_parseBuffer: result: %o", result);
        return result;
      }
      _parseNum() {
        if (this._list.length - this._pos < 2) return -1;
        const result = this._list.readUInt16BE(this._pos);
        this._pos += 2;
        debug("_parseNum: result: %s", result);
        return result;
      }
      _parse4ByteNum() {
        if (this._list.length - this._pos < 4) return -1;
        const result = this._list.readUInt32BE(this._pos);
        this._pos += 4;
        debug("_parse4ByteNum: result: %s", result);
        return result;
      }
      _parseVarByteNum(fullInfoFlag) {
        debug("_parseVarByteNum");
        const maxBytes = 4;
        let bytes = 0;
        let mul = 1;
        let value = 0;
        let result = false;
        let current;
        const padding = this._pos ? this._pos : 0;
        while (bytes < maxBytes && padding + bytes < this._list.length) {
          current = this._list.readUInt8(padding + bytes++);
          value += mul * (current & constants.VARBYTEINT_MASK);
          mul *= 128;
          if ((current & constants.VARBYTEINT_FIN_MASK) === 0) {
            result = true;
            break;
          }
          if (this._list.length <= bytes) {
            break;
          }
        }
        if (!result && bytes === maxBytes && this._list.length >= bytes) {
          this._emitError(new Error("Invalid variable byte integer"));
        }
        if (padding) {
          this._pos += bytes;
        }
        result = result ? fullInfoFlag ? {
          bytes,
          value
        } : value : false;
        debug("_parseVarByteNum: result: %o", result);
        return result;
      }
      _parseByte() {
        let result;
        if (this._pos < this._list.length) {
          result = this._list.readUInt8(this._pos);
          this._pos++;
        }
        debug("_parseByte: result: %o", result);
        return result;
      }
      _parseByType(type) {
        debug("_parseByType: type: %s", type);
        switch (type) {
          case "byte": {
            return this._parseByte() !== 0;
          }
          case "int8": {
            return this._parseByte();
          }
          case "int16": {
            return this._parseNum();
          }
          case "int32": {
            return this._parse4ByteNum();
          }
          case "var": {
            return this._parseVarByteNum();
          }
          case "string": {
            return this._parseString();
          }
          case "pair": {
            return this._parseStringPair();
          }
          case "binary": {
            return this._parseBuffer();
          }
        }
      }
      _parseProperties() {
        debug("_parseProperties");
        const length = this._parseVarByteNum();
        const start = this._pos;
        const end = start + length;
        const result = {};
        while (this._pos < end) {
          const type = this._parseByte();
          if (!type) {
            this._emitError(new Error("Cannot parse property code type"));
            return false;
          }
          const name = constants.propertiesCodes[type];
          if (!name) {
            this._emitError(new Error("Unknown property"));
            return false;
          }
          if (name === "userProperties") {
            if (!result[name]) {
              result[name] = /* @__PURE__ */ Object.create(null);
            }
            const currentUserProperty = this._parseByType(constants.propertiesTypes[name]);
            if (result[name][currentUserProperty.name]) {
              if (Array.isArray(result[name][currentUserProperty.name])) {
                result[name][currentUserProperty.name].push(currentUserProperty.value);
              } else {
                const currentValue = result[name][currentUserProperty.name];
                result[name][currentUserProperty.name] = [currentValue];
                result[name][currentUserProperty.name].push(currentUserProperty.value);
              }
            } else {
              result[name][currentUserProperty.name] = currentUserProperty.value;
            }
            continue;
          }
          if (result[name]) {
            if (Array.isArray(result[name])) {
              result[name].push(this._parseByType(constants.propertiesTypes[name]));
            } else {
              result[name] = [result[name]];
              result[name].push(this._parseByType(constants.propertiesTypes[name]));
            }
          } else {
            result[name] = this._parseByType(constants.propertiesTypes[name]);
          }
        }
        return result;
      }
      _newPacket() {
        debug("_newPacket");
        if (this.packet) {
          this._list.consume(this.packet.length);
          debug("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d", this.packet.cmd, this.packet.payload, this.packet.length);
          this.emit("packet", this.packet);
        }
        debug("_newPacket: new packet");
        this.packet = new Packet();
        this._pos = 0;
        return true;
      }
      _emitError(err) {
        debug("_emitError");
        this.error = err;
        this.emit("error", err);
      }
    };
    module2.exports = Parser;
  }
});

// ../../node_modules/mqtt-packet/numbers.js
var require_numbers = __commonJS({
  "../../node_modules/mqtt-packet/numbers.js"(exports2, module2) {
    var max = 65536;
    var cache5 = {};
    var SubOk = Buffer.isBuffer(Buffer.from([1, 2]).subarray(0, 1));
    function generateBuffer(i5) {
      const buffer = Buffer.allocUnsafe(2);
      buffer.writeUInt8(i5 >> 8, 0);
      buffer.writeUInt8(i5 & 255, 0 + 1);
      return buffer;
    }
    function generateCache() {
      for (let i5 = 0; i5 < max; i5++) {
        cache5[i5] = generateBuffer(i5);
      }
    }
    function genBufVariableByteInt(num) {
      const maxLength = 4;
      let digit = 0;
      let pos = 0;
      const buffer = Buffer.allocUnsafe(maxLength);
      do {
        digit = num % 128 | 0;
        num = num / 128 | 0;
        if (num > 0) digit = digit | 128;
        buffer.writeUInt8(digit, pos++);
      } while (num > 0 && pos < maxLength);
      if (num > 0) {
        pos = 0;
      }
      return SubOk ? buffer.subarray(0, pos) : buffer.slice(0, pos);
    }
    function generate4ByteBuffer(num) {
      const buffer = Buffer.allocUnsafe(4);
      buffer.writeUInt32BE(num, 0);
      return buffer;
    }
    module2.exports = {
      cache: cache5,
      generateCache,
      generateNumber: generateBuffer,
      genBufVariableByteInt,
      generate4ByteBuffer
    };
  }
});

// ../../node_modules/process-nextick-args/index.js
var require_process_nextick_args = __commonJS({
  "../../node_modules/process-nextick-args/index.js"(exports2, module2) {
    "use strict";
    if (typeof process === "undefined" || !process.version || process.version.indexOf("v0.") === 0 || process.version.indexOf("v1.") === 0 && process.version.indexOf("v1.8.") !== 0) {
      module2.exports = { nextTick };
    } else {
      module2.exports = process;
    }
    function nextTick(fn, arg1, arg2, arg3) {
      if (typeof fn !== "function") {
        throw new TypeError('"callback" argument must be a function');
      }
      var len = arguments.length;
      var args, i5;
      switch (len) {
        case 0:
        case 1:
          return process.nextTick(fn);
        case 2:
          return process.nextTick(function afterTickOne() {
            fn.call(null, arg1);
          });
        case 3:
          return process.nextTick(function afterTickTwo() {
            fn.call(null, arg1, arg2);
          });
        case 4:
          return process.nextTick(function afterTickThree() {
            fn.call(null, arg1, arg2, arg3);
          });
        default:
          args = new Array(len - 1);
          i5 = 0;
          while (i5 < args.length) {
            args[i5++] = arguments[i5];
          }
          return process.nextTick(function afterTick() {
            fn.apply(null, args);
          });
      }
    }
  }
});

// ../../node_modules/mqtt-packet/writeToStream.js
var require_writeToStream = __commonJS({
  "../../node_modules/mqtt-packet/writeToStream.js"(exports2, module2) {
    var protocol = require_constants();
    var empty = Buffer.allocUnsafe(0);
    var zeroBuf = Buffer.from([0]);
    var numbers = require_numbers();
    var nextTick = require_process_nextick_args().nextTick;
    var debug = require_src()("mqtt-packet:writeToStream");
    var numCache = numbers.cache;
    var generateNumber = numbers.generateNumber;
    var generateCache = numbers.generateCache;
    var genBufVariableByteInt = numbers.genBufVariableByteInt;
    var generate4ByteBuffer = numbers.generate4ByteBuffer;
    var writeNumber = writeNumberCached;
    var toGenerate = true;
    function generate(packet, stream, opts) {
      debug("generate called");
      if (stream.cork) {
        stream.cork();
        nextTick(uncork, stream);
      }
      if (toGenerate) {
        toGenerate = false;
        generateCache();
      }
      debug("generate: packet.cmd: %s", packet.cmd);
      switch (packet.cmd) {
        case "connect":
          return connect2(packet, stream, opts);
        case "connack":
          return connack(packet, stream, opts);
        case "publish":
          return publish(packet, stream, opts);
        case "puback":
        case "pubrec":
        case "pubrel":
        case "pubcomp":
          return confirmation(packet, stream, opts);
        case "subscribe":
          return subscribe(packet, stream, opts);
        case "suback":
          return suback(packet, stream, opts);
        case "unsubscribe":
          return unsubscribe(packet, stream, opts);
        case "unsuback":
          return unsuback(packet, stream, opts);
        case "pingreq":
        case "pingresp":
          return emptyPacket(packet, stream, opts);
        case "disconnect":
          return disconnect(packet, stream, opts);
        case "auth":
          return auth(packet, stream, opts);
        default:
          stream.emit("error", new Error("Unknown command"));
          return false;
      }
    }
    Object.defineProperty(generate, "cacheNumbers", {
      get() {
        return writeNumber === writeNumberCached;
      },
      set(value) {
        if (value) {
          if (!numCache || Object.keys(numCache).length === 0) toGenerate = true;
          writeNumber = writeNumberCached;
        } else {
          toGenerate = false;
          writeNumber = writeNumberGenerated;
        }
      }
    });
    function uncork(stream) {
      stream.uncork();
    }
    function connect2(packet, stream, opts) {
      const settings = packet || {};
      const protocolId = settings.protocolId || "MQTT";
      let protocolVersion = settings.protocolVersion || 4;
      const will = settings.will;
      let clean = settings.clean;
      const keepalive = settings.keepalive || 0;
      const clientId = settings.clientId || "";
      const username = settings.username;
      const password = settings.password;
      const properties = settings.properties;
      if (clean === void 0) clean = true;
      let length = 0;
      if (!protocolId || typeof protocolId !== "string" && !Buffer.isBuffer(protocolId)) {
        stream.emit("error", new Error("Invalid protocolId"));
        return false;
      } else length += protocolId.length + 2;
      if (protocolVersion !== 3 && protocolVersion !== 4 && protocolVersion !== 5) {
        stream.emit("error", new Error("Invalid protocol version"));
        return false;
      } else length += 1;
      if ((typeof clientId === "string" || Buffer.isBuffer(clientId)) && (clientId || protocolVersion >= 4) && (clientId || clean)) {
        length += Buffer.byteLength(clientId) + 2;
      } else {
        if (protocolVersion < 4) {
          stream.emit("error", new Error("clientId must be supplied before 3.1.1"));
          return false;
        }
        if (clean * 1 === 0) {
          stream.emit("error", new Error("clientId must be given if cleanSession set to 0"));
          return false;
        }
      }
      if (typeof keepalive !== "number" || keepalive < 0 || keepalive > 65535 || keepalive % 1 !== 0) {
        stream.emit("error", new Error("Invalid keepalive"));
        return false;
      } else length += 2;
      length += 1;
      if (protocolVersion === 5) {
        var propertiesData = getProperties(stream, properties);
        if (!propertiesData) {
          return false;
        }
        length += propertiesData.length;
      }
      if (will) {
        if (typeof will !== "object") {
          stream.emit("error", new Error("Invalid will"));
          return false;
        }
        if (!will.topic || typeof will.topic !== "string") {
          stream.emit("error", new Error("Invalid will topic"));
          return false;
        } else {
          length += Buffer.byteLength(will.topic) + 2;
        }
        length += 2;
        if (will.payload) {
          if (will.payload.length >= 0) {
            if (typeof will.payload === "string") {
              length += Buffer.byteLength(will.payload);
            } else {
              length += will.payload.length;
            }
          } else {
            stream.emit("error", new Error("Invalid will payload"));
            return false;
          }
        }
        var willProperties = {};
        if (protocolVersion === 5) {
          willProperties = getProperties(stream, will.properties);
          if (!willProperties) {
            return false;
          }
          length += willProperties.length;
        }
      }
      let providedUsername = false;
      if (username != null) {
        if (isStringOrBuffer(username)) {
          providedUsername = true;
          length += Buffer.byteLength(username) + 2;
        } else {
          stream.emit("error", new Error("Invalid username"));
          return false;
        }
      }
      if (password != null) {
        if (!providedUsername) {
          stream.emit("error", new Error("Username is required to use password"));
          return false;
        }
        if (isStringOrBuffer(password)) {
          length += byteLength(password) + 2;
        } else {
          stream.emit("error", new Error("Invalid password"));
          return false;
        }
      }
      stream.write(protocol.CONNECT_HEADER);
      writeVarByteInt(stream, length);
      writeStringOrBuffer(stream, protocolId);
      if (settings.bridgeMode) {
        protocolVersion += 128;
      }
      stream.write(
        protocolVersion === 131 ? protocol.VERSION131 : protocolVersion === 132 ? protocol.VERSION132 : protocolVersion === 4 ? protocol.VERSION4 : protocolVersion === 5 ? protocol.VERSION5 : protocol.VERSION3
      );
      let flags = 0;
      flags |= username != null ? protocol.USERNAME_MASK : 0;
      flags |= password != null ? protocol.PASSWORD_MASK : 0;
      flags |= will && will.retain ? protocol.WILL_RETAIN_MASK : 0;
      flags |= will && will.qos ? will.qos << protocol.WILL_QOS_SHIFT : 0;
      flags |= will ? protocol.WILL_FLAG_MASK : 0;
      flags |= clean ? protocol.CLEAN_SESSION_MASK : 0;
      stream.write(Buffer.from([flags]));
      writeNumber(stream, keepalive);
      if (protocolVersion === 5) {
        propertiesData.write();
      }
      writeStringOrBuffer(stream, clientId);
      if (will) {
        if (protocolVersion === 5) {
          willProperties.write();
        }
        writeString(stream, will.topic);
        writeStringOrBuffer(stream, will.payload);
      }
      if (username != null) {
        writeStringOrBuffer(stream, username);
      }
      if (password != null) {
        writeStringOrBuffer(stream, password);
      }
      return true;
    }
    function connack(packet, stream, opts) {
      const version = opts ? opts.protocolVersion : 4;
      const settings = packet || {};
      const rc = version === 5 ? settings.reasonCode : settings.returnCode;
      const properties = settings.properties;
      let length = 2;
      if (typeof rc !== "number") {
        stream.emit("error", new Error("Invalid return code"));
        return false;
      }
      let propertiesData = null;
      if (version === 5) {
        propertiesData = getProperties(stream, properties);
        if (!propertiesData) {
          return false;
        }
        length += propertiesData.length;
      }
      stream.write(protocol.CONNACK_HEADER);
      writeVarByteInt(stream, length);
      stream.write(settings.sessionPresent ? protocol.SESSIONPRESENT_HEADER : zeroBuf);
      stream.write(Buffer.from([rc]));
      if (propertiesData != null) {
        propertiesData.write();
      }
      return true;
    }
    function publish(packet, stream, opts) {
      debug("publish: packet: %o", packet);
      const version = opts ? opts.protocolVersion : 4;
      const settings = packet || {};
      const qos = settings.qos || 0;
      const retain = settings.retain ? protocol.RETAIN_MASK : 0;
      const topic2 = settings.topic;
      const payload2 = settings.payload || empty;
      const id = settings.messageId;
      const properties = settings.properties;
      let length = 0;
      if (typeof topic2 === "string") length += Buffer.byteLength(topic2) + 2;
      else if (Buffer.isBuffer(topic2)) length += topic2.length + 2;
      else {
        stream.emit("error", new Error("Invalid topic"));
        return false;
      }
      if (!Buffer.isBuffer(payload2)) length += Buffer.byteLength(payload2);
      else length += payload2.length;
      if (qos && typeof id !== "number") {
        stream.emit("error", new Error("Invalid messageId"));
        return false;
      } else if (qos) length += 2;
      let propertiesData = null;
      if (version === 5) {
        propertiesData = getProperties(stream, properties);
        if (!propertiesData) {
          return false;
        }
        length += propertiesData.length;
      }
      stream.write(protocol.PUBLISH_HEADER[qos][settings.dup ? 1 : 0][retain ? 1 : 0]);
      writeVarByteInt(stream, length);
      writeNumber(stream, byteLength(topic2));
      stream.write(topic2);
      if (qos > 0) writeNumber(stream, id);
      if (propertiesData != null) {
        propertiesData.write();
      }
      debug("publish: payload: %o", payload2);
      return stream.write(payload2);
    }
    function confirmation(packet, stream, opts) {
      const version = opts ? opts.protocolVersion : 4;
      const settings = packet || {};
      const type = settings.cmd || "puback";
      const id = settings.messageId;
      const dup = settings.dup && type === "pubrel" ? protocol.DUP_MASK : 0;
      let qos = 0;
      const reasonCode = settings.reasonCode;
      const properties = settings.properties;
      let length = version === 5 ? 3 : 2;
      if (type === "pubrel") qos = 1;
      if (typeof id !== "number") {
        stream.emit("error", new Error("Invalid messageId"));
        return false;
      }
      let propertiesData = null;
      if (version === 5) {
        if (typeof properties === "object") {
          propertiesData = getPropertiesByMaximumPacketSize(stream, properties, opts, length);
          if (!propertiesData) {
            return false;
          }
          length += propertiesData.length;
        }
      }
      stream.write(protocol.ACKS[type][qos][dup][0]);
      writeVarByteInt(stream, length);
      writeNumber(stream, id);
      if (version === 5) {
        stream.write(Buffer.from([reasonCode]));
      }
      if (propertiesData !== null) {
        propertiesData.write();
      }
      return true;
    }
    function subscribe(packet, stream, opts) {
      debug("subscribe: packet: ");
      const version = opts ? opts.protocolVersion : 4;
      const settings = packet || {};
      const dup = settings.dup ? protocol.DUP_MASK : 0;
      const id = settings.messageId;
      const subs = settings.subscriptions;
      const properties = settings.properties;
      let length = 0;
      if (typeof id !== "number") {
        stream.emit("error", new Error("Invalid messageId"));
        return false;
      } else length += 2;
      let propertiesData = null;
      if (version === 5) {
        propertiesData = getProperties(stream, properties);
        if (!propertiesData) {
          return false;
        }
        length += propertiesData.length;
      }
      if (typeof subs === "object" && subs.length) {
        for (let i5 = 0; i5 < subs.length; i5 += 1) {
          const itopic = subs[i5].topic;
          const iqos = subs[i5].qos;
          if (typeof itopic !== "string") {
            stream.emit("error", new Error("Invalid subscriptions - invalid topic"));
            return false;
          }
          if (typeof iqos !== "number") {
            stream.emit("error", new Error("Invalid subscriptions - invalid qos"));
            return false;
          }
          if (version === 5) {
            const nl = subs[i5].nl || false;
            if (typeof nl !== "boolean") {
              stream.emit("error", new Error("Invalid subscriptions - invalid No Local"));
              return false;
            }
            const rap = subs[i5].rap || false;
            if (typeof rap !== "boolean") {
              stream.emit("error", new Error("Invalid subscriptions - invalid Retain as Published"));
              return false;
            }
            const rh = subs[i5].rh || 0;
            if (typeof rh !== "number" || rh > 2) {
              stream.emit("error", new Error("Invalid subscriptions - invalid Retain Handling"));
              return false;
            }
          }
          length += Buffer.byteLength(itopic) + 2 + 1;
        }
      } else {
        stream.emit("error", new Error("Invalid subscriptions"));
        return false;
      }
      debug("subscribe: writing to stream: %o", protocol.SUBSCRIBE_HEADER);
      stream.write(protocol.SUBSCRIBE_HEADER[1][dup ? 1 : 0][0]);
      writeVarByteInt(stream, length);
      writeNumber(stream, id);
      if (propertiesData !== null) {
        propertiesData.write();
      }
      let result = true;
      for (const sub of subs) {
        const jtopic = sub.topic;
        const jqos = sub.qos;
        const jnl = +sub.nl;
        const jrap = +sub.rap;
        const jrh = sub.rh;
        let joptions;
        writeString(stream, jtopic);
        joptions = protocol.SUBSCRIBE_OPTIONS_QOS[jqos];
        if (version === 5) {
          joptions |= jnl ? protocol.SUBSCRIBE_OPTIONS_NL : 0;
          joptions |= jrap ? protocol.SUBSCRIBE_OPTIONS_RAP : 0;
          joptions |= jrh ? protocol.SUBSCRIBE_OPTIONS_RH[jrh] : 0;
        }
        result = stream.write(Buffer.from([joptions]));
      }
      return result;
    }
    function suback(packet, stream, opts) {
      const version = opts ? opts.protocolVersion : 4;
      const settings = packet || {};
      const id = settings.messageId;
      const granted = settings.granted;
      const properties = settings.properties;
      let length = 0;
      if (typeof id !== "number") {
        stream.emit("error", new Error("Invalid messageId"));
        return false;
      } else length += 2;
      if (typeof granted === "object" && granted.length) {
        for (let i5 = 0; i5 < granted.length; i5 += 1) {
          if (typeof granted[i5] !== "number") {
            stream.emit("error", new Error("Invalid qos vector"));
            return false;
          }
          length += 1;
        }
      } else {
        stream.emit("error", new Error("Invalid qos vector"));
        return false;
      }
      let propertiesData = null;
      if (version === 5) {
        propertiesData = getPropertiesByMaximumPacketSize(stream, properties, opts, length);
        if (!propertiesData) {
          return false;
        }
        length += propertiesData.length;
      }
      stream.write(protocol.SUBACK_HEADER);
      writeVarByteInt(stream, length);
      writeNumber(stream, id);
      if (propertiesData !== null) {
        propertiesData.write();
      }
      return stream.write(Buffer.from(granted));
    }
    function unsubscribe(packet, stream, opts) {
      const version = opts ? opts.protocolVersion : 4;
      const settings = packet || {};
      const id = settings.messageId;
      const dup = settings.dup ? protocol.DUP_MASK : 0;
      const unsubs = settings.unsubscriptions;
      const properties = settings.properties;
      let length = 0;
      if (typeof id !== "number") {
        stream.emit("error", new Error("Invalid messageId"));
        return false;
      } else {
        length += 2;
      }
      if (typeof unsubs === "object" && unsubs.length) {
        for (let i5 = 0; i5 < unsubs.length; i5 += 1) {
          if (typeof unsubs[i5] !== "string") {
            stream.emit("error", new Error("Invalid unsubscriptions"));
            return false;
          }
          length += Buffer.byteLength(unsubs[i5]) + 2;
        }
      } else {
        stream.emit("error", new Error("Invalid unsubscriptions"));
        return false;
      }
      let propertiesData = null;
      if (version === 5) {
        propertiesData = getProperties(stream, properties);
        if (!propertiesData) {
          return false;
        }
        length += propertiesData.length;
      }
      stream.write(protocol.UNSUBSCRIBE_HEADER[1][dup ? 1 : 0][0]);
      writeVarByteInt(stream, length);
      writeNumber(stream, id);
      if (propertiesData !== null) {
        propertiesData.write();
      }
      let result = true;
      for (let j5 = 0; j5 < unsubs.length; j5++) {
        result = writeString(stream, unsubs[j5]);
      }
      return result;
    }
    function unsuback(packet, stream, opts) {
      const version = opts ? opts.protocolVersion : 4;
      const settings = packet || {};
      const id = settings.messageId;
      const dup = settings.dup ? protocol.DUP_MASK : 0;
      const granted = settings.granted;
      const properties = settings.properties;
      const type = settings.cmd;
      const qos = 0;
      let length = 2;
      if (typeof id !== "number") {
        stream.emit("error", new Error("Invalid messageId"));
        return false;
      }
      if (version === 5) {
        if (typeof granted === "object" && granted.length) {
          for (let i5 = 0; i5 < granted.length; i5 += 1) {
            if (typeof granted[i5] !== "number") {
              stream.emit("error", new Error("Invalid qos vector"));
              return false;
            }
            length += 1;
          }
        } else {
          stream.emit("error", new Error("Invalid qos vector"));
          return false;
        }
      }
      let propertiesData = null;
      if (version === 5) {
        propertiesData = getPropertiesByMaximumPacketSize(stream, properties, opts, length);
        if (!propertiesData) {
          return false;
        }
        length += propertiesData.length;
      }
      stream.write(protocol.ACKS[type][qos][dup][0]);
      writeVarByteInt(stream, length);
      writeNumber(stream, id);
      if (propertiesData !== null) {
        propertiesData.write();
      }
      if (version === 5) {
        stream.write(Buffer.from(granted));
      }
      return true;
    }
    function emptyPacket(packet, stream, opts) {
      return stream.write(protocol.EMPTY[packet.cmd]);
    }
    function disconnect(packet, stream, opts) {
      const version = opts ? opts.protocolVersion : 4;
      const settings = packet || {};
      const reasonCode = settings.reasonCode;
      const properties = settings.properties;
      let length = version === 5 ? 1 : 0;
      let propertiesData = null;
      if (version === 5) {
        propertiesData = getPropertiesByMaximumPacketSize(stream, properties, opts, length);
        if (!propertiesData) {
          return false;
        }
        length += propertiesData.length;
      }
      stream.write(Buffer.from([protocol.codes.disconnect << 4]));
      writeVarByteInt(stream, length);
      if (version === 5) {
        stream.write(Buffer.from([reasonCode]));
      }
      if (propertiesData !== null) {
        propertiesData.write();
      }
      return true;
    }
    function auth(packet, stream, opts) {
      const version = opts ? opts.protocolVersion : 4;
      const settings = packet || {};
      const reasonCode = settings.reasonCode;
      const properties = settings.properties;
      let length = version === 5 ? 1 : 0;
      if (version !== 5) stream.emit("error", new Error("Invalid mqtt version for auth packet"));
      const propertiesData = getPropertiesByMaximumPacketSize(stream, properties, opts, length);
      if (!propertiesData) {
        return false;
      }
      length += propertiesData.length;
      stream.write(Buffer.from([protocol.codes.auth << 4]));
      writeVarByteInt(stream, length);
      stream.write(Buffer.from([reasonCode]));
      if (propertiesData !== null) {
        propertiesData.write();
      }
      return true;
    }
    var varByteIntCache = {};
    function writeVarByteInt(stream, num) {
      if (num > protocol.VARBYTEINT_MAX) {
        stream.emit("error", new Error(`Invalid variable byte integer: ${num}`));
        return false;
      }
      let buffer = varByteIntCache[num];
      if (!buffer) {
        buffer = genBufVariableByteInt(num);
        if (num < 16384) varByteIntCache[num] = buffer;
      }
      debug("writeVarByteInt: writing to stream: %o", buffer);
      return stream.write(buffer);
    }
    function writeString(stream, string) {
      const strlen = Buffer.byteLength(string);
      writeNumber(stream, strlen);
      debug("writeString: %s", string);
      return stream.write(string, "utf8");
    }
    function writeStringPair(stream, name, value) {
      writeString(stream, name);
      writeString(stream, value);
    }
    function writeNumberCached(stream, number) {
      debug("writeNumberCached: number: %d", number);
      debug("writeNumberCached: %o", numCache[number]);
      return stream.write(numCache[number]);
    }
    function writeNumberGenerated(stream, number) {
      const generatedNumber = generateNumber(number);
      debug("writeNumberGenerated: %o", generatedNumber);
      return stream.write(generatedNumber);
    }
    function write4ByteNumber(stream, number) {
      const generated4ByteBuffer = generate4ByteBuffer(number);
      debug("write4ByteNumber: %o", generated4ByteBuffer);
      return stream.write(generated4ByteBuffer);
    }
    function writeStringOrBuffer(stream, toWrite) {
      if (typeof toWrite === "string") {
        writeString(stream, toWrite);
      } else if (toWrite) {
        writeNumber(stream, toWrite.length);
        stream.write(toWrite);
      } else writeNumber(stream, 0);
    }
    function getProperties(stream, properties) {
      if (typeof properties !== "object" || properties.length != null) {
        return {
          length: 1,
          write() {
            writeProperties(stream, {}, 0);
          }
        };
      }
      let propertiesLength = 0;
      function getLengthProperty(name, value) {
        const type = protocol.propertiesTypes[name];
        let length = 0;
        switch (type) {
          case "byte": {
            if (typeof value !== "boolean") {
              stream.emit("error", new Error(`Invalid ${name}: ${value}`));
              return false;
            }
            length += 1 + 1;
            break;
          }
          case "int8": {
            if (typeof value !== "number" || value < 0 || value > 255) {
              stream.emit("error", new Error(`Invalid ${name}: ${value}`));
              return false;
            }
            length += 1 + 1;
            break;
          }
          case "binary": {
            if (value && value === null) {
              stream.emit("error", new Error(`Invalid ${name}: ${value}`));
              return false;
            }
            length += 1 + Buffer.byteLength(value) + 2;
            break;
          }
          case "int16": {
            if (typeof value !== "number" || value < 0 || value > 65535) {
              stream.emit("error", new Error(`Invalid ${name}: ${value}`));
              return false;
            }
            length += 1 + 2;
            break;
          }
          case "int32": {
            if (typeof value !== "number" || value < 0 || value > 4294967295) {
              stream.emit("error", new Error(`Invalid ${name}: ${value}`));
              return false;
            }
            length += 1 + 4;
            break;
          }
          case "var": {
            if (typeof value !== "number" || value < 0 || value > 268435455) {
              stream.emit("error", new Error(`Invalid ${name}: ${value}`));
              return false;
            }
            length += 1 + Buffer.byteLength(genBufVariableByteInt(value));
            break;
          }
          case "string": {
            if (typeof value !== "string") {
              stream.emit("error", new Error(`Invalid ${name}: ${value}`));
              return false;
            }
            length += 1 + 2 + Buffer.byteLength(value.toString());
            break;
          }
          case "pair": {
            if (typeof value !== "object") {
              stream.emit("error", new Error(`Invalid ${name}: ${value}`));
              return false;
            }
            length += Object.getOwnPropertyNames(value).reduce((result, name2) => {
              const currentValue = value[name2];
              if (Array.isArray(currentValue)) {
                result += currentValue.reduce((currentLength, value2) => {
                  currentLength += 1 + 2 + Buffer.byteLength(name2.toString()) + 2 + Buffer.byteLength(value2.toString());
                  return currentLength;
                }, 0);
              } else {
                result += 1 + 2 + Buffer.byteLength(name2.toString()) + 2 + Buffer.byteLength(value[name2].toString());
              }
              return result;
            }, 0);
            break;
          }
          default: {
            stream.emit("error", new Error(`Invalid property ${name}: ${value}`));
            return false;
          }
        }
        return length;
      }
      if (properties) {
        for (const propName in properties) {
          let propLength = 0;
          let propValueLength = 0;
          const propValue = properties[propName];
          if (Array.isArray(propValue)) {
            for (let valueIndex = 0; valueIndex < propValue.length; valueIndex++) {
              propValueLength = getLengthProperty(propName, propValue[valueIndex]);
              if (!propValueLength) {
                return false;
              }
              propLength += propValueLength;
            }
          } else {
            propValueLength = getLengthProperty(propName, propValue);
            if (!propValueLength) {
              return false;
            }
            propLength = propValueLength;
          }
          if (!propLength) return false;
          propertiesLength += propLength;
        }
      }
      const propertiesLengthLength = Buffer.byteLength(genBufVariableByteInt(propertiesLength));
      return {
        length: propertiesLengthLength + propertiesLength,
        write() {
          writeProperties(stream, properties, propertiesLength);
        }
      };
    }
    function getPropertiesByMaximumPacketSize(stream, properties, opts, length) {
      const mayEmptyProps = ["reasonString", "userProperties"];
      const maximumPacketSize = opts && opts.properties && opts.properties.maximumPacketSize ? opts.properties.maximumPacketSize : 0;
      let propertiesData = getProperties(stream, properties);
      if (maximumPacketSize) {
        while (length + propertiesData.length > maximumPacketSize) {
          const currentMayEmptyProp = mayEmptyProps.shift();
          if (currentMayEmptyProp && properties[currentMayEmptyProp]) {
            delete properties[currentMayEmptyProp];
            propertiesData = getProperties(stream, properties);
          } else {
            return false;
          }
        }
      }
      return propertiesData;
    }
    function writeProperty(stream, propName, value) {
      const type = protocol.propertiesTypes[propName];
      switch (type) {
        case "byte": {
          stream.write(Buffer.from([protocol.properties[propName]]));
          stream.write(Buffer.from([+value]));
          break;
        }
        case "int8": {
          stream.write(Buffer.from([protocol.properties[propName]]));
          stream.write(Buffer.from([value]));
          break;
        }
        case "binary": {
          stream.write(Buffer.from([protocol.properties[propName]]));
          writeStringOrBuffer(stream, value);
          break;
        }
        case "int16": {
          stream.write(Buffer.from([protocol.properties[propName]]));
          writeNumber(stream, value);
          break;
        }
        case "int32": {
          stream.write(Buffer.from([protocol.properties[propName]]));
          write4ByteNumber(stream, value);
          break;
        }
        case "var": {
          stream.write(Buffer.from([protocol.properties[propName]]));
          writeVarByteInt(stream, value);
          break;
        }
        case "string": {
          stream.write(Buffer.from([protocol.properties[propName]]));
          writeString(stream, value);
          break;
        }
        case "pair": {
          Object.getOwnPropertyNames(value).forEach((name) => {
            const currentValue = value[name];
            if (Array.isArray(currentValue)) {
              currentValue.forEach((value2) => {
                stream.write(Buffer.from([protocol.properties[propName]]));
                writeStringPair(stream, name.toString(), value2.toString());
              });
            } else {
              stream.write(Buffer.from([protocol.properties[propName]]));
              writeStringPair(stream, name.toString(), currentValue.toString());
            }
          });
          break;
        }
        default: {
          stream.emit("error", new Error(`Invalid property ${propName} value: ${value}`));
          return false;
        }
      }
    }
    function writeProperties(stream, properties, propertiesLength) {
      writeVarByteInt(stream, propertiesLength);
      for (const propName in properties) {
        if (Object.prototype.hasOwnProperty.call(properties, propName) && properties[propName] !== null) {
          const value = properties[propName];
          if (Array.isArray(value)) {
            for (let valueIndex = 0; valueIndex < value.length; valueIndex++) {
              writeProperty(stream, propName, value[valueIndex]);
            }
          } else {
            writeProperty(stream, propName, value);
          }
        }
      }
    }
    function byteLength(bufOrString) {
      if (!bufOrString) return 0;
      else if (bufOrString instanceof Buffer) return bufOrString.length;
      else return Buffer.byteLength(bufOrString);
    }
    function isStringOrBuffer(field) {
      return typeof field === "string" || field instanceof Buffer;
    }
    module2.exports = generate;
  }
});

// ../../node_modules/mqtt-packet/generate.js
var require_generate = __commonJS({
  "../../node_modules/mqtt-packet/generate.js"(exports2, module2) {
    var writeToStream = require_writeToStream();
    var EventEmitter = require("events");
    function generate(packet, opts) {
      const stream = new Accumulator();
      writeToStream(packet, stream, opts);
      return stream.concat();
    }
    var Accumulator = class extends EventEmitter {
      constructor() {
        super();
        this._array = new Array(20);
        this._i = 0;
      }
      write(chunk) {
        this._array[this._i++] = chunk;
        return true;
      }
      concat() {
        let length = 0;
        const lengths = new Array(this._array.length);
        const list2 = this._array;
        let pos = 0;
        let i5;
        for (i5 = 0; i5 < list2.length && list2[i5] !== void 0; i5++) {
          if (typeof list2[i5] !== "string") lengths[i5] = list2[i5].length;
          else lengths[i5] = Buffer.byteLength(list2[i5]);
          length += lengths[i5];
        }
        const result = Buffer.allocUnsafe(length);
        for (i5 = 0; i5 < list2.length && list2[i5] !== void 0; i5++) {
          if (typeof list2[i5] !== "string") {
            list2[i5].copy(result, pos);
            pos += lengths[i5];
          } else {
            result.write(list2[i5], pos);
            pos += lengths[i5];
          }
        }
        return result;
      }
    };
    module2.exports = generate;
  }
});

// ../../node_modules/mqtt-packet/mqtt.js
var require_mqtt = __commonJS({
  "../../node_modules/mqtt-packet/mqtt.js"(exports2) {
    exports2.parser = require_parser().parser;
    exports2.generate = require_generate();
    exports2.writeToStream = require_writeToStream();
  }
});

// ../../node_modules/reinterval/index.js
var require_reinterval = __commonJS({
  "../../node_modules/reinterval/index.js"(exports2, module2) {
    "use strict";
    function ReInterval(callback, interval, args) {
      var self2 = this;
      this._callback = callback;
      this._args = args;
      this._interval = setInterval(callback, interval, this._args);
      this.reschedule = function(interval2) {
        if (!interval2)
          interval2 = self2._interval;
        if (self2._interval)
          clearInterval(self2._interval);
        self2._interval = setInterval(self2._callback, interval2, self2._args);
      };
      this.clear = function() {
        if (self2._interval) {
          clearInterval(self2._interval);
          self2._interval = void 0;
        }
      };
      this.destroy = function() {
        if (self2._interval) {
          clearInterval(self2._interval);
        }
        self2._callback = void 0;
        self2._interval = void 0;
        self2._args = void 0;
      };
    }
    function reInterval() {
      if (typeof arguments[0] !== "function")
        throw new Error("callback needed");
      if (typeof arguments[1] !== "number")
        throw new Error("interval needed");
      var args;
      if (arguments.length > 0) {
        args = new Array(arguments.length - 2);
        for (var i5 = 0; i5 < args.length; i5++) {
          args[i5] = arguments[i5 + 2];
        }
      }
      return new ReInterval(arguments[0], arguments[1], args);
    }
    module2.exports = reInterval;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/validations.js
var require_validations = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/validations.js"(exports2, module2) {
    "use strict";
    function validateTopic(topic2) {
      var parts = topic2.split("/");
      for (var i5 = 0; i5 < parts.length; i5++) {
        if (parts[i5] === "+") {
          continue;
        }
        if (parts[i5] === "#") {
          return i5 === parts.length - 1;
        }
        if (parts[i5].indexOf("+") !== -1 || parts[i5].indexOf("#") !== -1) {
          return false;
        }
      }
      return true;
    }
    function validateTopics(topics) {
      if (topics.length === 0) {
        return "empty_topic_list";
      }
      for (var i5 = 0; i5 < topics.length; i5++) {
        if (!validateTopic(topics[i5])) {
          return topics[i5];
        }
      }
      return null;
    }
    module2.exports = {
      validateTopics
    };
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/client.js
var require_client = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/client.js"(exports2, module2) {
    "use strict";
    var EventEmitter = require("events").EventEmitter;
    var Store = require_store();
    var mqttPacket = require_mqtt();
    var Writable = require_readable().Writable;
    var inherits = require_inherits();
    var reInterval = require_reinterval();
    var validations = require_validations();
    var xtend = require_immutable();
    var debug = require_src()("mqttjs:client");
    var nextTick = process ? process.nextTick : function(callback) {
      setTimeout(callback, 0);
    };
    var setImmediate2 = global.setImmediate || function(callback) {
      nextTick(callback);
    };
    var defaultConnectOptions = {
      keepalive: 60,
      reschedulePings: true,
      protocolId: "MQTT",
      protocolVersion: 4,
      reconnectPeriod: 1e3,
      connectTimeout: 30 * 1e3,
      clean: true,
      resubscribe: true
    };
    var socketErrors = [
      "ECONNREFUSED",
      "EADDRINUSE",
      "ECONNRESET",
      "ENOTFOUND"
    ];
    var errors = {
      0: "",
      1: "Unacceptable protocol version",
      2: "Identifier rejected",
      3: "Server unavailable",
      4: "Bad username or password",
      5: "Not authorized",
      16: "No matching subscribers",
      17: "No subscription existed",
      128: "Unspecified error",
      129: "Malformed Packet",
      130: "Protocol Error",
      131: "Implementation specific error",
      132: "Unsupported Protocol Version",
      133: "Client Identifier not valid",
      134: "Bad User Name or Password",
      135: "Not authorized",
      136: "Server unavailable",
      137: "Server busy",
      138: "Banned",
      139: "Server shutting down",
      140: "Bad authentication method",
      141: "Keep Alive timeout",
      142: "Session taken over",
      143: "Topic Filter invalid",
      144: "Topic Name invalid",
      145: "Packet identifier in use",
      146: "Packet Identifier not found",
      147: "Receive Maximum exceeded",
      148: "Topic Alias invalid",
      149: "Packet too large",
      150: "Message rate too high",
      151: "Quota exceeded",
      152: "Administrative action",
      153: "Payload format invalid",
      154: "Retain not supported",
      155: "QoS not supported",
      156: "Use another server",
      157: "Server moved",
      158: "Shared Subscriptions not supported",
      159: "Connection rate exceeded",
      160: "Maximum connect time",
      161: "Subscription Identifiers not supported",
      162: "Wildcard Subscriptions not supported"
    };
    function defaultId() {
      return "mqttjs_" + Math.random().toString(16).substr(2, 8);
    }
    function sendPacket(client, packet, cb) {
      debug("sendPacket :: packet: %O", packet);
      debug("sendPacket :: emitting `packetsend`");
      client.emit("packetsend", packet);
      debug("sendPacket :: writing to stream");
      var result = mqttPacket.writeToStream(packet, client.stream, client.options);
      debug("sendPacket :: writeToStream result %s", result);
      if (!result && cb) {
        debug("sendPacket :: handle events on `drain` once through callback.");
        client.stream.once("drain", cb);
      } else if (cb) {
        debug("sendPacket :: invoking cb");
        cb();
      }
    }
    function flush(queue) {
      if (queue) {
        debug("flush: queue exists? %b", !!queue);
        Object.keys(queue).forEach(function(messageId) {
          if (typeof queue[messageId].cb === "function") {
            queue[messageId].cb(new Error("Connection closed"));
            delete queue[messageId];
          }
        });
      }
    }
    function flushVolatile(queue) {
      if (queue) {
        debug("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function");
        Object.keys(queue).forEach(function(messageId) {
          if (queue[messageId].volatile && typeof queue[messageId].cb === "function") {
            queue[messageId].cb(new Error("Connection closed"));
            delete queue[messageId];
          }
        });
      }
    }
    function storeAndSend(client, packet, cb, cbStorePut) {
      debug("storeAndSend :: store packet with cmd %s to outgoingStore", packet.cmd);
      client.outgoingStore.put(packet, function storedPacket(err) {
        if (err) {
          return cb && cb(err);
        }
        cbStorePut();
        sendPacket(client, packet, cb);
      });
    }
    function nop(error3) {
      debug("nop ::", error3);
    }
    function MqttClient(streamBuilder, options) {
      var k5;
      var that = this;
      if (!(this instanceof MqttClient)) {
        return new MqttClient(streamBuilder, options);
      }
      this.options = options || {};
      for (k5 in defaultConnectOptions) {
        if (typeof this.options[k5] === "undefined") {
          this.options[k5] = defaultConnectOptions[k5];
        } else {
          this.options[k5] = options[k5];
        }
      }
      debug("MqttClient :: options.protocol", options.protocol);
      debug("MqttClient :: options.protocolVersion", options.protocolVersion);
      debug("MqttClient :: options.username", options.username);
      debug("MqttClient :: options.keepalive", options.keepalive);
      debug("MqttClient :: options.reconnectPeriod", options.reconnectPeriod);
      debug("MqttClient :: options.rejectUnauthorized", options.rejectUnauthorized);
      this.options.clientId = typeof options.clientId === "string" ? options.clientId : defaultId();
      debug("MqttClient :: clientId", this.options.clientId);
      this.options.customHandleAcks = options.protocolVersion === 5 && options.customHandleAcks ? options.customHandleAcks : function() {
        arguments[3](0);
      };
      this.streamBuilder = streamBuilder;
      this.outgoingStore = options.outgoingStore || new Store();
      this.incomingStore = options.incomingStore || new Store();
      this.queueQoSZero = options.queueQoSZero === void 0 ? true : options.queueQoSZero;
      this._resubscribeTopics = {};
      this.messageIdToTopic = {};
      this.pingTimer = null;
      this.connected = false;
      this.disconnecting = false;
      this.queue = [];
      this.connackTimer = null;
      this.reconnectTimer = null;
      this._storeProcessing = false;
      this._packetIdsDuringStoreProcessing = {};
      this.nextId = Math.max(1, Math.floor(Math.random() * 65535));
      this.outgoing = {};
      this._firstConnection = true;
      this.on("connect", function() {
        var queue = this.queue;
        function deliver() {
          var entry = queue.shift();
          debug("deliver :: entry %o", entry);
          var packet = null;
          if (!entry) {
            return;
          }
          packet = entry.packet;
          debug("deliver :: call _sendPacket for %o", packet);
          that._sendPacket(
            packet,
            function(err) {
              if (entry.cb) {
                entry.cb(err);
              }
              deliver();
            }
          );
        }
        debug("connect :: sending queued packets");
        deliver();
      });
      this.on("close", function() {
        debug("close :: connected set to `false`");
        this.connected = false;
        debug("close :: clearing connackTimer");
        clearTimeout(this.connackTimer);
        debug("close :: clearing ping timer");
        if (that.pingTimer !== null) {
          that.pingTimer.clear();
          that.pingTimer = null;
        }
        debug("close :: calling _setupReconnect");
        this._setupReconnect();
      });
      EventEmitter.call(this);
      debug("MqttClient :: setting up stream");
      this._setupStream();
    }
    inherits(MqttClient, EventEmitter);
    MqttClient.prototype._setupStream = function() {
      var connectPacket;
      var that = this;
      var writable = new Writable();
      var parser = mqttPacket.parser(this.options);
      var completeParse = null;
      var packets = [];
      debug("_setupStream :: calling method to clear reconnect");
      this._clearReconnect();
      debug("_setupStream :: using streamBuilder provided to client to create stream");
      this.stream = this.streamBuilder(this);
      parser.on("packet", function(packet) {
        debug("parser :: on packet push to packets array.");
        packets.push(packet);
      });
      function nextTickWork() {
        if (packets.length) {
          nextTick(work);
        } else {
          var done = completeParse;
          completeParse = null;
          done();
        }
      }
      function work() {
        debug("work :: getting next packet in queue");
        var packet = packets.shift();
        if (packet) {
          debug("work :: packet pulled from queue");
          that._handlePacket(packet, nextTickWork);
        } else {
          debug("work :: no packets in queue");
          var done = completeParse;
          completeParse = null;
          debug("work :: done flag is %s", !!done);
          if (done) done();
        }
      }
      writable._write = function(buf, enc, done) {
        completeParse = done;
        debug("writable stream :: parsing buffer");
        parser.parse(buf);
        work();
      };
      function streamErrorHandler(error3) {
        debug("streamErrorHandler :: error", error3.message);
        if (socketErrors.includes(error3.code)) {
          debug("streamErrorHandler :: emitting error");
          that.emit("error", error3);
        } else {
          nop(error3);
        }
      }
      debug("_setupStream :: pipe stream to writable stream");
      this.stream.pipe(writable);
      this.stream.on("error", streamErrorHandler);
      this.stream.on("close", function() {
        debug("(%s)stream :: on close", that.options.clientId);
        flushVolatile(that.outgoing);
        debug("stream: emit close to MqttClient");
        that.emit("close");
      });
      debug("_setupStream: sending packet `connect`");
      connectPacket = Object.create(this.options);
      connectPacket.cmd = "connect";
      sendPacket(this, connectPacket);
      parser.on("error", this.emit.bind(this, "error"));
      if (this.options.properties) {
        if (!this.options.properties.authenticationMethod && this.options.properties.authenticationData) {
          that.end(() => this.emit(
            "error",
            new Error("Packet has no Authentication Method")
          ));
          return this;
        }
        if (this.options.properties.authenticationMethod && this.options.authPacket && typeof this.options.authPacket === "object") {
          var authPacket = xtend({ cmd: "auth", reasonCode: 0 }, this.options.authPacket);
          sendPacket(this, authPacket);
        }
      }
      this.stream.setMaxListeners(1e3);
      clearTimeout(this.connackTimer);
      this.connackTimer = setTimeout(function() {
        debug("!!connectTimeout hit!! Calling _cleanUp with force `true`");
        that._cleanUp(true);
      }, this.options.connectTimeout);
    };
    MqttClient.prototype._handlePacket = function(packet, done) {
      var options = this.options;
      if (options.protocolVersion === 5 && options.properties && options.properties.maximumPacketSize && options.properties.maximumPacketSize < packet.length) {
        this.emit("error", new Error("exceeding packets size " + packet.cmd));
        this.end({ reasonCode: 149, properties: { reasonString: "Maximum packet size was exceeded" } });
        return this;
      }
      debug("_handlePacket :: emitting packetreceive");
      this.emit("packetreceive", packet);
      switch (packet.cmd) {
        case "publish":
          this._handlePublish(packet, done);
          break;
        case "puback":
        case "pubrec":
        case "pubcomp":
        case "suback":
        case "unsuback":
          this._handleAck(packet);
          done();
          break;
        case "pubrel":
          this._handlePubrel(packet, done);
          break;
        case "connack":
          this._handleConnack(packet);
          done();
          break;
        case "pingresp":
          this._handlePingresp(packet);
          done();
          break;
        case "disconnect":
          this._handleDisconnect(packet);
          done();
          break;
        default:
          break;
      }
    };
    MqttClient.prototype._checkDisconnecting = function(callback) {
      if (this.disconnecting) {
        if (callback) {
          callback(new Error("client disconnecting"));
        } else {
          this.emit("error", new Error("client disconnecting"));
        }
      }
      return this.disconnecting;
    };
    MqttClient.prototype.publish = function(topic2, message, opts, callback) {
      debug("publish :: message `%s` to topic `%s`", message, topic2);
      var packet;
      var options = this.options;
      if (typeof opts === "function") {
        callback = opts;
        opts = null;
      }
      var defaultOpts = { qos: 0, retain: false, dup: false };
      opts = xtend(defaultOpts, opts);
      if (this._checkDisconnecting(callback)) {
        return this;
      }
      packet = {
        cmd: "publish",
        topic: topic2,
        payload: message,
        qos: opts.qos,
        retain: opts.retain,
        messageId: this._nextId(),
        dup: opts.dup
      };
      if (options.protocolVersion === 5) {
        packet.properties = opts.properties;
        if (!options.properties && packet.properties && packet.properties.topicAlias || opts.properties && options.properties && (opts.properties.topicAlias && options.properties.topicAliasMaximum && opts.properties.topicAlias > options.properties.topicAliasMaximum || !options.properties.topicAliasMaximum && opts.properties.topicAlias)) {
          delete packet.properties.topicAlias;
        }
      }
      debug("publish :: qos", opts.qos);
      switch (opts.qos) {
        case 1:
        case 2:
          this.outgoing[packet.messageId] = {
            volatile: false,
            cb: callback || nop
          };
          if (this._storeProcessing) {
            debug("_storeProcessing enabled");
            this._packetIdsDuringStoreProcessing[packet.messageId] = false;
            this._storePacket(packet, void 0, opts.cbStorePut);
          } else {
            debug("MqttClient:publish: packet cmd: %s", packet.cmd);
            this._sendPacket(packet, void 0, opts.cbStorePut);
          }
          break;
        default:
          if (this._storeProcessing) {
            debug("_storeProcessing enabled");
            this._storePacket(packet, callback, opts.cbStorePut);
          } else {
            debug("MqttClient:publish: packet cmd: %s", packet.cmd);
            this._sendPacket(packet, callback, opts.cbStorePut);
          }
          break;
      }
      return this;
    };
    MqttClient.prototype.subscribe = function() {
      var packet;
      var args = new Array(arguments.length);
      for (var i5 = 0; i5 < arguments.length; i5++) {
        args[i5] = arguments[i5];
      }
      var subs = [];
      var obj = args.shift();
      var resubscribe = obj.resubscribe;
      var callback = args.pop() || nop;
      var opts = args.pop();
      var invalidTopic;
      var that = this;
      var version = this.options.protocolVersion;
      delete obj.resubscribe;
      if (typeof obj === "string") {
        obj = [obj];
      }
      if (typeof callback !== "function") {
        opts = callback;
        callback = nop;
      }
      invalidTopic = validations.validateTopics(obj);
      if (invalidTopic !== null) {
        setImmediate2(callback, new Error("Invalid topic " + invalidTopic));
        return this;
      }
      if (this._checkDisconnecting(callback)) {
        debug("subscribe: discconecting true");
        return this;
      }
      var defaultOpts = {
        qos: 0
      };
      if (version === 5) {
        defaultOpts.nl = false;
        defaultOpts.rap = false;
        defaultOpts.rh = 0;
      }
      opts = xtend(defaultOpts, opts);
      if (Array.isArray(obj)) {
        obj.forEach(function(topic2) {
          debug("subscribe: array topic %s", topic2);
          if (!that._resubscribeTopics.hasOwnProperty(topic2) || that._resubscribeTopics[topic2].qos < opts.qos || resubscribe) {
            var currentOpts = {
              topic: topic2,
              qos: opts.qos
            };
            if (version === 5) {
              currentOpts.nl = opts.nl;
              currentOpts.rap = opts.rap;
              currentOpts.rh = opts.rh;
              currentOpts.properties = opts.properties;
            }
            debug("subscribe: pushing topic `%s` and qos `%s` to subs list", currentOpts.topic, currentOpts.qos);
            subs.push(currentOpts);
          }
        });
      } else {
        Object.keys(obj).forEach(function(k5) {
          debug("subscribe: object topic %s", k5);
          if (!that._resubscribeTopics.hasOwnProperty(k5) || that._resubscribeTopics[k5].qos < obj[k5].qos || resubscribe) {
            var currentOpts = {
              topic: k5,
              qos: obj[k5].qos
            };
            if (version === 5) {
              currentOpts.nl = obj[k5].nl;
              currentOpts.rap = obj[k5].rap;
              currentOpts.rh = obj[k5].rh;
              currentOpts.properties = opts.properties;
            }
            debug("subscribe: pushing `%s` to subs list", currentOpts);
            subs.push(currentOpts);
          }
        });
      }
      packet = {
        cmd: "subscribe",
        subscriptions: subs,
        qos: 1,
        retain: false,
        dup: false,
        messageId: this._nextId()
      };
      if (opts.properties) {
        packet.properties = opts.properties;
      }
      if (!subs.length) {
        callback(null, []);
        return;
      }
      if (this.options.resubscribe) {
        debug("subscribe :: resubscribe true");
        var topics = [];
        subs.forEach(function(sub) {
          if (that.options.reconnectPeriod > 0) {
            var topic2 = { qos: sub.qos };
            if (version === 5) {
              topic2.nl = sub.nl || false;
              topic2.rap = sub.rap || false;
              topic2.rh = sub.rh || 0;
              topic2.properties = sub.properties;
            }
            that._resubscribeTopics[sub.topic] = topic2;
            topics.push(sub.topic);
          }
        });
        that.messageIdToTopic[packet.messageId] = topics;
      }
      this.outgoing[packet.messageId] = {
        volatile: true,
        cb: function(err, packet2) {
          if (!err) {
            var granted = packet2.granted;
            for (var i6 = 0; i6 < granted.length; i6 += 1) {
              subs[i6].qos = granted[i6];
            }
          }
          callback(err, subs);
        }
      };
      debug("subscribe :: call _sendPacket");
      this._sendPacket(packet);
      return this;
    };
    MqttClient.prototype.unsubscribe = function() {
      var packet = {
        cmd: "unsubscribe",
        qos: 1,
        messageId: this._nextId()
      };
      var that = this;
      var args = new Array(arguments.length);
      for (var i5 = 0; i5 < arguments.length; i5++) {
        args[i5] = arguments[i5];
      }
      var topic2 = args.shift();
      var callback = args.pop() || nop;
      var opts = args.pop();
      if (typeof topic2 === "string") {
        topic2 = [topic2];
      }
      if (typeof callback !== "function") {
        opts = callback;
        callback = nop;
      }
      if (this._checkDisconnecting(callback)) {
        return this;
      }
      if (typeof topic2 === "string") {
        packet.unsubscriptions = [topic2];
      } else if (Array.isArray(topic2)) {
        packet.unsubscriptions = topic2;
      }
      if (this.options.resubscribe) {
        packet.unsubscriptions.forEach(function(topic3) {
          delete that._resubscribeTopics[topic3];
        });
      }
      if (typeof opts === "object" && opts.properties) {
        packet.properties = opts.properties;
      }
      this.outgoing[packet.messageId] = {
        volatile: true,
        cb: callback
      };
      debug("unsubscribe: call _sendPacket");
      this._sendPacket(packet);
      return this;
    };
    MqttClient.prototype.end = function(force, opts, cb) {
      var that = this;
      debug("end :: (%s)", this.options.clientId);
      if (force == null || typeof force !== "boolean") {
        cb = opts || nop;
        opts = force;
        force = false;
        if (typeof opts !== "object") {
          cb = opts;
          opts = null;
          if (typeof cb !== "function") {
            cb = nop;
          }
        }
      }
      if (typeof opts !== "object") {
        cb = opts;
        opts = null;
      }
      debug("end :: cb? %s", !!cb);
      cb = cb || nop;
      function closeStores() {
        debug("end :: closeStores: closing incoming and outgoing stores");
        that.disconnected = true;
        that.incomingStore.close(function(e1) {
          that.outgoingStore.close(function(e22) {
            debug("end :: closeStores: emitting end");
            that.emit("end");
            if (cb) {
              let err = e1 || e22;
              debug("end :: closeStores: invoking callback with args");
              cb(err);
            }
          });
        });
        if (that._deferredReconnect) {
          that._deferredReconnect();
        }
      }
      function finish() {
        debug("end :: (%s) :: finish :: calling _cleanUp with force %s", that.options.clientId, force);
        that._cleanUp(force, () => {
          debug("end :: finish :: calling process.nextTick on closeStores");
          nextTick(closeStores.bind(that));
        }, opts);
      }
      if (this.disconnecting) {
        cb();
        return this;
      }
      this._clearReconnect();
      this.disconnecting = true;
      if (!force && Object.keys(this.outgoing).length > 0) {
        debug("end :: (%s) :: calling finish in 10ms once outgoing is empty", that.options.clientId);
        this.once("outgoingEmpty", setTimeout.bind(null, finish, 10));
      } else {
        debug("end :: (%s) :: immediately calling finish", that.options.clientId);
        finish();
      }
      return this;
    };
    MqttClient.prototype.removeOutgoingMessage = function(messageId) {
      var cb = this.outgoing[messageId] ? this.outgoing[messageId].cb : null;
      delete this.outgoing[messageId];
      this.outgoingStore.del({ messageId }, function() {
        cb(new Error("Message removed"));
      });
      return this;
    };
    MqttClient.prototype.reconnect = function(opts) {
      debug("client reconnect");
      var that = this;
      var f5 = function() {
        if (opts) {
          that.options.incomingStore = opts.incomingStore;
          that.options.outgoingStore = opts.outgoingStore;
        } else {
          that.options.incomingStore = null;
          that.options.outgoingStore = null;
        }
        that.incomingStore = that.options.incomingStore || new Store();
        that.outgoingStore = that.options.outgoingStore || new Store();
        that.disconnecting = false;
        that.disconnected = false;
        that._deferredReconnect = null;
        that._reconnect();
      };
      if (this.disconnecting && !this.disconnected) {
        this._deferredReconnect = f5;
      } else {
        f5();
      }
      return this;
    };
    MqttClient.prototype._reconnect = function() {
      debug("_reconnect: emitting reconnect to client");
      this.emit("reconnect");
      if (this.connected) {
        this.end(() => {
          this._setupStream();
        });
        debug("client already connected. disconnecting first.");
      } else {
        debug("_reconnect: calling _setupStream");
        this._setupStream();
      }
    };
    MqttClient.prototype._setupReconnect = function() {
      var that = this;
      if (!that.disconnecting && !that.reconnectTimer && that.options.reconnectPeriod > 0) {
        if (!this.reconnecting) {
          debug("_setupReconnect :: emit `offline` state");
          this.emit("offline");
          debug("_setupReconnect :: set `reconnecting` to `true`");
          this.reconnecting = true;
        }
        debug("_setupReconnect :: setting reconnectTimer for %d ms", that.options.reconnectPeriod);
        that.reconnectTimer = setInterval(function() {
          debug("reconnectTimer :: reconnect triggered!");
          that._reconnect();
        }, that.options.reconnectPeriod);
      } else {
        debug("_setupReconnect :: doing nothing...");
      }
    };
    MqttClient.prototype._clearReconnect = function() {
      debug("_clearReconnect : clearing reconnect timer");
      if (this.reconnectTimer) {
        clearInterval(this.reconnectTimer);
        this.reconnectTimer = null;
      }
    };
    MqttClient.prototype._cleanUp = function(forced, done) {
      var opts = arguments[2];
      if (done) {
        debug("_cleanUp :: done callback provided for on stream close");
        this.stream.on("close", done);
      }
      debug("_cleanUp :: forced? %s", forced);
      if (forced) {
        if (this.options.reconnectPeriod === 0 && this.options.clean) {
          flush(this.outgoing);
        }
        debug("_cleanUp :: (%s) :: destroying stream", this.options.clientId);
        this.stream.destroy();
      } else {
        var packet = xtend({ cmd: "disconnect" }, opts);
        debug("_cleanUp :: (%s) :: call _sendPacket with disconnect packet", this.options.clientId);
        this._sendPacket(
          packet,
          setImmediate2.bind(
            null,
            this.stream.end.bind(this.stream)
          )
        );
      }
      if (!this.disconnecting) {
        debug("_cleanUp :: client not disconnecting. Clearing and resetting reconnect.");
        this._clearReconnect();
        this._setupReconnect();
      }
      if (this.pingTimer !== null) {
        debug("_cleanUp :: clearing pingTimer");
        this.pingTimer.clear();
        this.pingTimer = null;
      }
      if (done && !this.connected) {
        debug("_cleanUp :: (%s) :: removing stream `done` callback `close` listener", this.options.clientId);
        this.stream.removeListener("close", done);
        done();
      }
    };
    MqttClient.prototype._sendPacket = function(packet, cb, cbStorePut) {
      debug("_sendPacket :: (%s) ::  start", this.options.clientId);
      cbStorePut = cbStorePut || nop;
      if (!this.connected) {
        debug("_sendPacket :: client not connected. Storing packet offline.");
        this._storePacket(packet, cb, cbStorePut);
        return;
      }
      this._shiftPingInterval();
      switch (packet.cmd) {
        case "publish":
          break;
        case "pubrel":
          storeAndSend(this, packet, cb, cbStorePut);
          return;
        default:
          sendPacket(this, packet, cb);
          return;
      }
      switch (packet.qos) {
        case 2:
        case 1:
          storeAndSend(this, packet, cb, cbStorePut);
          break;
        /**
         * no need of case here since it will be caught by default
         * and jshint comply that before default it must be a break
         * anyway it will result in -1 evaluation
         */
        case 0:
        /* falls through */
        default:
          sendPacket(this, packet, cb);
          break;
      }
      debug("_sendPacket :: (%s) ::  end", this.options.clientId);
    };
    MqttClient.prototype._storePacket = function(packet, cb, cbStorePut) {
      debug("_storePacket :: packet: %o", packet);
      debug("_storePacket :: cb? %s", !!cb);
      cbStorePut = cbStorePut || nop;
      if ((packet.qos || 0) === 0 && this.queueQoSZero || packet.cmd !== "publish") {
        this.queue.push({ packet, cb });
      } else if (packet.qos > 0) {
        cb = this.outgoing[packet.messageId] ? this.outgoing[packet.messageId].cb : null;
        this.outgoingStore.put(packet, function(err) {
          if (err) {
            return cb && cb(err);
          }
          cbStorePut();
        });
      } else if (cb) {
        cb(new Error("No connection to broker"));
      }
    };
    MqttClient.prototype._setupPingTimer = function() {
      debug("_setupPingTimer :: keepalive %d (seconds)", this.options.keepalive);
      var that = this;
      if (!this.pingTimer && this.options.keepalive) {
        this.pingResp = true;
        this.pingTimer = reInterval(function() {
          that._checkPing();
        }, this.options.keepalive * 1e3);
      }
    };
    MqttClient.prototype._shiftPingInterval = function() {
      if (this.pingTimer && this.options.keepalive && this.options.reschedulePings) {
        this.pingTimer.reschedule(this.options.keepalive * 1e3);
      }
    };
    MqttClient.prototype._checkPing = function() {
      debug("_checkPing :: checking ping...");
      if (this.pingResp) {
        debug("_checkPing :: ping response received. Clearing flag and sending `pingreq`");
        this.pingResp = false;
        this._sendPacket({ cmd: "pingreq" });
      } else {
        debug("_checkPing :: calling _cleanUp with force true");
        this._cleanUp(true);
      }
    };
    MqttClient.prototype._handlePingresp = function() {
      this.pingResp = true;
    };
    MqttClient.prototype._handleConnack = function(packet) {
      debug("_handleConnack");
      var options = this.options;
      var version = options.protocolVersion;
      var rc = version === 5 ? packet.reasonCode : packet.returnCode;
      clearTimeout(this.connackTimer);
      if (packet.properties) {
        if (packet.properties.topicAliasMaximum) {
          if (!options.properties) {
            options.properties = {};
          }
          options.properties.topicAliasMaximum = packet.properties.topicAliasMaximum;
        }
        if (packet.properties.serverKeepAlive && options.keepalive) {
          options.keepalive = packet.properties.serverKeepAlive;
          this._shiftPingInterval();
        }
        if (packet.properties.maximumPacketSize) {
          if (!options.properties) {
            options.properties = {};
          }
          options.properties.maximumPacketSize = packet.properties.maximumPacketSize;
        }
      }
      if (rc === 0) {
        this.reconnecting = false;
        this._onConnect(packet);
      } else if (rc > 0) {
        var err = new Error("Connection refused: " + errors[rc]);
        err.code = rc;
        this.emit("error", err);
      }
    };
    MqttClient.prototype._handlePublish = function(packet, done) {
      debug("_handlePublish: packet %o", packet);
      done = typeof done !== "undefined" ? done : nop;
      var topic2 = packet.topic.toString();
      var message = packet.payload;
      var qos = packet.qos;
      var messageId = packet.messageId;
      var that = this;
      var options = this.options;
      var validReasonCodes = [0, 16, 128, 131, 135, 144, 145, 151, 153];
      debug("_handlePublish: qos %d", qos);
      switch (qos) {
        case 2: {
          options.customHandleAcks(topic2, message, packet, function(error3, code) {
            if (!(error3 instanceof Error)) {
              code = error3;
              error3 = null;
            }
            if (error3) {
              return that.emit("error", error3);
            }
            if (validReasonCodes.indexOf(code) === -1) {
              return that.emit("error", new Error("Wrong reason code for pubrec"));
            }
            if (code) {
              that._sendPacket({ cmd: "pubrec", messageId, reasonCode: code }, done);
            } else {
              that.incomingStore.put(packet, function() {
                that._sendPacket({ cmd: "pubrec", messageId }, done);
              });
            }
          });
          break;
        }
        case 1: {
          options.customHandleAcks(topic2, message, packet, function(error3, code) {
            if (!(error3 instanceof Error)) {
              code = error3;
              error3 = null;
            }
            if (error3) {
              return that.emit("error", error3);
            }
            if (validReasonCodes.indexOf(code) === -1) {
              return that.emit("error", new Error("Wrong reason code for puback"));
            }
            if (!code) {
              that.emit("message", topic2, message, packet);
            }
            that.handleMessage(packet, function(err) {
              if (err) {
                return done && done(err);
              }
              that._sendPacket({ cmd: "puback", messageId, reasonCode: code }, done);
            });
          });
          break;
        }
        case 0:
          this.emit("message", topic2, message, packet);
          this.handleMessage(packet, done);
          break;
        default:
          debug("_handlePublish: unknown QoS. Doing nothing.");
          break;
      }
    };
    MqttClient.prototype.handleMessage = function(packet, callback) {
      callback();
    };
    MqttClient.prototype._handleAck = function(packet) {
      var messageId = packet.messageId;
      var type = packet.cmd;
      var response = null;
      var cb = this.outgoing[messageId] ? this.outgoing[messageId].cb : null;
      var that = this;
      var err;
      if (!cb) {
        debug("_handleAck :: Server sent an ack in error. Ignoring.");
        return;
      }
      debug("_handleAck :: packet type", type);
      switch (type) {
        case "pubcomp":
        // same thing as puback for QoS 2
        case "puback":
          var pubackRC = packet.reasonCode;
          if (pubackRC && pubackRC > 0 && pubackRC !== 16) {
            err = new Error("Publish error: " + errors[pubackRC]);
            err.code = pubackRC;
            cb(err, packet);
          }
          delete this.outgoing[messageId];
          this.outgoingStore.del(packet, cb);
          break;
        case "pubrec":
          response = {
            cmd: "pubrel",
            qos: 2,
            messageId
          };
          var pubrecRC = packet.reasonCode;
          if (pubrecRC && pubrecRC > 0 && pubrecRC !== 16) {
            err = new Error("Publish error: " + errors[pubrecRC]);
            err.code = pubrecRC;
            cb(err, packet);
          } else {
            this._sendPacket(response);
          }
          break;
        case "suback":
          delete this.outgoing[messageId];
          for (var grantedI = 0; grantedI < packet.granted.length; grantedI++) {
            if ((packet.granted[grantedI] & 128) !== 0) {
              var topics = this.messageIdToTopic[messageId];
              if (topics) {
                topics.forEach(function(topic2) {
                  delete that._resubscribeTopics[topic2];
                });
              }
            }
          }
          cb(null, packet);
          break;
        case "unsuback":
          delete this.outgoing[messageId];
          cb(null);
          break;
        default:
          that.emit("error", new Error("unrecognized packet type"));
      }
      if (this.disconnecting && Object.keys(this.outgoing).length === 0) {
        this.emit("outgoingEmpty");
      }
    };
    MqttClient.prototype._handlePubrel = function(packet, callback) {
      debug("handling pubrel packet");
      callback = typeof callback !== "undefined" ? callback : nop;
      var messageId = packet.messageId;
      var that = this;
      var comp = { cmd: "pubcomp", messageId };
      that.incomingStore.get(packet, function(err, pub) {
        if (!err) {
          that.emit("message", pub.topic, pub.payload, pub);
          that.handleMessage(pub, function(err2) {
            if (err2) {
              return callback(err2);
            }
            that.incomingStore.del(pub, nop);
            that._sendPacket(comp, callback);
          });
        } else {
          that._sendPacket(comp, callback);
        }
      });
    };
    MqttClient.prototype._handleDisconnect = function(packet) {
      this.emit("disconnect", packet);
    };
    MqttClient.prototype._nextId = function() {
      var id = this.nextId++;
      if (this.nextId === 65536) {
        this.nextId = 1;
      }
      return id;
    };
    MqttClient.prototype.getLastMessageId = function() {
      return this.nextId === 1 ? 65535 : this.nextId - 1;
    };
    MqttClient.prototype._resubscribe = function(connack) {
      debug("_resubscribe");
      var _resubscribeTopicsKeys = Object.keys(this._resubscribeTopics);
      if (!this._firstConnection && (this.options.clean || this.options.protocolVersion === 5 && !connack.sessionPresent) && _resubscribeTopicsKeys.length > 0) {
        if (this.options.resubscribe) {
          if (this.options.protocolVersion === 5) {
            debug("_resubscribe: protocolVersion 5");
            for (var topicI = 0; topicI < _resubscribeTopicsKeys.length; topicI++) {
              var resubscribeTopic = {};
              resubscribeTopic[_resubscribeTopicsKeys[topicI]] = this._resubscribeTopics[_resubscribeTopicsKeys[topicI]];
              resubscribeTopic.resubscribe = true;
              this.subscribe(resubscribeTopic, { properties: resubscribeTopic[_resubscribeTopicsKeys[topicI]].properties });
            }
          } else {
            this._resubscribeTopics.resubscribe = true;
            this.subscribe(this._resubscribeTopics);
          }
        } else {
          this._resubscribeTopics = {};
        }
      }
      this._firstConnection = false;
    };
    MqttClient.prototype._onConnect = function(packet) {
      if (this.disconnected) {
        this.emit("connect", packet);
        return;
      }
      var that = this;
      this._setupPingTimer();
      this._resubscribe(packet);
      this.connected = true;
      function startStreamProcess() {
        var outStore = that.outgoingStore.createStream();
        function clearStoreProcessing() {
          that._storeProcessing = false;
          that._packetIdsDuringStoreProcessing = {};
        }
        that.once("close", remove);
        outStore.on("error", function(err) {
          clearStoreProcessing();
          that.removeListener("close", remove);
          that.emit("error", err);
        });
        function remove() {
          outStore.destroy();
          outStore = null;
          clearStoreProcessing();
        }
        function storeDeliver() {
          if (!outStore) {
            return;
          }
          that._storeProcessing = true;
          var packet2 = outStore.read(1);
          var cb;
          if (!packet2) {
            outStore.once("readable", storeDeliver);
            return;
          }
          if (that._packetIdsDuringStoreProcessing[packet2.messageId]) {
            storeDeliver();
            return;
          }
          if (!that.disconnecting && !that.reconnectTimer) {
            cb = that.outgoing[packet2.messageId] ? that.outgoing[packet2.messageId].cb : null;
            that.outgoing[packet2.messageId] = {
              volatile: false,
              cb: function(err, status) {
                if (cb) {
                  cb(err, status);
                }
                storeDeliver();
              }
            };
            that._packetIdsDuringStoreProcessing[packet2.messageId] = true;
            that._sendPacket(packet2);
          } else if (outStore.destroy) {
            outStore.destroy();
          }
        }
        outStore.on("end", function() {
          var allProcessed = true;
          for (var id in that._packetIdsDuringStoreProcessing) {
            if (!that._packetIdsDuringStoreProcessing[id]) {
              allProcessed = false;
              break;
            }
          }
          if (allProcessed) {
            clearStoreProcessing();
            that.removeListener("close", remove);
            that.emit("connect", packet);
          } else {
            startStreamProcess();
          }
        });
        storeDeliver();
      }
      startStreamProcess();
    };
    module2.exports = MqttClient;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/tcp.js
var require_tcp = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/tcp.js"(exports2, module2) {
    "use strict";
    var net = require("net");
    var debug = require_src()("mqttjs:tcp");
    function streamBuilder(client, opts) {
      var port, host;
      opts.port = opts.port || 1883;
      opts.hostname = opts.hostname || opts.host || "localhost";
      port = opts.port;
      host = opts.hostname;
      debug("port %d and host %s", port, host);
      return net.createConnection(port, host);
    }
    module2.exports = streamBuilder;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/tls.js
var require_tls = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/tls.js"(exports2, module2) {
    "use strict";
    var tls = require("tls");
    var debug = require_src()("mqttjs:tls");
    function buildBuilder(mqttClient, opts) {
      var connection;
      opts.port = opts.port || 8883;
      opts.host = opts.hostname || opts.host || "localhost";
      opts.servername = opts.host;
      opts.rejectUnauthorized = opts.rejectUnauthorized !== false;
      delete opts.path;
      debug("port %d host %s rejectUnauthorized %b", opts.port, opts.host, opts.rejectUnauthorized);
      connection = tls.connect(opts);
      connection.on("secureConnect", function() {
        if (opts.rejectUnauthorized && !connection.authorized) {
          connection.emit("error", new Error("TLS not authorized"));
        } else {
          connection.removeListener("error", handleTLSerrors);
        }
      });
      function handleTLSerrors(err) {
        if (opts.rejectUnauthorized) {
          mqttClient.emit("error", err);
        }
        connection.end();
      }
      connection.on("error", handleTLSerrors);
      return connection;
    }
    module2.exports = buildBuilder;
  }
});

// ../../node_modules/wrappy/wrappy.js
var require_wrappy = __commonJS({
  "../../node_modules/wrappy/wrappy.js"(exports2, module2) {
    module2.exports = wrappy;
    function wrappy(fn, cb) {
      if (fn && cb) return wrappy(fn)(cb);
      if (typeof fn !== "function")
        throw new TypeError("need wrapper function");
      Object.keys(fn).forEach(function(k5) {
        wrapper[k5] = fn[k5];
      });
      return wrapper;
      function wrapper() {
        var args = new Array(arguments.length);
        for (var i5 = 0; i5 < args.length; i5++) {
          args[i5] = arguments[i5];
        }
        var ret = fn.apply(this, args);
        var cb2 = args[args.length - 1];
        if (typeof ret === "function" && ret !== cb2) {
          Object.keys(cb2).forEach(function(k5) {
            ret[k5] = cb2[k5];
          });
        }
        return ret;
      }
    }
  }
});

// ../../node_modules/once/once.js
var require_once = __commonJS({
  "../../node_modules/once/once.js"(exports2, module2) {
    var wrappy = require_wrappy();
    module2.exports = wrappy(once);
    module2.exports.strict = wrappy(onceStrict);
    once.proto = once(function() {
      Object.defineProperty(Function.prototype, "once", {
        value: function() {
          return once(this);
        },
        configurable: true
      });
      Object.defineProperty(Function.prototype, "onceStrict", {
        value: function() {
          return onceStrict(this);
        },
        configurable: true
      });
    });
    function once(fn) {
      var f5 = function() {
        if (f5.called) return f5.value;
        f5.called = true;
        return f5.value = fn.apply(this, arguments);
      };
      f5.called = false;
      return f5;
    }
    function onceStrict(fn) {
      var f5 = function() {
        if (f5.called)
          throw new Error(f5.onceError);
        f5.called = true;
        return f5.value = fn.apply(this, arguments);
      };
      var name = fn.name || "Function wrapped with `once`";
      f5.onceError = name + " shouldn't be called more than once";
      f5.called = false;
      return f5;
    }
  }
});

// ../../node_modules/end-of-stream/index.js
var require_end_of_stream3 = __commonJS({
  "../../node_modules/end-of-stream/index.js"(exports2, module2) {
    var once = require_once();
    var noop = function() {
    };
    var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process);
    var isRequest = function(stream) {
      return stream.setHeader && typeof stream.abort === "function";
    };
    var isChildProcess = function(stream) {
      return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3;
    };
    var eos = function(stream, opts, callback) {
      if (typeof opts === "function") return eos(stream, null, opts);
      if (!opts) opts = {};
      callback = once(callback || noop);
      var ws = stream._writableState;
      var rs = stream._readableState;
      var readable = opts.readable || opts.readable !== false && stream.readable;
      var writable = opts.writable || opts.writable !== false && stream.writable;
      var cancelled = false;
      var onlegacyfinish = function() {
        if (!stream.writable) onfinish();
      };
      var onfinish = function() {
        writable = false;
        if (!readable) callback.call(stream);
      };
      var onend = function() {
        readable = false;
        if (!writable) callback.call(stream);
      };
      var onexit = function(exitCode) {
        callback.call(stream, exitCode ? new Error("exited with error code: " + exitCode) : null);
      };
      var onerror = function(err) {
        callback.call(stream, err);
      };
      var onclose = function() {
        qnt(onclosenexttick);
      };
      var onclosenexttick = function() {
        if (cancelled) return;
        if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error("premature close"));
        if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error("premature close"));
      };
      var onrequest = function() {
        stream.req.on("finish", onfinish);
      };
      if (isRequest(stream)) {
        stream.on("complete", onfinish);
        stream.on("abort", onclose);
        if (stream.req) onrequest();
        else stream.on("request", onrequest);
      } else if (writable && !ws) {
        stream.on("end", onlegacyfinish);
        stream.on("close", onlegacyfinish);
      }
      if (isChildProcess(stream)) stream.on("exit", onexit);
      stream.on("end", onend);
      stream.on("finish", onfinish);
      if (opts.error !== false) stream.on("error", onerror);
      stream.on("close", onclose);
      return function() {
        cancelled = true;
        stream.removeListener("complete", onfinish);
        stream.removeListener("abort", onclose);
        stream.removeListener("request", onrequest);
        if (stream.req) stream.req.removeListener("finish", onfinish);
        stream.removeListener("end", onlegacyfinish);
        stream.removeListener("close", onlegacyfinish);
        stream.removeListener("finish", onfinish);
        stream.removeListener("exit", onexit);
        stream.removeListener("end", onend);
        stream.removeListener("error", onerror);
        stream.removeListener("close", onclose);
      };
    };
    module2.exports = eos;
  }
});

// ../../node_modules/stream-shift/index.js
var require_stream_shift = __commonJS({
  "../../node_modules/stream-shift/index.js"(exports2, module2) {
    module2.exports = shift;
    function shift(stream) {
      var rs = stream._readableState;
      if (!rs) return null;
      return rs.objectMode || typeof stream._duplexState === "number" ? stream.read() : stream.read(getStateLength(rs));
    }
    function getStateLength(state2) {
      if (state2.buffer.length) {
        var idx = state2.bufferIndex || 0;
        if (state2.buffer.head) {
          return state2.buffer.head.data.length;
        } else if (state2.buffer.length - idx > 0 && state2.buffer[idx]) {
          return state2.buffer[idx].length;
        }
      }
      return state2.length;
    }
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/duplexify/index.js
var require_duplexify = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/duplexify/index.js"(exports2, module2) {
    var stream = require_readable();
    var eos = require_end_of_stream3();
    var inherits = require_inherits();
    var shift = require_stream_shift();
    var SIGNAL_FLUSH = Buffer.from && Buffer.from !== Uint8Array.from ? Buffer.from([0]) : new Buffer([0]);
    var onuncork = function(self2, fn) {
      if (self2._corked) self2.once("uncork", fn);
      else fn();
    };
    var autoDestroy = function(self2, err) {
      if (self2._autoDestroy) self2.destroy(err);
    };
    var destroyer = function(self2, end2) {
      return function(err) {
        if (err) autoDestroy(self2, err.message === "premature close" ? null : err);
        else if (end2 && !self2._ended) self2.end();
      };
    };
    var end = function(ws, fn) {
      if (!ws) return fn();
      if (ws._writableState && ws._writableState.finished) return fn();
      if (ws._writableState) return ws.end(fn);
      ws.end();
      fn();
    };
    var noop = function() {
    };
    var toStreams2 = function(rs) {
      return new stream.Readable({ objectMode: true, highWaterMark: 16 }).wrap(rs);
    };
    var Duplexify = function(writable, readable, opts) {
      if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts);
      stream.Duplex.call(this, opts);
      this._writable = null;
      this._readable = null;
      this._readable2 = null;
      this._autoDestroy = !opts || opts.autoDestroy !== false;
      this._forwardDestroy = !opts || opts.destroy !== false;
      this._forwardEnd = !opts || opts.end !== false;
      this._corked = 1;
      this._ondrain = null;
      this._drained = false;
      this._forwarding = false;
      this._unwrite = null;
      this._unread = null;
      this._ended = false;
      this.destroyed = false;
      if (writable) this.setWritable(writable);
      if (readable) this.setReadable(readable);
    };
    inherits(Duplexify, stream.Duplex);
    Duplexify.obj = function(writable, readable, opts) {
      if (!opts) opts = {};
      opts.objectMode = true;
      opts.highWaterMark = 16;
      return new Duplexify(writable, readable, opts);
    };
    Duplexify.prototype.cork = function() {
      if (++this._corked === 1) this.emit("cork");
    };
    Duplexify.prototype.uncork = function() {
      if (this._corked && --this._corked === 0) this.emit("uncork");
    };
    Duplexify.prototype.setWritable = function(writable) {
      if (this._unwrite) this._unwrite();
      if (this.destroyed) {
        if (writable && writable.destroy) writable.destroy();
        return;
      }
      if (writable === null || writable === false) {
        this.end();
        return;
      }
      var self2 = this;
      var unend = eos(writable, { writable: true, readable: false }, destroyer(this, this._forwardEnd));
      var ondrain = function() {
        var ondrain2 = self2._ondrain;
        self2._ondrain = null;
        if (ondrain2) ondrain2();
      };
      var clear = function() {
        self2._writable.removeListener("drain", ondrain);
        unend();
      };
      if (this._unwrite) process.nextTick(ondrain);
      this._writable = writable;
      this._writable.on("drain", ondrain);
      this._unwrite = clear;
      this.uncork();
    };
    Duplexify.prototype.setReadable = function(readable) {
      if (this._unread) this._unread();
      if (this.destroyed) {
        if (readable && readable.destroy) readable.destroy();
        return;
      }
      if (readable === null || readable === false) {
        this.push(null);
        this.resume();
        return;
      }
      var self2 = this;
      var unend = eos(readable, { writable: false, readable: true }, destroyer(this));
      var onreadable = function() {
        self2._forward();
      };
      var onend = function() {
        self2.push(null);
      };
      var clear = function() {
        self2._readable2.removeListener("readable", onreadable);
        self2._readable2.removeListener("end", onend);
        unend();
      };
      this._drained = true;
      this._readable = readable;
      this._readable2 = readable._readableState ? readable : toStreams2(readable);
      this._readable2.on("readable", onreadable);
      this._readable2.on("end", onend);
      this._unread = clear;
      this._forward();
    };
    Duplexify.prototype._read = function() {
      this._drained = true;
      this._forward();
    };
    Duplexify.prototype._forward = function() {
      if (this._forwarding || !this._readable2 || !this._drained) return;
      this._forwarding = true;
      var data2;
      while (this._drained && (data2 = shift(this._readable2)) !== null) {
        if (this.destroyed) continue;
        this._drained = this.push(data2);
      }
      this._forwarding = false;
    };
    Duplexify.prototype.destroy = function(err, cb) {
      if (!cb) cb = noop;
      if (this.destroyed) return cb(null);
      this.destroyed = true;
      var self2 = this;
      process.nextTick(function() {
        self2._destroy(err);
        cb(null);
      });
    };
    Duplexify.prototype._destroy = function(err) {
      if (err) {
        var ondrain = this._ondrain;
        this._ondrain = null;
        if (ondrain) ondrain(err);
        else this.emit("error", err);
      }
      if (this._forwardDestroy) {
        if (this._readable && this._readable.destroy) this._readable.destroy();
        if (this._writable && this._writable.destroy) this._writable.destroy();
      }
      this.emit("close");
    };
    Duplexify.prototype._write = function(data2, enc, cb) {
      if (this.destroyed) return;
      if (this._corked) return onuncork(this, this._write.bind(this, data2, enc, cb));
      if (data2 === SIGNAL_FLUSH) return this._finish(cb);
      if (!this._writable) return cb();
      if (this._writable.write(data2) === false) this._ondrain = cb;
      else if (!this.destroyed) cb();
    };
    Duplexify.prototype._finish = function(cb) {
      var self2 = this;
      this.emit("preend");
      onuncork(this, function() {
        end(self2._forwardEnd && self2._writable, function() {
          if (self2._writableState.prefinished === false) self2._writableState.prefinished = true;
          self2.emit("prefinish");
          onuncork(self2, cb);
        });
      });
    };
    Duplexify.prototype.end = function(data2, enc, cb) {
      if (typeof data2 === "function") return this.end(null, null, data2);
      if (typeof enc === "function") return this.end(data2, null, enc);
      this._ended = true;
      if (data2) this.write(data2);
      if (!this._writableState.ending && !this._writableState.destroyed) this.write(SIGNAL_FLUSH);
      return stream.Writable.prototype.end.call(this, cb);
    };
    module2.exports = Duplexify;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/wx.js
var require_wx = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/wx.js"(exports2, module2) {
    "use strict";
    var Transform = require_readable().Transform;
    var duplexify = require_duplexify();
    var socketTask;
    var proxy;
    var stream;
    function buildProxy() {
      var proxy2 = new Transform();
      proxy2._write = function(chunk, encoding, next) {
        socketTask.send({
          data: chunk.buffer,
          success: function() {
            next();
          },
          fail: function(errMsg) {
            next(new Error(errMsg));
          }
        });
      };
      proxy2._flush = function socketEnd(done) {
        socketTask.close({
          success: function() {
            done();
          }
        });
      };
      return proxy2;
    }
    function setDefaultOpts(opts) {
      if (!opts.hostname) {
        opts.hostname = "localhost";
      }
      if (!opts.path) {
        opts.path = "/";
      }
      if (!opts.wsOptions) {
        opts.wsOptions = {};
      }
    }
    function buildUrl(opts, client) {
      var protocol = opts.protocol === "wxs" ? "wss" : "ws";
      var url = protocol + "://" + opts.hostname + opts.path;
      if (opts.port && opts.port !== 80 && opts.port !== 443) {
        url = protocol + "://" + opts.hostname + ":" + opts.port + opts.path;
      }
      if (typeof opts.transformWsUrl === "function") {
        url = opts.transformWsUrl(url, opts, client);
      }
      return url;
    }
    function bindEventHandler() {
      socketTask.onOpen(function() {
        stream.setReadable(proxy);
        stream.setWritable(proxy);
        stream.emit("connect");
      });
      socketTask.onMessage(function(res) {
        var data2 = res.data;
        if (data2 instanceof ArrayBuffer) data2 = Buffer.from(data2);
        else data2 = Buffer.from(data2, "utf8");
        proxy.push(data2);
      });
      socketTask.onClose(function() {
        stream.end();
        stream.destroy();
      });
      socketTask.onError(function(res) {
        stream.destroy(new Error(res.errMsg));
      });
    }
    function buildStream(client, opts) {
      opts.hostname = opts.hostname || opts.host;
      if (!opts.hostname) {
        throw new Error("Could not determine host. Specify host manually.");
      }
      var websocketSubProtocol = opts.protocolId === "MQIsdp" && opts.protocolVersion === 3 ? "mqttv3.1" : "mqtt";
      setDefaultOpts(opts);
      var url = buildUrl(opts, client);
      socketTask = wx.connectSocket({
        url,
        protocols: [websocketSubProtocol]
      });
      proxy = buildProxy();
      stream = duplexify.obj();
      stream._destroy = function(err, cb) {
        socketTask.close({
          success: function() {
            cb && cb(err);
          }
        });
      };
      var destroyRef = stream.destroy;
      stream.destroy = function() {
        stream.destroy = destroyRef;
        var self2 = this;
        setTimeout(function() {
          socketTask.close({
            fail: function() {
              self2._destroy(new Error());
            }
          });
        }, 0);
      }.bind(stream);
      bindEventHandler();
      return stream;
    }
    module2.exports = buildStream;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/ali.js
var require_ali = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/ali.js"(exports2, module2) {
    "use strict";
    var Transform = require_readable().Transform;
    var duplexify = require_duplexify();
    var my;
    var proxy;
    var stream;
    var isInitialized = false;
    function buildProxy() {
      var proxy2 = new Transform();
      proxy2._write = function(chunk, encoding, next) {
        my.sendSocketMessage({
          data: chunk.buffer,
          success: function() {
            next();
          },
          fail: function() {
            next(new Error());
          }
        });
      };
      proxy2._flush = function socketEnd(done) {
        my.closeSocket({
          success: function() {
            done();
          }
        });
      };
      return proxy2;
    }
    function setDefaultOpts(opts) {
      if (!opts.hostname) {
        opts.hostname = "localhost";
      }
      if (!opts.path) {
        opts.path = "/";
      }
      if (!opts.wsOptions) {
        opts.wsOptions = {};
      }
    }
    function buildUrl(opts, client) {
      var protocol = opts.protocol === "alis" ? "wss" : "ws";
      var url = protocol + "://" + opts.hostname + opts.path;
      if (opts.port && opts.port !== 80 && opts.port !== 443) {
        url = protocol + "://" + opts.hostname + ":" + opts.port + opts.path;
      }
      if (typeof opts.transformWsUrl === "function") {
        url = opts.transformWsUrl(url, opts, client);
      }
      return url;
    }
    function bindEventHandler() {
      if (isInitialized) return;
      isInitialized = true;
      my.onSocketOpen(function() {
        stream.setReadable(proxy);
        stream.setWritable(proxy);
        stream.emit("connect");
      });
      my.onSocketMessage(function(res) {
        if (typeof res.data === "string") {
          var buffer = Buffer.from(res.data, "base64");
          proxy.push(buffer);
        } else {
          var reader = new FileReader();
          reader.addEventListener("load", function() {
            var data2 = reader.result;
            if (data2 instanceof ArrayBuffer) data2 = Buffer.from(data2);
            else data2 = Buffer.from(data2, "utf8");
            proxy.push(data2);
          });
          reader.readAsArrayBuffer(res.data);
        }
      });
      my.onSocketClose(function() {
        stream.end();
        stream.destroy();
      });
      my.onSocketError(function(res) {
        stream.destroy(res);
      });
    }
    function buildStream(client, opts) {
      opts.hostname = opts.hostname || opts.host;
      if (!opts.hostname) {
        throw new Error("Could not determine host. Specify host manually.");
      }
      var websocketSubProtocol = opts.protocolId === "MQIsdp" && opts.protocolVersion === 3 ? "mqttv3.1" : "mqtt";
      setDefaultOpts(opts);
      var url = buildUrl(opts, client);
      my = opts.my;
      my.connectSocket({
        url,
        protocols: websocketSubProtocol
      });
      proxy = buildProxy();
      stream = duplexify.obj();
      bindEventHandler();
      return stream;
    }
    module2.exports = buildStream;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/constants.js
var require_constants2 = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/constants.js"(exports2, module2) {
    "use strict";
    module2.exports = {
      BINARY_TYPES: ["nodebuffer", "arraybuffer", "fragments"],
      GUID: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11",
      kStatusCode: /* @__PURE__ */ Symbol("status-code"),
      kWebSocket: /* @__PURE__ */ Symbol("websocket"),
      EMPTY_BUFFER: Buffer.alloc(0),
      NOOP: () => {
      }
    };
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/buffer-util.js
var require_buffer_util = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/buffer-util.js"(exports2, module2) {
    "use strict";
    var { EMPTY_BUFFER } = require_constants2();
    function concat(list2, totalLength) {
      if (list2.length === 0) return EMPTY_BUFFER;
      if (list2.length === 1) return list2[0];
      const target = Buffer.allocUnsafe(totalLength);
      let offset = 0;
      for (let i5 = 0; i5 < list2.length; i5++) {
        const buf = list2[i5];
        target.set(buf, offset);
        offset += buf.length;
      }
      if (offset < totalLength) return target.slice(0, offset);
      return target;
    }
    function _mask(source, mask, output, offset, length) {
      for (let i5 = 0; i5 < length; i5++) {
        output[offset + i5] = source[i5] ^ mask[i5 & 3];
      }
    }
    function _unmask(buffer, mask) {
      const length = buffer.length;
      for (let i5 = 0; i5 < length; i5++) {
        buffer[i5] ^= mask[i5 & 3];
      }
    }
    function toArrayBuffer(buf) {
      if (buf.byteLength === buf.buffer.byteLength) {
        return buf.buffer;
      }
      return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
    }
    function toBuffer(data2) {
      toBuffer.readOnly = true;
      if (Buffer.isBuffer(data2)) return data2;
      let buf;
      if (data2 instanceof ArrayBuffer) {
        buf = Buffer.from(data2);
      } else if (ArrayBuffer.isView(data2)) {
        buf = Buffer.from(data2.buffer, data2.byteOffset, data2.byteLength);
      } else {
        buf = Buffer.from(data2);
        toBuffer.readOnly = false;
      }
      return buf;
    }
    try {
      const bufferUtil = require("bufferutil");
      const bu = bufferUtil.BufferUtil || bufferUtil;
      module2.exports = {
        concat,
        mask(source, mask, output, offset, length) {
          if (length < 48) _mask(source, mask, output, offset, length);
          else bu.mask(source, mask, output, offset, length);
        },
        toArrayBuffer,
        toBuffer,
        unmask(buffer, mask) {
          if (buffer.length < 32) _unmask(buffer, mask);
          else bu.unmask(buffer, mask);
        }
      };
    } catch (e5) {
      module2.exports = {
        concat,
        mask: _mask,
        toArrayBuffer,
        toBuffer,
        unmask: _unmask
      };
    }
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/limiter.js
var require_limiter = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/limiter.js"(exports2, module2) {
    "use strict";
    var kDone = /* @__PURE__ */ Symbol("kDone");
    var kRun = /* @__PURE__ */ Symbol("kRun");
    var Limiter = class {
      /**
       * Creates a new `Limiter`.
       *
       * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed
       *     to run concurrently
       */
      constructor(concurrency) {
        this[kDone] = () => {
          this.pending--;
          this[kRun]();
        };
        this.concurrency = concurrency || Infinity;
        this.jobs = [];
        this.pending = 0;
      }
      /**
       * Adds a job to the queue.
       *
       * @param {Function} job The job to run
       * @public
       */
      add(job) {
        this.jobs.push(job);
        this[kRun]();
      }
      /**
       * Removes a job from the queue and runs it if possible.
       *
       * @private
       */
      [kRun]() {
        if (this.pending === this.concurrency) return;
        if (this.jobs.length) {
          const job = this.jobs.shift();
          this.pending++;
          job(this[kDone]);
        }
      }
    };
    module2.exports = Limiter;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/permessage-deflate.js
var require_permessage_deflate = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/permessage-deflate.js"(exports2, module2) {
    "use strict";
    var zlib = require("zlib");
    var bufferUtil = require_buffer_util();
    var Limiter = require_limiter();
    var { kStatusCode, NOOP } = require_constants2();
    var TRAILER = Buffer.from([0, 0, 255, 255]);
    var kPerMessageDeflate = /* @__PURE__ */ Symbol("permessage-deflate");
    var kTotalLength = /* @__PURE__ */ Symbol("total-length");
    var kCallback = /* @__PURE__ */ Symbol("callback");
    var kBuffers = /* @__PURE__ */ Symbol("buffers");
    var kError = /* @__PURE__ */ Symbol("error");
    var zlibLimiter;
    var PerMessageDeflate = class {
      /**
       * Creates a PerMessageDeflate instance.
       *
       * @param {Object} [options] Configuration options
       * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
       *     disabling of server context takeover
       * @param {Boolean} [options.clientNoContextTakeover=false] Advertise/
       *     acknowledge disabling of client context takeover
       * @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
       *     use of a custom server window size
       * @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support
       *     for, or request, a custom client window size
       * @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on
       *     deflate
       * @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
       *     inflate
       * @param {Number} [options.threshold=1024] Size (in bytes) below which
       *     messages should not be compressed
       * @param {Number} [options.concurrencyLimit=10] The number of concurrent
       *     calls to zlib
       * @param {Boolean} [isServer=false] Create the instance in either server or
       *     client mode
       * @param {Number} [maxPayload=0] The maximum allowed message length
       */
      constructor(options, isServer, maxPayload) {
        this._maxPayload = maxPayload | 0;
        this._options = options || {};
        this._threshold = this._options.threshold !== void 0 ? this._options.threshold : 1024;
        this._isServer = !!isServer;
        this._deflate = null;
        this._inflate = null;
        this.params = null;
        if (!zlibLimiter) {
          const concurrency = this._options.concurrencyLimit !== void 0 ? this._options.concurrencyLimit : 10;
          zlibLimiter = new Limiter(concurrency);
        }
      }
      /**
       * @type {String}
       */
      static get extensionName() {
        return "permessage-deflate";
      }
      /**
       * Create an extension negotiation offer.
       *
       * @return {Object} Extension parameters
       * @public
       */
      offer() {
        const params = {};
        if (this._options.serverNoContextTakeover) {
          params.server_no_context_takeover = true;
        }
        if (this._options.clientNoContextTakeover) {
          params.client_no_context_takeover = true;
        }
        if (this._options.serverMaxWindowBits) {
          params.server_max_window_bits = this._options.serverMaxWindowBits;
        }
        if (this._options.clientMaxWindowBits) {
          params.client_max_window_bits = this._options.clientMaxWindowBits;
        } else if (this._options.clientMaxWindowBits == null) {
          params.client_max_window_bits = true;
        }
        return params;
      }
      /**
       * Accept an extension negotiation offer/response.
       *
       * @param {Array} configurations The extension negotiation offers/reponse
       * @return {Object} Accepted configuration
       * @public
       */
      accept(configurations) {
        configurations = this.normalizeParams(configurations);
        this.params = this._isServer ? this.acceptAsServer(configurations) : this.acceptAsClient(configurations);
        return this.params;
      }
      /**
       * Releases all resources used by the extension.
       *
       * @public
       */
      cleanup() {
        if (this._inflate) {
          this._inflate.close();
          this._inflate = null;
        }
        if (this._deflate) {
          const callback = this._deflate[kCallback];
          this._deflate.close();
          this._deflate = null;
          if (callback) {
            callback(
              new Error(
                "The deflate stream was closed while data was being processed"
              )
            );
          }
        }
      }
      /**
       *  Accept an extension negotiation offer.
       *
       * @param {Array} offers The extension negotiation offers
       * @return {Object} Accepted configuration
       * @private
       */
      acceptAsServer(offers) {
        const opts = this._options;
        const accepted = offers.find((params) => {
          if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && !params.client_max_window_bits) {
            return false;
          }
          return true;
        });
        if (!accepted) {
          throw new Error("None of the extension offers can be accepted");
        }
        if (opts.serverNoContextTakeover) {
          accepted.server_no_context_takeover = true;
        }
        if (opts.clientNoContextTakeover) {
          accepted.client_no_context_takeover = true;
        }
        if (typeof opts.serverMaxWindowBits === "number") {
          accepted.server_max_window_bits = opts.serverMaxWindowBits;
        }
        if (typeof opts.clientMaxWindowBits === "number") {
          accepted.client_max_window_bits = opts.clientMaxWindowBits;
        } else if (accepted.client_max_window_bits === true || opts.clientMaxWindowBits === false) {
          delete accepted.client_max_window_bits;
        }
        return accepted;
      }
      /**
       * Accept the extension negotiation response.
       *
       * @param {Array} response The extension negotiation response
       * @return {Object} Accepted configuration
       * @private
       */
      acceptAsClient(response) {
        const params = response[0];
        if (this._options.clientNoContextTakeover === false && params.client_no_context_takeover) {
          throw new Error('Unexpected parameter "client_no_context_takeover"');
        }
        if (!params.client_max_window_bits) {
          if (typeof this._options.clientMaxWindowBits === "number") {
            params.client_max_window_bits = this._options.clientMaxWindowBits;
          }
        } else if (this._options.clientMaxWindowBits === false || typeof this._options.clientMaxWindowBits === "number" && params.client_max_window_bits > this._options.clientMaxWindowBits) {
          throw new Error(
            'Unexpected or invalid parameter "client_max_window_bits"'
          );
        }
        return params;
      }
      /**
       * Normalize parameters.
       *
       * @param {Array} configurations The extension negotiation offers/reponse
       * @return {Array} The offers/response with normalized parameters
       * @private
       */
      normalizeParams(configurations) {
        configurations.forEach((params) => {
          Object.keys(params).forEach((key) => {
            let value = params[key];
            if (value.length > 1) {
              throw new Error(`Parameter "${key}" must have only a single value`);
            }
            value = value[0];
            if (key === "client_max_window_bits") {
              if (value !== true) {
                const num = +value;
                if (!Number.isInteger(num) || num < 8 || num > 15) {
                  throw new TypeError(
                    `Invalid value for parameter "${key}": ${value}`
                  );
                }
                value = num;
              } else if (!this._isServer) {
                throw new TypeError(
                  `Invalid value for parameter "${key}": ${value}`
                );
              }
            } else if (key === "server_max_window_bits") {
              const num = +value;
              if (!Number.isInteger(num) || num < 8 || num > 15) {
                throw new TypeError(
                  `Invalid value for parameter "${key}": ${value}`
                );
              }
              value = num;
            } else if (key === "client_no_context_takeover" || key === "server_no_context_takeover") {
              if (value !== true) {
                throw new TypeError(
                  `Invalid value for parameter "${key}": ${value}`
                );
              }
            } else {
              throw new Error(`Unknown parameter "${key}"`);
            }
            params[key] = value;
          });
        });
        return configurations;
      }
      /**
       * Decompress data. Concurrency limited.
       *
       * @param {Buffer} data Compressed data
       * @param {Boolean} fin Specifies whether or not this is the last fragment
       * @param {Function} callback Callback
       * @public
       */
      decompress(data2, fin, callback) {
        zlibLimiter.add((done) => {
          this._decompress(data2, fin, (err, result) => {
            done();
            callback(err, result);
          });
        });
      }
      /**
       * Compress data. Concurrency limited.
       *
       * @param {Buffer} data Data to compress
       * @param {Boolean} fin Specifies whether or not this is the last fragment
       * @param {Function} callback Callback
       * @public
       */
      compress(data2, fin, callback) {
        zlibLimiter.add((done) => {
          this._compress(data2, fin, (err, result) => {
            done();
            callback(err, result);
          });
        });
      }
      /**
       * Decompress data.
       *
       * @param {Buffer} data Compressed data
       * @param {Boolean} fin Specifies whether or not this is the last fragment
       * @param {Function} callback Callback
       * @private
       */
      _decompress(data2, fin, callback) {
        const endpoint = this._isServer ? "client" : "server";
        if (!this._inflate) {
          const key = `${endpoint}_max_window_bits`;
          const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
          this._inflate = zlib.createInflateRaw({
            ...this._options.zlibInflateOptions,
            windowBits
          });
          this._inflate[kPerMessageDeflate] = this;
          this._inflate[kTotalLength] = 0;
          this._inflate[kBuffers] = [];
          this._inflate.on("error", inflateOnError);
          this._inflate.on("data", inflateOnData);
        }
        this._inflate[kCallback] = callback;
        this._inflate.write(data2);
        if (fin) this._inflate.write(TRAILER);
        this._inflate.flush(() => {
          const err = this._inflate[kError];
          if (err) {
            this._inflate.close();
            this._inflate = null;
            callback(err);
            return;
          }
          const data3 = bufferUtil.concat(
            this._inflate[kBuffers],
            this._inflate[kTotalLength]
          );
          if (this._inflate._readableState.endEmitted) {
            this._inflate.close();
            this._inflate = null;
          } else {
            this._inflate[kTotalLength] = 0;
            this._inflate[kBuffers] = [];
            if (fin && this.params[`${endpoint}_no_context_takeover`]) {
              this._inflate.reset();
            }
          }
          callback(null, data3);
        });
      }
      /**
       * Compress data.
       *
       * @param {Buffer} data Data to compress
       * @param {Boolean} fin Specifies whether or not this is the last fragment
       * @param {Function} callback Callback
       * @private
       */
      _compress(data2, fin, callback) {
        const endpoint = this._isServer ? "server" : "client";
        if (!this._deflate) {
          const key = `${endpoint}_max_window_bits`;
          const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
          this._deflate = zlib.createDeflateRaw({
            ...this._options.zlibDeflateOptions,
            windowBits
          });
          this._deflate[kTotalLength] = 0;
          this._deflate[kBuffers] = [];
          this._deflate.on("error", NOOP);
          this._deflate.on("data", deflateOnData);
        }
        this._deflate[kCallback] = callback;
        this._deflate.write(data2);
        this._deflate.flush(zlib.Z_SYNC_FLUSH, () => {
          if (!this._deflate) {
            return;
          }
          let data3 = bufferUtil.concat(
            this._deflate[kBuffers],
            this._deflate[kTotalLength]
          );
          if (fin) data3 = data3.slice(0, data3.length - 4);
          this._deflate[kCallback] = null;
          this._deflate[kTotalLength] = 0;
          this._deflate[kBuffers] = [];
          if (fin && this.params[`${endpoint}_no_context_takeover`]) {
            this._deflate.reset();
          }
          callback(null, data3);
        });
      }
    };
    module2.exports = PerMessageDeflate;
    function deflateOnData(chunk) {
      this[kBuffers].push(chunk);
      this[kTotalLength] += chunk.length;
    }
    function inflateOnData(chunk) {
      this[kTotalLength] += chunk.length;
      if (this[kPerMessageDeflate]._maxPayload < 1 || this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload) {
        this[kBuffers].push(chunk);
        return;
      }
      this[kError] = new RangeError("Max payload size exceeded");
      this[kError].code = "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH";
      this[kError][kStatusCode] = 1009;
      this.removeListener("data", inflateOnData);
      this.reset();
    }
    function inflateOnError(err) {
      this[kPerMessageDeflate]._inflate = null;
      err[kStatusCode] = 1007;
      this[kCallback](err);
    }
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/validation.js
var require_validation = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/validation.js"(exports2, module2) {
    "use strict";
    function isValidStatusCode(code) {
      return code >= 1e3 && code <= 1014 && code !== 1004 && code !== 1005 && code !== 1006 || code >= 3e3 && code <= 4999;
    }
    function _isValidUTF8(buf) {
      const len = buf.length;
      let i5 = 0;
      while (i5 < len) {
        if ((buf[i5] & 128) === 0) {
          i5++;
        } else if ((buf[i5] & 224) === 192) {
          if (i5 + 1 === len || (buf[i5 + 1] & 192) !== 128 || (buf[i5] & 254) === 192) {
            return false;
          }
          i5 += 2;
        } else if ((buf[i5] & 240) === 224) {
          if (i5 + 2 >= len || (buf[i5 + 1] & 192) !== 128 || (buf[i5 + 2] & 192) !== 128 || buf[i5] === 224 && (buf[i5 + 1] & 224) === 128 || // Overlong
          buf[i5] === 237 && (buf[i5 + 1] & 224) === 160) {
            return false;
          }
          i5 += 3;
        } else if ((buf[i5] & 248) === 240) {
          if (i5 + 3 >= len || (buf[i5 + 1] & 192) !== 128 || (buf[i5 + 2] & 192) !== 128 || (buf[i5 + 3] & 192) !== 128 || buf[i5] === 240 && (buf[i5 + 1] & 240) === 128 || // Overlong
          buf[i5] === 244 && buf[i5 + 1] > 143 || buf[i5] > 244) {
            return false;
          }
          i5 += 4;
        } else {
          return false;
        }
      }
      return true;
    }
    try {
      let isValidUTF8 = require("utf-8-validate");
      if (typeof isValidUTF8 === "object") {
        isValidUTF8 = isValidUTF8.Validation.isValidUTF8;
      }
      module2.exports = {
        isValidStatusCode,
        isValidUTF8(buf) {
          return buf.length < 150 ? _isValidUTF8(buf) : isValidUTF8(buf);
        }
      };
    } catch (e5) {
      module2.exports = {
        isValidStatusCode,
        isValidUTF8: _isValidUTF8
      };
    }
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/receiver.js
var require_receiver = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/receiver.js"(exports2, module2) {
    "use strict";
    var { Writable } = require("stream");
    var PerMessageDeflate = require_permessage_deflate();
    var {
      BINARY_TYPES,
      EMPTY_BUFFER,
      kStatusCode,
      kWebSocket
    } = require_constants2();
    var { concat, toArrayBuffer, unmask } = require_buffer_util();
    var { isValidStatusCode, isValidUTF8 } = require_validation();
    var GET_INFO = 0;
    var GET_PAYLOAD_LENGTH_16 = 1;
    var GET_PAYLOAD_LENGTH_64 = 2;
    var GET_MASK = 3;
    var GET_DATA = 4;
    var INFLATING = 5;
    var Receiver = class extends Writable {
      /**
       * Creates a Receiver instance.
       *
       * @param {String} [binaryType=nodebuffer] The type for binary data
       * @param {Object} [extensions] An object containing the negotiated extensions
       * @param {Boolean} [isServer=false] Specifies whether to operate in client or
       *     server mode
       * @param {Number} [maxPayload=0] The maximum allowed message length
       */
      constructor(binaryType, extensions, isServer, maxPayload) {
        super();
        this._binaryType = binaryType || BINARY_TYPES[0];
        this[kWebSocket] = void 0;
        this._extensions = extensions || {};
        this._isServer = !!isServer;
        this._maxPayload = maxPayload | 0;
        this._bufferedBytes = 0;
        this._buffers = [];
        this._compressed = false;
        this._payloadLength = 0;
        this._mask = void 0;
        this._fragmented = 0;
        this._masked = false;
        this._fin = false;
        this._opcode = 0;
        this._totalPayloadLength = 0;
        this._messageLength = 0;
        this._fragments = [];
        this._state = GET_INFO;
        this._loop = false;
      }
      /**
       * Implements `Writable.prototype._write()`.
       *
       * @param {Buffer} chunk The chunk of data to write
       * @param {String} encoding The character encoding of `chunk`
       * @param {Function} cb Callback
       * @private
       */
      _write(chunk, encoding, cb) {
        if (this._opcode === 8 && this._state == GET_INFO) return cb();
        this._bufferedBytes += chunk.length;
        this._buffers.push(chunk);
        this.startLoop(cb);
      }
      /**
       * Consumes `n` bytes from the buffered data.
       *
       * @param {Number} n The number of bytes to consume
       * @return {Buffer} The consumed bytes
       * @private
       */
      consume(n2) {
        this._bufferedBytes -= n2;
        if (n2 === this._buffers[0].length) return this._buffers.shift();
        if (n2 < this._buffers[0].length) {
          const buf = this._buffers[0];
          this._buffers[0] = buf.slice(n2);
          return buf.slice(0, n2);
        }
        const dst = Buffer.allocUnsafe(n2);
        do {
          const buf = this._buffers[0];
          const offset = dst.length - n2;
          if (n2 >= buf.length) {
            dst.set(this._buffers.shift(), offset);
          } else {
            dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n2), offset);
            this._buffers[0] = buf.slice(n2);
          }
          n2 -= buf.length;
        } while (n2 > 0);
        return dst;
      }
      /**
       * Starts the parsing loop.
       *
       * @param {Function} cb Callback
       * @private
       */
      startLoop(cb) {
        let err;
        this._loop = true;
        do {
          switch (this._state) {
            case GET_INFO:
              err = this.getInfo();
              break;
            case GET_PAYLOAD_LENGTH_16:
              err = this.getPayloadLength16();
              break;
            case GET_PAYLOAD_LENGTH_64:
              err = this.getPayloadLength64();
              break;
            case GET_MASK:
              this.getMask();
              break;
            case GET_DATA:
              err = this.getData(cb);
              break;
            default:
              this._loop = false;
              return;
          }
        } while (this._loop);
        cb(err);
      }
      /**
       * Reads the first two bytes of a frame.
       *
       * @return {(RangeError|undefined)} A possible error
       * @private
       */
      getInfo() {
        if (this._bufferedBytes < 2) {
          this._loop = false;
          return;
        }
        const buf = this.consume(2);
        if ((buf[0] & 48) !== 0) {
          this._loop = false;
          return error3(
            RangeError,
            "RSV2 and RSV3 must be clear",
            true,
            1002,
            "WS_ERR_UNEXPECTED_RSV_2_3"
          );
        }
        const compressed = (buf[0] & 64) === 64;
        if (compressed && !this._extensions[PerMessageDeflate.extensionName]) {
          this._loop = false;
          return error3(
            RangeError,
            "RSV1 must be clear",
            true,
            1002,
            "WS_ERR_UNEXPECTED_RSV_1"
          );
        }
        this._fin = (buf[0] & 128) === 128;
        this._opcode = buf[0] & 15;
        this._payloadLength = buf[1] & 127;
        if (this._opcode === 0) {
          if (compressed) {
            this._loop = false;
            return error3(
              RangeError,
              "RSV1 must be clear",
              true,
              1002,
              "WS_ERR_UNEXPECTED_RSV_1"
            );
          }
          if (!this._fragmented) {
            this._loop = false;
            return error3(
              RangeError,
              "invalid opcode 0",
              true,
              1002,
              "WS_ERR_INVALID_OPCODE"
            );
          }
          this._opcode = this._fragmented;
        } else if (this._opcode === 1 || this._opcode === 2) {
          if (this._fragmented) {
            this._loop = false;
            return error3(
              RangeError,
              `invalid opcode ${this._opcode}`,
              true,
              1002,
              "WS_ERR_INVALID_OPCODE"
            );
          }
          this._compressed = compressed;
        } else if (this._opcode > 7 && this._opcode < 11) {
          if (!this._fin) {
            this._loop = false;
            return error3(
              RangeError,
              "FIN must be set",
              true,
              1002,
              "WS_ERR_EXPECTED_FIN"
            );
          }
          if (compressed) {
            this._loop = false;
            return error3(
              RangeError,
              "RSV1 must be clear",
              true,
              1002,
              "WS_ERR_UNEXPECTED_RSV_1"
            );
          }
          if (this._payloadLength > 125) {
            this._loop = false;
            return error3(
              RangeError,
              `invalid payload length ${this._payloadLength}`,
              true,
              1002,
              "WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"
            );
          }
        } else {
          this._loop = false;
          return error3(
            RangeError,
            `invalid opcode ${this._opcode}`,
            true,
            1002,
            "WS_ERR_INVALID_OPCODE"
          );
        }
        if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
        this._masked = (buf[1] & 128) === 128;
        if (this._isServer) {
          if (!this._masked) {
            this._loop = false;
            return error3(
              RangeError,
              "MASK must be set",
              true,
              1002,
              "WS_ERR_EXPECTED_MASK"
            );
          }
        } else if (this._masked) {
          this._loop = false;
          return error3(
            RangeError,
            "MASK must be clear",
            true,
            1002,
            "WS_ERR_UNEXPECTED_MASK"
          );
        }
        if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
        else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;
        else return this.haveLength();
      }
      /**
       * Gets extended payload length (7+16).
       *
       * @return {(RangeError|undefined)} A possible error
       * @private
       */
      getPayloadLength16() {
        if (this._bufferedBytes < 2) {
          this._loop = false;
          return;
        }
        this._payloadLength = this.consume(2).readUInt16BE(0);
        return this.haveLength();
      }
      /**
       * Gets extended payload length (7+64).
       *
       * @return {(RangeError|undefined)} A possible error
       * @private
       */
      getPayloadLength64() {
        if (this._bufferedBytes < 8) {
          this._loop = false;
          return;
        }
        const buf = this.consume(8);
        const num = buf.readUInt32BE(0);
        if (num > Math.pow(2, 53 - 32) - 1) {
          this._loop = false;
          return error3(
            RangeError,
            "Unsupported WebSocket frame: payload length > 2^53 - 1",
            false,
            1009,
            "WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"
          );
        }
        this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);
        return this.haveLength();
      }
      /**
       * Payload length has been read.
       *
       * @return {(RangeError|undefined)} A possible error
       * @private
       */
      haveLength() {
        if (this._payloadLength && this._opcode < 8) {
          this._totalPayloadLength += this._payloadLength;
          if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
            this._loop = false;
            return error3(
              RangeError,
              "Max payload size exceeded",
              false,
              1009,
              "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"
            );
          }
        }
        if (this._masked) this._state = GET_MASK;
        else this._state = GET_DATA;
      }
      /**
       * Reads mask bytes.
       *
       * @private
       */
      getMask() {
        if (this._bufferedBytes < 4) {
          this._loop = false;
          return;
        }
        this._mask = this.consume(4);
        this._state = GET_DATA;
      }
      /**
       * Reads data bytes.
       *
       * @param {Function} cb Callback
       * @return {(Error|RangeError|undefined)} A possible error
       * @private
       */
      getData(cb) {
        let data2 = EMPTY_BUFFER;
        if (this._payloadLength) {
          if (this._bufferedBytes < this._payloadLength) {
            this._loop = false;
            return;
          }
          data2 = this.consume(this._payloadLength);
          if (this._masked) unmask(data2, this._mask);
        }
        if (this._opcode > 7) return this.controlMessage(data2);
        if (this._compressed) {
          this._state = INFLATING;
          this.decompress(data2, cb);
          return;
        }
        if (data2.length) {
          this._messageLength = this._totalPayloadLength;
          this._fragments.push(data2);
        }
        return this.dataMessage();
      }
      /**
       * Decompresses data.
       *
       * @param {Buffer} data Compressed data
       * @param {Function} cb Callback
       * @private
       */
      decompress(data2, cb) {
        const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
        perMessageDeflate.decompress(data2, this._fin, (err, buf) => {
          if (err) return cb(err);
          if (buf.length) {
            this._messageLength += buf.length;
            if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
              return cb(
                error3(
                  RangeError,
                  "Max payload size exceeded",
                  false,
                  1009,
                  "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"
                )
              );
            }
            this._fragments.push(buf);
          }
          const er = this.dataMessage();
          if (er) return cb(er);
          this.startLoop(cb);
        });
      }
      /**
       * Handles a data message.
       *
       * @return {(Error|undefined)} A possible error
       * @private
       */
      dataMessage() {
        if (this._fin) {
          const messageLength = this._messageLength;
          const fragments = this._fragments;
          this._totalPayloadLength = 0;
          this._messageLength = 0;
          this._fragmented = 0;
          this._fragments = [];
          if (this._opcode === 2) {
            let data2;
            if (this._binaryType === "nodebuffer") {
              data2 = concat(fragments, messageLength);
            } else if (this._binaryType === "arraybuffer") {
              data2 = toArrayBuffer(concat(fragments, messageLength));
            } else {
              data2 = fragments;
            }
            this.emit("message", data2);
          } else {
            const buf = concat(fragments, messageLength);
            if (!isValidUTF8(buf)) {
              this._loop = false;
              return error3(
                Error,
                "invalid UTF-8 sequence",
                true,
                1007,
                "WS_ERR_INVALID_UTF8"
              );
            }
            this.emit("message", buf.toString());
          }
        }
        this._state = GET_INFO;
      }
      /**
       * Handles a control message.
       *
       * @param {Buffer} data Data to handle
       * @return {(Error|RangeError|undefined)} A possible error
       * @private
       */
      controlMessage(data2) {
        if (this._opcode === 8) {
          this._loop = false;
          if (data2.length === 0) {
            this.emit("conclude", 1005, "");
            this.end();
          } else if (data2.length === 1) {
            return error3(
              RangeError,
              "invalid payload length 1",
              true,
              1002,
              "WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"
            );
          } else {
            const code = data2.readUInt16BE(0);
            if (!isValidStatusCode(code)) {
              return error3(
                RangeError,
                `invalid status code ${code}`,
                true,
                1002,
                "WS_ERR_INVALID_CLOSE_CODE"
              );
            }
            const buf = data2.slice(2);
            if (!isValidUTF8(buf)) {
              return error3(
                Error,
                "invalid UTF-8 sequence",
                true,
                1007,
                "WS_ERR_INVALID_UTF8"
              );
            }
            this.emit("conclude", code, buf.toString());
            this.end();
          }
        } else if (this._opcode === 9) {
          this.emit("ping", data2);
        } else {
          this.emit("pong", data2);
        }
        this._state = GET_INFO;
      }
    };
    module2.exports = Receiver;
    function error3(ErrorCtor, message, prefix, statusCode, errorCode) {
      const err = new ErrorCtor(
        prefix ? `Invalid WebSocket frame: ${message}` : message
      );
      Error.captureStackTrace(err, error3);
      err.code = errorCode;
      err[kStatusCode] = statusCode;
      return err;
    }
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/sender.js
var require_sender = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/sender.js"(exports2, module2) {
    "use strict";
    var net = require("net");
    var tls = require("tls");
    var { randomFillSync } = require("crypto");
    var PerMessageDeflate = require_permessage_deflate();
    var { EMPTY_BUFFER } = require_constants2();
    var { isValidStatusCode } = require_validation();
    var { mask: applyMask, toBuffer } = require_buffer_util();
    var mask = Buffer.alloc(4);
    var Sender = class _Sender {
      /**
       * Creates a Sender instance.
       *
       * @param {(net.Socket|tls.Socket)} socket The connection socket
       * @param {Object} [extensions] An object containing the negotiated extensions
       */
      constructor(socket, extensions) {
        this._extensions = extensions || {};
        this._socket = socket;
        this._firstFragment = true;
        this._compress = false;
        this._bufferedBytes = 0;
        this._deflating = false;
        this._queue = [];
      }
      /**
       * Frames a piece of data according to the HyBi WebSocket protocol.
       *
       * @param {Buffer} data The data to frame
       * @param {Object} options Options object
       * @param {Number} options.opcode The opcode
       * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
       *     modified
       * @param {Boolean} [options.fin=false] Specifies whether or not to set the
       *     FIN bit
       * @param {Boolean} [options.mask=false] Specifies whether or not to mask
       *     `data`
       * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
       *     RSV1 bit
       * @return {Buffer[]} The framed data as a list of `Buffer` instances
       * @public
       */
      static frame(data2, options) {
        const merge = options.mask && options.readOnly;
        let offset = options.mask ? 6 : 2;
        let payloadLength = data2.length;
        if (data2.length >= 65536) {
          offset += 8;
          payloadLength = 127;
        } else if (data2.length > 125) {
          offset += 2;
          payloadLength = 126;
        }
        const target = Buffer.allocUnsafe(merge ? data2.length + offset : offset);
        target[0] = options.fin ? options.opcode | 128 : options.opcode;
        if (options.rsv1) target[0] |= 64;
        target[1] = payloadLength;
        if (payloadLength === 126) {
          target.writeUInt16BE(data2.length, 2);
        } else if (payloadLength === 127) {
          target.writeUInt32BE(0, 2);
          target.writeUInt32BE(data2.length, 6);
        }
        if (!options.mask) return [target, data2];
        randomFillSync(mask, 0, 4);
        target[1] |= 128;
        target[offset - 4] = mask[0];
        target[offset - 3] = mask[1];
        target[offset - 2] = mask[2];
        target[offset - 1] = mask[3];
        if (merge) {
          applyMask(data2, mask, target, offset, data2.length);
          return [target];
        }
        applyMask(data2, mask, data2, 0, data2.length);
        return [target, data2];
      }
      /**
       * Sends a close message to the other peer.
       *
       * @param {Number} [code] The status code component of the body
       * @param {String} [data] The message component of the body
       * @param {Boolean} [mask=false] Specifies whether or not to mask the message
       * @param {Function} [cb] Callback
       * @public
       */
      close(code, data2, mask2, cb) {
        let buf;
        if (code === void 0) {
          buf = EMPTY_BUFFER;
        } else if (typeof code !== "number" || !isValidStatusCode(code)) {
          throw new TypeError("First argument must be a valid error code number");
        } else if (data2 === void 0 || data2 === "") {
          buf = Buffer.allocUnsafe(2);
          buf.writeUInt16BE(code, 0);
        } else {
          const length = Buffer.byteLength(data2);
          if (length > 123) {
            throw new RangeError("The message must not be greater than 123 bytes");
          }
          buf = Buffer.allocUnsafe(2 + length);
          buf.writeUInt16BE(code, 0);
          buf.write(data2, 2);
        }
        if (this._deflating) {
          this.enqueue([this.doClose, buf, mask2, cb]);
        } else {
          this.doClose(buf, mask2, cb);
        }
      }
      /**
       * Frames and sends a close message.
       *
       * @param {Buffer} data The message to send
       * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
       * @param {Function} [cb] Callback
       * @private
       */
      doClose(data2, mask2, cb) {
        this.sendFrame(
          _Sender.frame(data2, {
            fin: true,
            rsv1: false,
            opcode: 8,
            mask: mask2,
            readOnly: false
          }),
          cb
        );
      }
      /**
       * Sends a ping message to the other peer.
       *
       * @param {*} data The message to send
       * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
       * @param {Function} [cb] Callback
       * @public
       */
      ping(data2, mask2, cb) {
        const buf = toBuffer(data2);
        if (buf.length > 125) {
          throw new RangeError("The data size must not be greater than 125 bytes");
        }
        if (this._deflating) {
          this.enqueue([this.doPing, buf, mask2, toBuffer.readOnly, cb]);
        } else {
          this.doPing(buf, mask2, toBuffer.readOnly, cb);
        }
      }
      /**
       * Frames and sends a ping message.
       *
       * @param {Buffer} data The message to send
       * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
       * @param {Boolean} [readOnly=false] Specifies whether `data` can be modified
       * @param {Function} [cb] Callback
       * @private
       */
      doPing(data2, mask2, readOnly, cb) {
        this.sendFrame(
          _Sender.frame(data2, {
            fin: true,
            rsv1: false,
            opcode: 9,
            mask: mask2,
            readOnly
          }),
          cb
        );
      }
      /**
       * Sends a pong message to the other peer.
       *
       * @param {*} data The message to send
       * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
       * @param {Function} [cb] Callback
       * @public
       */
      pong(data2, mask2, cb) {
        const buf = toBuffer(data2);
        if (buf.length > 125) {
          throw new RangeError("The data size must not be greater than 125 bytes");
        }
        if (this._deflating) {
          this.enqueue([this.doPong, buf, mask2, toBuffer.readOnly, cb]);
        } else {
          this.doPong(buf, mask2, toBuffer.readOnly, cb);
        }
      }
      /**
       * Frames and sends a pong message.
       *
       * @param {Buffer} data The message to send
       * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
       * @param {Boolean} [readOnly=false] Specifies whether `data` can be modified
       * @param {Function} [cb] Callback
       * @private
       */
      doPong(data2, mask2, readOnly, cb) {
        this.sendFrame(
          _Sender.frame(data2, {
            fin: true,
            rsv1: false,
            opcode: 10,
            mask: mask2,
            readOnly
          }),
          cb
        );
      }
      /**
       * Sends a data message to the other peer.
       *
       * @param {*} data The message to send
       * @param {Object} options Options object
       * @param {Boolean} [options.compress=false] Specifies whether or not to
       *     compress `data`
       * @param {Boolean} [options.binary=false] Specifies whether `data` is binary
       *     or text
       * @param {Boolean} [options.fin=false] Specifies whether the fragment is the
       *     last one
       * @param {Boolean} [options.mask=false] Specifies whether or not to mask
       *     `data`
       * @param {Function} [cb] Callback
       * @public
       */
      send(data2, options, cb) {
        const buf = toBuffer(data2);
        const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
        let opcode = options.binary ? 2 : 1;
        let rsv1 = options.compress;
        if (this._firstFragment) {
          this._firstFragment = false;
          if (rsv1 && perMessageDeflate) {
            rsv1 = buf.length >= perMessageDeflate._threshold;
          }
          this._compress = rsv1;
        } else {
          rsv1 = false;
          opcode = 0;
        }
        if (options.fin) this._firstFragment = true;
        if (perMessageDeflate) {
          const opts = {
            fin: options.fin,
            rsv1,
            opcode,
            mask: options.mask,
            readOnly: toBuffer.readOnly
          };
          if (this._deflating) {
            this.enqueue([this.dispatch, buf, this._compress, opts, cb]);
          } else {
            this.dispatch(buf, this._compress, opts, cb);
          }
        } else {
          this.sendFrame(
            _Sender.frame(buf, {
              fin: options.fin,
              rsv1: false,
              opcode,
              mask: options.mask,
              readOnly: toBuffer.readOnly
            }),
            cb
          );
        }
      }
      /**
       * Dispatches a data message.
       *
       * @param {Buffer} data The message to send
       * @param {Boolean} [compress=false] Specifies whether or not to compress
       *     `data`
       * @param {Object} options Options object
       * @param {Number} options.opcode The opcode
       * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
       *     modified
       * @param {Boolean} [options.fin=false] Specifies whether or not to set the
       *     FIN bit
       * @param {Boolean} [options.mask=false] Specifies whether or not to mask
       *     `data`
       * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
       *     RSV1 bit
       * @param {Function} [cb] Callback
       * @private
       */
      dispatch(data2, compress, options, cb) {
        if (!compress) {
          this.sendFrame(_Sender.frame(data2, options), cb);
          return;
        }
        const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
        this._bufferedBytes += data2.length;
        this._deflating = true;
        perMessageDeflate.compress(data2, options.fin, (_, buf) => {
          if (this._socket.destroyed) {
            const err = new Error(
              "The socket was closed while data was being compressed"
            );
            if (typeof cb === "function") cb(err);
            for (let i5 = 0; i5 < this._queue.length; i5++) {
              const callback = this._queue[i5][4];
              if (typeof callback === "function") callback(err);
            }
            return;
          }
          this._bufferedBytes -= data2.length;
          this._deflating = false;
          options.readOnly = false;
          this.sendFrame(_Sender.frame(buf, options), cb);
          this.dequeue();
        });
      }
      /**
       * Executes queued send operations.
       *
       * @private
       */
      dequeue() {
        while (!this._deflating && this._queue.length) {
          const params = this._queue.shift();
          this._bufferedBytes -= params[1].length;
          Reflect.apply(params[0], this, params.slice(1));
        }
      }
      /**
       * Enqueues a send operation.
       *
       * @param {Array} params Send operation parameters.
       * @private
       */
      enqueue(params) {
        this._bufferedBytes += params[1].length;
        this._queue.push(params);
      }
      /**
       * Sends a frame.
       *
       * @param {Buffer[]} list The frame to send
       * @param {Function} [cb] Callback
       * @private
       */
      sendFrame(list2, cb) {
        if (list2.length === 2) {
          this._socket.cork();
          this._socket.write(list2[0]);
          this._socket.write(list2[1], cb);
          this._socket.uncork();
        } else {
          this._socket.write(list2[0], cb);
        }
      }
    };
    module2.exports = Sender;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/event-target.js
var require_event_target = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/event-target.js"(exports2, module2) {
    "use strict";
    var Event = class {
      /**
       * Create a new `Event`.
       *
       * @param {String} type The name of the event
       * @param {Object} target A reference to the target to which the event was
       *     dispatched
       */
      constructor(type, target) {
        this.target = target;
        this.type = type;
      }
    };
    var MessageEvent = class extends Event {
      /**
       * Create a new `MessageEvent`.
       *
       * @param {(String|Buffer|ArrayBuffer|Buffer[])} data The received data
       * @param {WebSocket} target A reference to the target to which the event was
       *     dispatched
       */
      constructor(data2, target) {
        super("message", target);
        this.data = data2;
      }
    };
    var CloseEvent = class extends Event {
      /**
       * Create a new `CloseEvent`.
       *
       * @param {Number} code The status code explaining why the connection is being
       *     closed
       * @param {String} reason A human-readable string explaining why the
       *     connection is closing
       * @param {WebSocket} target A reference to the target to which the event was
       *     dispatched
       */
      constructor(code, reason, target) {
        super("close", target);
        this.wasClean = target._closeFrameReceived && target._closeFrameSent;
        this.reason = reason;
        this.code = code;
      }
    };
    var OpenEvent = class extends Event {
      /**
       * Create a new `OpenEvent`.
       *
       * @param {WebSocket} target A reference to the target to which the event was
       *     dispatched
       */
      constructor(target) {
        super("open", target);
      }
    };
    var ErrorEvent = class extends Event {
      /**
       * Create a new `ErrorEvent`.
       *
       * @param {Object} error The error that generated this event
       * @param {WebSocket} target A reference to the target to which the event was
       *     dispatched
       */
      constructor(error3, target) {
        super("error", target);
        this.message = error3.message;
        this.error = error3;
      }
    };
    var EventTarget = {
      /**
       * Register an event listener.
       *
       * @param {String} type A string representing the event type to listen for
       * @param {Function} listener The listener to add
       * @param {Object} [options] An options object specifies characteristics about
       *     the event listener
       * @param {Boolean} [options.once=false] A `Boolean`` indicating that the
       *     listener should be invoked at most once after being added. If `true`,
       *     the listener would be automatically removed when invoked.
       * @public
       */
      addEventListener(type, listener, options) {
        if (typeof listener !== "function") return;
        function onMessage(data2) {
          listener.call(this, new MessageEvent(data2, this));
        }
        function onClose(code, message) {
          listener.call(this, new CloseEvent(code, message, this));
        }
        function onError(error3) {
          listener.call(this, new ErrorEvent(error3, this));
        }
        function onOpen() {
          listener.call(this, new OpenEvent(this));
        }
        const method = options && options.once ? "once" : "on";
        if (type === "message") {
          onMessage._listener = listener;
          this[method](type, onMessage);
        } else if (type === "close") {
          onClose._listener = listener;
          this[method](type, onClose);
        } else if (type === "error") {
          onError._listener = listener;
          this[method](type, onError);
        } else if (type === "open") {
          onOpen._listener = listener;
          this[method](type, onOpen);
        } else {
          this[method](type, listener);
        }
      },
      /**
       * Remove an event listener.
       *
       * @param {String} type A string representing the event type to remove
       * @param {Function} listener The listener to remove
       * @public
       */
      removeEventListener(type, listener) {
        const listeners = this.listeners(type);
        for (let i5 = 0; i5 < listeners.length; i5++) {
          if (listeners[i5] === listener || listeners[i5]._listener === listener) {
            this.removeListener(type, listeners[i5]);
          }
        }
      }
    };
    module2.exports = EventTarget;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/extension.js
var require_extension = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/extension.js"(exports2, module2) {
    "use strict";
    var tokenChars = [
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      // 0 - 15
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      // 16 - 31
      0,
      1,
      0,
      1,
      1,
      1,
      1,
      1,
      0,
      0,
      1,
      1,
      0,
      1,
      1,
      0,
      // 32 - 47
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      0,
      0,
      0,
      0,
      0,
      0,
      // 48 - 63
      0,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      // 64 - 79
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      0,
      0,
      0,
      1,
      1,
      // 80 - 95
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      // 96 - 111
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      0,
      1,
      0,
      1,
      0
      // 112 - 127
    ];
    function push(dest, name, elem) {
      if (dest[name] === void 0) dest[name] = [elem];
      else dest[name].push(elem);
    }
    function parse(header) {
      const offers = /* @__PURE__ */ Object.create(null);
      if (header === void 0 || header === "") return offers;
      let params = /* @__PURE__ */ Object.create(null);
      let mustUnescape = false;
      let isEscaping = false;
      let inQuotes = false;
      let extensionName;
      let paramName;
      let start = -1;
      let end = -1;
      let i5 = 0;
      for (; i5 < header.length; i5++) {
        const code = header.charCodeAt(i5);
        if (extensionName === void 0) {
          if (end === -1 && tokenChars[code] === 1) {
            if (start === -1) start = i5;
          } else if (code === 32 || code === 9) {
            if (end === -1 && start !== -1) end = i5;
          } else if (code === 59 || code === 44) {
            if (start === -1) {
              throw new SyntaxError(`Unexpected character at index ${i5}`);
            }
            if (end === -1) end = i5;
            const name = header.slice(start, end);
            if (code === 44) {
              push(offers, name, params);
              params = /* @__PURE__ */ Object.create(null);
            } else {
              extensionName = name;
            }
            start = end = -1;
          } else {
            throw new SyntaxError(`Unexpected character at index ${i5}`);
          }
        } else if (paramName === void 0) {
          if (end === -1 && tokenChars[code] === 1) {
            if (start === -1) start = i5;
          } else if (code === 32 || code === 9) {
            if (end === -1 && start !== -1) end = i5;
          } else if (code === 59 || code === 44) {
            if (start === -1) {
              throw new SyntaxError(`Unexpected character at index ${i5}`);
            }
            if (end === -1) end = i5;
            push(params, header.slice(start, end), true);
            if (code === 44) {
              push(offers, extensionName, params);
              params = /* @__PURE__ */ Object.create(null);
              extensionName = void 0;
            }
            start = end = -1;
          } else if (code === 61 && start !== -1 && end === -1) {
            paramName = header.slice(start, i5);
            start = end = -1;
          } else {
            throw new SyntaxError(`Unexpected character at index ${i5}`);
          }
        } else {
          if (isEscaping) {
            if (tokenChars[code] !== 1) {
              throw new SyntaxError(`Unexpected character at index ${i5}`);
            }
            if (start === -1) start = i5;
            else if (!mustUnescape) mustUnescape = true;
            isEscaping = false;
          } else if (inQuotes) {
            if (tokenChars[code] === 1) {
              if (start === -1) start = i5;
            } else if (code === 34 && start !== -1) {
              inQuotes = false;
              end = i5;
            } else if (code === 92) {
              isEscaping = true;
            } else {
              throw new SyntaxError(`Unexpected character at index ${i5}`);
            }
          } else if (code === 34 && header.charCodeAt(i5 - 1) === 61) {
            inQuotes = true;
          } else if (end === -1 && tokenChars[code] === 1) {
            if (start === -1) start = i5;
          } else if (start !== -1 && (code === 32 || code === 9)) {
            if (end === -1) end = i5;
          } else if (code === 59 || code === 44) {
            if (start === -1) {
              throw new SyntaxError(`Unexpected character at index ${i5}`);
            }
            if (end === -1) end = i5;
            let value = header.slice(start, end);
            if (mustUnescape) {
              value = value.replace(/\\/g, "");
              mustUnescape = false;
            }
            push(params, paramName, value);
            if (code === 44) {
              push(offers, extensionName, params);
              params = /* @__PURE__ */ Object.create(null);
              extensionName = void 0;
            }
            paramName = void 0;
            start = end = -1;
          } else {
            throw new SyntaxError(`Unexpected character at index ${i5}`);
          }
        }
      }
      if (start === -1 || inQuotes) {
        throw new SyntaxError("Unexpected end of input");
      }
      if (end === -1) end = i5;
      const token = header.slice(start, end);
      if (extensionName === void 0) {
        push(offers, token, params);
      } else {
        if (paramName === void 0) {
          push(params, token, true);
        } else if (mustUnescape) {
          push(params, paramName, token.replace(/\\/g, ""));
        } else {
          push(params, paramName, token);
        }
        push(offers, extensionName, params);
      }
      return offers;
    }
    function format2(extensions) {
      return Object.keys(extensions).map((extension) => {
        let configurations = extensions[extension];
        if (!Array.isArray(configurations)) configurations = [configurations];
        return configurations.map((params) => {
          return [extension].concat(
            Object.keys(params).map((k5) => {
              let values = params[k5];
              if (!Array.isArray(values)) values = [values];
              return values.map((v) => v === true ? k5 : `${k5}=${v}`).join("; ");
            })
          ).join("; ");
        }).join(", ");
      }).join(", ");
    }
    module2.exports = { format: format2, parse };
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/websocket.js
var require_websocket = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/websocket.js"(exports2, module2) {
    "use strict";
    var EventEmitter = require("events");
    var https = require("https");
    var http = require("http");
    var net = require("net");
    var tls = require("tls");
    var { randomBytes: randomBytes2, createHash } = require("crypto");
    var { Readable } = require("stream");
    var { URL: URL2 } = require("url");
    var PerMessageDeflate = require_permessage_deflate();
    var Receiver = require_receiver();
    var Sender = require_sender();
    var {
      BINARY_TYPES,
      EMPTY_BUFFER,
      GUID,
      kStatusCode,
      kWebSocket,
      NOOP
    } = require_constants2();
    var { addEventListener, removeEventListener } = require_event_target();
    var { format: format2, parse } = require_extension();
    var { toBuffer } = require_buffer_util();
    var readyStates = ["CONNECTING", "OPEN", "CLOSING", "CLOSED"];
    var protocolVersions = [8, 13];
    var closeTimeout = 30 * 1e3;
    var WebSocket2 = class _WebSocket extends EventEmitter {
      /**
       * Create a new `WebSocket`.
       *
       * @param {(String|URL)} address The URL to which to connect
       * @param {(String|String[])} [protocols] The subprotocols
       * @param {Object} [options] Connection options
       */
      constructor(address, protocols, options) {
        super();
        this._binaryType = BINARY_TYPES[0];
        this._closeCode = 1006;
        this._closeFrameReceived = false;
        this._closeFrameSent = false;
        this._closeMessage = "";
        this._closeTimer = null;
        this._extensions = {};
        this._protocol = "";
        this._readyState = _WebSocket.CONNECTING;
        this._receiver = null;
        this._sender = null;
        this._socket = null;
        if (address !== null) {
          this._bufferedAmount = 0;
          this._isServer = false;
          this._redirects = 0;
          if (Array.isArray(protocols)) {
            protocols = protocols.join(", ");
          } else if (typeof protocols === "object" && protocols !== null) {
            options = protocols;
            protocols = void 0;
          }
          initAsClient(this, address, protocols, options);
        } else {
          this._isServer = true;
        }
      }
      /**
       * This deviates from the WHATWG interface since ws doesn't support the
       * required default "blob" type (instead we define a custom "nodebuffer"
       * type).
       *
       * @type {String}
       */
      get binaryType() {
        return this._binaryType;
      }
      set binaryType(type) {
        if (!BINARY_TYPES.includes(type)) return;
        this._binaryType = type;
        if (this._receiver) this._receiver._binaryType = type;
      }
      /**
       * @type {Number}
       */
      get bufferedAmount() {
        if (!this._socket) return this._bufferedAmount;
        return this._socket._writableState.length + this._sender._bufferedBytes;
      }
      /**
       * @type {String}
       */
      get extensions() {
        return Object.keys(this._extensions).join();
      }
      /**
       * @type {Function}
       */
      /* istanbul ignore next */
      get onclose() {
        return void 0;
      }
      /* istanbul ignore next */
      set onclose(listener) {
      }
      /**
       * @type {Function}
       */
      /* istanbul ignore next */
      get onerror() {
        return void 0;
      }
      /* istanbul ignore next */
      set onerror(listener) {
      }
      /**
       * @type {Function}
       */
      /* istanbul ignore next */
      get onopen() {
        return void 0;
      }
      /* istanbul ignore next */
      set onopen(listener) {
      }
      /**
       * @type {Function}
       */
      /* istanbul ignore next */
      get onmessage() {
        return void 0;
      }
      /* istanbul ignore next */
      set onmessage(listener) {
      }
      /**
       * @type {String}
       */
      get protocol() {
        return this._protocol;
      }
      /**
       * @type {Number}
       */
      get readyState() {
        return this._readyState;
      }
      /**
       * @type {String}
       */
      get url() {
        return this._url;
      }
      /**
       * Set up the socket and the internal resources.
       *
       * @param {(net.Socket|tls.Socket)} socket The network socket between the
       *     server and client
       * @param {Buffer} head The first packet of the upgraded stream
       * @param {Number} [maxPayload=0] The maximum allowed message size
       * @private
       */
      setSocket(socket, head, maxPayload) {
        const receiver = new Receiver(
          this.binaryType,
          this._extensions,
          this._isServer,
          maxPayload
        );
        this._sender = new Sender(socket, this._extensions);
        this._receiver = receiver;
        this._socket = socket;
        receiver[kWebSocket] = this;
        socket[kWebSocket] = this;
        receiver.on("conclude", receiverOnConclude);
        receiver.on("drain", receiverOnDrain);
        receiver.on("error", receiverOnError);
        receiver.on("message", receiverOnMessage);
        receiver.on("ping", receiverOnPing);
        receiver.on("pong", receiverOnPong);
        socket.setTimeout(0);
        socket.setNoDelay();
        if (head.length > 0) socket.unshift(head);
        socket.on("close", socketOnClose);
        socket.on("data", socketOnData);
        socket.on("end", socketOnEnd);
        socket.on("error", socketOnError);
        this._readyState = _WebSocket.OPEN;
        this.emit("open");
      }
      /**
       * Emit the `'close'` event.
       *
       * @private
       */
      emitClose() {
        if (!this._socket) {
          this._readyState = _WebSocket.CLOSED;
          this.emit("close", this._closeCode, this._closeMessage);
          return;
        }
        if (this._extensions[PerMessageDeflate.extensionName]) {
          this._extensions[PerMessageDeflate.extensionName].cleanup();
        }
        this._receiver.removeAllListeners();
        this._readyState = _WebSocket.CLOSED;
        this.emit("close", this._closeCode, this._closeMessage);
      }
      /**
       * Start a closing handshake.
       *
       *          +----------+   +-----------+   +----------+
       *     - - -|ws.close()|-->|close frame|-->|ws.close()|- - -
       *    |     +----------+   +-----------+   +----------+     |
       *          +----------+   +-----------+         |
       * CLOSING  |ws.close()|<--|close frame|<--+-----+       CLOSING
       *          +----------+   +-----------+   |
       *    |           |                        |   +---+        |
       *                +------------------------+-->|fin| - - - -
       *    |         +---+                      |   +---+
       *     - - - - -|fin|<---------------------+
       *              +---+
       *
       * @param {Number} [code] Status code explaining why the connection is closing
       * @param {String} [data] A string explaining why the connection is closing
       * @public
       */
      close(code, data2) {
        if (this.readyState === _WebSocket.CLOSED) return;
        if (this.readyState === _WebSocket.CONNECTING) {
          const msg = "WebSocket was closed before the connection was established";
          return abortHandshake(this, this._req, msg);
        }
        if (this.readyState === _WebSocket.CLOSING) {
          if (this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted)) {
            this._socket.end();
          }
          return;
        }
        this._readyState = _WebSocket.CLOSING;
        this._sender.close(code, data2, !this._isServer, (err) => {
          if (err) return;
          this._closeFrameSent = true;
          if (this._closeFrameReceived || this._receiver._writableState.errorEmitted) {
            this._socket.end();
          }
        });
        this._closeTimer = setTimeout(
          this._socket.destroy.bind(this._socket),
          closeTimeout
        );
      }
      /**
       * Send a ping.
       *
       * @param {*} [data] The data to send
       * @param {Boolean} [mask] Indicates whether or not to mask `data`
       * @param {Function} [cb] Callback which is executed when the ping is sent
       * @public
       */
      ping(data2, mask, cb) {
        if (this.readyState === _WebSocket.CONNECTING) {
          throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
        }
        if (typeof data2 === "function") {
          cb = data2;
          data2 = mask = void 0;
        } else if (typeof mask === "function") {
          cb = mask;
          mask = void 0;
        }
        if (typeof data2 === "number") data2 = data2.toString();
        if (this.readyState !== _WebSocket.OPEN) {
          sendAfterClose(this, data2, cb);
          return;
        }
        if (mask === void 0) mask = !this._isServer;
        this._sender.ping(data2 || EMPTY_BUFFER, mask, cb);
      }
      /**
       * Send a pong.
       *
       * @param {*} [data] The data to send
       * @param {Boolean} [mask] Indicates whether or not to mask `data`
       * @param {Function} [cb] Callback which is executed when the pong is sent
       * @public
       */
      pong(data2, mask, cb) {
        if (this.readyState === _WebSocket.CONNECTING) {
          throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
        }
        if (typeof data2 === "function") {
          cb = data2;
          data2 = mask = void 0;
        } else if (typeof mask === "function") {
          cb = mask;
          mask = void 0;
        }
        if (typeof data2 === "number") data2 = data2.toString();
        if (this.readyState !== _WebSocket.OPEN) {
          sendAfterClose(this, data2, cb);
          return;
        }
        if (mask === void 0) mask = !this._isServer;
        this._sender.pong(data2 || EMPTY_BUFFER, mask, cb);
      }
      /**
       * Send a data message.
       *
       * @param {*} data The message to send
       * @param {Object} [options] Options object
       * @param {Boolean} [options.compress] Specifies whether or not to compress
       *     `data`
       * @param {Boolean} [options.binary] Specifies whether `data` is binary or
       *     text
       * @param {Boolean} [options.fin=true] Specifies whether the fragment is the
       *     last one
       * @param {Boolean} [options.mask] Specifies whether or not to mask `data`
       * @param {Function} [cb] Callback which is executed when data is written out
       * @public
       */
      send(data2, options, cb) {
        if (this.readyState === _WebSocket.CONNECTING) {
          throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
        }
        if (typeof options === "function") {
          cb = options;
          options = {};
        }
        if (typeof data2 === "number") data2 = data2.toString();
        if (this.readyState !== _WebSocket.OPEN) {
          sendAfterClose(this, data2, cb);
          return;
        }
        const opts = {
          binary: typeof data2 !== "string",
          mask: !this._isServer,
          compress: true,
          fin: true,
          ...options
        };
        if (!this._extensions[PerMessageDeflate.extensionName]) {
          opts.compress = false;
        }
        this._sender.send(data2 || EMPTY_BUFFER, opts, cb);
      }
      /**
       * Forcibly close the connection.
       *
       * @public
       */
      terminate() {
        if (this.readyState === _WebSocket.CLOSED) return;
        if (this.readyState === _WebSocket.CONNECTING) {
          const msg = "WebSocket was closed before the connection was established";
          return abortHandshake(this, this._req, msg);
        }
        if (this._socket) {
          this._readyState = _WebSocket.CLOSING;
          this._socket.destroy();
        }
      }
    };
    Object.defineProperty(WebSocket2, "CONNECTING", {
      enumerable: true,
      value: readyStates.indexOf("CONNECTING")
    });
    Object.defineProperty(WebSocket2.prototype, "CONNECTING", {
      enumerable: true,
      value: readyStates.indexOf("CONNECTING")
    });
    Object.defineProperty(WebSocket2, "OPEN", {
      enumerable: true,
      value: readyStates.indexOf("OPEN")
    });
    Object.defineProperty(WebSocket2.prototype, "OPEN", {
      enumerable: true,
      value: readyStates.indexOf("OPEN")
    });
    Object.defineProperty(WebSocket2, "CLOSING", {
      enumerable: true,
      value: readyStates.indexOf("CLOSING")
    });
    Object.defineProperty(WebSocket2.prototype, "CLOSING", {
      enumerable: true,
      value: readyStates.indexOf("CLOSING")
    });
    Object.defineProperty(WebSocket2, "CLOSED", {
      enumerable: true,
      value: readyStates.indexOf("CLOSED")
    });
    Object.defineProperty(WebSocket2.prototype, "CLOSED", {
      enumerable: true,
      value: readyStates.indexOf("CLOSED")
    });
    [
      "binaryType",
      "bufferedAmount",
      "extensions",
      "protocol",
      "readyState",
      "url"
    ].forEach((property) => {
      Object.defineProperty(WebSocket2.prototype, property, { enumerable: true });
    });
    ["open", "error", "close", "message"].forEach((method) => {
      Object.defineProperty(WebSocket2.prototype, `on${method}`, {
        enumerable: true,
        get() {
          const listeners = this.listeners(method);
          for (let i5 = 0; i5 < listeners.length; i5++) {
            if (listeners[i5]._listener) return listeners[i5]._listener;
          }
          return void 0;
        },
        set(listener) {
          const listeners = this.listeners(method);
          for (let i5 = 0; i5 < listeners.length; i5++) {
            if (listeners[i5]._listener) this.removeListener(method, listeners[i5]);
          }
          this.addEventListener(method, listener);
        }
      });
    });
    WebSocket2.prototype.addEventListener = addEventListener;
    WebSocket2.prototype.removeEventListener = removeEventListener;
    module2.exports = WebSocket2;
    function initAsClient(websocket, address, protocols, options) {
      const opts = {
        protocolVersion: protocolVersions[1],
        maxPayload: 100 * 1024 * 1024,
        perMessageDeflate: true,
        followRedirects: false,
        maxRedirects: 10,
        ...options,
        createConnection: void 0,
        socketPath: void 0,
        hostname: void 0,
        protocol: void 0,
        timeout: void 0,
        method: void 0,
        host: void 0,
        path: void 0,
        port: void 0
      };
      if (!protocolVersions.includes(opts.protocolVersion)) {
        throw new RangeError(
          `Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(", ")})`
        );
      }
      let parsedUrl;
      if (address instanceof URL2) {
        parsedUrl = address;
        websocket._url = address.href;
      } else {
        parsedUrl = new URL2(address);
        websocket._url = address;
      }
      const isUnixSocket = parsedUrl.protocol === "ws+unix:";
      if (!parsedUrl.host && (!isUnixSocket || !parsedUrl.pathname)) {
        const err = new Error(`Invalid URL: ${websocket.url}`);
        if (websocket._redirects === 0) {
          throw err;
        } else {
          emitErrorAndClose(websocket, err);
          return;
        }
      }
      const isSecure = parsedUrl.protocol === "wss:" || parsedUrl.protocol === "https:";
      const defaultPort = isSecure ? 443 : 80;
      const key = randomBytes2(16).toString("base64");
      const get2 = isSecure ? https.get : http.get;
      let perMessageDeflate;
      opts.createConnection = isSecure ? tlsConnect : netConnect;
      opts.defaultPort = opts.defaultPort || defaultPort;
      opts.port = parsedUrl.port || defaultPort;
      opts.host = parsedUrl.hostname.startsWith("[") ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname;
      opts.headers = {
        "Sec-WebSocket-Version": opts.protocolVersion,
        "Sec-WebSocket-Key": key,
        Connection: "Upgrade",
        Upgrade: "websocket",
        ...opts.headers
      };
      opts.path = parsedUrl.pathname + parsedUrl.search;
      opts.timeout = opts.handshakeTimeout;
      if (opts.perMessageDeflate) {
        perMessageDeflate = new PerMessageDeflate(
          opts.perMessageDeflate !== true ? opts.perMessageDeflate : {},
          false,
          opts.maxPayload
        );
        opts.headers["Sec-WebSocket-Extensions"] = format2({
          [PerMessageDeflate.extensionName]: perMessageDeflate.offer()
        });
      }
      if (protocols) {
        opts.headers["Sec-WebSocket-Protocol"] = protocols;
      }
      if (opts.origin) {
        if (opts.protocolVersion < 13) {
          opts.headers["Sec-WebSocket-Origin"] = opts.origin;
        } else {
          opts.headers.Origin = opts.origin;
        }
      }
      if (parsedUrl.username || parsedUrl.password) {
        opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
      }
      if (isUnixSocket) {
        const parts = opts.path.split(":");
        opts.socketPath = parts[0];
        opts.path = parts[1];
      }
      if (opts.followRedirects) {
        if (websocket._redirects === 0) {
          websocket._originalUnixSocket = isUnixSocket;
          websocket._originalSecure = isSecure;
          websocket._originalHostOrSocketPath = isUnixSocket ? opts.socketPath : parsedUrl.host;
          const headers = options && options.headers;
          options = { ...options, headers: {} };
          if (headers) {
            for (const [key2, value] of Object.entries(headers)) {
              options.headers[key2.toLowerCase()] = value;
            }
          }
        } else {
          const isSameHost = isUnixSocket ? websocket._originalUnixSocket ? opts.socketPath === websocket._originalHostOrSocketPath : false : websocket._originalUnixSocket ? false : parsedUrl.host === websocket._originalHostOrSocketPath;
          if (!isSameHost || websocket._originalSecure && !isSecure) {
            delete opts.headers.authorization;
            delete opts.headers.cookie;
            if (!isSameHost) delete opts.headers.host;
            opts.auth = void 0;
          }
        }
        if (opts.auth && !options.headers.authorization) {
          options.headers.authorization = "Basic " + Buffer.from(opts.auth).toString("base64");
        }
      }
      let req = websocket._req = get2(opts);
      if (opts.timeout) {
        req.on("timeout", () => {
          abortHandshake(websocket, req, "Opening handshake has timed out");
        });
      }
      req.on("error", (err) => {
        if (req === null || req.aborted) return;
        req = websocket._req = null;
        emitErrorAndClose(websocket, err);
      });
      req.on("response", (res) => {
        const location = res.headers.location;
        const statusCode = res.statusCode;
        if (location && opts.followRedirects && statusCode >= 300 && statusCode < 400) {
          if (++websocket._redirects > opts.maxRedirects) {
            abortHandshake(websocket, req, "Maximum redirects exceeded");
            return;
          }
          req.abort();
          let addr;
          try {
            addr = new URL2(location, address);
          } catch (err) {
            emitErrorAndClose(websocket, err);
            return;
          }
          initAsClient(websocket, addr, protocols, options);
        } else if (!websocket.emit("unexpected-response", req, res)) {
          abortHandshake(
            websocket,
            req,
            `Unexpected server response: ${res.statusCode}`
          );
        }
      });
      req.on("upgrade", (res, socket, head) => {
        websocket.emit("upgrade", res);
        if (websocket.readyState !== WebSocket2.CONNECTING) return;
        req = websocket._req = null;
        const upgrade = res.headers.upgrade;
        if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") {
          abortHandshake(websocket, socket, "Invalid Upgrade header");
          return;
        }
        const digest = createHash("sha1").update(key + GUID).digest("base64");
        if (res.headers["sec-websocket-accept"] !== digest) {
          abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Accept header");
          return;
        }
        const serverProt = res.headers["sec-websocket-protocol"];
        const protList = (protocols || "").split(/, */);
        let protError;
        if (!protocols && serverProt) {
          protError = "Server sent a subprotocol but none was requested";
        } else if (protocols && !serverProt) {
          protError = "Server sent no subprotocol";
        } else if (serverProt && !protList.includes(serverProt)) {
          protError = "Server sent an invalid subprotocol";
        }
        if (protError) {
          abortHandshake(websocket, socket, protError);
          return;
        }
        if (serverProt) websocket._protocol = serverProt;
        const secWebSocketExtensions = res.headers["sec-websocket-extensions"];
        if (secWebSocketExtensions !== void 0) {
          if (!perMessageDeflate) {
            const message = "Server sent a Sec-WebSocket-Extensions header but no extension was requested";
            abortHandshake(websocket, socket, message);
            return;
          }
          let extensions;
          try {
            extensions = parse(secWebSocketExtensions);
          } catch (err) {
            const message = "Invalid Sec-WebSocket-Extensions header";
            abortHandshake(websocket, socket, message);
            return;
          }
          const extensionNames = Object.keys(extensions);
          if (extensionNames.length) {
            if (extensionNames.length !== 1 || extensionNames[0] !== PerMessageDeflate.extensionName) {
              const message = "Server indicated an extension that was not requested";
              abortHandshake(websocket, socket, message);
              return;
            }
            try {
              perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]);
            } catch (err) {
              const message = "Invalid Sec-WebSocket-Extensions header";
              abortHandshake(websocket, socket, message);
              return;
            }
            websocket._extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
          }
        }
        websocket.setSocket(socket, head, opts.maxPayload);
      });
    }
    function emitErrorAndClose(websocket, err) {
      websocket._readyState = WebSocket2.CLOSING;
      websocket.emit("error", err);
      websocket.emitClose();
    }
    function netConnect(options) {
      options.path = options.socketPath;
      return net.connect(options);
    }
    function tlsConnect(options) {
      options.path = void 0;
      if (!options.servername && options.servername !== "") {
        options.servername = net.isIP(options.host) ? "" : options.host;
      }
      return tls.connect(options);
    }
    function abortHandshake(websocket, stream, message) {
      websocket._readyState = WebSocket2.CLOSING;
      const err = new Error(message);
      Error.captureStackTrace(err, abortHandshake);
      if (stream.setHeader) {
        stream.abort();
        if (stream.socket && !stream.socket.destroyed) {
          stream.socket.destroy();
        }
        stream.once("abort", websocket.emitClose.bind(websocket));
        websocket.emit("error", err);
      } else {
        stream.destroy(err);
        stream.once("error", websocket.emit.bind(websocket, "error"));
        stream.once("close", websocket.emitClose.bind(websocket));
      }
    }
    function sendAfterClose(websocket, data2, cb) {
      if (data2) {
        const length = toBuffer(data2).length;
        if (websocket._socket) websocket._sender._bufferedBytes += length;
        else websocket._bufferedAmount += length;
      }
      if (cb) {
        const err = new Error(
          `WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`
        );
        cb(err);
      }
    }
    function receiverOnConclude(code, reason) {
      const websocket = this[kWebSocket];
      websocket._closeFrameReceived = true;
      websocket._closeMessage = reason;
      websocket._closeCode = code;
      if (websocket._socket[kWebSocket] === void 0) return;
      websocket._socket.removeListener("data", socketOnData);
      process.nextTick(resume, websocket._socket);
      if (code === 1005) websocket.close();
      else websocket.close(code, reason);
    }
    function receiverOnDrain() {
      this[kWebSocket]._socket.resume();
    }
    function receiverOnError(err) {
      const websocket = this[kWebSocket];
      if (websocket._socket[kWebSocket] !== void 0) {
        websocket._socket.removeListener("data", socketOnData);
        process.nextTick(resume, websocket._socket);
        websocket.close(err[kStatusCode]);
      }
      websocket.emit("error", err);
    }
    function receiverOnFinish() {
      this[kWebSocket].emitClose();
    }
    function receiverOnMessage(data2) {
      this[kWebSocket].emit("message", data2);
    }
    function receiverOnPing(data2) {
      const websocket = this[kWebSocket];
      websocket.pong(data2, !websocket._isServer, NOOP);
      websocket.emit("ping", data2);
    }
    function receiverOnPong(data2) {
      this[kWebSocket].emit("pong", data2);
    }
    function resume(stream) {
      stream.resume();
    }
    function socketOnClose() {
      const websocket = this[kWebSocket];
      this.removeListener("close", socketOnClose);
      this.removeListener("data", socketOnData);
      this.removeListener("end", socketOnEnd);
      websocket._readyState = WebSocket2.CLOSING;
      let chunk;
      if (!this._readableState.endEmitted && !websocket._closeFrameReceived && !websocket._receiver._writableState.errorEmitted && (chunk = websocket._socket.read()) !== null) {
        websocket._receiver.write(chunk);
      }
      websocket._receiver.end();
      this[kWebSocket] = void 0;
      clearTimeout(websocket._closeTimer);
      if (websocket._receiver._writableState.finished || websocket._receiver._writableState.errorEmitted) {
        websocket.emitClose();
      } else {
        websocket._receiver.on("error", receiverOnFinish);
        websocket._receiver.on("finish", receiverOnFinish);
      }
    }
    function socketOnData(chunk) {
      if (!this[kWebSocket]._receiver.write(chunk)) {
        this.pause();
      }
    }
    function socketOnEnd() {
      const websocket = this[kWebSocket];
      websocket._readyState = WebSocket2.CLOSING;
      websocket._receiver.end();
      this.end();
    }
    function socketOnError() {
      const websocket = this[kWebSocket];
      this.removeListener("error", socketOnError);
      this.on("error", NOOP);
      if (websocket) {
        websocket._readyState = WebSocket2.CLOSING;
        this.destroy();
      }
    }
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/stream.js
var require_stream3 = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/stream.js"(exports2, module2) {
    "use strict";
    var { Duplex } = require("stream");
    function emitClose(stream) {
      stream.emit("close");
    }
    function duplexOnEnd() {
      if (!this.destroyed && this._writableState.finished) {
        this.destroy();
      }
    }
    function duplexOnError(err) {
      this.removeListener("error", duplexOnError);
      this.destroy();
      if (this.listenerCount("error") === 0) {
        this.emit("error", err);
      }
    }
    function createWebSocketStream(ws, options) {
      let resumeOnReceiverDrain = true;
      let terminateOnDestroy = true;
      function receiverOnDrain() {
        if (resumeOnReceiverDrain) ws._socket.resume();
      }
      if (ws.readyState === ws.CONNECTING) {
        ws.once("open", function open() {
          ws._receiver.removeAllListeners("drain");
          ws._receiver.on("drain", receiverOnDrain);
        });
      } else {
        ws._receiver.removeAllListeners("drain");
        ws._receiver.on("drain", receiverOnDrain);
      }
      const duplex = new Duplex({
        ...options,
        autoDestroy: false,
        emitClose: false,
        objectMode: false,
        writableObjectMode: false
      });
      ws.on("message", function message(msg) {
        if (!duplex.push(msg)) {
          resumeOnReceiverDrain = false;
          ws._socket.pause();
        }
      });
      ws.once("error", function error3(err) {
        if (duplex.destroyed) return;
        terminateOnDestroy = false;
        duplex.destroy(err);
      });
      ws.once("close", function close() {
        if (duplex.destroyed) return;
        duplex.push(null);
      });
      duplex._destroy = function(err, callback) {
        if (ws.readyState === ws.CLOSED) {
          callback(err);
          process.nextTick(emitClose, duplex);
          return;
        }
        let called = false;
        ws.once("error", function error3(err2) {
          called = true;
          callback(err2);
        });
        ws.once("close", function close() {
          if (!called) callback(err);
          process.nextTick(emitClose, duplex);
        });
        if (terminateOnDestroy) ws.terminate();
      };
      duplex._final = function(callback) {
        if (ws.readyState === ws.CONNECTING) {
          ws.once("open", function open() {
            duplex._final(callback);
          });
          return;
        }
        if (ws._socket === null) return;
        if (ws._socket._writableState.finished) {
          callback();
          if (duplex._readableState.endEmitted) duplex.destroy();
        } else {
          ws._socket.once("finish", function finish() {
            callback();
          });
          ws.close();
        }
      };
      duplex._read = function() {
        if ((ws.readyState === ws.OPEN || ws.readyState === ws.CLOSING) && !resumeOnReceiverDrain) {
          resumeOnReceiverDrain = true;
          if (!ws._receiver._writableState.needDrain) ws._socket.resume();
        }
      };
      duplex._write = function(chunk, encoding, callback) {
        if (ws.readyState === ws.CONNECTING) {
          ws.once("open", function open() {
            duplex._write(chunk, encoding, callback);
          });
          return;
        }
        ws.send(chunk, callback);
      };
      duplex.on("end", duplexOnEnd);
      duplex.on("error", duplexOnError);
      return duplex;
    }
    module2.exports = createWebSocketStream;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/websocket-server.js
var require_websocket_server = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/ws/lib/websocket-server.js"(exports2, module2) {
    "use strict";
    var EventEmitter = require("events");
    var http = require("http");
    var https = require("https");
    var net = require("net");
    var tls = require("tls");
    var { createHash } = require("crypto");
    var PerMessageDeflate = require_permessage_deflate();
    var WebSocket2 = require_websocket();
    var { format: format2, parse } = require_extension();
    var { GUID, kWebSocket } = require_constants2();
    var keyRegex = /^[+/0-9A-Za-z]{22}==$/;
    var RUNNING = 0;
    var CLOSING = 1;
    var CLOSED = 2;
    var WebSocketServer = class extends EventEmitter {
      /**
       * Create a `WebSocketServer` instance.
       *
       * @param {Object} options Configuration options
       * @param {Number} [options.backlog=511] The maximum length of the queue of
       *     pending connections
       * @param {Boolean} [options.clientTracking=true] Specifies whether or not to
       *     track clients
       * @param {Function} [options.handleProtocols] A hook to handle protocols
       * @param {String} [options.host] The hostname where to bind the server
       * @param {Number} [options.maxPayload=104857600] The maximum allowed message
       *     size
       * @param {Boolean} [options.noServer=false] Enable no server mode
       * @param {String} [options.path] Accept only connections matching this path
       * @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable
       *     permessage-deflate
       * @param {Number} [options.port] The port where to bind the server
       * @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S
       *     server to use
       * @param {Function} [options.verifyClient] A hook to reject connections
       * @param {Function} [callback] A listener for the `listening` event
       */
      constructor(options, callback) {
        super();
        options = {
          maxPayload: 100 * 1024 * 1024,
          perMessageDeflate: false,
          handleProtocols: null,
          clientTracking: true,
          verifyClient: null,
          noServer: false,
          backlog: null,
          // use default (511 as implemented in net.js)
          server: null,
          host: null,
          path: null,
          port: null,
          ...options
        };
        if (options.port == null && !options.server && !options.noServer || options.port != null && (options.server || options.noServer) || options.server && options.noServer) {
          throw new TypeError(
            'One and only one of the "port", "server", or "noServer" options must be specified'
          );
        }
        if (options.port != null) {
          this._server = http.createServer((req, res) => {
            const body = http.STATUS_CODES[426];
            res.writeHead(426, {
              "Content-Length": body.length,
              "Content-Type": "text/plain"
            });
            res.end(body);
          });
          this._server.listen(
            options.port,
            options.host,
            options.backlog,
            callback
          );
        } else if (options.server) {
          this._server = options.server;
        }
        if (this._server) {
          const emitConnection = this.emit.bind(this, "connection");
          this._removeListeners = addListeners(this._server, {
            listening: this.emit.bind(this, "listening"),
            error: this.emit.bind(this, "error"),
            upgrade: (req, socket, head) => {
              this.handleUpgrade(req, socket, head, emitConnection);
            }
          });
        }
        if (options.perMessageDeflate === true) options.perMessageDeflate = {};
        if (options.clientTracking) this.clients = /* @__PURE__ */ new Set();
        this.options = options;
        this._state = RUNNING;
      }
      /**
       * Returns the bound address, the address family name, and port of the server
       * as reported by the operating system if listening on an IP socket.
       * If the server is listening on a pipe or UNIX domain socket, the name is
       * returned as a string.
       *
       * @return {(Object|String|null)} The address of the server
       * @public
       */
      address() {
        if (this.options.noServer) {
          throw new Error('The server is operating in "noServer" mode');
        }
        if (!this._server) return null;
        return this._server.address();
      }
      /**
       * Close the server.
       *
       * @param {Function} [cb] Callback
       * @public
       */
      close(cb) {
        if (cb) this.once("close", cb);
        if (this._state === CLOSED) {
          process.nextTick(emitClose, this);
          return;
        }
        if (this._state === CLOSING) return;
        this._state = CLOSING;
        if (this.clients) {
          for (const client of this.clients) client.terminate();
        }
        const server = this._server;
        if (server) {
          this._removeListeners();
          this._removeListeners = this._server = null;
          if (this.options.port != null) {
            server.close(emitClose.bind(void 0, this));
            return;
          }
        }
        process.nextTick(emitClose, this);
      }
      /**
       * See if a given request should be handled by this server instance.
       *
       * @param {http.IncomingMessage} req Request object to inspect
       * @return {Boolean} `true` if the request is valid, else `false`
       * @public
       */
      shouldHandle(req) {
        if (this.options.path) {
          const index = req.url.indexOf("?");
          const pathname = index !== -1 ? req.url.slice(0, index) : req.url;
          if (pathname !== this.options.path) return false;
        }
        return true;
      }
      /**
       * Handle a HTTP Upgrade request.
       *
       * @param {http.IncomingMessage} req The request object
       * @param {(net.Socket|tls.Socket)} socket The network socket between the
       *     server and client
       * @param {Buffer} head The first packet of the upgraded stream
       * @param {Function} cb Callback
       * @public
       */
      handleUpgrade(req, socket, head, cb) {
        socket.on("error", socketOnError);
        const key = req.headers["sec-websocket-key"] !== void 0 ? req.headers["sec-websocket-key"].trim() : false;
        const upgrade = req.headers.upgrade;
        const version = +req.headers["sec-websocket-version"];
        const extensions = {};
        if (req.method !== "GET" || upgrade === void 0 || upgrade.toLowerCase() !== "websocket" || !key || !keyRegex.test(key) || version !== 8 && version !== 13 || !this.shouldHandle(req)) {
          return abortHandshake(socket, 400);
        }
        if (this.options.perMessageDeflate) {
          const perMessageDeflate = new PerMessageDeflate(
            this.options.perMessageDeflate,
            true,
            this.options.maxPayload
          );
          try {
            const offers = parse(req.headers["sec-websocket-extensions"]);
            if (offers[PerMessageDeflate.extensionName]) {
              perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]);
              extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
            }
          } catch (err) {
            return abortHandshake(socket, 400);
          }
        }
        if (this.options.verifyClient) {
          const info2 = {
            origin: req.headers[`${version === 8 ? "sec-websocket-origin" : "origin"}`],
            secure: !!(req.socket.authorized || req.socket.encrypted),
            req
          };
          if (this.options.verifyClient.length === 2) {
            this.options.verifyClient(info2, (verified, code, message, headers) => {
              if (!verified) {
                return abortHandshake(socket, code || 401, message, headers);
              }
              this.completeUpgrade(key, extensions, req, socket, head, cb);
            });
            return;
          }
          if (!this.options.verifyClient(info2)) return abortHandshake(socket, 401);
        }
        this.completeUpgrade(key, extensions, req, socket, head, cb);
      }
      /**
       * Upgrade the connection to WebSocket.
       *
       * @param {String} key The value of the `Sec-WebSocket-Key` header
       * @param {Object} extensions The accepted extensions
       * @param {http.IncomingMessage} req The request object
       * @param {(net.Socket|tls.Socket)} socket The network socket between the
       *     server and client
       * @param {Buffer} head The first packet of the upgraded stream
       * @param {Function} cb Callback
       * @throws {Error} If called more than once with the same socket
       * @private
       */
      completeUpgrade(key, extensions, req, socket, head, cb) {
        if (!socket.readable || !socket.writable) return socket.destroy();
        if (socket[kWebSocket]) {
          throw new Error(
            "server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration"
          );
        }
        if (this._state > RUNNING) return abortHandshake(socket, 503);
        const digest = createHash("sha1").update(key + GUID).digest("base64");
        const headers = [
          "HTTP/1.1 101 Switching Protocols",
          "Upgrade: websocket",
          "Connection: Upgrade",
          `Sec-WebSocket-Accept: ${digest}`
        ];
        const ws = new WebSocket2(null);
        let protocol = req.headers["sec-websocket-protocol"];
        if (protocol) {
          protocol = protocol.split(",").map(trim);
          if (this.options.handleProtocols) {
            protocol = this.options.handleProtocols(protocol, req);
          } else {
            protocol = protocol[0];
          }
          if (protocol) {
            headers.push(`Sec-WebSocket-Protocol: ${protocol}`);
            ws._protocol = protocol;
          }
        }
        if (extensions[PerMessageDeflate.extensionName]) {
          const params = extensions[PerMessageDeflate.extensionName].params;
          const value = format2({
            [PerMessageDeflate.extensionName]: [params]
          });
          headers.push(`Sec-WebSocket-Extensions: ${value}`);
          ws._extensions = extensions;
        }
        this.emit("headers", headers, req);
        socket.write(headers.concat("\r\n").join("\r\n"));
        socket.removeListener("error", socketOnError);
        ws.setSocket(socket, head, this.options.maxPayload);
        if (this.clients) {
          this.clients.add(ws);
          ws.on("close", () => this.clients.delete(ws));
        }
        cb(ws, req);
      }
    };
    module2.exports = WebSocketServer;
    function addListeners(server, map2) {
      for (const event of Object.keys(map2)) server.on(event, map2[event]);
      return function removeListeners() {
        for (const event of Object.keys(map2)) {
          server.removeListener(event, map2[event]);
        }
      };
    }
    function emitClose(server) {
      server._state = CLOSED;
      server.emit("close");
    }
    function socketOnError() {
      this.destroy();
    }
    function abortHandshake(socket, code, message, headers) {
      if (socket.writable) {
        message = message || http.STATUS_CODES[code];
        headers = {
          Connection: "close",
          "Content-Type": "text/html",
          "Content-Length": Buffer.byteLength(message),
          ...headers
        };
        socket.write(
          `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r
` + Object.keys(headers).map((h5) => `${h5}: ${headers[h5]}`).join("\r\n") + "\r\n\r\n" + message
        );
      }
      socket.removeListener("error", socketOnError);
      socket.destroy();
    }
    function trim(str) {
      return str.trim();
    }
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/ws/index.js
var require_ws = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/ws/index.js"(exports2, module2) {
    "use strict";
    var WebSocket2 = require_websocket();
    WebSocket2.createWebSocketStream = require_stream3();
    WebSocket2.Server = require_websocket_server();
    WebSocket2.Receiver = require_receiver();
    WebSocket2.Sender = require_sender();
    module2.exports = WebSocket2;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/ws.js
var require_ws2 = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/ws.js"(exports2, module2) {
    "use strict";
    var WS = require_ws();
    var debug = require_src()("mqttjs:ws");
    var duplexify = require_duplexify();
    var Transform = require_readable().Transform;
    var WSS_OPTIONS = [
      "rejectUnauthorized",
      "ca",
      "cert",
      "key",
      "pfx",
      "passphrase"
    ];
    var IS_BROWSER = typeof process !== "undefined" && process.title === "browser" || typeof __webpack_require__ === "function";
    function buildUrl(opts, client) {
      let url = opts.protocol + "://" + opts.hostname + ":" + opts.port + opts.path;
      if (typeof opts.transformWsUrl === "function") {
        url = opts.transformWsUrl(url, opts, client);
      }
      return url;
    }
    function setDefaultOpts(opts) {
      let options = opts;
      if (!opts.hostname) {
        options.hostname = "localhost";
      }
      if (!opts.port) {
        if (opts.protocol === "wss") {
          options.port = 443;
        } else {
          options.port = 80;
        }
      }
      if (!opts.path) {
        options.path = "/";
      }
      if (!opts.wsOptions) {
        options.wsOptions = {};
      }
      if (!IS_BROWSER && opts.protocol === "wss") {
        WSS_OPTIONS.forEach(function(prop) {
          if (opts.hasOwnProperty(prop) && !opts.wsOptions.hasOwnProperty(prop)) {
            options.wsOptions[prop] = opts[prop];
          }
        });
      }
      return options;
    }
    function setDefaultBrowserOpts(opts) {
      let options = setDefaultOpts(opts);
      if (!options.hostname) {
        options.hostname = options.host;
      }
      if (!options.hostname) {
        if (typeof document === "undefined") {
          throw new Error("Could not determine host. Specify host manually.");
        }
        const parsed = new URL(document.URL);
        options.hostname = parsed.hostname;
        if (!options.port) {
          options.port = parsed.port;
        }
      }
      if (options.objectMode === void 0) {
        options.objectMode = !(options.binary === true || options.binary === void 0);
      }
      return options;
    }
    function createWebSocket(client, url, opts) {
      debug("createWebSocket");
      debug("protocol: " + opts.protocolId + " " + opts.protocolVersion);
      const websocketSubProtocol = opts.protocolId === "MQIsdp" && opts.protocolVersion === 3 ? "mqttv3.1" : "mqtt";
      debug("creating new Websocket for url: " + url + " and protocol: " + websocketSubProtocol);
      let socket = new WS(url, [websocketSubProtocol], opts.wsOptions);
      return socket;
    }
    function createBrowserWebSocket(client, opts) {
      const websocketSubProtocol = opts.protocolId === "MQIsdp" && opts.protocolVersion === 3 ? "mqttv3.1" : "mqtt";
      let url = buildUrl(opts, client);
      let socket = new WebSocket(url, [websocketSubProtocol]);
      socket.binaryType = "arraybuffer";
      return socket;
    }
    function streamBuilder(client, opts) {
      debug("streamBuilder");
      let options = setDefaultOpts(opts);
      const url = buildUrl(options, client);
      let socket = createWebSocket(client, url, options);
      let webSocketStream = WS.createWebSocketStream(socket, options.wsOptions);
      webSocketStream.url = url;
      socket.on("close", () => {
        webSocketStream.destroy();
      });
      return webSocketStream;
    }
    function browserStreamBuilder(client, opts) {
      debug("browserStreamBuilder");
      let stream;
      let options = setDefaultBrowserOpts(opts);
      const bufferSize = options.browserBufferSize || 1024 * 512;
      const bufferTimeout = opts.browserBufferTimeout || 1e3;
      const coerceToBuffer = !opts.objectMode;
      let socket = createBrowserWebSocket(client, opts);
      let proxy = buildProxy(opts, socketWriteBrowser, socketEndBrowser);
      if (!opts.objectMode) {
        proxy._writev = writev;
      }
      proxy.on("close", () => {
        socket.close();
      });
      const eventListenerSupport = typeof socket.addEventListener !== "undefined";
      if (socket.readyState === socket.OPEN) {
        stream = proxy;
      } else {
        stream = stream = duplexify(void 0, void 0, opts);
        if (!opts.objectMode) {
          stream._writev = writev;
        }
        if (eventListenerSupport) {
          socket.addEventListener("open", onopen);
        } else {
          socket.onopen = onopen;
        }
      }
      stream.socket = socket;
      if (eventListenerSupport) {
        socket.addEventListener("close", onclose);
        socket.addEventListener("error", onerror);
        socket.addEventListener("message", onmessage);
      } else {
        socket.onclose = onclose;
        socket.onerror = onerror;
        socket.onmessage = onmessage;
      }
      function buildProxy(options2, socketWrite, socketEnd) {
        let proxy2 = new Transform({
          objectModeMode: options2.objectMode
        });
        proxy2._write = socketWrite;
        proxy2._flush = socketEnd;
        return proxy2;
      }
      function onopen() {
        stream.setReadable(proxy);
        stream.setWritable(proxy);
        stream.emit("connect");
      }
      function onclose() {
        stream.end();
        stream.destroy();
      }
      function onerror(err) {
        stream.destroy(err);
      }
      function onmessage(event) {
        let data2 = event.data;
        if (data2 instanceof ArrayBuffer) data2 = Buffer.from(data2);
        else data2 = Buffer.from(data2, "utf8");
        proxy.push(data2);
      }
      function writev(chunks2, cb) {
        const buffers = new Array(chunks2.length);
        for (let i5 = 0; i5 < chunks2.length; i5++) {
          if (typeof chunks2[i5].chunk === "string") {
            buffers[i5] = Buffer.from(chunks2[i5], "utf8");
          } else {
            buffers[i5] = chunks2[i5].chunk;
          }
        }
        this._write(Buffer.concat(buffers), "binary", cb);
      }
      function socketWriteBrowser(chunk, enc, next) {
        if (socket.bufferedAmount > bufferSize) {
          setTimeout(socketWriteBrowser, bufferTimeout, chunk, enc, next);
        }
        if (coerceToBuffer && typeof chunk === "string") {
          chunk = Buffer.from(chunk, "utf8");
        }
        try {
          socket.send(chunk);
        } catch (err) {
          return next(err);
        }
        next();
      }
      function socketEndBrowser(done) {
        socket.close();
        done();
      }
      return stream;
    }
    if (IS_BROWSER) {
      module2.exports = browserStreamBuilder;
    } else {
      module2.exports = streamBuilder;
    }
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/index.js
var require_connect = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/index.js"(exports2, module2) {
    "use strict";
    var MqttClient = require_client();
    var Store = require_store();
    var url = require("url");
    var xtend = require_immutable();
    var debug = require_src()("mqttjs");
    var protocols = {};
    if (typeof process !== "undefined" && process.title !== "browser" || typeof __webpack_require__ !== "function") {
      protocols.mqtt = require_tcp();
      protocols.tcp = require_tcp();
      protocols.ssl = require_tls();
      protocols.tls = require_tls();
      protocols.mqtts = require_tls();
    } else {
      protocols.wx = require_wx();
      protocols.wxs = require_wx();
      protocols.ali = require_ali();
      protocols.alis = require_ali();
    }
    protocols.ws = require_ws2();
    protocols.wss = require_ws2();
    function parseAuthOptions(opts) {
      var matches;
      if (opts.auth) {
        matches = opts.auth.match(/^(.+):(.+)$/);
        if (matches) {
          opts.username = matches[1];
          opts.password = matches[2];
        } else {
          opts.username = opts.auth;
        }
      }
    }
    function connect2(brokerUrl, opts) {
      debug("connecting to an MQTT broker...");
      if (typeof brokerUrl === "object" && !opts) {
        opts = brokerUrl;
        brokerUrl = null;
      }
      opts = opts || {};
      if (brokerUrl) {
        var parsed = url.parse(brokerUrl, true);
        if (parsed.port != null) {
          parsed.port = Number(parsed.port);
        }
        opts = xtend(parsed, opts);
        if (opts.protocol === null) {
          throw new Error("Missing protocol");
        }
        opts.protocol = opts.protocol.replace(/:$/, "");
      }
      parseAuthOptions(opts);
      if (opts.query && typeof opts.query.clientId === "string") {
        opts.clientId = opts.query.clientId;
      }
      if (opts.cert && opts.key) {
        if (opts.protocol) {
          if (["mqtts", "wss", "wxs", "alis"].indexOf(opts.protocol) === -1) {
            switch (opts.protocol) {
              case "mqtt":
                opts.protocol = "mqtts";
                break;
              case "ws":
                opts.protocol = "wss";
                break;
              case "wx":
                opts.protocol = "wxs";
                break;
              case "ali":
                opts.protocol = "alis";
                break;
              default:
                throw new Error('Unknown protocol for secure connection: "' + opts.protocol + '"!');
            }
          }
        } else {
          throw new Error("Missing secure protocol key");
        }
      }
      if (!protocols[opts.protocol]) {
        var isSecure = ["mqtts", "wss"].indexOf(opts.protocol) !== -1;
        opts.protocol = [
          "mqtt",
          "mqtts",
          "ws",
          "wss",
          "wx",
          "wxs",
          "ali",
          "alis"
        ].filter(function(key, index) {
          if (isSecure && index % 2 === 0) {
            return false;
          }
          return typeof protocols[key] === "function";
        })[0];
      }
      if (opts.clean === false && !opts.clientId) {
        throw new Error("Missing clientId for unclean clients");
      }
      if (opts.protocol) {
        opts.defaultProtocol = opts.protocol;
      }
      function wrapper(client2) {
        if (opts.servers) {
          if (!client2._reconnectCount || client2._reconnectCount === opts.servers.length) {
            client2._reconnectCount = 0;
          }
          opts.host = opts.servers[client2._reconnectCount].host;
          opts.port = opts.servers[client2._reconnectCount].port;
          opts.protocol = !opts.servers[client2._reconnectCount].protocol ? opts.defaultProtocol : opts.servers[client2._reconnectCount].protocol;
          opts.hostname = opts.host;
          client2._reconnectCount++;
        }
        debug("calling streambuilder for", opts.protocol);
        return protocols[opts.protocol](client2, opts);
      }
      var client = new MqttClient(wrapper, opts);
      client.on("error", function() {
      });
      return client;
    }
    module2.exports = connect2;
    module2.exports.connect = connect2;
    module2.exports.MqttClient = MqttClient;
    module2.exports.Store = Store;
  }
});

// ../../node_modules/aws-iot-device-sdk/node_modules/mqtt/mqtt.js
var require_mqtt2 = __commonJS({
  "../../node_modules/aws-iot-device-sdk/node_modules/mqtt/mqtt.js"(exports2, module2) {
    var MqttClient = require_client();
    var connect2 = require_connect();
    var Store = require_store();
    module2.exports.connect = connect2;
    module2.exports.MqttClient = MqttClient;
    module2.exports.Client = MqttClient;
    module2.exports.Store = Store;
  }
});

// ../../node_modules/crypto-js/core.js
var require_core = __commonJS({
  "../../node_modules/crypto-js/core.js"(exports2, module2) {
    (function(root5, factory) {
      if (typeof exports2 === "object") {
        module2.exports = exports2 = factory();
      } else if (typeof define === "function" && define.amd) {
        define([], factory);
      } else {
        root5.CryptoJS = factory();
      }
    })(exports2, function() {
      var CryptoJS = CryptoJS || (function(Math2, undefined2) {
        var crypto3;
        if (typeof window !== "undefined" && window.crypto) {
          crypto3 = window.crypto;
        }
        if (typeof self !== "undefined" && self.crypto) {
          crypto3 = self.crypto;
        }
        if (typeof globalThis !== "undefined" && globalThis.crypto) {
          crypto3 = globalThis.crypto;
        }
        if (!crypto3 && typeof window !== "undefined" && window.msCrypto) {
          crypto3 = window.msCrypto;
        }
        if (!crypto3 && typeof global !== "undefined" && global.crypto) {
          crypto3 = global.crypto;
        }
        if (!crypto3 && typeof require === "function") {
          try {
            crypto3 = require("crypto");
          } catch (err) {
          }
        }
        var cryptoSecureRandomInt = function() {
          if (crypto3) {
            if (typeof crypto3.getRandomValues === "function") {
              try {
                return crypto3.getRandomValues(new Uint32Array(1))[0];
              } catch (err) {
              }
            }
            if (typeof crypto3.randomBytes === "function") {
              try {
                return crypto3.randomBytes(4).readInt32LE();
              } catch (err) {
              }
            }
          }
          throw new Error("Native crypto module could not be used to get secure random number.");
        };
        var create = Object.create || /* @__PURE__ */ (function() {
          function F() {
          }
          return function(obj) {
            var subtype;
            F.prototype = obj;
            subtype = new F();
            F.prototype = null;
            return subtype;
          };
        })();
        var C = {};
        var C_lib = C.lib = {};
        var Base = C_lib.Base = /* @__PURE__ */ (function() {
          return {
            /**
             * Creates a new object that inherits from this object.
             *
             * @param {Object} overrides Properties to copy into the new object.
             *
             * @return {Object} The new object.
             *
             * @static
             *
             * @example
             *
             *     var MyType = CryptoJS.lib.Base.extend({
             *         field: 'value',
             *
             *         method: function () {
             *         }
             *     });
             */
            extend: function(overrides) {
              var subtype = create(this);
              if (overrides) {
                subtype.mixIn(overrides);
              }
              if (!subtype.hasOwnProperty("init") || this.init === subtype.init) {
                subtype.init = function() {
                  subtype.$super.init.apply(this, arguments);
                };
              }
              subtype.init.prototype = subtype;
              subtype.$super = this;
              return subtype;
            },
            /**
             * Extends this object and runs the init method.
             * Arguments to create() will be passed to init().
             *
             * @return {Object} The new object.
             *
             * @static
             *
             * @example
             *
             *     var instance = MyType.create();
             */
            create: function() {
              var instance = this.extend();
              instance.init.apply(instance, arguments);
              return instance;
            },
            /**
             * Initializes a newly created object.
             * Override this method to add some logic when your objects are created.
             *
             * @example
             *
             *     var MyType = CryptoJS.lib.Base.extend({
             *         init: function () {
             *             // ...
             *         }
             *     });
             */
            init: function() {
            },
            /**
             * Copies properties into this object.
             *
             * @param {Object} properties The properties to mix in.
             *
             * @example
             *
             *     MyType.mixIn({
             *         field: 'value'
             *     });
             */
            mixIn: function(properties) {
              for (var propertyName in properties) {
                if (properties.hasOwnProperty(propertyName)) {
                  this[propertyName] = properties[propertyName];
                }
              }
              if (properties.hasOwnProperty("toString")) {
                this.toString = properties.toString;
              }
            },
            /**
             * Creates a copy of this object.
             *
             * @return {Object} The clone.
             *
             * @example
             *
             *     var clone = instance.clone();
             */
            clone: function() {
              return this.init.prototype.extend(this);
            }
          };
        })();
        var WordArray = C_lib.WordArray = Base.extend({
          /**
           * Initializes a newly created word array.
           *
           * @param {Array} words (Optional) An array of 32-bit words.
           * @param {number} sigBytes (Optional) The number of significant bytes in the words.
           *
           * @example
           *
           *     var wordArray = CryptoJS.lib.WordArray.create();
           *     var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
           *     var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
           */
          init: function(words, sigBytes) {
            words = this.words = words || [];
            if (sigBytes != undefined2) {
              this.sigBytes = sigBytes;
            } else {
              this.sigBytes = words.length * 4;
            }
          },
          /**
           * Converts this word array to a string.
           *
           * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
           *
           * @return {string} The stringified word array.
           *
           * @example
           *
           *     var string = wordArray + '';
           *     var string = wordArray.toString();
           *     var string = wordArray.toString(CryptoJS.enc.Utf8);
           */
          toString: function(encoder) {
            return (encoder || Hex).stringify(this);
          },
          /**
           * Concatenates a word array to this word array.
           *
           * @param {WordArray} wordArray The word array to append.
           *
           * @return {WordArray} This word array.
           *
           * @example
           *
           *     wordArray1.concat(wordArray2);
           */
          concat: function(wordArray) {
            var thisWords = this.words;
            var thatWords = wordArray.words;
            var thisSigBytes = this.sigBytes;
            var thatSigBytes = wordArray.sigBytes;
            this.clamp();
            if (thisSigBytes % 4) {
              for (var i5 = 0; i5 < thatSigBytes; i5++) {
                var thatByte = thatWords[i5 >>> 2] >>> 24 - i5 % 4 * 8 & 255;
                thisWords[thisSigBytes + i5 >>> 2] |= thatByte << 24 - (thisSigBytes + i5) % 4 * 8;
              }
            } else {
              for (var j5 = 0; j5 < thatSigBytes; j5 += 4) {
                thisWords[thisSigBytes + j5 >>> 2] = thatWords[j5 >>> 2];
              }
            }
            this.sigBytes += thatSigBytes;
            return this;
          },
          /**
           * Removes insignificant bits.
           *
           * @example
           *
           *     wordArray.clamp();
           */
          clamp: function() {
            var words = this.words;
            var sigBytes = this.sigBytes;
            words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8;
            words.length = Math2.ceil(sigBytes / 4);
          },
          /**
           * Creates a copy of this word array.
           *
           * @return {WordArray} The clone.
           *
           * @example
           *
           *     var clone = wordArray.clone();
           */
          clone: function() {
            var clone = Base.clone.call(this);
            clone.words = this.words.slice(0);
            return clone;
          },
          /**
           * Creates a word array filled with random bytes.
           *
           * @param {number} nBytes The number of random bytes to generate.
           *
           * @return {WordArray} The random word array.
           *
           * @static
           *
           * @example
           *
           *     var wordArray = CryptoJS.lib.WordArray.random(16);
           */
          random: function(nBytes) {
            var words = [];
            for (var i5 = 0; i5 < nBytes; i5 += 4) {
              words.push(cryptoSecureRandomInt());
            }
            return new WordArray.init(words, nBytes);
          }
        });
        var C_enc = C.enc = {};
        var Hex = C_enc.Hex = {
          /**
           * Converts a word array to a hex string.
           *
           * @param {WordArray} wordArray The word array.
           *
           * @return {string} The hex string.
           *
           * @static
           *
           * @example
           *
           *     var hexString = CryptoJS.enc.Hex.stringify(wordArray);
           */
          stringify: function(wordArray) {
            var words = wordArray.words;
            var sigBytes = wordArray.sigBytes;
            var hexChars = [];
            for (var i5 = 0; i5 < sigBytes; i5++) {
              var bite = words[i5 >>> 2] >>> 24 - i5 % 4 * 8 & 255;
              hexChars.push((bite >>> 4).toString(16));
              hexChars.push((bite & 15).toString(16));
            }
            return hexChars.join("");
          },
          /**
           * Converts a hex string to a word array.
           *
           * @param {string} hexStr The hex string.
           *
           * @return {WordArray} The word array.
           *
           * @static
           *
           * @example
           *
           *     var wordArray = CryptoJS.enc.Hex.parse(hexString);
           */
          parse: function(hexStr) {
            var hexStrLength = hexStr.length;
            var words = [];
            for (var i5 = 0; i5 < hexStrLength; i5 += 2) {
              words[i5 >>> 3] |= parseInt(hexStr.substr(i5, 2), 16) << 24 - i5 % 8 * 4;
            }
            return new WordArray.init(words, hexStrLength / 2);
          }
        };
        var Latin1 = C_enc.Latin1 = {
          /**
           * Converts a word array to a Latin1 string.
           *
           * @param {WordArray} wordArray The word array.
           *
           * @return {string} The Latin1 string.
           *
           * @static
           *
           * @example
           *
           *     var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
           */
          stringify: function(wordArray) {
            var words = wordArray.words;
            var sigBytes = wordArray.sigBytes;
            var latin1Chars = [];
            for (var i5 = 0; i5 < sigBytes; i5++) {
              var bite = words[i5 >>> 2] >>> 24 - i5 % 4 * 8 & 255;
              latin1Chars.push(String.fromCharCode(bite));
            }
            return latin1Chars.join("");
          },
          /**
           * Converts a Latin1 string to a word array.
           *
           * @param {string} latin1Str The Latin1 string.
           *
           * @return {WordArray} The word array.
           *
           * @static
           *
           * @example
           *
           *     var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
           */
          parse: function(latin1Str) {
            var latin1StrLength = latin1Str.length;
            var words = [];
            for (var i5 = 0; i5 < latin1StrLength; i5++) {
              words[i5 >>> 2] |= (latin1Str.charCodeAt(i5) & 255) << 24 - i5 % 4 * 8;
            }
            return new WordArray.init(words, latin1StrLength);
          }
        };
        var Utf8 = C_enc.Utf8 = {
          /**
           * Converts a word array to a UTF-8 string.
           *
           * @param {WordArray} wordArray The word array.
           *
           * @return {string} The UTF-8 string.
           *
           * @static
           *
           * @example
           *
           *     var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
           */
          stringify: function(wordArray) {
            try {
              return decodeURIComponent(escape(Latin1.stringify(wordArray)));
            } catch (e5) {
              throw new Error("Malformed UTF-8 data");
            }
          },
          /**
           * Converts a UTF-8 string to a word array.
           *
           * @param {string} utf8Str The UTF-8 string.
           *
           * @return {WordArray} The word array.
           *
           * @static
           *
           * @example
           *
           *     var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
           */
          parse: function(utf8Str) {
            return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
          }
        };
        var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
          /**
           * Resets this block algorithm's data buffer to its initial state.
           *
           * @example
           *
           *     bufferedBlockAlgorithm.reset();
           */
          reset: function() {
            this._data = new WordArray.init();
            this._nDataBytes = 0;
          },
          /**
           * Adds new data to this block algorithm's buffer.
           *
           * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
           *
           * @example
           *
           *     bufferedBlockAlgorithm._append('data');
           *     bufferedBlockAlgorithm._append(wordArray);
           */
          _append: function(data2) {
            if (typeof data2 == "string") {
              data2 = Utf8.parse(data2);
            }
            this._data.concat(data2);
            this._nDataBytes += data2.sigBytes;
          },
          /**
           * Processes available data blocks.
           *
           * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
           *
           * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
           *
           * @return {WordArray} The processed data.
           *
           * @example
           *
           *     var processedData = bufferedBlockAlgorithm._process();
           *     var processedData = bufferedBlockAlgorithm._process(!!'flush');
           */
          _process: function(doFlush) {
            var processedWords;
            var data2 = this._data;
            var dataWords = data2.words;
            var dataSigBytes = data2.sigBytes;
            var blockSize = this.blockSize;
            var blockSizeBytes = blockSize * 4;
            var nBlocksReady = dataSigBytes / blockSizeBytes;
            if (doFlush) {
              nBlocksReady = Math2.ceil(nBlocksReady);
            } else {
              nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0);
            }
            var nWordsReady = nBlocksReady * blockSize;
            var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes);
            if (nWordsReady) {
              for (var offset = 0; offset < nWordsReady; offset += blockSize) {
                this._doProcessBlock(dataWords, offset);
              }
              processedWords = dataWords.splice(0, nWordsReady);
              data2.sigBytes -= nBytesReady;
            }
            return new WordArray.init(processedWords, nBytesReady);
          },
          /**
           * Creates a copy of this object.
           *
           * @return {Object} The clone.
           *
           * @example
           *
           *     var clone = bufferedBlockAlgorithm.clone();
           */
          clone: function() {
            var clone = Base.clone.call(this);
            clone._data = this._data.clone();
            return clone;
          },
          _minBufferSize: 0
        });
        var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
          /**
           * Configuration options.
           */
          cfg: Base.extend(),
          /**
           * Initializes a newly created hasher.
           *
           * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
           *
           * @example
           *
           *     var hasher = CryptoJS.algo.SHA256.create();
           */
          init: function(cfg) {
            this.cfg = this.cfg.extend(cfg);
            this.reset();
          },
          /**
           * Resets this hasher to its initial state.
           *
           * @example
           *
           *     hasher.reset();
           */
          reset: function() {
            BufferedBlockAlgorithm.reset.call(this);
            this._doReset();
          },
          /**
           * Updates this hasher with a message.
           *
           * @param {WordArray|string} messageUpdate The message to append.
           *
           * @return {Hasher} This hasher.
           *
           * @example
           *
           *     hasher.update('message');
           *     hasher.update(wordArray);
           */
          update: function(messageUpdate) {
            this._append(messageUpdate);
            this._process();
            return this;
          },
          /**
           * Finalizes the hash computation.
           * Note that the finalize operation is effectively a destructive, read-once operation.
           *
           * @param {WordArray|string} messageUpdate (Optional) A final message update.
           *
           * @return {WordArray} The hash.
           *
           * @example
           *
           *     var hash = hasher.finalize();
           *     var hash = hasher.finalize('message');
           *     var hash = hasher.finalize(wordArray);
           */
          finalize: function(messageUpdate) {
            if (messageUpdate) {
              this._append(messageUpdate);
            }
            var hash = this._doFinalize();
            return hash;
          },
          blockSize: 512 / 32,
          /**
           * Creates a shortcut function to a hasher's object interface.
           *
           * @param {Hasher} hasher The hasher to create a helper for.
           *
           * @return {Function} The shortcut function.
           *
           * @static
           *
           * @example
           *
           *     var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
           */
          _createHelper: function(hasher) {
            return function(message, cfg) {
              return new hasher.init(cfg).finalize(message);
            };
          },
          /**
           * Creates a shortcut function to the HMAC's object interface.
           *
           * @param {Hasher} hasher The hasher to use in this HMAC helper.
           *
           * @return {Function} The shortcut function.
           *
           * @static
           *
           * @example
           *
           *     var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
           */
          _createHmacHelper: function(hasher) {
            return function(message, key) {
              return new C_algo.HMAC.init(hasher, key).finalize(message);
            };
          }
        });
        var C_algo = C.algo = {};
        return C;
      })(Math);
      return CryptoJS;
    });
  }
});

// ../../node_modules/crypto-js/sha256.js
var require_sha256 = __commonJS({
  "../../node_modules/crypto-js/sha256.js"(exports2, module2) {
    (function(root5, factory) {
      if (typeof exports2 === "object") {
        module2.exports = exports2 = factory(require_core());
      } else if (typeof define === "function" && define.amd) {
        define(["./core"], factory);
      } else {
        factory(root5.CryptoJS);
      }
    })(exports2, function(CryptoJS) {
      (function(Math2) {
        var C = CryptoJS;
        var C_lib = C.lib;
        var WordArray = C_lib.WordArray;
        var Hasher = C_lib.Hasher;
        var C_algo = C.algo;
        var H = [];
        var K = [];
        (function() {
          function isPrime(n3) {
            var sqrtN = Math2.sqrt(n3);
            for (var factor = 2; factor <= sqrtN; factor++) {
              if (!(n3 % factor)) {
                return false;
              }
            }
            return true;
          }
          function getFractionalBits(n3) {
            return (n3 - (n3 | 0)) * 4294967296 | 0;
          }
          var n2 = 2;
          var nPrime = 0;
          while (nPrime < 64) {
            if (isPrime(n2)) {
              if (nPrime < 8) {
                H[nPrime] = getFractionalBits(Math2.pow(n2, 1 / 2));
              }
              K[nPrime] = getFractionalBits(Math2.pow(n2, 1 / 3));
              nPrime++;
            }
            n2++;
          }
        })();
        var W = [];
        var SHA256 = C_algo.SHA256 = Hasher.extend({
          _doReset: function() {
            this._hash = new WordArray.init(H.slice(0));
          },
          _doProcessBlock: function(M, offset) {
            var H2 = this._hash.words;
            var a5 = H2[0];
            var b5 = H2[1];
            var c5 = H2[2];
            var d5 = H2[3];
            var e5 = H2[4];
            var f5 = H2[5];
            var g5 = H2[6];
            var h5 = H2[7];
            for (var i5 = 0; i5 < 64; i5++) {
              if (i5 < 16) {
                W[i5] = M[offset + i5] | 0;
              } else {
                var gamma0x = W[i5 - 15];
                var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;
                var gamma1x = W[i5 - 2];
                var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10;
                W[i5] = gamma0 + W[i5 - 7] + gamma1 + W[i5 - 16];
              }
              var ch = e5 & f5 ^ ~e5 & g5;
              var maj = a5 & b5 ^ a5 & c5 ^ b5 & c5;
              var sigma0 = (a5 << 30 | a5 >>> 2) ^ (a5 << 19 | a5 >>> 13) ^ (a5 << 10 | a5 >>> 22);
              var sigma1 = (e5 << 26 | e5 >>> 6) ^ (e5 << 21 | e5 >>> 11) ^ (e5 << 7 | e5 >>> 25);
              var t1 = h5 + sigma1 + ch + K[i5] + W[i5];
              var t2 = sigma0 + maj;
              h5 = g5;
              g5 = f5;
              f5 = e5;
              e5 = d5 + t1 | 0;
              d5 = c5;
              c5 = b5;
              b5 = a5;
              a5 = t1 + t2 | 0;
            }
            H2[0] = H2[0] + a5 | 0;
            H2[1] = H2[1] + b5 | 0;
            H2[2] = H2[2] + c5 | 0;
            H2[3] = H2[3] + d5 | 0;
            H2[4] = H2[4] + e5 | 0;
            H2[5] = H2[5] + f5 | 0;
            H2[6] = H2[6] + g5 | 0;
            H2[7] = H2[7] + h5 | 0;
          },
          _doFinalize: function() {
            var data2 = this._data;
            var dataWords = data2.words;
            var nBitsTotal = this._nDataBytes * 8;
            var nBitsLeft = data2.sigBytes * 8;
            dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
            dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math2.floor(nBitsTotal / 4294967296);
            dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
            data2.sigBytes = dataWords.length * 4;
            this._process();
            return this._hash;
          },
          clone: function() {
            var clone = Hasher.clone.call(this);
            clone._hash = this._hash.clone();
            return clone;
          }
        });
        C.SHA256 = Hasher._createHelper(SHA256);
        C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
      })(Math);
      return CryptoJS.SHA256;
    });
  }
});

// ../../node_modules/crypto-js/hmac.js
var require_hmac = __commonJS({
  "../../node_modules/crypto-js/hmac.js"(exports2, module2) {
    (function(root5, factory) {
      if (typeof exports2 === "object") {
        module2.exports = exports2 = factory(require_core());
      } else if (typeof define === "function" && define.amd) {
        define(["./core"], factory);
      } else {
        factory(root5.CryptoJS);
      }
    })(exports2, function(CryptoJS) {
      (function() {
        var C = CryptoJS;
        var C_lib = C.lib;
        var Base = C_lib.Base;
        var C_enc = C.enc;
        var Utf8 = C_enc.Utf8;
        var C_algo = C.algo;
        var HMAC = C_algo.HMAC = Base.extend({
          /**
           * Initializes a newly created HMAC.
           *
           * @param {Hasher} hasher The hash algorithm to use.
           * @param {WordArray|string} key The secret key.
           *
           * @example
           *
           *     var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
           */
          init: function(hasher, key) {
            hasher = this._hasher = new hasher.init();
            if (typeof key == "string") {
              key = Utf8.parse(key);
            }
            var hasherBlockSize = hasher.blockSize;
            var hasherBlockSizeBytes = hasherBlockSize * 4;
            if (key.sigBytes > hasherBlockSizeBytes) {
              key = hasher.finalize(key);
            }
            key.clamp();
            var oKey = this._oKey = key.clone();
            var iKey = this._iKey = key.clone();
            var oKeyWords = oKey.words;
            var iKeyWords = iKey.words;
            for (var i5 = 0; i5 < hasherBlockSize; i5++) {
              oKeyWords[i5] ^= 1549556828;
              iKeyWords[i5] ^= 909522486;
            }
            oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;
            this.reset();
          },
          /**
           * Resets this HMAC to its initial state.
           *
           * @example
           *
           *     hmacHasher.reset();
           */
          reset: function() {
            var hasher = this._hasher;
            hasher.reset();
            hasher.update(this._iKey);
          },
          /**
           * Updates this HMAC with a message.
           *
           * @param {WordArray|string} messageUpdate The message to append.
           *
           * @return {HMAC} This HMAC instance.
           *
           * @example
           *
           *     hmacHasher.update('message');
           *     hmacHasher.update(wordArray);
           */
          update: function(messageUpdate) {
            this._hasher.update(messageUpdate);
            return this;
          },
          /**
           * Finalizes the HMAC computation.
           * Note that the finalize operation is effectively a destructive, read-once operation.
           *
           * @param {WordArray|string} messageUpdate (Optional) A final message update.
           *
           * @return {WordArray} The HMAC.
           *
           * @example
           *
           *     var hmac = hmacHasher.finalize();
           *     var hmac = hmacHasher.finalize('message');
           *     var hmac = hmacHasher.finalize(wordArray);
           */
          finalize: function(messageUpdate) {
            var hasher = this._hasher;
            var innerHash = hasher.finalize(messageUpdate);
            hasher.reset();
            var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));
            return hmac;
          }
        });
      })();
    });
  }
});

// ../../node_modules/crypto-js/hmac-sha256.js
var require_hmac_sha256 = __commonJS({
  "../../node_modules/crypto-js/hmac-sha256.js"(exports2, module2) {
    (function(root5, factory, undef) {
      if (typeof exports2 === "object") {
        module2.exports = exports2 = factory(require_core(), require_sha256(), require_hmac());
      } else if (typeof define === "function" && define.amd) {
        define(["./core", "./sha256", "./hmac"], factory);
      } else {
        factory(root5.CryptoJS);
      }
    })(exports2, function(CryptoJS) {
      return CryptoJS.HmacSHA256;
    });
  }
});

// ../../node_modules/aws-iot-device-sdk/device/lib/exceptions.js
var require_exceptions = __commonJS({
  "../../node_modules/aws-iot-device-sdk/device/lib/exceptions.js"(exports2, module2) {
    module2.exports = {
      INVALID_CONNECT_OPTIONS: "Invalid connect options supplied.",
      INVALID_CLIENT_ID_OPTION: 'Invalid "clientId" (mqtt client id) option supplied.',
      INVALID_RECONNECT_TIMING: "Invalid reconnect timing options supplied.",
      INVALID_OFFLINE_QUEUEING_PARAMETERS: "Invalid offline queueing options supplied."
    };
  }
});

// ../../node_modules/aws-iot-device-sdk/common/lib/is-undefined.js
var require_is_undefined = __commonJS({
  "../../node_modules/aws-iot-device-sdk/common/lib/is-undefined.js"(exports2, module2) {
    module2.exports = function(value) {
      return typeof value === "undefined" || value === null;
    };
  }
});

// ../../node_modules/aws-iot-device-sdk/common/lib/exceptions.js
var require_exceptions2 = __commonJS({
  "../../node_modules/aws-iot-device-sdk/common/lib/exceptions.js"(exports2, module2) {
    module2.exports = {
      NO_KEY_OPTION: 'No "keyPath" or "privateKey" option supplied.',
      NO_CERT_OPTION: 'No "certPath" or "clientCert" option supplied.',
      NO_CA_OPTION: 'No "caPath" or "caCert" option supplied.',
      INVALID_KEY_PATH_OPTION: 'Invalid "keyPath" option supplied.',
      INVALID_CERT_PATH_OPTION: 'Invalid "certPath" option supplied.',
      INVALID_CA_PATH_OPTION: 'Invalid "caPath" option supplied.',
      INVALID_CLIENT_CERT_OPTION: 'Invalid "clientCert" option supplied.',
      INVALID_PRIVATE_KEY_OPTION: 'Invalid "privateKey" option supplied.',
      INVALID_CA_CERT_OPTION: 'Invalid "caCert" option supplied.'
    };
  }
});

// ../../node_modules/aws-iot-device-sdk/common/lib/tls-reader.js
var require_tls_reader = __commonJS({
  "../../node_modules/aws-iot-device-sdk/common/lib/tls-reader.js"(exports2, module2) {
    var filesys = require("fs");
    var isUndefined = require_is_undefined();
    var exceptions = require_exceptions2();
    module2.exports = function(options) {
      if (isUndefined(options.keyPath) && isUndefined(options.privateKey)) {
        throw new Error(exceptions.NO_KEY_OPTION);
      }
      if (isUndefined(options.certPath) && isUndefined(options.clientCert)) {
        throw new Error(exceptions.NO_CERT_OPTION);
      }
      if (isUndefined(options.caPath) && isUndefined(options.caCert)) {
        throw new Error(exceptions.NO_CA_OPTION);
      }
      if (!isUndefined(options.caCert)) {
        if (Buffer.isBuffer(options.caCert)) {
          options.ca = options.caCert;
        } else {
          if (filesys.existsSync(options.caCert)) {
            options.ca = filesys.readFileSync(options.caCert);
          } else {
            throw new Error(exceptions.INVALID_CA_CERT_OPTION);
          }
        }
      }
      if (!isUndefined(options.privateKey)) {
        if (Buffer.isBuffer(options.privateKey)) {
          options.key = options.privateKey;
        } else {
          if (filesys.existsSync(options.privateKey)) {
            options.key = filesys.readFileSync(options.privateKey);
          } else {
            throw new Error(exceptions.INVALID_PRIVATE_KEY_OPTION);
          }
        }
      }
      if (!isUndefined(options.clientCert)) {
        if (Buffer.isBuffer(options.clientCert)) {
          options.cert = options.clientCert;
        } else {
          if (filesys.existsSync(options.clientCert)) {
            options.cert = filesys.readFileSync(options.clientCert);
          } else {
            throw new Error(exceptions.INVALID_CLIENT_CERT_OPTION);
          }
        }
      }
      if (filesys.existsSync(options.keyPath)) {
        options.key = filesys.readFileSync(options.keyPath);
      } else if (!isUndefined(options.keyPath)) {
        throw new Error(exceptions.INVALID_KEY_PATH_OPTION);
      }
      if (filesys.existsSync(options.certPath)) {
        options.cert = filesys.readFileSync(options.certPath);
      } else if (!isUndefined(options.certPath)) {
        throw new Error(exceptions.INVALID_CERT_PATH_OPTION);
      }
      if (filesys.existsSync(options.caPath)) {
        options.ca = filesys.readFileSync(options.caPath);
      } else if (!isUndefined(options.caPath)) {
        throw new Error(exceptions.INVALID_CA_PATH_OPTION);
      }
      options.requestCert = true;
      options.rejectUnauthorized = true;
    };
  }
});

// ../../node_modules/aws-iot-device-sdk/package.json
var require_package = __commonJS({
  "../../node_modules/aws-iot-device-sdk/package.json"(exports2, module2) {
    module2.exports = {
      name: "aws-iot-device-sdk",
      description: "AWS IoT Node.js SDK for Embedded Devices",
      version: "2.2.16",
      author: {
        name: "Amazon Web Services",
        email: "",
        url: "http://aws.amazon.com"
      },
      homepage: "https://github.com/aws/aws-iot-device-sdk-js",
      main: "index.js",
      engines: {
        node: ">=8.17.0"
      },
      repository: {
        type: "git",
        url: "git://github.com/aws/aws-iot-device-sdk-js"
      },
      bugs: {
        url: "http://github.com/aws/aws-iot-device-sdk-js/issues"
      },
      license: "Apache-2.0",
      keywords: [
        "api",
        "amazon",
        "aws",
        "iot",
        "mqtt"
      ],
      dependencies: {
        "crypto-js": "4.2.0",
        minimist: "1.2.6",
        mqtt: "4.2.8",
        "@httptoolkit/websocket-stream": "^6.0.1"
      },
      devDependencies: {
        gulp: "^3.9.0",
        "gulp-beautify": "^2.0.0",
        "gulp-concat": "^2.6.0",
        "gulp-coverage": "^0.3.38",
        "gulp-jscs": "^4.0.0",
        "gulp-jshint": "^2.0.0",
        "gulp-mocha": "^3.0.1",
        jshint: "^2.9.1",
        "jshint-stylish": "^2.2.1",
        rewire: "^2.5.1",
        sinon: "^1.17.3"
      },
      scripts: {
        test: "node ./node_modules/gulp/bin/gulp.js test --verbose",
        browserize: "./scripts/browserize.sh",
        beautify: "node ./node_modules/gulp/bin/gulp.js beautify"
      }
    };
  }
});

// ../../node_modules/aws-iot-device-sdk/device/lib/tls.js
var require_tls2 = __commonJS({
  "../../node_modules/aws-iot-device-sdk/device/lib/tls.js"(exports2, module2) {
    var tls = require("tls");
    function buildBuilder(mqttClient, opts) {
      var connection;
      connection = tls.connect(opts);
      function handleTLSerrors(err) {
        mqttClient.emit("error", err);
        connection.end();
      }
      connection.on("secureConnect", function() {
        if (!connection.authorized) {
          connection.emit("error", new Error("TLS not authorized"));
        } else {
          connection.removeListener("error", handleTLSerrors);
        }
      });
      connection.on("error", handleTLSerrors);
      return connection;
    }
    module2.exports = buildBuilder;
  }
});

// ../../node_modules/ws/lib/constants.js
var require_constants3 = __commonJS({
  "../../node_modules/ws/lib/constants.js"(exports2, module2) {
    "use strict";
    var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
    var hasBlob = typeof Blob !== "undefined";
    if (hasBlob) BINARY_TYPES.push("blob");
    module2.exports = {
      BINARY_TYPES,
      CLOSE_TIMEOUT: 3e4,
      EMPTY_BUFFER: Buffer.alloc(0),
      GUID: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11",
      hasBlob,
      kForOnEventAttribute: /* @__PURE__ */ Symbol("kIsForOnEventAttribute"),
      kListener: /* @__PURE__ */ Symbol("kListener"),
      kStatusCode: /* @__PURE__ */ Symbol("status-code"),
      kWebSocket: /* @__PURE__ */ Symbol("websocket"),
      NOOP: () => {
      }
    };
  }
});

// ../../node_modules/ws/lib/buffer-util.js
var require_buffer_util2 = __commonJS({
  "../../node_modules/ws/lib/buffer-util.js"(exports2, module2) {
    "use strict";
    var { EMPTY_BUFFER } = require_constants3();
    var FastBuffer = Buffer[Symbol.species];
    function concat(list2, totalLength) {
      if (list2.length === 0) return EMPTY_BUFFER;
      if (list2.length === 1) return list2[0];
      const target = Buffer.allocUnsafe(totalLength);
      let offset = 0;
      for (let i5 = 0; i5 < list2.length; i5++) {
        const buf = list2[i5];
        target.set(buf, offset);
        offset += buf.length;
      }
      if (offset < totalLength) {
        return new FastBuffer(target.buffer, target.byteOffset, offset);
      }
      return target;
    }
    function _mask(source, mask, output, offset, length) {
      for (let i5 = 0; i5 < length; i5++) {
        output[offset + i5] = source[i5] ^ mask[i5 & 3];
      }
    }
    function _unmask(buffer, mask) {
      for (let i5 = 0; i5 < buffer.length; i5++) {
        buffer[i5] ^= mask[i5 & 3];
      }
    }
    function toArrayBuffer(buf) {
      if (buf.length === buf.buffer.byteLength) {
        return buf.buffer;
      }
      return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);
    }
    function toBuffer(data2) {
      toBuffer.readOnly = true;
      if (Buffer.isBuffer(data2)) return data2;
      let buf;
      if (data2 instanceof ArrayBuffer) {
        buf = new FastBuffer(data2);
      } else if (ArrayBuffer.isView(data2)) {
        buf = new FastBuffer(data2.buffer, data2.byteOffset, data2.byteLength);
      } else {
        buf = Buffer.from(data2);
        toBuffer.readOnly = false;
      }
      return buf;
    }
    module2.exports = {
      concat,
      mask: _mask,
      toArrayBuffer,
      toBuffer,
      unmask: _unmask
    };
    if (!process.env.WS_NO_BUFFER_UTIL) {
      try {
        const bufferUtil = require("bufferutil");
        module2.exports.mask = function(source, mask, output, offset, length) {
          if (length < 48) _mask(source, mask, output, offset, length);
          else bufferUtil.mask(source, mask, output, offset, length);
        };
        module2.exports.unmask = function(buffer, mask) {
          if (buffer.length < 32) _unmask(buffer, mask);
          else bufferUtil.unmask(buffer, mask);
        };
      } catch (e5) {
      }
    }
  }
});

// ../../node_modules/ws/lib/limiter.js
var require_limiter2 = __commonJS({
  "../../node_modules/ws/lib/limiter.js"(exports2, module2) {
    "use strict";
    var kDone = /* @__PURE__ */ Symbol("kDone");
    var kRun = /* @__PURE__ */ Symbol("kRun");
    var Limiter = class {
      /**
       * Creates a new `Limiter`.
       *
       * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed
       *     to run concurrently
       */
      constructor(concurrency) {
        this[kDone] = () => {
          this.pending--;
          this[kRun]();
        };
        this.concurrency = concurrency || Infinity;
        this.jobs = [];
        this.pending = 0;
      }
      /**
       * Adds a job to the queue.
       *
       * @param {Function} job The job to run
       * @public
       */
      add(job) {
        this.jobs.push(job);
        this[kRun]();
      }
      /**
       * Removes a job from the queue and runs it if possible.
       *
       * @private
       */
      [kRun]() {
        if (this.pending === this.concurrency) return;
        if (this.jobs.length) {
          const job = this.jobs.shift();
          this.pending++;
          job(this[kDone]);
        }
      }
    };
    module2.exports = Limiter;
  }
});

// ../../node_modules/ws/lib/permessage-deflate.js
var require_permessage_deflate2 = __commonJS({
  "../../node_modules/ws/lib/permessage-deflate.js"(exports2, module2) {
    "use strict";
    var zlib = require("zlib");
    var bufferUtil = require_buffer_util2();
    var Limiter = require_limiter2();
    var { kStatusCode } = require_constants3();
    var FastBuffer = Buffer[Symbol.species];
    var TRAILER = Buffer.from([0, 0, 255, 255]);
    var kPerMessageDeflate = /* @__PURE__ */ Symbol("permessage-deflate");
    var kTotalLength = /* @__PURE__ */ Symbol("total-length");
    var kCallback = /* @__PURE__ */ Symbol("callback");
    var kBuffers = /* @__PURE__ */ Symbol("buffers");
    var kError = /* @__PURE__ */ Symbol("error");
    var zlibLimiter;
    var PerMessageDeflate = class {
      /**
       * Creates a PerMessageDeflate instance.
       *
       * @param {Object} [options] Configuration options
       * @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support
       *     for, or request, a custom client window size
       * @param {Boolean} [options.clientNoContextTakeover=false] Advertise/
       *     acknowledge disabling of client context takeover
       * @param {Number} [options.concurrencyLimit=10] The number of concurrent
       *     calls to zlib
       * @param {Boolean} [options.isServer=false] Create the instance in either
       *     server or client mode
       * @param {Number} [options.maxPayload=0] The maximum allowed message length
       * @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
       *     use of a custom server window size
       * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
       *     disabling of server context takeover
       * @param {Number} [options.threshold=1024] Size (in bytes) below which
       *     messages should not be compressed if context takeover is disabled
       * @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on
       *     deflate
       * @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
       *     inflate
       */
      constructor(options) {
        this._options = options || {};
        this._threshold = this._options.threshold !== void 0 ? this._options.threshold : 1024;
        this._maxPayload = this._options.maxPayload | 0;
        this._isServer = !!this._options.isServer;
        this._deflate = null;
        this._inflate = null;
        this.params = null;
        if (!zlibLimiter) {
          const concurrency = this._options.concurrencyLimit !== void 0 ? this._options.concurrencyLimit : 10;
          zlibLimiter = new Limiter(concurrency);
        }
      }
      /**
       * @type {String}
       */
      static get extensionName() {
        return "permessage-deflate";
      }
      /**
       * Create an extension negotiation offer.
       *
       * @return {Object} Extension parameters
       * @public
       */
      offer() {
        const params = {};
        if (this._options.serverNoContextTakeover) {
          params.server_no_context_takeover = true;
        }
        if (this._options.clientNoContextTakeover) {
          params.client_no_context_takeover = true;
        }
        if (this._options.serverMaxWindowBits) {
          params.server_max_window_bits = this._options.serverMaxWindowBits;
        }
        if (this._options.clientMaxWindowBits) {
          params.client_max_window_bits = this._options.clientMaxWindowBits;
        } else if (this._options.clientMaxWindowBits == null) {
          params.client_max_window_bits = true;
        }
        return params;
      }
      /**
       * Accept an extension negotiation offer/response.
       *
       * @param {Array} configurations The extension negotiation offers/reponse
       * @return {Object} Accepted configuration
       * @public
       */
      accept(configurations) {
        configurations = this.normalizeParams(configurations);
        this.params = this._isServer ? this.acceptAsServer(configurations) : this.acceptAsClient(configurations);
        return this.params;
      }
      /**
       * Releases all resources used by the extension.
       *
       * @public
       */
      cleanup() {
        if (this._inflate) {
          this._inflate.close();
          this._inflate = null;
        }
        if (this._deflate) {
          const callback = this._deflate[kCallback];
          this._deflate.close();
          this._deflate = null;
          if (callback) {
            callback(
              new Error(
                "The deflate stream was closed while data was being processed"
              )
            );
          }
        }
      }
      /**
       *  Accept an extension negotiation offer.
       *
       * @param {Array} offers The extension negotiation offers
       * @return {Object} Accepted configuration
       * @private
       */
      acceptAsServer(offers) {
        const opts = this._options;
        const accepted = offers.find((params) => {
          if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && !params.client_max_window_bits) {
            return false;
          }
          return true;
        });
        if (!accepted) {
          throw new Error("None of the extension offers can be accepted");
        }
        if (opts.serverNoContextTakeover) {
          accepted.server_no_context_takeover = true;
        }
        if (opts.clientNoContextTakeover) {
          accepted.client_no_context_takeover = true;
        }
        if (typeof opts.serverMaxWindowBits === "number") {
          accepted.server_max_window_bits = opts.serverMaxWindowBits;
        }
        if (typeof opts.clientMaxWindowBits === "number") {
          accepted.client_max_window_bits = opts.clientMaxWindowBits;
        } else if (accepted.client_max_window_bits === true || opts.clientMaxWindowBits === false) {
          delete accepted.client_max_window_bits;
        }
        return accepted;
      }
      /**
       * Accept the extension negotiation response.
       *
       * @param {Array} response The extension negotiation response
       * @return {Object} Accepted configuration
       * @private
       */
      acceptAsClient(response) {
        const params = response[0];
        if (this._options.clientNoContextTakeover === false && params.client_no_context_takeover) {
          throw new Error('Unexpected parameter "client_no_context_takeover"');
        }
        if (!params.client_max_window_bits) {
          if (typeof this._options.clientMaxWindowBits === "number") {
            params.client_max_window_bits = this._options.clientMaxWindowBits;
          }
        } else if (this._options.clientMaxWindowBits === false || typeof this._options.clientMaxWindowBits === "number" && params.client_max_window_bits > this._options.clientMaxWindowBits) {
          throw new Error(
            'Unexpected or invalid parameter "client_max_window_bits"'
          );
        }
        return params;
      }
      /**
       * Normalize parameters.
       *
       * @param {Array} configurations The extension negotiation offers/reponse
       * @return {Array} The offers/response with normalized parameters
       * @private
       */
      normalizeParams(configurations) {
        configurations.forEach((params) => {
          Object.keys(params).forEach((key) => {
            let value = params[key];
            if (value.length > 1) {
              throw new Error(`Parameter "${key}" must have only a single value`);
            }
            value = value[0];
            if (key === "client_max_window_bits") {
              if (value !== true) {
                const num = +value;
                if (!Number.isInteger(num) || num < 8 || num > 15) {
                  throw new TypeError(
                    `Invalid value for parameter "${key}": ${value}`
                  );
                }
                value = num;
              } else if (!this._isServer) {
                throw new TypeError(
                  `Invalid value for parameter "${key}": ${value}`
                );
              }
            } else if (key === "server_max_window_bits") {
              const num = +value;
              if (!Number.isInteger(num) || num < 8 || num > 15) {
                throw new TypeError(
                  `Invalid value for parameter "${key}": ${value}`
                );
              }
              value = num;
            } else if (key === "client_no_context_takeover" || key === "server_no_context_takeover") {
              if (value !== true) {
                throw new TypeError(
                  `Invalid value for parameter "${key}": ${value}`
                );
              }
            } else {
              throw new Error(`Unknown parameter "${key}"`);
            }
            params[key] = value;
          });
        });
        return configurations;
      }
      /**
       * Decompress data. Concurrency limited.
       *
       * @param {Buffer} data Compressed data
       * @param {Boolean} fin Specifies whether or not this is the last fragment
       * @param {Function} callback Callback
       * @public
       */
      decompress(data2, fin, callback) {
        zlibLimiter.add((done) => {
          this._decompress(data2, fin, (err, result) => {
            done();
            callback(err, result);
          });
        });
      }
      /**
       * Compress data. Concurrency limited.
       *
       * @param {(Buffer|String)} data Data to compress
       * @param {Boolean} fin Specifies whether or not this is the last fragment
       * @param {Function} callback Callback
       * @public
       */
      compress(data2, fin, callback) {
        zlibLimiter.add((done) => {
          this._compress(data2, fin, (err, result) => {
            done();
            callback(err, result);
          });
        });
      }
      /**
       * Decompress data.
       *
       * @param {Buffer} data Compressed data
       * @param {Boolean} fin Specifies whether or not this is the last fragment
       * @param {Function} callback Callback
       * @private
       */
      _decompress(data2, fin, callback) {
        const endpoint = this._isServer ? "client" : "server";
        if (!this._inflate) {
          const key = `${endpoint}_max_window_bits`;
          const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
          this._inflate = zlib.createInflateRaw({
            ...this._options.zlibInflateOptions,
            windowBits
          });
          this._inflate[kPerMessageDeflate] = this;
          this._inflate[kTotalLength] = 0;
          this._inflate[kBuffers] = [];
          this._inflate.on("error", inflateOnError);
          this._inflate.on("data", inflateOnData);
        }
        this._inflate[kCallback] = callback;
        this._inflate.write(data2);
        if (fin) this._inflate.write(TRAILER);
        this._inflate.flush(() => {
          const err = this._inflate[kError];
          if (err) {
            this._inflate.close();
            this._inflate = null;
            callback(err);
            return;
          }
          const data3 = bufferUtil.concat(
            this._inflate[kBuffers],
            this._inflate[kTotalLength]
          );
          if (this._inflate._readableState.endEmitted) {
            this._inflate.close();
            this._inflate = null;
          } else {
            this._inflate[kTotalLength] = 0;
            this._inflate[kBuffers] = [];
            if (fin && this.params[`${endpoint}_no_context_takeover`]) {
              this._inflate.reset();
            }
          }
          callback(null, data3);
        });
      }
      /**
       * Compress data.
       *
       * @param {(Buffer|String)} data Data to compress
       * @param {Boolean} fin Specifies whether or not this is the last fragment
       * @param {Function} callback Callback
       * @private
       */
      _compress(data2, fin, callback) {
        const endpoint = this._isServer ? "server" : "client";
        if (!this._deflate) {
          const key = `${endpoint}_max_window_bits`;
          const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
          this._deflate = zlib.createDeflateRaw({
            ...this._options.zlibDeflateOptions,
            windowBits
          });
          this._deflate[kTotalLength] = 0;
          this._deflate[kBuffers] = [];
          this._deflate.on("data", deflateOnData);
        }
        this._deflate[kCallback] = callback;
        this._deflate.write(data2);
        this._deflate.flush(zlib.Z_SYNC_FLUSH, () => {
          if (!this._deflate) {
            return;
          }
          let data3 = bufferUtil.concat(
            this._deflate[kBuffers],
            this._deflate[kTotalLength]
          );
          if (fin) {
            data3 = new FastBuffer(data3.buffer, data3.byteOffset, data3.length - 4);
          }
          this._deflate[kCallback] = null;
          this._deflate[kTotalLength] = 0;
          this._deflate[kBuffers] = [];
          if (fin && this.params[`${endpoint}_no_context_takeover`]) {
            this._deflate.reset();
          }
          callback(null, data3);
        });
      }
    };
    module2.exports = PerMessageDeflate;
    function deflateOnData(chunk) {
      this[kBuffers].push(chunk);
      this[kTotalLength] += chunk.length;
    }
    function inflateOnData(chunk) {
      this[kTotalLength] += chunk.length;
      if (this[kPerMessageDeflate]._maxPayload < 1 || this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload) {
        this[kBuffers].push(chunk);
        return;
      }
      this[kError] = new RangeError("Max payload size exceeded");
      this[kError].code = "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH";
      this[kError][kStatusCode] = 1009;
      this.removeListener("data", inflateOnData);
      this.reset();
    }
    function inflateOnError(err) {
      this[kPerMessageDeflate]._inflate = null;
      if (this[kError]) {
        this[kCallback](this[kError]);
        return;
      }
      err[kStatusCode] = 1007;
      this[kCallback](err);
    }
  }
});

// ../../node_modules/ws/lib/validation.js
var require_validation2 = __commonJS({
  "../../node_modules/ws/lib/validation.js"(exports2, module2) {
    "use strict";
    var { isUtf8 } = require("buffer");
    var { hasBlob } = require_constants3();
    var tokenChars = [
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      // 0 - 15
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      // 16 - 31
      0,
      1,
      0,
      1,
      1,
      1,
      1,
      1,
      0,
      0,
      1,
      1,
      0,
      1,
      1,
      0,
      // 32 - 47
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      0,
      0,
      0,
      0,
      0,
      0,
      // 48 - 63
      0,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      // 64 - 79
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      0,
      0,
      0,
      1,
      1,
      // 80 - 95
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      // 96 - 111
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      0,
      1,
      0,
      1,
      0
      // 112 - 127
    ];
    function isValidStatusCode(code) {
      return code >= 1e3 && code <= 1014 && code !== 1004 && code !== 1005 && code !== 1006 || code >= 3e3 && code <= 4999;
    }
    function _isValidUTF8(buf) {
      const len = buf.length;
      let i5 = 0;
      while (i5 < len) {
        if ((buf[i5] & 128) === 0) {
          i5++;
        } else if ((buf[i5] & 224) === 192) {
          if (i5 + 1 === len || (buf[i5 + 1] & 192) !== 128 || (buf[i5] & 254) === 192) {
            return false;
          }
          i5 += 2;
        } else if ((buf[i5] & 240) === 224) {
          if (i5 + 2 >= len || (buf[i5 + 1] & 192) !== 128 || (buf[i5 + 2] & 192) !== 128 || buf[i5] === 224 && (buf[i5 + 1] & 224) === 128 || // Overlong
          buf[i5] === 237 && (buf[i5 + 1] & 224) === 160) {
            return false;
          }
          i5 += 3;
        } else if ((buf[i5] & 248) === 240) {
          if (i5 + 3 >= len || (buf[i5 + 1] & 192) !== 128 || (buf[i5 + 2] & 192) !== 128 || (buf[i5 + 3] & 192) !== 128 || buf[i5] === 240 && (buf[i5 + 1] & 240) === 128 || // Overlong
          buf[i5] === 244 && buf[i5 + 1] > 143 || buf[i5] > 244) {
            return false;
          }
          i5 += 4;
        } else {
          return false;
        }
      }
      return true;
    }
    function isBlob(value) {
      return hasBlob && typeof value === "object" && typeof value.arrayBuffer === "function" && typeof value.type === "string" && typeof value.stream === "function" && (value[Symbol.toStringTag] === "Blob" || value[Symbol.toStringTag] === "File");
    }
    module2.exports = {
      isBlob,
      isValidStatusCode,
      isValidUTF8: _isValidUTF8,
      tokenChars
    };
    if (isUtf8) {
      module2.exports.isValidUTF8 = function(buf) {
        return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
      };
    } else if (!process.env.WS_NO_UTF_8_VALIDATE) {
      try {
        const isValidUTF8 = require("utf-8-validate");
        module2.exports.isValidUTF8 = function(buf) {
          return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
        };
      } catch (e5) {
      }
    }
  }
});

// ../../node_modules/ws/lib/receiver.js
var require_receiver2 = __commonJS({
  "../../node_modules/ws/lib/receiver.js"(exports2, module2) {
    "use strict";
    var { Writable } = require("stream");
    var PerMessageDeflate = require_permessage_deflate2();
    var {
      BINARY_TYPES,
      EMPTY_BUFFER,
      kStatusCode,
      kWebSocket
    } = require_constants3();
    var { concat, toArrayBuffer, unmask } = require_buffer_util2();
    var { isValidStatusCode, isValidUTF8 } = require_validation2();
    var FastBuffer = Buffer[Symbol.species];
    var GET_INFO = 0;
    var GET_PAYLOAD_LENGTH_16 = 1;
    var GET_PAYLOAD_LENGTH_64 = 2;
    var GET_MASK = 3;
    var GET_DATA = 4;
    var INFLATING = 5;
    var DEFER_EVENT = 6;
    var Receiver = class extends Writable {
      /**
       * Creates a Receiver instance.
       *
       * @param {Object} [options] Options object
       * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
       *     any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
       *     multiple times in the same tick
       * @param {String} [options.binaryType=nodebuffer] The type for binary data
       * @param {Object} [options.extensions] An object containing the negotiated
       *     extensions
       * @param {Boolean} [options.isServer=false] Specifies whether to operate in
       *     client or server mode
       * @param {Number} [options.maxPayload=0] The maximum allowed message length
       * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
       *     not to skip UTF-8 validation for text and close messages
       */
      constructor(options = {}) {
        super();
        this._allowSynchronousEvents = options.allowSynchronousEvents !== void 0 ? options.allowSynchronousEvents : true;
        this._binaryType = options.binaryType || BINARY_TYPES[0];
        this._extensions = options.extensions || {};
        this._isServer = !!options.isServer;
        this._maxPayload = options.maxPayload | 0;
        this._skipUTF8Validation = !!options.skipUTF8Validation;
        this[kWebSocket] = void 0;
        this._bufferedBytes = 0;
        this._buffers = [];
        this._compressed = false;
        this._payloadLength = 0;
        this._mask = void 0;
        this._fragmented = 0;
        this._masked = false;
        this._fin = false;
        this._opcode = 0;
        this._totalPayloadLength = 0;
        this._messageLength = 0;
        this._fragments = [];
        this._errored = false;
        this._loop = false;
        this._state = GET_INFO;
      }
      /**
       * Implements `Writable.prototype._write()`.
       *
       * @param {Buffer} chunk The chunk of data to write
       * @param {String} encoding The character encoding of `chunk`
       * @param {Function} cb Callback
       * @private
       */
      _write(chunk, encoding, cb) {
        if (this._opcode === 8 && this._state == GET_INFO) return cb();
        this._bufferedBytes += chunk.length;
        this._buffers.push(chunk);
        this.startLoop(cb);
      }
      /**
       * Consumes `n` bytes from the buffered data.
       *
       * @param {Number} n The number of bytes to consume
       * @return {Buffer} The consumed bytes
       * @private
       */
      consume(n2) {
        this._bufferedBytes -= n2;
        if (n2 === this._buffers[0].length) return this._buffers.shift();
        if (n2 < this._buffers[0].length) {
          const buf = this._buffers[0];
          this._buffers[0] = new FastBuffer(
            buf.buffer,
            buf.byteOffset + n2,
            buf.length - n2
          );
          return new FastBuffer(buf.buffer, buf.byteOffset, n2);
        }
        const dst = Buffer.allocUnsafe(n2);
        do {
          const buf = this._buffers[0];
          const offset = dst.length - n2;
          if (n2 >= buf.length) {
            dst.set(this._buffers.shift(), offset);
          } else {
            dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n2), offset);
            this._buffers[0] = new FastBuffer(
              buf.buffer,
              buf.byteOffset + n2,
              buf.length - n2
            );
          }
          n2 -= buf.length;
        } while (n2 > 0);
        return dst;
      }
      /**
       * Starts the parsing loop.
       *
       * @param {Function} cb Callback
       * @private
       */
      startLoop(cb) {
        this._loop = true;
        do {
          switch (this._state) {
            case GET_INFO:
              this.getInfo(cb);
              break;
            case GET_PAYLOAD_LENGTH_16:
              this.getPayloadLength16(cb);
              break;
            case GET_PAYLOAD_LENGTH_64:
              this.getPayloadLength64(cb);
              break;
            case GET_MASK:
              this.getMask();
              break;
            case GET_DATA:
              this.getData(cb);
              break;
            case INFLATING:
            case DEFER_EVENT:
              this._loop = false;
              return;
          }
        } while (this._loop);
        if (!this._errored) cb();
      }
      /**
       * Reads the first two bytes of a frame.
       *
       * @param {Function} cb Callback
       * @private
       */
      getInfo(cb) {
        if (this._bufferedBytes < 2) {
          this._loop = false;
          return;
        }
        const buf = this.consume(2);
        if ((buf[0] & 48) !== 0) {
          const error3 = this.createError(
            RangeError,
            "RSV2 and RSV3 must be clear",
            true,
            1002,
            "WS_ERR_UNEXPECTED_RSV_2_3"
          );
          cb(error3);
          return;
        }
        const compressed = (buf[0] & 64) === 64;
        if (compressed && !this._extensions[PerMessageDeflate.extensionName]) {
          const error3 = this.createError(
            RangeError,
            "RSV1 must be clear",
            true,
            1002,
            "WS_ERR_UNEXPECTED_RSV_1"
          );
          cb(error3);
          return;
        }
        this._fin = (buf[0] & 128) === 128;
        this._opcode = buf[0] & 15;
        this._payloadLength = buf[1] & 127;
        if (this._opcode === 0) {
          if (compressed) {
            const error3 = this.createError(
              RangeError,
              "RSV1 must be clear",
              true,
              1002,
              "WS_ERR_UNEXPECTED_RSV_1"
            );
            cb(error3);
            return;
          }
          if (!this._fragmented) {
            const error3 = this.createError(
              RangeError,
              "invalid opcode 0",
              true,
              1002,
              "WS_ERR_INVALID_OPCODE"
            );
            cb(error3);
            return;
          }
          this._opcode = this._fragmented;
        } else if (this._opcode === 1 || this._opcode === 2) {
          if (this._fragmented) {
            const error3 = this.createError(
              RangeError,
              `invalid opcode ${this._opcode}`,
              true,
              1002,
              "WS_ERR_INVALID_OPCODE"
            );
            cb(error3);
            return;
          }
          this._compressed = compressed;
        } else if (this._opcode > 7 && this._opcode < 11) {
          if (!this._fin) {
            const error3 = this.createError(
              RangeError,
              "FIN must be set",
              true,
              1002,
              "WS_ERR_EXPECTED_FIN"
            );
            cb(error3);
            return;
          }
          if (compressed) {
            const error3 = this.createError(
              RangeError,
              "RSV1 must be clear",
              true,
              1002,
              "WS_ERR_UNEXPECTED_RSV_1"
            );
            cb(error3);
            return;
          }
          if (this._payloadLength > 125 || this._opcode === 8 && this._payloadLength === 1) {
            const error3 = this.createError(
              RangeError,
              `invalid payload length ${this._payloadLength}`,
              true,
              1002,
              "WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"
            );
            cb(error3);
            return;
          }
        } else {
          const error3 = this.createError(
            RangeError,
            `invalid opcode ${this._opcode}`,
            true,
            1002,
            "WS_ERR_INVALID_OPCODE"
          );
          cb(error3);
          return;
        }
        if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
        this._masked = (buf[1] & 128) === 128;
        if (this._isServer) {
          if (!this._masked) {
            const error3 = this.createError(
              RangeError,
              "MASK must be set",
              true,
              1002,
              "WS_ERR_EXPECTED_MASK"
            );
            cb(error3);
            return;
          }
        } else if (this._masked) {
          const error3 = this.createError(
            RangeError,
            "MASK must be clear",
            true,
            1002,
            "WS_ERR_UNEXPECTED_MASK"
          );
          cb(error3);
          return;
        }
        if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
        else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;
        else this.haveLength(cb);
      }
      /**
       * Gets extended payload length (7+16).
       *
       * @param {Function} cb Callback
       * @private
       */
      getPayloadLength16(cb) {
        if (this._bufferedBytes < 2) {
          this._loop = false;
          return;
        }
        this._payloadLength = this.consume(2).readUInt16BE(0);
        this.haveLength(cb);
      }
      /**
       * Gets extended payload length (7+64).
       *
       * @param {Function} cb Callback
       * @private
       */
      getPayloadLength64(cb) {
        if (this._bufferedBytes < 8) {
          this._loop = false;
          return;
        }
        const buf = this.consume(8);
        const num = buf.readUInt32BE(0);
        if (num > Math.pow(2, 53 - 32) - 1) {
          const error3 = this.createError(
            RangeError,
            "Unsupported WebSocket frame: payload length > 2^53 - 1",
            false,
            1009,
            "WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"
          );
          cb(error3);
          return;
        }
        this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);
        this.haveLength(cb);
      }
      /**
       * Payload length has been read.
       *
       * @param {Function} cb Callback
       * @private
       */
      haveLength(cb) {
        if (this._payloadLength && this._opcode < 8) {
          this._totalPayloadLength += this._payloadLength;
          if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
            const error3 = this.createError(
              RangeError,
              "Max payload size exceeded",
              false,
              1009,
              "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"
            );
            cb(error3);
            return;
          }
        }
        if (this._masked) this._state = GET_MASK;
        else this._state = GET_DATA;
      }
      /**
       * Reads mask bytes.
       *
       * @private
       */
      getMask() {
        if (this._bufferedBytes < 4) {
          this._loop = false;
          return;
        }
        this._mask = this.consume(4);
        this._state = GET_DATA;
      }
      /**
       * Reads data bytes.
       *
       * @param {Function} cb Callback
       * @private
       */
      getData(cb) {
        let data2 = EMPTY_BUFFER;
        if (this._payloadLength) {
          if (this._bufferedBytes < this._payloadLength) {
            this._loop = false;
            return;
          }
          data2 = this.consume(this._payloadLength);
          if (this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0) {
            unmask(data2, this._mask);
          }
        }
        if (this._opcode > 7) {
          this.controlMessage(data2, cb);
          return;
        }
        if (this._compressed) {
          this._state = INFLATING;
          this.decompress(data2, cb);
          return;
        }
        if (data2.length) {
          this._messageLength = this._totalPayloadLength;
          this._fragments.push(data2);
        }
        this.dataMessage(cb);
      }
      /**
       * Decompresses data.
       *
       * @param {Buffer} data Compressed data
       * @param {Function} cb Callback
       * @private
       */
      decompress(data2, cb) {
        const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
        perMessageDeflate.decompress(data2, this._fin, (err, buf) => {
          if (err) return cb(err);
          if (buf.length) {
            this._messageLength += buf.length;
            if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
              const error3 = this.createError(
                RangeError,
                "Max payload size exceeded",
                false,
                1009,
                "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"
              );
              cb(error3);
              return;
            }
            this._fragments.push(buf);
          }
          this.dataMessage(cb);
          if (this._state === GET_INFO) this.startLoop(cb);
        });
      }
      /**
       * Handles a data message.
       *
       * @param {Function} cb Callback
       * @private
       */
      dataMessage(cb) {
        if (!this._fin) {
          this._state = GET_INFO;
          return;
        }
        const messageLength = this._messageLength;
        const fragments = this._fragments;
        this._totalPayloadLength = 0;
        this._messageLength = 0;
        this._fragmented = 0;
        this._fragments = [];
        if (this._opcode === 2) {
          let data2;
          if (this._binaryType === "nodebuffer") {
            data2 = concat(fragments, messageLength);
          } else if (this._binaryType === "arraybuffer") {
            data2 = toArrayBuffer(concat(fragments, messageLength));
          } else if (this._binaryType === "blob") {
            data2 = new Blob(fragments);
          } else {
            data2 = fragments;
          }
          if (this._allowSynchronousEvents) {
            this.emit("message", data2, true);
            this._state = GET_INFO;
          } else {
            this._state = DEFER_EVENT;
            setImmediate(() => {
              this.emit("message", data2, true);
              this._state = GET_INFO;
              this.startLoop(cb);
            });
          }
        } else {
          const buf = concat(fragments, messageLength);
          if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
            const error3 = this.createError(
              Error,
              "invalid UTF-8 sequence",
              true,
              1007,
              "WS_ERR_INVALID_UTF8"
            );
            cb(error3);
            return;
          }
          if (this._state === INFLATING || this._allowSynchronousEvents) {
            this.emit("message", buf, false);
            this._state = GET_INFO;
          } else {
            this._state = DEFER_EVENT;
            setImmediate(() => {
              this.emit("message", buf, false);
              this._state = GET_INFO;
              this.startLoop(cb);
            });
          }
        }
      }
      /**
       * Handles a control message.
       *
       * @param {Buffer} data Data to handle
       * @return {(Error|RangeError|undefined)} A possible error
       * @private
       */
      controlMessage(data2, cb) {
        if (this._opcode === 8) {
          if (data2.length === 0) {
            this._loop = false;
            this.emit("conclude", 1005, EMPTY_BUFFER);
            this.end();
          } else {
            const code = data2.readUInt16BE(0);
            if (!isValidStatusCode(code)) {
              const error3 = this.createError(
                RangeError,
                `invalid status code ${code}`,
                true,
                1002,
                "WS_ERR_INVALID_CLOSE_CODE"
              );
              cb(error3);
              return;
            }
            const buf = new FastBuffer(
              data2.buffer,
              data2.byteOffset + 2,
              data2.length - 2
            );
            if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
              const error3 = this.createError(
                Error,
                "invalid UTF-8 sequence",
                true,
                1007,
                "WS_ERR_INVALID_UTF8"
              );
              cb(error3);
              return;
            }
            this._loop = false;
            this.emit("conclude", code, buf);
            this.end();
          }
          this._state = GET_INFO;
          return;
        }
        if (this._allowSynchronousEvents) {
          this.emit(this._opcode === 9 ? "ping" : "pong", data2);
          this._state = GET_INFO;
        } else {
          this._state = DEFER_EVENT;
          setImmediate(() => {
            this.emit(this._opcode === 9 ? "ping" : "pong", data2);
            this._state = GET_INFO;
            this.startLoop(cb);
          });
        }
      }
      /**
       * Builds an error object.
       *
       * @param {function(new:Error|RangeError)} ErrorCtor The error constructor
       * @param {String} message The error message
       * @param {Boolean} prefix Specifies whether or not to add a default prefix to
       *     `message`
       * @param {Number} statusCode The status code
       * @param {String} errorCode The exposed error code
       * @return {(Error|RangeError)} The error
       * @private
       */
      createError(ErrorCtor, message, prefix, statusCode, errorCode) {
        this._loop = false;
        this._errored = true;
        const err = new ErrorCtor(
          prefix ? `Invalid WebSocket frame: ${message}` : message
        );
        Error.captureStackTrace(err, this.createError);
        err.code = errorCode;
        err[kStatusCode] = statusCode;
        return err;
      }
    };
    module2.exports = Receiver;
  }
});

// ../../node_modules/ws/lib/sender.js
var require_sender2 = __commonJS({
  "../../node_modules/ws/lib/sender.js"(exports2, module2) {
    "use strict";
    var { Duplex } = require("stream");
    var { randomFillSync } = require("crypto");
    var PerMessageDeflate = require_permessage_deflate2();
    var { EMPTY_BUFFER, kWebSocket, NOOP } = require_constants3();
    var { isBlob, isValidStatusCode } = require_validation2();
    var { mask: applyMask, toBuffer } = require_buffer_util2();
    var kByteLength = /* @__PURE__ */ Symbol("kByteLength");
    var maskBuffer = Buffer.alloc(4);
    var RANDOM_POOL_SIZE = 8 * 1024;
    var randomPool;
    var randomPoolPointer = RANDOM_POOL_SIZE;
    var DEFAULT = 0;
    var DEFLATING = 1;
    var GET_BLOB_DATA = 2;
    var Sender = class _Sender {
      /**
       * Creates a Sender instance.
       *
       * @param {Duplex} socket The connection socket
       * @param {Object} [extensions] An object containing the negotiated extensions
       * @param {Function} [generateMask] The function used to generate the masking
       *     key
       */
      constructor(socket, extensions, generateMask) {
        this._extensions = extensions || {};
        if (generateMask) {
          this._generateMask = generateMask;
          this._maskBuffer = Buffer.alloc(4);
        }
        this._socket = socket;
        this._firstFragment = true;
        this._compress = false;
        this._bufferedBytes = 0;
        this._queue = [];
        this._state = DEFAULT;
        this.onerror = NOOP;
        this[kWebSocket] = void 0;
      }
      /**
       * Frames a piece of data according to the HyBi WebSocket protocol.
       *
       * @param {(Buffer|String)} data The data to frame
       * @param {Object} options Options object
       * @param {Boolean} [options.fin=false] Specifies whether or not to set the
       *     FIN bit
       * @param {Function} [options.generateMask] The function used to generate the
       *     masking key
       * @param {Boolean} [options.mask=false] Specifies whether or not to mask
       *     `data`
       * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
       *     key
       * @param {Number} options.opcode The opcode
       * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
       *     modified
       * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
       *     RSV1 bit
       * @return {(Buffer|String)[]} The framed data
       * @public
       */
      static frame(data2, options) {
        let mask;
        let merge = false;
        let offset = 2;
        let skipMasking = false;
        if (options.mask) {
          mask = options.maskBuffer || maskBuffer;
          if (options.generateMask) {
            options.generateMask(mask);
          } else {
            if (randomPoolPointer === RANDOM_POOL_SIZE) {
              if (randomPool === void 0) {
                randomPool = Buffer.alloc(RANDOM_POOL_SIZE);
              }
              randomFillSync(randomPool, 0, RANDOM_POOL_SIZE);
              randomPoolPointer = 0;
            }
            mask[0] = randomPool[randomPoolPointer++];
            mask[1] = randomPool[randomPoolPointer++];
            mask[2] = randomPool[randomPoolPointer++];
            mask[3] = randomPool[randomPoolPointer++];
          }
          skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0;
          offset = 6;
        }
        let dataLength;
        if (typeof data2 === "string") {
          if ((!options.mask || skipMasking) && options[kByteLength] !== void 0) {
            dataLength = options[kByteLength];
          } else {
            data2 = Buffer.from(data2);
            dataLength = data2.length;
          }
        } else {
          dataLength = data2.length;
          merge = options.mask && options.readOnly && !skipMasking;
        }
        let payloadLength = dataLength;
        if (dataLength >= 65536) {
          offset += 8;
          payloadLength = 127;
        } else if (dataLength > 125) {
          offset += 2;
          payloadLength = 126;
        }
        const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset);
        target[0] = options.fin ? options.opcode | 128 : options.opcode;
        if (options.rsv1) target[0] |= 64;
        target[1] = payloadLength;
        if (payloadLength === 126) {
          target.writeUInt16BE(dataLength, 2);
        } else if (payloadLength === 127) {
          target[2] = target[3] = 0;
          target.writeUIntBE(dataLength, 4, 6);
        }
        if (!options.mask) return [target, data2];
        target[1] |= 128;
        target[offset - 4] = mask[0];
        target[offset - 3] = mask[1];
        target[offset - 2] = mask[2];
        target[offset - 1] = mask[3];
        if (skipMasking) return [target, data2];
        if (merge) {
          applyMask(data2, mask, target, offset, dataLength);
          return [target];
        }
        applyMask(data2, mask, data2, 0, dataLength);
        return [target, data2];
      }
      /**
       * Sends a close message to the other peer.
       *
       * @param {Number} [code] The status code component of the body
       * @param {(String|Buffer)} [data] The message component of the body
       * @param {Boolean} [mask=false] Specifies whether or not to mask the message
       * @param {Function} [cb] Callback
       * @public
       */
      close(code, data2, mask, cb) {
        let buf;
        if (code === void 0) {
          buf = EMPTY_BUFFER;
        } else if (typeof code !== "number" || !isValidStatusCode(code)) {
          throw new TypeError("First argument must be a valid error code number");
        } else if (data2 === void 0 || !data2.length) {
          buf = Buffer.allocUnsafe(2);
          buf.writeUInt16BE(code, 0);
        } else {
          const length = Buffer.byteLength(data2);
          if (length > 123) {
            throw new RangeError("The message must not be greater than 123 bytes");
          }
          buf = Buffer.allocUnsafe(2 + length);
          buf.writeUInt16BE(code, 0);
          if (typeof data2 === "string") {
            buf.write(data2, 2);
          } else {
            buf.set(data2, 2);
          }
        }
        const options = {
          [kByteLength]: buf.length,
          fin: true,
          generateMask: this._generateMask,
          mask,
          maskBuffer: this._maskBuffer,
          opcode: 8,
          readOnly: false,
          rsv1: false
        };
        if (this._state !== DEFAULT) {
          this.enqueue([this.dispatch, buf, false, options, cb]);
        } else {
          this.sendFrame(_Sender.frame(buf, options), cb);
        }
      }
      /**
       * Sends a ping message to the other peer.
       *
       * @param {*} data The message to send
       * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
       * @param {Function} [cb] Callback
       * @public
       */
      ping(data2, mask, cb) {
        let byteLength;
        let readOnly;
        if (typeof data2 === "string") {
          byteLength = Buffer.byteLength(data2);
          readOnly = false;
        } else if (isBlob(data2)) {
          byteLength = data2.size;
          readOnly = false;
        } else {
          data2 = toBuffer(data2);
          byteLength = data2.length;
          readOnly = toBuffer.readOnly;
        }
        if (byteLength > 125) {
          throw new RangeError("The data size must not be greater than 125 bytes");
        }
        const options = {
          [kByteLength]: byteLength,
          fin: true,
          generateMask: this._generateMask,
          mask,
          maskBuffer: this._maskBuffer,
          opcode: 9,
          readOnly,
          rsv1: false
        };
        if (isBlob(data2)) {
          if (this._state !== DEFAULT) {
            this.enqueue([this.getBlobData, data2, false, options, cb]);
          } else {
            this.getBlobData(data2, false, options, cb);
          }
        } else if (this._state !== DEFAULT) {
          this.enqueue([this.dispatch, data2, false, options, cb]);
        } else {
          this.sendFrame(_Sender.frame(data2, options), cb);
        }
      }
      /**
       * Sends a pong message to the other peer.
       *
       * @param {*} data The message to send
       * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
       * @param {Function} [cb] Callback
       * @public
       */
      pong(data2, mask, cb) {
        let byteLength;
        let readOnly;
        if (typeof data2 === "string") {
          byteLength = Buffer.byteLength(data2);
          readOnly = false;
        } else if (isBlob(data2)) {
          byteLength = data2.size;
          readOnly = false;
        } else {
          data2 = toBuffer(data2);
          byteLength = data2.length;
          readOnly = toBuffer.readOnly;
        }
        if (byteLength > 125) {
          throw new RangeError("The data size must not be greater than 125 bytes");
        }
        const options = {
          [kByteLength]: byteLength,
          fin: true,
          generateMask: this._generateMask,
          mask,
          maskBuffer: this._maskBuffer,
          opcode: 10,
          readOnly,
          rsv1: false
        };
        if (isBlob(data2)) {
          if (this._state !== DEFAULT) {
            this.enqueue([this.getBlobData, data2, false, options, cb]);
          } else {
            this.getBlobData(data2, false, options, cb);
          }
        } else if (this._state !== DEFAULT) {
          this.enqueue([this.dispatch, data2, false, options, cb]);
        } else {
          this.sendFrame(_Sender.frame(data2, options), cb);
        }
      }
      /**
       * Sends a data message to the other peer.
       *
       * @param {*} data The message to send
       * @param {Object} options Options object
       * @param {Boolean} [options.binary=false] Specifies whether `data` is binary
       *     or text
       * @param {Boolean} [options.compress=false] Specifies whether or not to
       *     compress `data`
       * @param {Boolean} [options.fin=false] Specifies whether the fragment is the
       *     last one
       * @param {Boolean} [options.mask=false] Specifies whether or not to mask
       *     `data`
       * @param {Function} [cb] Callback
       * @public
       */
      send(data2, options, cb) {
        const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
        let opcode = options.binary ? 2 : 1;
        let rsv1 = options.compress;
        let byteLength;
        let readOnly;
        if (typeof data2 === "string") {
          byteLength = Buffer.byteLength(data2);
          readOnly = false;
        } else if (isBlob(data2)) {
          byteLength = data2.size;
          readOnly = false;
        } else {
          data2 = toBuffer(data2);
          byteLength = data2.length;
          readOnly = toBuffer.readOnly;
        }
        if (this._firstFragment) {
          this._firstFragment = false;
          if (rsv1 && perMessageDeflate && perMessageDeflate.params[perMessageDeflate._isServer ? "server_no_context_takeover" : "client_no_context_takeover"]) {
            rsv1 = byteLength >= perMessageDeflate._threshold;
          }
          this._compress = rsv1;
        } else {
          rsv1 = false;
          opcode = 0;
        }
        if (options.fin) this._firstFragment = true;
        const opts = {
          [kByteLength]: byteLength,
          fin: options.fin,
          generateMask: this._generateMask,
          mask: options.mask,
          maskBuffer: this._maskBuffer,
          opcode,
          readOnly,
          rsv1
        };
        if (isBlob(data2)) {
          if (this._state !== DEFAULT) {
            this.enqueue([this.getBlobData, data2, this._compress, opts, cb]);
          } else {
            this.getBlobData(data2, this._compress, opts, cb);
          }
        } else if (this._state !== DEFAULT) {
          this.enqueue([this.dispatch, data2, this._compress, opts, cb]);
        } else {
          this.dispatch(data2, this._compress, opts, cb);
        }
      }
      /**
       * Gets the contents of a blob as binary data.
       *
       * @param {Blob} blob The blob
       * @param {Boolean} [compress=false] Specifies whether or not to compress
       *     the data
       * @param {Object} options Options object
       * @param {Boolean} [options.fin=false] Specifies whether or not to set the
       *     FIN bit
       * @param {Function} [options.generateMask] The function used to generate the
       *     masking key
       * @param {Boolean} [options.mask=false] Specifies whether or not to mask
       *     `data`
       * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
       *     key
       * @param {Number} options.opcode The opcode
       * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
       *     modified
       * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
       *     RSV1 bit
       * @param {Function} [cb] Callback
       * @private
       */
      getBlobData(blob, compress, options, cb) {
        this._bufferedBytes += options[kByteLength];
        this._state = GET_BLOB_DATA;
        blob.arrayBuffer().then((arrayBuffer) => {
          if (this._socket.destroyed) {
            const err = new Error(
              "The socket was closed while the blob was being read"
            );
            process.nextTick(callCallbacks, this, err, cb);
            return;
          }
          this._bufferedBytes -= options[kByteLength];
          const data2 = toBuffer(arrayBuffer);
          if (!compress) {
            this._state = DEFAULT;
            this.sendFrame(_Sender.frame(data2, options), cb);
            this.dequeue();
          } else {
            this.dispatch(data2, compress, options, cb);
          }
        }).catch((err) => {
          process.nextTick(onError, this, err, cb);
        });
      }
      /**
       * Dispatches a message.
       *
       * @param {(Buffer|String)} data The message to send
       * @param {Boolean} [compress=false] Specifies whether or not to compress
       *     `data`
       * @param {Object} options Options object
       * @param {Boolean} [options.fin=false] Specifies whether or not to set the
       *     FIN bit
       * @param {Function} [options.generateMask] The function used to generate the
       *     masking key
       * @param {Boolean} [options.mask=false] Specifies whether or not to mask
       *     `data`
       * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
       *     key
       * @param {Number} options.opcode The opcode
       * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
       *     modified
       * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
       *     RSV1 bit
       * @param {Function} [cb] Callback
       * @private
       */
      dispatch(data2, compress, options, cb) {
        if (!compress) {
          this.sendFrame(_Sender.frame(data2, options), cb);
          return;
        }
        const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
        this._bufferedBytes += options[kByteLength];
        this._state = DEFLATING;
        perMessageDeflate.compress(data2, options.fin, (_, buf) => {
          if (this._socket.destroyed) {
            const err = new Error(
              "The socket was closed while data was being compressed"
            );
            callCallbacks(this, err, cb);
            return;
          }
          this._bufferedBytes -= options[kByteLength];
          this._state = DEFAULT;
          options.readOnly = false;
          this.sendFrame(_Sender.frame(buf, options), cb);
          this.dequeue();
        });
      }
      /**
       * Executes queued send operations.
       *
       * @private
       */
      dequeue() {
        while (this._state === DEFAULT && this._queue.length) {
          const params = this._queue.shift();
          this._bufferedBytes -= params[3][kByteLength];
          Reflect.apply(params[0], this, params.slice(1));
        }
      }
      /**
       * Enqueues a send operation.
       *
       * @param {Array} params Send operation parameters.
       * @private
       */
      enqueue(params) {
        this._bufferedBytes += params[3][kByteLength];
        this._queue.push(params);
      }
      /**
       * Sends a frame.
       *
       * @param {(Buffer | String)[]} list The frame to send
       * @param {Function} [cb] Callback
       * @private
       */
      sendFrame(list2, cb) {
        if (list2.length === 2) {
          this._socket.cork();
          this._socket.write(list2[0]);
          this._socket.write(list2[1], cb);
          this._socket.uncork();
        } else {
          this._socket.write(list2[0], cb);
        }
      }
    };
    module2.exports = Sender;
    function callCallbacks(sender, err, cb) {
      if (typeof cb === "function") cb(err);
      for (let i5 = 0; i5 < sender._queue.length; i5++) {
        const params = sender._queue[i5];
        const callback = params[params.length - 1];
        if (typeof callback === "function") callback(err);
      }
    }
    function onError(sender, err, cb) {
      callCallbacks(sender, err, cb);
      sender.onerror(err);
    }
  }
});

// ../../node_modules/ws/lib/event-target.js
var require_event_target2 = __commonJS({
  "../../node_modules/ws/lib/event-target.js"(exports2, module2) {
    "use strict";
    var { kForOnEventAttribute, kListener } = require_constants3();
    var kCode = /* @__PURE__ */ Symbol("kCode");
    var kData = /* @__PURE__ */ Symbol("kData");
    var kError = /* @__PURE__ */ Symbol("kError");
    var kMessage = /* @__PURE__ */ Symbol("kMessage");
    var kReason = /* @__PURE__ */ Symbol("kReason");
    var kTarget = /* @__PURE__ */ Symbol("kTarget");
    var kType = /* @__PURE__ */ Symbol("kType");
    var kWasClean = /* @__PURE__ */ Symbol("kWasClean");
    var Event = class {
      /**
       * Create a new `Event`.
       *
       * @param {String} type The name of the event
       * @throws {TypeError} If the `type` argument is not specified
       */
      constructor(type) {
        this[kTarget] = null;
        this[kType] = type;
      }
      /**
       * @type {*}
       */
      get target() {
        return this[kTarget];
      }
      /**
       * @type {String}
       */
      get type() {
        return this[kType];
      }
    };
    Object.defineProperty(Event.prototype, "target", { enumerable: true });
    Object.defineProperty(Event.prototype, "type", { enumerable: true });
    var CloseEvent = class extends Event {
      /**
       * Create a new `CloseEvent`.
       *
       * @param {String} type The name of the event
       * @param {Object} [options] A dictionary object that allows for setting
       *     attributes via object members of the same name
       * @param {Number} [options.code=0] The status code explaining why the
       *     connection was closed
       * @param {String} [options.reason=''] A human-readable string explaining why
       *     the connection was closed
       * @param {Boolean} [options.wasClean=false] Indicates whether or not the
       *     connection was cleanly closed
       */
      constructor(type, options = {}) {
        super(type);
        this[kCode] = options.code === void 0 ? 0 : options.code;
        this[kReason] = options.reason === void 0 ? "" : options.reason;
        this[kWasClean] = options.wasClean === void 0 ? false : options.wasClean;
      }
      /**
       * @type {Number}
       */
      get code() {
        return this[kCode];
      }
      /**
       * @type {String}
       */
      get reason() {
        return this[kReason];
      }
      /**
       * @type {Boolean}
       */
      get wasClean() {
        return this[kWasClean];
      }
    };
    Object.defineProperty(CloseEvent.prototype, "code", { enumerable: true });
    Object.defineProperty(CloseEvent.prototype, "reason", { enumerable: true });
    Object.defineProperty(CloseEvent.prototype, "wasClean", { enumerable: true });
    var ErrorEvent = class extends Event {
      /**
       * Create a new `ErrorEvent`.
       *
       * @param {String} type The name of the event
       * @param {Object} [options] A dictionary object that allows for setting
       *     attributes via object members of the same name
       * @param {*} [options.error=null] The error that generated this event
       * @param {String} [options.message=''] The error message
       */
      constructor(type, options = {}) {
        super(type);
        this[kError] = options.error === void 0 ? null : options.error;
        this[kMessage] = options.message === void 0 ? "" : options.message;
      }
      /**
       * @type {*}
       */
      get error() {
        return this[kError];
      }
      /**
       * @type {String}
       */
      get message() {
        return this[kMessage];
      }
    };
    Object.defineProperty(ErrorEvent.prototype, "error", { enumerable: true });
    Object.defineProperty(ErrorEvent.prototype, "message", { enumerable: true });
    var MessageEvent = class extends Event {
      /**
       * Create a new `MessageEvent`.
       *
       * @param {String} type The name of the event
       * @param {Object} [options] A dictionary object that allows for setting
       *     attributes via object members of the same name
       * @param {*} [options.data=null] The message content
       */
      constructor(type, options = {}) {
        super(type);
        this[kData] = options.data === void 0 ? null : options.data;
      }
      /**
       * @type {*}
       */
      get data() {
        return this[kData];
      }
    };
    Object.defineProperty(MessageEvent.prototype, "data", { enumerable: true });
    var EventTarget = {
      /**
       * Register an event listener.
       *
       * @param {String} type A string representing the event type to listen for
       * @param {(Function|Object)} handler The listener to add
       * @param {Object} [options] An options object specifies characteristics about
       *     the event listener
       * @param {Boolean} [options.once=false] A `Boolean` indicating that the
       *     listener should be invoked at most once after being added. If `true`,
       *     the listener would be automatically removed when invoked.
       * @public
       */
      addEventListener(type, handler2, options = {}) {
        for (const listener of this.listeners(type)) {
          if (!options[kForOnEventAttribute] && listener[kListener] === handler2 && !listener[kForOnEventAttribute]) {
            return;
          }
        }
        let wrapper;
        if (type === "message") {
          wrapper = function onMessage(data2, isBinary) {
            const event = new MessageEvent("message", {
              data: isBinary ? data2 : data2.toString()
            });
            event[kTarget] = this;
            callListener(handler2, this, event);
          };
        } else if (type === "close") {
          wrapper = function onClose(code, message) {
            const event = new CloseEvent("close", {
              code,
              reason: message.toString(),
              wasClean: this._closeFrameReceived && this._closeFrameSent
            });
            event[kTarget] = this;
            callListener(handler2, this, event);
          };
        } else if (type === "error") {
          wrapper = function onError(error3) {
            const event = new ErrorEvent("error", {
              error: error3,
              message: error3.message
            });
            event[kTarget] = this;
            callListener(handler2, this, event);
          };
        } else if (type === "open") {
          wrapper = function onOpen() {
            const event = new Event("open");
            event[kTarget] = this;
            callListener(handler2, this, event);
          };
        } else {
          return;
        }
        wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute];
        wrapper[kListener] = handler2;
        if (options.once) {
          this.once(type, wrapper);
        } else {
          this.on(type, wrapper);
        }
      },
      /**
       * Remove an event listener.
       *
       * @param {String} type A string representing the event type to remove
       * @param {(Function|Object)} handler The listener to remove
       * @public
       */
      removeEventListener(type, handler2) {
        for (const listener of this.listeners(type)) {
          if (listener[kListener] === handler2 && !listener[kForOnEventAttribute]) {
            this.removeListener(type, listener);
            break;
          }
        }
      }
    };
    module2.exports = {
      CloseEvent,
      ErrorEvent,
      Event,
      EventTarget,
      MessageEvent
    };
    function callListener(listener, thisArg, event) {
      if (typeof listener === "object" && listener.handleEvent) {
        listener.handleEvent.call(listener, event);
      } else {
        listener.call(thisArg, event);
      }
    }
  }
});

// ../../node_modules/ws/lib/extension.js
var require_extension2 = __commonJS({
  "../../node_modules/ws/lib/extension.js"(exports2, module2) {
    "use strict";
    var { tokenChars } = require_validation2();
    function push(dest, name, elem) {
      if (dest[name] === void 0) dest[name] = [elem];
      else dest[name].push(elem);
    }
    function parse(header) {
      const offers = /* @__PURE__ */ Object.create(null);
      let params = /* @__PURE__ */ Object.create(null);
      let mustUnescape = false;
      let isEscaping = false;
      let inQuotes = false;
      let extensionName;
      let paramName;
      let start = -1;
      let code = -1;
      let end = -1;
      let i5 = 0;
      for (; i5 < header.length; i5++) {
        code = header.charCodeAt(i5);
        if (extensionName === void 0) {
          if (end === -1 && tokenChars[code] === 1) {
            if (start === -1) start = i5;
          } else if (i5 !== 0 && (code === 32 || code === 9)) {
            if (end === -1 && start !== -1) end = i5;
          } else if (code === 59 || code === 44) {
            if (start === -1) {
              throw new SyntaxError(`Unexpected character at index ${i5}`);
            }
            if (end === -1) end = i5;
            const name = header.slice(start, end);
            if (code === 44) {
              push(offers, name, params);
              params = /* @__PURE__ */ Object.create(null);
            } else {
              extensionName = name;
            }
            start = end = -1;
          } else {
            throw new SyntaxError(`Unexpected character at index ${i5}`);
          }
        } else if (paramName === void 0) {
          if (end === -1 && tokenChars[code] === 1) {
            if (start === -1) start = i5;
          } else if (code === 32 || code === 9) {
            if (end === -1 && start !== -1) end = i5;
          } else if (code === 59 || code === 44) {
            if (start === -1) {
              throw new SyntaxError(`Unexpected character at index ${i5}`);
            }
            if (end === -1) end = i5;
            push(params, header.slice(start, end), true);
            if (code === 44) {
              push(offers, extensionName, params);
              params = /* @__PURE__ */ Object.create(null);
              extensionName = void 0;
            }
            start = end = -1;
          } else if (code === 61 && start !== -1 && end === -1) {
            paramName = header.slice(start, i5);
            start = end = -1;
          } else {
            throw new SyntaxError(`Unexpected character at index ${i5}`);
          }
        } else {
          if (isEscaping) {
            if (tokenChars[code] !== 1) {
              throw new SyntaxError(`Unexpected character at index ${i5}`);
            }
            if (start === -1) start = i5;
            else if (!mustUnescape) mustUnescape = true;
            isEscaping = false;
          } else if (inQuotes) {
            if (tokenChars[code] === 1) {
              if (start === -1) start = i5;
            } else if (code === 34 && start !== -1) {
              inQuotes = false;
              end = i5;
            } else if (code === 92) {
              isEscaping = true;
            } else {
              throw new SyntaxError(`Unexpected character at index ${i5}`);
            }
          } else if (code === 34 && header.charCodeAt(i5 - 1) === 61) {
            inQuotes = true;
          } else if (end === -1 && tokenChars[code] === 1) {
            if (start === -1) start = i5;
          } else if (start !== -1 && (code === 32 || code === 9)) {
            if (end === -1) end = i5;
          } else if (code === 59 || code === 44) {
            if (start === -1) {
              throw new SyntaxError(`Unexpected character at index ${i5}`);
            }
            if (end === -1) end = i5;
            let value = header.slice(start, end);
            if (mustUnescape) {
              value = value.replace(/\\/g, "");
              mustUnescape = false;
            }
            push(params, paramName, value);
            if (code === 44) {
              push(offers, extensionName, params);
              params = /* @__PURE__ */ Object.create(null);
              extensionName = void 0;
            }
            paramName = void 0;
            start = end = -1;
          } else {
            throw new SyntaxError(`Unexpected character at index ${i5}`);
          }
        }
      }
      if (start === -1 || inQuotes || code === 32 || code === 9) {
        throw new SyntaxError("Unexpected end of input");
      }
      if (end === -1) end = i5;
      const token = header.slice(start, end);
      if (extensionName === void 0) {
        push(offers, token, params);
      } else {
        if (paramName === void 0) {
          push(params, token, true);
        } else if (mustUnescape) {
          push(params, paramName, token.replace(/\\/g, ""));
        } else {
          push(params, paramName, token);
        }
        push(offers, extensionName, params);
      }
      return offers;
    }
    function format2(extensions) {
      return Object.keys(extensions).map((extension) => {
        let configurations = extensions[extension];
        if (!Array.isArray(configurations)) configurations = [configurations];
        return configurations.map((params) => {
          return [extension].concat(
            Object.keys(params).map((k5) => {
              let values = params[k5];
              if (!Array.isArray(values)) values = [values];
              return values.map((v) => v === true ? k5 : `${k5}=${v}`).join("; ");
            })
          ).join("; ");
        }).join(", ");
      }).join(", ");
    }
    module2.exports = { format: format2, parse };
  }
});

// ../../node_modules/ws/lib/websocket.js
var require_websocket2 = __commonJS({
  "../../node_modules/ws/lib/websocket.js"(exports2, module2) {
    "use strict";
    var EventEmitter = require("events");
    var https = require("https");
    var http = require("http");
    var net = require("net");
    var tls = require("tls");
    var { randomBytes: randomBytes2, createHash } = require("crypto");
    var { Duplex, Readable } = require("stream");
    var { URL: URL2 } = require("url");
    var PerMessageDeflate = require_permessage_deflate2();
    var Receiver = require_receiver2();
    var Sender = require_sender2();
    var { isBlob } = require_validation2();
    var {
      BINARY_TYPES,
      CLOSE_TIMEOUT,
      EMPTY_BUFFER,
      GUID,
      kForOnEventAttribute,
      kListener,
      kStatusCode,
      kWebSocket,
      NOOP
    } = require_constants3();
    var {
      EventTarget: { addEventListener, removeEventListener }
    } = require_event_target2();
    var { format: format2, parse } = require_extension2();
    var { toBuffer } = require_buffer_util2();
    var kAborted = /* @__PURE__ */ Symbol("kAborted");
    var protocolVersions = [8, 13];
    var readyStates = ["CONNECTING", "OPEN", "CLOSING", "CLOSED"];
    var subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;
    var WebSocket2 = class _WebSocket extends EventEmitter {
      /**
       * Create a new `WebSocket`.
       *
       * @param {(String|URL)} address The URL to which to connect
       * @param {(String|String[])} [protocols] The subprotocols
       * @param {Object} [options] Connection options
       */
      constructor(address, protocols, options) {
        super();
        this._binaryType = BINARY_TYPES[0];
        this._closeCode = 1006;
        this._closeFrameReceived = false;
        this._closeFrameSent = false;
        this._closeMessage = EMPTY_BUFFER;
        this._closeTimer = null;
        this._errorEmitted = false;
        this._extensions = {};
        this._paused = false;
        this._protocol = "";
        this._readyState = _WebSocket.CONNECTING;
        this._receiver = null;
        this._sender = null;
        this._socket = null;
        if (address !== null) {
          this._bufferedAmount = 0;
          this._isServer = false;
          this._redirects = 0;
          if (protocols === void 0) {
            protocols = [];
          } else if (!Array.isArray(protocols)) {
            if (typeof protocols === "object" && protocols !== null) {
              options = protocols;
              protocols = [];
            } else {
              protocols = [protocols];
            }
          }
          initAsClient(this, address, protocols, options);
        } else {
          this._autoPong = options.autoPong;
          this._closeTimeout = options.closeTimeout;
          this._isServer = true;
        }
      }
      /**
       * For historical reasons, the custom "nodebuffer" type is used by the default
       * instead of "blob".
       *
       * @type {String}
       */
      get binaryType() {
        return this._binaryType;
      }
      set binaryType(type) {
        if (!BINARY_TYPES.includes(type)) return;
        this._binaryType = type;
        if (this._receiver) this._receiver._binaryType = type;
      }
      /**
       * @type {Number}
       */
      get bufferedAmount() {
        if (!this._socket) return this._bufferedAmount;
        return this._socket._writableState.length + this._sender._bufferedBytes;
      }
      /**
       * @type {String}
       */
      get extensions() {
        return Object.keys(this._extensions).join();
      }
      /**
       * @type {Boolean}
       */
      get isPaused() {
        return this._paused;
      }
      /**
       * @type {Function}
       */
      /* istanbul ignore next */
      get onclose() {
        return null;
      }
      /**
       * @type {Function}
       */
      /* istanbul ignore next */
      get onerror() {
        return null;
      }
      /**
       * @type {Function}
       */
      /* istanbul ignore next */
      get onopen() {
        return null;
      }
      /**
       * @type {Function}
       */
      /* istanbul ignore next */
      get onmessage() {
        return null;
      }
      /**
       * @type {String}
       */
      get protocol() {
        return this._protocol;
      }
      /**
       * @type {Number}
       */
      get readyState() {
        return this._readyState;
      }
      /**
       * @type {String}
       */
      get url() {
        return this._url;
      }
      /**
       * Set up the socket and the internal resources.
       *
       * @param {Duplex} socket The network socket between the server and client
       * @param {Buffer} head The first packet of the upgraded stream
       * @param {Object} options Options object
       * @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether
       *     any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
       *     multiple times in the same tick
       * @param {Function} [options.generateMask] The function used to generate the
       *     masking key
       * @param {Number} [options.maxPayload=0] The maximum allowed message size
       * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
       *     not to skip UTF-8 validation for text and close messages
       * @private
       */
      setSocket(socket, head, options) {
        const receiver = new Receiver({
          allowSynchronousEvents: options.allowSynchronousEvents,
          binaryType: this.binaryType,
          extensions: this._extensions,
          isServer: this._isServer,
          maxPayload: options.maxPayload,
          skipUTF8Validation: options.skipUTF8Validation
        });
        const sender = new Sender(socket, this._extensions, options.generateMask);
        this._receiver = receiver;
        this._sender = sender;
        this._socket = socket;
        receiver[kWebSocket] = this;
        sender[kWebSocket] = this;
        socket[kWebSocket] = this;
        receiver.on("conclude", receiverOnConclude);
        receiver.on("drain", receiverOnDrain);
        receiver.on("error", receiverOnError);
        receiver.on("message", receiverOnMessage);
        receiver.on("ping", receiverOnPing);
        receiver.on("pong", receiverOnPong);
        sender.onerror = senderOnError;
        if (socket.setTimeout) socket.setTimeout(0);
        if (socket.setNoDelay) socket.setNoDelay();
        if (head.length > 0) socket.unshift(head);
        socket.on("close", socketOnClose);
        socket.on("data", socketOnData);
        socket.on("end", socketOnEnd);
        socket.on("error", socketOnError);
        this._readyState = _WebSocket.OPEN;
        this.emit("open");
      }
      /**
       * Emit the `'close'` event.
       *
       * @private
       */
      emitClose() {
        if (!this._socket) {
          this._readyState = _WebSocket.CLOSED;
          this.emit("close", this._closeCode, this._closeMessage);
          return;
        }
        if (this._extensions[PerMessageDeflate.extensionName]) {
          this._extensions[PerMessageDeflate.extensionName].cleanup();
        }
        this._receiver.removeAllListeners();
        this._readyState = _WebSocket.CLOSED;
        this.emit("close", this._closeCode, this._closeMessage);
      }
      /**
       * Start a closing handshake.
       *
       *          +----------+   +-----------+   +----------+
       *     - - -|ws.close()|-->|close frame|-->|ws.close()|- - -
       *    |     +----------+   +-----------+   +----------+     |
       *          +----------+   +-----------+         |
       * CLOSING  |ws.close()|<--|close frame|<--+-----+       CLOSING
       *          +----------+   +-----------+   |
       *    |           |                        |   +---+        |
       *                +------------------------+-->|fin| - - - -
       *    |         +---+                      |   +---+
       *     - - - - -|fin|<---------------------+
       *              +---+
       *
       * @param {Number} [code] Status code explaining why the connection is closing
       * @param {(String|Buffer)} [data] The reason why the connection is
       *     closing
       * @public
       */
      close(code, data2) {
        if (this.readyState === _WebSocket.CLOSED) return;
        if (this.readyState === _WebSocket.CONNECTING) {
          const msg = "WebSocket was closed before the connection was established";
          abortHandshake(this, this._req, msg);
          return;
        }
        if (this.readyState === _WebSocket.CLOSING) {
          if (this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted)) {
            this._socket.end();
          }
          return;
        }
        this._readyState = _WebSocket.CLOSING;
        this._sender.close(code, data2, !this._isServer, (err) => {
          if (err) return;
          this._closeFrameSent = true;
          if (this._closeFrameReceived || this._receiver._writableState.errorEmitted) {
            this._socket.end();
          }
        });
        setCloseTimer(this);
      }
      /**
       * Pause the socket.
       *
       * @public
       */
      pause() {
        if (this.readyState === _WebSocket.CONNECTING || this.readyState === _WebSocket.CLOSED) {
          return;
        }
        this._paused = true;
        this._socket.pause();
      }
      /**
       * Send a ping.
       *
       * @param {*} [data] The data to send
       * @param {Boolean} [mask] Indicates whether or not to mask `data`
       * @param {Function} [cb] Callback which is executed when the ping is sent
       * @public
       */
      ping(data2, mask, cb) {
        if (this.readyState === _WebSocket.CONNECTING) {
          throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
        }
        if (typeof data2 === "function") {
          cb = data2;
          data2 = mask = void 0;
        } else if (typeof mask === "function") {
          cb = mask;
          mask = void 0;
        }
        if (typeof data2 === "number") data2 = data2.toString();
        if (this.readyState !== _WebSocket.OPEN) {
          sendAfterClose(this, data2, cb);
          return;
        }
        if (mask === void 0) mask = !this._isServer;
        this._sender.ping(data2 || EMPTY_BUFFER, mask, cb);
      }
      /**
       * Send a pong.
       *
       * @param {*} [data] The data to send
       * @param {Boolean} [mask] Indicates whether or not to mask `data`
       * @param {Function} [cb] Callback which is executed when the pong is sent
       * @public
       */
      pong(data2, mask, cb) {
        if (this.readyState === _WebSocket.CONNECTING) {
          throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
        }
        if (typeof data2 === "function") {
          cb = data2;
          data2 = mask = void 0;
        } else if (typeof mask === "function") {
          cb = mask;
          mask = void 0;
        }
        if (typeof data2 === "number") data2 = data2.toString();
        if (this.readyState !== _WebSocket.OPEN) {
          sendAfterClose(this, data2, cb);
          return;
        }
        if (mask === void 0) mask = !this._isServer;
        this._sender.pong(data2 || EMPTY_BUFFER, mask, cb);
      }
      /**
       * Resume the socket.
       *
       * @public
       */
      resume() {
        if (this.readyState === _WebSocket.CONNECTING || this.readyState === _WebSocket.CLOSED) {
          return;
        }
        this._paused = false;
        if (!this._receiver._writableState.needDrain) this._socket.resume();
      }
      /**
       * Send a data message.
       *
       * @param {*} data The message to send
       * @param {Object} [options] Options object
       * @param {Boolean} [options.binary] Specifies whether `data` is binary or
       *     text
       * @param {Boolean} [options.compress] Specifies whether or not to compress
       *     `data`
       * @param {Boolean} [options.fin=true] Specifies whether the fragment is the
       *     last one
       * @param {Boolean} [options.mask] Specifies whether or not to mask `data`
       * @param {Function} [cb] Callback which is executed when data is written out
       * @public
       */
      send(data2, options, cb) {
        if (this.readyState === _WebSocket.CONNECTING) {
          throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
        }
        if (typeof options === "function") {
          cb = options;
          options = {};
        }
        if (typeof data2 === "number") data2 = data2.toString();
        if (this.readyState !== _WebSocket.OPEN) {
          sendAfterClose(this, data2, cb);
          return;
        }
        const opts = {
          binary: typeof data2 !== "string",
          mask: !this._isServer,
          compress: true,
          fin: true,
          ...options
        };
        if (!this._extensions[PerMessageDeflate.extensionName]) {
          opts.compress = false;
        }
        this._sender.send(data2 || EMPTY_BUFFER, opts, cb);
      }
      /**
       * Forcibly close the connection.
       *
       * @public
       */
      terminate() {
        if (this.readyState === _WebSocket.CLOSED) return;
        if (this.readyState === _WebSocket.CONNECTING) {
          const msg = "WebSocket was closed before the connection was established";
          abortHandshake(this, this._req, msg);
          return;
        }
        if (this._socket) {
          this._readyState = _WebSocket.CLOSING;
          this._socket.destroy();
        }
      }
    };
    Object.defineProperty(WebSocket2, "CONNECTING", {
      enumerable: true,
      value: readyStates.indexOf("CONNECTING")
    });
    Object.defineProperty(WebSocket2.prototype, "CONNECTING", {
      enumerable: true,
      value: readyStates.indexOf("CONNECTING")
    });
    Object.defineProperty(WebSocket2, "OPEN", {
      enumerable: true,
      value: readyStates.indexOf("OPEN")
    });
    Object.defineProperty(WebSocket2.prototype, "OPEN", {
      enumerable: true,
      value: readyStates.indexOf("OPEN")
    });
    Object.defineProperty(WebSocket2, "CLOSING", {
      enumerable: true,
      value: readyStates.indexOf("CLOSING")
    });
    Object.defineProperty(WebSocket2.prototype, "CLOSING", {
      enumerable: true,
      value: readyStates.indexOf("CLOSING")
    });
    Object.defineProperty(WebSocket2, "CLOSED", {
      enumerable: true,
      value: readyStates.indexOf("CLOSED")
    });
    Object.defineProperty(WebSocket2.prototype, "CLOSED", {
      enumerable: true,
      value: readyStates.indexOf("CLOSED")
    });
    [
      "binaryType",
      "bufferedAmount",
      "extensions",
      "isPaused",
      "protocol",
      "readyState",
      "url"
    ].forEach((property) => {
      Object.defineProperty(WebSocket2.prototype, property, { enumerable: true });
    });
    ["open", "error", "close", "message"].forEach((method) => {
      Object.defineProperty(WebSocket2.prototype, `on${method}`, {
        enumerable: true,
        get() {
          for (const listener of this.listeners(method)) {
            if (listener[kForOnEventAttribute]) return listener[kListener];
          }
          return null;
        },
        set(handler2) {
          for (const listener of this.listeners(method)) {
            if (listener[kForOnEventAttribute]) {
              this.removeListener(method, listener);
              break;
            }
          }
          if (typeof handler2 !== "function") return;
          this.addEventListener(method, handler2, {
            [kForOnEventAttribute]: true
          });
        }
      });
    });
    WebSocket2.prototype.addEventListener = addEventListener;
    WebSocket2.prototype.removeEventListener = removeEventListener;
    module2.exports = WebSocket2;
    function initAsClient(websocket, address, protocols, options) {
      const opts = {
        allowSynchronousEvents: true,
        autoPong: true,
        closeTimeout: CLOSE_TIMEOUT,
        protocolVersion: protocolVersions[1],
        maxPayload: 100 * 1024 * 1024,
        skipUTF8Validation: false,
        perMessageDeflate: true,
        followRedirects: false,
        maxRedirects: 10,
        ...options,
        socketPath: void 0,
        hostname: void 0,
        protocol: void 0,
        timeout: void 0,
        method: "GET",
        host: void 0,
        path: void 0,
        port: void 0
      };
      websocket._autoPong = opts.autoPong;
      websocket._closeTimeout = opts.closeTimeout;
      if (!protocolVersions.includes(opts.protocolVersion)) {
        throw new RangeError(
          `Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(", ")})`
        );
      }
      let parsedUrl;
      if (address instanceof URL2) {
        parsedUrl = address;
      } else {
        try {
          parsedUrl = new URL2(address);
        } catch {
          throw new SyntaxError(`Invalid URL: ${address}`);
        }
      }
      if (parsedUrl.protocol === "http:") {
        parsedUrl.protocol = "ws:";
      } else if (parsedUrl.protocol === "https:") {
        parsedUrl.protocol = "wss:";
      }
      websocket._url = parsedUrl.href;
      const isSecure = parsedUrl.protocol === "wss:";
      const isIpcUrl = parsedUrl.protocol === "ws+unix:";
      let invalidUrlMessage;
      if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) {
        invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`;
      } else if (isIpcUrl && !parsedUrl.pathname) {
        invalidUrlMessage = "The URL's pathname is empty";
      } else if (parsedUrl.hash) {
        invalidUrlMessage = "The URL contains a fragment identifier";
      }
      if (invalidUrlMessage) {
        const err = new SyntaxError(invalidUrlMessage);
        if (websocket._redirects === 0) {
          throw err;
        } else {
          emitErrorAndClose(websocket, err);
          return;
        }
      }
      const defaultPort = isSecure ? 443 : 80;
      const key = randomBytes2(16).toString("base64");
      const request = isSecure ? https.request : http.request;
      const protocolSet = /* @__PURE__ */ new Set();
      let perMessageDeflate;
      opts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect);
      opts.defaultPort = opts.defaultPort || defaultPort;
      opts.port = parsedUrl.port || defaultPort;
      opts.host = parsedUrl.hostname.startsWith("[") ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname;
      opts.headers = {
        ...opts.headers,
        "Sec-WebSocket-Version": opts.protocolVersion,
        "Sec-WebSocket-Key": key,
        Connection: "Upgrade",
        Upgrade: "websocket"
      };
      opts.path = parsedUrl.pathname + parsedUrl.search;
      opts.timeout = opts.handshakeTimeout;
      if (opts.perMessageDeflate) {
        perMessageDeflate = new PerMessageDeflate({
          ...opts.perMessageDeflate,
          isServer: false,
          maxPayload: opts.maxPayload
        });
        opts.headers["Sec-WebSocket-Extensions"] = format2({
          [PerMessageDeflate.extensionName]: perMessageDeflate.offer()
        });
      }
      if (protocols.length) {
        for (const protocol of protocols) {
          if (typeof protocol !== "string" || !subprotocolRegex.test(protocol) || protocolSet.has(protocol)) {
            throw new SyntaxError(
              "An invalid or duplicated subprotocol was specified"
            );
          }
          protocolSet.add(protocol);
        }
        opts.headers["Sec-WebSocket-Protocol"] = protocols.join(",");
      }
      if (opts.origin) {
        if (opts.protocolVersion < 13) {
          opts.headers["Sec-WebSocket-Origin"] = opts.origin;
        } else {
          opts.headers.Origin = opts.origin;
        }
      }
      if (parsedUrl.username || parsedUrl.password) {
        opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
      }
      if (isIpcUrl) {
        const parts = opts.path.split(":");
        opts.socketPath = parts[0];
        opts.path = parts[1];
      }
      let req;
      if (opts.followRedirects) {
        if (websocket._redirects === 0) {
          websocket._originalIpc = isIpcUrl;
          websocket._originalSecure = isSecure;
          websocket._originalHostOrSocketPath = isIpcUrl ? opts.socketPath : parsedUrl.host;
          const headers = options && options.headers;
          options = { ...options, headers: {} };
          if (headers) {
            for (const [key2, value] of Object.entries(headers)) {
              options.headers[key2.toLowerCase()] = value;
            }
          }
        } else if (websocket.listenerCount("redirect") === 0) {
          const isSameHost = isIpcUrl ? websocket._originalIpc ? opts.socketPath === websocket._originalHostOrSocketPath : false : websocket._originalIpc ? false : parsedUrl.host === websocket._originalHostOrSocketPath;
          if (!isSameHost || websocket._originalSecure && !isSecure) {
            delete opts.headers.authorization;
            delete opts.headers.cookie;
            if (!isSameHost) delete opts.headers.host;
            opts.auth = void 0;
          }
        }
        if (opts.auth && !options.headers.authorization) {
          options.headers.authorization = "Basic " + Buffer.from(opts.auth).toString("base64");
        }
        req = websocket._req = request(opts);
        if (websocket._redirects) {
          websocket.emit("redirect", websocket.url, req);
        }
      } else {
        req = websocket._req = request(opts);
      }
      if (opts.timeout) {
        req.on("timeout", () => {
          abortHandshake(websocket, req, "Opening handshake has timed out");
        });
      }
      req.on("error", (err) => {
        if (req === null || req[kAborted]) return;
        req = websocket._req = null;
        emitErrorAndClose(websocket, err);
      });
      req.on("response", (res) => {
        const location = res.headers.location;
        const statusCode = res.statusCode;
        if (location && opts.followRedirects && statusCode >= 300 && statusCode < 400) {
          if (++websocket._redirects > opts.maxRedirects) {
            abortHandshake(websocket, req, "Maximum redirects exceeded");
            return;
          }
          req.abort();
          let addr;
          try {
            addr = new URL2(location, address);
          } catch (e5) {
            const err = new SyntaxError(`Invalid URL: ${location}`);
            emitErrorAndClose(websocket, err);
            return;
          }
          initAsClient(websocket, addr, protocols, options);
        } else if (!websocket.emit("unexpected-response", req, res)) {
          abortHandshake(
            websocket,
            req,
            `Unexpected server response: ${res.statusCode}`
          );
        }
      });
      req.on("upgrade", (res, socket, head) => {
        websocket.emit("upgrade", res);
        if (websocket.readyState !== WebSocket2.CONNECTING) return;
        req = websocket._req = null;
        const upgrade = res.headers.upgrade;
        if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") {
          abortHandshake(websocket, socket, "Invalid Upgrade header");
          return;
        }
        const digest = createHash("sha1").update(key + GUID).digest("base64");
        if (res.headers["sec-websocket-accept"] !== digest) {
          abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Accept header");
          return;
        }
        const serverProt = res.headers["sec-websocket-protocol"];
        let protError;
        if (serverProt !== void 0) {
          if (!protocolSet.size) {
            protError = "Server sent a subprotocol but none was requested";
          } else if (!protocolSet.has(serverProt)) {
            protError = "Server sent an invalid subprotocol";
          }
        } else if (protocolSet.size) {
          protError = "Server sent no subprotocol";
        }
        if (protError) {
          abortHandshake(websocket, socket, protError);
          return;
        }
        if (serverProt) websocket._protocol = serverProt;
        const secWebSocketExtensions = res.headers["sec-websocket-extensions"];
        if (secWebSocketExtensions !== void 0) {
          if (!perMessageDeflate) {
            const message = "Server sent a Sec-WebSocket-Extensions header but no extension was requested";
            abortHandshake(websocket, socket, message);
            return;
          }
          let extensions;
          try {
            extensions = parse(secWebSocketExtensions);
          } catch (err) {
            const message = "Invalid Sec-WebSocket-Extensions header";
            abortHandshake(websocket, socket, message);
            return;
          }
          const extensionNames = Object.keys(extensions);
          if (extensionNames.length !== 1 || extensionNames[0] !== PerMessageDeflate.extensionName) {
            const message = "Server indicated an extension that was not requested";
            abortHandshake(websocket, socket, message);
            return;
          }
          try {
            perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]);
          } catch (err) {
            const message = "Invalid Sec-WebSocket-Extensions header";
            abortHandshake(websocket, socket, message);
            return;
          }
          websocket._extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
        }
        websocket.setSocket(socket, head, {
          allowSynchronousEvents: opts.allowSynchronousEvents,
          generateMask: opts.generateMask,
          maxPayload: opts.maxPayload,
          skipUTF8Validation: opts.skipUTF8Validation
        });
      });
      if (opts.finishRequest) {
        opts.finishRequest(req, websocket);
      } else {
        req.end();
      }
    }
    function emitErrorAndClose(websocket, err) {
      websocket._readyState = WebSocket2.CLOSING;
      websocket._errorEmitted = true;
      websocket.emit("error", err);
      websocket.emitClose();
    }
    function netConnect(options) {
      options.path = options.socketPath;
      return net.connect(options);
    }
    function tlsConnect(options) {
      options.path = void 0;
      if (!options.servername && options.servername !== "") {
        options.servername = net.isIP(options.host) ? "" : options.host;
      }
      return tls.connect(options);
    }
    function abortHandshake(websocket, stream, message) {
      websocket._readyState = WebSocket2.CLOSING;
      const err = new Error(message);
      Error.captureStackTrace(err, abortHandshake);
      if (stream.setHeader) {
        stream[kAborted] = true;
        stream.abort();
        if (stream.socket && !stream.socket.destroyed) {
          stream.socket.destroy();
        }
        process.nextTick(emitErrorAndClose, websocket, err);
      } else {
        stream.destroy(err);
        stream.once("error", websocket.emit.bind(websocket, "error"));
        stream.once("close", websocket.emitClose.bind(websocket));
      }
    }
    function sendAfterClose(websocket, data2, cb) {
      if (data2) {
        const length = isBlob(data2) ? data2.size : toBuffer(data2).length;
        if (websocket._socket) websocket._sender._bufferedBytes += length;
        else websocket._bufferedAmount += length;
      }
      if (cb) {
        const err = new Error(
          `WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`
        );
        process.nextTick(cb, err);
      }
    }
    function receiverOnConclude(code, reason) {
      const websocket = this[kWebSocket];
      websocket._closeFrameReceived = true;
      websocket._closeMessage = reason;
      websocket._closeCode = code;
      if (websocket._socket[kWebSocket] === void 0) return;
      websocket._socket.removeListener("data", socketOnData);
      process.nextTick(resume, websocket._socket);
      if (code === 1005) websocket.close();
      else websocket.close(code, reason);
    }
    function receiverOnDrain() {
      const websocket = this[kWebSocket];
      if (!websocket.isPaused) websocket._socket.resume();
    }
    function receiverOnError(err) {
      const websocket = this[kWebSocket];
      if (websocket._socket[kWebSocket] !== void 0) {
        websocket._socket.removeListener("data", socketOnData);
        process.nextTick(resume, websocket._socket);
        websocket.close(err[kStatusCode]);
      }
      if (!websocket._errorEmitted) {
        websocket._errorEmitted = true;
        websocket.emit("error", err);
      }
    }
    function receiverOnFinish() {
      this[kWebSocket].emitClose();
    }
    function receiverOnMessage(data2, isBinary) {
      this[kWebSocket].emit("message", data2, isBinary);
    }
    function receiverOnPing(data2) {
      const websocket = this[kWebSocket];
      if (websocket._autoPong) websocket.pong(data2, !this._isServer, NOOP);
      websocket.emit("ping", data2);
    }
    function receiverOnPong(data2) {
      this[kWebSocket].emit("pong", data2);
    }
    function resume(stream) {
      stream.resume();
    }
    function senderOnError(err) {
      const websocket = this[kWebSocket];
      if (websocket.readyState === WebSocket2.CLOSED) return;
      if (websocket.readyState === WebSocket2.OPEN) {
        websocket._readyState = WebSocket2.CLOSING;
        setCloseTimer(websocket);
      }
      this._socket.end();
      if (!websocket._errorEmitted) {
        websocket._errorEmitted = true;
        websocket.emit("error", err);
      }
    }
    function setCloseTimer(websocket) {
      websocket._closeTimer = setTimeout(
        websocket._socket.destroy.bind(websocket._socket),
        websocket._closeTimeout
      );
    }
    function socketOnClose() {
      const websocket = this[kWebSocket];
      this.removeListener("close", socketOnClose);
      this.removeListener("data", socketOnData);
      this.removeListener("end", socketOnEnd);
      websocket._readyState = WebSocket2.CLOSING;
      if (!this._readableState.endEmitted && !websocket._closeFrameReceived && !websocket._receiver._writableState.errorEmitted && this._readableState.length !== 0) {
        const chunk = this.read(this._readableState.length);
        websocket._receiver.write(chunk);
      }
      websocket._receiver.end();
      this[kWebSocket] = void 0;
      clearTimeout(websocket._closeTimer);
      if (websocket._receiver._writableState.finished || websocket._receiver._writableState.errorEmitted) {
        websocket.emitClose();
      } else {
        websocket._receiver.on("error", receiverOnFinish);
        websocket._receiver.on("finish", receiverOnFinish);
      }
    }
    function socketOnData(chunk) {
      if (!this[kWebSocket]._receiver.write(chunk)) {
        this.pause();
      }
    }
    function socketOnEnd() {
      const websocket = this[kWebSocket];
      websocket._readyState = WebSocket2.CLOSING;
      websocket._receiver.end();
      this.end();
    }
    function socketOnError() {
      const websocket = this[kWebSocket];
      this.removeListener("error", socketOnError);
      this.on("error", NOOP);
      if (websocket) {
        websocket._readyState = WebSocket2.CLOSING;
        this.destroy();
      }
    }
  }
});

// ../../node_modules/ws/lib/stream.js
var require_stream4 = __commonJS({
  "../../node_modules/ws/lib/stream.js"(exports2, module2) {
    "use strict";
    var WebSocket2 = require_websocket2();
    var { Duplex } = require("stream");
    function emitClose(stream) {
      stream.emit("close");
    }
    function duplexOnEnd() {
      if (!this.destroyed && this._writableState.finished) {
        this.destroy();
      }
    }
    function duplexOnError(err) {
      this.removeListener("error", duplexOnError);
      this.destroy();
      if (this.listenerCount("error") === 0) {
        this.emit("error", err);
      }
    }
    function createWebSocketStream(ws, options) {
      let terminateOnDestroy = true;
      const duplex = new Duplex({
        ...options,
        autoDestroy: false,
        emitClose: false,
        objectMode: false,
        writableObjectMode: false
      });
      ws.on("message", function message(msg, isBinary) {
        const data2 = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
        if (!duplex.push(data2)) ws.pause();
      });
      ws.once("error", function error3(err) {
        if (duplex.destroyed) return;
        terminateOnDestroy = false;
        duplex.destroy(err);
      });
      ws.once("close", function close() {
        if (duplex.destroyed) return;
        duplex.push(null);
      });
      duplex._destroy = function(err, callback) {
        if (ws.readyState === ws.CLOSED) {
          callback(err);
          process.nextTick(emitClose, duplex);
          return;
        }
        let called = false;
        ws.once("error", function error3(err2) {
          called = true;
          callback(err2);
        });
        ws.once("close", function close() {
          if (!called) callback(err);
          process.nextTick(emitClose, duplex);
        });
        if (terminateOnDestroy) ws.terminate();
      };
      duplex._final = function(callback) {
        if (ws.readyState === ws.CONNECTING) {
          ws.once("open", function open() {
            duplex._final(callback);
          });
          return;
        }
        if (ws._socket === null) return;
        if (ws._socket._writableState.finished) {
          callback();
          if (duplex._readableState.endEmitted) duplex.destroy();
        } else {
          ws._socket.once("finish", function finish() {
            callback();
          });
          ws.close();
        }
      };
      duplex._read = function() {
        if (ws.isPaused) ws.resume();
      };
      duplex._write = function(chunk, encoding, callback) {
        if (ws.readyState === ws.CONNECTING) {
          ws.once("open", function open() {
            duplex._write(chunk, encoding, callback);
          });
          return;
        }
        ws.send(chunk, callback);
      };
      duplex.on("end", duplexOnEnd);
      duplex.on("error", duplexOnError);
      return duplex;
    }
    module2.exports = createWebSocketStream;
  }
});

// ../../node_modules/ws/lib/subprotocol.js
var require_subprotocol = __commonJS({
  "../../node_modules/ws/lib/subprotocol.js"(exports2, module2) {
    "use strict";
    var { tokenChars } = require_validation2();
    function parse(header) {
      const protocols = /* @__PURE__ */ new Set();
      let start = -1;
      let end = -1;
      let i5 = 0;
      for (i5; i5 < header.length; i5++) {
        const code = header.charCodeAt(i5);
        if (end === -1 && tokenChars[code] === 1) {
          if (start === -1) start = i5;
        } else if (i5 !== 0 && (code === 32 || code === 9)) {
          if (end === -1 && start !== -1) end = i5;
        } else if (code === 44) {
          if (start === -1) {
            throw new SyntaxError(`Unexpected character at index ${i5}`);
          }
          if (end === -1) end = i5;
          const protocol2 = header.slice(start, end);
          if (protocols.has(protocol2)) {
            throw new SyntaxError(`The "${protocol2}" subprotocol is duplicated`);
          }
          protocols.add(protocol2);
          start = end = -1;
        } else {
          throw new SyntaxError(`Unexpected character at index ${i5}`);
        }
      }
      if (start === -1 || end !== -1) {
        throw new SyntaxError("Unexpected end of input");
      }
      const protocol = header.slice(start, i5);
      if (protocols.has(protocol)) {
        throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
      }
      protocols.add(protocol);
      return protocols;
    }
    module2.exports = { parse };
  }
});

// ../../node_modules/ws/lib/websocket-server.js
var require_websocket_server2 = __commonJS({
  "../../node_modules/ws/lib/websocket-server.js"(exports2, module2) {
    "use strict";
    var EventEmitter = require("events");
    var http = require("http");
    var { Duplex } = require("stream");
    var { createHash } = require("crypto");
    var extension = require_extension2();
    var PerMessageDeflate = require_permessage_deflate2();
    var subprotocol = require_subprotocol();
    var WebSocket2 = require_websocket2();
    var { CLOSE_TIMEOUT, GUID, kWebSocket } = require_constants3();
    var keyRegex = /^[+/0-9A-Za-z]{22}==$/;
    var RUNNING = 0;
    var CLOSING = 1;
    var CLOSED = 2;
    var WebSocketServer = class extends EventEmitter {
      /**
       * Create a `WebSocketServer` instance.
       *
       * @param {Object} options Configuration options
       * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
       *     any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
       *     multiple times in the same tick
       * @param {Boolean} [options.autoPong=true] Specifies whether or not to
       *     automatically send a pong in response to a ping
       * @param {Number} [options.backlog=511] The maximum length of the queue of
       *     pending connections
       * @param {Boolean} [options.clientTracking=true] Specifies whether or not to
       *     track clients
       * @param {Number} [options.closeTimeout=30000] Duration in milliseconds to
       *     wait for the closing handshake to finish after `websocket.close()` is
       *     called
       * @param {Function} [options.handleProtocols] A hook to handle protocols
       * @param {String} [options.host] The hostname where to bind the server
       * @param {Number} [options.maxPayload=104857600] The maximum allowed message
       *     size
       * @param {Boolean} [options.noServer=false] Enable no server mode
       * @param {String} [options.path] Accept only connections matching this path
       * @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable
       *     permessage-deflate
       * @param {Number} [options.port] The port where to bind the server
       * @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S
       *     server to use
       * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
       *     not to skip UTF-8 validation for text and close messages
       * @param {Function} [options.verifyClient] A hook to reject connections
       * @param {Function} [options.WebSocket=WebSocket] Specifies the `WebSocket`
       *     class to use. It must be the `WebSocket` class or class that extends it
       * @param {Function} [callback] A listener for the `listening` event
       */
      constructor(options, callback) {
        super();
        options = {
          allowSynchronousEvents: true,
          autoPong: true,
          maxPayload: 100 * 1024 * 1024,
          skipUTF8Validation: false,
          perMessageDeflate: false,
          handleProtocols: null,
          clientTracking: true,
          closeTimeout: CLOSE_TIMEOUT,
          verifyClient: null,
          noServer: false,
          backlog: null,
          // use default (511 as implemented in net.js)
          server: null,
          host: null,
          path: null,
          port: null,
          WebSocket: WebSocket2,
          ...options
        };
        if (options.port == null && !options.server && !options.noServer || options.port != null && (options.server || options.noServer) || options.server && options.noServer) {
          throw new TypeError(
            'One and only one of the "port", "server", or "noServer" options must be specified'
          );
        }
        if (options.port != null) {
          this._server = http.createServer((req, res) => {
            const body = http.STATUS_CODES[426];
            res.writeHead(426, {
              "Content-Length": body.length,
              "Content-Type": "text/plain"
            });
            res.end(body);
          });
          this._server.listen(
            options.port,
            options.host,
            options.backlog,
            callback
          );
        } else if (options.server) {
          this._server = options.server;
        }
        if (this._server) {
          const emitConnection = this.emit.bind(this, "connection");
          this._removeListeners = addListeners(this._server, {
            listening: this.emit.bind(this, "listening"),
            error: this.emit.bind(this, "error"),
            upgrade: (req, socket, head) => {
              this.handleUpgrade(req, socket, head, emitConnection);
            }
          });
        }
        if (options.perMessageDeflate === true) options.perMessageDeflate = {};
        if (options.clientTracking) {
          this.clients = /* @__PURE__ */ new Set();
          this._shouldEmitClose = false;
        }
        this.options = options;
        this._state = RUNNING;
      }
      /**
       * Returns the bound address, the address family name, and port of the server
       * as reported by the operating system if listening on an IP socket.
       * If the server is listening on a pipe or UNIX domain socket, the name is
       * returned as a string.
       *
       * @return {(Object|String|null)} The address of the server
       * @public
       */
      address() {
        if (this.options.noServer) {
          throw new Error('The server is operating in "noServer" mode');
        }
        if (!this._server) return null;
        return this._server.address();
      }
      /**
       * Stop the server from accepting new connections and emit the `'close'` event
       * when all existing connections are closed.
       *
       * @param {Function} [cb] A one-time listener for the `'close'` event
       * @public
       */
      close(cb) {
        if (this._state === CLOSED) {
          if (cb) {
            this.once("close", () => {
              cb(new Error("The server is not running"));
            });
          }
          process.nextTick(emitClose, this);
          return;
        }
        if (cb) this.once("close", cb);
        if (this._state === CLOSING) return;
        this._state = CLOSING;
        if (this.options.noServer || this.options.server) {
          if (this._server) {
            this._removeListeners();
            this._removeListeners = this._server = null;
          }
          if (this.clients) {
            if (!this.clients.size) {
              process.nextTick(emitClose, this);
            } else {
              this._shouldEmitClose = true;
            }
          } else {
            process.nextTick(emitClose, this);
          }
        } else {
          const server = this._server;
          this._removeListeners();
          this._removeListeners = this._server = null;
          server.close(() => {
            emitClose(this);
          });
        }
      }
      /**
       * See if a given request should be handled by this server instance.
       *
       * @param {http.IncomingMessage} req Request object to inspect
       * @return {Boolean} `true` if the request is valid, else `false`
       * @public
       */
      shouldHandle(req) {
        if (this.options.path) {
          const index = req.url.indexOf("?");
          const pathname = index !== -1 ? req.url.slice(0, index) : req.url;
          if (pathname !== this.options.path) return false;
        }
        return true;
      }
      /**
       * Handle a HTTP Upgrade request.
       *
       * @param {http.IncomingMessage} req The request object
       * @param {Duplex} socket The network socket between the server and client
       * @param {Buffer} head The first packet of the upgraded stream
       * @param {Function} cb Callback
       * @public
       */
      handleUpgrade(req, socket, head, cb) {
        socket.on("error", socketOnError);
        const key = req.headers["sec-websocket-key"];
        const upgrade = req.headers.upgrade;
        const version = +req.headers["sec-websocket-version"];
        if (req.method !== "GET") {
          const message = "Invalid HTTP method";
          abortHandshakeOrEmitwsClientError(this, req, socket, 405, message);
          return;
        }
        if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") {
          const message = "Invalid Upgrade header";
          abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
          return;
        }
        if (key === void 0 || !keyRegex.test(key)) {
          const message = "Missing or invalid Sec-WebSocket-Key header";
          abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
          return;
        }
        if (version !== 13 && version !== 8) {
          const message = "Missing or invalid Sec-WebSocket-Version header";
          abortHandshakeOrEmitwsClientError(this, req, socket, 400, message, {
            "Sec-WebSocket-Version": "13, 8"
          });
          return;
        }
        if (!this.shouldHandle(req)) {
          abortHandshake(socket, 400);
          return;
        }
        const secWebSocketProtocol = req.headers["sec-websocket-protocol"];
        let protocols = /* @__PURE__ */ new Set();
        if (secWebSocketProtocol !== void 0) {
          try {
            protocols = subprotocol.parse(secWebSocketProtocol);
          } catch (err) {
            const message = "Invalid Sec-WebSocket-Protocol header";
            abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
            return;
          }
        }
        const secWebSocketExtensions = req.headers["sec-websocket-extensions"];
        const extensions = {};
        if (this.options.perMessageDeflate && secWebSocketExtensions !== void 0) {
          const perMessageDeflate = new PerMessageDeflate({
            ...this.options.perMessageDeflate,
            isServer: true,
            maxPayload: this.options.maxPayload
          });
          try {
            const offers = extension.parse(secWebSocketExtensions);
            if (offers[PerMessageDeflate.extensionName]) {
              perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]);
              extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
            }
          } catch (err) {
            const message = "Invalid or unacceptable Sec-WebSocket-Extensions header";
            abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
            return;
          }
        }
        if (this.options.verifyClient) {
          const info2 = {
            origin: req.headers[`${version === 8 ? "sec-websocket-origin" : "origin"}`],
            secure: !!(req.socket.authorized || req.socket.encrypted),
            req
          };
          if (this.options.verifyClient.length === 2) {
            this.options.verifyClient(info2, (verified, code, message, headers) => {
              if (!verified) {
                return abortHandshake(socket, code || 401, message, headers);
              }
              this.completeUpgrade(
                extensions,
                key,
                protocols,
                req,
                socket,
                head,
                cb
              );
            });
            return;
          }
          if (!this.options.verifyClient(info2)) return abortHandshake(socket, 401);
        }
        this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
      }
      /**
       * Upgrade the connection to WebSocket.
       *
       * @param {Object} extensions The accepted extensions
       * @param {String} key The value of the `Sec-WebSocket-Key` header
       * @param {Set} protocols The subprotocols
       * @param {http.IncomingMessage} req The request object
       * @param {Duplex} socket The network socket between the server and client
       * @param {Buffer} head The first packet of the upgraded stream
       * @param {Function} cb Callback
       * @throws {Error} If called more than once with the same socket
       * @private
       */
      completeUpgrade(extensions, key, protocols, req, socket, head, cb) {
        if (!socket.readable || !socket.writable) return socket.destroy();
        if (socket[kWebSocket]) {
          throw new Error(
            "server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration"
          );
        }
        if (this._state > RUNNING) return abortHandshake(socket, 503);
        const digest = createHash("sha1").update(key + GUID).digest("base64");
        const headers = [
          "HTTP/1.1 101 Switching Protocols",
          "Upgrade: websocket",
          "Connection: Upgrade",
          `Sec-WebSocket-Accept: ${digest}`
        ];
        const ws = new this.options.WebSocket(null, void 0, this.options);
        if (protocols.size) {
          const protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value;
          if (protocol) {
            headers.push(`Sec-WebSocket-Protocol: ${protocol}`);
            ws._protocol = protocol;
          }
        }
        if (extensions[PerMessageDeflate.extensionName]) {
          const params = extensions[PerMessageDeflate.extensionName].params;
          const value = extension.format({
            [PerMessageDeflate.extensionName]: [params]
          });
          headers.push(`Sec-WebSocket-Extensions: ${value}`);
          ws._extensions = extensions;
        }
        this.emit("headers", headers, req);
        socket.write(headers.concat("\r\n").join("\r\n"));
        socket.removeListener("error", socketOnError);
        ws.setSocket(socket, head, {
          allowSynchronousEvents: this.options.allowSynchronousEvents,
          maxPayload: this.options.maxPayload,
          skipUTF8Validation: this.options.skipUTF8Validation
        });
        if (this.clients) {
          this.clients.add(ws);
          ws.on("close", () => {
            this.clients.delete(ws);
            if (this._shouldEmitClose && !this.clients.size) {
              process.nextTick(emitClose, this);
            }
          });
        }
        cb(ws, req);
      }
    };
    module2.exports = WebSocketServer;
    function addListeners(server, map2) {
      for (const event of Object.keys(map2)) server.on(event, map2[event]);
      return function removeListeners() {
        for (const event of Object.keys(map2)) {
          server.removeListener(event, map2[event]);
        }
      };
    }
    function emitClose(server) {
      server._state = CLOSED;
      server.emit("close");
    }
    function socketOnError() {
      this.destroy();
    }
    function abortHandshake(socket, code, message, headers) {
      message = message || http.STATUS_CODES[code];
      headers = {
        Connection: "close",
        "Content-Type": "text/html",
        "Content-Length": Buffer.byteLength(message),
        ...headers
      };
      socket.once("finish", socket.destroy);
      socket.end(
        `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r
` + Object.keys(headers).map((h5) => `${h5}: ${headers[h5]}`).join("\r\n") + "\r\n\r\n" + message
      );
    }
    function abortHandshakeOrEmitwsClientError(server, req, socket, code, message, headers) {
      if (server.listenerCount("wsClientError")) {
        const err = new Error(message);
        Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
        server.emit("wsClientError", err, socket, req);
      } else {
        abortHandshake(socket, code, message, headers);
      }
    }
  }
});

// ../../node_modules/ws/index.js
var require_ws3 = __commonJS({
  "../../node_modules/ws/index.js"(exports2, module2) {
    "use strict";
    var createWebSocketStream = require_stream4();
    var extension = require_extension2();
    var PerMessageDeflate = require_permessage_deflate2();
    var Receiver = require_receiver2();
    var Sender = require_sender2();
    var subprotocol = require_subprotocol();
    var WebSocket2 = require_websocket2();
    var WebSocketServer = require_websocket_server2();
    WebSocket2.createWebSocketStream = createWebSocketStream;
    WebSocket2.extension = extension;
    WebSocket2.PerMessageDeflate = PerMessageDeflate;
    WebSocket2.Receiver = Receiver;
    WebSocket2.Sender = Sender;
    WebSocket2.Server = WebSocketServer;
    WebSocket2.subprotocol = subprotocol;
    WebSocket2.WebSocket = WebSocket2;
    WebSocket2.WebSocketServer = WebSocketServer;
    module2.exports = WebSocket2;
  }
});

// ../../node_modules/isarray/index.js
var require_isarray = __commonJS({
  "../../node_modules/isarray/index.js"(exports2, module2) {
    var toString = {}.toString;
    module2.exports = Array.isArray || function(arr) {
      return toString.call(arr) == "[object Array]";
    };
  }
});

// ../../node_modules/readable-stream/lib/internal/streams/stream.js
var require_stream5 = __commonJS({
  "../../node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) {
    module2.exports = require("stream");
  }
});

// ../../node_modules/readable-stream/node_modules/safe-buffer/index.js
var require_safe_buffer2 = __commonJS({
  "../../node_modules/readable-stream/node_modules/safe-buffer/index.js"(exports2, module2) {
    var buffer = require("buffer");
    var Buffer2 = buffer.Buffer;
    function copyProps(src, dst) {
      for (var key in src) {
        dst[key] = src[key];
      }
    }
    if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) {
      module2.exports = buffer;
    } else {
      copyProps(buffer, exports2);
      exports2.Buffer = SafeBuffer;
    }
    function SafeBuffer(arg, encodingOrOffset, length) {
      return Buffer2(arg, encodingOrOffset, length);
    }
    copyProps(Buffer2, SafeBuffer);
    SafeBuffer.from = function(arg, encodingOrOffset, length) {
      if (typeof arg === "number") {
        throw new TypeError("Argument must not be a number");
      }
      return Buffer2(arg, encodingOrOffset, length);
    };
    SafeBuffer.alloc = function(size, fill, encoding) {
      if (typeof size !== "number") {
        throw new TypeError("Argument must be a number");
      }
      var buf = Buffer2(size);
      if (fill !== void 0) {
        if (typeof encoding === "string") {
          buf.fill(fill, encoding);
        } else {
          buf.fill(fill);
        }
      } else {
        buf.fill(0);
      }
      return buf;
    };
    SafeBuffer.allocUnsafe = function(size) {
      if (typeof size !== "number") {
        throw new TypeError("Argument must be a number");
      }
      return Buffer2(size);
    };
    SafeBuffer.allocUnsafeSlow = function(size) {
      if (typeof size !== "number") {
        throw new TypeError("Argument must be a number");
      }
      return buffer.SlowBuffer(size);
    };
  }
});

// ../../node_modules/core-util-is/lib/util.js
var require_util = __commonJS({
  "../../node_modules/core-util-is/lib/util.js"(exports2) {
    function isArray(arg) {
      if (Array.isArray) {
        return Array.isArray(arg);
      }
      return objectToString(arg) === "[object Array]";
    }
    exports2.isArray = isArray;
    function isBoolean(arg) {
      return typeof arg === "boolean";
    }
    exports2.isBoolean = isBoolean;
    function isNull(arg) {
      return arg === null;
    }
    exports2.isNull = isNull;
    function isNullOrUndefined(arg) {
      return arg == null;
    }
    exports2.isNullOrUndefined = isNullOrUndefined;
    function isNumber(arg) {
      return typeof arg === "number";
    }
    exports2.isNumber = isNumber;
    function isString(arg) {
      return typeof arg === "string";
    }
    exports2.isString = isString;
    function isSymbol(arg) {
      return typeof arg === "symbol";
    }
    exports2.isSymbol = isSymbol;
    function isUndefined(arg) {
      return arg === void 0;
    }
    exports2.isUndefined = isUndefined;
    function isRegExp(re) {
      return objectToString(re) === "[object RegExp]";
    }
    exports2.isRegExp = isRegExp;
    function isObject(arg) {
      return typeof arg === "object" && arg !== null;
    }
    exports2.isObject = isObject;
    function isDate(d5) {
      return objectToString(d5) === "[object Date]";
    }
    exports2.isDate = isDate;
    function isError(e5) {
      return objectToString(e5) === "[object Error]" || e5 instanceof Error;
    }
    exports2.isError = isError;
    function isFunction(arg) {
      return typeof arg === "function";
    }
    exports2.isFunction = isFunction;
    function isPrimitive(arg) {
      return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol
      typeof arg === "undefined";
    }
    exports2.isPrimitive = isPrimitive;
    exports2.isBuffer = require("buffer").Buffer.isBuffer;
    function objectToString(o2) {
      return Object.prototype.toString.call(o2);
    }
  }
});

// ../../node_modules/readable-stream/lib/internal/streams/BufferList.js
var require_BufferList2 = __commonJS({
  "../../node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports2, module2) {
    "use strict";
    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }
    var Buffer2 = require_safe_buffer2().Buffer;
    var util = require("util");
    function copyBuffer(src, target, offset) {
      src.copy(target, offset);
    }
    module2.exports = (function() {
      function BufferList() {
        _classCallCheck(this, BufferList);
        this.head = null;
        this.tail = null;
        this.length = 0;
      }
      BufferList.prototype.push = function push(v) {
        var entry = { data: v, next: null };
        if (this.length > 0) this.tail.next = entry;
        else this.head = entry;
        this.tail = entry;
        ++this.length;
      };
      BufferList.prototype.unshift = function unshift(v) {
        var entry = { data: v, next: this.head };
        if (this.length === 0) this.tail = entry;
        this.head = entry;
        ++this.length;
      };
      BufferList.prototype.shift = function shift() {
        if (this.length === 0) return;
        var ret = this.head.data;
        if (this.length === 1) this.head = this.tail = null;
        else this.head = this.head.next;
        --this.length;
        return ret;
      };
      BufferList.prototype.clear = function clear() {
        this.head = this.tail = null;
        this.length = 0;
      };
      BufferList.prototype.join = function join(s) {
        if (this.length === 0) return "";
        var p2 = this.head;
        var ret = "" + p2.data;
        while (p2 = p2.next) {
          ret += s + p2.data;
        }
        return ret;
      };
      BufferList.prototype.concat = function concat(n2) {
        if (this.length === 0) return Buffer2.alloc(0);
        var ret = Buffer2.allocUnsafe(n2 >>> 0);
        var p2 = this.head;
        var i5 = 0;
        while (p2) {
          copyBuffer(p2.data, ret, i5);
          i5 += p2.data.length;
          p2 = p2.next;
        }
        return ret;
      };
      return BufferList;
    })();
    if (util && util.inspect && util.inspect.custom) {
      module2.exports.prototype[util.inspect.custom] = function() {
        var obj = util.inspect({ length: this.length });
        return this.constructor.name + " " + obj;
      };
    }
  }
});

// ../../node_modules/readable-stream/lib/internal/streams/destroy.js
var require_destroy3 = __commonJS({
  "../../node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) {
    "use strict";
    var pna = require_process_nextick_args();
    function destroy(err, cb) {
      var _this = this;
      var readableDestroyed = this._readableState && this._readableState.destroyed;
      var writableDestroyed = this._writableState && this._writableState.destroyed;
      if (readableDestroyed || writableDestroyed) {
        if (cb) {
          cb(err);
        } else if (err) {
          if (!this._writableState) {
            pna.nextTick(emitErrorNT, this, err);
          } else if (!this._writableState.errorEmitted) {
            this._writableState.errorEmitted = true;
            pna.nextTick(emitErrorNT, this, err);
          }
        }
        return this;
      }
      if (this._readableState) {
        this._readableState.destroyed = true;
      }
      if (this._writableState) {
        this._writableState.destroyed = true;
      }
      this._destroy(err || null, function(err2) {
        if (!cb && err2) {
          if (!_this._writableState) {
            pna.nextTick(emitErrorNT, _this, err2);
          } else if (!_this._writableState.errorEmitted) {
            _this._writableState.errorEmitted = true;
            pna.nextTick(emitErrorNT, _this, err2);
          }
        } else if (cb) {
          cb(err2);
        }
      });
      return this;
    }
    function undestroy() {
      if (this._readableState) {
        this._readableState.destroyed = false;
        this._readableState.reading = false;
        this._readableState.ended = false;
        this._readableState.endEmitted = false;
      }
      if (this._writableState) {
        this._writableState.destroyed = false;
        this._writableState.ended = false;
        this._writableState.ending = false;
        this._writableState.finalCalled = false;
        this._writableState.prefinished = false;
        this._writableState.finished = false;
        this._writableState.errorEmitted = false;
      }
    }
    function emitErrorNT(self2, err) {
      self2.emit("error", err);
    }
    module2.exports = {
      destroy,
      undestroy
    };
  }
});

// ../../node_modules/readable-stream/lib/_stream_writable.js
var require_stream_writable3 = __commonJS({
  "../../node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) {
    "use strict";
    var pna = require_process_nextick_args();
    module2.exports = Writable;
    function CorkedRequest(state2) {
      var _this = this;
      this.next = null;
      this.entry = null;
      this.finish = function() {
        onCorkedFinish(_this, state2);
      };
    }
    var asyncWrite = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
    var Duplex;
    Writable.WritableState = WritableState;
    var util = Object.create(require_util());
    util.inherits = require_inherits();
    var internalUtil = {
      deprecate: require_node()
    };
    var Stream = require_stream5();
    var Buffer2 = require_safe_buffer2().Buffer;
    var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
    };
    function _uint8ArrayToBuffer(chunk) {
      return Buffer2.from(chunk);
    }
    function _isUint8Array(obj) {
      return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
    }
    var destroyImpl = require_destroy3();
    util.inherits(Writable, Stream);
    function nop() {
    }
    function WritableState(options, stream) {
      Duplex = Duplex || require_stream_duplex3();
      options = options || {};
      var isDuplex = stream instanceof Duplex;
      this.objectMode = !!options.objectMode;
      if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
      var hwm = options.highWaterMark;
      var writableHwm = options.writableHighWaterMark;
      var defaultHwm = this.objectMode ? 16 : 16 * 1024;
      if (hwm || hwm === 0) this.highWaterMark = hwm;
      else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;
      else this.highWaterMark = defaultHwm;
      this.highWaterMark = Math.floor(this.highWaterMark);
      this.finalCalled = false;
      this.needDrain = false;
      this.ending = false;
      this.ended = false;
      this.finished = false;
      this.destroyed = false;
      var noDecode = options.decodeStrings === false;
      this.decodeStrings = !noDecode;
      this.defaultEncoding = options.defaultEncoding || "utf8";
      this.length = 0;
      this.writing = false;
      this.corked = 0;
      this.sync = true;
      this.bufferProcessing = false;
      this.onwrite = function(er) {
        onwrite(stream, er);
      };
      this.writecb = null;
      this.writelen = 0;
      this.bufferedRequest = null;
      this.lastBufferedRequest = null;
      this.pendingcb = 0;
      this.prefinished = false;
      this.errorEmitted = false;
      this.bufferedRequestCount = 0;
      this.corkedRequestsFree = new CorkedRequest(this);
    }
    WritableState.prototype.getBuffer = function getBuffer() {
      var current = this.bufferedRequest;
      var out = [];
      while (current) {
        out.push(current);
        current = current.next;
      }
      return out;
    };
    (function() {
      try {
        Object.defineProperty(WritableState.prototype, "buffer", {
          get: internalUtil.deprecate(function() {
            return this.getBuffer();
          }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
        });
      } catch (_) {
      }
    })();
    var realHasInstance;
    if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") {
      realHasInstance = Function.prototype[Symbol.hasInstance];
      Object.defineProperty(Writable, Symbol.hasInstance, {
        value: function(object) {
          if (realHasInstance.call(this, object)) return true;
          if (this !== Writable) return false;
          return object && object._writableState instanceof WritableState;
        }
      });
    } else {
      realHasInstance = function(object) {
        return object instanceof this;
      };
    }
    function Writable(options) {
      Duplex = Duplex || require_stream_duplex3();
      if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
        return new Writable(options);
      }
      this._writableState = new WritableState(options, this);
      this.writable = true;
      if (options) {
        if (typeof options.write === "function") this._write = options.write;
        if (typeof options.writev === "function") this._writev = options.writev;
        if (typeof options.destroy === "function") this._destroy = options.destroy;
        if (typeof options.final === "function") this._final = options.final;
      }
      Stream.call(this);
    }
    Writable.prototype.pipe = function() {
      this.emit("error", new Error("Cannot pipe, not readable"));
    };
    function writeAfterEnd(stream, cb) {
      var er = new Error("write after end");
      stream.emit("error", er);
      pna.nextTick(cb, er);
    }
    function validChunk(stream, state2, chunk, cb) {
      var valid = true;
      var er = false;
      if (chunk === null) {
        er = new TypeError("May not write null values to stream");
      } else if (typeof chunk !== "string" && chunk !== void 0 && !state2.objectMode) {
        er = new TypeError("Invalid non-string/buffer chunk");
      }
      if (er) {
        stream.emit("error", er);
        pna.nextTick(cb, er);
        valid = false;
      }
      return valid;
    }
    Writable.prototype.write = function(chunk, encoding, cb) {
      var state2 = this._writableState;
      var ret = false;
      var isBuf = !state2.objectMode && _isUint8Array(chunk);
      if (isBuf && !Buffer2.isBuffer(chunk)) {
        chunk = _uint8ArrayToBuffer(chunk);
      }
      if (typeof encoding === "function") {
        cb = encoding;
        encoding = null;
      }
      if (isBuf) encoding = "buffer";
      else if (!encoding) encoding = state2.defaultEncoding;
      if (typeof cb !== "function") cb = nop;
      if (state2.ended) writeAfterEnd(this, cb);
      else if (isBuf || validChunk(this, state2, chunk, cb)) {
        state2.pendingcb++;
        ret = writeOrBuffer(this, state2, isBuf, chunk, encoding, cb);
      }
      return ret;
    };
    Writable.prototype.cork = function() {
      var state2 = this._writableState;
      state2.corked++;
    };
    Writable.prototype.uncork = function() {
      var state2 = this._writableState;
      if (state2.corked) {
        state2.corked--;
        if (!state2.writing && !state2.corked && !state2.bufferProcessing && state2.bufferedRequest) clearBuffer(this, state2);
      }
    };
    Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
      if (typeof encoding === "string") encoding = encoding.toLowerCase();
      if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + encoding);
      this._writableState.defaultEncoding = encoding;
      return this;
    };
    function decodeChunk(state2, chunk, encoding) {
      if (!state2.objectMode && state2.decodeStrings !== false && typeof chunk === "string") {
        chunk = Buffer2.from(chunk, encoding);
      }
      return chunk;
    }
    Object.defineProperty(Writable.prototype, "writableHighWaterMark", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function() {
        return this._writableState.highWaterMark;
      }
    });
    function writeOrBuffer(stream, state2, isBuf, chunk, encoding, cb) {
      if (!isBuf) {
        var newChunk = decodeChunk(state2, chunk, encoding);
        if (chunk !== newChunk) {
          isBuf = true;
          encoding = "buffer";
          chunk = newChunk;
        }
      }
      var len = state2.objectMode ? 1 : chunk.length;
      state2.length += len;
      var ret = state2.length < state2.highWaterMark;
      if (!ret) state2.needDrain = true;
      if (state2.writing || state2.corked) {
        var last = state2.lastBufferedRequest;
        state2.lastBufferedRequest = {
          chunk,
          encoding,
          isBuf,
          callback: cb,
          next: null
        };
        if (last) {
          last.next = state2.lastBufferedRequest;
        } else {
          state2.bufferedRequest = state2.lastBufferedRequest;
        }
        state2.bufferedRequestCount += 1;
      } else {
        doWrite(stream, state2, false, len, chunk, encoding, cb);
      }
      return ret;
    }
    function doWrite(stream, state2, writev, len, chunk, encoding, cb) {
      state2.writelen = len;
      state2.writecb = cb;
      state2.writing = true;
      state2.sync = true;
      if (writev) stream._writev(chunk, state2.onwrite);
      else stream._write(chunk, encoding, state2.onwrite);
      state2.sync = false;
    }
    function onwriteError(stream, state2, sync, er, cb) {
      --state2.pendingcb;
      if (sync) {
        pna.nextTick(cb, er);
        pna.nextTick(finishMaybe, stream, state2);
        stream._writableState.errorEmitted = true;
        stream.emit("error", er);
      } else {
        cb(er);
        stream._writableState.errorEmitted = true;
        stream.emit("error", er);
        finishMaybe(stream, state2);
      }
    }
    function onwriteStateUpdate(state2) {
      state2.writing = false;
      state2.writecb = null;
      state2.length -= state2.writelen;
      state2.writelen = 0;
    }
    function onwrite(stream, er) {
      var state2 = stream._writableState;
      var sync = state2.sync;
      var cb = state2.writecb;
      onwriteStateUpdate(state2);
      if (er) onwriteError(stream, state2, sync, er, cb);
      else {
        var finished = needFinish(state2);
        if (!finished && !state2.corked && !state2.bufferProcessing && state2.bufferedRequest) {
          clearBuffer(stream, state2);
        }
        if (sync) {
          asyncWrite(afterWrite, stream, state2, finished, cb);
        } else {
          afterWrite(stream, state2, finished, cb);
        }
      }
    }
    function afterWrite(stream, state2, finished, cb) {
      if (!finished) onwriteDrain(stream, state2);
      state2.pendingcb--;
      cb();
      finishMaybe(stream, state2);
    }
    function onwriteDrain(stream, state2) {
      if (state2.length === 0 && state2.needDrain) {
        state2.needDrain = false;
        stream.emit("drain");
      }
    }
    function clearBuffer(stream, state2) {
      state2.bufferProcessing = true;
      var entry = state2.bufferedRequest;
      if (stream._writev && entry && entry.next) {
        var l3 = state2.bufferedRequestCount;
        var buffer = new Array(l3);
        var holder = state2.corkedRequestsFree;
        holder.entry = entry;
        var count = 0;
        var allBuffers = true;
        while (entry) {
          buffer[count] = entry;
          if (!entry.isBuf) allBuffers = false;
          entry = entry.next;
          count += 1;
        }
        buffer.allBuffers = allBuffers;
        doWrite(stream, state2, true, state2.length, buffer, "", holder.finish);
        state2.pendingcb++;
        state2.lastBufferedRequest = null;
        if (holder.next) {
          state2.corkedRequestsFree = holder.next;
          holder.next = null;
        } else {
          state2.corkedRequestsFree = new CorkedRequest(state2);
        }
        state2.bufferedRequestCount = 0;
      } else {
        while (entry) {
          var chunk = entry.chunk;
          var encoding = entry.encoding;
          var cb = entry.callback;
          var len = state2.objectMode ? 1 : chunk.length;
          doWrite(stream, state2, false, len, chunk, encoding, cb);
          entry = entry.next;
          state2.bufferedRequestCount--;
          if (state2.writing) {
            break;
          }
        }
        if (entry === null) state2.lastBufferedRequest = null;
      }
      state2.bufferedRequest = entry;
      state2.bufferProcessing = false;
    }
    Writable.prototype._write = function(chunk, encoding, cb) {
      cb(new Error("_write() is not implemented"));
    };
    Writable.prototype._writev = null;
    Writable.prototype.end = function(chunk, encoding, cb) {
      var state2 = this._writableState;
      if (typeof chunk === "function") {
        cb = chunk;
        chunk = null;
        encoding = null;
      } else if (typeof encoding === "function") {
        cb = encoding;
        encoding = null;
      }
      if (chunk !== null && chunk !== void 0) this.write(chunk, encoding);
      if (state2.corked) {
        state2.corked = 1;
        this.uncork();
      }
      if (!state2.ending) endWritable(this, state2, cb);
    };
    function needFinish(state2) {
      return state2.ending && state2.length === 0 && state2.bufferedRequest === null && !state2.finished && !state2.writing;
    }
    function callFinal(stream, state2) {
      stream._final(function(err) {
        state2.pendingcb--;
        if (err) {
          stream.emit("error", err);
        }
        state2.prefinished = true;
        stream.emit("prefinish");
        finishMaybe(stream, state2);
      });
    }
    function prefinish(stream, state2) {
      if (!state2.prefinished && !state2.finalCalled) {
        if (typeof stream._final === "function") {
          state2.pendingcb++;
          state2.finalCalled = true;
          pna.nextTick(callFinal, stream, state2);
        } else {
          state2.prefinished = true;
          stream.emit("prefinish");
        }
      }
    }
    function finishMaybe(stream, state2) {
      var need = needFinish(state2);
      if (need) {
        prefinish(stream, state2);
        if (state2.pendingcb === 0) {
          state2.finished = true;
          stream.emit("finish");
        }
      }
      return need;
    }
    function endWritable(stream, state2, cb) {
      state2.ending = true;
      finishMaybe(stream, state2);
      if (cb) {
        if (state2.finished) pna.nextTick(cb);
        else stream.once("finish", cb);
      }
      state2.ended = true;
      stream.writable = false;
    }
    function onCorkedFinish(corkReq, state2, err) {
      var entry = corkReq.entry;
      corkReq.entry = null;
      while (entry) {
        var cb = entry.callback;
        state2.pendingcb--;
        cb(err);
        entry = entry.next;
      }
      state2.corkedRequestsFree.next = corkReq;
    }
    Object.defineProperty(Writable.prototype, "destroyed", {
      get: function() {
        if (this._writableState === void 0) {
          return false;
        }
        return this._writableState.destroyed;
      },
      set: function(value) {
        if (!this._writableState) {
          return;
        }
        this._writableState.destroyed = value;
      }
    });
    Writable.prototype.destroy = destroyImpl.destroy;
    Writable.prototype._undestroy = destroyImpl.undestroy;
    Writable.prototype._destroy = function(err, cb) {
      this.end();
      cb(err);
    };
  }
});

// ../../node_modules/readable-stream/lib/_stream_duplex.js
var require_stream_duplex3 = __commonJS({
  "../../node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) {
    "use strict";
    var pna = require_process_nextick_args();
    var objectKeys = Object.keys || function(obj) {
      var keys2 = [];
      for (var key in obj) {
        keys2.push(key);
      }
      return keys2;
    };
    module2.exports = Duplex;
    var util = Object.create(require_util());
    util.inherits = require_inherits();
    var Readable = require_stream_readable3();
    var Writable = require_stream_writable3();
    util.inherits(Duplex, Readable);
    {
      keys = objectKeys(Writable.prototype);
      for (v = 0; v < keys.length; v++) {
        method = keys[v];
        if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
      }
    }
    var keys;
    var method;
    var v;
    function Duplex(options) {
      if (!(this instanceof Duplex)) return new Duplex(options);
      Readable.call(this, options);
      Writable.call(this, options);
      if (options && options.readable === false) this.readable = false;
      if (options && options.writable === false) this.writable = false;
      this.allowHalfOpen = true;
      if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
      this.once("end", onend);
    }
    Object.defineProperty(Duplex.prototype, "writableHighWaterMark", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function() {
        return this._writableState.highWaterMark;
      }
    });
    function onend() {
      if (this.allowHalfOpen || this._writableState.ended) return;
      pna.nextTick(onEndNT, this);
    }
    function onEndNT(self2) {
      self2.end();
    }
    Object.defineProperty(Duplex.prototype, "destroyed", {
      get: function() {
        if (this._readableState === void 0 || this._writableState === void 0) {
          return false;
        }
        return this._readableState.destroyed && this._writableState.destroyed;
      },
      set: function(value) {
        if (this._readableState === void 0 || this._writableState === void 0) {
          return;
        }
        this._readableState.destroyed = value;
        this._writableState.destroyed = value;
      }
    });
    Duplex.prototype._destroy = function(err, cb) {
      this.push(null);
      this.end();
      pna.nextTick(cb, err);
    };
  }
});

// ../../node_modules/readable-stream/lib/_stream_readable.js
var require_stream_readable3 = __commonJS({
  "../../node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) {
    "use strict";
    var pna = require_process_nextick_args();
    module2.exports = Readable;
    var isArray = require_isarray();
    var Duplex;
    Readable.ReadableState = ReadableState;
    var EE = require("events").EventEmitter;
    var EElistenerCount = function(emitter, type) {
      return emitter.listeners(type).length;
    };
    var Stream = require_stream5();
    var Buffer2 = require_safe_buffer2().Buffer;
    var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
    };
    function _uint8ArrayToBuffer(chunk) {
      return Buffer2.from(chunk);
    }
    function _isUint8Array(obj) {
      return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
    }
    var util = Object.create(require_util());
    util.inherits = require_inherits();
    var debugUtil = require("util");
    var debug = void 0;
    if (debugUtil && debugUtil.debuglog) {
      debug = debugUtil.debuglog("stream");
    } else {
      debug = function() {
      };
    }
    var BufferList = require_BufferList2();
    var destroyImpl = require_destroy3();
    var StringDecoder;
    util.inherits(Readable, Stream);
    var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
    function prependListener(emitter, event, fn) {
      if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn);
      if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);
      else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);
      else emitter._events[event] = [fn, emitter._events[event]];
    }
    function ReadableState(options, stream) {
      Duplex = Duplex || require_stream_duplex3();
      options = options || {};
      var isDuplex = stream instanceof Duplex;
      this.objectMode = !!options.objectMode;
      if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
      var hwm = options.highWaterMark;
      var readableHwm = options.readableHighWaterMark;
      var defaultHwm = this.objectMode ? 16 : 16 * 1024;
      if (hwm || hwm === 0) this.highWaterMark = hwm;
      else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;
      else this.highWaterMark = defaultHwm;
      this.highWaterMark = Math.floor(this.highWaterMark);
      this.buffer = new BufferList();
      this.length = 0;
      this.pipes = null;
      this.pipesCount = 0;
      this.flowing = null;
      this.ended = false;
      this.endEmitted = false;
      this.reading = false;
      this.sync = true;
      this.needReadable = false;
      this.emittedReadable = false;
      this.readableListening = false;
      this.resumeScheduled = false;
      this.destroyed = false;
      this.defaultEncoding = options.defaultEncoding || "utf8";
      this.awaitDrain = 0;
      this.readingMore = false;
      this.decoder = null;
      this.encoding = null;
      if (options.encoding) {
        if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder;
        this.decoder = new StringDecoder(options.encoding);
        this.encoding = options.encoding;
      }
    }
    function Readable(options) {
      Duplex = Duplex || require_stream_duplex3();
      if (!(this instanceof Readable)) return new Readable(options);
      this._readableState = new ReadableState(options, this);
      this.readable = true;
      if (options) {
        if (typeof options.read === "function") this._read = options.read;
        if (typeof options.destroy === "function") this._destroy = options.destroy;
      }
      Stream.call(this);
    }
    Object.defineProperty(Readable.prototype, "destroyed", {
      get: function() {
        if (this._readableState === void 0) {
          return false;
        }
        return this._readableState.destroyed;
      },
      set: function(value) {
        if (!this._readableState) {
          return;
        }
        this._readableState.destroyed = value;
      }
    });
    Readable.prototype.destroy = destroyImpl.destroy;
    Readable.prototype._undestroy = destroyImpl.undestroy;
    Readable.prototype._destroy = function(err, cb) {
      this.push(null);
      cb(err);
    };
    Readable.prototype.push = function(chunk, encoding) {
      var state2 = this._readableState;
      var skipChunkCheck;
      if (!state2.objectMode) {
        if (typeof chunk === "string") {
          encoding = encoding || state2.defaultEncoding;
          if (encoding !== state2.encoding) {
            chunk = Buffer2.from(chunk, encoding);
            encoding = "";
          }
          skipChunkCheck = true;
        }
      } else {
        skipChunkCheck = true;
      }
      return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
    };
    Readable.prototype.unshift = function(chunk) {
      return readableAddChunk(this, chunk, null, true, false);
    };
    function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
      var state2 = stream._readableState;
      if (chunk === null) {
        state2.reading = false;
        onEofChunk(stream, state2);
      } else {
        var er;
        if (!skipChunkCheck) er = chunkInvalid(state2, chunk);
        if (er) {
          stream.emit("error", er);
        } else if (state2.objectMode || chunk && chunk.length > 0) {
          if (typeof chunk !== "string" && !state2.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) {
            chunk = _uint8ArrayToBuffer(chunk);
          }
          if (addToFront) {
            if (state2.endEmitted) stream.emit("error", new Error("stream.unshift() after end event"));
            else addChunk(stream, state2, chunk, true);
          } else if (state2.ended) {
            stream.emit("error", new Error("stream.push() after EOF"));
          } else {
            state2.reading = false;
            if (state2.decoder && !encoding) {
              chunk = state2.decoder.write(chunk);
              if (state2.objectMode || chunk.length !== 0) addChunk(stream, state2, chunk, false);
              else maybeReadMore(stream, state2);
            } else {
              addChunk(stream, state2, chunk, false);
            }
          }
        } else if (!addToFront) {
          state2.reading = false;
        }
      }
      return needMoreData(state2);
    }
    function addChunk(stream, state2, chunk, addToFront) {
      if (state2.flowing && state2.length === 0 && !state2.sync) {
        stream.emit("data", chunk);
        stream.read(0);
      } else {
        state2.length += state2.objectMode ? 1 : chunk.length;
        if (addToFront) state2.buffer.unshift(chunk);
        else state2.buffer.push(chunk);
        if (state2.needReadable) emitReadable(stream);
      }
      maybeReadMore(stream, state2);
    }
    function chunkInvalid(state2, chunk) {
      var er;
      if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state2.objectMode) {
        er = new TypeError("Invalid non-string/buffer chunk");
      }
      return er;
    }
    function needMoreData(state2) {
      return !state2.ended && (state2.needReadable || state2.length < state2.highWaterMark || state2.length === 0);
    }
    Readable.prototype.isPaused = function() {
      return this._readableState.flowing === false;
    };
    Readable.prototype.setEncoding = function(enc) {
      if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder;
      this._readableState.decoder = new StringDecoder(enc);
      this._readableState.encoding = enc;
      return this;
    };
    var MAX_HWM = 8388608;
    function computeNewHighWaterMark(n2) {
      if (n2 >= MAX_HWM) {
        n2 = MAX_HWM;
      } else {
        n2--;
        n2 |= n2 >>> 1;
        n2 |= n2 >>> 2;
        n2 |= n2 >>> 4;
        n2 |= n2 >>> 8;
        n2 |= n2 >>> 16;
        n2++;
      }
      return n2;
    }
    function howMuchToRead(n2, state2) {
      if (n2 <= 0 || state2.length === 0 && state2.ended) return 0;
      if (state2.objectMode) return 1;
      if (n2 !== n2) {
        if (state2.flowing && state2.length) return state2.buffer.head.data.length;
        else return state2.length;
      }
      if (n2 > state2.highWaterMark) state2.highWaterMark = computeNewHighWaterMark(n2);
      if (n2 <= state2.length) return n2;
      if (!state2.ended) {
        state2.needReadable = true;
        return 0;
      }
      return state2.length;
    }
    Readable.prototype.read = function(n2) {
      debug("read", n2);
      n2 = parseInt(n2, 10);
      var state2 = this._readableState;
      var nOrig = n2;
      if (n2 !== 0) state2.emittedReadable = false;
      if (n2 === 0 && state2.needReadable && (state2.length >= state2.highWaterMark || state2.ended)) {
        debug("read: emitReadable", state2.length, state2.ended);
        if (state2.length === 0 && state2.ended) endReadable(this);
        else emitReadable(this);
        return null;
      }
      n2 = howMuchToRead(n2, state2);
      if (n2 === 0 && state2.ended) {
        if (state2.length === 0) endReadable(this);
        return null;
      }
      var doRead = state2.needReadable;
      debug("need readable", doRead);
      if (state2.length === 0 || state2.length - n2 < state2.highWaterMark) {
        doRead = true;
        debug("length less than watermark", doRead);
      }
      if (state2.ended || state2.reading) {
        doRead = false;
        debug("reading or ended", doRead);
      } else if (doRead) {
        debug("do read");
        state2.reading = true;
        state2.sync = true;
        if (state2.length === 0) state2.needReadable = true;
        this._read(state2.highWaterMark);
        state2.sync = false;
        if (!state2.reading) n2 = howMuchToRead(nOrig, state2);
      }
      var ret;
      if (n2 > 0) ret = fromList(n2, state2);
      else ret = null;
      if (ret === null) {
        state2.needReadable = true;
        n2 = 0;
      } else {
        state2.length -= n2;
      }
      if (state2.length === 0) {
        if (!state2.ended) state2.needReadable = true;
        if (nOrig !== n2 && state2.ended) endReadable(this);
      }
      if (ret !== null) this.emit("data", ret);
      return ret;
    };
    function onEofChunk(stream, state2) {
      if (state2.ended) return;
      if (state2.decoder) {
        var chunk = state2.decoder.end();
        if (chunk && chunk.length) {
          state2.buffer.push(chunk);
          state2.length += state2.objectMode ? 1 : chunk.length;
        }
      }
      state2.ended = true;
      emitReadable(stream);
    }
    function emitReadable(stream) {
      var state2 = stream._readableState;
      state2.needReadable = false;
      if (!state2.emittedReadable) {
        debug("emitReadable", state2.flowing);
        state2.emittedReadable = true;
        if (state2.sync) pna.nextTick(emitReadable_, stream);
        else emitReadable_(stream);
      }
    }
    function emitReadable_(stream) {
      debug("emit readable");
      stream.emit("readable");
      flow(stream);
    }
    function maybeReadMore(stream, state2) {
      if (!state2.readingMore) {
        state2.readingMore = true;
        pna.nextTick(maybeReadMore_, stream, state2);
      }
    }
    function maybeReadMore_(stream, state2) {
      var len = state2.length;
      while (!state2.reading && !state2.flowing && !state2.ended && state2.length < state2.highWaterMark) {
        debug("maybeReadMore read 0");
        stream.read(0);
        if (len === state2.length)
          break;
        else len = state2.length;
      }
      state2.readingMore = false;
    }
    Readable.prototype._read = function(n2) {
      this.emit("error", new Error("_read() is not implemented"));
    };
    Readable.prototype.pipe = function(dest, pipeOpts) {
      var src = this;
      var state2 = this._readableState;
      switch (state2.pipesCount) {
        case 0:
          state2.pipes = dest;
          break;
        case 1:
          state2.pipes = [state2.pipes, dest];
          break;
        default:
          state2.pipes.push(dest);
          break;
      }
      state2.pipesCount += 1;
      debug("pipe count=%d opts=%j", state2.pipesCount, pipeOpts);
      var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
      var endFn = doEnd ? onend : unpipe;
      if (state2.endEmitted) pna.nextTick(endFn);
      else src.once("end", endFn);
      dest.on("unpipe", onunpipe);
      function onunpipe(readable, unpipeInfo) {
        debug("onunpipe");
        if (readable === src) {
          if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
            unpipeInfo.hasUnpiped = true;
            cleanup();
          }
        }
      }
      function onend() {
        debug("onend");
        dest.end();
      }
      var ondrain = pipeOnDrain(src);
      dest.on("drain", ondrain);
      var cleanedUp = false;
      function cleanup() {
        debug("cleanup");
        dest.removeListener("close", onclose);
        dest.removeListener("finish", onfinish);
        dest.removeListener("drain", ondrain);
        dest.removeListener("error", onerror);
        dest.removeListener("unpipe", onunpipe);
        src.removeListener("end", onend);
        src.removeListener("end", unpipe);
        src.removeListener("data", ondata);
        cleanedUp = true;
        if (state2.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
      }
      var increasedAwaitDrain = false;
      src.on("data", ondata);
      function ondata(chunk) {
        debug("ondata");
        increasedAwaitDrain = false;
        var ret = dest.write(chunk);
        if (false === ret && !increasedAwaitDrain) {
          if ((state2.pipesCount === 1 && state2.pipes === dest || state2.pipesCount > 1 && indexOf(state2.pipes, dest) !== -1) && !cleanedUp) {
            debug("false write response, pause", state2.awaitDrain);
            state2.awaitDrain++;
            increasedAwaitDrain = true;
          }
          src.pause();
        }
      }
      function onerror(er) {
        debug("onerror", er);
        unpipe();
        dest.removeListener("error", onerror);
        if (EElistenerCount(dest, "error") === 0) dest.emit("error", er);
      }
      prependListener(dest, "error", onerror);
      function onclose() {
        dest.removeListener("finish", onfinish);
        unpipe();
      }
      dest.once("close", onclose);
      function onfinish() {
        debug("onfinish");
        dest.removeListener("close", onclose);
        unpipe();
      }
      dest.once("finish", onfinish);
      function unpipe() {
        debug("unpipe");
        src.unpipe(dest);
      }
      dest.emit("pipe", src);
      if (!state2.flowing) {
        debug("pipe resume");
        src.resume();
      }
      return dest;
    };
    function pipeOnDrain(src) {
      return function() {
        var state2 = src._readableState;
        debug("pipeOnDrain", state2.awaitDrain);
        if (state2.awaitDrain) state2.awaitDrain--;
        if (state2.awaitDrain === 0 && EElistenerCount(src, "data")) {
          state2.flowing = true;
          flow(src);
        }
      };
    }
    Readable.prototype.unpipe = function(dest) {
      var state2 = this._readableState;
      var unpipeInfo = { hasUnpiped: false };
      if (state2.pipesCount === 0) return this;
      if (state2.pipesCount === 1) {
        if (dest && dest !== state2.pipes) return this;
        if (!dest) dest = state2.pipes;
        state2.pipes = null;
        state2.pipesCount = 0;
        state2.flowing = false;
        if (dest) dest.emit("unpipe", this, unpipeInfo);
        return this;
      }
      if (!dest) {
        var dests = state2.pipes;
        var len = state2.pipesCount;
        state2.pipes = null;
        state2.pipesCount = 0;
        state2.flowing = false;
        for (var i5 = 0; i5 < len; i5++) {
          dests[i5].emit("unpipe", this, { hasUnpiped: false });
        }
        return this;
      }
      var index = indexOf(state2.pipes, dest);
      if (index === -1) return this;
      state2.pipes.splice(index, 1);
      state2.pipesCount -= 1;
      if (state2.pipesCount === 1) state2.pipes = state2.pipes[0];
      dest.emit("unpipe", this, unpipeInfo);
      return this;
    };
    Readable.prototype.on = function(ev, fn) {
      var res = Stream.prototype.on.call(this, ev, fn);
      if (ev === "data") {
        if (this._readableState.flowing !== false) this.resume();
      } else if (ev === "readable") {
        var state2 = this._readableState;
        if (!state2.endEmitted && !state2.readableListening) {
          state2.readableListening = state2.needReadable = true;
          state2.emittedReadable = false;
          if (!state2.reading) {
            pna.nextTick(nReadingNextTick, this);
          } else if (state2.length) {
            emitReadable(this);
          }
        }
      }
      return res;
    };
    Readable.prototype.addListener = Readable.prototype.on;
    function nReadingNextTick(self2) {
      debug("readable nexttick read 0");
      self2.read(0);
    }
    Readable.prototype.resume = function() {
      var state2 = this._readableState;
      if (!state2.flowing) {
        debug("resume");
        state2.flowing = true;
        resume(this, state2);
      }
      return this;
    };
    function resume(stream, state2) {
      if (!state2.resumeScheduled) {
        state2.resumeScheduled = true;
        pna.nextTick(resume_, stream, state2);
      }
    }
    function resume_(stream, state2) {
      if (!state2.reading) {
        debug("resume read 0");
        stream.read(0);
      }
      state2.resumeScheduled = false;
      state2.awaitDrain = 0;
      stream.emit("resume");
      flow(stream);
      if (state2.flowing && !state2.reading) stream.read(0);
    }
    Readable.prototype.pause = function() {
      debug("call pause flowing=%j", this._readableState.flowing);
      if (false !== this._readableState.flowing) {
        debug("pause");
        this._readableState.flowing = false;
        this.emit("pause");
      }
      return this;
    };
    function flow(stream) {
      var state2 = stream._readableState;
      debug("flow", state2.flowing);
      while (state2.flowing && stream.read() !== null) {
      }
    }
    Readable.prototype.wrap = function(stream) {
      var _this = this;
      var state2 = this._readableState;
      var paused = false;
      stream.on("end", function() {
        debug("wrapped end");
        if (state2.decoder && !state2.ended) {
          var chunk = state2.decoder.end();
          if (chunk && chunk.length) _this.push(chunk);
        }
        _this.push(null);
      });
      stream.on("data", function(chunk) {
        debug("wrapped data");
        if (state2.decoder) chunk = state2.decoder.write(chunk);
        if (state2.objectMode && (chunk === null || chunk === void 0)) return;
        else if (!state2.objectMode && (!chunk || !chunk.length)) return;
        var ret = _this.push(chunk);
        if (!ret) {
          paused = true;
          stream.pause();
        }
      });
      for (var i5 in stream) {
        if (this[i5] === void 0 && typeof stream[i5] === "function") {
          this[i5] = /* @__PURE__ */ (function(method) {
            return function() {
              return stream[method].apply(stream, arguments);
            };
          })(i5);
        }
      }
      for (var n2 = 0; n2 < kProxyEvents.length; n2++) {
        stream.on(kProxyEvents[n2], this.emit.bind(this, kProxyEvents[n2]));
      }
      this._read = function(n3) {
        debug("wrapped _read", n3);
        if (paused) {
          paused = false;
          stream.resume();
        }
      };
      return this;
    };
    Object.defineProperty(Readable.prototype, "readableHighWaterMark", {
      // making it explicit this property is not enumerable
      // because otherwise some prototype manipulation in
      // userland will fail
      enumerable: false,
      get: function() {
        return this._readableState.highWaterMark;
      }
    });
    Readable._fromList = fromList;
    function fromList(n2, state2) {
      if (state2.length === 0) return null;
      var ret;
      if (state2.objectMode) ret = state2.buffer.shift();
      else if (!n2 || n2 >= state2.length) {
        if (state2.decoder) ret = state2.buffer.join("");
        else if (state2.buffer.length === 1) ret = state2.buffer.head.data;
        else ret = state2.buffer.concat(state2.length);
        state2.buffer.clear();
      } else {
        ret = fromListPartial(n2, state2.buffer, state2.decoder);
      }
      return ret;
    }
    function fromListPartial(n2, list2, hasStrings) {
      var ret;
      if (n2 < list2.head.data.length) {
        ret = list2.head.data.slice(0, n2);
        list2.head.data = list2.head.data.slice(n2);
      } else if (n2 === list2.head.data.length) {
        ret = list2.shift();
      } else {
        ret = hasStrings ? copyFromBufferString(n2, list2) : copyFromBuffer(n2, list2);
      }
      return ret;
    }
    function copyFromBufferString(n2, list2) {
      var p2 = list2.head;
      var c5 = 1;
      var ret = p2.data;
      n2 -= ret.length;
      while (p2 = p2.next) {
        var str = p2.data;
        var nb = n2 > str.length ? str.length : n2;
        if (nb === str.length) ret += str;
        else ret += str.slice(0, n2);
        n2 -= nb;
        if (n2 === 0) {
          if (nb === str.length) {
            ++c5;
            if (p2.next) list2.head = p2.next;
            else list2.head = list2.tail = null;
          } else {
            list2.head = p2;
            p2.data = str.slice(nb);
          }
          break;
        }
        ++c5;
      }
      list2.length -= c5;
      return ret;
    }
    function copyFromBuffer(n2, list2) {
      var ret = Buffer2.allocUnsafe(n2);
      var p2 = list2.head;
      var c5 = 1;
      p2.data.copy(ret);
      n2 -= p2.data.length;
      while (p2 = p2.next) {
        var buf = p2.data;
        var nb = n2 > buf.length ? buf.length : n2;
        buf.copy(ret, ret.length - n2, 0, nb);
        n2 -= nb;
        if (n2 === 0) {
          if (nb === buf.length) {
            ++c5;
            if (p2.next) list2.head = p2.next;
            else list2.head = list2.tail = null;
          } else {
            list2.head = p2;
            p2.data = buf.slice(nb);
          }
          break;
        }
        ++c5;
      }
      list2.length -= c5;
      return ret;
    }
    function endReadable(stream) {
      var state2 = stream._readableState;
      if (state2.length > 0) throw new Error('"endReadable()" called on non-empty stream');
      if (!state2.endEmitted) {
        state2.ended = true;
        pna.nextTick(endReadableNT, state2, stream);
      }
    }
    function endReadableNT(state2, stream) {
      if (!state2.endEmitted && state2.length === 0) {
        state2.endEmitted = true;
        stream.readable = false;
        stream.emit("end");
      }
    }
    function indexOf(xs, x) {
      for (var i5 = 0, l3 = xs.length; i5 < l3; i5++) {
        if (xs[i5] === x) return i5;
      }
      return -1;
    }
  }
});

// ../../node_modules/readable-stream/lib/_stream_transform.js
var require_stream_transform3 = __commonJS({
  "../../node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) {
    "use strict";
    module2.exports = Transform;
    var Duplex = require_stream_duplex3();
    var util = Object.create(require_util());
    util.inherits = require_inherits();
    util.inherits(Transform, Duplex);
    function afterTransform(er, data2) {
      var ts = this._transformState;
      ts.transforming = false;
      var cb = ts.writecb;
      if (!cb) {
        return this.emit("error", new Error("write callback called multiple times"));
      }
      ts.writechunk = null;
      ts.writecb = null;
      if (data2 != null)
        this.push(data2);
      cb(er);
      var rs = this._readableState;
      rs.reading = false;
      if (rs.needReadable || rs.length < rs.highWaterMark) {
        this._read(rs.highWaterMark);
      }
    }
    function Transform(options) {
      if (!(this instanceof Transform)) return new Transform(options);
      Duplex.call(this, options);
      this._transformState = {
        afterTransform: afterTransform.bind(this),
        needTransform: false,
        transforming: false,
        writecb: null,
        writechunk: null,
        writeencoding: null
      };
      this._readableState.needReadable = true;
      this._readableState.sync = false;
      if (options) {
        if (typeof options.transform === "function") this._transform = options.transform;
        if (typeof options.flush === "function") this._flush = options.flush;
      }
      this.on("prefinish", prefinish);
    }
    function prefinish() {
      var _this = this;
      if (typeof this._flush === "function") {
        this._flush(function(er, data2) {
          done(_this, er, data2);
        });
      } else {
        done(this, null, null);
      }
    }
    Transform.prototype.push = function(chunk, encoding) {
      this._transformState.needTransform = false;
      return Duplex.prototype.push.call(this, chunk, encoding);
    };
    Transform.prototype._transform = function(chunk, encoding, cb) {
      throw new Error("_transform() is not implemented");
    };
    Transform.prototype._write = function(chunk, encoding, cb) {
      var ts = this._transformState;
      ts.writecb = cb;
      ts.writechunk = chunk;
      ts.writeencoding = encoding;
      if (!ts.transforming) {
        var rs = this._readableState;
        if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
      }
    };
    Transform.prototype._read = function(n2) {
      var ts = this._transformState;
      if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
        ts.transforming = true;
        this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
      } else {
        ts.needTransform = true;
      }
    };
    Transform.prototype._destroy = function(err, cb) {
      var _this2 = this;
      Duplex.prototype._destroy.call(this, err, function(err2) {
        cb(err2);
        _this2.emit("close");
      });
    };
    function done(stream, er, data2) {
      if (er) return stream.emit("error", er);
      if (data2 != null)
        stream.push(data2);
      if (stream._writableState.length) throw new Error("Calling transform done when ws.length != 0");
      if (stream._transformState.transforming) throw new Error("Calling transform done when still transforming");
      return stream.push(null);
    }
  }
});

// ../../node_modules/readable-stream/lib/_stream_passthrough.js
var require_stream_passthrough3 = __commonJS({
  "../../node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) {
    "use strict";
    module2.exports = PassThrough;
    var Transform = require_stream_transform3();
    var util = Object.create(require_util());
    util.inherits = require_inherits();
    util.inherits(PassThrough, Transform);
    function PassThrough(options) {
      if (!(this instanceof PassThrough)) return new PassThrough(options);
      Transform.call(this, options);
    }
    PassThrough.prototype._transform = function(chunk, encoding, cb) {
      cb(null, chunk);
    };
  }
});

// ../../node_modules/readable-stream/readable.js
var require_readable3 = __commonJS({
  "../../node_modules/readable-stream/readable.js"(exports2, module2) {
    var Stream = require("stream");
    if (process.env.READABLE_STREAM === "disable" && Stream) {
      module2.exports = Stream;
      exports2 = module2.exports = Stream.Readable;
      exports2.Readable = Stream.Readable;
      exports2.Writable = Stream.Writable;
      exports2.Duplex = Stream.Duplex;
      exports2.Transform = Stream.Transform;
      exports2.PassThrough = Stream.PassThrough;
      exports2.Stream = Stream;
    } else {
      exports2 = module2.exports = require_stream_readable3();
      exports2.Stream = Stream || exports2;
      exports2.Readable = exports2;
      exports2.Writable = require_stream_writable3();
      exports2.Duplex = require_stream_duplex3();
      exports2.Transform = require_stream_transform3();
      exports2.PassThrough = require_stream_passthrough3();
    }
  }
});

// ../../node_modules/duplexify/index.js
var require_duplexify2 = __commonJS({
  "../../node_modules/duplexify/index.js"(exports2, module2) {
    var stream = require_readable3();
    var eos = require_end_of_stream3();
    var inherits = require_inherits();
    var shift = require_stream_shift();
    var SIGNAL_FLUSH = Buffer.from && Buffer.from !== Uint8Array.from ? Buffer.from([0]) : new Buffer([0]);
    var onuncork = function(self2, fn) {
      if (self2._corked) self2.once("uncork", fn);
      else fn();
    };
    var autoDestroy = function(self2, err) {
      if (self2._autoDestroy) self2.destroy(err);
    };
    var destroyer = function(self2, end2) {
      return function(err) {
        if (err) autoDestroy(self2, err.message === "premature close" ? null : err);
        else if (end2 && !self2._ended) self2.end();
      };
    };
    var end = function(ws, fn) {
      if (!ws) return fn();
      if (ws._writableState && ws._writableState.finished) return fn();
      if (ws._writableState) return ws.end(fn);
      ws.end();
      fn();
    };
    var toStreams2 = function(rs) {
      return new stream.Readable({ objectMode: true, highWaterMark: 16 }).wrap(rs);
    };
    var Duplexify = function(writable, readable, opts) {
      if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts);
      stream.Duplex.call(this, opts);
      this._writable = null;
      this._readable = null;
      this._readable2 = null;
      this._autoDestroy = !opts || opts.autoDestroy !== false;
      this._forwardDestroy = !opts || opts.destroy !== false;
      this._forwardEnd = !opts || opts.end !== false;
      this._corked = 1;
      this._ondrain = null;
      this._drained = false;
      this._forwarding = false;
      this._unwrite = null;
      this._unread = null;
      this._ended = false;
      this.destroyed = false;
      if (writable) this.setWritable(writable);
      if (readable) this.setReadable(readable);
    };
    inherits(Duplexify, stream.Duplex);
    Duplexify.obj = function(writable, readable, opts) {
      if (!opts) opts = {};
      opts.objectMode = true;
      opts.highWaterMark = 16;
      return new Duplexify(writable, readable, opts);
    };
    Duplexify.prototype.cork = function() {
      if (++this._corked === 1) this.emit("cork");
    };
    Duplexify.prototype.uncork = function() {
      if (this._corked && --this._corked === 0) this.emit("uncork");
    };
    Duplexify.prototype.setWritable = function(writable) {
      if (this._unwrite) this._unwrite();
      if (this.destroyed) {
        if (writable && writable.destroy) writable.destroy();
        return;
      }
      if (writable === null || writable === false) {
        this.end();
        return;
      }
      var self2 = this;
      var unend = eos(writable, { writable: true, readable: false }, destroyer(this, this._forwardEnd));
      var ondrain = function() {
        var ondrain2 = self2._ondrain;
        self2._ondrain = null;
        if (ondrain2) ondrain2();
      };
      var clear = function() {
        self2._writable.removeListener("drain", ondrain);
        unend();
      };
      if (this._unwrite) process.nextTick(ondrain);
      this._writable = writable;
      this._writable.on("drain", ondrain);
      this._unwrite = clear;
      this.uncork();
    };
    Duplexify.prototype.setReadable = function(readable) {
      if (this._unread) this._unread();
      if (this.destroyed) {
        if (readable && readable.destroy) readable.destroy();
        return;
      }
      if (readable === null || readable === false) {
        this.push(null);
        this.resume();
        return;
      }
      var self2 = this;
      var unend = eos(readable, { writable: false, readable: true }, destroyer(this));
      var onreadable = function() {
        self2._forward();
      };
      var onend = function() {
        self2.push(null);
      };
      var clear = function() {
        self2._readable2.removeListener("readable", onreadable);
        self2._readable2.removeListener("end", onend);
        unend();
      };
      this._drained = true;
      this._readable = readable;
      this._readable2 = readable._readableState ? readable : toStreams2(readable);
      this._readable2.on("readable", onreadable);
      this._readable2.on("end", onend);
      this._unread = clear;
      this._forward();
    };
    Duplexify.prototype._read = function() {
      this._drained = true;
      this._forward();
    };
    Duplexify.prototype._forward = function() {
      if (this._forwarding || !this._readable2 || !this._drained) return;
      this._forwarding = true;
      var data2;
      while (this._drained && (data2 = shift(this._readable2)) !== null) {
        if (this.destroyed) continue;
        this._drained = this.push(data2);
      }
      this._forwarding = false;
    };
    Duplexify.prototype.destroy = function(err) {
      if (this.destroyed) return;
      this.destroyed = true;
      var self2 = this;
      process.nextTick(function() {
        self2._destroy(err);
      });
    };
    Duplexify.prototype._destroy = function(err) {
      if (err) {
        var ondrain = this._ondrain;
        this._ondrain = null;
        if (ondrain) ondrain(err);
        else this.emit("error", err);
      }
      if (this._forwardDestroy) {
        if (this._readable && this._readable.destroy) this._readable.destroy();
        if (this._writable && this._writable.destroy) this._writable.destroy();
      }
      this.emit("close");
    };
    Duplexify.prototype._write = function(data2, enc, cb) {
      if (this.destroyed) return cb();
      if (this._corked) return onuncork(this, this._write.bind(this, data2, enc, cb));
      if (data2 === SIGNAL_FLUSH) return this._finish(cb);
      if (!this._writable) return cb();
      if (this._writable.write(data2) === false) this._ondrain = cb;
      else cb();
    };
    Duplexify.prototype._finish = function(cb) {
      var self2 = this;
      this.emit("preend");
      onuncork(this, function() {
        end(self2._forwardEnd && self2._writable, function() {
          if (self2._writableState.prefinished === false) self2._writableState.prefinished = true;
          self2.emit("prefinish");
          onuncork(self2, cb);
        });
      });
    };
    Duplexify.prototype.end = function(data2, enc, cb) {
      if (typeof data2 === "function") return this.end(null, null, data2);
      if (typeof enc === "function") return this.end(data2, null, enc);
      this._ended = true;
      if (data2) this.write(data2);
      if (!this._writableState.ending) this.write(SIGNAL_FLUSH);
      return stream.Writable.prototype.end.call(this, cb);
    };
    module2.exports = Duplexify;
  }
});

// ../../node_modules/isomorphic-ws/node.js
var require_node3 = __commonJS({
  "../../node_modules/isomorphic-ws/node.js"(exports2, module2) {
    "use strict";
    module2.exports = require_ws3();
  }
});

// ../../node_modules/safe-buffer/index.js
var require_safe_buffer3 = __commonJS({
  "../../node_modules/safe-buffer/index.js"(exports2, module2) {
    var buffer = require("buffer");
    var Buffer2 = buffer.Buffer;
    function copyProps(src, dst) {
      for (var key in src) {
        dst[key] = src[key];
      }
    }
    if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) {
      module2.exports = buffer;
    } else {
      copyProps(buffer, exports2);
      exports2.Buffer = SafeBuffer;
    }
    function SafeBuffer(arg, encodingOrOffset, length) {
      return Buffer2(arg, encodingOrOffset, length);
    }
    SafeBuffer.prototype = Object.create(Buffer2.prototype);
    copyProps(Buffer2, SafeBuffer);
    SafeBuffer.from = function(arg, encodingOrOffset, length) {
      if (typeof arg === "number") {
        throw new TypeError("Argument must not be a number");
      }
      return Buffer2(arg, encodingOrOffset, length);
    };
    SafeBuffer.alloc = function(size, fill, encoding) {
      if (typeof size !== "number") {
        throw new TypeError("Argument must be a number");
      }
      var buf = Buffer2(size);
      if (fill !== void 0) {
        if (typeof encoding === "string") {
          buf.fill(fill, encoding);
        } else {
          buf.fill(fill);
        }
      } else {
        buf.fill(0);
      }
      return buf;
    };
    SafeBuffer.allocUnsafe = function(size) {
      if (typeof size !== "number") {
        throw new TypeError("Argument must be a number");
      }
      return Buffer2(size);
    };
    SafeBuffer.allocUnsafeSlow = function(size) {
      if (typeof size !== "number") {
        throw new TypeError("Argument must be a number");
      }
      return buffer.SlowBuffer(size);
    };
  }
});

// ../../node_modules/@httptoolkit/websocket-stream/stream.js
var require_stream6 = __commonJS({
  "../../node_modules/@httptoolkit/websocket-stream/stream.js"(exports2, module2) {
    "use strict";
    var Transform = require_readable3().Transform;
    var duplexify = require_duplexify2();
    var WS = require_node3();
    var Buffer2 = require_safe_buffer3().Buffer;
    module2.exports = WebSocketStream;
    function buildProxy(options, socketWrite, socketEnd) {
      var proxy = new Transform({
        objectMode: options.objectMode
      });
      proxy._write = socketWrite;
      proxy._flush = socketEnd;
      return proxy;
    }
    function WebSocketStream(target, protocols, options) {
      var stream, socket;
      var isBrowser = process.title === "browser";
      var isNative = !!global.WebSocket;
      var socketWrite = isBrowser ? socketWriteBrowser : socketWriteNode;
      if (protocols && !Array.isArray(protocols) && "object" === typeof protocols) {
        options = protocols;
        protocols = void 0;
        if (typeof options.protocol === "string" || Array.isArray(options.protocol)) {
          protocols = options.protocol;
        }
      }
      if (!options) options = {};
      if (options.objectMode === void 0) {
        options.objectMode = !(options.binary === true || options.binary === void 0);
      }
      var proxy = buildProxy(options, socketWrite, socketEnd);
      if (!options.objectMode) {
        proxy._writev = writev;
      }
      var bufferSize = options.browserBufferSize || 1024 * 512;
      var bufferTimeout = options.browserBufferTimeout || 1e3;
      if (typeof target === "object") {
        socket = target;
      } else {
        if (isNative && isBrowser) {
          socket = new WS(target, protocols);
        } else {
          socket = new WS(target, protocols, options);
        }
        socket.binaryType = "arraybuffer";
      }
      var eventListenerSupport = "undefined" === typeof socket.addEventListener;
      if (socket.readyState === socket.OPEN) {
        stream = proxy;
      } else {
        stream = duplexify(void 0, void 0, options);
        if (!options.objectMode) {
          stream._writev = writev;
        }
        if (eventListenerSupport) {
          socket.addEventListener("open", onopen);
        } else {
          socket.onopen = onopen;
        }
      }
      stream.socket = socket;
      if (eventListenerSupport) {
        socket.addEventListener("close", onclose);
        socket.addEventListener("error", onerror);
        socket.addEventListener("message", onmessage);
      } else {
        socket.onclose = onclose;
        socket.onerror = onerror;
        socket.onmessage = onmessage;
      }
      proxy.on("close", destroy);
      var coerceToBuffer = !options.objectMode;
      function socketWriteNode(chunk, enc, next) {
        if (socket.readyState !== socket.OPEN) {
          next();
          return;
        }
        if (coerceToBuffer && typeof chunk === "string") {
          chunk = Buffer2.from(chunk, "utf8");
        }
        socket.send(chunk, next);
      }
      function socketWriteBrowser(chunk, enc, next) {
        if (socket.bufferedAmount > bufferSize) {
          setTimeout(socketWriteBrowser, bufferTimeout, chunk, enc, next);
          return;
        }
        if (coerceToBuffer && typeof chunk === "string") {
          chunk = Buffer2.from(chunk, "utf8");
        }
        try {
          socket.send(chunk);
        } catch (err) {
          return next(err);
        }
        next();
      }
      function socketEnd(done) {
        socket.close();
        done();
      }
      function onopen() {
        stream.setReadable(proxy);
        stream.setWritable(proxy);
        stream.emit("connect");
      }
      function onclose(closeDetails) {
        stream.emit("ws-close", closeDetails);
        stream.end();
        stream.destroy();
      }
      function onerror(err) {
        stream.destroy(err);
      }
      function onmessage(event) {
        var data2 = event.data;
        if (data2 instanceof ArrayBuffer) data2 = Buffer2.from(data2);
        else data2 = Buffer2.from(data2, "utf8");
        proxy.push(data2);
      }
      function destroy() {
        socket.close();
      }
      function writev(chunks2, cb) {
        var buffers = new Array(chunks2.length);
        for (var i5 = 0; i5 < chunks2.length; i5++) {
          if (typeof chunks2[i5].chunk === "string") {
            buffers[i5] = Buffer2.from(chunks2[i5], "utf8");
          } else {
            buffers[i5] = chunks2[i5].chunk;
          }
        }
        this._write(Buffer2.concat(buffers), "binary", cb);
      }
      return stream;
    }
  }
});

// ../../node_modules/@httptoolkit/websocket-stream/server.js
var require_server = __commonJS({
  "../../node_modules/@httptoolkit/websocket-stream/server.js"(exports2, module2) {
    "use strict";
    var WebSocketServer = require_ws3().Server;
    var stream = require_stream6();
    var Server = class extends WebSocketServer {
      constructor(opts, cb) {
        super(opts);
        var proxied = false;
        this.on("newListener", function(event) {
          if (!proxied && event === "stream") {
            proxied = true;
            this.on("connection", function(conn, req) {
              this.emit("stream", stream(conn, opts), req);
            });
          }
        });
        if (cb) {
          this.on("stream", cb);
        }
      }
    };
    module2.exports.Server = Server;
    module2.exports.createServer = function(opts, cb) {
      return new Server(opts, cb);
    };
  }
});

// ../../node_modules/@httptoolkit/websocket-stream/index.js
var require_websocket_stream = __commonJS({
  "../../node_modules/@httptoolkit/websocket-stream/index.js"(exports2, module2) {
    var server = require_server();
    module2.exports = require_stream6();
    module2.exports.Server = server.Server;
    module2.exports.createServer = server.createServer;
  }
});

// ../../node_modules/aws-iot-device-sdk/device/lib/ws.js
var require_ws4 = __commonJS({
  "../../node_modules/aws-iot-device-sdk/device/lib/ws.js"(exports2, module2) {
    var websocket = require_websocket_stream();
    function buildBuilder(client, opts) {
      return websocket(opts.url, ["mqttv3.1"], opts.websocketOptions);
    }
    module2.exports = buildBuilder;
  }
});

// ../../node_modules/aws-iot-device-sdk/device/index.js
var require_device = __commonJS({
  "../../node_modules/aws-iot-device-sdk/device/index.js"(exports2, module2) {
    var events = require("events");
    var inherits = require("util").inherits;
    var mqtt = require_mqtt2();
    var hmacSHA256 = require_hmac_sha256();
    var sha256 = require_sha256();
    var exceptions = require_exceptions();
    var isUndefined = require_is_undefined();
    var tlsReader = require_tls_reader();
    var path = require("path");
    var fs = require("fs");
    function makeTwoDigits(n2) {
      if (n2 > 9) {
        return n2;
      } else {
        return "0" + n2;
      }
    }
    function getDateTimeString() {
      var d5 = /* @__PURE__ */ new Date();
      return d5.getUTCFullYear() + "" + makeTwoDigits(d5.getUTCMonth() + 1) + makeTwoDigits(d5.getUTCDate()) + "T" + makeTwoDigits(d5.getUTCHours()) + makeTwoDigits(d5.getUTCMinutes()) + makeTwoDigits(d5.getUTCSeconds()) + "Z";
    }
    function getDateString(dateTimeString) {
      return dateTimeString.substring(0, dateTimeString.indexOf("T"));
    }
    function getSignatureKey(key, dateStamp, regionName, serviceName) {
      var kDate = hmacSHA256(dateStamp, "AWS4" + key, {
        asBytes: true
      });
      var kRegion = hmacSHA256(regionName, kDate, {
        asBytes: true
      });
      var kService = hmacSHA256(serviceName, kRegion, {
        asBytes: true
      });
      var kSigning = hmacSHA256("aws4_request", kService, {
        asBytes: true
      });
      return kSigning;
    }
    function signUrl(method, scheme, hostname, path2, queryParams, accessId, secretKey, region, serviceName, payload2, today, now, debug, awsSTSToken) {
      var signedHeaders = "host";
      var canonicalHeaders = "host:" + hostname.toLowerCase() + "\n";
      var canonicalRequest = method + "\n" + // method
      path2 + "\n" + // path
      queryParams + "\n" + // query params
      canonicalHeaders + // headers
      "\n" + // required
      signedHeaders + "\n" + // signed header list
      sha256(payload2, {
        asBytes: true
      });
      if (debug === true) {
        console.log("canonical request: " + canonicalRequest + "\n");
      }
      var hashedCanonicalRequest = sha256(canonicalRequest, {
        asBytes: true
      });
      if (debug === true) {
        console.log("hashed canonical request: " + hashedCanonicalRequest + "\n");
      }
      var stringToSign = "AWS4-HMAC-SHA256\n" + now + "\n" + today + "/" + region + "/" + serviceName + "/aws4_request\n" + hashedCanonicalRequest;
      if (debug === true) {
        console.log("string to sign: " + stringToSign + "\n");
      }
      var signingKey = getSignatureKey(secretKey, today, region, serviceName);
      if (debug === true) {
        console.log("signing key: " + signingKey + "\n");
      }
      var signature = hmacSHA256(stringToSign, signingKey, {
        asBytes: true
      });
      if (debug === true) {
        console.log("signature: " + signature + "\n");
      }
      var finalParams = queryParams + "&X-Amz-Signature=" + signature;
      if (!isUndefined(awsSTSToken)) {
        finalParams += "&X-Amz-Security-Token=" + encodeURIComponent(awsSTSToken);
      }
      var url = scheme + hostname + path2 + "?" + finalParams;
      if (debug === true) {
        console.log("url: " + url + "\n");
      }
      return url;
    }
    function prepareWebSocketUrl(options, awsAccessId, awsSecretKey, awsSTSToken) {
      var now = getDateTimeString();
      var today = getDateString(now);
      var path2 = "/mqtt";
      var awsServiceName = "iotdevicegateway";
      var queryParams = "X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=" + awsAccessId + "%2F" + today + "%2F" + options.region + "%2F" + awsServiceName + "%2Faws4_request&X-Amz-Date=" + now + "&X-Amz-SignedHeaders=host";
      var hostName = options.host;
      if (!isUndefined(options.port) && options.port !== 443) {
        hostName = options.host + ":" + options.port;
      }
      return signUrl(
        "GET",
        "wss://",
        hostName,
        path2,
        queryParams,
        awsAccessId,
        awsSecretKey,
        options.region,
        awsServiceName,
        "",
        today,
        now,
        options.debug,
        awsSTSToken
      );
    }
    function prepareWebSocketCustomAuthUrl(options) {
      var path2 = "/mqtt";
      var hostName = options.host;
      if (!isUndefined(options.port) && options.port !== 443) {
        hostName = options.host + ":" + options.port;
      }
      return "wss://" + hostName + path2 + (options.customAuthQueryString || "");
    }
    function arrayEach(array, iterFunction) {
      for (var idx in array) {
        if (Object.prototype.hasOwnProperty.call(array, idx)) {
          iterFunction.call(this, array[idx], parseInt(idx, 10));
        }
      }
    }
    function getCredentials(ini) {
      var map2 = {};
      var currentSection = {};
      arrayEach(ini.split(/\r?\n/), function(line) {
        line = line.split(/(^|\s)[;#]/)[0];
        var section = line.match(/^\s*\[([^\[\]]+)\]\s*$/);
        if (section) {
          currentSection = section[1];
        } else if (currentSection) {
          var item = line.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/);
          if (item) {
            map2[currentSection] = map2[currentSection] || {};
            map2[currentSection][item[1]] = item[2];
          }
        }
      });
      return map2;
    }
    function DeviceClient(options) {
      if (!(this instanceof DeviceClient)) {
        return new DeviceClient(options);
      }
      var that = this;
      var offlinePublishQueue = [];
      var offlineQueueing = true;
      var offlineQueueMaxSize = 0;
      var offlineQueueDropBehavior = "oldest";
      offlinePublishQueue.length = 0;
      var offlineSubscriptionQueue = [];
      var offlineSubscriptionQueueMaxSize = 50;
      offlineSubscriptionQueue.length = 0;
      var activeSubscriptions = [];
      var autoResubscribe = true;
      activeSubscriptions.length = 0;
      var clonedSubscriptions = [];
      clonedSubscriptions.length = 0;
      var connectionState = "inactive";
      var drainingTimer = null;
      var drainTimeMs = 250;
      var defaultKeepalive = 300;
      var baseReconnectTimeMs = 1e3;
      var minimumConnectionTimeMs = 2e4;
      var maximumReconnectTimeMs = 128e3;
      var currentReconnectTimeMs;
      var connectionTimer = null;
      var awsAccessId;
      var awsSecretKey;
      var awsSTSToken;
      var metricPrefix = "?SDK=JavaScript&Version=";
      var pjson = require_package();
      var sdkVersion = pjson.version;
      var defaultUsername = metricPrefix + sdkVersion;
      if (isUndefined(options) || Object.keys(options).length === 0) {
        throw new Error(exceptions.INVALID_CONNECT_OPTIONS);
      }
      if (isUndefined(options.keepalive)) {
        options.keepalive = defaultKeepalive;
      }
      if (isUndefined(options.enableMetrics) || options.enableMetrics === true) {
        if (isUndefined(options.username)) {
          options.username = defaultUsername;
        } else {
          options.username += defaultUsername;
        }
      }
      if (!isUndefined(options.baseReconnectTimeMs)) {
        baseReconnectTimeMs = options.baseReconnectTimeMs;
      }
      if (!isUndefined(options.minimumConnectionTimeMs)) {
        minimumConnectionTimeMs = options.minimumConnectionTimeMs;
      }
      if (!isUndefined(options.maximumReconnectTimeMs)) {
        maximumReconnectTimeMs = options.maximumReconnectTimeMs;
      }
      if (!isUndefined(options.drainTimeMs)) {
        drainTimeMs = options.drainTimeMs;
      }
      if (!isUndefined(options.autoResubscribe)) {
        autoResubscribe = options.autoResubscribe;
      }
      if (!isUndefined(options.offlineQueueing)) {
        offlineQueueing = options.offlineQueueing;
      }
      if (!isUndefined(options.offlineQueueMaxSize)) {
        offlineQueueMaxSize = options.offlineQueueMaxSize;
      }
      if (!isUndefined(options.offlineQueueDropBehavior)) {
        offlineQueueDropBehavior = options.offlineQueueDropBehavior;
      }
      currentReconnectTimeMs = baseReconnectTimeMs;
      options.reconnectPeriod = currentReconnectTimeMs;
      options.fastDisconnectDetection = true;
      options.resubscribe = false;
      if (options.baseReconnectTimeMs <= 0) {
        throw new Error(exceptions.INVALID_RECONNECT_TIMING);
      }
      if (maximumReconnectTimeMs < baseReconnectTimeMs) {
        throw new Error(exceptions.INVALID_RECONNECT_TIMING);
      }
      if (minimumConnectionTimeMs < baseReconnectTimeMs) {
        throw new Error(exceptions.INVALID_RECONNECT_TIMING);
      }
      if (offlineQueueDropBehavior !== "newest" && offlineQueueDropBehavior !== "oldest") {
        throw new Error(exceptions.INVALID_OFFLINE_QUEUEING_PARAMETERS);
      }
      if (offlineQueueMaxSize < 0) {
        throw new Error(exceptions.INVALID_OFFLINE_QUEUEING_PARAMETERS);
      }
      if (isUndefined(options.protocol)) {
        options.protocol = "mqtts";
      }
      if (isUndefined(options.host)) {
        throw new Error(exceptions.INVALID_CONNECT_OPTIONS);
      }
      if (isUndefined(options.servername)) {
        options.servername = options.host.split(":")[0];
      }
      if (options.protocol === "mqtts") {
        if (isUndefined(options.port)) {
          options.port = 8883;
        }
        tlsReader(options);
      } else if (options.protocol === "wss" || options.protocol === "wss-custom-auth") {
        if (options.protocol === "wss") {
          if (!isUndefined(options.accessKeyId)) {
            awsAccessId = options.accessKeyId;
          } else {
            awsAccessId = process.env.AWS_ACCESS_KEY_ID;
          }
          if (!isUndefined(options.secretKey)) {
            awsSecretKey = options.secretKey;
          } else {
            awsSecretKey = process.env.AWS_SECRET_ACCESS_KEY;
          }
          if (!isUndefined(options.sessionToken)) {
            awsSTSToken = options.sessionToken;
          } else {
            awsSTSToken = process.env.AWS_SESSION_TOKEN;
          }
          if (isUndefined(awsAccessId) || isUndefined(awsSecretKey)) {
            var filename;
            var user_profile = options.profile || process.env.AWS_PROFILE || "default";
            try {
              if (!isUndefined(options.filename)) {
                filename = options.filename;
              } else {
                filename = _loadDefaultFilename();
              }
              var creds = getCredentials(fs.readFileSync(filename, "utf-8"));
              var profile = creds[user_profile];
              awsAccessId = profile.aws_access_key_id;
              awsSecretKey = profile.aws_secret_access_key;
              awsSTSToken = profile.aws_session_token;
            } catch (e5) {
              console.log(e5);
              console.log("Failed to read credentials for AWS_PROFILE " + user_profile + " from " + filename);
            }
          }
          if (isUndefined(awsAccessId) || isUndefined(awsSecretKey)) {
            console.log("To connect via WebSocket/SigV4, AWS Access Key ID and AWS Secret Key must be passed either in options or as environment variables; see README.md");
            throw new Error(exceptions.INVALID_CONNECT_OPTIONS);
          }
        } else {
          if (isUndefined(options.customAuthHeaders) && isUndefined(options.customAuthQueryString)) {
            console.log("To authenticate with a custom authorizer, you must provide the required HTTP headers or queryString; see README.md");
            throw new Error(exceptions.INVALID_CONNECT_OPTIONS);
          }
        }
        if (!isUndefined(options.host) && isUndefined(options.region)) {
          var pattern = /[a-zA-Z0-9]+\.iot\.([^\.]+)\.amazonaws\..+/;
          var region = pattern.exec(options.host);
          if (region === null) {
            console.log("Host endpoint is not valid");
            throw new Error(exceptions.INVALID_CONNECT_OPTIONS);
          } else {
            options.region = region[1];
          }
        }
        if (isUndefined(options.port)) {
          options.port = 443;
        }
        if (isUndefined(options.websocketOptions)) {
          options.websocketOptions = {
            protocol: "mqttv3.1"
          };
        } else {
          options.websocketOptions.protocol = "mqttv3.1";
        }
        if (options.protocol === "wss-custom-auth") {
          options.websocketOptions.headers = options.customAuthHeaders;
        }
      }
      if (!isUndefined(options) && options.debug === true) {
        console.log(options);
        console.log("attempting new mqtt connection...");
      }
      var protocols = {};
      protocols.mqtts = require_tls2();
      protocols.wss = require_ws4();
      function _loadDefaultFilename() {
        var home = process.env.HOME || process.env.USERPROFILE || (process.env.HOMEPATH ? (process.env.HOMEDRIVE || "C:/") + process.env.HOMEPATH : null);
        return path.join(home, ".aws", "credentials");
      }
      function _addToSubscriptionCache(topic2, options2) {
        var matches = activeSubscriptions.filter(function(element) {
          return element.topic === topic2;
        });
        if (matches.length === 0) {
          activeSubscriptions.push({
            topic: topic2,
            options: options2
          });
        }
      }
      function _deleteFromSubscriptionCache(topic2, options2) {
        var remaining = activeSubscriptions.filter(function(element) {
          return element.topic !== topic2;
        });
        activeSubscriptions = remaining;
      }
      function _updateSubscriptionCache(operation2, topics, options2) {
        var opFunc = null;
        if (autoResubscribe === false) {
          return;
        }
        if (operation2 === "subscribe") {
          opFunc = _addToSubscriptionCache;
        } else if (operation2 === "unsubscribe") {
          opFunc = _deleteFromSubscriptionCache;
        }
        if (Object.prototype.toString.call(topics) === "[object Array]") {
          topics.forEach(function(item, index, array) {
            opFunc(item, options2);
          });
        } else {
          opFunc(topics, options2);
        }
      }
      function _filling() {
        return connectionState === "inactive";
      }
      function _wrapper(client) {
        var protocol = options.protocol;
        if (protocol === "wss") {
          var url;
          if (awsAccessId === "" || awsSecretKey === "") {
            url = "wss://no-credentials-available";
          } else {
            url = prepareWebSocketUrl(options, awsAccessId, awsSecretKey, awsSTSToken);
          }
          if (options.debug === true) {
            console.log("using websockets, will connect to '" + url + "'...");
          }
          options.url = url;
        } else if (protocol === "wss-custom-auth") {
          options.url = prepareWebSocketCustomAuthUrl(options);
          if (options.debug === true) {
            console.log("using websockets custom auth, will connect to '" + options.url + "'...");
          }
          protocol = "wss";
        }
        return protocols[protocol](client, options);
      }
      var device3 = new mqtt.MqttClient(_wrapper, options);
      function _markConnectionStable() {
        currentReconnectTimeMs = baseReconnectTimeMs;
        device3.options.reconnectPeriod = currentReconnectTimeMs;
        connectionTimer = null;
        connectionState = "stable";
      }
      function _trimOfflinePublishQueueIfNecessary() {
        var rc = true;
        if (offlineQueueMaxSize > 0 && offlinePublishQueue.length >= offlineQueueMaxSize) {
          if (offlineQueueDropBehavior === "oldest") {
            offlinePublishQueue.shift();
          } else {
            rc = false;
          }
        }
        return rc;
      }
      function _drainOperationQueue() {
        var subscription = clonedSubscriptions.shift();
        if (!isUndefined(subscription)) {
          if (!isUndefined(subscription.callback)) {
            device3.subscribe(subscription.topic, subscription.options, subscription.callback);
          } else {
            device3.subscribe(subscription.topic, subscription.options);
          }
        } else {
          var req = offlineSubscriptionQueue.shift();
          if (!isUndefined(req)) {
            _updateSubscriptionCache(req.type, req.topics, req.options);
            if (req.type === "subscribe") {
              if (!isUndefined(req.callback)) {
                device3.subscribe(req.topics, req.options, req.callback);
              } else {
                device3.subscribe(req.topics, req.options);
              }
            } else if (req.type === "unsubscribe") {
              device3.unsubscribe(req.topics, req.callback);
            }
          } else {
            var offlinePublishMessage = offlinePublishQueue.shift();
            if (!isUndefined(offlinePublishMessage)) {
              device3.publish(
                offlinePublishMessage.topic,
                offlinePublishMessage.message,
                offlinePublishMessage.options,
                offlinePublishMessage.callback
              );
            }
            if (offlinePublishQueue.length === 0) {
              clearInterval(drainingTimer);
              drainingTimer = null;
            }
          }
        }
      }
      device3.on("connect", function(connack) {
        if (connectionTimer === null) {
          connectionTimer = setTimeout(
            _markConnectionStable,
            minimumConnectionTimeMs
          );
        }
        connectionState = "established";
        if (drainingTimer === null) {
          clonedSubscriptions = activeSubscriptions.slice(0);
          drainingTimer = setInterval(
            _drainOperationQueue,
            drainTimeMs
          );
        }
        that.emit("connect", connack);
      });
      device3.on("close", function(err) {
        if (!isUndefined(err)) {
          that.emit("error", err);
        }
        if (!isUndefined(options) && options.debug === true) {
          console.log("connection lost - will attempt reconnection in " + device3.options.reconnectPeriod / 1e3 + " seconds...");
        }
        clearTimeout(connectionTimer);
        connectionTimer = null;
        clearInterval(drainingTimer);
        drainingTimer = null;
        connectionState = "inactive";
        that.emit("close");
      });
      device3.on("reconnect", function() {
        currentReconnectTimeMs = currentReconnectTimeMs * 2;
        currentReconnectTimeMs = Math.min(maximumReconnectTimeMs, currentReconnectTimeMs);
        device3.options.reconnectPeriod = currentReconnectTimeMs;
        that.emit("reconnect");
      });
      device3.on("end", function() {
        that.emit("end");
      });
      device3.on("offline", function() {
        that.emit("offline");
      });
      device3.on("error", function(error3) {
        that.emit("error", error3);
      });
      device3.on("packetsend", function(packet) {
        that.emit("packetsend", packet);
      });
      device3.on("packetreceive", function(packet) {
        that.emit("packetreceive", packet);
      });
      device3.on("message", function(topic2, message, packet) {
        that.emit("message", topic2, message, packet);
      });
      this.publish = function(topic2, message, options2, callback) {
        if (offlineQueueing === true && (_filling() || drainingTimer !== null)) {
          if (_trimOfflinePublishQueueIfNecessary()) {
            offlinePublishQueue.push({
              topic: topic2,
              message,
              options: options2,
              callback
            });
          }
        } else {
          if (offlineQueueing === true || !_filling()) {
            device3.publish(topic2, message, options2, callback);
          }
        }
      };
      this.subscribe = function(topics, options2, callback) {
        if (!_filling() || autoResubscribe === false) {
          _updateSubscriptionCache("subscribe", topics, options2);
          if (!isUndefined(callback)) {
            device3.subscribe(topics, options2, callback);
          } else {
            device3.subscribe(topics, options2);
          }
        } else {
          if (offlineSubscriptionQueue.length < offlineSubscriptionQueueMaxSize) {
            offlineSubscriptionQueue.push({
              type: "subscribe",
              topics,
              options: options2,
              callback
            });
          } else {
            that.emit("error", new Error("Maximum queued offline subscription reached"));
          }
        }
      };
      this.unsubscribe = function(topics, callback) {
        if (!_filling() || autoResubscribe === false) {
          _updateSubscriptionCache("unsubscribe", topics);
          device3.unsubscribe(topics, callback);
        } else {
          if (offlineSubscriptionQueue.length < offlineSubscriptionQueueMaxSize) {
            offlineSubscriptionQueue.push({
              type: "unsubscribe",
              topics,
              options,
              callback
            });
          }
        }
      };
      this.end = function(force, callback) {
        device3.end(force, callback);
      };
      this.handleMessage = device3.handleMessage.bind(device3);
      device3.handleMessage = function(packet, callback) {
        that.handleMessage(packet, callback);
      };
      this.updateWebSocketCredentials = function(accessKeyId, secretKey, sessionToken, expiration) {
        awsAccessId = accessKeyId;
        awsSecretKey = secretKey;
        awsSTSToken = sessionToken;
      };
      this.getWebsocketHeaders = function() {
        return options.websocketOptions.headers;
      };
      this.updateCustomAuthHeaders = function(newHeaders) {
        options.websocketOptions.headers = newHeaders;
      };
      this.simulateNetworkFailure = function() {
        device3.stream.emit("error", new Error("simulated connection error"));
        device3.stream.end();
      };
    }
    inherits(DeviceClient, events.EventEmitter);
    module2.exports = DeviceClient;
    module2.exports.DeviceClient = DeviceClient;
    module2.exports.prepareWebSocketUrl = prepareWebSocketUrl;
    module2.exports.prepareWebSocketCustomAuthUrl = prepareWebSocketCustomAuthUrl;
  }
});

// ../../node_modules/aws-iot-device-sdk/thing/index.js
var require_thing = __commonJS({
  "../../node_modules/aws-iot-device-sdk/thing/index.js"(exports2, module2) {
    var events = require("events");
    var inherits = require("util").inherits;
    var deviceModule = require_device();
    var isUndefined = require_is_undefined();
    function buildThingShadowTopic(thingName, operation2, type) {
      if (!isUndefined(type)) {
        return "$aws/things/" + thingName + "/shadow/" + operation2 + "/" + type;
      }
      return "$aws/things/" + thingName + "/shadow/" + operation2;
    }
    function isThingShadowTopic(topicTokens, direction) {
      var rc = false;
      if (topicTokens[0] === "$aws") {
        if (topicTokens[1] === "things" && topicTokens[3] === "shadow" && (topicTokens[4] === "update" || topicTokens[4] === "get" || topicTokens[4] === "delete")) {
          if (direction === "subscribe") {
            if ((topicTokens[5] === "accepted" || topicTokens[5] === "rejected" || topicTokens[5] === "delta") && topicTokens.length === 6) {
              rc = true;
            }
          } else {
            if (topicTokens.length === 5) {
              rc = true;
            }
          }
        }
      }
      return rc;
    }
    function ThingShadowsClient(deviceOptions, thingShadowOptions) {
      if (!(this instanceof ThingShadowsClient)) {
        return new ThingShadowsClient(deviceOptions, thingShadowOptions);
      }
      var that = this;
      var thingShadows = [{}];
      var operationCount = 0;
      var operationTimeout = 1e4;
      var connected = true;
      var device3 = deviceModule.DeviceClient(deviceOptions);
      if (!isUndefined(thingShadowOptions)) {
        if (!isUndefined(thingShadowOptions.operationTimeout)) {
          operationTimeout = thingShadowOptions.operationTimeout;
        }
      }
      this._handleSubscriptions = function(thingName, topicSpecs, devFunction, callback) {
        var topics = [];
        for (var i5 = 0, topicsLen = topicSpecs.length; i5 < topicsLen; i5++) {
          for (var j5 = 0, opsLen = topicSpecs[i5].operations.length; j5 < opsLen; j5++) {
            for (var k5 = 0, statLen = topicSpecs[i5].statii.length; k5 < statLen; k5++) {
              topics.push(buildThingShadowTopic(
                thingName,
                topicSpecs[i5].operations[j5],
                topicSpecs[i5].statii[k5]
              ));
            }
          }
        }
        if (thingShadows[thingName].debug === true) {
          console.log(devFunction + " on " + topics);
        }
        var args = [];
        args.push(topics);
        if (devFunction === "subscribe") {
          args.push({
            qos: thingShadows[thingName].qos
          });
          args.push(function(err, granted) {
            if (!isUndefined(callback)) {
              if (err) {
                callback(err);
                return;
              }
              var failedTopics = [];
              for (var k6 = 0, grantedLen = granted.length; k6 < grantedLen; k6++) {
                if (granted[k6].qos === 128) {
                  failedTopics.push(granted[k6]);
                }
              }
              if (failedTopics.length > 0) {
                callback("Not all subscriptions were granted", failedTopics);
                return;
              }
              callback();
            }
          });
        } else {
          if (!isUndefined(callback)) {
            args.push(callback);
          }
        }
        device3[devFunction].apply(device3, args);
      };
      this._handleMessages = function(thingName, operation2, operationStatus, payload2) {
        var stateObject = {};
        try {
          stateObject = JSON.parse(payload2.toString());
        } catch (err) {
          if (deviceOptions.debug === true) {
            console.error("failed parsing JSON '" + payload2.toString() + "', " + err);
          }
          return;
        }
        var clientToken = stateObject.clientToken;
        var version = stateObject.version;
        delete stateObject.clientToken;
        if (!isUndefined(version) && operationStatus !== "rejected") {
          if (isUndefined(thingShadows[thingName].version) || version >= thingShadows[thingName].version) {
            thingShadows[thingName].version = version;
          } else {
            if (operation2 !== "delete" && thingShadows[thingName].discardStale === true) {
              if (deviceOptions.debug === true) {
                console.warn("out-of-date version '" + version + "' on '" + thingName + "' (local version '" + thingShadows[thingName].version + "')");
              }
              return;
            }
          }
        }
        if (operationStatus === "delta") {
          this.emit("delta", thingName, stateObject);
          return;
        }
        if (isUndefined(thingShadows[thingName].clientToken) || thingShadows[thingName].clientToken !== clientToken) {
          if (operationStatus === "accepted" && operation2 !== "get") {
            this.emit("foreignStateChange", thingName, operation2, stateObject);
          }
          return;
        }
        clearTimeout(
          thingShadows[thingName].timeout
        );
        delete thingShadows[thingName].timeout;
        delete thingShadows[thingName].clientToken;
        thingShadows[thingName].pending = false;
        if (thingShadows[thingName].persistentSubscribe === false) {
          this._handleSubscriptions(thingName, [{
            operations: [operation2],
            statii: ["accepted", "rejected"]
          }], "unsubscribe");
        }
        this.emit("status", thingName, operationStatus, clientToken, stateObject);
      };
      device3.on("connect", function() {
        that.emit("connect");
      });
      device3.on("close", function() {
        that.emit("close");
      });
      device3.on("reconnect", function() {
        that.emit("reconnect");
      });
      device3.on("offline", function() {
        that.emit("offline");
      });
      device3.on("error", function(error3) {
        that.emit("error", error3);
      });
      device3.on("packetsend", function(packet) {
        that.emit("packetsend", packet);
      });
      device3.on("packetreceive", function(packet) {
        that.emit("packetreceive", packet);
      });
      device3.on("message", function(topic2, payload2) {
        if (connected === true) {
          var topicTokens = topic2.split("/");
          if (isThingShadowTopic(topicTokens, "subscribe")) {
            if (thingShadows.hasOwnProperty(topicTokens[2])) {
              that._handleMessages(
                topicTokens[2],
                // thingName
                topicTokens[4],
                // operation
                topicTokens[5],
                // status
                payload2
              );
            }
          } else {
            that.emit("message", topic2, payload2);
          }
        }
      });
      this._thingOperation = function(thingName, operation2, stateObject) {
        var rc = null;
        if (thingShadows.hasOwnProperty(thingName)) {
          if (thingShadows[thingName].pending === false) {
            thingShadows[thingName].pending = true;
            var clientToken;
            if (isUndefined(stateObject.clientToken)) {
              var clientIdLength = deviceOptions.clientId.length;
              if (clientIdLength > 48) {
                clientToken = deviceOptions.clientId.substr(clientIdLength - 48) + "-" + operationCount++;
              } else {
                clientToken = deviceOptions.clientId + "-" + operationCount++;
              }
            } else {
              clientToken = stateObject.clientToken;
            }
            thingShadows[thingName].clientToken = clientToken;
            var publishTopic = buildThingShadowTopic(
              thingName,
              operation2
            );
            thingShadows[thingName].timeout = setTimeout(
              function(thingName2, clientToken2) {
                if (thingShadows[thingName2].persistentSubscribe === false) {
                  that._handleSubscriptions(thingName2, [{
                    operations: [operation2],
                    statii: ["accepted", "rejected"]
                  }], "unsubscribe");
                }
                thingShadows[thingName2].pending = false;
                delete thingShadows[thingName2].timeout;
                delete thingShadows[thingName2].clientToken;
                that.emit("timeout", thingName2, clientToken2);
              },
              operationTimeout,
              thingName,
              clientToken
            );
            if (thingShadows[thingName].persistentSubscribe === false) {
              this._handleSubscriptions(
                thingName,
                [{
                  operations: [operation2],
                  statii: ["accepted", "rejected"]
                }],
                "subscribe",
                function(err, failedTopics) {
                  if (!isUndefined(err) || !isUndefined(failedTopics)) {
                    console.warn("failed subscription to accepted/rejected topics");
                    return;
                  }
                  if (!isUndefined(stateObject)) {
                    if (!isUndefined(thingShadows[thingName].version) && thingShadows[thingName].enableVersioning) {
                      stateObject.version = thingShadows[thingName].version;
                    }
                    stateObject.clientToken = clientToken;
                    device3.publish(
                      publishTopic,
                      JSON.stringify(stateObject),
                      {
                        qos: thingShadows[thingName].qos
                      }
                    );
                    if (!isUndefined(thingShadows[thingName]) && thingShadows[thingName].debug === true) {
                      console.log("publishing '" + JSON.stringify(stateObject) + " on '" + publishTopic + "'");
                    }
                  }
                }
              );
            } else {
              if (!isUndefined(thingShadows[thingName].version) && thingShadows[thingName].enableVersioning) {
                stateObject.version = thingShadows[thingName].version;
              }
              stateObject.clientToken = clientToken;
              device3.publish(
                publishTopic,
                JSON.stringify(stateObject),
                {
                  qos: thingShadows[thingName].qos
                }
              );
              if (thingShadows[thingName].debug === true) {
                console.log("publishing '" + JSON.stringify(stateObject) + " on '" + publishTopic + "'");
              }
            }
            rc = clientToken;
          } else {
            if (deviceOptions.debug === true) {
              console.error(operation2 + " still in progress on thing: ", thingName);
            }
          }
        } else {
          if (deviceOptions.debug === true) {
            console.error("attempting to " + operation2 + " unknown thing: ", thingName);
          }
        }
        return rc;
      };
      this.register = function(thingName, options, callback) {
        if (!thingShadows.hasOwnProperty(thingName)) {
          var ignoreDeltas = false;
          var topicSpecs = [];
          thingShadows[thingName] = {
            persistentSubscribe: true,
            debug: false,
            discardStale: true,
            enableVersioning: true,
            qos: 0,
            pending: true
          };
          if (typeof options === "function") {
            callback = options;
            options = null;
          }
          if (!isUndefined(options)) {
            if (!isUndefined(options.ignoreDeltas)) {
              ignoreDeltas = options.ignoreDeltas;
            }
            if (!isUndefined(options.persistentSubscribe)) {
              thingShadows[thingName].persistentSubscribe = options.persistentSubscribe;
            }
            if (!isUndefined(options.debug)) {
              thingShadows[thingName].debug = options.debug;
            }
            if (!isUndefined(options.discardStale)) {
              thingShadows[thingName].discardStale = options.discardStale;
            }
            if (!isUndefined(options.enableVersioning)) {
              thingShadows[thingName].enableVersioning = options.enableVersioning;
            }
            if (!isUndefined(options.qos)) {
              thingShadows[thingName].qos = options.qos;
            }
          }
          if (ignoreDeltas === false) {
            topicSpecs.push({
              operations: ["update"],
              statii: ["delta"]
            });
          }
          if (thingShadows[thingName].persistentSubscribe === true) {
            topicSpecs.push({
              operations: ["update", "get", "delete"],
              statii: ["accepted", "rejected"]
            });
          }
          if (topicSpecs.length > 0) {
            this._handleSubscriptions(thingName, topicSpecs, "subscribe", function(err, failedTopics) {
              if (isUndefined(err) && isUndefined(failedTopics)) {
                thingShadows[thingName].pending = false;
              }
              if (!isUndefined(callback)) {
                callback(err, failedTopics);
              }
            });
          } else {
            thingShadows[thingName].pending = false;
            if (!isUndefined(callback)) {
              callback();
            }
          }
        } else {
          if (deviceOptions.debug === true) {
            console.error("thing already registered: ", thingName);
          }
        }
      };
      this.unregister = function(thingName) {
        if (thingShadows.hasOwnProperty(thingName)) {
          var topicSpecs = [];
          topicSpecs.push({
            operations: ["update"],
            statii: ["delta"]
          });
          if (thingShadows[thingName].persistentSubscribe === true) {
            topicSpecs.push({
              operations: ["update", "get", "delete"],
              statii: ["accepted", "rejected"]
            });
          }
          this._handleSubscriptions(thingName, topicSpecs, "unsubscribe");
          if (!isUndefined(thingShadows[thingName].timeout)) {
            clearTimeout(thingShadows[thingName].timeout);
          }
          delete thingShadows[thingName];
        } else {
          if (deviceOptions.debug === true) {
            console.error("attempting to unregister unknown thing: ", thingName);
          }
        }
      };
      this.update = function(thingName, stateObject) {
        var rc = null;
        if (isUndefined(stateObject.version)) {
          rc = that._thingOperation(thingName, "update", stateObject);
        } else {
          console.error("message can't contain 'version' property");
        }
        return rc;
      };
      this.get = function(thingName, clientToken) {
        var stateObject = {};
        if (!isUndefined(clientToken)) {
          stateObject.clientToken = clientToken;
        }
        return that._thingOperation(thingName, "get", stateObject);
      };
      this.delete = function(thingName, clientToken) {
        var stateObject = {};
        if (!isUndefined(clientToken)) {
          stateObject.clientToken = clientToken;
        }
        return that._thingOperation(thingName, "delete", stateObject);
      };
      this.publish = function(topic2, message, options, callback) {
        device3.publish(topic2, message, options, callback);
      };
      this.subscribe = function(topics, options, callback) {
        var topicsArray = [];
        if (typeof topics === "string") {
          topicsArray.push(topics);
        } else if (typeof topics === "object" && topics.length) {
          topicsArray = topics;
        }
        device3.subscribe(topicsArray, options, callback);
      };
      this.unsubscribe = function(topics, callback) {
        var topicsArray = [];
        if (typeof topics === "string") {
          topicsArray.push(topics);
        } else if (typeof topics === "object" && topics.length) {
          topicsArray = topics;
        }
        device3.unsubscribe(topicsArray, callback);
      };
      this.end = function(force, callback) {
        device3.end(force, callback);
      };
      this.updateWebSocketCredentials = function(accessKeyId, secretKey, sessionToken, expiration) {
        device3.updateWebSocketCredentials(accessKeyId, secretKey, sessionToken, expiration);
      };
      this.updateCustomAuthHeaders = function(newHeaders) {
        device3.updateCustomAuthHeaders(newHeaders);
      };
      this.setConnectionStatus = function(connectionStatus) {
        connected = connectionStatus;
      };
      events.EventEmitter.call(this);
    }
    inherits(ThingShadowsClient, events.EventEmitter);
    module2.exports = ThingShadowsClient;
  }
});

// ../../node_modules/aws-iot-device-sdk/jobs/index.js
var require_jobs = __commonJS({
  "../../node_modules/aws-iot-device-sdk/jobs/index.js"(exports2, module2) {
    var events = require("events");
    var inherits = require("util").inherits;
    var deviceModule = require_device();
    var isUndefined = require_is_undefined();
    function isJobTopic(topicTokens) {
      return topicTokens[0] === "$aws" && topicTokens[1] === "things" && topicTokens[3] === "jobs";
    }
    function buildJobTopic(thingName, jobId, operation2) {
      var result = "$aws/things/" + thingName + "/jobs/";
      if (isUndefined(operation2)) {
        operation2 = jobId;
      } else {
        result += jobId.toString() + "/";
      }
      result += operation2;
      return result;
    }
    function jobsClient(options) {
      if (!(this instanceof jobsClient)) {
        return new jobsClient(options);
      }
      var that = this;
      var jobSubscriptions = [];
      var device3 = deviceModule.DeviceClient(options);
      this._updateJobStatus = function(thingName, job, status, statusDetails, callback) {
        if (typeof statusDetails === "function") {
          callback = statusDetails;
          statusDetails = void 0;
        }
        if (!isUndefined(options) && options.debug === true) {
          console.log("updateJobStatus:", { thingName, jobId: job.id, status, statusDetails });
        }
        device3.publish(buildJobTopic(thingName, job.id, "update"), JSON.stringify({ status, statusDetails }), null, function(err) {
          if (isUndefined(err)) {
            job.status = { status, statusDetails };
          }
          if (!isUndefined(callback)) {
            callback(err);
          }
        });
      };
      this._buildJobObject = function(thingName, jobExecution) {
        if (isUndefined(jobExecution) || isUndefined(jobExecution.jobId)) {
          return null;
        }
        var job = {};
        job.id = jobExecution.jobId;
        job.document = jobExecution.jobDocument;
        job.operation = job.document.operation;
        job.status = { status: jobExecution.status, statusDetails: jobExecution.statusDetails };
        job.inProgress = function(statusDetails, callback) {
          that._updateJobStatus(thingName, job, "IN_PROGRESS", statusDetails, callback);
        };
        job.failed = function(statusDetails, callback) {
          that._updateJobStatus(thingName, job, "FAILED", statusDetails, callback);
        };
        job.succeeded = function(statusDetails, callback) {
          that._updateJobStatus(thingName, job, "SUCCEEDED", statusDetails, callback);
        };
        return job;
      };
      this._handleMessages = function(topic2, payload2) {
        var topicTokens = topic2.split("/");
        if (!isJobTopic(topicTokens)) {
          that.emit("message", topic2, payload2);
          return;
        }
        var thingName = topicTokens[2];
        var thing = jobSubscriptions.find(function(elem) {
          return elem.thingName === thingName;
        });
        if (isUndefined(thing)) {
          return;
        }
        var jobExecutionData = {};
        try {
          jobExecutionData = JSON.parse(payload2.toString());
        } catch (err) {
          if (options.debug === true) {
            console.error("failed parsing JSON '" + payload2.toString() + "', " + err);
          }
          return;
        }
        if (isUndefined(jobExecutionData.execution) || isUndefined(jobExecutionData.execution.jobId) || isUndefined(jobExecutionData.execution.jobDocument)) {
          return;
        }
        var operationName = jobExecutionData.execution.jobDocument.operation;
        var operation2 = thing.operations.find(function(elem) {
          return isUndefined(operationName) ? isUndefined(elem.operationName) : operationName === elem.operationName;
        });
        if (isUndefined(operation2)) {
          operation2 = thing.operations.find(function(elem) {
            return isUndefined(elem.operationName);
          });
          if (isUndefined(operation2)) {
            return;
          }
        }
        operation2.callback(null, that._buildJobObject(thingName, jobExecutionData.execution));
      };
      this.subscribeToJobs = function(thingName, operationName, callback) {
        if (isUndefined(callback)) {
          callback = operationName;
          operationName = null;
        }
        if (!isUndefined(options) && options.debug === true) {
          console.log("subscribeToJobs:", { thingName, operationName });
        }
        var thing = jobSubscriptions.find(function(elem) {
          return elem.thingName === thingName;
        });
        if (isUndefined(thing)) {
          thing = { thingName, operations: [] };
          jobSubscriptions.push(thing);
          device3.subscribe([buildJobTopic(thingName, "$next/get/accepted"), buildJobTopic(thingName, "notify-next")], function(err, granted) {
            if (!isUndefined(err)) {
              callback(err);
            }
          });
        }
        var operation2 = thing.operations.find(function(elem) {
          return isUndefined(operationName) ? isUndefined(elem.operationName) : operationName === elem.operationName;
        });
        if (!isUndefined(operation2)) {
          operation2.callback = callback;
        } else {
          operation2 = { operationName, callback };
          thing.operations.push(operation2);
        }
      };
      this.unsubscribeFromJobs = function(thingName, operationName, callback) {
        if (isUndefined(callback)) {
          callback = operationName;
          operationName = null;
        }
        if (!isUndefined(options) && options.debug === true) {
          console.log("unsubscribeFromJobs:", { thingName, operationName });
        }
        var iThing = jobSubscriptions.findIndex(function(elem) {
          return elem.thingName === thingName;
        });
        var notFoundError = new Error("subscription not found for given thing");
        if (iThing < 0) {
          callback(notFoundError);
          return;
        }
        var iOperation = jobSubscriptions[iThing].operations.findIndex(function(elem) {
          return isUndefined(operationName) ? isUndefined(elem.operationName) : operationName === elem.operationName;
        });
        if (iOperation < 0) {
          callback(notFoundError);
          return;
        }
        jobSubscriptions[iThing].operations.splice(iOperation, 1);
        if (jobSubscriptions[iThing].operations.length === 0) {
          jobSubscriptions.splice(iThing, 1);
          device3.unsubscribe([buildJobTopic(thingName, "$next/get/accepted"), buildJobTopic(thingName, "notify-next")], callback);
          return;
        }
        callback();
      };
      this.startJobNotifications = function(thingName, callback) {
        if (!isUndefined(options) && options.debug === true) {
          console.log("startJobNotifications:", { thingName });
        }
        device3.publish(buildJobTopic(thingName, "$next", "get"), "{}", callback);
      };
      device3.on("connect", function() {
        that.emit("connect");
      });
      device3.on("close", function() {
        that.emit("close");
      });
      device3.on("reconnect", function() {
        that.emit("reconnect");
      });
      device3.on("offline", function() {
        that.emit("offline");
      });
      device3.on("error", function(error3) {
        that.emit("error", error3);
      });
      device3.on("message", that._handleMessages);
      this.publish = device3.publish;
      this.subscribe = device3.subscribe;
      this.unsubscribe = device3.unsubscribe;
      this.end = device3.end;
      this.handleMessage = device3.handleMessage;
      this.updateWebSocketCredentials = device3.updateWebSocketCredentials;
      this.simulateNetworkFailure = device3.simulateNetworkFailure;
    }
    inherits(jobsClient, events.EventEmitter);
    module2.exports = jobsClient;
  }
});

// ../../node_modules/aws-iot-device-sdk/index.js
var require_aws_iot_device_sdk = __commonJS({
  "../../node_modules/aws-iot-device-sdk/index.js"(exports2, module2) {
    module2.exports.device = require_device();
    module2.exports.thingShadow = require_thing();
    module2.exports.jobs = require_jobs();
  }
});

// ../../node_modules/@smithy/types/dist-cjs/index.js
var require_dist_cjs = __commonJS({
  "../../node_modules/@smithy/types/dist-cjs/index.js"(exports2) {
    "use strict";
    exports2.HttpAuthLocation = void 0;
    (function(HttpAuthLocation) {
      HttpAuthLocation["HEADER"] = "header";
      HttpAuthLocation["QUERY"] = "query";
    })(exports2.HttpAuthLocation || (exports2.HttpAuthLocation = {}));
    exports2.HttpApiKeyAuthLocation = void 0;
    (function(HttpApiKeyAuthLocation2) {
      HttpApiKeyAuthLocation2["HEADER"] = "header";
      HttpApiKeyAuthLocation2["QUERY"] = "query";
    })(exports2.HttpApiKeyAuthLocation || (exports2.HttpApiKeyAuthLocation = {}));
    exports2.EndpointURLScheme = void 0;
    (function(EndpointURLScheme) {
      EndpointURLScheme["HTTP"] = "http";
      EndpointURLScheme["HTTPS"] = "https";
    })(exports2.EndpointURLScheme || (exports2.EndpointURLScheme = {}));
    exports2.AlgorithmId = void 0;
    (function(AlgorithmId) {
      AlgorithmId["MD5"] = "md5";
      AlgorithmId["CRC32"] = "crc32";
      AlgorithmId["CRC32C"] = "crc32c";
      AlgorithmId["SHA1"] = "sha1";
      AlgorithmId["SHA256"] = "sha256";
    })(exports2.AlgorithmId || (exports2.AlgorithmId = {}));
    var getChecksumConfiguration = (runtimeConfig) => {
      const checksumAlgorithms = [];
      if (runtimeConfig.sha256 !== void 0) {
        checksumAlgorithms.push({
          algorithmId: () => exports2.AlgorithmId.SHA256,
          checksumConstructor: () => runtimeConfig.sha256
        });
      }
      if (runtimeConfig.md5 != void 0) {
        checksumAlgorithms.push({
          algorithmId: () => exports2.AlgorithmId.MD5,
          checksumConstructor: () => runtimeConfig.md5
        });
      }
      return {
        addChecksumAlgorithm(algo) {
          checksumAlgorithms.push(algo);
        },
        checksumAlgorithms() {
          return checksumAlgorithms;
        }
      };
    };
    var resolveChecksumRuntimeConfig = (clientConfig) => {
      const runtimeConfig = {};
      clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
        runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();
      });
      return runtimeConfig;
    };
    var getDefaultClientConfiguration = (runtimeConfig) => {
      return getChecksumConfiguration(runtimeConfig);
    };
    var resolveDefaultRuntimeConfig5 = (config) => {
      return resolveChecksumRuntimeConfig(config);
    };
    exports2.FieldPosition = void 0;
    (function(FieldPosition) {
      FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER";
      FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER";
    })(exports2.FieldPosition || (exports2.FieldPosition = {}));
    var SMITHY_CONTEXT_KEY2 = "__smithy_context";
    exports2.IniSectionType = void 0;
    (function(IniSectionType) {
      IniSectionType["PROFILE"] = "profile";
      IniSectionType["SSO_SESSION"] = "sso-session";
      IniSectionType["SERVICES"] = "services";
    })(exports2.IniSectionType || (exports2.IniSectionType = {}));
    exports2.RequestHandlerProtocol = void 0;
    (function(RequestHandlerProtocol) {
      RequestHandlerProtocol["HTTP_0_9"] = "http/0.9";
      RequestHandlerProtocol["HTTP_1_0"] = "http/1.0";
      RequestHandlerProtocol["TDS_8_0"] = "tds/8.0";
    })(exports2.RequestHandlerProtocol || (exports2.RequestHandlerProtocol = {}));
    exports2.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY2;
    exports2.getDefaultClientConfiguration = getDefaultClientConfiguration;
    exports2.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig5;
  }
});

// ../../node_modules/@smithy/protocol-http/dist-cjs/index.js
var require_dist_cjs2 = __commonJS({
  "../../node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2) {
    "use strict";
    var types = require_dist_cjs();
    var getHttpHandlerExtensionConfiguration5 = (runtimeConfig) => {
      return {
        setHttpHandler(handler2) {
          runtimeConfig.httpHandler = handler2;
        },
        httpHandler() {
          return runtimeConfig.httpHandler;
        },
        updateHttpClientConfig(key, value) {
          runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);
        },
        httpHandlerConfigs() {
          return runtimeConfig.httpHandler.httpHandlerConfigs();
        }
      };
    };
    var resolveHttpHandlerRuntimeConfig5 = (httpHandlerExtensionConfiguration) => {
      return {
        httpHandler: httpHandlerExtensionConfiguration.httpHandler()
      };
    };
    var Field = class {
      name;
      kind;
      values;
      constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) {
        this.name = name;
        this.kind = kind;
        this.values = values;
      }
      add(value) {
        this.values.push(value);
      }
      set(values) {
        this.values = values;
      }
      remove(value) {
        this.values = this.values.filter((v) => v !== value);
      }
      toString() {
        return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", ");
      }
      get() {
        return this.values;
      }
    };
    var Fields = class {
      entries = {};
      encoding;
      constructor({ fields = [], encoding = "utf-8" }) {
        fields.forEach(this.setField.bind(this));
        this.encoding = encoding;
      }
      setField(field) {
        this.entries[field.name.toLowerCase()] = field;
      }
      getField(name) {
        return this.entries[name.toLowerCase()];
      }
      removeField(name) {
        delete this.entries[name.toLowerCase()];
      }
      getByType(kind) {
        return Object.values(this.entries).filter((field) => field.kind === kind);
      }
    };
    var HttpRequest10 = class _HttpRequest {
      method;
      protocol;
      hostname;
      port;
      path;
      query;
      headers;
      username;
      password;
      fragment;
      body;
      constructor(options) {
        this.method = options.method || "GET";
        this.hostname = options.hostname || "localhost";
        this.port = options.port;
        this.query = options.query || {};
        this.headers = options.headers || {};
        this.body = options.body;
        this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
        this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
        this.username = options.username;
        this.password = options.password;
        this.fragment = options.fragment;
      }
      static clone(request) {
        const cloned = new _HttpRequest({
          ...request,
          headers: { ...request.headers }
        });
        if (cloned.query) {
          cloned.query = cloneQuery(cloned.query);
        }
        return cloned;
      }
      static isInstance(request) {
        if (!request) {
          return false;
        }
        const req = request;
        return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
      }
      clone() {
        return _HttpRequest.clone(this);
      }
    };
    function cloneQuery(query) {
      return Object.keys(query).reduce((carry, paramName) => {
        const param = query[paramName];
        return {
          ...carry,
          [paramName]: Array.isArray(param) ? [...param] : param
        };
      }, {});
    }
    var HttpResponse4 = class {
      statusCode;
      reason;
      headers;
      body;
      constructor(options) {
        this.statusCode = options.statusCode;
        this.reason = options.reason;
        this.headers = options.headers || {};
        this.body = options.body;
      }
      static isInstance(response) {
        if (!response)
          return false;
        const resp = response;
        return typeof resp.statusCode === "number" && typeof resp.headers === "object";
      }
    };
    function isValidHostname(hostname) {
      const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
      return hostPattern.test(hostname);
    }
    exports2.Field = Field;
    exports2.Fields = Fields;
    exports2.HttpRequest = HttpRequest10;
    exports2.HttpResponse = HttpResponse4;
    exports2.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration5;
    exports2.isValidHostname = isValidHostname;
    exports2.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig5;
  }
});

// ../../node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js
var require_dist_cjs3 = __commonJS({
  "../../node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js"(exports2) {
    "use strict";
    var protocolHttp = require_dist_cjs2();
    function resolveHostHeaderConfig5(input) {
      return input;
    }
    var hostHeaderMiddleware = (options) => (next) => async (args) => {
      if (!protocolHttp.HttpRequest.isInstance(args.request))
        return next(args);
      const { request } = args;
      const { handlerProtocol = "" } = options.requestHandler.metadata || {};
      if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) {
        delete request.headers["host"];
        request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : "");
      } else if (!request.headers["host"]) {
        let host = request.hostname;
        if (request.port != null)
          host += `:${request.port}`;
        request.headers["host"] = host;
      }
      return next(args);
    };
    var hostHeaderMiddlewareOptions = {
      name: "hostHeaderMiddleware",
      step: "build",
      priority: "low",
      tags: ["HOST"],
      override: true
    };
    var getHostHeaderPlugin5 = (options) => ({
      applyToStack: (clientStack) => {
        clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);
      }
    });
    exports2.getHostHeaderPlugin = getHostHeaderPlugin5;
    exports2.hostHeaderMiddleware = hostHeaderMiddleware;
    exports2.hostHeaderMiddlewareOptions = hostHeaderMiddlewareOptions;
    exports2.resolveHostHeaderConfig = resolveHostHeaderConfig5;
  }
});

// ../../node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js
var require_dist_cjs4 = __commonJS({
  "../../node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js"(exports2) {
    "use strict";
    var loggerMiddleware = () => (next, context) => async (args) => {
      try {
        const response = await next(args);
        const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context;
        const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
        const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
        const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;
        const { $metadata, ...outputWithoutMetadata } = response.output;
        logger2?.info?.({
          clientName,
          commandName,
          input: inputFilterSensitiveLog(args.input),
          output: outputFilterSensitiveLog(outputWithoutMetadata),
          metadata: $metadata
        });
        return response;
      } catch (error3) {
        const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context;
        const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
        const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
        logger2?.error?.({
          clientName,
          commandName,
          input: inputFilterSensitiveLog(args.input),
          error: error3,
          metadata: error3.$metadata
        });
        throw error3;
      }
    };
    var loggerMiddlewareOptions = {
      name: "loggerMiddleware",
      tags: ["LOGGER"],
      step: "initialize",
      override: true
    };
    var getLoggerPlugin5 = (options) => ({
      applyToStack: (clientStack) => {
        clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);
      }
    });
    exports2.getLoggerPlugin = getLoggerPlugin5;
    exports2.loggerMiddleware = loggerMiddleware;
    exports2.loggerMiddlewareOptions = loggerMiddlewareOptions;
  }
});

// ../../node_modules/@aws/lambda-invoke-store/dist-es/invoke-store.js
var invoke_store_exports = {};
__export(invoke_store_exports, {
  InvokeStore: () => InvokeStore,
  InvokeStoreBase: () => InvokeStoreBase
});
var PROTECTED_KEYS, NO_GLOBAL_AWS_LAMBDA, InvokeStoreBase, InvokeStoreSingle, InvokeStoreMulti, InvokeStore;
var init_invoke_store = __esm({
  "../../node_modules/@aws/lambda-invoke-store/dist-es/invoke-store.js"() {
    PROTECTED_KEYS = {
      REQUEST_ID: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_REQUEST_ID"),
      X_RAY_TRACE_ID: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"),
      TENANT_ID: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_TENANT_ID")
    };
    NO_GLOBAL_AWS_LAMBDA = ["true", "1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA ?? "");
    if (!NO_GLOBAL_AWS_LAMBDA) {
      globalThis.awslambda = globalThis.awslambda || {};
    }
    InvokeStoreBase = class {
      static PROTECTED_KEYS = PROTECTED_KEYS;
      isProtectedKey(key) {
        return Object.values(PROTECTED_KEYS).includes(key);
      }
      getRequestId() {
        return this.get(PROTECTED_KEYS.REQUEST_ID) ?? "-";
      }
      getXRayTraceId() {
        return this.get(PROTECTED_KEYS.X_RAY_TRACE_ID);
      }
      getTenantId() {
        return this.get(PROTECTED_KEYS.TENANT_ID);
      }
    };
    InvokeStoreSingle = class extends InvokeStoreBase {
      currentContext;
      getContext() {
        return this.currentContext;
      }
      hasContext() {
        return this.currentContext !== void 0;
      }
      get(key) {
        return this.currentContext?.[key];
      }
      set(key, value) {
        if (this.isProtectedKey(key)) {
          throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`);
        }
        this.currentContext = this.currentContext || {};
        this.currentContext[key] = value;
      }
      run(context, fn) {
        this.currentContext = context;
        return fn();
      }
    };
    InvokeStoreMulti = class _InvokeStoreMulti extends InvokeStoreBase {
      als;
      static async create() {
        const instance = new _InvokeStoreMulti();
        const asyncHooks = await import("node:async_hooks");
        instance.als = new asyncHooks.AsyncLocalStorage();
        return instance;
      }
      getContext() {
        return this.als.getStore();
      }
      hasContext() {
        return this.als.getStore() !== void 0;
      }
      get(key) {
        return this.als.getStore()?.[key];
      }
      set(key, value) {
        if (this.isProtectedKey(key)) {
          throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`);
        }
        const store = this.als.getStore();
        if (!store) {
          throw new Error("No context available");
        }
        store[key] = value;
      }
      run(context, fn) {
        return this.als.run(context, fn);
      }
    };
    (function(InvokeStore2) {
      let instance = null;
      async function getInstanceAsync(forceInvokeStoreMulti) {
        if (!instance) {
          instance = (async () => {
            const isMulti = forceInvokeStoreMulti === true || "AWS_LAMBDA_MAX_CONCURRENCY" in process.env;
            const newInstance = isMulti ? await InvokeStoreMulti.create() : new InvokeStoreSingle();
            if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda?.InvokeStore) {
              return globalThis.awslambda.InvokeStore;
            } else if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda) {
              globalThis.awslambda.InvokeStore = newInstance;
              return newInstance;
            } else {
              return newInstance;
            }
          })();
        }
        return instance;
      }
      InvokeStore2.getInstanceAsync = getInstanceAsync;
      InvokeStore2._testing = process.env.AWS_LAMBDA_BENCHMARK_MODE === "1" ? {
        reset: () => {
          instance = null;
          if (globalThis.awslambda?.InvokeStore) {
            delete globalThis.awslambda.InvokeStore;
          }
          globalThis.awslambda = { InvokeStore: void 0 };
        }
      } : void 0;
    })(InvokeStore || (InvokeStore = {}));
  }
});

// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.js
var require_recursionDetectionMiddleware = __commonJS({
  "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.recursionDetectionMiddleware = void 0;
    var lambda_invoke_store_1 = (init_invoke_store(), __toCommonJS(invoke_store_exports));
    var protocol_http_1 = require_dist_cjs2();
    var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
    var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
    var ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
    var recursionDetectionMiddleware = () => (next) => async (args) => {
      const { request } = args;
      if (!protocol_http_1.HttpRequest.isInstance(request)) {
        return next(args);
      }
      const traceIdHeader = Object.keys(request.headers ?? {}).find((h5) => h5.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME;
      if (request.headers.hasOwnProperty(traceIdHeader)) {
        return next(args);
      }
      const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
      const traceIdFromEnv = process.env[ENV_TRACE_ID];
      const invokeStore = await lambda_invoke_store_1.InvokeStore.getInstanceAsync();
      const traceIdFromInvokeStore = invokeStore?.getXRayTraceId();
      const traceId = traceIdFromInvokeStore ?? traceIdFromEnv;
      const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
      if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
        request.headers[TRACE_ID_HEADER_NAME] = traceId;
      }
      return next({
        ...args,
        request
      });
    };
    exports2.recursionDetectionMiddleware = recursionDetectionMiddleware;
  }
});

// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js
var require_dist_cjs5 = __commonJS({
  "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js"(exports2) {
    "use strict";
    var recursionDetectionMiddleware = require_recursionDetectionMiddleware();
    var recursionDetectionMiddlewareOptions = {
      step: "build",
      tags: ["RECURSION_DETECTION"],
      name: "recursionDetectionMiddleware",
      override: true,
      priority: "low"
    };
    var getRecursionDetectionPlugin5 = (options) => ({
      applyToStack: (clientStack) => {
        clientStack.add(recursionDetectionMiddleware.recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions);
      }
    });
    exports2.getRecursionDetectionPlugin = getRecursionDetectionPlugin5;
    Object.prototype.hasOwnProperty.call(recursionDetectionMiddleware, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: recursionDetectionMiddleware["__proto__"]
    });
    Object.keys(recursionDetectionMiddleware).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = recursionDetectionMiddleware[k5];
    });
  }
});

// ../../node_modules/@smithy/core/dist-es/getSmithyContext.js
var import_types, getSmithyContext;
var init_getSmithyContext = __esm({
  "../../node_modules/@smithy/core/dist-es/getSmithyContext.js"() {
    import_types = __toESM(require_dist_cjs());
    getSmithyContext = (context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {});
  }
});

// ../../node_modules/@smithy/util-middleware/dist-cjs/index.js
var require_dist_cjs6 = __commonJS({
  "../../node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2) {
    "use strict";
    var types = require_dist_cjs();
    var getSmithyContext11 = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {});
    var normalizeProvider6 = (input) => {
      if (typeof input === "function")
        return input;
      const promisified = Promise.resolve(input);
      return () => promisified;
    };
    exports2.getSmithyContext = getSmithyContext11;
    exports2.normalizeProvider = normalizeProvider6;
  }
});

// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js
var resolveAuthOptions;
var init_resolveAuthOptions = __esm({
  "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js"() {
    resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => {
      if (!authSchemePreference || authSchemePreference.length === 0) {
        return candidateAuthOptions;
      }
      const preferredAuthOptions = [];
      for (const preferredSchemeName of authSchemePreference) {
        for (const candidateAuthOption of candidateAuthOptions) {
          const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1];
          if (candidateAuthSchemeName === preferredSchemeName) {
            preferredAuthOptions.push(candidateAuthOption);
          }
        }
      }
      for (const candidateAuthOption of candidateAuthOptions) {
        if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) {
          preferredAuthOptions.push(candidateAuthOption);
        }
      }
      return preferredAuthOptions;
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js
function convertHttpAuthSchemesToMap(httpAuthSchemes) {
  const map2 = /* @__PURE__ */ new Map();
  for (const scheme of httpAuthSchemes) {
    map2.set(scheme.schemeId, scheme);
  }
  return map2;
}
var import_util_middleware, httpAuthSchemeMiddleware;
var init_httpAuthSchemeMiddleware = __esm({
  "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() {
    import_util_middleware = __toESM(require_dist_cjs6());
    init_resolveAuthOptions();
    httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => {
      const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input));
      const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];
      const resolvedOptions = resolveAuthOptions(options, authSchemePreference);
      const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
      const smithyContext = (0, import_util_middleware.getSmithyContext)(context);
      const failureReasons = [];
      for (const option of resolvedOptions) {
        const scheme = authSchemes.get(option.schemeId);
        if (!scheme) {
          failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`);
          continue;
        }
        const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));
        if (!identityProvider) {
          failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`);
          continue;
        }
        const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};
        option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);
        option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);
        smithyContext.selectedHttpAuthScheme = {
          httpAuthOption: option,
          identity: await identityProvider(option.identityProperties),
          signer: scheme.signer
        };
        break;
      }
      if (!smithyContext.selectedHttpAuthScheme) {
        throw new Error(failureReasons.join("\n"));
      }
      return next(args);
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js
var httpAuthSchemeEndpointRuleSetMiddlewareOptions, getHttpAuthSchemeEndpointRuleSetPlugin;
var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({
  "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"() {
    init_httpAuthSchemeMiddleware();
    httpAuthSchemeEndpointRuleSetMiddlewareOptions = {
      step: "serialize",
      tags: ["HTTP_AUTH_SCHEME"],
      name: "httpAuthSchemeMiddleware",
      override: true,
      relation: "before",
      toMiddleware: "endpointV2Middleware"
    };
    getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({
      applyToStack: (clientStack) => {
        clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {
          httpAuthSchemeParametersProvider,
          identityProviderConfigProvider
        }), httpAuthSchemeEndpointRuleSetMiddlewareOptions);
      }
    });
  }
});

// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js
var httpAuthSchemeMiddlewareOptions, getHttpAuthSchemePlugin;
var init_getHttpAuthSchemePlugin = __esm({
  "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() {
    init_httpAuthSchemeMiddleware();
    httpAuthSchemeMiddlewareOptions = {
      step: "serialize",
      tags: ["HTTP_AUTH_SCHEME"],
      name: "httpAuthSchemeMiddleware",
      override: true,
      relation: "before",
      toMiddleware: "serializerMiddleware"
    };
    getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({
      applyToStack: (clientStack) => {
        clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {
          httpAuthSchemeParametersProvider,
          identityProviderConfigProvider
        }), httpAuthSchemeMiddlewareOptions);
      }
    });
  }
});

// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js
var init_middleware_http_auth_scheme = __esm({
  "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js"() {
    init_httpAuthSchemeMiddleware();
    init_getHttpAuthSchemeEndpointRuleSetPlugin();
    init_getHttpAuthSchemePlugin();
  }
});

// ../../node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js
var import_protocol_http, import_util_middleware2, defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware;
var init_httpSigningMiddleware = __esm({
  "../../node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js"() {
    import_protocol_http = __toESM(require_dist_cjs2());
    import_util_middleware2 = __toESM(require_dist_cjs6());
    defaultErrorHandler = (signingProperties) => (error3) => {
      throw error3;
    };
    defaultSuccessHandler = (httpResponse, signingProperties) => {
    };
    httpSigningMiddleware = (config) => (next, context) => async (args) => {
      if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
        return next(args);
      }
      const smithyContext = (0, import_util_middleware2.getSmithyContext)(context);
      const scheme = smithyContext.selectedHttpAuthScheme;
      if (!scheme) {
        throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
      }
      const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme;
      const output = await next({
        ...args,
        request: await signer.sign(args.request, identity, signingProperties)
      }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));
      (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);
      return output;
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js
var httpSigningMiddlewareOptions, getHttpSigningPlugin;
var init_getHttpSigningMiddleware = __esm({
  "../../node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"() {
    init_httpSigningMiddleware();
    httpSigningMiddlewareOptions = {
      step: "finalizeRequest",
      tags: ["HTTP_SIGNING"],
      name: "httpSigningMiddleware",
      aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"],
      override: true,
      relation: "after",
      toMiddleware: "retryMiddleware"
    };
    getHttpSigningPlugin = (config) => ({
      applyToStack: (clientStack) => {
        clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions);
      }
    });
  }
});

// ../../node_modules/@smithy/core/dist-es/middleware-http-signing/index.js
var init_middleware_http_signing = __esm({
  "../../node_modules/@smithy/core/dist-es/middleware-http-signing/index.js"() {
    init_httpSigningMiddleware();
    init_getHttpSigningMiddleware();
  }
});

// ../../node_modules/@smithy/core/dist-es/normalizeProvider.js
var normalizeProvider;
var init_normalizeProvider = __esm({
  "../../node_modules/@smithy/core/dist-es/normalizeProvider.js"() {
    normalizeProvider = (input) => {
      if (typeof input === "function")
        return input;
      const promisified = Promise.resolve(input);
      return () => promisified;
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/pagination/createPaginator.js
function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) {
  return async function* paginateOperation(config, input, ...additionalArguments) {
    const _input = input;
    let token = config.startingToken ?? _input[inputTokenName];
    let hasNext = true;
    let page;
    while (hasNext) {
      _input[inputTokenName] = token;
      if (pageSizeTokenName) {
        _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config.pageSize;
      }
      if (config.client instanceof ClientCtor) {
        page = await makePagedClientRequest(CommandCtor, config.client, input, config.withCommand, ...additionalArguments);
      } else {
        throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`);
      }
      yield page;
      const prevToken = token;
      token = get(page, outputTokenName);
      hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
    }
    return void 0;
  };
}
var makePagedClientRequest, get;
var init_createPaginator = __esm({
  "../../node_modules/@smithy/core/dist-es/pagination/createPaginator.js"() {
    makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_) => _, ...args) => {
      let command = new CommandCtor(input);
      command = withCommand(command) ?? command;
      return await client.send(command, ...args);
    };
    get = (fromObject, path) => {
      let cursor2 = fromObject;
      const pathComponents = path.split(".");
      for (const step of pathComponents) {
        if (!cursor2 || typeof cursor2 !== "object") {
          return void 0;
        }
        cursor2 = cursor2[step];
      }
      return cursor2;
    };
  }
});

// ../../node_modules/@smithy/is-array-buffer/dist-cjs/index.js
var require_dist_cjs7 = __commonJS({
  "../../node_modules/@smithy/is-array-buffer/dist-cjs/index.js"(exports2) {
    "use strict";
    var isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]";
    exports2.isArrayBuffer = isArrayBuffer;
  }
});

// ../../node_modules/@smithy/util-buffer-from/dist-cjs/index.js
var require_dist_cjs8 = __commonJS({
  "../../node_modules/@smithy/util-buffer-from/dist-cjs/index.js"(exports2) {
    "use strict";
    var isArrayBuffer = require_dist_cjs7();
    var buffer = require("buffer");
    var fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {
      if (!isArrayBuffer.isArrayBuffer(input)) {
        throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
      }
      return buffer.Buffer.from(input, offset, length);
    };
    var fromString = (input, encoding) => {
      if (typeof input !== "string") {
        throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
      }
      return encoding ? buffer.Buffer.from(input, encoding) : buffer.Buffer.from(input);
    };
    exports2.fromArrayBuffer = fromArrayBuffer;
    exports2.fromString = fromString;
  }
});

// ../../node_modules/@smithy/util-base64/dist-cjs/fromBase64.js
var require_fromBase64 = __commonJS({
  "../../node_modules/@smithy/util-base64/dist-cjs/fromBase64.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.fromBase64 = void 0;
    var util_buffer_from_1 = require_dist_cjs8();
    var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
    var fromBase649 = (input) => {
      if (input.length * 3 % 4 !== 0) {
        throw new TypeError(`Incorrect padding on base64 string.`);
      }
      if (!BASE64_REGEX.exec(input)) {
        throw new TypeError(`Invalid base64 string.`);
      }
      const buffer = (0, util_buffer_from_1.fromString)(input, "base64");
      return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
    };
    exports2.fromBase64 = fromBase649;
  }
});

// ../../node_modules/@smithy/util-utf8/dist-cjs/index.js
var require_dist_cjs9 = __commonJS({
  "../../node_modules/@smithy/util-utf8/dist-cjs/index.js"(exports2) {
    "use strict";
    var utilBufferFrom = require_dist_cjs8();
    var fromUtf88 = (input) => {
      const buf = utilBufferFrom.fromString(input, "utf8");
      return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
    };
    var toUint8Array2 = (data2) => {
      if (typeof data2 === "string") {
        return fromUtf88(data2);
      }
      if (ArrayBuffer.isView(data2)) {
        return new Uint8Array(data2.buffer, data2.byteOffset, data2.byteLength / Uint8Array.BYTES_PER_ELEMENT);
      }
      return new Uint8Array(data2);
    };
    var toUtf811 = (input) => {
      if (typeof input === "string") {
        return input;
      }
      if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
        throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
      }
      return utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
    };
    exports2.fromUtf8 = fromUtf88;
    exports2.toUint8Array = toUint8Array2;
    exports2.toUtf8 = toUtf811;
  }
});

// ../../node_modules/@smithy/util-base64/dist-cjs/toBase64.js
var require_toBase64 = __commonJS({
  "../../node_modules/@smithy/util-base64/dist-cjs/toBase64.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.toBase64 = void 0;
    var util_buffer_from_1 = require_dist_cjs8();
    var util_utf8_1 = require_dist_cjs9();
    var toBase649 = (_input) => {
      let input;
      if (typeof _input === "string") {
        input = (0, util_utf8_1.fromUtf8)(_input);
      } else {
        input = _input;
      }
      if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
        throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
      }
      return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64");
    };
    exports2.toBase64 = toBase649;
  }
});

// ../../node_modules/@smithy/util-base64/dist-cjs/index.js
var require_dist_cjs10 = __commonJS({
  "../../node_modules/@smithy/util-base64/dist-cjs/index.js"(exports2) {
    "use strict";
    var fromBase649 = require_fromBase64();
    var toBase649 = require_toBase64();
    Object.prototype.hasOwnProperty.call(fromBase649, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: fromBase649["__proto__"]
    });
    Object.keys(fromBase649).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = fromBase649[k5];
    });
    Object.prototype.hasOwnProperty.call(toBase649, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: toBase649["__proto__"]
    });
    Object.keys(toBase649).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = toBase649[k5];
    });
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js
var require_ChecksumStream = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ChecksumStream = void 0;
    var util_base64_1 = require_dist_cjs10();
    var stream_1 = require("stream");
    var ChecksumStream = class extends stream_1.Duplex {
      expectedChecksum;
      checksumSourceLocation;
      checksum;
      source;
      base64Encoder;
      pendingCallback = null;
      constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) {
        super();
        if (typeof source.pipe === "function") {
          this.source = source;
        } else {
          throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
        }
        this.base64Encoder = base64Encoder ?? util_base64_1.toBase64;
        this.expectedChecksum = expectedChecksum;
        this.checksum = checksum;
        this.checksumSourceLocation = checksumSourceLocation;
        this.source.pipe(this);
      }
      _read(size) {
        if (this.pendingCallback) {
          const callback = this.pendingCallback;
          this.pendingCallback = null;
          callback();
        }
      }
      _write(chunk, encoding, callback) {
        try {
          this.checksum.update(chunk);
          const canPushMore = this.push(chunk);
          if (!canPushMore) {
            this.pendingCallback = callback;
            return;
          }
        } catch (e5) {
          return callback(e5);
        }
        return callback();
      }
      async _final(callback) {
        try {
          const digest = await this.checksum.digest();
          const received = this.base64Encoder(digest);
          if (this.expectedChecksum !== received) {
            return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}" in response header "${this.checksumSourceLocation}".`));
          }
        } catch (e5) {
          return callback(e5);
        }
        this.push(null);
        return callback();
      }
    };
    exports2.ChecksumStream = ChecksumStream;
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js
var require_stream_type_check = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.isBlob = exports2.isReadableStream = void 0;
    var isReadableStream = (stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);
    exports2.isReadableStream = isReadableStream;
    var isBlob = (blob) => {
      return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);
    };
    exports2.isBlob = isBlob;
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js
var require_ChecksumStream_browser = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ChecksumStream = void 0;
    var ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() {
    };
    var ChecksumStream = class extends ReadableStreamRef {
    };
    exports2.ChecksumStream = ChecksumStream;
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js
var require_createChecksumStream_browser = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.createChecksumStream = void 0;
    var util_base64_1 = require_dist_cjs10();
    var stream_type_check_1 = require_stream_type_check();
    var ChecksumStream_browser_1 = require_ChecksumStream_browser();
    var createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => {
      if (!(0, stream_type_check_1.isReadableStream)(source)) {
        throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
      }
      const encoder = base64Encoder ?? util_base64_1.toBase64;
      if (typeof TransformStream !== "function") {
        throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");
      }
      const transform = new TransformStream({
        start() {
        },
        async transform(chunk, controller) {
          checksum.update(chunk);
          controller.enqueue(chunk);
        },
        async flush(controller) {
          const digest = await checksum.digest();
          const received = encoder(digest);
          if (expectedChecksum !== received) {
            const error3 = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}" in response header "${checksumSourceLocation}".`);
            controller.error(error3);
          } else {
            controller.terminate();
          }
        }
      });
      source.pipeThrough(transform);
      const readable = transform.readable;
      Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype);
      return readable;
    };
    exports2.createChecksumStream = createChecksumStream;
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js
var require_createChecksumStream = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.createChecksumStream = createChecksumStream;
    var stream_type_check_1 = require_stream_type_check();
    var ChecksumStream_1 = require_ChecksumStream();
    var createChecksumStream_browser_1 = require_createChecksumStream_browser();
    function createChecksumStream(init) {
      if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) {
        return (0, createChecksumStream_browser_1.createChecksumStream)(init);
      }
      return new ChecksumStream_1.ChecksumStream(init);
    }
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js
var require_ByteArrayCollector = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ByteArrayCollector = void 0;
    var ByteArrayCollector = class {
      allocByteArray;
      byteLength = 0;
      byteArrays = [];
      constructor(allocByteArray) {
        this.allocByteArray = allocByteArray;
      }
      push(byteArray) {
        this.byteArrays.push(byteArray);
        this.byteLength += byteArray.byteLength;
      }
      flush() {
        if (this.byteArrays.length === 1) {
          const bytes = this.byteArrays[0];
          this.reset();
          return bytes;
        }
        const aggregation = this.allocByteArray(this.byteLength);
        let cursor2 = 0;
        for (let i5 = 0; i5 < this.byteArrays.length; ++i5) {
          const bytes = this.byteArrays[i5];
          aggregation.set(bytes, cursor2);
          cursor2 += bytes.byteLength;
        }
        this.reset();
        return aggregation;
      }
      reset() {
        this.byteArrays = [];
        this.byteLength = 0;
      }
    };
    exports2.ByteArrayCollector = ByteArrayCollector;
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js
var require_createBufferedReadableStream = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.createBufferedReadable = void 0;
    exports2.createBufferedReadableStream = createBufferedReadableStream;
    exports2.merge = merge;
    exports2.flush = flush;
    exports2.sizeOf = sizeOf;
    exports2.modeOf = modeOf;
    var ByteArrayCollector_1 = require_ByteArrayCollector();
    function createBufferedReadableStream(upstream, size, logger2) {
      const reader = upstream.getReader();
      let streamBufferingLoggedWarning = false;
      let bytesSeen = 0;
      const buffers = ["", new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2))];
      let mode = -1;
      const pull = async (controller) => {
        const { value, done } = await reader.read();
        const chunk = value;
        if (done) {
          if (mode !== -1) {
            const remainder = flush(buffers, mode);
            if (sizeOf(remainder) > 0) {
              controller.enqueue(remainder);
            }
          }
          controller.close();
        } else {
          const chunkMode = modeOf(chunk, false);
          if (mode !== chunkMode) {
            if (mode >= 0) {
              controller.enqueue(flush(buffers, mode));
            }
            mode = chunkMode;
          }
          if (mode === -1) {
            controller.enqueue(chunk);
            return;
          }
          const chunkSize = sizeOf(chunk);
          bytesSeen += chunkSize;
          const bufferSize = sizeOf(buffers[mode]);
          if (chunkSize >= size && bufferSize === 0) {
            controller.enqueue(chunk);
          } else {
            const newSize = merge(buffers, mode, chunk);
            if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
              streamBufferingLoggedWarning = true;
              logger2?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
            }
            if (newSize >= size) {
              controller.enqueue(flush(buffers, mode));
            } else {
              await pull(controller);
            }
          }
        }
      };
      return new ReadableStream({
        pull
      });
    }
    exports2.createBufferedReadable = createBufferedReadableStream;
    function merge(buffers, mode, chunk) {
      switch (mode) {
        case 0:
          buffers[0] += chunk;
          return sizeOf(buffers[0]);
        case 1:
        case 2:
          buffers[mode].push(chunk);
          return sizeOf(buffers[mode]);
      }
    }
    function flush(buffers, mode) {
      switch (mode) {
        case 0:
          const s = buffers[0];
          buffers[0] = "";
          return s;
        case 1:
        case 2:
          return buffers[mode].flush();
      }
      throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);
    }
    function sizeOf(chunk) {
      return chunk?.byteLength ?? chunk?.length ?? 0;
    }
    function modeOf(chunk, allowBuffer = true) {
      if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) {
        return 2;
      }
      if (chunk instanceof Uint8Array) {
        return 1;
      }
      if (typeof chunk === "string") {
        return 0;
      }
      return -1;
    }
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js
var require_createBufferedReadable = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.createBufferedReadable = createBufferedReadable;
    var node_stream_1 = require("node:stream");
    var ByteArrayCollector_1 = require_ByteArrayCollector();
    var createBufferedReadableStream_1 = require_createBufferedReadableStream();
    var stream_type_check_1 = require_stream_type_check();
    function createBufferedReadable(upstream, size, logger2) {
      if ((0, stream_type_check_1.isReadableStream)(upstream)) {
        return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger2);
      }
      const downstream = new node_stream_1.Readable({ read() {
      } });
      let streamBufferingLoggedWarning = false;
      let bytesSeen = 0;
      const buffers = [
        "",
        new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2)),
        new ByteArrayCollector_1.ByteArrayCollector((size2) => Buffer.from(new Uint8Array(size2)))
      ];
      let mode = -1;
      upstream.on("data", (chunk) => {
        const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true);
        if (mode !== chunkMode) {
          if (mode >= 0) {
            downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));
          }
          mode = chunkMode;
        }
        if (mode === -1) {
          downstream.push(chunk);
          return;
        }
        const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk);
        bytesSeen += chunkSize;
        const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]);
        if (chunkSize >= size && bufferSize === 0) {
          downstream.push(chunk);
        } else {
          const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk);
          if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
            streamBufferingLoggedWarning = true;
            logger2?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
          }
          if (newSize >= size) {
            downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));
          }
        }
      });
      upstream.on("end", () => {
        if (mode !== -1) {
          const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode);
          if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) {
            downstream.push(remainder);
          }
        }
        downstream.push(null);
      });
      return downstream;
    }
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.browser.js
var require_getAwsChunkedEncodingStream_browser = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.browser.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.getAwsChunkedEncodingStream = void 0;
    var getAwsChunkedEncodingStream = (readableStream, options) => {
      const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
      const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
      const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0;
      const reader = readableStream.getReader();
      return new ReadableStream({
        async pull(controller) {
          const { value, done } = await reader.read();
          if (done) {
            controller.enqueue(`0\r
`);
            if (checksumRequired) {
              const checksum = base64Encoder(await digest);
              controller.enqueue(`${checksumLocationName}:${checksum}\r
`);
              controller.enqueue(`\r
`);
            }
            controller.close();
          } else {
            controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r
${value}\r
`);
          }
        }
      });
    };
    exports2.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js
var require_getAwsChunkedEncodingStream = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;
    var node_stream_1 = require("node:stream");
    var getAwsChunkedEncodingStream_browser_1 = require_getAwsChunkedEncodingStream_browser();
    var stream_type_check_1 = require_stream_type_check();
    function getAwsChunkedEncodingStream(stream, options) {
      const readable = stream;
      const readableStream = stream;
      if ((0, stream_type_check_1.isReadableStream)(readableStream)) {
        return (0, getAwsChunkedEncodingStream_browser_1.getAwsChunkedEncodingStream)(readableStream, options);
      }
      const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
      const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
      const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : void 0;
      const awsChunkedEncodingStream = new node_stream_1.Readable({
        read: () => {
        }
      });
      readable.on("data", (data2) => {
        const length = bodyLengthChecker(data2) || 0;
        if (length === 0) {
          return;
        }
        awsChunkedEncodingStream.push(`${length.toString(16)}\r
`);
        awsChunkedEncodingStream.push(data2);
        awsChunkedEncodingStream.push("\r\n");
      });
      readable.on("end", async () => {
        awsChunkedEncodingStream.push(`0\r
`);
        if (checksumRequired) {
          const checksum = base64Encoder(await digest);
          awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r
`);
          awsChunkedEncodingStream.push(`\r
`);
        }
        awsChunkedEncodingStream.push(null);
      });
      return awsChunkedEncodingStream;
    }
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js
var require_headStream_browser = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.headStream = headStream;
    async function headStream(stream, bytes) {
      let byteLengthCounter = 0;
      const chunks2 = [];
      const reader = stream.getReader();
      let isDone = false;
      while (!isDone) {
        const { done, value } = await reader.read();
        if (value) {
          chunks2.push(value);
          byteLengthCounter += value?.byteLength ?? 0;
        }
        if (byteLengthCounter >= bytes) {
          break;
        }
        isDone = done;
      }
      reader.releaseLock();
      const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));
      let offset = 0;
      for (const chunk of chunks2) {
        if (chunk.byteLength > collected.byteLength - offset) {
          collected.set(chunk.subarray(0, collected.byteLength - offset), offset);
          break;
        } else {
          collected.set(chunk, offset);
        }
        offset += chunk.length;
      }
      return collected;
    }
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/headStream.js
var require_headStream = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/headStream.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.headStream = void 0;
    var stream_1 = require("stream");
    var headStream_browser_1 = require_headStream_browser();
    var stream_type_check_1 = require_stream_type_check();
    var headStream = (stream, bytes) => {
      if ((0, stream_type_check_1.isReadableStream)(stream)) {
        return (0, headStream_browser_1.headStream)(stream, bytes);
      }
      return new Promise((resolve, reject) => {
        const collector = new Collector();
        collector.limit = bytes;
        stream.pipe(collector);
        stream.on("error", (err) => {
          collector.end();
          reject(err);
        });
        collector.on("error", reject);
        collector.on("finish", function() {
          const bytes2 = new Uint8Array(Buffer.concat(this.buffers));
          resolve(bytes2);
        });
      });
    };
    exports2.headStream = headStream;
    var Collector = class extends stream_1.Writable {
      buffers = [];
      limit = Infinity;
      bytesBuffered = 0;
      _write(chunk, encoding, callback) {
        this.buffers.push(chunk);
        this.bytesBuffered += chunk.byteLength ?? 0;
        if (this.bytesBuffered >= this.limit) {
          const excess = this.bytesBuffered - this.limit;
          const tailBuffer = this.buffers[this.buffers.length - 1];
          this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess);
          this.emit("finish");
        }
        callback();
      }
    };
  }
});

// ../../node_modules/@smithy/util-uri-escape/dist-cjs/index.js
var require_dist_cjs11 = __commonJS({
  "../../node_modules/@smithy/util-uri-escape/dist-cjs/index.js"(exports2) {
    "use strict";
    var escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);
    var hexEncode = (c5) => `%${c5.charCodeAt(0).toString(16).toUpperCase()}`;
    var escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/");
    exports2.escapeUri = escapeUri;
    exports2.escapeUriPath = escapeUriPath;
  }
});

// ../../node_modules/@smithy/querystring-builder/dist-cjs/index.js
var require_dist_cjs12 = __commonJS({
  "../../node_modules/@smithy/querystring-builder/dist-cjs/index.js"(exports2) {
    "use strict";
    var utilUriEscape = require_dist_cjs11();
    function buildQueryString(query) {
      const parts = [];
      for (let key of Object.keys(query).sort()) {
        const value = query[key];
        key = utilUriEscape.escapeUri(key);
        if (Array.isArray(value)) {
          for (let i5 = 0, iLen = value.length; i5 < iLen; i5++) {
            parts.push(`${key}=${utilUriEscape.escapeUri(value[i5])}`);
          }
        } else {
          let qsEntry = key;
          if (value || typeof value === "string") {
            qsEntry += `=${utilUriEscape.escapeUri(value)}`;
          }
          parts.push(qsEntry);
        }
      }
      return parts.join("&");
    }
    exports2.buildQueryString = buildQueryString;
  }
});

// ../../node_modules/@smithy/node-http-handler/dist-cjs/index.js
var require_dist_cjs13 = __commonJS({
  "../../node_modules/@smithy/node-http-handler/dist-cjs/index.js"(exports2) {
    "use strict";
    var protocolHttp = require_dist_cjs2();
    var querystringBuilder = require_dist_cjs12();
    var node_https = require("node:https");
    var node_stream = require("node:stream");
    var http2 = require("node:http2");
    function buildAbortError(abortSignal) {
      const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : void 0;
      if (reason) {
        if (reason instanceof Error) {
          const abortError3 = new Error("Request aborted");
          abortError3.name = "AbortError";
          abortError3.cause = reason;
          return abortError3;
        }
        const abortError2 = new Error(String(reason));
        abortError2.name = "AbortError";
        return abortError2;
      }
      const abortError = new Error("Request aborted");
      abortError.name = "AbortError";
      return abortError;
    }
    var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
    var getTransformedHeaders = (headers) => {
      const transformedHeaders = {};
      for (const name of Object.keys(headers)) {
        const headerValues = headers[name];
        transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
      }
      return transformedHeaders;
    };
    var timing = {
      setTimeout: (cb, ms) => setTimeout(cb, ms),
      clearTimeout: (timeoutId) => clearTimeout(timeoutId)
    };
    var DEFER_EVENT_LISTENER_TIME$2 = 1e3;
    var setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
      if (!timeoutInMs) {
        return -1;
      }
      const registerTimeout = (offset) => {
        const timeoutId = timing.setTimeout(() => {
          request.destroy();
          reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), {
            name: "TimeoutError"
          }));
        }, timeoutInMs - offset);
        const doWithSocket = (socket) => {
          if (socket?.connecting) {
            socket.on("connect", () => {
              timing.clearTimeout(timeoutId);
            });
          } else {
            timing.clearTimeout(timeoutId);
          }
        };
        if (request.socket) {
          doWithSocket(request.socket);
        } else {
          request.on("socket", doWithSocket);
        }
      };
      if (timeoutInMs < 2e3) {
        registerTimeout(0);
        return 0;
      }
      return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2);
    };
    var setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger2) => {
      if (timeoutInMs) {
        return timing.setTimeout(() => {
          let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;
          if (throwOnRequestTimeout) {
            const error3 = Object.assign(new Error(msg), {
              name: "TimeoutError",
              code: "ETIMEDOUT"
            });
            req.destroy(error3);
            reject(error3);
          } else {
            msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;
            logger2?.warn?.(msg);
          }
        }, timeoutInMs);
      }
      return -1;
    };
    var DEFER_EVENT_LISTENER_TIME$1 = 3e3;
    var setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {
      if (keepAlive !== true) {
        return -1;
      }
      const registerListener = () => {
        if (request.socket) {
          request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
        } else {
          request.on("socket", (socket) => {
            socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
          });
        }
      };
      if (deferTimeMs === 0) {
        registerListener();
        return 0;
      }
      return timing.setTimeout(registerListener, deferTimeMs);
    };
    var DEFER_EVENT_LISTENER_TIME = 3e3;
    var setSocketTimeout = (request, reject, timeoutInMs = 0) => {
      const registerTimeout = (offset) => {
        const timeout = timeoutInMs - offset;
        const onTimeout = () => {
          request.destroy();
          reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" }));
        };
        if (request.socket) {
          request.socket.setTimeout(timeout, onTimeout);
          request.on("close", () => request.socket?.removeListener("timeout", onTimeout));
        } else {
          request.setTimeout(timeout, onTimeout);
        }
      };
      if (0 < timeoutInMs && timeoutInMs < 6e3) {
        registerTimeout(0);
        return 0;
      }
      return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
    };
    var MIN_WAIT_TIME = 6e3;
    async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {
      const headers = request.headers ?? {};
      const expect = headers.Expect || headers.expect;
      let timeoutId = -1;
      let sendBody = true;
      if (!externalAgent && expect === "100-continue") {
        sendBody = await Promise.race([
          new Promise((resolve) => {
            timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
          }),
          new Promise((resolve) => {
            httpRequest.on("continue", () => {
              timing.clearTimeout(timeoutId);
              resolve(true);
            });
            httpRequest.on("response", () => {
              timing.clearTimeout(timeoutId);
              resolve(false);
            });
            httpRequest.on("error", () => {
              timing.clearTimeout(timeoutId);
              resolve(false);
            });
          })
        ]);
      }
      if (sendBody) {
        writeBody(httpRequest, request.body);
      }
    }
    function writeBody(httpRequest, body) {
      if (body instanceof node_stream.Readable) {
        body.pipe(httpRequest);
        return;
      }
      if (body) {
        const isBuffer = Buffer.isBuffer(body);
        const isString = typeof body === "string";
        if (isBuffer || isString) {
          if (isBuffer && body.byteLength === 0) {
            httpRequest.end();
          } else {
            httpRequest.end(body);
          }
          return;
        }
        const uint8 = body;
        if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") {
          httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));
          return;
        }
        httpRequest.end(Buffer.from(body));
        return;
      }
      httpRequest.end();
    }
    var DEFAULT_REQUEST_TIMEOUT = 0;
    var hAgent = void 0;
    var hRequest = void 0;
    var NodeHttpHandler = class _NodeHttpHandler {
      config;
      configProvider;
      socketWarningTimestamp = 0;
      externalAgent = false;
      metadata = { handlerProtocol: "http/1.1" };
      static create(instanceOrOptions) {
        if (typeof instanceOrOptions?.handle === "function") {
          return instanceOrOptions;
        }
        return new _NodeHttpHandler(instanceOrOptions);
      }
      static checkSocketUsage(agent, socketWarningTimestamp, logger2 = console) {
        const { sockets, requests, maxSockets } = agent;
        if (typeof maxSockets !== "number" || maxSockets === Infinity) {
          return socketWarningTimestamp;
        }
        const interval = 15e3;
        if (Date.now() - interval < socketWarningTimestamp) {
          return socketWarningTimestamp;
        }
        if (sockets && requests) {
          for (const origin in sockets) {
            const socketsInUse = sockets[origin]?.length ?? 0;
            const requestsEnqueued = requests[origin]?.length ?? 0;
            if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
              logger2?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);
              return Date.now();
            }
          }
        }
        return socketWarningTimestamp;
      }
      constructor(options) {
        this.configProvider = new Promise((resolve, reject) => {
          if (typeof options === "function") {
            options().then((_options) => {
              resolve(this.resolveDefaultConfig(_options));
            }).catch(reject);
          } else {
            resolve(this.resolveDefaultConfig(options));
          }
        });
      }
      destroy() {
        this.config?.httpAgent?.destroy();
        this.config?.httpsAgent?.destroy();
      }
      async handle(request, { abortSignal, requestTimeout } = {}) {
        if (!this.config) {
          this.config = await this.configProvider;
        }
        const config = this.config;
        const isSSL = request.protocol === "https:";
        if (!isSSL && !this.config.httpAgent) {
          this.config.httpAgent = await this.config.httpAgentProvider();
        }
        return new Promise((_resolve, _reject) => {
          let writeRequestBodyPromise = void 0;
          const timeouts = [];
          const resolve = async (arg) => {
            await writeRequestBodyPromise;
            timeouts.forEach(timing.clearTimeout);
            _resolve(arg);
          };
          const reject = async (arg) => {
            await writeRequestBodyPromise;
            timeouts.forEach(timing.clearTimeout);
            _reject(arg);
          };
          if (abortSignal?.aborted) {
            const abortError = buildAbortError(abortSignal);
            reject(abortError);
            return;
          }
          const headers = request.headers ?? {};
          const expectContinue = (headers.Expect ?? headers.expect) === "100-continue";
          let agent = isSSL ? config.httpsAgent : config.httpAgent;
          if (expectContinue && !this.externalAgent) {
            agent = new (isSSL ? node_https.Agent : hAgent)({
              keepAlive: false,
              maxSockets: Infinity
            });
          }
          timeouts.push(timing.setTimeout(() => {
            this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger);
          }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2e3) + (config.connectionTimeout ?? 1e3)));
          const queryString = querystringBuilder.buildQueryString(request.query || {});
          let auth = void 0;
          if (request.username != null || request.password != null) {
            const username = request.username ?? "";
            const password = request.password ?? "";
            auth = `${username}:${password}`;
          }
          let path = request.path;
          if (queryString) {
            path += `?${queryString}`;
          }
          if (request.fragment) {
            path += `#${request.fragment}`;
          }
          let hostname = request.hostname ?? "";
          if (hostname[0] === "[" && hostname.endsWith("]")) {
            hostname = request.hostname.slice(1, -1);
          } else {
            hostname = request.hostname;
          }
          const nodeHttpsOptions = {
            headers: request.headers,
            host: hostname,
            method: request.method,
            path,
            port: request.port,
            agent,
            auth
          };
          const requestFunc = isSSL ? node_https.request : hRequest;
          const req = requestFunc(nodeHttpsOptions, (res) => {
            const httpResponse = new protocolHttp.HttpResponse({
              statusCode: res.statusCode || -1,
              reason: res.statusMessage,
              headers: getTransformedHeaders(res.headers),
              body: res
            });
            resolve({ response: httpResponse });
          });
          req.on("error", (err) => {
            if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {
              reject(Object.assign(err, { name: "TimeoutError" }));
            } else {
              reject(err);
            }
          });
          if (abortSignal) {
            const onAbort = () => {
              req.destroy();
              const abortError = buildAbortError(abortSignal);
              reject(abortError);
            };
            if (typeof abortSignal.addEventListener === "function") {
              const signal = abortSignal;
              signal.addEventListener("abort", onAbort, { once: true });
              req.once("close", () => signal.removeEventListener("abort", onAbort));
            } else {
              abortSignal.onabort = onAbort;
            }
          }
          const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;
          timeouts.push(setConnectionTimeout(req, reject, config.connectionTimeout));
          timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console));
          timeouts.push(setSocketTimeout(req, reject, config.socketTimeout));
          const httpAgent = nodeHttpsOptions.agent;
          if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
            timeouts.push(setSocketKeepAlive(req, {
              keepAlive: httpAgent.keepAlive,
              keepAliveMsecs: httpAgent.keepAliveMsecs
            }));
          }
          writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e5) => {
            timeouts.forEach(timing.clearTimeout);
            return _reject(e5);
          });
        });
      }
      updateHttpClientConfig(key, value) {
        this.config = void 0;
        this.configProvider = this.configProvider.then((config) => {
          return {
            ...config,
            [key]: value
          };
        });
      }
      httpHandlerConfigs() {
        return this.config ?? {};
      }
      resolveDefaultConfig(options) {
        const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger: logger2 } = options || {};
        const keepAlive = true;
        const maxSockets = 50;
        return {
          connectionTimeout,
          requestTimeout,
          socketTimeout,
          socketAcquisitionWarningTimeout,
          throwOnRequestTimeout,
          httpAgentProvider: async () => {
            const { Agent, request } = await import("node:http");
            hRequest = request;
            hAgent = Agent;
            if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === "function") {
              this.externalAgent = true;
              return httpAgent;
            }
            return new hAgent({ keepAlive, maxSockets, ...httpAgent });
          },
          httpsAgent: (() => {
            if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") {
              this.externalAgent = true;
              return httpsAgent;
            }
            return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent });
          })(),
          logger: logger2
        };
      }
    };
    var ids = new Uint16Array(1);
    var ClientHttp2SessionRef = class {
      id = ids[0]++;
      total = 0;
      max = 0;
      session;
      refs = 0;
      constructor(session) {
        session.unref();
        this.session = session;
      }
      retain() {
        if (this.session.destroyed) {
          throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");
        }
        this.refs += 1;
        this.total += 1;
        this.max = Math.max(this.refs, this.max);
        this.session.ref();
      }
      free() {
        if (this.session.destroyed) {
          return;
        }
        this.refs -= 1;
        if (this.refs === 0) {
          this.session.unref();
        }
        if (this.refs < 0) {
          throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.");
        }
      }
      deref() {
        return this.session;
      }
      close() {
        if (!this.session.closed) {
          this.session.close();
        }
      }
      destroy() {
        this.refs = 0;
        if (!this.session.destroyed) {
          this.session.destroy();
        }
      }
      useCount() {
        return this.refs;
      }
    };
    var NodeHttp2ConnectionPool = class {
      sessions = [];
      maxConcurrency = 0;
      constructor(sessions) {
        this.sessions = (sessions ?? []).map((session) => new ClientHttp2SessionRef(session));
      }
      poll() {
        let cleanup = false;
        for (const session of this.sessions) {
          if (session.deref().destroyed) {
            cleanup = true;
            continue;
          }
          if (!this.maxConcurrency || session.useCount() < this.maxConcurrency) {
            return session;
          }
        }
        if (cleanup) {
          for (const session of this.sessions) {
            if (session.deref().destroyed) {
              this.remove(session);
            }
          }
        }
      }
      offerLast(ref) {
        this.sessions.push(ref);
      }
      remove(ref) {
        const ix = this.sessions.indexOf(ref);
        if (ix > -1) {
          this.sessions.splice(ix, 1);
        }
      }
      [Symbol.iterator]() {
        return this.sessions[Symbol.iterator]();
      }
      setMaxConcurrency(maxConcurrency) {
        this.maxConcurrency = maxConcurrency;
      }
      destroy(ref) {
        this.remove(ref);
        ref.destroy();
      }
    };
    var NodeHttp2ConnectionManager = class {
      config;
      connectionPools = /* @__PURE__ */ new Map();
      constructor(config) {
        this.config = config;
        if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
          throw new RangeError("maxConcurrency must be greater than zero.");
        }
      }
      lease(requestContext, connectionConfiguration) {
        const url = this.getUrlString(requestContext);
        const pool = this.getPool(url);
        if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) {
          const available = pool.poll();
          if (available) {
            available.retain();
            return available;
          }
        }
        const ref = new ClientHttp2SessionRef(http2.connect(url));
        const session = ref.deref();
        if (this.config.maxConcurrency) {
          session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {
            if (err) {
              throw new Error("Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString());
            }
          });
        }
        const graceful = () => {
          this.removeFromPoolAndClose(url, ref);
        };
        const ensureDestroyed = () => {
          this.removeFromPoolAndCheckedDestroy(url, ref);
        };
        session.on("goaway", graceful);
        session.on("error", ensureDestroyed);
        session.on("frameError", ensureDestroyed);
        session.on("close", ensureDestroyed);
        if (connectionConfiguration.requestTimeout) {
          session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);
        }
        pool.offerLast(ref);
        ref.retain();
        return ref;
      }
      release(_requestContext, ref) {
        ref.free();
      }
      createIsolatedSession(requestContext, connectionConfiguration) {
        const url = this.getUrlString(requestContext);
        const ref = new ClientHttp2SessionRef(http2.connect(url));
        const session = ref.deref();
        session.settings({ maxConcurrentStreams: 1 });
        const ensureDestroyed = () => {
          ref.destroy();
        };
        session.on("error", ensureDestroyed);
        session.on("frameError", ensureDestroyed);
        session.on("close", ensureDestroyed);
        if (connectionConfiguration.requestTimeout) {
          session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);
        }
        ref.retain();
        return ref;
      }
      destroy() {
        for (const [url, connectionPool] of this.connectionPools) {
          for (const session of [...connectionPool]) {
            session.destroy();
          }
          this.connectionPools.delete(url);
        }
      }
      setMaxConcurrentStreams(maxConcurrentStreams) {
        if (maxConcurrentStreams && maxConcurrentStreams <= 0) {
          throw new RangeError("maxConcurrentStreams must be greater than zero.");
        }
        this.config.maxConcurrency = maxConcurrentStreams;
        for (const pool of this.connectionPools.values()) {
          pool.setMaxConcurrency(maxConcurrentStreams);
        }
      }
      setDisableConcurrentStreams(disableConcurrentStreams) {
        this.config.disableConcurrency = disableConcurrentStreams;
      }
      debug() {
        const pools = {};
        for (const [url, pool] of this.connectionPools) {
          const sessions = [];
          for (const ref of pool) {
            sessions.push({
              id: ref.id,
              active: ref.useCount(),
              maxConcurrent: ref.max,
              totalRequests: ref.total
            });
          }
          pools[url] = { sessions };
        }
        return pools;
      }
      removeFromPoolAndClose(authority, ref) {
        this.connectionPools.get(authority)?.remove(ref);
        ref.close();
      }
      removeFromPoolAndCheckedDestroy(authority, ref) {
        this.connectionPools.get(authority)?.remove(ref);
        ref.destroy();
      }
      getPool(url) {
        if (!this.connectionPools.has(url)) {
          const pool = new NodeHttp2ConnectionPool();
          if (this.config.maxConcurrency) {
            pool.setMaxConcurrency(this.config.maxConcurrency);
          }
          this.connectionPools.set(url, pool);
        }
        return this.connectionPools.get(url);
      }
      getUrlString(request) {
        return request.destination.toString();
      }
    };
    var NodeHttp2Handler = class _NodeHttp2Handler {
      config;
      configProvider;
      metadata = { handlerProtocol: "h2" };
      connectionManager = new NodeHttp2ConnectionManager({});
      static create(instanceOrOptions) {
        if (typeof instanceOrOptions?.handle === "function") {
          return instanceOrOptions;
        }
        return new _NodeHttp2Handler(instanceOrOptions);
      }
      constructor(options) {
        this.configProvider = new Promise((resolve, reject) => {
          if (typeof options === "function") {
            options().then((opts) => {
              resolve(opts || {});
            }).catch(reject);
          } else {
            resolve(options || {});
          }
        });
      }
      destroy() {
        this.connectionManager.destroy();
      }
      async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) {
        if (!this.config) {
          this.config = await this.configProvider;
          const { disableConcurrentStreams: disableConcurrentStreams2, maxConcurrentStreams } = this.config;
          this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams2 ?? false);
          if (maxConcurrentStreams) {
            this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams);
          }
        }
        const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;
        const useIsolatedSession = disableConcurrentStreams || isEventStream;
        const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;
        return new Promise((_resolve, _reject) => {
          let fulfilled = false;
          let writeRequestBodyPromise = void 0;
          const resolve = async (arg) => {
            await writeRequestBodyPromise;
            _resolve(arg);
          };
          const reject = async (arg) => {
            await writeRequestBodyPromise;
            _reject(arg);
          };
          if (abortSignal?.aborted) {
            fulfilled = true;
            const abortError = buildAbortError(abortSignal);
            reject(abortError);
            return;
          }
          const { hostname, method, port, protocol, query } = request;
          let auth = "";
          if (request.username != null || request.password != null) {
            const username = request.username ?? "";
            const password = request.password ?? "";
            auth = `${username}:${password}@`;
          }
          const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`;
          const requestContext = { destination: new URL(authority) };
          const connectConfig = {
            requestTimeout: this.config?.sessionTimeout,
            isEventStream
          };
          const ref = useIsolatedSession ? this.connectionManager.createIsolatedSession(requestContext, connectConfig) : this.connectionManager.lease(requestContext, connectConfig);
          const session = ref.deref();
          const rejectWithDestroy = (err) => {
            if (useIsolatedSession) {
              ref.destroy();
            }
            fulfilled = true;
            reject(err);
          };
          const queryString = querystringBuilder.buildQueryString(query ?? {});
          let path = request.path;
          if (queryString) {
            path += `?${queryString}`;
          }
          if (request.fragment) {
            path += `#${request.fragment}`;
          }
          const clientHttp2Stream = session.request({
            ...request.headers,
            [http2.constants.HTTP2_HEADER_PATH]: path,
            [http2.constants.HTTP2_HEADER_METHOD]: method
          });
          if (effectiveRequestTimeout) {
            clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => {
              clientHttp2Stream.close();
              const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);
              timeoutError.name = "TimeoutError";
              rejectWithDestroy(timeoutError);
            });
          }
          if (abortSignal) {
            const onAbort = () => {
              clientHttp2Stream.close();
              const abortError = buildAbortError(abortSignal);
              rejectWithDestroy(abortError);
            };
            if (typeof abortSignal.addEventListener === "function") {
              const signal = abortSignal;
              signal.addEventListener("abort", onAbort, { once: true });
              clientHttp2Stream.once("close", () => signal.removeEventListener("abort", onAbort));
            } else {
              abortSignal.onabort = onAbort;
            }
          }
          clientHttp2Stream.on("frameError", (type, code, id) => {
            rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));
          });
          clientHttp2Stream.on("error", rejectWithDestroy);
          clientHttp2Stream.on("aborted", () => {
            rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`));
          });
          clientHttp2Stream.on("response", (headers) => {
            const httpResponse = new protocolHttp.HttpResponse({
              statusCode: headers[":status"] ?? -1,
              headers: getTransformedHeaders(headers),
              body: clientHttp2Stream
            });
            fulfilled = true;
            resolve({ response: httpResponse });
            if (useIsolatedSession) {
              session.close();
            }
          });
          clientHttp2Stream.on("close", () => {
            if (useIsolatedSession) {
              ref.destroy();
            } else {
              this.connectionManager.release(requestContext, ref);
            }
            if (!fulfilled) {
              rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
            }
          });
          writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);
        });
      }
      updateHttpClientConfig(key, value) {
        this.config = void 0;
        this.configProvider = this.configProvider.then((config) => {
          return {
            ...config,
            [key]: value
          };
        });
      }
      httpHandlerConfigs() {
        return this.config ?? {};
      }
    };
    var Collector = class extends node_stream.Writable {
      bufferedBytes = [];
      _write(chunk, encoding, callback) {
        this.bufferedBytes.push(chunk);
        callback();
      }
    };
    var streamCollector5 = (stream) => {
      if (isReadableStreamInstance(stream)) {
        return collectReadableStream(stream);
      }
      return new Promise((resolve, reject) => {
        const collector = new Collector();
        stream.pipe(collector);
        stream.on("error", (err) => {
          collector.end();
          reject(err);
        });
        collector.on("error", reject);
        collector.on("finish", function() {
          const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
          resolve(bytes);
        });
      });
    };
    var isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream;
    async function collectReadableStream(stream) {
      const chunks2 = [];
      const reader = stream.getReader();
      let isDone = false;
      let length = 0;
      while (!isDone) {
        const { done, value } = await reader.read();
        if (value) {
          chunks2.push(value);
          length += value.length;
        }
        isDone = done;
      }
      const collected = new Uint8Array(length);
      let offset = 0;
      for (const chunk of chunks2) {
        collected.set(chunk, offset);
        offset += chunk.length;
      }
      return collected;
    }
    exports2.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT;
    exports2.NodeHttp2Handler = NodeHttp2Handler;
    exports2.NodeHttpHandler = NodeHttpHandler;
    exports2.streamCollector = streamCollector5;
  }
});

// ../../node_modules/@smithy/fetch-http-handler/dist-cjs/index.js
var require_dist_cjs14 = __commonJS({
  "../../node_modules/@smithy/fetch-http-handler/dist-cjs/index.js"(exports2) {
    "use strict";
    var protocolHttp = require_dist_cjs2();
    var querystringBuilder = require_dist_cjs12();
    var utilBase64 = require_dist_cjs10();
    function createRequest(url, requestOptions) {
      return new Request(url, requestOptions);
    }
    function requestTimeout(timeoutInMs = 0) {
      return new Promise((resolve, reject) => {
        if (timeoutInMs) {
          setTimeout(() => {
            const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);
            timeoutError.name = "TimeoutError";
            reject(timeoutError);
          }, timeoutInMs);
        }
      });
    }
    var keepAliveSupport = {
      supported: void 0
    };
    var FetchHttpHandler = class _FetchHttpHandler {
      config;
      configProvider;
      static create(instanceOrOptions) {
        if (typeof instanceOrOptions?.handle === "function") {
          return instanceOrOptions;
        }
        return new _FetchHttpHandler(instanceOrOptions);
      }
      constructor(options) {
        if (typeof options === "function") {
          this.configProvider = options().then((opts) => opts || {});
        } else {
          this.config = options ?? {};
          this.configProvider = Promise.resolve(this.config);
        }
        if (keepAliveSupport.supported === void 0) {
          keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]"));
        }
      }
      destroy() {
      }
      async handle(request, { abortSignal, requestTimeout: requestTimeout$1 } = {}) {
        if (!this.config) {
          this.config = await this.configProvider;
        }
        const requestTimeoutInMs = requestTimeout$1 ?? this.config.requestTimeout;
        const keepAlive = this.config.keepAlive === true;
        const credentials = this.config.credentials;
        if (abortSignal?.aborted) {
          const abortError = buildAbortError(abortSignal);
          return Promise.reject(abortError);
        }
        let path = request.path;
        const queryString = querystringBuilder.buildQueryString(request.query || {});
        if (queryString) {
          path += `?${queryString}`;
        }
        if (request.fragment) {
          path += `#${request.fragment}`;
        }
        let auth = "";
        if (request.username != null || request.password != null) {
          const username = request.username ?? "";
          const password = request.password ?? "";
          auth = `${username}:${password}@`;
        }
        const { port, method } = request;
        const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`;
        const body = method === "GET" || method === "HEAD" ? void 0 : request.body;
        const requestOptions = {
          body,
          headers: new Headers(request.headers),
          method,
          credentials
        };
        if (this.config?.cache) {
          requestOptions.cache = this.config.cache;
        }
        if (body) {
          requestOptions.duplex = "half";
        }
        if (typeof AbortController !== "undefined") {
          requestOptions.signal = abortSignal;
        }
        if (keepAliveSupport.supported) {
          requestOptions.keepalive = keepAlive;
        }
        if (typeof this.config.requestInit === "function") {
          Object.assign(requestOptions, this.config.requestInit(request));
        }
        let removeSignalEventListener = () => {
        };
        const fetchRequest = createRequest(url, requestOptions);
        const raceOfPromises = [
          fetch(fetchRequest).then((response) => {
            const fetchHeaders = response.headers;
            const transformedHeaders = {};
            for (const pair of fetchHeaders.entries()) {
              transformedHeaders[pair[0]] = pair[1];
            }
            const hasReadableStream = response.body != void 0;
            if (!hasReadableStream) {
              return response.blob().then((body2) => ({
                response: new protocolHttp.HttpResponse({
                  headers: transformedHeaders,
                  reason: response.statusText,
                  statusCode: response.status,
                  body: body2
                })
              }));
            }
            return {
              response: new protocolHttp.HttpResponse({
                headers: transformedHeaders,
                reason: response.statusText,
                statusCode: response.status,
                body: response.body
              })
            };
          }),
          requestTimeout(requestTimeoutInMs)
        ];
        if (abortSignal) {
          raceOfPromises.push(new Promise((resolve, reject) => {
            const onAbort = () => {
              const abortError = buildAbortError(abortSignal);
              reject(abortError);
            };
            if (typeof abortSignal.addEventListener === "function") {
              const signal = abortSignal;
              signal.addEventListener("abort", onAbort, { once: true });
              removeSignalEventListener = () => signal.removeEventListener("abort", onAbort);
            } else {
              abortSignal.onabort = onAbort;
            }
          }));
        }
        return Promise.race(raceOfPromises).finally(removeSignalEventListener);
      }
      updateHttpClientConfig(key, value) {
        this.config = void 0;
        this.configProvider = this.configProvider.then((config) => {
          config[key] = value;
          return config;
        });
      }
      httpHandlerConfigs() {
        return this.config ?? {};
      }
    };
    function buildAbortError(abortSignal) {
      const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : void 0;
      if (reason) {
        if (reason instanceof Error) {
          const abortError3 = new Error("Request aborted");
          abortError3.name = "AbortError";
          abortError3.cause = reason;
          return abortError3;
        }
        const abortError2 = new Error(String(reason));
        abortError2.name = "AbortError";
        return abortError2;
      }
      const abortError = new Error("Request aborted");
      abortError.name = "AbortError";
      return abortError;
    }
    var streamCollector5 = async (stream) => {
      if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") {
        if (Blob.prototype.arrayBuffer !== void 0) {
          return new Uint8Array(await stream.arrayBuffer());
        }
        return collectBlob(stream);
      }
      return collectStream(stream);
    };
    async function collectBlob(blob) {
      const base64 = await readToBase64(blob);
      const arrayBuffer = utilBase64.fromBase64(base64);
      return new Uint8Array(arrayBuffer);
    }
    async function collectStream(stream) {
      const chunks2 = [];
      const reader = stream.getReader();
      let isDone = false;
      let length = 0;
      while (!isDone) {
        const { done, value } = await reader.read();
        if (value) {
          chunks2.push(value);
          length += value.length;
        }
        isDone = done;
      }
      const collected = new Uint8Array(length);
      let offset = 0;
      for (const chunk of chunks2) {
        collected.set(chunk, offset);
        offset += chunk.length;
      }
      return collected;
    }
    function readToBase64(blob) {
      return new Promise((resolve, reject) => {
        const reader = new FileReader();
        reader.onloadend = () => {
          if (reader.readyState !== 2) {
            return reject(new Error("Reader aborted too early"));
          }
          const result = reader.result ?? "";
          const commaIndex = result.indexOf(",");
          const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
          resolve(result.substring(dataOffset));
        };
        reader.onabort = () => reject(new Error("Read aborted"));
        reader.onerror = () => reject(reader.error);
        reader.readAsDataURL(blob);
      });
    }
    exports2.FetchHttpHandler = FetchHttpHandler;
    exports2.keepAliveSupport = keepAliveSupport;
    exports2.streamCollector = streamCollector5;
  }
});

// ../../node_modules/@smithy/util-hex-encoding/dist-cjs/index.js
var require_dist_cjs15 = __commonJS({
  "../../node_modules/@smithy/util-hex-encoding/dist-cjs/index.js"(exports2) {
    "use strict";
    var SHORT_TO_HEX = {};
    var HEX_TO_SHORT = {};
    for (let i5 = 0; i5 < 256; i5++) {
      let encodedByte = i5.toString(16).toLowerCase();
      if (encodedByte.length === 1) {
        encodedByte = `0${encodedByte}`;
      }
      SHORT_TO_HEX[i5] = encodedByte;
      HEX_TO_SHORT[encodedByte] = i5;
    }
    function fromHex(encoded) {
      if (encoded.length % 2 !== 0) {
        throw new Error("Hex encoded strings must have an even number length");
      }
      const out = new Uint8Array(encoded.length / 2);
      for (let i5 = 0; i5 < encoded.length; i5 += 2) {
        const encodedByte = encoded.slice(i5, i5 + 2).toLowerCase();
        if (encodedByte in HEX_TO_SHORT) {
          out[i5 / 2] = HEX_TO_SHORT[encodedByte];
        } else {
          throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);
        }
      }
      return out;
    }
    function toHex(bytes) {
      let out = "";
      for (let i5 = 0; i5 < bytes.byteLength; i5++) {
        out += SHORT_TO_HEX[bytes[i5]];
      }
      return out;
    }
    exports2.fromHex = fromHex;
    exports2.toHex = toHex;
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js
var require_sdk_stream_mixin_browser = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.sdkStreamMixin = void 0;
    var fetch_http_handler_1 = require_dist_cjs14();
    var util_base64_1 = require_dist_cjs10();
    var util_hex_encoding_1 = require_dist_cjs15();
    var util_utf8_1 = require_dist_cjs9();
    var stream_type_check_1 = require_stream_type_check();
    var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
    var sdkStreamMixin2 = (stream) => {
      if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) {
        const name = stream?.__proto__?.constructor?.name || stream;
        throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);
      }
      let transformed = false;
      const transformToByteArray = async () => {
        if (transformed) {
          throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
        }
        transformed = true;
        return await (0, fetch_http_handler_1.streamCollector)(stream);
      };
      const blobToWebStream = (blob) => {
        if (typeof blob.stream !== "function") {
          throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");
        }
        return blob.stream();
      };
      return Object.assign(stream, {
        transformToByteArray,
        transformToString: async (encoding) => {
          const buf = await transformToByteArray();
          if (encoding === "base64") {
            return (0, util_base64_1.toBase64)(buf);
          } else if (encoding === "hex") {
            return (0, util_hex_encoding_1.toHex)(buf);
          } else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") {
            return (0, util_utf8_1.toUtf8)(buf);
          } else if (typeof TextDecoder === "function") {
            return new TextDecoder(encoding).decode(buf);
          } else {
            throw new Error("TextDecoder is not available, please make sure polyfill is provided.");
          }
        },
        transformToWebStream: () => {
          if (transformed) {
            throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
          }
          transformed = true;
          if (isBlobInstance(stream)) {
            return blobToWebStream(stream);
          } else if ((0, stream_type_check_1.isReadableStream)(stream)) {
            return stream;
          } else {
            throw new Error(`Cannot transform payload to web stream, got ${stream}`);
          }
        }
      });
    };
    exports2.sdkStreamMixin = sdkStreamMixin2;
    var isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob;
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js
var require_sdk_stream_mixin = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.sdkStreamMixin = void 0;
    var node_http_handler_1 = require_dist_cjs13();
    var util_buffer_from_1 = require_dist_cjs8();
    var stream_1 = require("stream");
    var sdk_stream_mixin_browser_1 = require_sdk_stream_mixin_browser();
    var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
    var sdkStreamMixin2 = (stream) => {
      if (!(stream instanceof stream_1.Readable)) {
        try {
          return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream);
        } catch (e5) {
          const name = stream?.__proto__?.constructor?.name || stream;
          throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);
        }
      }
      let transformed = false;
      const transformToByteArray = async () => {
        if (transformed) {
          throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
        }
        transformed = true;
        return await (0, node_http_handler_1.streamCollector)(stream);
      };
      return Object.assign(stream, {
        transformToByteArray,
        transformToString: async (encoding) => {
          const buf = await transformToByteArray();
          if (encoding === void 0 || Buffer.isEncoding(encoding)) {
            return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);
          } else {
            const decoder = new TextDecoder(encoding);
            return decoder.decode(buf);
          }
        },
        transformToWebStream: () => {
          if (transformed) {
            throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
          }
          if (stream.readableFlowing !== null) {
            throw new Error("The stream has been consumed by other callbacks.");
          }
          if (typeof stream_1.Readable.toWeb !== "function") {
            throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");
          }
          transformed = true;
          return stream_1.Readable.toWeb(stream);
        }
      });
    };
    exports2.sdkStreamMixin = sdkStreamMixin2;
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js
var require_splitStream_browser = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.splitStream = splitStream;
    async function splitStream(stream) {
      if (typeof stream.stream === "function") {
        stream = stream.stream();
      }
      const readableStream = stream;
      return readableStream.tee();
    }
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/splitStream.js
var require_splitStream = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/splitStream.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.splitStream = splitStream;
    var stream_1 = require("stream");
    var splitStream_browser_1 = require_splitStream_browser();
    var stream_type_check_1 = require_stream_type_check();
    async function splitStream(stream) {
      if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) {
        return (0, splitStream_browser_1.splitStream)(stream);
      }
      const stream1 = new stream_1.PassThrough();
      const stream2 = new stream_1.PassThrough();
      stream.pipe(stream1);
      stream.pipe(stream2);
      return [stream1, stream2];
    }
  }
});

// ../../node_modules/@smithy/util-stream/dist-cjs/index.js
var require_dist_cjs16 = __commonJS({
  "../../node_modules/@smithy/util-stream/dist-cjs/index.js"(exports2) {
    "use strict";
    var utilBase64 = require_dist_cjs10();
    var utilUtf8 = require_dist_cjs9();
    var ChecksumStream = require_ChecksumStream();
    var createChecksumStream = require_createChecksumStream();
    var createBufferedReadable = require_createBufferedReadable();
    var getAwsChunkedEncodingStream = require_getAwsChunkedEncodingStream();
    var headStream = require_headStream();
    var sdkStreamMixin2 = require_sdk_stream_mixin();
    var splitStream = require_splitStream();
    var streamTypeCheck = require_stream_type_check();
    var Uint8ArrayBlobAdapter2 = class _Uint8ArrayBlobAdapter extends Uint8Array {
      static fromString(source, encoding = "utf-8") {
        if (typeof source === "string") {
          if (encoding === "base64") {
            return _Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source));
          }
          return _Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(source));
        }
        throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
      }
      static mutate(source) {
        Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype);
        return source;
      }
      transformToString(encoding = "utf-8") {
        if (encoding === "base64") {
          return utilBase64.toBase64(this);
        }
        return utilUtf8.toUtf8(this);
      }
    };
    exports2.isBlob = streamTypeCheck.isBlob;
    exports2.isReadableStream = streamTypeCheck.isReadableStream;
    exports2.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter2;
    Object.prototype.hasOwnProperty.call(ChecksumStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: ChecksumStream["__proto__"]
    });
    Object.keys(ChecksumStream).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = ChecksumStream[k5];
    });
    Object.prototype.hasOwnProperty.call(createChecksumStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: createChecksumStream["__proto__"]
    });
    Object.keys(createChecksumStream).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = createChecksumStream[k5];
    });
    Object.prototype.hasOwnProperty.call(createBufferedReadable, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: createBufferedReadable["__proto__"]
    });
    Object.keys(createBufferedReadable).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = createBufferedReadable[k5];
    });
    Object.prototype.hasOwnProperty.call(getAwsChunkedEncodingStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: getAwsChunkedEncodingStream["__proto__"]
    });
    Object.keys(getAwsChunkedEncodingStream).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = getAwsChunkedEncodingStream[k5];
    });
    Object.prototype.hasOwnProperty.call(headStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: headStream["__proto__"]
    });
    Object.keys(headStream).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = headStream[k5];
    });
    Object.prototype.hasOwnProperty.call(sdkStreamMixin2, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: sdkStreamMixin2["__proto__"]
    });
    Object.keys(sdkStreamMixin2).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = sdkStreamMixin2[k5];
    });
    Object.prototype.hasOwnProperty.call(splitStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: splitStream["__proto__"]
    });
    Object.keys(splitStream).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = splitStream[k5];
    });
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js
var import_util_stream, collectBody;
var init_collect_stream_body = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() {
    import_util_stream = __toESM(require_dist_cjs16());
    collectBody = async (streamBody = new Uint8Array(), context) => {
      if (streamBody instanceof Uint8Array) {
        return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody);
      }
      if (!streamBody) {
        return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array());
      }
      const fromContext = context.streamCollector(streamBody);
      return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext);
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js
function extendedEncodeURIComponent(str) {
  return encodeURIComponent(str).replace(/[!'()*]/g, function(c5) {
    return "%" + c5.charCodeAt(0).toString(16).toUpperCase();
  });
}
var init_extended_encode_uri_component = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js"() {
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js
var deref;
var init_deref = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js"() {
    deref = (schemaRef) => {
      if (typeof schemaRef === "function") {
        return schemaRef();
      }
      return schemaRef;
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js
var operation;
var init_operation = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js"() {
    operation = (namespace, name, traits, input, output) => ({
      name,
      namespace,
      traits,
      input,
      output
    });
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js
var import_protocol_http2, import_util_middleware3, schemaDeserializationMiddleware, findHeader;
var init_schemaDeserializationMiddleware = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() {
    import_protocol_http2 = __toESM(require_dist_cjs2());
    import_util_middleware3 = __toESM(require_dist_cjs6());
    init_operation();
    schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {
      const { response } = await next(args);
      const { operationSchema } = (0, import_util_middleware3.getSmithyContext)(context);
      const [, ns, n2, t, i5, o2] = operationSchema ?? [];
      try {
        const parsed = await config.protocol.deserializeResponse(operation(ns, n2, t, i5, o2), {
          ...config,
          ...context
        }, response);
        return {
          response,
          output: parsed
        };
      } catch (error3) {
        Object.defineProperty(error3, "$response", {
          value: response,
          enumerable: false,
          writable: false,
          configurable: false
        });
        if (!("$metadata" in error3)) {
          const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
          try {
            error3.message += "\n  " + hint;
          } catch (e5) {
            if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
              console.warn(hint);
            } else {
              context.logger?.warn?.(hint);
            }
          }
          if (typeof error3.$responseBodyText !== "undefined") {
            if (error3.$response) {
              error3.$response.body = error3.$responseBodyText;
            }
          }
          try {
            if (import_protocol_http2.HttpResponse.isInstance(response)) {
              const { headers = {} } = response;
              const headerEntries = Object.entries(headers);
              error3.$metadata = {
                httpStatusCode: response.statusCode,
                requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries),
                extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries),
                cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries)
              };
            }
          } catch (e5) {
          }
        }
        throw error3;
      }
    };
    findHeader = (pattern, headers) => {
      return (headers.find(([k5]) => {
        return k5.match(pattern);
      }) || [void 0, void 0])[1];
    };
  }
});

// ../../node_modules/@smithy/querystring-parser/dist-cjs/index.js
var require_dist_cjs17 = __commonJS({
  "../../node_modules/@smithy/querystring-parser/dist-cjs/index.js"(exports2) {
    "use strict";
    function parseQueryString(querystring) {
      const query = {};
      querystring = querystring.replace(/^\?/, "");
      if (querystring) {
        for (const pair of querystring.split("&")) {
          let [key, value = null] = pair.split("=");
          key = decodeURIComponent(key);
          if (value) {
            value = decodeURIComponent(value);
          }
          if (!(key in query)) {
            query[key] = value;
          } else if (Array.isArray(query[key])) {
            query[key].push(value);
          } else {
            query[key] = [query[key], value];
          }
        }
      }
      return query;
    }
    exports2.parseQueryString = parseQueryString;
  }
});

// ../../node_modules/@smithy/url-parser/dist-cjs/index.js
var require_dist_cjs18 = __commonJS({
  "../../node_modules/@smithy/url-parser/dist-cjs/index.js"(exports2) {
    "use strict";
    var querystringParser = require_dist_cjs17();
    var parseUrl6 = (url) => {
      if (typeof url === "string") {
        return parseUrl6(new URL(url));
      }
      const { hostname, pathname, port, protocol, search } = url;
      let query;
      if (search) {
        query = querystringParser.parseQueryString(search);
      }
      return {
        hostname,
        port: port ? parseInt(port) : void 0,
        protocol,
        path: pathname,
        query
      };
    };
    exports2.parseUrl = parseUrl6;
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js
var import_url_parser, toEndpointV1;
var init_toEndpointV1 = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js"() {
    import_url_parser = __toESM(require_dist_cjs18());
    toEndpointV1 = (endpoint) => {
      if (typeof endpoint === "object") {
        if ("url" in endpoint) {
          const v1Endpoint = (0, import_url_parser.parseUrl)(endpoint.url);
          if (endpoint.headers) {
            v1Endpoint.headers = {};
            for (const name in endpoint.headers) {
              v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
            }
          }
          return v1Endpoint;
        }
        return endpoint;
      }
      return (0, import_url_parser.parseUrl)(endpoint);
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/endpoints/index.js
var endpoints_exports = {};
__export(endpoints_exports, {
  toEndpointV1: () => toEndpointV1
});
var init_endpoints = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/endpoints/index.js"() {
    init_toEndpointV1();
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js
var import_util_middleware4, schemaSerializationMiddleware;
var init_schemaSerializationMiddleware = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() {
    init_endpoints();
    import_util_middleware4 = __toESM(require_dist_cjs6());
    init_operation();
    schemaSerializationMiddleware = (config) => (next, context) => async (args) => {
      const { operationSchema } = (0, import_util_middleware4.getSmithyContext)(context);
      const [, ns, n2, t, i5, o2] = operationSchema ?? [];
      const endpoint = context.endpointV2 ? async () => toEndpointV1(context.endpointV2) : config.endpoint;
      const request = await config.protocol.serializeRequest(operation(ns, n2, t, i5, o2), args.input, {
        ...config,
        ...context,
        endpoint
      });
      return next({
        ...args,
        request
      });
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js
function getSchemaSerdePlugin(config) {
  return {
    applyToStack: (commandStack) => {
      commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption);
      commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);
      config.protocol.setSerdeContext(config);
    }
  };
}
var deserializerMiddlewareOption, serializerMiddlewareOption;
var init_getSchemaSerdePlugin = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"() {
    init_schemaDeserializationMiddleware();
    init_schemaSerializationMiddleware();
    deserializerMiddlewareOption = {
      name: "deserializerMiddleware",
      step: "deserialize",
      tags: ["DESERIALIZER"],
      override: true
    };
    serializerMiddlewareOption = {
      name: "serializerMiddleware",
      step: "serialize",
      tags: ["SERIALIZER"],
      override: true
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js
var Schema;
var init_Schema = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js"() {
    Schema = class {
      name;
      namespace;
      traits;
      static assign(instance, values) {
        const schema = Object.assign(instance, values);
        return schema;
      }
      static [Symbol.hasInstance](lhs) {
        const isPrototype = this.prototype.isPrototypeOf(lhs);
        if (!isPrototype && typeof lhs === "object" && lhs !== null) {
          const list2 = lhs;
          return list2.symbol === this.symbol;
        }
        return isPrototype;
      }
      getName() {
        return this.namespace + "#" + this.name;
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js
var ListSchema, list;
var init_ListSchema = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js"() {
    init_Schema();
    ListSchema = class _ListSchema extends Schema {
      static symbol = /* @__PURE__ */ Symbol.for("@smithy/lis");
      name;
      traits;
      valueSchema;
      symbol = _ListSchema.symbol;
    };
    list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), {
      name,
      namespace,
      traits,
      valueSchema
    });
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js
var MapSchema, map;
var init_MapSchema = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js"() {
    init_Schema();
    MapSchema = class _MapSchema extends Schema {
      static symbol = /* @__PURE__ */ Symbol.for("@smithy/map");
      name;
      traits;
      keySchema;
      valueSchema;
      symbol = _MapSchema.symbol;
    };
    map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema(), {
      name,
      namespace,
      traits,
      keySchema,
      valueSchema
    });
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js
var OperationSchema, op;
var init_OperationSchema = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js"() {
    init_Schema();
    OperationSchema = class _OperationSchema extends Schema {
      static symbol = /* @__PURE__ */ Symbol.for("@smithy/ope");
      name;
      traits;
      input;
      output;
      symbol = _OperationSchema.symbol;
    };
    op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema(), {
      name,
      namespace,
      traits,
      input,
      output
    });
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js
var StructureSchema, struct;
var init_StructureSchema = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js"() {
    init_Schema();
    StructureSchema = class _StructureSchema extends Schema {
      static symbol = /* @__PURE__ */ Symbol.for("@smithy/str");
      name;
      traits;
      memberNames;
      memberList;
      symbol = _StructureSchema.symbol;
    };
    struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), {
      name,
      namespace,
      traits,
      memberNames,
      memberList
    });
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js
var ErrorSchema, error;
var init_ErrorSchema = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js"() {
    init_Schema();
    init_StructureSchema();
    ErrorSchema = class _ErrorSchema extends StructureSchema {
      static symbol = /* @__PURE__ */ Symbol.for("@smithy/err");
      ctor;
      symbol = _ErrorSchema.symbol;
    };
    error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), {
      name,
      namespace,
      traits,
      memberNames,
      memberList,
      ctor: null
    });
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js
function translateTraits(indicator) {
  if (typeof indicator === "object") {
    return indicator;
  }
  indicator = indicator | 0;
  if (traitsCache[indicator]) {
    return traitsCache[indicator];
  }
  const traits = {};
  let i5 = 0;
  for (const trait of [
    "httpLabel",
    "idempotent",
    "idempotencyToken",
    "sensitive",
    "httpPayload",
    "httpResponseCode",
    "httpQueryParams"
  ]) {
    if ((indicator >> i5++ & 1) === 1) {
      traits[trait] = 1;
    }
  }
  return traitsCache[indicator] = traits;
}
var traitsCache;
var init_translateTraits = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js"() {
    traitsCache = [];
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js
function member(memberSchema, memberName) {
  if (memberSchema instanceof NormalizedSchema) {
    return Object.assign(memberSchema, {
      memberName,
      _isMemberSchema: true
    });
  }
  const internalCtorAccess = NormalizedSchema;
  return new internalCtorAccess(memberSchema, memberName);
}
var anno, simpleSchemaCacheN, simpleSchemaCacheS, NormalizedSchema, isMemberSchema, isStaticSchema;
var init_NormalizedSchema = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() {
    init_deref();
    init_translateTraits();
    anno = {
      it: /* @__PURE__ */ Symbol.for("@smithy/nor-struct-it"),
      ns: /* @__PURE__ */ Symbol.for("@smithy/ns")
    };
    simpleSchemaCacheN = [];
    simpleSchemaCacheS = {};
    NormalizedSchema = class _NormalizedSchema {
      ref;
      memberName;
      static symbol = /* @__PURE__ */ Symbol.for("@smithy/nor");
      symbol = _NormalizedSchema.symbol;
      name;
      schema;
      _isMemberSchema;
      traits;
      memberTraits;
      normalizedTraits;
      constructor(ref, memberName) {
        this.ref = ref;
        this.memberName = memberName;
        const traitStack = [];
        let _ref = ref;
        let schema = ref;
        this._isMemberSchema = false;
        while (isMemberSchema(_ref)) {
          traitStack.push(_ref[1]);
          _ref = _ref[0];
          schema = deref(_ref);
          this._isMemberSchema = true;
        }
        if (traitStack.length > 0) {
          this.memberTraits = {};
          for (let i5 = traitStack.length - 1; i5 >= 0; --i5) {
            const traitSet = traitStack[i5];
            Object.assign(this.memberTraits, translateTraits(traitSet));
          }
        } else {
          this.memberTraits = 0;
        }
        if (schema instanceof _NormalizedSchema) {
          const computedMemberTraits = this.memberTraits;
          Object.assign(this, schema);
          this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits());
          this.normalizedTraits = void 0;
          this.memberName = memberName ?? schema.memberName;
          return;
        }
        this.schema = deref(schema);
        if (isStaticSchema(this.schema)) {
          this.name = `${this.schema[1]}#${this.schema[2]}`;
          this.traits = this.schema[3];
        } else {
          this.name = this.memberName ?? String(schema);
          this.traits = 0;
        }
        if (this._isMemberSchema && !memberName) {
          throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);
        }
      }
      static [Symbol.hasInstance](lhs) {
        const isPrototype = this.prototype.isPrototypeOf(lhs);
        if (!isPrototype && typeof lhs === "object" && lhs !== null) {
          const ns = lhs;
          return ns.symbol === this.symbol;
        }
        return isPrototype;
      }
      static of(ref) {
        const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null;
        if (typeof ref === "number") {
          if (simpleSchemaCacheN[ref]) {
            return simpleSchemaCacheN[ref];
          }
        } else if (typeof ref === "string") {
          if (simpleSchemaCacheS[ref]) {
            return simpleSchemaCacheS[ref];
          }
        } else if (keyAble) {
          if (ref[anno.ns]) {
            return ref[anno.ns];
          }
        }
        const sc = deref(ref);
        if (sc instanceof _NormalizedSchema) {
          return sc;
        }
        if (isMemberSchema(sc)) {
          const [ns2, traits] = sc;
          if (ns2 instanceof _NormalizedSchema) {
            Object.assign(ns2.getMergedTraits(), translateTraits(traits));
            return ns2;
          }
          throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`);
        }
        const ns = new _NormalizedSchema(sc);
        if (keyAble) {
          return ref[anno.ns] = ns;
        }
        if (typeof sc === "string") {
          return simpleSchemaCacheS[sc] = ns;
        }
        if (typeof sc === "number") {
          return simpleSchemaCacheN[sc] = ns;
        }
        return ns;
      }
      getSchema() {
        const sc = this.schema;
        if (Array.isArray(sc) && sc[0] === 0) {
          return sc[4];
        }
        return sc;
      }
      getName(withNamespace = false) {
        const { name } = this;
        const short = !withNamespace && name && name.includes("#");
        return short ? name.split("#")[1] : name || void 0;
      }
      getMemberName() {
        return this.memberName;
      }
      isMemberSchema() {
        return this._isMemberSchema;
      }
      isListSchema() {
        const sc = this.getSchema();
        return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1;
      }
      isMapSchema() {
        const sc = this.getSchema();
        return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2;
      }
      isStructSchema() {
        const sc = this.getSchema();
        if (typeof sc !== "object") {
          return false;
        }
        const id = sc[0];
        return id === 3 || id === -3 || id === 4;
      }
      isUnionSchema() {
        const sc = this.getSchema();
        if (typeof sc !== "object") {
          return false;
        }
        return sc[0] === 4;
      }
      isBlobSchema() {
        const sc = this.getSchema();
        return sc === 21 || sc === 42;
      }
      isTimestampSchema() {
        const sc = this.getSchema();
        return typeof sc === "number" && sc >= 4 && sc <= 7;
      }
      isUnitSchema() {
        return this.getSchema() === "unit";
      }
      isDocumentSchema() {
        return this.getSchema() === 15;
      }
      isStringSchema() {
        return this.getSchema() === 0;
      }
      isBooleanSchema() {
        return this.getSchema() === 2;
      }
      isNumericSchema() {
        return this.getSchema() === 1;
      }
      isBigIntegerSchema() {
        return this.getSchema() === 17;
      }
      isBigDecimalSchema() {
        return this.getSchema() === 19;
      }
      isStreaming() {
        const { streaming } = this.getMergedTraits();
        return !!streaming || this.getSchema() === 42;
      }
      isIdempotencyToken() {
        return !!this.getMergedTraits().idempotencyToken;
      }
      getMergedTraits() {
        return this.normalizedTraits ?? (this.normalizedTraits = {
          ...this.getOwnTraits(),
          ...this.getMemberTraits()
        });
      }
      getMemberTraits() {
        return translateTraits(this.memberTraits);
      }
      getOwnTraits() {
        return translateTraits(this.traits);
      }
      getKeySchema() {
        const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()];
        if (!isDoc && !isMap) {
          throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);
        }
        const schema = this.getSchema();
        const memberSchema = isDoc ? 15 : schema[4] ?? 0;
        return member([memberSchema, 0], "key");
      }
      getValueSchema() {
        const sc = this.getSchema();
        const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()];
        const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0;
        if (memberSchema != null) {
          return member([memberSchema, 0], isMap ? "value" : "member");
        }
        throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);
      }
      getMemberSchema(memberName) {
        const struct2 = this.getSchema();
        if (this.isStructSchema() && struct2[4].includes(memberName)) {
          const i5 = struct2[4].indexOf(memberName);
          const memberSchema = struct2[5][i5];
          return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName);
        }
        if (this.isDocumentSchema()) {
          return member([15, 0], memberName);
        }
        throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`);
      }
      getMemberSchemas() {
        const buffer = {};
        try {
          for (const [k5, v] of this.structIterator()) {
            buffer[k5] = v;
          }
        } catch (ignored) {
        }
        return buffer;
      }
      getEventStreamMember() {
        if (this.isStructSchema()) {
          for (const [memberName, memberSchema] of this.structIterator()) {
            if (memberSchema.isStreaming() && memberSchema.isStructSchema()) {
              return memberName;
            }
          }
        }
        return "";
      }
      *structIterator() {
        if (this.isUnitSchema()) {
          return;
        }
        if (!this.isStructSchema()) {
          throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
        }
        const struct2 = this.getSchema();
        const z = struct2[4].length;
        let it = struct2[anno.it];
        if (it && z === it.length) {
          yield* it;
          return;
        }
        it = Array(z);
        for (let i5 = 0; i5 < z; ++i5) {
          const k5 = struct2[4][i5];
          const v = member([struct2[5][i5], 0], k5);
          yield it[i5] = [k5, v];
        }
        struct2[anno.it] = it;
      }
    };
    isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;
    isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5;
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js
var SimpleSchema, sim, simAdapter;
var init_SimpleSchema = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js"() {
    init_Schema();
    SimpleSchema = class _SimpleSchema extends Schema {
      static symbol = /* @__PURE__ */ Symbol.for("@smithy/sim");
      name;
      schemaRef;
      traits;
      symbol = _SimpleSchema.symbol;
    };
    sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), {
      name,
      namespace,
      traits,
      schemaRef
    });
    simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), {
      name,
      namespace,
      traits,
      schemaRef
    });
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js
var SCHEMA;
var init_sentinels = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js"() {
    SCHEMA = {
      BLOB: 21,
      STREAMING_BLOB: 42,
      BOOLEAN: 2,
      STRING: 0,
      NUMERIC: 1,
      BIG_INTEGER: 17,
      BIG_DECIMAL: 19,
      DOCUMENT: 15,
      TIMESTAMP_DEFAULT: 4,
      TIMESTAMP_DATE_TIME: 5,
      TIMESTAMP_HTTP_DATE: 6,
      TIMESTAMP_EPOCH_SECONDS: 7,
      LIST_MODIFIER: 64,
      MAP_MODIFIER: 128
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js
var TypeRegistry;
var init_TypeRegistry = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() {
    TypeRegistry = class _TypeRegistry {
      namespace;
      schemas;
      exceptions;
      static registries = /* @__PURE__ */ new Map();
      constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) {
        this.namespace = namespace;
        this.schemas = schemas;
        this.exceptions = exceptions;
      }
      static for(namespace) {
        if (!_TypeRegistry.registries.has(namespace)) {
          _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace));
        }
        return _TypeRegistry.registries.get(namespace);
      }
      copyFrom(other) {
        const { schemas, exceptions } = this;
        for (const [k5, v] of other.schemas) {
          if (!schemas.has(k5)) {
            schemas.set(k5, v);
          }
        }
        for (const [k5, v] of other.exceptions) {
          if (!exceptions.has(k5)) {
            exceptions.set(k5, v);
          }
        }
      }
      register(shapeId, schema) {
        const qualifiedName = this.normalizeShapeId(shapeId);
        for (const r5 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) {
          r5.schemas.set(qualifiedName, schema);
        }
      }
      getSchema(shapeId) {
        const id = this.normalizeShapeId(shapeId);
        if (!this.schemas.has(id)) {
          throw new Error(`@smithy/core/schema - schema not found for ${id}`);
        }
        return this.schemas.get(id);
      }
      registerError(es, ctor) {
        const $error = es;
        const ns = $error[1];
        for (const r5 of [this, _TypeRegistry.for(ns)]) {
          r5.schemas.set(ns + "#" + $error[2], $error);
          r5.exceptions.set($error, ctor);
        }
      }
      getErrorCtor(es) {
        const $error = es;
        if (this.exceptions.has($error)) {
          return this.exceptions.get($error);
        }
        const registry = _TypeRegistry.for($error[1]);
        return registry.exceptions.get($error);
      }
      getBaseException() {
        for (const exceptionKey of this.exceptions.keys()) {
          if (Array.isArray(exceptionKey)) {
            const [, ns, name] = exceptionKey;
            const id = ns + "#" + name;
            if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) {
              return exceptionKey;
            }
          }
        }
        return void 0;
      }
      find(predicate) {
        for (const schema of this.schemas.values()) {
          if (predicate(schema)) {
            return schema;
          }
        }
        return void 0;
      }
      clear() {
        this.schemas.clear();
        this.exceptions.clear();
      }
      normalizeShapeId(shapeId) {
        if (shapeId.includes("#")) {
          return shapeId;
        }
        return this.namespace + "#" + shapeId;
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/schema/index.js
var schema_exports = {};
__export(schema_exports, {
  ErrorSchema: () => ErrorSchema,
  ListSchema: () => ListSchema,
  MapSchema: () => MapSchema,
  NormalizedSchema: () => NormalizedSchema,
  OperationSchema: () => OperationSchema,
  SCHEMA: () => SCHEMA,
  Schema: () => Schema,
  SimpleSchema: () => SimpleSchema,
  StructureSchema: () => StructureSchema,
  TypeRegistry: () => TypeRegistry,
  deref: () => deref,
  deserializerMiddlewareOption: () => deserializerMiddlewareOption,
  error: () => error,
  getSchemaSerdePlugin: () => getSchemaSerdePlugin,
  isStaticSchema: () => isStaticSchema,
  list: () => list,
  map: () => map,
  op: () => op,
  operation: () => operation,
  serializerMiddlewareOption: () => serializerMiddlewareOption,
  sim: () => sim,
  simAdapter: () => simAdapter,
  simpleSchemaCacheN: () => simpleSchemaCacheN,
  simpleSchemaCacheS: () => simpleSchemaCacheS,
  struct: () => struct,
  traitsCache: () => traitsCache,
  translateTraits: () => translateTraits
});
var init_schema = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/schema/index.js"() {
    init_deref();
    init_getSchemaSerdePlugin();
    init_ListSchema();
    init_MapSchema();
    init_OperationSchema();
    init_operation();
    init_ErrorSchema();
    init_NormalizedSchema();
    init_Schema();
    init_SimpleSchema();
    init_StructureSchema();
    init_sentinels();
    init_translateTraits();
    init_TypeRegistry();
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js
var copyDocumentWithTransform;
var init_copyDocumentWithTransform = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js"() {
    copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js
var parseBoolean, expectBoolean, expectNumber, MAX_FLOAT, expectFloat32, expectLong, expectInt, expectInt32, expectShort, expectByte, expectSizedInt, castInt, expectNonNull, expectObject, expectString, expectUnion, strictParseDouble, strictParseFloat, strictParseFloat32, NUMBER_REGEX, parseNumber, limitedParseDouble, handleFloat, limitedParseFloat, limitedParseFloat32, parseFloatString, strictParseLong, strictParseInt, strictParseInt32, strictParseShort, strictParseByte, stackTraceWarning, logger;
var init_parse_utils = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js"() {
    parseBoolean = (value) => {
      switch (value) {
        case "true":
          return true;
        case "false":
          return false;
        default:
          throw new Error(`Unable to parse boolean value "${value}"`);
      }
    };
    expectBoolean = (value) => {
      if (value === null || value === void 0) {
        return void 0;
      }
      if (typeof value === "number") {
        if (value === 0 || value === 1) {
          logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
        }
        if (value === 0) {
          return false;
        }
        if (value === 1) {
          return true;
        }
      }
      if (typeof value === "string") {
        const lower = value.toLowerCase();
        if (lower === "false" || lower === "true") {
          logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
        }
        if (lower === "false") {
          return false;
        }
        if (lower === "true") {
          return true;
        }
      }
      if (typeof value === "boolean") {
        return value;
      }
      throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);
    };
    expectNumber = (value) => {
      if (value === null || value === void 0) {
        return void 0;
      }
      if (typeof value === "string") {
        const parsed = parseFloat(value);
        if (!Number.isNaN(parsed)) {
          if (String(parsed) !== String(value)) {
            logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));
          }
          return parsed;
        }
      }
      if (typeof value === "number") {
        return value;
      }
      throw new TypeError(`Expected number, got ${typeof value}: ${value}`);
    };
    MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
    expectFloat32 = (value) => {
      const expected = expectNumber(value);
      if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {
        if (Math.abs(expected) > MAX_FLOAT) {
          throw new TypeError(`Expected 32-bit float, got ${value}`);
        }
      }
      return expected;
    };
    expectLong = (value) => {
      if (value === null || value === void 0) {
        return void 0;
      }
      if (Number.isInteger(value) && !Number.isNaN(value)) {
        return value;
      }
      throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);
    };
    expectInt = expectLong;
    expectInt32 = (value) => expectSizedInt(value, 32);
    expectShort = (value) => expectSizedInt(value, 16);
    expectByte = (value) => expectSizedInt(value, 8);
    expectSizedInt = (value, size) => {
      const expected = expectLong(value);
      if (expected !== void 0 && castInt(expected, size) !== expected) {
        throw new TypeError(`Expected ${size}-bit integer, got ${value}`);
      }
      return expected;
    };
    castInt = (value, size) => {
      switch (size) {
        case 32:
          return Int32Array.of(value)[0];
        case 16:
          return Int16Array.of(value)[0];
        case 8:
          return Int8Array.of(value)[0];
      }
    };
    expectNonNull = (value, location) => {
      if (value === null || value === void 0) {
        if (location) {
          throw new TypeError(`Expected a non-null value for ${location}`);
        }
        throw new TypeError("Expected a non-null value");
      }
      return value;
    };
    expectObject = (value) => {
      if (value === null || value === void 0) {
        return void 0;
      }
      if (typeof value === "object" && !Array.isArray(value)) {
        return value;
      }
      const receivedType = Array.isArray(value) ? "array" : typeof value;
      throw new TypeError(`Expected object, got ${receivedType}: ${value}`);
    };
    expectString = (value) => {
      if (value === null || value === void 0) {
        return void 0;
      }
      if (typeof value === "string") {
        return value;
      }
      if (["boolean", "number", "bigint"].includes(typeof value)) {
        logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));
        return String(value);
      }
      throw new TypeError(`Expected string, got ${typeof value}: ${value}`);
    };
    expectUnion = (value) => {
      if (value === null || value === void 0) {
        return void 0;
      }
      const asObject = expectObject(value);
      const setKeys = [];
      for (const k5 in asObject) {
        if (asObject[k5] != null) {
          setKeys.push(k5);
        }
      }
      if (setKeys.length === 0) {
        throw new TypeError(`Unions must have exactly one non-null member. None were found.`);
      }
      if (setKeys.length > 1) {
        throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);
      }
      return asObject;
    };
    strictParseDouble = (value) => {
      if (typeof value == "string") {
        return expectNumber(parseNumber(value));
      }
      return expectNumber(value);
    };
    strictParseFloat = strictParseDouble;
    strictParseFloat32 = (value) => {
      if (typeof value == "string") {
        return expectFloat32(parseNumber(value));
      }
      return expectFloat32(value);
    };
    NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;
    parseNumber = (value) => {
      const matches = value.match(NUMBER_REGEX);
      if (matches === null || matches[0].length !== value.length) {
        throw new TypeError(`Expected real number, got implicit NaN`);
      }
      return parseFloat(value);
    };
    limitedParseDouble = (value) => {
      if (typeof value == "string") {
        return parseFloatString(value);
      }
      return expectNumber(value);
    };
    handleFloat = limitedParseDouble;
    limitedParseFloat = limitedParseDouble;
    limitedParseFloat32 = (value) => {
      if (typeof value == "string") {
        return parseFloatString(value);
      }
      return expectFloat32(value);
    };
    parseFloatString = (value) => {
      switch (value) {
        case "NaN":
          return NaN;
        case "Infinity":
          return Infinity;
        case "-Infinity":
          return -Infinity;
        default:
          throw new Error(`Unable to parse float value: ${value}`);
      }
    };
    strictParseLong = (value) => {
      if (typeof value === "string") {
        return expectLong(parseNumber(value));
      }
      return expectLong(value);
    };
    strictParseInt = strictParseLong;
    strictParseInt32 = (value) => {
      if (typeof value === "string") {
        return expectInt32(parseNumber(value));
      }
      return expectInt32(value);
    };
    strictParseShort = (value) => {
      if (typeof value === "string") {
        return expectShort(parseNumber(value));
      }
      return expectShort(value);
    };
    strictParseByte = (value) => {
      if (typeof value === "string") {
        return expectByte(parseNumber(value));
      }
      return expectByte(value);
    };
    stackTraceWarning = (message) => {
      return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n");
    };
    logger = {
      warn: console.warn
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js
function dateToUtcString(date2) {
  const year2 = date2.getUTCFullYear();
  const month = date2.getUTCMonth();
  const dayOfWeek = date2.getUTCDay();
  const dayOfMonthInt = date2.getUTCDate();
  const hoursInt = date2.getUTCHours();
  const minutesInt = date2.getUTCMinutes();
  const secondsInt = date2.getUTCSeconds();
  const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;
  const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;
  const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;
  const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;
  return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year2} ${hoursString}:${minutesString}:${secondsString} GMT`;
}
var DAYS, MONTHS, RFC3339, parseRfc3339DateTime, RFC3339_WITH_OFFSET, parseRfc3339DateTimeWithOffset, IMF_FIXDATE, RFC_850_DATE, ASC_TIME, parseRfc7231DateTime, parseEpochTimestamp, buildDate, parseTwoDigitYear, FIFTY_YEARS_IN_MILLIS, adjustRfc850Year, parseMonthByShortName, DAYS_IN_MONTH, validateDayOfMonth, isLeapYear, parseDateValue, parseMilliseconds, parseOffsetToMilliseconds, stripLeadingZeroes;
var init_date_utils = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js"() {
    init_parse_utils();
    DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
    MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
    RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
    parseRfc3339DateTime = (value) => {
      if (value === null || value === void 0) {
        return void 0;
      }
      if (typeof value !== "string") {
        throw new TypeError("RFC-3339 date-times must be expressed as strings");
      }
      const match = RFC3339.exec(value);
      if (!match) {
        throw new TypeError("Invalid RFC-3339 date-time value");
      }
      const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;
      const year2 = strictParseShort(stripLeadingZeroes(yearStr));
      const month = parseDateValue(monthStr, "month", 1, 12);
      const day = parseDateValue(dayStr, "day", 1, 31);
      return buildDate(year2, month, day, { hours, minutes, seconds, fractionalMilliseconds });
    };
    RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/);
    parseRfc3339DateTimeWithOffset = (value) => {
      if (value === null || value === void 0) {
        return void 0;
      }
      if (typeof value !== "string") {
        throw new TypeError("RFC-3339 date-times must be expressed as strings");
      }
      const match = RFC3339_WITH_OFFSET.exec(value);
      if (!match) {
        throw new TypeError("Invalid RFC-3339 date-time value");
      }
      const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;
      const year2 = strictParseShort(stripLeadingZeroes(yearStr));
      const month = parseDateValue(monthStr, "month", 1, 12);
      const day = parseDateValue(dayStr, "day", 1, 31);
      const date2 = buildDate(year2, month, day, { hours, minutes, seconds, fractionalMilliseconds });
      if (offsetStr.toUpperCase() != "Z") {
        date2.setTime(date2.getTime() - parseOffsetToMilliseconds(offsetStr));
      }
      return date2;
    };
    IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
    RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
    ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/);
    parseRfc7231DateTime = (value) => {
      if (value === null || value === void 0) {
        return void 0;
      }
      if (typeof value !== "string") {
        throw new TypeError("RFC-7231 date-times must be expressed as strings");
      }
      let match = IMF_FIXDATE.exec(value);
      if (match) {
        const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
        return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
      }
      match = RFC_850_DATE.exec(value);
      if (match) {
        const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
        return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), {
          hours,
          minutes,
          seconds,
          fractionalMilliseconds
        }));
      }
      match = ASC_TIME.exec(value);
      if (match) {
        const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;
        return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
      }
      throw new TypeError("Invalid RFC-7231 date-time value");
    };
    parseEpochTimestamp = (value) => {
      if (value === null || value === void 0) {
        return void 0;
      }
      let valueAsDouble;
      if (typeof value === "number") {
        valueAsDouble = value;
      } else if (typeof value === "string") {
        valueAsDouble = strictParseDouble(value);
      } else if (typeof value === "object" && value.tag === 1) {
        valueAsDouble = value.value;
      } else {
        throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");
      }
      if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {
        throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");
      }
      return new Date(Math.round(valueAsDouble * 1e3));
    };
    buildDate = (year2, month, day, time2) => {
      const adjustedMonth = month - 1;
      validateDayOfMonth(year2, adjustedMonth, day);
      return new Date(Date.UTC(year2, adjustedMonth, day, parseDateValue(time2.hours, "hour", 0, 23), parseDateValue(time2.minutes, "minute", 0, 59), parseDateValue(time2.seconds, "seconds", 0, 60), parseMilliseconds(time2.fractionalMilliseconds)));
    };
    parseTwoDigitYear = (value) => {
      const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear();
      const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));
      if (valueInThisCentury < thisYear) {
        return valueInThisCentury + 100;
      }
      return valueInThisCentury;
    };
    FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3;
    adjustRfc850Year = (input) => {
      if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) {
        return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));
      }
      return input;
    };
    parseMonthByShortName = (value) => {
      const monthIdx = MONTHS.indexOf(value);
      if (monthIdx < 0) {
        throw new TypeError(`Invalid month: ${value}`);
      }
      return monthIdx + 1;
    };
    DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
    validateDayOfMonth = (year2, month, day) => {
      let maxDays = DAYS_IN_MONTH[month];
      if (month === 1 && isLeapYear(year2)) {
        maxDays = 29;
      }
      if (day > maxDays) {
        throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year2}: ${day}`);
      }
    };
    isLeapYear = (year2) => {
      return year2 % 4 === 0 && (year2 % 100 !== 0 || year2 % 400 === 0);
    };
    parseDateValue = (value, type, lower, upper) => {
      const dateVal = strictParseByte(stripLeadingZeroes(value));
      if (dateVal < lower || dateVal > upper) {
        throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);
      }
      return dateVal;
    };
    parseMilliseconds = (value) => {
      if (value === null || value === void 0) {
        return 0;
      }
      return strictParseFloat32("0." + value) * 1e3;
    };
    parseOffsetToMilliseconds = (value) => {
      const directionStr = value[0];
      let direction = 1;
      if (directionStr == "+") {
        direction = 1;
      } else if (directionStr == "-") {
        direction = -1;
      } else {
        throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`);
      }
      const hour = Number(value.substring(1, 3));
      const minute = Number(value.substring(4, 6));
      return direction * (hour * 60 + minute) * 60 * 1e3;
    };
    stripLeadingZeroes = (value) => {
      let idx = 0;
      while (idx < value.length - 1 && value.charAt(idx) === "0") {
        idx++;
      }
      if (idx === 0) {
        return value;
      }
      return value.slice(idx);
    };
  }
});

// ../../node_modules/tslib/tslib.es6.mjs
var tslib_es6_exports = {};
__export(tslib_es6_exports, {
  __addDisposableResource: () => __addDisposableResource,
  __assign: () => __assign,
  __asyncDelegator: () => __asyncDelegator,
  __asyncGenerator: () => __asyncGenerator,
  __asyncValues: () => __asyncValues,
  __await: () => __await,
  __awaiter: () => __awaiter,
  __classPrivateFieldGet: () => __classPrivateFieldGet,
  __classPrivateFieldIn: () => __classPrivateFieldIn,
  __classPrivateFieldSet: () => __classPrivateFieldSet,
  __createBinding: () => __createBinding,
  __decorate: () => __decorate,
  __disposeResources: () => __disposeResources,
  __esDecorate: () => __esDecorate,
  __exportStar: () => __exportStar,
  __extends: () => __extends,
  __generator: () => __generator,
  __importDefault: () => __importDefault,
  __importStar: () => __importStar,
  __makeTemplateObject: () => __makeTemplateObject,
  __metadata: () => __metadata,
  __param: () => __param,
  __propKey: () => __propKey,
  __read: () => __read,
  __rest: () => __rest,
  __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension,
  __runInitializers: () => __runInitializers,
  __setFunctionName: () => __setFunctionName,
  __spread: () => __spread,
  __spreadArray: () => __spreadArray,
  __spreadArrays: () => __spreadArrays,
  __values: () => __values,
  default: () => tslib_es6_default
});
function __extends(d5, b5) {
  if (typeof b5 !== "function" && b5 !== null)
    throw new TypeError("Class extends value " + String(b5) + " is not a constructor or null");
  extendStatics(d5, b5);
  function __() {
    this.constructor = d5;
  }
  d5.prototype = b5 === null ? Object.create(b5) : (__.prototype = b5.prototype, new __());
}
function __rest(s, e5) {
  var t = {};
  for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2) && e5.indexOf(p2) < 0)
    t[p2] = s[p2];
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
    for (var i5 = 0, p2 = Object.getOwnPropertySymbols(s); i5 < p2.length; i5++) {
      if (e5.indexOf(p2[i5]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i5]))
        t[p2[i5]] = s[p2[i5]];
    }
  return t;
}
function __decorate(decorators, target, key, desc) {
  var c5 = arguments.length, r5 = c5 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r5 = Reflect.decorate(decorators, target, key, desc);
  else for (var i5 = decorators.length - 1; i5 >= 0; i5--) if (d5 = decorators[i5]) r5 = (c5 < 3 ? d5(r5) : c5 > 3 ? d5(target, key, r5) : d5(target, key)) || r5;
  return c5 > 3 && r5 && Object.defineProperty(target, key, r5), r5;
}
function __param(paramIndex, decorator) {
  return function(target, key) {
    decorator(target, key, paramIndex);
  };
}
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
  function accept(f5) {
    if (f5 !== void 0 && typeof f5 !== "function") throw new TypeError("Function expected");
    return f5;
  }
  var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
  var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
  var _, done = false;
  for (var i5 = decorators.length - 1; i5 >= 0; i5--) {
    var context = {};
    for (var p2 in contextIn) context[p2] = p2 === "access" ? {} : contextIn[p2];
    for (var p2 in contextIn.access) context.access[p2] = contextIn.access[p2];
    context.addInitializer = function(f5) {
      if (done) throw new TypeError("Cannot add initializers after decoration has completed");
      extraInitializers.push(accept(f5 || null));
    };
    var result = (0, decorators[i5])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
    if (kind === "accessor") {
      if (result === void 0) continue;
      if (result === null || typeof result !== "object") throw new TypeError("Object expected");
      if (_ = accept(result.get)) descriptor.get = _;
      if (_ = accept(result.set)) descriptor.set = _;
      if (_ = accept(result.init)) initializers.unshift(_);
    } else if (_ = accept(result)) {
      if (kind === "field") initializers.unshift(_);
      else descriptor[key] = _;
    }
  }
  if (target) Object.defineProperty(target, contextIn.name, descriptor);
  done = true;
}
function __runInitializers(thisArg, initializers, value) {
  var useValue = arguments.length > 2;
  for (var i5 = 0; i5 < initializers.length; i5++) {
    value = useValue ? initializers[i5].call(thisArg, value) : initializers[i5].call(thisArg);
  }
  return useValue ? value : void 0;
}
function __propKey(x) {
  return typeof x === "symbol" ? x : "".concat(x);
}
function __setFunctionName(f5, name, prefix) {
  if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
  return Object.defineProperty(f5, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
}
function __metadata(metadataKey, metadataValue) {
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function(resolve) {
      resolve(value);
    });
  }
  return new (P || (P = Promise))(function(resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e5) {
        reject(e5);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e5) {
        reject(e5);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
}
function __generator(thisArg, body) {
  var _ = { label: 0, sent: function() {
    if (t[0] & 1) throw t[1];
    return t[1];
  }, trys: [], ops: [] }, f5, y, t, g5 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
  return g5.next = verb(0), g5["throw"] = verb(1), g5["return"] = verb(2), typeof Symbol === "function" && (g5[Symbol.iterator] = function() {
    return this;
  }), g5;
  function verb(n2) {
    return function(v) {
      return step([n2, v]);
    };
  }
  function step(op2) {
    if (f5) throw new TypeError("Generator is already executing.");
    while (g5 && (g5 = 0, op2[0] && (_ = 0)), _) try {
      if (f5 = 1, y && (t = op2[0] & 2 ? y["return"] : op2[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op2[1])).done) return t;
      if (y = 0, t) op2 = [op2[0] & 2, t.value];
      switch (op2[0]) {
        case 0:
        case 1:
          t = op2;
          break;
        case 4:
          _.label++;
          return { value: op2[1], done: false };
        case 5:
          _.label++;
          y = op2[1];
          op2 = [0];
          continue;
        case 7:
          op2 = _.ops.pop();
          _.trys.pop();
          continue;
        default:
          if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op2[0] === 6 || op2[0] === 2)) {
            _ = 0;
            continue;
          }
          if (op2[0] === 3 && (!t || op2[1] > t[0] && op2[1] < t[3])) {
            _.label = op2[1];
            break;
          }
          if (op2[0] === 6 && _.label < t[1]) {
            _.label = t[1];
            t = op2;
            break;
          }
          if (t && _.label < t[2]) {
            _.label = t[2];
            _.ops.push(op2);
            break;
          }
          if (t[2]) _.ops.pop();
          _.trys.pop();
          continue;
      }
      op2 = body.call(thisArg, _);
    } catch (e5) {
      op2 = [6, e5];
      y = 0;
    } finally {
      f5 = t = 0;
    }
    if (op2[0] & 5) throw op2[1];
    return { value: op2[0] ? op2[1] : void 0, done: true };
  }
}
function __exportStar(m3, o2) {
  for (var p2 in m3) if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(o2, p2)) __createBinding(o2, m3, p2);
}
function __values(o2) {
  var s = typeof Symbol === "function" && Symbol.iterator, m3 = s && o2[s], i5 = 0;
  if (m3) return m3.call(o2);
  if (o2 && typeof o2.length === "number") return {
    next: function() {
      if (o2 && i5 >= o2.length) o2 = void 0;
      return { value: o2 && o2[i5++], done: !o2 };
    }
  };
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o2, n2) {
  var m3 = typeof Symbol === "function" && o2[Symbol.iterator];
  if (!m3) return o2;
  var i5 = m3.call(o2), r5, ar = [], e5;
  try {
    while ((n2 === void 0 || n2-- > 0) && !(r5 = i5.next()).done) ar.push(r5.value);
  } catch (error3) {
    e5 = { error: error3 };
  } finally {
    try {
      if (r5 && !r5.done && (m3 = i5["return"])) m3.call(i5);
    } finally {
      if (e5) throw e5.error;
    }
  }
  return ar;
}
function __spread() {
  for (var ar = [], i5 = 0; i5 < arguments.length; i5++)
    ar = ar.concat(__read(arguments[i5]));
  return ar;
}
function __spreadArrays() {
  for (var s = 0, i5 = 0, il = arguments.length; i5 < il; i5++) s += arguments[i5].length;
  for (var r5 = Array(s), k5 = 0, i5 = 0; i5 < il; i5++)
    for (var a5 = arguments[i5], j5 = 0, jl = a5.length; j5 < jl; j5++, k5++)
      r5[k5] = a5[j5];
  return r5;
}
function __spreadArray(to, from, pack) {
  if (pack || arguments.length === 2) for (var i5 = 0, l3 = from.length, ar; i5 < l3; i5++) {
    if (ar || !(i5 in from)) {
      if (!ar) ar = Array.prototype.slice.call(from, 0, i5);
      ar[i5] = from[i5];
    }
  }
  return to.concat(ar || Array.prototype.slice.call(from));
}
function __await(v) {
  return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var g5 = generator.apply(thisArg, _arguments || []), i5, q2 = [];
  return i5 = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i5[Symbol.asyncIterator] = function() {
    return this;
  }, i5;
  function awaitReturn(f5) {
    return function(v) {
      return Promise.resolve(v).then(f5, reject);
    };
  }
  function verb(n2, f5) {
    if (g5[n2]) {
      i5[n2] = function(v) {
        return new Promise(function(a5, b5) {
          q2.push([n2, v, a5, b5]) > 1 || resume(n2, v);
        });
      };
      if (f5) i5[n2] = f5(i5[n2]);
    }
  }
  function resume(n2, v) {
    try {
      step(g5[n2](v));
    } catch (e5) {
      settle(q2[0][3], e5);
    }
  }
  function step(r5) {
    r5.value instanceof __await ? Promise.resolve(r5.value.v).then(fulfill, reject) : settle(q2[0][2], r5);
  }
  function fulfill(value) {
    resume("next", value);
  }
  function reject(value) {
    resume("throw", value);
  }
  function settle(f5, v) {
    if (f5(v), q2.shift(), q2.length) resume(q2[0][0], q2[0][1]);
  }
}
function __asyncDelegator(o2) {
  var i5, p2;
  return i5 = {}, verb("next"), verb("throw", function(e5) {
    throw e5;
  }), verb("return"), i5[Symbol.iterator] = function() {
    return this;
  }, i5;
  function verb(n2, f5) {
    i5[n2] = o2[n2] ? function(v) {
      return (p2 = !p2) ? { value: __await(o2[n2](v)), done: false } : f5 ? f5(v) : v;
    } : f5;
  }
}
function __asyncValues(o2) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var m3 = o2[Symbol.asyncIterator], i5;
  return m3 ? m3.call(o2) : (o2 = typeof __values === "function" ? __values(o2) : o2[Symbol.iterator](), i5 = {}, verb("next"), verb("throw"), verb("return"), i5[Symbol.asyncIterator] = function() {
    return this;
  }, i5);
  function verb(n2) {
    i5[n2] = o2[n2] && function(v) {
      return new Promise(function(resolve, reject) {
        v = o2[n2](v), settle(resolve, reject, v.done, v.value);
      });
    };
  }
  function settle(resolve, reject, d5, v) {
    Promise.resolve(v).then(function(v2) {
      resolve({ value: v2, done: d5 });
    }, reject);
  }
}
function __makeTemplateObject(cooked, raw) {
  if (Object.defineProperty) {
    Object.defineProperty(cooked, "raw", { value: raw });
  } else {
    cooked.raw = raw;
  }
  return cooked;
}
function __importStar(mod) {
  if (mod && mod.__esModule) return mod;
  var result = {};
  if (mod != null) {
    for (var k5 = ownKeys(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding(result, mod, k5[i5]);
  }
  __setModuleDefault(result, mod);
  return result;
}
function __importDefault(mod) {
  return mod && mod.__esModule ? mod : { default: mod };
}
function __classPrivateFieldGet(receiver, state2, kind, f5) {
  if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
  if (typeof state2 === "function" ? receiver !== state2 || !f5 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state2.get(receiver);
}
function __classPrivateFieldSet(receiver, state2, value, kind, f5) {
  if (kind === "m") throw new TypeError("Private method is not writable");
  if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a setter");
  if (typeof state2 === "function" ? receiver !== state2 || !f5 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return kind === "a" ? f5.call(receiver, value) : f5 ? f5.value = value : state2.set(receiver, value), value;
}
function __classPrivateFieldIn(state2, receiver) {
  if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object");
  return typeof state2 === "function" ? receiver === state2 : state2.has(receiver);
}
function __addDisposableResource(env2, value, async) {
  if (value !== null && value !== void 0) {
    if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
    var dispose, inner;
    if (async) {
      if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
      dispose = value[Symbol.asyncDispose];
    }
    if (dispose === void 0) {
      if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
      dispose = value[Symbol.dispose];
      if (async) inner = dispose;
    }
    if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
    if (inner) dispose = function() {
      try {
        inner.call(this);
      } catch (e5) {
        return Promise.reject(e5);
      }
    };
    env2.stack.push({ value, dispose, async });
  } else if (async) {
    env2.stack.push({ async: true });
  }
  return value;
}
function __disposeResources(env2) {
  function fail(e5) {
    env2.error = env2.hasError ? new _SuppressedError(e5, env2.error, "An error was suppressed during disposal.") : e5;
    env2.hasError = true;
  }
  var r5, s = 0;
  function next() {
    while (r5 = env2.stack.pop()) {
      try {
        if (!r5.async && s === 1) return s = 0, env2.stack.push(r5), Promise.resolve().then(next);
        if (r5.dispose) {
          var result = r5.dispose.call(r5.value);
          if (r5.async) return s |= 2, Promise.resolve(result).then(next, function(e5) {
            fail(e5);
            return next();
          });
        } else s |= 1;
      } catch (e5) {
        fail(e5);
      }
    }
    if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
    if (env2.hasError) throw env2.error;
  }
  return next();
}
function __rewriteRelativeImportExtension(path, preserveJsx) {
  if (typeof path === "string" && /^\.\.?\//.test(path)) {
    return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m3, tsx, d5, ext, cm) {
      return tsx ? preserveJsx ? ".jsx" : ".js" : d5 && (!ext || !cm) ? m3 : d5 + ext + "." + cm.toLowerCase() + "js";
    });
  }
  return path;
}
var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
var init_tslib_es6 = __esm({
  "../../node_modules/tslib/tslib.es6.mjs"() {
    extendStatics = function(d5, b5) {
      extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b6) {
        d6.__proto__ = b6;
      } || function(d6, b6) {
        for (var p2 in b6) if (Object.prototype.hasOwnProperty.call(b6, p2)) d6[p2] = b6[p2];
      };
      return extendStatics(d5, b5);
    };
    __assign = function() {
      __assign = Object.assign || function __assign2(t) {
        for (var s, i5 = 1, n2 = arguments.length; i5 < n2; i5++) {
          s = arguments[i5];
          for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t[p2] = s[p2];
        }
        return t;
      };
      return __assign.apply(this, arguments);
    };
    __createBinding = Object.create ? (function(o2, m3, k5, k22) {
      if (k22 === void 0) k22 = k5;
      var desc = Object.getOwnPropertyDescriptor(m3, k5);
      if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m3[k5];
        } };
      }
      Object.defineProperty(o2, k22, desc);
    }) : (function(o2, m3, k5, k22) {
      if (k22 === void 0) k22 = k5;
      o2[k22] = m3[k5];
    });
    __setModuleDefault = Object.create ? (function(o2, v) {
      Object.defineProperty(o2, "default", { enumerable: true, value: v });
    }) : function(o2, v) {
      o2["default"] = v;
    };
    ownKeys = function(o2) {
      ownKeys = Object.getOwnPropertyNames || function(o3) {
        var ar = [];
        for (var k5 in o3) if (Object.prototype.hasOwnProperty.call(o3, k5)) ar[ar.length] = k5;
        return ar;
      };
      return ownKeys(o2);
    };
    _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) {
      var e5 = new Error(message);
      return e5.name = "SuppressedError", e5.error = error3, e5.suppressed = suppressed, e5;
    };
    tslib_es6_default = {
      __extends,
      __assign,
      __rest,
      __decorate,
      __param,
      __esDecorate,
      __runInitializers,
      __propKey,
      __setFunctionName,
      __metadata,
      __awaiter,
      __generator,
      __createBinding,
      __exportStar,
      __values,
      __read,
      __spread,
      __spreadArrays,
      __spreadArray,
      __await,
      __asyncGenerator,
      __asyncDelegator,
      __asyncValues,
      __makeTemplateObject,
      __importStar,
      __importDefault,
      __classPrivateFieldGet,
      __classPrivateFieldSet,
      __classPrivateFieldIn,
      __addDisposableResource,
      __disposeResources,
      __rewriteRelativeImportExtension
    };
  }
});

// ../../node_modules/@smithy/uuid/dist-cjs/randomUUID.js
var require_randomUUID = __commonJS({
  "../../node_modules/@smithy/uuid/dist-cjs/randomUUID.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.randomUUID = void 0;
    var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
    var crypto_1 = tslib_1.__importDefault(require("crypto"));
    exports2.randomUUID = crypto_1.default.randomUUID.bind(crypto_1.default);
  }
});

// ../../node_modules/@smithy/uuid/dist-cjs/index.js
var require_dist_cjs19 = __commonJS({
  "../../node_modules/@smithy/uuid/dist-cjs/index.js"(exports2) {
    "use strict";
    var randomUUID = require_randomUUID();
    var decimalToHex = Array.from({ length: 256 }, (_, i5) => i5.toString(16).padStart(2, "0"));
    var v4 = () => {
      if (randomUUID.randomUUID) {
        return randomUUID.randomUUID();
      }
      const rnds = new Uint8Array(16);
      crypto.getRandomValues(rnds);
      rnds[6] = rnds[6] & 15 | 64;
      rnds[8] = rnds[8] & 63 | 128;
      return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]];
    };
    exports2.v4 = v4;
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js
var import_uuid;
var init_generateIdempotencyToken = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js"() {
    import_uuid = __toESM(require_dist_cjs19());
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js
var LazyJsonString;
var init_lazy_json = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js"() {
    LazyJsonString = function LazyJsonString2(val) {
      const str = Object.assign(new String(val), {
        deserializeJSON() {
          return JSON.parse(String(val));
        },
        toString() {
          return String(val);
        },
        toJSON() {
          return String(val);
        }
      });
      return str;
    };
    LazyJsonString.from = (object) => {
      if (object && typeof object === "object" && (object instanceof LazyJsonString || "deserializeJSON" in object)) {
        return object;
      } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) {
        return LazyJsonString(String(object));
      }
      return LazyJsonString(JSON.stringify(object));
    };
    LazyJsonString.fromObject = LazyJsonString.from;
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js
function quoteHeader(part) {
  if (part.includes(",") || part.includes('"')) {
    part = `"${part.replace(/"/g, '\\"')}"`;
  }
  return part;
}
var init_quote_header = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js"() {
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js
function range(v, min, max) {
  const _v = Number(v);
  if (_v < min || _v > max) {
    throw new Error(`Value ${_v} out of range [${min}, ${max}]`);
  }
}
var ddd, mmm, time, date, year, RFC3339_WITH_OFFSET2, IMF_FIXDATE2, RFC_850_DATE2, ASC_TIME2, months, _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime;
var init_schema_date_utils = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js"() {
    ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;
    mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;
    time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;
    date = `(\\d?\\d)`;
    year = `(\\d{4})`;
    RFC3339_WITH_OFFSET2 = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);
    IMF_FIXDATE2 = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);
    RFC_850_DATE2 = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`);
    ASC_TIME2 = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`);
    months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
    _parseEpochTimestamp = (value) => {
      if (value == null) {
        return void 0;
      }
      let num = NaN;
      if (typeof value === "number") {
        num = value;
      } else if (typeof value === "string") {
        if (!/^-?\d*\.?\d+$/.test(value)) {
          throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);
        }
        num = Number.parseFloat(value);
      } else if (typeof value === "object" && value.tag === 1) {
        num = value.value;
      }
      if (isNaN(num) || Math.abs(num) === Infinity) {
        throw new TypeError("Epoch timestamps must be valid finite numbers.");
      }
      return new Date(Math.round(num * 1e3));
    };
    _parseRfc3339DateTimeWithOffset = (value) => {
      if (value == null) {
        return void 0;
      }
      if (typeof value !== "string") {
        throw new TypeError("RFC3339 timestamps must be strings");
      }
      const matches = RFC3339_WITH_OFFSET2.exec(value);
      if (!matches) {
        throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);
      }
      const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;
      range(monthStr, 1, 12);
      range(dayStr, 1, 31);
      range(hours, 0, 23);
      range(minutes, 0, 59);
      range(seconds, 0, 60);
      const date2 = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1e3) : 0));
      date2.setUTCFullYear(Number(yearStr));
      if (offsetStr.toUpperCase() != "Z") {
        const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0];
        const scalar = sign === "-" ? 1 : -1;
        date2.setTime(date2.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1e3 + Number(offsetM) * 60 * 1e3));
      }
      return date2;
    };
    _parseRfc7231DateTime = (value) => {
      if (value == null) {
        return void 0;
      }
      if (typeof value !== "string") {
        throw new TypeError("RFC7231 timestamps must be strings.");
      }
      let day;
      let month;
      let year2;
      let hour;
      let minute;
      let second;
      let fraction;
      let matches;
      if (matches = IMF_FIXDATE2.exec(value)) {
        [, day, month, year2, hour, minute, second, fraction] = matches;
      } else if (matches = RFC_850_DATE2.exec(value)) {
        [, day, month, year2, hour, minute, second, fraction] = matches;
        year2 = (Number(year2) + 1900).toString();
      } else if (matches = ASC_TIME2.exec(value)) {
        [, month, day, hour, minute, second, fraction, year2] = matches;
      }
      if (year2 && second) {
        const timestamp = Date.UTC(Number(year2), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1e3) : 0);
        range(day, 1, 31);
        range(hour, 0, 23);
        range(minute, 0, 59);
        range(second, 0, 60);
        const date2 = new Date(timestamp);
        date2.setUTCFullYear(Number(year2));
        return date2;
      }
      throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/serde/split-every.js
function splitEvery(value, delimiter, numDelimiters) {
  if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {
    throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery.");
  }
  const segments = value.split(delimiter);
  if (numDelimiters === 1) {
    return segments;
  }
  const compoundSegments = [];
  let currentSegment = "";
  for (let i5 = 0; i5 < segments.length; i5++) {
    if (currentSegment === "") {
      currentSegment = segments[i5];
    } else {
      currentSegment += delimiter + segments[i5];
    }
    if ((i5 + 1) % numDelimiters === 0) {
      compoundSegments.push(currentSegment);
      currentSegment = "";
    }
  }
  if (currentSegment !== "") {
    compoundSegments.push(currentSegment);
  }
  return compoundSegments;
}
var init_split_every = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/serde/split-every.js"() {
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js
var splitHeader;
var init_split_header = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js"() {
    splitHeader = (value) => {
      const z = value.length;
      const values = [];
      let withinQuotes = false;
      let prevChar = void 0;
      let anchor = 0;
      for (let i5 = 0; i5 < z; ++i5) {
        const char = value[i5];
        switch (char) {
          case `"`:
            if (prevChar !== "\\") {
              withinQuotes = !withinQuotes;
            }
            break;
          case ",":
            if (!withinQuotes) {
              values.push(value.slice(anchor, i5));
              anchor = i5 + 1;
            }
            break;
          default:
        }
        prevChar = char;
      }
      values.push(value.slice(anchor));
      return values.map((v) => {
        v = v.trim();
        const z2 = v.length;
        if (z2 < 2) {
          return v;
        }
        if (v[0] === `"` && v[z2 - 1] === `"`) {
          v = v.slice(1, z2 - 1);
        }
        return v.replace(/\\"/g, '"');
      });
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js
function nv(input) {
  return new NumericValue(String(input), "bigDecimal");
}
var format, NumericValue;
var init_NumericValue = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js"() {
    format = /^-?\d*(\.\d+)?$/;
    NumericValue = class _NumericValue {
      string;
      type;
      constructor(string, type) {
        this.string = string;
        this.type = type;
        if (!format.test(string)) {
          throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
        }
      }
      toString() {
        return this.string;
      }
      static [Symbol.hasInstance](object) {
        if (!object || typeof object !== "object") {
          return false;
        }
        const _nv = object;
        return _NumericValue.prototype.isPrototypeOf(object) || _nv.type === "bigDecimal" && format.test(_nv.string);
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/serde/index.js
var serde_exports = {};
__export(serde_exports, {
  LazyJsonString: () => LazyJsonString,
  NumericValue: () => NumericValue,
  _parseEpochTimestamp: () => _parseEpochTimestamp,
  _parseRfc3339DateTimeWithOffset: () => _parseRfc3339DateTimeWithOffset,
  _parseRfc7231DateTime: () => _parseRfc7231DateTime,
  copyDocumentWithTransform: () => copyDocumentWithTransform,
  dateToUtcString: () => dateToUtcString,
  expectBoolean: () => expectBoolean,
  expectByte: () => expectByte,
  expectFloat32: () => expectFloat32,
  expectInt: () => expectInt,
  expectInt32: () => expectInt32,
  expectLong: () => expectLong,
  expectNonNull: () => expectNonNull,
  expectNumber: () => expectNumber,
  expectObject: () => expectObject,
  expectShort: () => expectShort,
  expectString: () => expectString,
  expectUnion: () => expectUnion,
  generateIdempotencyToken: () => import_uuid.v4,
  handleFloat: () => handleFloat,
  limitedParseDouble: () => limitedParseDouble,
  limitedParseFloat: () => limitedParseFloat,
  limitedParseFloat32: () => limitedParseFloat32,
  logger: () => logger,
  nv: () => nv,
  parseBoolean: () => parseBoolean,
  parseEpochTimestamp: () => parseEpochTimestamp,
  parseRfc3339DateTime: () => parseRfc3339DateTime,
  parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset,
  parseRfc7231DateTime: () => parseRfc7231DateTime,
  quoteHeader: () => quoteHeader,
  splitEvery: () => splitEvery,
  splitHeader: () => splitHeader,
  strictParseByte: () => strictParseByte,
  strictParseDouble: () => strictParseDouble,
  strictParseFloat: () => strictParseFloat,
  strictParseFloat32: () => strictParseFloat32,
  strictParseInt: () => strictParseInt,
  strictParseInt32: () => strictParseInt32,
  strictParseLong: () => strictParseLong,
  strictParseShort: () => strictParseShort
});
var init_serde = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/serde/index.js"() {
    init_copyDocumentWithTransform();
    init_date_utils();
    init_generateIdempotencyToken();
    init_lazy_json();
    init_parse_utils();
    init_quote_header();
    init_schema_date_utils();
    init_split_every();
    init_split_header();
    init_NumericValue();
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js
var SerdeContext;
var init_SerdeContext = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js"() {
    SerdeContext = class {
      serdeContext;
      setSerdeContext(serdeContext) {
        this.serdeContext = serdeContext;
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js
var import_util_utf8, EventStreamSerde;
var init_EventStreamSerde = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js"() {
    import_util_utf8 = __toESM(require_dist_cjs9());
    EventStreamSerde = class {
      marshaller;
      serializer;
      deserializer;
      serdeContext;
      defaultContentType;
      constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType }) {
        this.marshaller = marshaller;
        this.serializer = serializer;
        this.deserializer = deserializer;
        this.serdeContext = serdeContext;
        this.defaultContentType = defaultContentType;
      }
      async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
        const marshaller = this.marshaller;
        const eventStreamMember = requestSchema.getEventStreamMember();
        const unionSchema = requestSchema.getMemberSchema(eventStreamMember);
        const serializer = this.serializer;
        const defaultContentType = this.defaultContentType;
        const initialRequestMarker = /* @__PURE__ */ Symbol("initialRequestMarker");
        const eventStreamIterable = {
          async *[Symbol.asyncIterator]() {
            if (initialRequest) {
              const headers = {
                ":event-type": { type: "string", value: "initial-request" },
                ":message-type": { type: "string", value: "event" },
                ":content-type": { type: "string", value: defaultContentType }
              };
              serializer.write(requestSchema, initialRequest);
              const body = serializer.flush();
              yield {
                [initialRequestMarker]: true,
                headers,
                body
              };
            }
            for await (const page of eventStream) {
              yield page;
            }
          }
        };
        return marshaller.serialize(eventStreamIterable, (event) => {
          if (event[initialRequestMarker]) {
            return {
              headers: event.headers,
              body: event.body
            };
          }
          let unionMember = "";
          for (const key in event) {
            if (key !== "__type") {
              unionMember = key;
              break;
            }
          }
          const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);
          const headers = {
            ":event-type": { type: "string", value: eventType },
            ":message-type": { type: "string", value: "event" },
            ":content-type": { type: "string", value: explicitPayloadContentType ?? defaultContentType },
            ...additionalHeaders
          };
          return {
            headers,
            body
          };
        });
      }
      async deserializeEventStream({ response, responseSchema, initialResponseContainer }) {
        const marshaller = this.marshaller;
        const eventStreamMember = responseSchema.getEventStreamMember();
        const unionSchema = responseSchema.getMemberSchema(eventStreamMember);
        const memberSchemas = unionSchema.getMemberSchemas();
        const initialResponseMarker = /* @__PURE__ */ Symbol("initialResponseMarker");
        const asyncIterable = marshaller.deserialize(response.body, async (event) => {
          let unionMember = "";
          for (const key in event) {
            if (key !== "__type") {
              unionMember = key;
              break;
            }
          }
          const body = event[unionMember].body;
          if (unionMember === "initial-response") {
            const dataObject = await this.deserializer.read(responseSchema, body);
            delete dataObject[eventStreamMember];
            return {
              [initialResponseMarker]: true,
              ...dataObject
            };
          } else if (unionMember in memberSchemas) {
            const eventStreamSchema = memberSchemas[unionMember];
            if (eventStreamSchema.isStructSchema()) {
              const out = {};
              let hasBindings = false;
              for (const [name, member2] of eventStreamSchema.structIterator()) {
                const { eventHeader, eventPayload } = member2.getMergedTraits();
                hasBindings = hasBindings || Boolean(eventHeader || eventPayload);
                if (eventPayload) {
                  if (member2.isBlobSchema()) {
                    out[name] = body;
                  } else if (member2.isStringSchema()) {
                    out[name] = (this.serdeContext?.utf8Encoder ?? import_util_utf8.toUtf8)(body);
                  } else if (member2.isStructSchema()) {
                    out[name] = await this.deserializer.read(member2, body);
                  }
                } else if (eventHeader) {
                  const value = event[unionMember].headers[name]?.value;
                  if (value != null) {
                    if (member2.isNumericSchema()) {
                      if (value && typeof value === "object" && "bytes" in value) {
                        out[name] = BigInt(value.toString());
                      } else {
                        out[name] = Number(value);
                      }
                    } else {
                      out[name] = value;
                    }
                  }
                }
              }
              if (hasBindings) {
                return {
                  [unionMember]: out
                };
              }
              if (body.byteLength === 0) {
                return {
                  [unionMember]: {}
                };
              }
            }
            return {
              [unionMember]: await this.deserializer.read(eventStreamSchema, body)
            };
          } else {
            return {
              $unknown: event
            };
          }
        });
        const asyncIterator = asyncIterable[Symbol.asyncIterator]();
        const firstEvent = await asyncIterator.next();
        if (firstEvent.done) {
          return asyncIterable;
        }
        if (firstEvent.value?.[initialResponseMarker]) {
          if (!responseSchema) {
            throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
          }
          for (const key in firstEvent.value) {
            initialResponseContainer[key] = firstEvent.value[key];
          }
        }
        return {
          async *[Symbol.asyncIterator]() {
            if (!firstEvent?.value?.[initialResponseMarker]) {
              yield firstEvent.value;
            }
            while (true) {
              const { done, value } = await asyncIterator.next();
              if (done) {
                break;
              }
              yield value;
            }
          }
        };
      }
      writeEventBody(unionMember, unionSchema, event) {
        const serializer = this.serializer;
        let eventType = unionMember;
        let explicitPayloadMember = null;
        let explicitPayloadContentType;
        const isKnownSchema = (() => {
          const struct2 = unionSchema.getSchema();
          return struct2[4].includes(unionMember);
        })();
        const additionalHeaders = {};
        if (!isKnownSchema) {
          const [type, value] = event[unionMember];
          eventType = type;
          serializer.write(15, value);
        } else {
          const eventSchema = unionSchema.getMemberSchema(unionMember);
          if (eventSchema.isStructSchema()) {
            for (const [memberName, memberSchema] of eventSchema.structIterator()) {
              const { eventHeader, eventPayload } = memberSchema.getMergedTraits();
              if (eventPayload) {
                explicitPayloadMember = memberName;
              } else if (eventHeader) {
                const value = event[unionMember][memberName];
                let type = "binary";
                if (memberSchema.isNumericSchema()) {
                  if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {
                    type = "integer";
                  } else {
                    type = "long";
                  }
                } else if (memberSchema.isTimestampSchema()) {
                  type = "timestamp";
                } else if (memberSchema.isStringSchema()) {
                  type = "string";
                } else if (memberSchema.isBooleanSchema()) {
                  type = "boolean";
                }
                if (value != null) {
                  additionalHeaders[memberName] = {
                    type,
                    value
                  };
                  delete event[unionMember][memberName];
                }
              }
            }
            if (explicitPayloadMember !== null) {
              const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);
              if (payloadSchema.isBlobSchema()) {
                explicitPayloadContentType = "application/octet-stream";
              } else if (payloadSchema.isStringSchema()) {
                explicitPayloadContentType = "text/plain";
              }
              serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);
            } else {
              serializer.write(eventSchema, event[unionMember]);
            }
          } else if (eventSchema.isUnitSchema()) {
            serializer.write(eventSchema, {});
          } else {
            throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");
          }
        }
        const messageSerialization = serializer.flush() ?? new Uint8Array();
        const body = typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? import_util_utf8.fromUtf8)(messageSerialization) : messageSerialization;
        return {
          body,
          eventType,
          explicitPayloadContentType,
          additionalHeaders
        };
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/event-streams/index.js
var event_streams_exports = {};
__export(event_streams_exports, {
  EventStreamSerde: () => EventStreamSerde
});
var init_event_streams = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/event-streams/index.js"() {
    init_EventStreamSerde();
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js
var import_protocol_http3, HttpProtocol;
var init_HttpProtocol = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js"() {
    init_schema();
    import_protocol_http3 = __toESM(require_dist_cjs2());
    init_SerdeContext();
    HttpProtocol = class extends SerdeContext {
      options;
      compositeErrorRegistry;
      constructor(options) {
        super();
        this.options = options;
        this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace);
        for (const etr of options.errorTypeRegistries ?? []) {
          this.compositeErrorRegistry.copyFrom(etr);
        }
      }
      getRequestType() {
        return import_protocol_http3.HttpRequest;
      }
      getResponseType() {
        return import_protocol_http3.HttpResponse;
      }
      setSerdeContext(serdeContext) {
        this.serdeContext = serdeContext;
        this.serializer.setSerdeContext(serdeContext);
        this.deserializer.setSerdeContext(serdeContext);
        if (this.getPayloadCodec()) {
          this.getPayloadCodec().setSerdeContext(serdeContext);
        }
      }
      updateServiceEndpoint(request, endpoint) {
        if ("url" in endpoint) {
          request.protocol = endpoint.url.protocol;
          request.hostname = endpoint.url.hostname;
          request.port = endpoint.url.port ? Number(endpoint.url.port) : void 0;
          request.path = endpoint.url.pathname;
          request.fragment = endpoint.url.hash || void 0;
          request.username = endpoint.url.username || void 0;
          request.password = endpoint.url.password || void 0;
          if (!request.query) {
            request.query = {};
          }
          for (const [k5, v] of endpoint.url.searchParams.entries()) {
            request.query[k5] = v;
          }
          if (endpoint.headers) {
            for (const name in endpoint.headers) {
              request.headers[name] = endpoint.headers[name].join(", ");
            }
          }
          return request;
        } else {
          request.protocol = endpoint.protocol;
          request.hostname = endpoint.hostname;
          request.port = endpoint.port ? Number(endpoint.port) : void 0;
          request.path = endpoint.path;
          request.query = {
            ...endpoint.query
          };
          if (endpoint.headers) {
            for (const name in endpoint.headers) {
              request.headers[name] = endpoint.headers[name];
            }
          }
          return request;
        }
      }
      setHostPrefix(request, operationSchema, input) {
        if (this.serdeContext?.disableHostPrefix) {
          return;
        }
        const inputNs = NormalizedSchema.of(operationSchema.input);
        const opTraits = translateTraits(operationSchema.traits ?? {});
        if (opTraits.endpoint) {
          let hostPrefix = opTraits.endpoint?.[0];
          if (typeof hostPrefix === "string") {
            for (const [name, member2] of inputNs.structIterator()) {
              if (!member2.getMergedTraits().hostLabel) {
                continue;
              }
              const replacement = input[name];
              if (typeof replacement !== "string") {
                throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);
              }
              hostPrefix = hostPrefix.replace(`{${name}}`, replacement);
            }
            request.hostname = hostPrefix + request.hostname;
          }
        }
      }
      deserializeMetadata(output) {
        return {
          httpStatusCode: output.statusCode,
          requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
          extendedRequestId: output.headers["x-amz-id-2"],
          cfId: output.headers["x-amz-cf-id"]
        };
      }
      async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
        const eventStreamSerde = await this.loadEventStreamCapability();
        return eventStreamSerde.serializeEventStream({
          eventStream,
          requestSchema,
          initialRequest
        });
      }
      async deserializeEventStream({ response, responseSchema, initialResponseContainer }) {
        const eventStreamSerde = await this.loadEventStreamCapability();
        return eventStreamSerde.deserializeEventStream({
          response,
          responseSchema,
          initialResponseContainer
        });
      }
      async loadEventStreamCapability() {
        const { EventStreamSerde: EventStreamSerde2 } = await Promise.resolve().then(() => (init_event_streams(), event_streams_exports));
        return new EventStreamSerde2({
          marshaller: this.getEventStreamMarshaller(),
          serializer: this.serializer,
          deserializer: this.deserializer,
          serdeContext: this.serdeContext,
          defaultContentType: this.getDefaultContentType()
        });
      }
      getDefaultContentType() {
        throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
      }
      async deserializeHttpMessage(schema, context, response, arg4, arg5) {
        void schema;
        void context;
        void response;
        void arg4;
        void arg5;
        return [];
      }
      getEventStreamMarshaller() {
        const context = this.serdeContext;
        if (!context.eventStreamMarshaller) {
          throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
        }
        return context.eventStreamMarshaller;
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js
var import_protocol_http4, import_util_stream2, HttpBindingProtocol;
var init_HttpBindingProtocol = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js"() {
    init_schema();
    init_serde();
    import_protocol_http4 = __toESM(require_dist_cjs2());
    import_util_stream2 = __toESM(require_dist_cjs16());
    init_collect_stream_body();
    init_extended_encode_uri_component();
    init_HttpProtocol();
    HttpBindingProtocol = class extends HttpProtocol {
      async serializeRequest(operationSchema, _input, context) {
        const input = _input && typeof _input === "object" ? _input : {};
        const serializer = this.serializer;
        const query = {};
        const headers = {};
        const endpoint = await context.endpoint();
        const ns = NormalizedSchema.of(operationSchema?.input);
        const payloadMemberNames = [];
        const payloadMemberSchemas = [];
        let hasNonHttpBindingMember = false;
        let payload2;
        const request = new import_protocol_http4.HttpRequest({
          protocol: "",
          hostname: "",
          port: void 0,
          path: "",
          fragment: void 0,
          query,
          headers,
          body: void 0
        });
        if (endpoint) {
          this.updateServiceEndpoint(request, endpoint);
          this.setHostPrefix(request, operationSchema, input);
          const opTraits = translateTraits(operationSchema.traits);
          if (opTraits.http) {
            request.method = opTraits.http[0];
            const [path, search] = opTraits.http[1].split("?");
            if (request.path == "/") {
              request.path = path;
            } else {
              request.path += path;
            }
            const traitSearchParams = new URLSearchParams(search ?? "");
            for (const [key, value] of traitSearchParams) {
              query[key] = value;
            }
          }
        }
        for (const [memberName, memberNs] of ns.structIterator()) {
          const memberTraits = memberNs.getMergedTraits() ?? {};
          const inputMemberValue = input[memberName];
          if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {
            if (memberTraits.httpLabel) {
              if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) {
                throw new Error(`No value provided for input HTTP label: ${memberName}.`);
              }
            }
            continue;
          }
          if (memberTraits.httpPayload) {
            const isStreaming = memberNs.isStreaming();
            if (isStreaming) {
              const isEventStream = memberNs.isStructSchema();
              if (isEventStream) {
                if (input[memberName]) {
                  payload2 = await this.serializeEventStream({
                    eventStream: input[memberName],
                    requestSchema: ns
                  });
                }
              } else {
                payload2 = inputMemberValue;
              }
            } else {
              serializer.write(memberNs, inputMemberValue);
              payload2 = serializer.flush();
            }
          } else if (memberTraits.httpLabel) {
            serializer.write(memberNs, inputMemberValue);
            const replacement = serializer.flush();
            if (request.path.includes(`{${memberName}+}`)) {
              request.path = request.path.replace(`{${memberName}+}`, replacement.split("/").map(extendedEncodeURIComponent).join("/"));
            } else if (request.path.includes(`{${memberName}}`)) {
              request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));
            }
          } else if (memberTraits.httpHeader) {
            serializer.write(memberNs, inputMemberValue);
            headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
          } else if (typeof memberTraits.httpPrefixHeaders === "string") {
            for (const key in inputMemberValue) {
              const val = inputMemberValue[key];
              const amalgam = memberTraits.httpPrefixHeaders + key;
              serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
              headers[amalgam.toLowerCase()] = serializer.flush();
            }
          } else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {
            this.serializeQuery(memberNs, inputMemberValue, query);
          } else {
            hasNonHttpBindingMember = true;
            payloadMemberNames.push(memberName);
            payloadMemberSchemas.push(memberNs);
          }
        }
        if (hasNonHttpBindingMember && input) {
          const [namespace, name] = (ns.getName(true) ?? "#Unknown").split("#");
          const requiredMembers = ns.getSchema()[6];
          const payloadSchema = [
            3,
            namespace,
            name,
            ns.getMergedTraits(),
            payloadMemberNames,
            payloadMemberSchemas,
            void 0
          ];
          if (requiredMembers) {
            payloadSchema[6] = requiredMembers;
          } else {
            payloadSchema.pop();
          }
          serializer.write(payloadSchema, input);
          payload2 = serializer.flush();
        }
        request.headers = headers;
        request.query = query;
        request.body = payload2;
        return request;
      }
      serializeQuery(ns, data2, query) {
        const serializer = this.serializer;
        const traits = ns.getMergedTraits();
        if (traits.httpQueryParams) {
          for (const key in data2) {
            if (!(key in query)) {
              const val = data2[key];
              const valueSchema = ns.getValueSchema();
              Object.assign(valueSchema.getMergedTraits(), {
                ...traits,
                httpQuery: key,
                httpQueryParams: void 0
              });
              this.serializeQuery(valueSchema, val, query);
            }
          }
          return;
        }
        if (ns.isListSchema()) {
          const sparse = !!ns.getMergedTraits().sparse;
          const buffer = [];
          for (const item of data2) {
            serializer.write([ns.getValueSchema(), traits], item);
            const serializable = serializer.flush();
            if (sparse || serializable !== void 0) {
              buffer.push(serializable);
            }
          }
          query[traits.httpQuery] = buffer;
        } else {
          serializer.write([ns, traits], data2);
          query[traits.httpQuery] = serializer.flush();
        }
      }
      async deserializeResponse(operationSchema, context, response) {
        const deserializer = this.deserializer;
        const ns = NormalizedSchema.of(operationSchema.output);
        const dataObject = {};
        if (response.statusCode >= 300) {
          const bytes = await collectBody(response.body, context);
          if (bytes.byteLength > 0) {
            Object.assign(dataObject, await deserializer.read(15, bytes));
          }
          await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
          throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
        }
        for (const header in response.headers) {
          const value = response.headers[header];
          delete response.headers[header];
          response.headers[header.toLowerCase()] = value;
        }
        const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);
        if (nonHttpBindingMembers.length) {
          const bytes = await collectBody(response.body, context);
          if (bytes.byteLength > 0) {
            const dataFromBody = await deserializer.read(ns, bytes);
            for (const member2 of nonHttpBindingMembers) {
              if (dataFromBody[member2] != null) {
                dataObject[member2] = dataFromBody[member2];
              }
            }
          }
        } else if (nonHttpBindingMembers.discardResponseBody) {
          await collectBody(response.body, context);
        }
        dataObject.$metadata = this.deserializeMetadata(response);
        return dataObject;
      }
      async deserializeHttpMessage(schema, context, response, arg4, arg5) {
        let dataObject;
        if (arg4 instanceof Set) {
          dataObject = arg5;
        } else {
          dataObject = arg4;
        }
        let discardResponseBody = true;
        const deserializer = this.deserializer;
        const ns = NormalizedSchema.of(schema);
        const nonHttpBindingMembers = [];
        for (const [memberName, memberSchema] of ns.structIterator()) {
          const memberTraits = memberSchema.getMemberTraits();
          if (memberTraits.httpPayload) {
            discardResponseBody = false;
            const isStreaming = memberSchema.isStreaming();
            if (isStreaming) {
              const isEventStream = memberSchema.isStructSchema();
              if (isEventStream) {
                dataObject[memberName] = await this.deserializeEventStream({
                  response,
                  responseSchema: ns
                });
              } else {
                dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body);
              }
            } else if (response.body) {
              const bytes = await collectBody(response.body, context);
              if (bytes.byteLength > 0) {
                dataObject[memberName] = await deserializer.read(memberSchema, bytes);
              }
            }
          } else if (memberTraits.httpHeader) {
            const key = String(memberTraits.httpHeader).toLowerCase();
            const value = response.headers[key];
            if (null != value) {
              if (memberSchema.isListSchema()) {
                const headerListValueSchema = memberSchema.getValueSchema();
                headerListValueSchema.getMergedTraits().httpHeader = key;
                let sections;
                if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === 4) {
                  sections = splitEvery(value, ",", 2);
                } else {
                  sections = splitHeader(value);
                }
                const list2 = [];
                for (const section of sections) {
                  list2.push(await deserializer.read(headerListValueSchema, section.trim()));
                }
                dataObject[memberName] = list2;
              } else {
                dataObject[memberName] = await deserializer.read(memberSchema, value);
              }
            }
          } else if (memberTraits.httpPrefixHeaders !== void 0) {
            dataObject[memberName] = {};
            for (const header in response.headers) {
              if (header.startsWith(memberTraits.httpPrefixHeaders)) {
                const value = response.headers[header];
                const valueSchema = memberSchema.getValueSchema();
                valueSchema.getMergedTraits().httpHeader = header;
                dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);
              }
            }
          } else if (memberTraits.httpResponseCode) {
            dataObject[memberName] = response.statusCode;
          } else {
            nonHttpBindingMembers.push(memberName);
          }
        }
        nonHttpBindingMembers.discardResponseBody = discardResponseBody;
        return nonHttpBindingMembers;
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js
var import_protocol_http5, RpcProtocol;
var init_RpcProtocol = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js"() {
    init_schema();
    import_protocol_http5 = __toESM(require_dist_cjs2());
    init_collect_stream_body();
    init_HttpProtocol();
    RpcProtocol = class extends HttpProtocol {
      async serializeRequest(operationSchema, _input, context) {
        const serializer = this.serializer;
        const query = {};
        const headers = {};
        const endpoint = await context.endpoint();
        const ns = NormalizedSchema.of(operationSchema?.input);
        const schema = ns.getSchema();
        let payload2;
        const input = _input && typeof _input === "object" ? _input : {};
        const request = new import_protocol_http5.HttpRequest({
          protocol: "",
          hostname: "",
          port: void 0,
          path: "/",
          fragment: void 0,
          query,
          headers,
          body: void 0
        });
        if (endpoint) {
          this.updateServiceEndpoint(request, endpoint);
          this.setHostPrefix(request, operationSchema, input);
        }
        if (input) {
          const eventStreamMember = ns.getEventStreamMember();
          if (eventStreamMember) {
            if (input[eventStreamMember]) {
              const initialRequest = {};
              for (const [memberName, memberSchema] of ns.structIterator()) {
                if (memberName !== eventStreamMember && input[memberName]) {
                  serializer.write(memberSchema, input[memberName]);
                  initialRequest[memberName] = serializer.flush();
                }
              }
              payload2 = await this.serializeEventStream({
                eventStream: input[eventStreamMember],
                requestSchema: ns,
                initialRequest
              });
            }
          } else {
            serializer.write(schema, input);
            payload2 = serializer.flush();
          }
        }
        request.headers = Object.assign(request.headers, headers);
        request.query = query;
        request.body = payload2;
        request.method = "POST";
        return request;
      }
      async deserializeResponse(operationSchema, context, response) {
        const deserializer = this.deserializer;
        const ns = NormalizedSchema.of(operationSchema.output);
        const dataObject = {};
        if (response.statusCode >= 300) {
          const bytes = await collectBody(response.body, context);
          if (bytes.byteLength > 0) {
            Object.assign(dataObject, await deserializer.read(15, bytes));
          }
          await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
          throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
        }
        for (const header in response.headers) {
          const value = response.headers[header];
          delete response.headers[header];
          response.headers[header.toLowerCase()] = value;
        }
        const eventStreamMember = ns.getEventStreamMember();
        if (eventStreamMember) {
          dataObject[eventStreamMember] = await this.deserializeEventStream({
            response,
            responseSchema: ns,
            initialResponseContainer: dataObject
          });
        } else {
          const bytes = await collectBody(response.body, context);
          if (bytes.byteLength > 0) {
            Object.assign(dataObject, await deserializer.read(ns, bytes));
          }
        }
        dataObject.$metadata = this.deserializeMetadata(response);
        return dataObject;
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js
var resolvedPath;
var init_resolve_path = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js"() {
    init_extended_encode_uri_component();
    resolvedPath = (resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {
      if (input != null && input[memberName] !== void 0) {
        const labelValue = labelValueProvider();
        if (labelValue == null || labelValue.length <= 0) {
          throw new Error("Empty value provided for input HTTP label: " + memberName + ".");
        }
        resolvedPath2 = resolvedPath2.replace(uriLabel, isGreedyLabel ? labelValue.split("/").map((segment) => extendedEncodeURIComponent(segment)).join("/") : extendedEncodeURIComponent(labelValue));
      } else {
        throw new Error("No value provided for input HTTP label: " + memberName + ".");
      }
      return resolvedPath2;
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js
function requestBuilder(input, context) {
  return new RequestBuilder(input, context);
}
var import_protocol_http6, RequestBuilder;
var init_requestBuilder = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js"() {
    import_protocol_http6 = __toESM(require_dist_cjs2());
    init_resolve_path();
    RequestBuilder = class {
      input;
      context;
      query = {};
      method = "";
      headers = {};
      path = "";
      body = null;
      hostname = "";
      resolvePathStack = [];
      constructor(input, context) {
        this.input = input;
        this.context = context;
      }
      async build() {
        const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint();
        this.path = basePath;
        for (const resolvePath of this.resolvePathStack) {
          resolvePath(this.path);
        }
        return new import_protocol_http6.HttpRequest({
          protocol,
          hostname: this.hostname || hostname,
          port,
          method: this.method,
          path: this.path,
          query: this.query,
          body: this.body,
          headers: this.headers
        });
      }
      hn(hostname) {
        this.hostname = hostname;
        return this;
      }
      bp(uriLabel) {
        this.resolvePathStack.push((basePath) => {
          this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel;
        });
        return this;
      }
      p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
        this.resolvePathStack.push((path) => {
          this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
        });
        return this;
      }
      h(headers) {
        this.headers = headers;
        return this;
      }
      q(query) {
        this.query = query;
        return this;
      }
      b(body) {
        this.body = body;
        return this;
      }
      m(method) {
        this.method = method;
        return this;
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js
function determineTimestampFormat(ns, settings) {
  if (settings.timestampFormat.useTrait) {
    if (ns.isTimestampSchema() && (ns.getSchema() === 5 || ns.getSchema() === 6 || ns.getSchema() === 7)) {
      return ns.getSchema();
    }
  }
  const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();
  const bindingFormat = settings.httpBindings ? typeof httpPrefixHeaders === "string" || Boolean(httpHeader) ? 6 : Boolean(httpQuery) || Boolean(httpLabel) ? 5 : void 0 : void 0;
  return bindingFormat ?? settings.timestampFormat.default;
}
var init_determineTimestampFormat = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js"() {
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js
var import_util_base64, import_util_utf82, FromStringShapeDeserializer;
var init_FromStringShapeDeserializer = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js"() {
    init_schema();
    init_serde();
    import_util_base64 = __toESM(require_dist_cjs10());
    import_util_utf82 = __toESM(require_dist_cjs9());
    init_SerdeContext();
    init_determineTimestampFormat();
    FromStringShapeDeserializer = class extends SerdeContext {
      settings;
      constructor(settings) {
        super();
        this.settings = settings;
      }
      read(_schema, data2) {
        const ns = NormalizedSchema.of(_schema);
        if (ns.isListSchema()) {
          return splitHeader(data2).map((item) => this.read(ns.getValueSchema(), item));
        }
        if (ns.isBlobSchema()) {
          return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(data2);
        }
        if (ns.isTimestampSchema()) {
          const format2 = determineTimestampFormat(ns, this.settings);
          switch (format2) {
            case 5:
              return _parseRfc3339DateTimeWithOffset(data2);
            case 6:
              return _parseRfc7231DateTime(data2);
            case 7:
              return _parseEpochTimestamp(data2);
            default:
              console.warn("Missing timestamp format, parsing value with Date constructor:", data2);
              return new Date(data2);
          }
        }
        if (ns.isStringSchema()) {
          const mediaType = ns.getMergedTraits().mediaType;
          let intermediateValue = data2;
          if (mediaType) {
            if (ns.getMergedTraits().httpHeader) {
              intermediateValue = this.base64ToUtf8(intermediateValue);
            }
            const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
            if (isJson) {
              intermediateValue = LazyJsonString.from(intermediateValue);
            }
            return intermediateValue;
          }
        }
        if (ns.isNumericSchema()) {
          return Number(data2);
        }
        if (ns.isBigIntegerSchema()) {
          return BigInt(data2);
        }
        if (ns.isBigDecimalSchema()) {
          return new NumericValue(data2, "bigDecimal");
        }
        if (ns.isBooleanSchema()) {
          return String(data2).toLowerCase() === "true";
        }
        return data2;
      }
      base64ToUtf8(base64String) {
        return (this.serdeContext?.utf8Encoder ?? import_util_utf82.toUtf8)((this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(base64String));
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js
var import_util_utf83, HttpInterceptingShapeDeserializer;
var init_HttpInterceptingShapeDeserializer = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js"() {
    init_schema();
    import_util_utf83 = __toESM(require_dist_cjs9());
    init_SerdeContext();
    init_FromStringShapeDeserializer();
    HttpInterceptingShapeDeserializer = class extends SerdeContext {
      codecDeserializer;
      stringDeserializer;
      constructor(codecDeserializer, codecSettings) {
        super();
        this.codecDeserializer = codecDeserializer;
        this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);
      }
      setSerdeContext(serdeContext) {
        this.stringDeserializer.setSerdeContext(serdeContext);
        this.codecDeserializer.setSerdeContext(serdeContext);
        this.serdeContext = serdeContext;
      }
      read(schema, data2) {
        const ns = NormalizedSchema.of(schema);
        const traits = ns.getMergedTraits();
        const toString = this.serdeContext?.utf8Encoder ?? import_util_utf83.toUtf8;
        if (traits.httpHeader || traits.httpResponseCode) {
          return this.stringDeserializer.read(ns, toString(data2));
        }
        if (traits.httpPayload) {
          if (ns.isBlobSchema()) {
            const toBytes = this.serdeContext?.utf8Decoder ?? import_util_utf83.fromUtf8;
            if (typeof data2 === "string") {
              return toBytes(data2);
            }
            return data2;
          } else if (ns.isStringSchema()) {
            if ("byteLength" in data2) {
              return toString(data2);
            }
            return data2;
          }
        }
        return this.codecDeserializer.read(ns, data2);
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js
var import_util_base642, ToStringShapeSerializer;
var init_ToStringShapeSerializer = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js"() {
    init_schema();
    init_serde();
    import_util_base642 = __toESM(require_dist_cjs10());
    init_SerdeContext();
    init_determineTimestampFormat();
    ToStringShapeSerializer = class extends SerdeContext {
      settings;
      stringBuffer = "";
      constructor(settings) {
        super();
        this.settings = settings;
      }
      write(schema, value) {
        const ns = NormalizedSchema.of(schema);
        switch (typeof value) {
          case "object":
            if (value === null) {
              this.stringBuffer = "null";
              return;
            }
            if (ns.isTimestampSchema()) {
              if (!(value instanceof Date)) {
                throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`);
              }
              const format2 = determineTimestampFormat(ns, this.settings);
              switch (format2) {
                case 5:
                  this.stringBuffer = value.toISOString().replace(".000Z", "Z");
                  break;
                case 6:
                  this.stringBuffer = dateToUtcString(value);
                  break;
                case 7:
                  this.stringBuffer = String(value.getTime() / 1e3);
                  break;
                default:
                  console.warn("Missing timestamp format, using epoch seconds", value);
                  this.stringBuffer = String(value.getTime() / 1e3);
              }
              return;
            }
            if (ns.isBlobSchema() && "byteLength" in value) {
              this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(value);
              return;
            }
            if (ns.isListSchema() && Array.isArray(value)) {
              let buffer = "";
              for (const item of value) {
                this.write([ns.getValueSchema(), ns.getMergedTraits()], item);
                const headerItem = this.flush();
                const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : quoteHeader(headerItem);
                if (buffer !== "") {
                  buffer += ", ";
                }
                buffer += serialized;
              }
              this.stringBuffer = buffer;
              return;
            }
            this.stringBuffer = JSON.stringify(value, null, 2);
            break;
          case "string":
            const mediaType = ns.getMergedTraits().mediaType;
            let intermediateValue = value;
            if (mediaType) {
              const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
              if (isJson) {
                intermediateValue = LazyJsonString.from(intermediateValue);
              }
              if (ns.getMergedTraits().httpHeader) {
                this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(intermediateValue.toString());
                return;
              }
            }
            this.stringBuffer = value;
            break;
          default:
            if (ns.isIdempotencyToken()) {
              this.stringBuffer = (0, import_uuid.v4)();
            } else {
              this.stringBuffer = String(value);
            }
        }
      }
      flush() {
        const buffer = this.stringBuffer;
        this.stringBuffer = "";
        return buffer;
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js
var HttpInterceptingShapeSerializer;
var init_HttpInterceptingShapeSerializer = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js"() {
    init_schema();
    init_ToStringShapeSerializer();
    HttpInterceptingShapeSerializer = class {
      codecSerializer;
      stringSerializer;
      buffer;
      constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {
        this.codecSerializer = codecSerializer;
        this.stringSerializer = stringSerializer;
      }
      setSerdeContext(serdeContext) {
        this.codecSerializer.setSerdeContext(serdeContext);
        this.stringSerializer.setSerdeContext(serdeContext);
      }
      write(schema, value) {
        const ns = NormalizedSchema.of(schema);
        const traits = ns.getMergedTraits();
        if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {
          this.stringSerializer.write(ns, value);
          this.buffer = this.stringSerializer.flush();
          return;
        }
        return this.codecSerializer.write(ns, value);
      }
      flush() {
        if (this.buffer !== void 0) {
          const buffer = this.buffer;
          this.buffer = void 0;
          return buffer;
        }
        return this.codecSerializer.flush();
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/protocols/index.js
var protocols_exports = {};
__export(protocols_exports, {
  FromStringShapeDeserializer: () => FromStringShapeDeserializer,
  HttpBindingProtocol: () => HttpBindingProtocol,
  HttpInterceptingShapeDeserializer: () => HttpInterceptingShapeDeserializer,
  HttpInterceptingShapeSerializer: () => HttpInterceptingShapeSerializer,
  HttpProtocol: () => HttpProtocol,
  RequestBuilder: () => RequestBuilder,
  RpcProtocol: () => RpcProtocol,
  SerdeContext: () => SerdeContext,
  ToStringShapeSerializer: () => ToStringShapeSerializer,
  collectBody: () => collectBody,
  determineTimestampFormat: () => determineTimestampFormat,
  extendedEncodeURIComponent: () => extendedEncodeURIComponent,
  requestBuilder: () => requestBuilder,
  resolvedPath: () => resolvedPath
});
var init_protocols = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/protocols/index.js"() {
    init_collect_stream_body();
    init_extended_encode_uri_component();
    init_HttpBindingProtocol();
    init_HttpProtocol();
    init_RpcProtocol();
    init_requestBuilder();
    init_resolve_path();
    init_FromStringShapeDeserializer();
    init_HttpInterceptingShapeDeserializer();
    init_HttpInterceptingShapeSerializer();
    init_ToStringShapeSerializer();
    init_determineTimestampFormat();
    init_SerdeContext();
  }
});

// ../../node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js
var init_requestBuilder2 = __esm({
  "../../node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js"() {
    init_protocols();
  }
});

// ../../node_modules/@smithy/core/dist-es/setFeature.js
function setFeature(context, feature, value) {
  if (!context.__smithy_context) {
    context.__smithy_context = {
      features: {}
    };
  } else if (!context.__smithy_context.features) {
    context.__smithy_context.features = {};
  }
  context.__smithy_context.features[feature] = value;
}
var init_setFeature = __esm({
  "../../node_modules/@smithy/core/dist-es/setFeature.js"() {
  }
});

// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js
var DefaultIdentityProviderConfig;
var init_DefaultIdentityProviderConfig = __esm({
  "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js"() {
    DefaultIdentityProviderConfig = class {
      authSchemes = /* @__PURE__ */ new Map();
      constructor(config) {
        for (const key in config) {
          const value = config[key];
          if (value !== void 0) {
            this.authSchemes.set(key, value);
          }
        }
      }
      getIdentityProvider(schemeId) {
        return this.authSchemes.get(schemeId);
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js
var import_protocol_http7, import_types2, HttpApiKeyAuthSigner;
var init_httpApiKeyAuth = __esm({
  "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() {
    import_protocol_http7 = __toESM(require_dist_cjs2());
    import_types2 = __toESM(require_dist_cjs());
    HttpApiKeyAuthSigner = class {
      async sign(httpRequest, identity, signingProperties) {
        if (!signingProperties) {
          throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");
        }
        if (!signingProperties.name) {
          throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");
        }
        if (!signingProperties.in) {
          throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");
        }
        if (!identity.apiKey) {
          throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");
        }
        const clonedRequest = import_protocol_http7.HttpRequest.clone(httpRequest);
        if (signingProperties.in === import_types2.HttpApiKeyAuthLocation.QUERY) {
          clonedRequest.query[signingProperties.name] = identity.apiKey;
        } else if (signingProperties.in === import_types2.HttpApiKeyAuthLocation.HEADER) {
          clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey;
        } else {
          throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `" + signingProperties.in + "`");
        }
        return clonedRequest;
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js
var import_protocol_http8, HttpBearerAuthSigner;
var init_httpBearerAuth = __esm({
  "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() {
    import_protocol_http8 = __toESM(require_dist_cjs2());
    HttpBearerAuthSigner = class {
      async sign(httpRequest, identity, signingProperties) {
        const clonedRequest = import_protocol_http8.HttpRequest.clone(httpRequest);
        if (!identity.token) {
          throw new Error("request could not be signed with `token` since the `token` is not defined");
        }
        clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`;
        return clonedRequest;
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js
var NoAuthSigner;
var init_noAuth = __esm({
  "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js"() {
    NoAuthSigner = class {
      async sign(httpRequest, identity, signingProperties) {
        return httpRequest;
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js
var init_httpAuthSchemes = __esm({
  "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js"() {
    init_httpApiKeyAuth();
    init_httpBearerAuth();
    init_noAuth();
  }
});

// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js
var createIsIdentityExpiredFunction, EXPIRATION_MS, isIdentityExpired, doesIdentityRequireRefresh, memoizeIdentityProvider;
var init_memoizeIdentityProvider = __esm({
  "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js"() {
    createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired2(identity) {
      return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs;
    };
    EXPIRATION_MS = 3e5;
    isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);
    doesIdentityRequireRefresh = (identity) => identity.expiration !== void 0;
    memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {
      if (provider === void 0) {
        return void 0;
      }
      const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider;
      let resolved;
      let pending;
      let hasResult;
      let isConstant = false;
      const coalesceProvider = async (options) => {
        if (!pending) {
          pending = normalizedProvider(options);
        }
        try {
          resolved = await pending;
          hasResult = true;
          isConstant = false;
        } finally {
          pending = void 0;
        }
        return resolved;
      };
      if (isExpired === void 0) {
        return async (options) => {
          if (!hasResult || options?.forceRefresh) {
            resolved = await coalesceProvider(options);
          }
          return resolved;
        };
      }
      return async (options) => {
        if (!hasResult || options?.forceRefresh) {
          resolved = await coalesceProvider(options);
        }
        if (isConstant) {
          return resolved;
        }
        if (!requiresRefresh(resolved)) {
          isConstant = true;
          return resolved;
        }
        if (isExpired(resolved)) {
          await coalesceProvider(options);
          return resolved;
        }
        return resolved;
      };
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js
var init_util_identity_and_auth = __esm({
  "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js"() {
    init_DefaultIdentityProviderConfig();
    init_httpAuthSchemes();
    init_memoizeIdentityProvider();
  }
});

// ../../node_modules/@smithy/core/dist-es/index.js
var dist_es_exports = {};
__export(dist_es_exports, {
  DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig,
  EXPIRATION_MS: () => EXPIRATION_MS,
  HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner,
  HttpBearerAuthSigner: () => HttpBearerAuthSigner,
  NoAuthSigner: () => NoAuthSigner,
  createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction,
  createPaginator: () => createPaginator,
  doesIdentityRequireRefresh: () => doesIdentityRequireRefresh,
  getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin,
  getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin,
  getHttpSigningPlugin: () => getHttpSigningPlugin,
  getSmithyContext: () => getSmithyContext,
  httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions,
  httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware,
  httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions,
  httpSigningMiddleware: () => httpSigningMiddleware,
  httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions,
  isIdentityExpired: () => isIdentityExpired,
  memoizeIdentityProvider: () => memoizeIdentityProvider,
  normalizeProvider: () => normalizeProvider,
  requestBuilder: () => requestBuilder,
  setFeature: () => setFeature
});
var init_dist_es = __esm({
  "../../node_modules/@smithy/core/dist-es/index.js"() {
    init_getSmithyContext();
    init_middleware_http_auth_scheme();
    init_middleware_http_signing();
    init_normalizeProvider();
    init_createPaginator();
    init_requestBuilder2();
    init_setFeature();
    init_util_identity_and_auth();
  }
});

// ../../node_modules/@smithy/util-endpoints/dist-cjs/index.js
var require_dist_cjs20 = __commonJS({
  "../../node_modules/@smithy/util-endpoints/dist-cjs/index.js"(exports2) {
    "use strict";
    var types = require_dist_cjs();
    var BinaryDecisionDiagram5 = class _BinaryDecisionDiagram {
      nodes;
      root;
      conditions;
      results;
      constructor(bdd5, root5, conditions, results) {
        this.nodes = bdd5;
        this.root = root5;
        this.conditions = conditions;
        this.results = results;
      }
      static from(bdd5, root5, conditions, results) {
        return new _BinaryDecisionDiagram(bdd5, root5, conditions, results);
      }
    };
    var EndpointCache5 = class {
      capacity;
      data = /* @__PURE__ */ new Map();
      parameters = [];
      constructor({ size, params }) {
        this.capacity = size ?? 50;
        if (params) {
          this.parameters = params;
        }
      }
      get(endpointParams, resolver) {
        const key = this.hash(endpointParams);
        if (key === false) {
          return resolver();
        }
        if (!this.data.has(key)) {
          if (this.data.size > this.capacity + 10) {
            const keys = this.data.keys();
            let i5 = 0;
            while (true) {
              const { value, done } = keys.next();
              this.data.delete(value);
              if (done || ++i5 > 10) {
                break;
              }
            }
          }
          this.data.set(key, resolver());
        }
        return this.data.get(key);
      }
      size() {
        return this.data.size;
      }
      hash(endpointParams) {
        let buffer = "";
        const { parameters } = this;
        if (parameters.length === 0) {
          return false;
        }
        for (const param of parameters) {
          const val = String(endpointParams[param] ?? "");
          if (val.includes("|;")) {
            return false;
          }
          buffer += val + "|;";
        }
        return buffer;
      }
    };
    var EndpointError = class extends Error {
      constructor(message) {
        super(message);
        this.name = "EndpointError";
      }
    };
    var debugId = "endpoints";
    function toDebugString(input) {
      if (typeof input !== "object" || input == null) {
        return input;
      }
      if ("ref" in input) {
        return `$${toDebugString(input.ref)}`;
      }
      if ("fn" in input) {
        return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`;
      }
      return JSON.stringify(input, null, 2);
    }
    var customEndpointFunctions5 = {};
    var booleanEquals = (value1, value2) => value1 === value2;
    function coalesce(...args) {
      for (const arg of args) {
        if (arg != null) {
          return arg;
        }
      }
      return void 0;
    }
    var getAttrPathList = (path) => {
      const parts = path.split(".");
      const pathList = [];
      for (const part of parts) {
        const squareBracketIndex = part.indexOf("[");
        if (squareBracketIndex !== -1) {
          if (part.indexOf("]") !== part.length - 1) {
            throw new EndpointError(`Path: '${path}' does not end with ']'`);
          }
          const arrayIndex = part.slice(squareBracketIndex + 1, -1);
          if (Number.isNaN(parseInt(arrayIndex))) {
            throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`);
          }
          if (squareBracketIndex !== 0) {
            pathList.push(part.slice(0, squareBracketIndex));
          }
          pathList.push(arrayIndex);
        } else {
          pathList.push(part);
        }
      }
      return pathList;
    };
    var getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {
      if (typeof acc !== "object") {
        throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);
      } else if (Array.isArray(acc)) {
        const i5 = parseInt(index);
        return acc[i5 < 0 ? acc.length + i5 : i5];
      }
      return acc[index];
    }, value);
    var isSet = (value) => value != null;
    var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);
    var isValidHostLabel = (value, allowSubDomains = false) => {
      if (!allowSubDomains) {
        return VALID_HOST_LABEL_REGEX.test(value);
      }
      const labels = value.split(".");
      for (const label of labels) {
        if (!isValidHostLabel(label)) {
          return false;
        }
      }
      return true;
    };
    function ite(condition, trueValue, falseValue) {
      return condition ? trueValue : falseValue;
    }
    var not = (value) => !value;
    var IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`);
    var isIpAddress = (value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]");
    var DEFAULT_PORTS = {
      [types.EndpointURLScheme.HTTP]: 80,
      [types.EndpointURLScheme.HTTPS]: 443
    };
    var parseURL = (value) => {
      const whatwgURL = (() => {
        try {
          if (value instanceof URL) {
            return value;
          }
          if (typeof value === "object" && "hostname" in value) {
            const { hostname: hostname2, port, protocol: protocol2 = "", path = "", query = {} } = value;
            const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path}`);
            url.search = Object.entries(query).map(([k5, v]) => `${k5}=${v}`).join("&");
            return url;
          }
          return new URL(value);
        } catch (error3) {
          return null;
        }
      })();
      if (!whatwgURL) {
        console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);
        return null;
      }
      const urlString = whatwgURL.href;
      const { host, hostname, pathname, protocol, search } = whatwgURL;
      if (search) {
        return null;
      }
      const scheme = protocol.slice(0, -1);
      if (!Object.values(types.EndpointURLScheme).includes(scheme)) {
        return null;
      }
      const isIp = isIpAddress(hostname);
      const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`);
      const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;
      return {
        scheme,
        authority,
        path: pathname,
        normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`,
        isIp
      };
    };
    function split(value, delimiter, limit) {
      if (limit === 1) {
        return [value];
      }
      if (value === "") {
        return [""];
      }
      const parts = value.split(delimiter);
      if (limit === 0) {
        return parts;
      }
      return parts.slice(0, limit - 1).concat(parts.slice(1).join(delimiter));
    }
    var stringEquals = (value1, value2) => value1 === value2;
    var substring = (input, start, stop, reverse) => {
      if (input == null || start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) {
        return null;
      }
      if (!reverse) {
        return input.substring(start, stop);
      }
      return input.substring(input.length - stop, input.length - start);
    };
    var uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c5) => `%${c5.charCodeAt(0).toString(16).toUpperCase()}`);
    var endpointFunctions = {
      booleanEquals,
      coalesce,
      getAttr,
      isSet,
      isValidHostLabel,
      ite,
      not,
      parseURL,
      split,
      stringEquals,
      substring,
      uriEncode
    };
    var evaluateTemplate = (template, options) => {
      const evaluatedTemplateArr = [];
      const { referenceRecord, endpointParams } = options;
      let currentIndex = 0;
      while (currentIndex < template.length) {
        const openingBraceIndex = template.indexOf("{", currentIndex);
        if (openingBraceIndex === -1) {
          evaluatedTemplateArr.push(template.slice(currentIndex));
          break;
        }
        evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));
        const closingBraceIndex = template.indexOf("}", openingBraceIndex);
        if (closingBraceIndex === -1) {
          evaluatedTemplateArr.push(template.slice(openingBraceIndex));
          break;
        }
        if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") {
          evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));
          currentIndex = closingBraceIndex + 2;
        }
        const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);
        if (parameterName.includes("#")) {
          const [refName, attrName] = parameterName.split("#");
          evaluatedTemplateArr.push(getAttr(referenceRecord[refName] ?? endpointParams[refName], attrName));
        } else {
          evaluatedTemplateArr.push(referenceRecord[parameterName] ?? endpointParams[parameterName]);
        }
        currentIndex = closingBraceIndex + 1;
      }
      return evaluatedTemplateArr.join("");
    };
    var getReferenceValue = ({ ref }, options) => {
      return options.referenceRecord[ref] ?? options.endpointParams[ref];
    };
    var evaluateExpression = (obj, keyName, options) => {
      if (typeof obj === "string") {
        return evaluateTemplate(obj, options);
      } else if (obj["fn"]) {
        return group$2.callFunction(obj, options);
      } else if (obj["ref"]) {
        return getReferenceValue(obj, options);
      }
      throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);
    };
    var callFunction = ({ fn, argv }, options) => {
      const evaluatedArgs = Array(argv.length);
      for (let i5 = 0; i5 < evaluatedArgs.length; ++i5) {
        const arg = argv[i5];
        if (typeof arg === "boolean" || typeof arg === "number") {
          evaluatedArgs[i5] = arg;
        } else {
          evaluatedArgs[i5] = group$2.evaluateExpression(arg, "arg", options);
        }
      }
      const namespaceSeparatorIndex = fn.indexOf(".");
      if (namespaceSeparatorIndex !== -1) {
        const namespaceFunctions = customEndpointFunctions5[fn.slice(0, namespaceSeparatorIndex)];
        const customFunction = namespaceFunctions?.[fn.slice(namespaceSeparatorIndex + 1)];
        if (typeof customFunction === "function") {
          return customFunction(...evaluatedArgs);
        }
      }
      const callable = endpointFunctions[fn];
      if (typeof callable === "function") {
        return callable(...evaluatedArgs);
      }
      throw new Error(`function ${fn} not loaded in endpointFunctions.`);
    };
    var group$2 = {
      evaluateExpression,
      callFunction
    };
    var evaluateCondition = (condition, options) => {
      const { assign } = condition;
      if (assign && assign in options.referenceRecord) {
        throw new EndpointError(`'${assign}' is already defined in Reference Record.`);
      }
      const value = callFunction(condition, options);
      options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(condition)} = ${toDebugString(value)}`);
      const result = value === "" ? true : !!value;
      if (assign != null) {
        return { result, toAssign: { name: assign, value } };
      }
      return { result };
    };
    var getEndpointHeaders = (headers, options) => Object.entries(headers ?? {}).reduce((acc, [headerKey, headerVal]) => {
      acc[headerKey] = headerVal.map((headerValEntry) => {
        const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options);
        if (typeof processedExpr !== "string") {
          throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);
        }
        return processedExpr;
      });
      return acc;
    }, {});
    var getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => {
      acc[propertyKey] = group$1.getEndpointProperty(propertyVal, options);
      return acc;
    }, {});
    var getEndpointProperty = (property, options) => {
      if (Array.isArray(property)) {
        return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));
      }
      switch (typeof property) {
        case "string":
          return evaluateTemplate(property, options);
        case "object":
          if (property === null) {
            throw new EndpointError(`Unexpected endpoint property: ${property}`);
          }
          return group$1.getEndpointProperties(property, options);
        case "boolean":
          return property;
        default:
          throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);
      }
    };
    var group$1 = {
      getEndpointProperty,
      getEndpointProperties
    };
    var getEndpointUrl = (endpointUrl, options) => {
      const expression = evaluateExpression(endpointUrl, "Endpoint URL", options);
      if (typeof expression === "string") {
        try {
          return new URL(expression);
        } catch (error3) {
          console.error(`Failed to construct URL with ${expression}`, error3);
          throw error3;
        }
      }
      throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);
    };
    var RESULT = 1e8;
    var decideEndpoint5 = (bdd5, options) => {
      const { nodes: nodes5, root: root5, results, conditions } = bdd5;
      let ref = root5;
      const referenceRecord = {};
      const closure = {
        referenceRecord,
        endpointParams: options.endpointParams,
        logger: options.logger
      };
      while (ref !== 1 && ref !== -1 && ref < RESULT) {
        const node_i = 3 * (Math.abs(ref) - 1);
        const [condition_i, highRef, lowRef] = [nodes5[node_i], nodes5[node_i + 1], nodes5[node_i + 2]];
        const [fn, argv, assign] = conditions[condition_i];
        const evaluation = evaluateCondition({ fn, assign, argv }, closure);
        if (evaluation.toAssign) {
          const { name, value } = evaluation.toAssign;
          referenceRecord[name] = value;
        }
        ref = ref >= 0 === evaluation.result ? highRef : lowRef;
      }
      if (ref >= RESULT) {
        const result = results[ref - RESULT];
        if (result[0] === -1) {
          const [, errorExpression] = result;
          throw new EndpointError(evaluateExpression(errorExpression, "Error", closure));
        }
        const [url, properties, headers] = result;
        return {
          url: getEndpointUrl(url, closure),
          properties: getEndpointProperties(properties, closure),
          headers: getEndpointHeaders(headers ?? {}, closure)
        };
      }
      throw new EndpointError(`No matching endpoint.`);
    };
    var evaluateConditions = (conditions = [], options) => {
      const conditionsReferenceRecord = {};
      const conditionOptions = {
        ...options,
        referenceRecord: { ...options.referenceRecord }
      };
      let didAssign = false;
      for (const condition of conditions) {
        const { result, toAssign } = evaluateCondition(condition, conditionOptions);
        if (!result) {
          return { result };
        }
        if (toAssign) {
          didAssign = true;
          conditionsReferenceRecord[toAssign.name] = toAssign.value;
          conditionOptions.referenceRecord[toAssign.name] = toAssign.value;
          options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);
        }
      }
      if (didAssign) {
        return { result: true, referenceRecord: conditionsReferenceRecord };
      }
      return { result: true };
    };
    var evaluateEndpointRule = (endpointRule, options) => {
      const { conditions, endpoint } = endpointRule;
      const { result, referenceRecord } = evaluateConditions(conditions, options);
      if (!result) {
        return;
      }
      const endpointRuleOptions = referenceRecord ? {
        ...options,
        referenceRecord: { ...options.referenceRecord, ...referenceRecord }
      } : options;
      const { url, properties, headers } = endpoint;
      options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`);
      const endpointToReturn = { url: getEndpointUrl(url, endpointRuleOptions) };
      if (headers != null) {
        endpointToReturn.headers = getEndpointHeaders(headers, endpointRuleOptions);
      }
      if (properties != null) {
        endpointToReturn.properties = getEndpointProperties(properties, endpointRuleOptions);
      }
      return endpointToReturn;
    };
    var evaluateErrorRule = (errorRule, options) => {
      const { conditions, error: error3 } = errorRule;
      const { result, referenceRecord } = evaluateConditions(conditions, options);
      if (!result) {
        return;
      }
      const errorRuleOptions = referenceRecord ? {
        ...options,
        referenceRecord: { ...options.referenceRecord, ...referenceRecord }
      } : options;
      throw new EndpointError(evaluateExpression(error3, "Error", errorRuleOptions));
    };
    var evaluateRules = (rules, options) => {
      for (const rule of rules) {
        if (rule.type === "endpoint") {
          const endpointOrUndefined = evaluateEndpointRule(rule, options);
          if (endpointOrUndefined) {
            return endpointOrUndefined;
          }
        } else if (rule.type === "error") {
          evaluateErrorRule(rule, options);
        } else if (rule.type === "tree") {
          const endpointOrUndefined = group.evaluateTreeRule(rule, options);
          if (endpointOrUndefined) {
            return endpointOrUndefined;
          }
        } else {
          throw new EndpointError(`Unknown endpoint rule: ${rule}`);
        }
      }
      throw new EndpointError(`Rules evaluation failed`);
    };
    var evaluateTreeRule = (treeRule, options) => {
      const { conditions, rules } = treeRule;
      const { result, referenceRecord } = evaluateConditions(conditions, options);
      if (!result) {
        return;
      }
      const treeRuleOptions = referenceRecord ? { ...options, referenceRecord: { ...options.referenceRecord, ...referenceRecord } } : options;
      return group.evaluateRules(rules, treeRuleOptions);
    };
    var group = {
      evaluateRules,
      evaluateTreeRule
    };
    var resolveEndpoint = (ruleSetObject, options) => {
      const { endpointParams, logger: logger2 } = options;
      const { parameters, rules } = ruleSetObject;
      options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);
      for (const paramKey in parameters) {
        const parameter = parameters[paramKey];
        const endpointParam = endpointParams[paramKey];
        if (endpointParam == null && parameter.default != null) {
          endpointParams[paramKey] = parameter.default;
          continue;
        }
        if (parameter.required && endpointParam == null) {
          throw new EndpointError(`Missing required parameter: '${paramKey}'`);
        }
      }
      const endpoint = evaluateRules(rules, { endpointParams, logger: logger2, referenceRecord: {} });
      options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);
      return endpoint;
    };
    exports2.BinaryDecisionDiagram = BinaryDecisionDiagram5;
    exports2.EndpointCache = EndpointCache5;
    exports2.EndpointError = EndpointError;
    exports2.customEndpointFunctions = customEndpointFunctions5;
    exports2.decideEndpoint = decideEndpoint5;
    exports2.isIpAddress = isIpAddress;
    exports2.isValidHostLabel = isValidHostLabel;
    exports2.resolveEndpoint = resolveEndpoint;
  }
});

// ../../node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js
var require_dist_cjs21 = __commonJS({
  "../../node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js"(exports2) {
    "use strict";
    var utilEndpoints = require_dist_cjs20();
    var urlParser = require_dist_cjs18();
    var isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
      if (allowSubDomains) {
        for (const label of value.split(".")) {
          if (!isVirtualHostableS3Bucket(label)) {
            return false;
          }
        }
        return true;
      }
      if (!utilEndpoints.isValidHostLabel(value)) {
        return false;
      }
      if (value.length < 3 || value.length > 63) {
        return false;
      }
      if (value !== value.toLowerCase()) {
        return false;
      }
      if (utilEndpoints.isIpAddress(value)) {
        return false;
      }
      return true;
    };
    var ARN_DELIMITER = ":";
    var RESOURCE_DELIMITER = "/";
    var parseArn = (value) => {
      const segments = value.split(ARN_DELIMITER);
      if (segments.length < 6)
        return null;
      const [arn, partition2, service, region, accountId, ...resourcePath] = segments;
      if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "")
        return null;
      const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();
      return {
        partition: partition2,
        service,
        region,
        accountId,
        resourceId
      };
    };
    var partitions = [
      {
        id: "aws",
        outputs: {
          dnsSuffix: "amazonaws.com",
          dualStackDnsSuffix: "api.aws",
          implicitGlobalRegion: "us-east-1",
          name: "aws",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",
        regions: {
          "af-south-1": {
            description: "Africa (Cape Town)"
          },
          "ap-east-1": {
            description: "Asia Pacific (Hong Kong)"
          },
          "ap-east-2": {
            description: "Asia Pacific (Taipei)"
          },
          "ap-northeast-1": {
            description: "Asia Pacific (Tokyo)"
          },
          "ap-northeast-2": {
            description: "Asia Pacific (Seoul)"
          },
          "ap-northeast-3": {
            description: "Asia Pacific (Osaka)"
          },
          "ap-south-1": {
            description: "Asia Pacific (Mumbai)"
          },
          "ap-south-2": {
            description: "Asia Pacific (Hyderabad)"
          },
          "ap-southeast-1": {
            description: "Asia Pacific (Singapore)"
          },
          "ap-southeast-2": {
            description: "Asia Pacific (Sydney)"
          },
          "ap-southeast-3": {
            description: "Asia Pacific (Jakarta)"
          },
          "ap-southeast-4": {
            description: "Asia Pacific (Melbourne)"
          },
          "ap-southeast-5": {
            description: "Asia Pacific (Malaysia)"
          },
          "ap-southeast-6": {
            description: "Asia Pacific (New Zealand)"
          },
          "ap-southeast-7": {
            description: "Asia Pacific (Thailand)"
          },
          "aws-global": {
            description: "aws global region"
          },
          "ca-central-1": {
            description: "Canada (Central)"
          },
          "ca-west-1": {
            description: "Canada West (Calgary)"
          },
          "eu-central-1": {
            description: "Europe (Frankfurt)"
          },
          "eu-central-2": {
            description: "Europe (Zurich)"
          },
          "eu-north-1": {
            description: "Europe (Stockholm)"
          },
          "eu-south-1": {
            description: "Europe (Milan)"
          },
          "eu-south-2": {
            description: "Europe (Spain)"
          },
          "eu-west-1": {
            description: "Europe (Ireland)"
          },
          "eu-west-2": {
            description: "Europe (London)"
          },
          "eu-west-3": {
            description: "Europe (Paris)"
          },
          "il-central-1": {
            description: "Israel (Tel Aviv)"
          },
          "me-central-1": {
            description: "Middle East (UAE)"
          },
          "me-south-1": {
            description: "Middle East (Bahrain)"
          },
          "mx-central-1": {
            description: "Mexico (Central)"
          },
          "sa-east-1": {
            description: "South America (Sao Paulo)"
          },
          "us-east-1": {
            description: "US East (N. Virginia)"
          },
          "us-east-2": {
            description: "US East (Ohio)"
          },
          "us-west-1": {
            description: "US West (N. California)"
          },
          "us-west-2": {
            description: "US West (Oregon)"
          }
        }
      },
      {
        id: "aws-cn",
        outputs: {
          dnsSuffix: "amazonaws.com.cn",
          dualStackDnsSuffix: "api.amazonwebservices.com.cn",
          implicitGlobalRegion: "cn-northwest-1",
          name: "aws-cn",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^cn\\-\\w+\\-\\d+$",
        regions: {
          "aws-cn-global": {
            description: "aws-cn global region"
          },
          "cn-north-1": {
            description: "China (Beijing)"
          },
          "cn-northwest-1": {
            description: "China (Ningxia)"
          }
        }
      },
      {
        id: "aws-eusc",
        outputs: {
          dnsSuffix: "amazonaws.eu",
          dualStackDnsSuffix: "api.amazonwebservices.eu",
          implicitGlobalRegion: "eusc-de-east-1",
          name: "aws-eusc",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$",
        regions: {
          "eusc-de-east-1": {
            description: "AWS European Sovereign Cloud (Germany)"
          }
        }
      },
      {
        id: "aws-iso",
        outputs: {
          dnsSuffix: "c2s.ic.gov",
          dualStackDnsSuffix: "api.aws.ic.gov",
          implicitGlobalRegion: "us-iso-east-1",
          name: "aws-iso",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
        regions: {
          "aws-iso-global": {
            description: "aws-iso global region"
          },
          "us-iso-east-1": {
            description: "US ISO East"
          },
          "us-iso-west-1": {
            description: "US ISO WEST"
          }
        }
      },
      {
        id: "aws-iso-b",
        outputs: {
          dnsSuffix: "sc2s.sgov.gov",
          dualStackDnsSuffix: "api.aws.scloud",
          implicitGlobalRegion: "us-isob-east-1",
          name: "aws-iso-b",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
        regions: {
          "aws-iso-b-global": {
            description: "aws-iso-b global region"
          },
          "us-isob-east-1": {
            description: "US ISOB East (Ohio)"
          },
          "us-isob-west-1": {
            description: "US ISOB West"
          }
        }
      },
      {
        id: "aws-iso-e",
        outputs: {
          dnsSuffix: "cloud.adc-e.uk",
          dualStackDnsSuffix: "api.cloud-aws.adc-e.uk",
          implicitGlobalRegion: "eu-isoe-west-1",
          name: "aws-iso-e",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
        regions: {
          "aws-iso-e-global": {
            description: "aws-iso-e global region"
          },
          "eu-isoe-west-1": {
            description: "EU ISOE West"
          }
        }
      },
      {
        id: "aws-iso-f",
        outputs: {
          dnsSuffix: "csp.hci.ic.gov",
          dualStackDnsSuffix: "api.aws.hci.ic.gov",
          implicitGlobalRegion: "us-isof-south-1",
          name: "aws-iso-f",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
        regions: {
          "aws-iso-f-global": {
            description: "aws-iso-f global region"
          },
          "us-isof-east-1": {
            description: "US ISOF EAST"
          },
          "us-isof-south-1": {
            description: "US ISOF SOUTH"
          }
        }
      },
      {
        id: "aws-us-gov",
        outputs: {
          dnsSuffix: "amazonaws.com",
          dualStackDnsSuffix: "api.aws",
          implicitGlobalRegion: "us-gov-west-1",
          name: "aws-us-gov",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
        regions: {
          "aws-us-gov-global": {
            description: "aws-us-gov global region"
          },
          "us-gov-east-1": {
            description: "AWS GovCloud (US-East)"
          },
          "us-gov-west-1": {
            description: "AWS GovCloud (US-West)"
          }
        }
      }
    ];
    var version = "1.1";
    var partitionsInfo = {
      partitions,
      version
    };
    var selectedPartitionsInfo = partitionsInfo;
    var selectedUserAgentPrefix = "";
    var partition = (value) => {
      const { partitions: partitions2 } = selectedPartitionsInfo;
      for (const partition2 of partitions2) {
        const { regions, outputs } = partition2;
        for (const [region, regionData] of Object.entries(regions)) {
          if (region === value) {
            return {
              ...outputs,
              ...regionData
            };
          }
        }
      }
      for (const partition2 of partitions2) {
        const { regionRegex, outputs } = partition2;
        if (new RegExp(regionRegex).test(value)) {
          return {
            ...outputs
          };
        }
      }
      const DEFAULT_PARTITION = partitions2.find((partition2) => partition2.id === "aws");
      if (!DEFAULT_PARTITION) {
        throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");
      }
      return {
        ...DEFAULT_PARTITION.outputs
      };
    };
    var setPartitionInfo = (partitionsInfo2, userAgentPrefix = "") => {
      selectedPartitionsInfo = partitionsInfo2;
      selectedUserAgentPrefix = userAgentPrefix;
    };
    var useDefaultPartitionInfo = () => {
      setPartitionInfo(partitionsInfo, "");
    };
    var getUserAgentPrefix = () => selectedUserAgentPrefix;
    var awsEndpointFunctions5 = {
      isVirtualHostableS3Bucket,
      parseArn,
      partition
    };
    utilEndpoints.customEndpointFunctions.aws = awsEndpointFunctions5;
    var resolveDefaultAwsRegionalEndpointsConfig = (input) => {
      if (typeof input.endpointProvider !== "function") {
        throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.");
      }
      const { endpoint } = input;
      if (endpoint === void 0) {
        input.endpoint = async () => {
          return toEndpointV12(input.endpointProvider({
            Region: typeof input.region === "function" ? await input.region() : input.region,
            UseDualStack: typeof input.useDualstackEndpoint === "function" ? await input.useDualstackEndpoint() : input.useDualstackEndpoint,
            UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint,
            Endpoint: void 0
          }, { logger: input.logger }));
        };
      }
      return input;
    };
    var toEndpointV12 = (endpoint) => urlParser.parseUrl(endpoint.url);
    exports2.EndpointError = utilEndpoints.EndpointError;
    exports2.isIpAddress = utilEndpoints.isIpAddress;
    exports2.resolveEndpoint = utilEndpoints.resolveEndpoint;
    exports2.awsEndpointFunctions = awsEndpointFunctions5;
    exports2.getUserAgentPrefix = getUserAgentPrefix;
    exports2.partition = partition;
    exports2.resolveDefaultAwsRegionalEndpointsConfig = resolveDefaultAwsRegionalEndpointsConfig;
    exports2.setPartitionInfo = setPartitionInfo;
    exports2.toEndpointV1 = toEndpointV12;
    exports2.useDefaultPartitionInfo = useDefaultPartitionInfo;
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js
var state, emitWarningIfUnsupportedVersion;
var init_emitWarningIfUnsupportedVersion = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js"() {
    state = {
      warningEmitted: false
    };
    emitWarningIfUnsupportedVersion = (version) => {
      if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 20) {
        state.warningEmitted = true;
        process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
no longer support Node.js ${version} in January 2026.

To continue receiving updates to AWS services, bug fixes, and security
updates please upgrade to a supported Node.js LTS version.

More information can be found at: https://a.co/c895JFp`);
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/longPollMiddleware.js
var longPollMiddleware, longPollMiddlewareOptions, getLongPollPlugin;
var init_longPollMiddleware = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/client/longPollMiddleware.js"() {
    longPollMiddleware = () => (next, context) => async (args) => {
      context.__retryLongPoll = true;
      return next(args);
    };
    longPollMiddlewareOptions = {
      name: "longPollMiddleware",
      tags: ["RETRY"],
      step: "initialize",
      override: true
    };
    getLongPollPlugin = (options) => ({
      applyToStack: (clientStack) => {
        clientStack.add(longPollMiddleware(), longPollMiddlewareOptions);
      }
    });
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js
function setCredentialFeature(credentials, feature, value) {
  if (!credentials.$source) {
    credentials.$source = {};
  }
  credentials.$source[feature] = value;
  return credentials;
}
var init_setCredentialFeature = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js"() {
  }
});

// ../../node_modules/@smithy/service-error-classification/dist-cjs/index.js
var require_dist_cjs22 = __commonJS({
  "../../node_modules/@smithy/service-error-classification/dist-cjs/index.js"(exports2) {
    "use strict";
    var CLOCK_SKEW_ERROR_CODES = [
      "AuthFailure",
      "InvalidSignatureException",
      "RequestExpired",
      "RequestInTheFuture",
      "RequestTimeTooSkewed",
      "SignatureDoesNotMatch"
    ];
    var THROTTLING_ERROR_CODES = [
      "BandwidthLimitExceeded",
      "EC2ThrottledException",
      "LimitExceededException",
      "PriorRequestNotComplete",
      "ProvisionedThroughputExceededException",
      "RequestLimitExceeded",
      "RequestThrottled",
      "RequestThrottledException",
      "SlowDown",
      "ThrottledException",
      "Throttling",
      "ThrottlingException",
      "TooManyRequestsException",
      "TransactionInProgressException"
    ];
    var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"];
    var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];
    var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"];
    var NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"];
    var isRetryableByTrait = (error3) => error3?.$retryable !== void 0;
    var isClockSkewError = (error3) => CLOCK_SKEW_ERROR_CODES.includes(error3.name);
    var isClockSkewCorrectedError = (error3) => error3.$metadata?.clockSkewCorrected;
    var isBrowserNetworkError = (error3) => {
      const errorMessages = /* @__PURE__ */ new Set([
        "Failed to fetch",
        "NetworkError when attempting to fetch resource",
        "The Internet connection appears to be offline",
        "Load failed",
        "Network request failed"
      ]);
      const isValid = error3 && error3 instanceof TypeError;
      if (!isValid) {
        return false;
      }
      return errorMessages.has(error3.message);
    };
    var isThrottlingError = (error3) => error3.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error3.name) || error3.$retryable?.throttling == true;
    var isTransientError = (error3, depth = 0) => isRetryableByTrait(error3) || isClockSkewCorrectedError(error3) || TRANSIENT_ERROR_CODES.includes(error3.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error3?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error3?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error3.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error3) || isNodeJsHttp2TransientError(error3) || error3.cause !== void 0 && depth <= 10 && isTransientError(error3.cause, depth + 1);
    var isServerError = (error3) => {
      if (error3.$metadata?.httpStatusCode !== void 0) {
        const statusCode = error3.$metadata.httpStatusCode;
        if (500 <= statusCode && statusCode <= 599 && !isTransientError(error3)) {
          return true;
        }
        return false;
      }
      return false;
    };
    function isNodeJsHttp2TransientError(error3) {
      return error3.code === "ERR_HTTP2_STREAM_ERROR" && error3.message.includes("NGHTTP2_REFUSED_STREAM");
    }
    exports2.isBrowserNetworkError = isBrowserNetworkError;
    exports2.isClockSkewCorrectedError = isClockSkewCorrectedError;
    exports2.isClockSkewError = isClockSkewError;
    exports2.isNodeJsHttp2TransientError = isNodeJsHttp2TransientError;
    exports2.isRetryableByTrait = isRetryableByTrait;
    exports2.isServerError = isServerError;
    exports2.isThrottlingError = isThrottlingError;
    exports2.isTransientError = isTransientError;
  }
});

// ../../node_modules/@smithy/util-retry/dist-cjs/index.js
var require_dist_cjs23 = __commonJS({
  "../../node_modules/@smithy/util-retry/dist-cjs/index.js"(exports2) {
    "use strict";
    var serviceErrorClassification = require_dist_cjs22();
    exports2.RETRY_MODES = void 0;
    (function(RETRY_MODES) {
      RETRY_MODES["STANDARD"] = "standard";
      RETRY_MODES["ADAPTIVE"] = "adaptive";
    })(exports2.RETRY_MODES || (exports2.RETRY_MODES = {}));
    var DEFAULT_MAX_ATTEMPTS = 3;
    var DEFAULT_RETRY_MODE5 = exports2.RETRY_MODES.STANDARD;
    var DefaultRateLimiter = class _DefaultRateLimiter {
      static setTimeoutFn = setTimeout;
      beta;
      minCapacity;
      minFillRate;
      scaleConstant;
      smooth;
      enabled = false;
      availableTokens = 0;
      lastMaxRate = 0;
      measuredTxRate = 0;
      requestCount = 0;
      fillRate;
      lastThrottleTime;
      lastTimestamp = 0;
      lastTxRateBucket;
      maxCapacity;
      timeWindow = 0;
      constructor(options) {
        this.beta = options?.beta ?? 0.7;
        this.minCapacity = options?.minCapacity ?? 1;
        this.minFillRate = options?.minFillRate ?? 0.5;
        this.scaleConstant = options?.scaleConstant ?? 0.4;
        this.smooth = options?.smooth ?? 0.8;
        this.lastThrottleTime = this.getCurrentTimeInSeconds();
        this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());
        this.fillRate = this.minFillRate;
        this.maxCapacity = this.minCapacity;
      }
      async getSendToken() {
        return this.acquireTokenBucket(1);
      }
      updateClientSendingRate(response) {
        let calculatedRate;
        this.updateMeasuredRate();
        const retryErrorInfo = response;
        const isThrottling = retryErrorInfo?.errorType === "THROTTLING" || serviceErrorClassification.isThrottlingError(retryErrorInfo?.error ?? response);
        if (isThrottling) {
          const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);
          this.lastMaxRate = rateToUse;
          this.calculateTimeWindow();
          this.lastThrottleTime = this.getCurrentTimeInSeconds();
          calculatedRate = this.cubicThrottle(rateToUse);
          this.enableTokenBucket();
        } else {
          this.calculateTimeWindow();
          calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());
        }
        const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);
        this.updateTokenBucketRate(newRate);
      }
      getCurrentTimeInSeconds() {
        return Date.now() / 1e3;
      }
      async acquireTokenBucket(amount) {
        if (!this.enabled) {
          return;
        }
        this.refillTokenBucket();
        if (amount > this.availableTokens) {
          const delay = (amount - this.availableTokens) / this.fillRate * 1e3;
          await new Promise((resolve) => _DefaultRateLimiter.setTimeoutFn(resolve, delay));
        }
        this.availableTokens = this.availableTokens - amount;
      }
      refillTokenBucket() {
        const timestamp = this.getCurrentTimeInSeconds();
        if (!this.lastTimestamp) {
          this.lastTimestamp = timestamp;
          return;
        }
        const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;
        this.availableTokens = Math.min(this.maxCapacity, this.availableTokens + fillAmount);
        this.lastTimestamp = timestamp;
      }
      calculateTimeWindow() {
        this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3));
      }
      cubicThrottle(rateToUse) {
        return this.getPrecise(rateToUse * this.beta);
      }
      cubicSuccess(timestamp) {
        return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);
      }
      enableTokenBucket() {
        this.enabled = true;
      }
      updateTokenBucketRate(newRate) {
        this.refillTokenBucket();
        this.fillRate = Math.max(newRate, this.minFillRate);
        this.maxCapacity = Math.max(newRate, this.minCapacity);
        this.availableTokens = Math.min(this.availableTokens, this.maxCapacity);
      }
      updateMeasuredRate() {
        const t = this.getCurrentTimeInSeconds();
        const timeBucket = Math.floor(t * 2) / 2;
        this.requestCount++;
        if (timeBucket > this.lastTxRateBucket) {
          const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);
          this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));
          this.requestCount = 0;
          this.lastTxRateBucket = timeBucket;
        }
      }
      getPrecise(num) {
        return parseFloat(num.toFixed(8));
      }
    };
    var DEFAULT_RETRY_DELAY_BASE = 100;
    var MAXIMUM_RETRY_DELAY = 20 * 1e3;
    var THROTTLING_RETRY_DELAY_BASE = 500;
    var INITIAL_RETRY_TOKENS = 500;
    var RETRY_COST = 5;
    var TIMEOUT_RETRY_COST = 10;
    var NO_RETRY_INCREMENT = 1;
    var INVOCATION_ID_HEADER = "amz-sdk-invocation-id";
    var REQUEST_HEADER = "amz-sdk-request";
    var Retry2 = class _Retry {
      static v2026 = typeof process !== "undefined" && process.env?.SMITHY_NEW_RETRIES_2026 === "true";
      static delay() {
        return _Retry.v2026 ? 50 : 100;
      }
      static throttlingDelay() {
        return _Retry.v2026 ? 1e3 : 500;
      }
      static cost() {
        return _Retry.v2026 ? 14 : 5;
      }
      static throttlingCost() {
        return _Retry.v2026 ? 5 : 10;
      }
      static modifiedCostType() {
        return _Retry.v2026 ? "THROTTLING" : "TRANSIENT";
      }
    };
    var DefaultRetryBackoffStrategy = class {
      x = Retry2.delay();
      computeNextBackoffDelay(i5) {
        const b5 = Math.random();
        const r5 = 2;
        const t_i = b5 * Math.min(this.x * r5 ** i5, MAXIMUM_RETRY_DELAY);
        return Math.floor(t_i);
      }
      setDelayBase(delay) {
        this.x = delay;
      }
    };
    var DefaultRetryToken = class {
      delay;
      count;
      cost;
      longPoll;
      constructor(delay, count, cost, longPoll) {
        this.delay = delay;
        this.count = count;
        this.cost = cost;
        this.longPoll = longPoll;
      }
      getRetryCount() {
        return this.count;
      }
      getRetryDelay() {
        return Math.min(MAXIMUM_RETRY_DELAY, this.delay);
      }
      getRetryCost() {
        return this.cost;
      }
      isLongPoll() {
        return this.longPoll;
      }
    };
    var refusal = {
      incompatible: 1,
      attempts: 2,
      capacity: 3
    };
    var StandardRetryStrategy = class {
      mode = exports2.RETRY_MODES.STANDARD;
      capacity = INITIAL_RETRY_TOKENS;
      retryBackoffStrategy;
      maxAttemptsProvider;
      baseDelay;
      constructor(arg1) {
        if (typeof arg1 === "number") {
          this.maxAttemptsProvider = async () => arg1;
        } else if (typeof arg1 === "function") {
          this.maxAttemptsProvider = arg1;
        } else if (arg1 && typeof arg1 === "object") {
          this.maxAttemptsProvider = async () => arg1.maxAttempts;
          this.baseDelay = arg1.baseDelay;
          this.retryBackoffStrategy = arg1.backoff;
        }
        this.maxAttemptsProvider ??= async () => DEFAULT_MAX_ATTEMPTS;
        this.baseDelay ??= Retry2.delay();
        this.retryBackoffStrategy ??= new DefaultRetryBackoffStrategy();
      }
      async acquireInitialRetryToken(retryTokenScope) {
        return new DefaultRetryToken(Retry2.delay(), 0, void 0, Retry2.v2026 && retryTokenScope.includes(":longpoll"));
      }
      async refreshRetryTokenForRetry(token, errorInfo) {
        const maxAttempts = await this.getMaxAttempts();
        const retryCode = this.retryCode(token, errorInfo, maxAttempts);
        const shouldRetry = retryCode === 0;
        const isLongPoll = token.isLongPoll?.();
        if (shouldRetry || isLongPoll) {
          const errorType = errorInfo.errorType;
          this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? Retry2.throttlingDelay() : this.baseDelay);
          const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());
          let retryDelay = delayFromErrorType;
          if (errorInfo.retryAfterHint instanceof Date) {
            retryDelay = Math.max(delayFromErrorType, Math.min(errorInfo.retryAfterHint.getTime() - Date.now(), delayFromErrorType + 5e3));
          }
          if (!shouldRetry) {
            throw Object.assign(new Error("No retry token available"), {
              $backoff: Retry2.v2026 && retryCode === refusal.capacity && isLongPoll ? retryDelay : 0
            });
          } else {
            const capacityCost = this.getCapacityCost(errorType);
            this.capacity -= capacityCost;
            return new DefaultRetryToken(retryDelay, token.getRetryCount() + 1, capacityCost, token.isLongPoll?.() ?? false);
          }
        }
        throw new Error("No retry token available");
      }
      recordSuccess(token) {
        this.capacity = Math.min(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));
      }
      getCapacity() {
        return this.capacity;
      }
      async maxAttempts() {
        return this.maxAttemptsProvider();
      }
      async getMaxAttempts() {
        try {
          return await this.maxAttemptsProvider();
        } catch (error3) {
          console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);
          return DEFAULT_MAX_ATTEMPTS;
        }
      }
      retryCode(tokenToRenew, errorInfo, maxAttempts) {
        const attempts = tokenToRenew.getRetryCount() + 1;
        const retryableStatus = this.isRetryableError(errorInfo.errorType) ? 0 : refusal.incompatible;
        const attemptStatus = attempts < maxAttempts ? 0 : refusal.attempts;
        const capacityStatus = this.capacity >= this.getCapacityCost(errorInfo.errorType) ? 0 : refusal.capacity;
        return retryableStatus || attemptStatus || capacityStatus;
      }
      getCapacityCost(errorType) {
        return errorType === Retry2.modifiedCostType() ? Retry2.throttlingCost() : Retry2.cost();
      }
      isRetryableError(errorType) {
        return errorType === "THROTTLING" || errorType === "TRANSIENT";
      }
    };
    var AdaptiveRetryStrategy = class {
      mode = exports2.RETRY_MODES.ADAPTIVE;
      rateLimiter;
      standardRetryStrategy;
      constructor(maxAttemptsProvider, options) {
        const { rateLimiter } = options ?? {};
        this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();
        this.standardRetryStrategy = options ? new StandardRetryStrategy({
          maxAttempts: typeof maxAttemptsProvider === "number" ? maxAttemptsProvider : 3,
          ...options
        }) : new StandardRetryStrategy(maxAttemptsProvider);
      }
      async acquireInitialRetryToken(retryTokenScope) {
        await this.rateLimiter.getSendToken();
        return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);
      }
      async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
        this.rateLimiter.updateClientSendingRate(errorInfo);
        return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
      }
      recordSuccess(token) {
        this.rateLimiter.updateClientSendingRate({});
        this.standardRetryStrategy.recordSuccess(token);
      }
      async maxAttemptsProvider() {
        return this.standardRetryStrategy.maxAttempts();
      }
    };
    var ConfiguredRetryStrategy = class extends StandardRetryStrategy {
      computeNextBackoffDelay;
      constructor(maxAttempts, computeNextBackoffDelay = Retry2.delay()) {
        super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts);
        if (typeof computeNextBackoffDelay === "number") {
          this.computeNextBackoffDelay = () => computeNextBackoffDelay;
        } else {
          this.computeNextBackoffDelay = computeNextBackoffDelay;
        }
      }
      async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
        const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
        token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount());
        return token;
      }
    };
    exports2.AdaptiveRetryStrategy = AdaptiveRetryStrategy;
    exports2.ConfiguredRetryStrategy = ConfiguredRetryStrategy;
    exports2.DEFAULT_MAX_ATTEMPTS = DEFAULT_MAX_ATTEMPTS;
    exports2.DEFAULT_RETRY_DELAY_BASE = DEFAULT_RETRY_DELAY_BASE;
    exports2.DEFAULT_RETRY_MODE = DEFAULT_RETRY_MODE5;
    exports2.DefaultRateLimiter = DefaultRateLimiter;
    exports2.INITIAL_RETRY_TOKENS = INITIAL_RETRY_TOKENS;
    exports2.INVOCATION_ID_HEADER = INVOCATION_ID_HEADER;
    exports2.MAXIMUM_RETRY_DELAY = MAXIMUM_RETRY_DELAY;
    exports2.NO_RETRY_INCREMENT = NO_RETRY_INCREMENT;
    exports2.REQUEST_HEADER = REQUEST_HEADER;
    exports2.RETRY_COST = RETRY_COST;
    exports2.Retry = Retry2;
    exports2.StandardRetryStrategy = StandardRetryStrategy;
    exports2.THROTTLING_RETRY_DELAY_BASE = THROTTLING_RETRY_DELAY_BASE;
    exports2.TIMEOUT_RETRY_COST = TIMEOUT_RETRY_COST;
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js
function setFeature2(context, feature, value) {
  if (!context.__aws_sdk_context) {
    context.__aws_sdk_context = {
      features: {}
    };
  } else if (!context.__aws_sdk_context.features) {
    context.__aws_sdk_context.features = {};
  }
  context.__aws_sdk_context.features[feature] = value;
}
var import_util_retry;
var init_setFeature2 = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"() {
    import_util_retry = __toESM(require_dist_cjs23());
    import_util_retry.Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true";
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js
function setTokenFeature(token, feature, value) {
  if (!token.$source) {
    token.$source = {};
  }
  token.$source[feature] = value;
  return token;
}
var init_setTokenFeature = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js"() {
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js
var client_exports = {};
__export(client_exports, {
  emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,
  getLongPollPlugin: () => getLongPollPlugin,
  setCredentialFeature: () => setCredentialFeature,
  setFeature: () => setFeature2,
  setTokenFeature: () => setTokenFeature,
  state: () => state
});
var init_client = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js"() {
    init_emitWarningIfUnsupportedVersion();
    init_longPollMiddleware();
    init_setCredentialFeature();
    init_setFeature2();
    init_setTokenFeature();
  }
});

// ../../node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js
var require_dist_cjs24 = __commonJS({
  "../../node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js"(exports2) {
    "use strict";
    var core = (init_dist_es(), __toCommonJS(dist_es_exports));
    var utilEndpoints = require_dist_cjs21();
    var protocolHttp = require_dist_cjs2();
    var client = (init_client(), __toCommonJS(client_exports));
    var utilRetry = require_dist_cjs23();
    var DEFAULT_UA_APP_ID = void 0;
    function isValidUserAgentAppId(appId) {
      if (appId === void 0) {
        return true;
      }
      return typeof appId === "string" && appId.length <= 50;
    }
    function resolveUserAgentConfig5(input) {
      const normalizedAppIdProvider = core.normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID);
      const { customUserAgent } = input;
      return Object.assign(input, {
        customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
        userAgentAppId: async () => {
          const appId = await normalizedAppIdProvider();
          if (!isValidUserAgentAppId(appId)) {
            const logger2 = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger;
            if (typeof appId !== "string") {
              logger2?.warn("userAgentAppId must be a string or undefined.");
            } else if (appId.length > 50) {
              logger2?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.");
            }
          }
          return appId;
        }
      });
    }
    var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
    async function checkFeatures(context, config, args) {
      const request = args.request;
      if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
        client.setFeature(context, "PROTOCOL_RPC_V2_CBOR", "M");
      }
      if (typeof config.retryStrategy === "function") {
        const retryStrategy = await config.retryStrategy();
        if (typeof retryStrategy.mode === "string") {
          switch (retryStrategy.mode) {
            case utilRetry.RETRY_MODES.ADAPTIVE:
              client.setFeature(context, "RETRY_MODE_ADAPTIVE", "F");
              break;
            case utilRetry.RETRY_MODES.STANDARD:
              client.setFeature(context, "RETRY_MODE_STANDARD", "E");
              break;
          }
        }
      }
      if (typeof config.accountIdEndpointMode === "function") {
        const endpointV2 = context.endpointV2;
        if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
          client.setFeature(context, "ACCOUNT_ID_ENDPOINT", "O");
        }
        switch (await config.accountIdEndpointMode?.()) {
          case "disabled":
            client.setFeature(context, "ACCOUNT_ID_MODE_DISABLED", "Q");
            break;
          case "preferred":
            client.setFeature(context, "ACCOUNT_ID_MODE_PREFERRED", "P");
            break;
          case "required":
            client.setFeature(context, "ACCOUNT_ID_MODE_REQUIRED", "R");
            break;
        }
      }
      const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;
      if (identity?.$source) {
        const credentials = identity;
        if (credentials.accountId) {
          client.setFeature(context, "RESOLVED_ACCOUNT_ID", "T");
        }
        for (const [key, value] of Object.entries(credentials.$source ?? {})) {
          client.setFeature(context, key, value);
        }
      }
    }
    var USER_AGENT = "user-agent";
    var X_AMZ_USER_AGENT = "x-amz-user-agent";
    var SPACE = " ";
    var UA_NAME_SEPARATOR = "/";
    var UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g;
    var UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g;
    var UA_ESCAPE_CHAR = "-";
    var BYTE_LIMIT = 1024;
    function encodeFeatures(features) {
      let buffer = "";
      for (const key in features) {
        const val = features[key];
        if (buffer.length + val.length + 1 <= BYTE_LIMIT) {
          if (buffer.length) {
            buffer += "," + val;
          } else {
            buffer += val;
          }
          continue;
        }
        break;
      }
      return buffer;
    }
    var userAgentMiddleware = (options) => (next, context) => async (args) => {
      const { request } = args;
      if (!protocolHttp.HttpRequest.isInstance(request)) {
        return next(args);
      }
      const { headers } = request;
      const userAgent = context?.userAgent?.map(escapeUserAgent) || [];
      const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
      await checkFeatures(context, options, args);
      const awsContext = context;
      defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
      const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
      const appId = await options.userAgentAppId();
      if (appId) {
        defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`]));
      }
      const prefix = utilEndpoints.getUserAgentPrefix();
      const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE);
      const normalUAValue = [
        ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")),
        ...customUserAgent
      ].join(SPACE);
      if (options.runtime !== "browser") {
        if (normalUAValue) {
          headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;
        }
        headers[USER_AGENT] = sdkUserAgentValue;
      } else {
        headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;
      }
      return next({
        ...args,
        request
      });
    };
    var escapeUserAgent = (userAgentPair) => {
      const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR);
      const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);
      const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);
      const prefix = name.substring(0, prefixSeparatorIndex);
      let uaName = name.substring(prefixSeparatorIndex + 1);
      if (prefix === "api") {
        uaName = uaName.toLowerCase();
      }
      return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {
        switch (index) {
          case 0:
            return item;
          case 1:
            return `${acc}/${item}`;
          default:
            return `${acc}#${item}`;
        }
      }, "");
    };
    var getUserAgentMiddlewareOptions = {
      name: "getUserAgentMiddleware",
      step: "build",
      priority: "low",
      tags: ["SET_USER_AGENT", "USER_AGENT"],
      override: true
    };
    var getUserAgentPlugin5 = (config) => ({
      applyToStack: (clientStack) => {
        clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);
      }
    });
    exports2.DEFAULT_UA_APP_ID = DEFAULT_UA_APP_ID;
    exports2.getUserAgentMiddlewareOptions = getUserAgentMiddlewareOptions;
    exports2.getUserAgentPlugin = getUserAgentPlugin5;
    exports2.resolveUserAgentConfig = resolveUserAgentConfig5;
    exports2.userAgentMiddleware = userAgentMiddleware;
  }
});

// ../../node_modules/@smithy/util-config-provider/dist-cjs/index.js
var require_dist_cjs25 = __commonJS({
  "../../node_modules/@smithy/util-config-provider/dist-cjs/index.js"(exports2) {
    "use strict";
    var booleanSelector = (obj, key, type) => {
      if (!(key in obj))
        return void 0;
      if (obj[key] === "true")
        return true;
      if (obj[key] === "false")
        return false;
      throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`);
    };
    var numberSelector = (obj, key, type) => {
      if (!(key in obj))
        return void 0;
      const numberValue = parseInt(obj[key], 10);
      if (Number.isNaN(numberValue)) {
        throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`);
      }
      return numberValue;
    };
    exports2.SelectorType = void 0;
    (function(SelectorType) {
      SelectorType["ENV"] = "env";
      SelectorType["CONFIG"] = "shared config entry";
    })(exports2.SelectorType || (exports2.SelectorType = {}));
    exports2.booleanSelector = booleanSelector;
    exports2.numberSelector = numberSelector;
  }
});

// ../../node_modules/@smithy/config-resolver/dist-cjs/index.js
var require_dist_cjs26 = __commonJS({
  "../../node_modules/@smithy/config-resolver/dist-cjs/index.js"(exports2) {
    "use strict";
    var utilConfigProvider = require_dist_cjs25();
    var utilMiddleware = require_dist_cjs6();
    var utilEndpoints = require_dist_cjs20();
    var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
    var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
    var DEFAULT_USE_DUALSTACK_ENDPOINT = false;
    var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS5 = {
      environmentVariableSelector: (env2) => utilConfigProvider.booleanSelector(env2, ENV_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.ENV),
      configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
      default: false
    };
    var nodeDualstackConfigSelectors = {
      environmentVariableSelector: (env2) => utilConfigProvider.booleanSelector(env2, ENV_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.ENV),
      configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
      default: void 0
    };
    var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT";
    var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
    var DEFAULT_USE_FIPS_ENDPOINT = false;
    var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS5 = {
      environmentVariableSelector: (env2) => utilConfigProvider.booleanSelector(env2, ENV_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.ENV),
      configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
      default: false
    };
    var nodeFipsConfigSelectors = {
      environmentVariableSelector: (env2) => utilConfigProvider.booleanSelector(env2, ENV_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.ENV),
      configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
      default: void 0
    };
    var resolveCustomEndpointsConfig = (input) => {
      const { tls, endpoint, urlParser, useDualstackEndpoint } = input;
      return Object.assign(input, {
        tls: tls ?? true,
        endpoint: utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint),
        isCustomEndpoint: true,
        useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false)
      });
    };
    var getEndpointFromRegion = async (input) => {
      const { tls = true } = input;
      const region = await input.region();
      const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);
      if (!dnsHostRegex.test(region)) {
        throw new Error("Invalid region in client config");
      }
      const useDualstackEndpoint = await input.useDualstackEndpoint();
      const useFipsEndpoint = await input.useFipsEndpoint();
      const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};
      if (!hostname) {
        throw new Error("Cannot resolve hostname from client config");
      }
      return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`);
    };
    var resolveEndpointsConfig = (input) => {
      const useDualstackEndpoint = utilMiddleware.normalizeProvider(input.useDualstackEndpoint ?? false);
      const { endpoint, useFipsEndpoint, urlParser, tls } = input;
      return Object.assign(input, {
        tls: tls ?? true,
        endpoint: endpoint ? utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),
        isCustomEndpoint: !!endpoint,
        useDualstackEndpoint
      });
    };
    var REGION_ENV_NAME = "AWS_REGION";
    var REGION_INI_NAME = "region";
    var NODE_REGION_CONFIG_OPTIONS5 = {
      environmentVariableSelector: (env2) => env2[REGION_ENV_NAME],
      configFileSelector: (profile) => profile[REGION_INI_NAME],
      default: () => {
        throw new Error("Region is missing");
      }
    };
    var NODE_REGION_CONFIG_FILE_OPTIONS5 = {
      preferredFile: "credentials"
    };
    var validRegions = /* @__PURE__ */ new Set();
    var checkRegion = (region, check = utilEndpoints.isValidHostLabel) => {
      if (!validRegions.has(region) && !check(region)) {
        if (region === "*") {
          console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);
        } else {
          throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`);
        }
      } else {
        validRegions.add(region);
      }
    };
    var isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
    var getRealRegion = (region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region;
    var resolveRegionConfig5 = (input) => {
      const { region, useFipsEndpoint } = input;
      if (!region) {
        throw new Error("Region is missing");
      }
      return Object.assign(input, {
        region: async () => {
          const providedRegion = typeof region === "function" ? await region() : region;
          const realRegion = getRealRegion(providedRegion);
          checkRegion(realRegion);
          return realRegion;
        },
        useFipsEndpoint: async () => {
          const providedRegion = typeof region === "string" ? region : await region();
          if (isFipsRegion(providedRegion)) {
            return true;
          }
          return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
        }
      });
    };
    var getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))?.hostname;
    var getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0;
    var getResolvedPartition = (region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws";
    var getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => {
      if (signingRegion) {
        return signingRegion;
      } else if (useFipsEndpoint) {
        const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\.");
        const regionRegexmatchArray = hostname.match(regionRegexJs);
        if (regionRegexmatchArray) {
          return regionRegexmatchArray[0].slice(1, -1);
        }
      }
    };
    var getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash }) => {
      const partition = getResolvedPartition(region, { partitionHash });
      const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region;
      const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };
      const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions);
      const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions);
      const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });
      if (hostname === void 0) {
        throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);
      }
      const signingRegion = getResolvedSigningRegion(hostname, {
        signingRegion: regionHash[resolvedRegion]?.signingRegion,
        regionRegex: partitionHash[partition].regionRegex,
        useFipsEndpoint
      });
      return {
        partition,
        signingService,
        hostname,
        ...signingRegion && { signingRegion },
        ...regionHash[resolvedRegion]?.signingService && {
          signingService: regionHash[resolvedRegion].signingService
        }
      };
    };
    exports2.CONFIG_USE_DUALSTACK_ENDPOINT = CONFIG_USE_DUALSTACK_ENDPOINT;
    exports2.CONFIG_USE_FIPS_ENDPOINT = CONFIG_USE_FIPS_ENDPOINT;
    exports2.DEFAULT_USE_DUALSTACK_ENDPOINT = DEFAULT_USE_DUALSTACK_ENDPOINT;
    exports2.DEFAULT_USE_FIPS_ENDPOINT = DEFAULT_USE_FIPS_ENDPOINT;
    exports2.ENV_USE_DUALSTACK_ENDPOINT = ENV_USE_DUALSTACK_ENDPOINT;
    exports2.ENV_USE_FIPS_ENDPOINT = ENV_USE_FIPS_ENDPOINT;
    exports2.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS5;
    exports2.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS5;
    exports2.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS5;
    exports2.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS5;
    exports2.REGION_ENV_NAME = REGION_ENV_NAME;
    exports2.REGION_INI_NAME = REGION_INI_NAME;
    exports2.getRegionInfo = getRegionInfo;
    exports2.nodeDualstackConfigSelectors = nodeDualstackConfigSelectors;
    exports2.nodeFipsConfigSelectors = nodeFipsConfigSelectors;
    exports2.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig;
    exports2.resolveEndpointsConfig = resolveEndpointsConfig;
    exports2.resolveRegionConfig = resolveRegionConfig5;
  }
});

// ../../node_modules/@smithy/middleware-content-length/dist-cjs/index.js
var require_dist_cjs27 = __commonJS({
  "../../node_modules/@smithy/middleware-content-length/dist-cjs/index.js"(exports2) {
    "use strict";
    var protocolHttp = require_dist_cjs2();
    var CONTENT_LENGTH_HEADER = "content-length";
    function contentLengthMiddleware(bodyLengthChecker) {
      return (next) => async (args) => {
        const request = args.request;
        if (protocolHttp.HttpRequest.isInstance(request)) {
          const { body, headers } = request;
          if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) {
            try {
              const length = bodyLengthChecker(body);
              request.headers = {
                ...request.headers,
                [CONTENT_LENGTH_HEADER]: String(length)
              };
            } catch (error3) {
            }
          }
        }
        return next({
          ...args,
          request
        });
      };
    }
    var contentLengthMiddlewareOptions = {
      step: "build",
      tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"],
      name: "contentLengthMiddleware",
      override: true
    };
    var getContentLengthPlugin5 = (options) => ({
      applyToStack: (clientStack) => {
        clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);
      }
    });
    exports2.contentLengthMiddleware = contentLengthMiddleware;
    exports2.contentLengthMiddlewareOptions = contentLengthMiddlewareOptions;
    exports2.getContentLengthPlugin = getContentLengthPlugin5;
  }
});

// ../../node_modules/@smithy/property-provider/dist-cjs/index.js
var require_dist_cjs28 = __commonJS({
  "../../node_modules/@smithy/property-provider/dist-cjs/index.js"(exports2) {
    "use strict";
    var ProviderError2 = class _ProviderError extends Error {
      name = "ProviderError";
      tryNextLink;
      constructor(message, options = true) {
        let logger2;
        let tryNextLink = true;
        if (typeof options === "boolean") {
          logger2 = void 0;
          tryNextLink = options;
        } else if (options != null && typeof options === "object") {
          logger2 = options.logger;
          tryNextLink = options.tryNextLink ?? true;
        }
        super(message);
        this.tryNextLink = tryNextLink;
        Object.setPrototypeOf(this, _ProviderError.prototype);
        logger2?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`);
      }
      static from(error3, options = true) {
        return Object.assign(new this(error3.message, options), error3);
      }
    };
    var CredentialsProviderError = class _CredentialsProviderError extends ProviderError2 {
      name = "CredentialsProviderError";
      constructor(message, options = true) {
        super(message, options);
        Object.setPrototypeOf(this, _CredentialsProviderError.prototype);
      }
    };
    var TokenProviderError = class _TokenProviderError extends ProviderError2 {
      name = "TokenProviderError";
      constructor(message, options = true) {
        super(message, options);
        Object.setPrototypeOf(this, _TokenProviderError.prototype);
      }
    };
    var chain = (...providers) => async () => {
      if (providers.length === 0) {
        throw new ProviderError2("No providers in chain");
      }
      let lastProviderError;
      for (const provider of providers) {
        try {
          const credentials = await provider();
          return credentials;
        } catch (err) {
          lastProviderError = err;
          if (err?.tryNextLink) {
            continue;
          }
          throw err;
        }
      }
      throw lastProviderError;
    };
    var fromStatic = (staticValue) => () => Promise.resolve(staticValue);
    var memoize = (provider, isExpired, requiresRefresh) => {
      let resolved;
      let pending;
      let hasResult;
      let isConstant = false;
      const coalesceProvider = async () => {
        if (!pending) {
          pending = provider();
        }
        try {
          resolved = await pending;
          hasResult = true;
          isConstant = false;
        } finally {
          pending = void 0;
        }
        return resolved;
      };
      if (isExpired === void 0) {
        return async (options) => {
          if (!hasResult || options?.forceRefresh) {
            resolved = await coalesceProvider();
          }
          return resolved;
        };
      }
      return async (options) => {
        if (!hasResult || options?.forceRefresh) {
          resolved = await coalesceProvider();
        }
        if (isConstant) {
          return resolved;
        }
        if (requiresRefresh && !requiresRefresh(resolved)) {
          isConstant = true;
          return resolved;
        }
        if (isExpired(resolved)) {
          await coalesceProvider();
          return resolved;
        }
        return resolved;
      };
    };
    exports2.CredentialsProviderError = CredentialsProviderError;
    exports2.ProviderError = ProviderError2;
    exports2.TokenProviderError = TokenProviderError;
    exports2.chain = chain;
    exports2.fromStatic = fromStatic;
    exports2.memoize = memoize;
  }
});

// ../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js
var require_getHomeDir = __commonJS({
  "../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.getHomeDir = void 0;
    var os_1 = require("os");
    var path_1 = require("path");
    var homeDirCache = {};
    var getHomeDirCacheKey = () => {
      if (process && process.geteuid) {
        return `${process.geteuid()}`;
      }
      return "DEFAULT";
    };
    var getHomeDir = () => {
      const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env;
      if (HOME)
        return HOME;
      if (USERPROFILE)
        return USERPROFILE;
      if (HOMEPATH)
        return `${HOMEDRIVE}${HOMEPATH}`;
      const homeDirCacheKey = getHomeDirCacheKey();
      if (!homeDirCache[homeDirCacheKey])
        homeDirCache[homeDirCacheKey] = (0, os_1.homedir)();
      return homeDirCache[homeDirCacheKey];
    };
    exports2.getHomeDir = getHomeDir;
  }
});

// ../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js
var require_getSSOTokenFilepath = __commonJS({
  "../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.getSSOTokenFilepath = void 0;
    var crypto_1 = require("crypto");
    var path_1 = require("path");
    var getHomeDir_1 = require_getHomeDir();
    var getSSOTokenFilepath = (id) => {
      const hasher = (0, crypto_1.createHash)("sha1");
      const cacheName = hasher.update(id).digest("hex");
      return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`);
    };
    exports2.getSSOTokenFilepath = getSSOTokenFilepath;
  }
});

// ../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js
var require_getSSOTokenFromFile = __commonJS({
  "../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.getSSOTokenFromFile = exports2.tokenIntercept = void 0;
    var promises_1 = require("fs/promises");
    var getSSOTokenFilepath_1 = require_getSSOTokenFilepath();
    exports2.tokenIntercept = {};
    var getSSOTokenFromFile = async (id) => {
      if (exports2.tokenIntercept[id]) {
        return exports2.tokenIntercept[id];
      }
      const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id);
      const ssoTokenText = await (0, promises_1.readFile)(ssoTokenFilepath, "utf8");
      return JSON.parse(ssoTokenText);
    };
    exports2.getSSOTokenFromFile = getSSOTokenFromFile;
  }
});

// ../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/readFile.js
var require_readFile = __commonJS({
  "../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/readFile.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.readFile = exports2.fileIntercept = exports2.filePromises = void 0;
    var promises_1 = require("node:fs/promises");
    exports2.filePromises = {};
    exports2.fileIntercept = {};
    var readFile = (path, options) => {
      if (exports2.fileIntercept[path] !== void 0) {
        return exports2.fileIntercept[path];
      }
      if (!exports2.filePromises[path] || options?.ignoreCache) {
        exports2.filePromises[path] = (0, promises_1.readFile)(path, "utf8");
      }
      return exports2.filePromises[path];
    };
    exports2.readFile = readFile;
  }
});

// ../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js
var require_dist_cjs29 = __commonJS({
  "../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js"(exports2) {
    "use strict";
    var getHomeDir = require_getHomeDir();
    var getSSOTokenFilepath = require_getSSOTokenFilepath();
    var getSSOTokenFromFile = require_getSSOTokenFromFile();
    var path = require("path");
    var types = require_dist_cjs();
    var readFile = require_readFile();
    var ENV_PROFILE = "AWS_PROFILE";
    var DEFAULT_PROFILE = "default";
    var getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE;
    var CONFIG_PREFIX_SEPARATOR = ".";
    var getConfigData = (data2) => Object.entries(data2).filter(([key]) => {
      const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
      if (indexOfSeparator === -1) {
        return false;
      }
      return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator));
    }).reduce((acc, [key, value]) => {
      const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
      const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;
      acc[updatedKey] = value;
      return acc;
    }, {
      ...data2.default && { default: data2.default }
    });
    var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
    var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config");
    var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
    var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials");
    var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
    var profileNameBlockList = ["__proto__", "profile __proto__"];
    var parseIni = (iniData) => {
      const map2 = {};
      let currentSection;
      let currentSubSection;
      for (const iniLine of iniData.split(/\r?\n/)) {
        const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim();
        const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]";
        if (isSection) {
          currentSection = void 0;
          currentSubSection = void 0;
          const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);
          const matches = prefixKeyRegex.exec(sectionName);
          if (matches) {
            const [, prefix, , name] = matches;
            if (Object.values(types.IniSectionType).includes(prefix)) {
              currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);
            }
          } else {
            currentSection = sectionName;
          }
          if (profileNameBlockList.includes(sectionName)) {
            throw new Error(`Found invalid profile name "${sectionName}"`);
          }
        } else if (currentSection) {
          const indexOfEqualsSign = trimmedLine.indexOf("=");
          if (![0, -1].includes(indexOfEqualsSign)) {
            const [name, value] = [
              trimmedLine.substring(0, indexOfEqualsSign).trim(),
              trimmedLine.substring(indexOfEqualsSign + 1).trim()
            ];
            if (value === "") {
              currentSubSection = name;
            } else {
              if (currentSubSection && iniLine.trimStart() === iniLine) {
                currentSubSection = void 0;
              }
              map2[currentSection] = map2[currentSection] || {};
              const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;
              map2[currentSection][key] = value;
            }
          }
        }
      }
      return map2;
    };
    var swallowError$1 = () => ({});
    var loadSharedConfigFiles = async (init = {}) => {
      const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;
      const homeDir = getHomeDir.getHomeDir();
      const relativeHomeDirPrefix = "~/";
      let resolvedFilepath = filepath;
      if (filepath.startsWith(relativeHomeDirPrefix)) {
        resolvedFilepath = path.join(homeDir, filepath.slice(2));
      }
      let resolvedConfigFilepath = configFilepath;
      if (configFilepath.startsWith(relativeHomeDirPrefix)) {
        resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2));
      }
      const parsedFiles = await Promise.all([
        readFile.readFile(resolvedConfigFilepath, {
          ignoreCache: init.ignoreCache
        }).then(parseIni).then(getConfigData).catch(swallowError$1),
        readFile.readFile(resolvedFilepath, {
          ignoreCache: init.ignoreCache
        }).then(parseIni).catch(swallowError$1)
      ]);
      return {
        configFile: parsedFiles[0],
        credentialsFile: parsedFiles[1]
      };
    };
    var getSsoSessionData = (data2) => Object.entries(data2).filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});
    var swallowError = () => ({});
    var loadSsoSessionData = async (init = {}) => readFile.readFile(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError);
    var mergeConfigFiles = (...files) => {
      const merged = {};
      for (const file of files) {
        for (const [key, values] of Object.entries(file)) {
          if (merged[key] !== void 0) {
            Object.assign(merged[key], values);
          } else {
            merged[key] = values;
          }
        }
      }
      return merged;
    };
    var parseKnownFiles = async (init) => {
      const parsedFiles = await loadSharedConfigFiles(init);
      return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);
    };
    var externalDataInterceptor = {
      getFileRecord() {
        return readFile.fileIntercept;
      },
      interceptFile(path2, contents) {
        readFile.fileIntercept[path2] = Promise.resolve(contents);
      },
      getTokenRecord() {
        return getSSOTokenFromFile.tokenIntercept;
      },
      interceptToken(id, contents) {
        getSSOTokenFromFile.tokenIntercept[id] = contents;
      }
    };
    exports2.getSSOTokenFromFile = getSSOTokenFromFile.getSSOTokenFromFile;
    exports2.readFile = readFile.readFile;
    exports2.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR;
    exports2.DEFAULT_PROFILE = DEFAULT_PROFILE;
    exports2.ENV_PROFILE = ENV_PROFILE;
    exports2.externalDataInterceptor = externalDataInterceptor;
    exports2.getProfileName = getProfileName;
    exports2.loadSharedConfigFiles = loadSharedConfigFiles;
    exports2.loadSsoSessionData = loadSsoSessionData;
    exports2.parseKnownFiles = parseKnownFiles;
    Object.prototype.hasOwnProperty.call(getHomeDir, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: getHomeDir["__proto__"]
    });
    Object.keys(getHomeDir).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = getHomeDir[k5];
    });
    Object.prototype.hasOwnProperty.call(getSSOTokenFilepath, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: getSSOTokenFilepath["__proto__"]
    });
    Object.keys(getSSOTokenFilepath).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = getSSOTokenFilepath[k5];
    });
  }
});

// ../../node_modules/@smithy/node-config-provider/dist-cjs/index.js
var require_dist_cjs30 = __commonJS({
  "../../node_modules/@smithy/node-config-provider/dist-cjs/index.js"(exports2) {
    "use strict";
    var propertyProvider = require_dist_cjs28();
    var sharedIniFileLoader = require_dist_cjs29();
    function getSelectorName(functionString) {
      try {
        const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));
        constants.delete("CONFIG");
        constants.delete("CONFIG_PREFIX_SEPARATOR");
        constants.delete("ENV");
        return [...constants].join(", ");
      } catch (e5) {
        return functionString;
      }
    }
    var fromEnv = (envVarSelector, options) => async () => {
      try {
        const config = envVarSelector(process.env, options);
        if (config === void 0) {
          throw new Error();
        }
        return config;
      } catch (e5) {
        throw new propertyProvider.CredentialsProviderError(e5.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger });
      }
    };
    var fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => {
      const profile = sharedIniFileLoader.getProfileName(init);
      const { configFile, credentialsFile } = await sharedIniFileLoader.loadSharedConfigFiles(init);
      const profileFromCredentials = credentialsFile[profile] || {};
      const profileFromConfig = configFile[profile] || {};
      const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials };
      try {
        const cfgFile = preferredFile === "config" ? configFile : credentialsFile;
        const configValue = configSelector(mergedProfile, cfgFile);
        if (configValue === void 0) {
          throw new Error();
        }
        return configValue;
      } catch (e5) {
        throw new propertyProvider.CredentialsProviderError(e5.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger });
      }
    };
    var isFunction = (func) => typeof func === "function";
    var fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : propertyProvider.fromStatic(defaultValue);
    var loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => {
      const { signingName, logger: logger2 } = configuration;
      const envOptions = { signingName, logger: logger2 };
      return propertyProvider.memoize(propertyProvider.chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue)));
    };
    exports2.loadConfig = loadConfig;
  }
});

// ../../node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js
var require_getEndpointUrlConfig = __commonJS({
  "../../node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.getEndpointUrlConfig = void 0;
    var shared_ini_file_loader_1 = require_dist_cjs29();
    var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL";
    var CONFIG_ENDPOINT_URL = "endpoint_url";
    var getEndpointUrlConfig = (serviceId) => ({
      environmentVariableSelector: (env2) => {
        const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase());
        const serviceEndpointUrl = env2[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")];
        if (serviceEndpointUrl)
          return serviceEndpointUrl;
        const endpointUrl = env2[ENV_ENDPOINT_URL];
        if (endpointUrl)
          return endpointUrl;
        return void 0;
      },
      configFileSelector: (profile, config) => {
        if (config && profile.services) {
          const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];
          if (servicesSection) {
            const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase());
            const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];
            if (endpointUrl2)
              return endpointUrl2;
          }
        }
        const endpointUrl = profile[CONFIG_ENDPOINT_URL];
        if (endpointUrl)
          return endpointUrl;
        return void 0;
      },
      default: void 0
    });
    exports2.getEndpointUrlConfig = getEndpointUrlConfig;
  }
});

// ../../node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js
var require_getEndpointFromConfig = __commonJS({
  "../../node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.getEndpointFromConfig = void 0;
    var node_config_provider_1 = require_dist_cjs30();
    var getEndpointUrlConfig_1 = require_getEndpointUrlConfig();
    var getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId ?? ""))();
    exports2.getEndpointFromConfig = getEndpointFromConfig;
  }
});

// ../../node_modules/@smithy/middleware-serde/dist-cjs/index.js
var require_dist_cjs31 = __commonJS({
  "../../node_modules/@smithy/middleware-serde/dist-cjs/index.js"(exports2) {
    "use strict";
    var protocolHttp = require_dist_cjs2();
    var endpoints = (init_endpoints(), __toCommonJS(endpoints_exports));
    var deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => {
      const { response } = await next(args);
      try {
        const parsed = await deserializer(response, options);
        return {
          response,
          output: parsed
        };
      } catch (error3) {
        Object.defineProperty(error3, "$response", {
          value: response,
          enumerable: false,
          writable: false,
          configurable: false
        });
        if (!("$metadata" in error3)) {
          const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
          try {
            error3.message += "\n  " + hint;
          } catch (e5) {
            if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
              console.warn(hint);
            } else {
              context.logger?.warn?.(hint);
            }
          }
          if (typeof error3.$responseBodyText !== "undefined") {
            if (error3.$response) {
              error3.$response.body = error3.$responseBodyText;
            }
          }
          try {
            if (protocolHttp.HttpResponse.isInstance(response)) {
              const { headers = {} } = response;
              const headerEntries = Object.entries(headers);
              error3.$metadata = {
                httpStatusCode: response.statusCode,
                requestId: findHeader2(/^x-[\w-]+-request-?id$/, headerEntries),
                extendedRequestId: findHeader2(/^x-[\w-]+-id-2$/, headerEntries),
                cfId: findHeader2(/^x-[\w-]+-cf-id$/, headerEntries)
              };
            }
          } catch (e5) {
          }
        }
        throw error3;
      }
    };
    var findHeader2 = (pattern, headers) => {
      return (headers.find(([k5]) => {
        return k5.match(pattern);
      }) || [void 0, void 0])[1];
    };
    var serializerMiddleware = (options, serializer) => (next, context) => async (args) => {
      const endpointConfig = options;
      const endpoint = context.endpointV2 ? async () => endpoints.toEndpointV1(context.endpointV2) : endpointConfig.endpoint;
      if (!endpoint) {
        throw new Error("No valid endpoint provider available.");
      }
      const request = await serializer(args.input, { ...options, endpoint });
      return next({
        ...args,
        request
      });
    };
    var deserializerMiddlewareOption2 = {
      name: "deserializerMiddleware",
      step: "deserialize",
      tags: ["DESERIALIZER"],
      override: true
    };
    var serializerMiddlewareOption2 = {
      name: "serializerMiddleware",
      step: "serialize",
      tags: ["SERIALIZER"],
      override: true
    };
    function getSerdePlugin(config, serializer, deserializer) {
      return {
        applyToStack: (commandStack) => {
          commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption2);
          commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption2);
        }
      };
    }
    exports2.deserializerMiddleware = deserializerMiddleware;
    exports2.deserializerMiddlewareOption = deserializerMiddlewareOption2;
    exports2.getSerdePlugin = getSerdePlugin;
    exports2.serializerMiddleware = serializerMiddleware;
    exports2.serializerMiddlewareOption = serializerMiddlewareOption2;
  }
});

// ../../node_modules/@smithy/middleware-endpoint/dist-cjs/index.js
var require_dist_cjs32 = __commonJS({
  "../../node_modules/@smithy/middleware-endpoint/dist-cjs/index.js"(exports2) {
    "use strict";
    var core = (init_dist_es(), __toCommonJS(dist_es_exports));
    var utilMiddleware = require_dist_cjs6();
    var getEndpointFromConfig = require_getEndpointFromConfig();
    var urlParser = require_dist_cjs18();
    var middlewareSerde = require_dist_cjs31();
    var resolveParamsForS3 = async (endpointParams) => {
      const bucket = endpointParams?.Bucket || "";
      if (typeof endpointParams.Bucket === "string") {
        endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?"));
      }
      if (isArnBucketName(bucket)) {
        if (endpointParams.ForcePathStyle === true) {
          throw new Error("Path-style addressing cannot be used with ARN buckets");
        }
      } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) {
        endpointParams.ForcePathStyle = true;
      }
      if (endpointParams.DisableMultiRegionAccessPoints) {
        endpointParams.disableMultiRegionAccessPoints = true;
        endpointParams.DisableMRAP = true;
      }
      return endpointParams;
    };
    var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;
    var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
    var DOTS_PATTERN = /\.\./;
    var isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName);
    var isArnBucketName = (bucketName) => {
      const [arn, partition, service, , , bucket] = bucketName.split(":");
      const isArn = arn === "arn" && bucketName.split(":").length >= 6;
      const isValidArn = Boolean(isArn && partition && service && bucket);
      if (isArn && !isValidArn) {
        throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);
      }
      return isValidArn;
    };
    var createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {
      const configProvider = async () => {
        let configValue;
        if (isClientContextParam) {
          const clientContextParams = config.clientContextParams;
          const nestedValue = clientContextParams?.[configKey];
          configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];
        } else {
          configValue = config[configKey] ?? config[canonicalEndpointParamKey];
        }
        if (typeof configValue === "function") {
          return configValue();
        }
        return configValue;
      };
      if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") {
        return async () => {
          const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
          const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;
          return configValue;
        };
      }
      if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") {
        return async () => {
          const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
          const configValue = credentials?.accountId ?? credentials?.AccountId;
          return configValue;
        };
      }
      if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") {
        return async () => {
          if (config.isCustomEndpoint === false) {
            return void 0;
          }
          const endpoint = await configProvider();
          if (endpoint && typeof endpoint === "object") {
            if ("url" in endpoint) {
              return endpoint.url.href;
            }
            if ("hostname" in endpoint) {
              const { protocol, hostname, port, path } = endpoint;
              return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`;
            }
          }
          return endpoint;
        };
      }
      return configProvider;
    };
    var toEndpointV12 = (endpoint) => {
      if (typeof endpoint === "object") {
        if ("url" in endpoint) {
          const v1Endpoint = urlParser.parseUrl(endpoint.url);
          if (endpoint.headers) {
            v1Endpoint.headers = {};
            for (const [name, values] of Object.entries(endpoint.headers)) {
              v1Endpoint.headers[name.toLowerCase()] = values.join(", ");
            }
          }
          return v1Endpoint;
        }
        return endpoint;
      }
      return urlParser.parseUrl(endpoint);
    };
    var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => {
      if (!clientConfig.isCustomEndpoint) {
        let endpointFromConfig;
        if (clientConfig.serviceConfiguredEndpoint) {
          endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();
        } else {
          endpointFromConfig = await getEndpointFromConfig.getEndpointFromConfig(clientConfig.serviceId);
        }
        if (endpointFromConfig) {
          clientConfig.endpoint = () => Promise.resolve(toEndpointV12(endpointFromConfig));
          clientConfig.isCustomEndpoint = true;
        }
      }
      const endpointParams = await resolveParams2(commandInput, instructionsSupplier, clientConfig);
      if (typeof clientConfig.endpointProvider !== "function") {
        throw new Error("config.endpointProvider is not set.");
      }
      const endpoint = clientConfig.endpointProvider(endpointParams, context);
      if (clientConfig.isCustomEndpoint && clientConfig.endpoint) {
        const customEndpoint = await clientConfig.endpoint();
        if (customEndpoint?.headers) {
          endpoint.headers ??= {};
          for (const [name, value] of Object.entries(customEndpoint.headers)) {
            endpoint.headers[name] = Array.isArray(value) ? value : [value];
          }
        }
      }
      return endpoint;
    };
    var resolveParams2 = async (commandInput, instructionsSupplier, clientConfig) => {
      const endpointParams = {};
      const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};
      for (const [name, instruction] of Object.entries(instructions)) {
        switch (instruction.type) {
          case "staticContextParams":
            endpointParams[name] = instruction.value;
            break;
          case "contextParams":
            endpointParams[name] = commandInput[instruction.name];
            break;
          case "clientContextParams":
          case "builtInParams":
            endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")();
            break;
          case "operationContextParams":
            endpointParams[name] = instruction.get(commandInput);
            break;
          default:
            throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction));
        }
      }
      if (Object.keys(instructions).length === 0) {
        Object.assign(endpointParams, clientConfig);
      }
      if (String(clientConfig.serviceId).toLowerCase() === "s3") {
        await resolveParamsForS3(endpointParams);
      }
      return endpointParams;
    };
    var endpointMiddleware = ({ config, instructions }) => {
      return (next, context) => async (args) => {
        if (config.isCustomEndpoint) {
          core.setFeature(context, "ENDPOINT_OVERRIDE", "N");
        }
        const endpoint = await getEndpointFromInstructions(args.input, {
          getEndpointParameterInstructions() {
            return instructions;
          }
        }, { ...config }, context);
        context.endpointV2 = endpoint;
        context.authSchemes = endpoint.properties?.authSchemes;
        const authScheme = context.authSchemes?.[0];
        if (authScheme) {
          context["signing_region"] = authScheme.signingRegion;
          context["signing_service"] = authScheme.signingName;
          const smithyContext = utilMiddleware.getSmithyContext(context);
          const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;
          if (httpAuthOption) {
            httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
              signing_region: authScheme.signingRegion,
              signingRegion: authScheme.signingRegion,
              signing_service: authScheme.signingName,
              signingName: authScheme.signingName,
              signingRegionSet: authScheme.signingRegionSet
            }, authScheme.properties);
          }
        }
        return next({
          ...args
        });
      };
    };
    var endpointMiddlewareOptions = {
      step: "serialize",
      tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"],
      name: "endpointV2Middleware",
      override: true,
      relation: "before",
      toMiddleware: middlewareSerde.serializerMiddlewareOption.name
    };
    var getEndpointPlugin6 = (config, instructions) => ({
      applyToStack: (clientStack) => {
        clientStack.addRelativeTo(endpointMiddleware({
          config,
          instructions
        }), endpointMiddlewareOptions);
      }
    });
    var resolveEndpointConfig5 = (input) => {
      const tls = input.tls ?? true;
      const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;
      const customEndpointProvider = endpoint != null ? async () => toEndpointV12(await utilMiddleware.normalizeProvider(endpoint)()) : void 0;
      const isCustomEndpoint = !!endpoint;
      const resolvedConfig = Object.assign(input, {
        endpoint: customEndpointProvider,
        tls,
        isCustomEndpoint,
        useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false),
        useFipsEndpoint: utilMiddleware.normalizeProvider(useFipsEndpoint ?? false)
      });
      let configuredEndpointPromise = void 0;
      resolvedConfig.serviceConfiguredEndpoint = async () => {
        if (input.serviceId && !configuredEndpointPromise) {
          configuredEndpointPromise = getEndpointFromConfig.getEndpointFromConfig(input.serviceId);
        }
        return configuredEndpointPromise;
      };
      return resolvedConfig;
    };
    var resolveEndpointRequiredConfig = (input) => {
      const { endpoint } = input;
      if (endpoint === void 0) {
        input.endpoint = async () => {
          throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.");
        };
      }
      return input;
    };
    exports2.endpointMiddleware = endpointMiddleware;
    exports2.endpointMiddlewareOptions = endpointMiddlewareOptions;
    exports2.getEndpointFromInstructions = getEndpointFromInstructions;
    exports2.getEndpointPlugin = getEndpointPlugin6;
    exports2.resolveEndpointConfig = resolveEndpointConfig5;
    exports2.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig;
    exports2.resolveParams = resolveParams2;
    exports2.toEndpointV1 = toEndpointV12;
  }
});

// ../../node_modules/@smithy/middleware-stack/dist-cjs/index.js
var require_dist_cjs33 = __commonJS({
  "../../node_modules/@smithy/middleware-stack/dist-cjs/index.js"(exports2) {
    "use strict";
    var getAllAliases = (name, aliases) => {
      const _aliases = [];
      if (name) {
        _aliases.push(name);
      }
      if (aliases) {
        for (const alias of aliases) {
          _aliases.push(alias);
        }
      }
      return _aliases;
    };
    var getMiddlewareNameWithAliases = (name, aliases) => {
      return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`;
    };
    var constructStack = () => {
      let absoluteEntries = [];
      let relativeEntries = [];
      let identifyOnResolve = false;
      const entriesNameSet = /* @__PURE__ */ new Set();
      const sort = (entries) => entries.sort((a5, b5) => stepWeights[b5.step] - stepWeights[a5.step] || priorityWeights[b5.priority || "normal"] - priorityWeights[a5.priority || "normal"]);
      const removeByName = (toRemove) => {
        let isRemoved = false;
        const filterCb = (entry) => {
          const aliases = getAllAliases(entry.name, entry.aliases);
          if (aliases.includes(toRemove)) {
            isRemoved = true;
            for (const alias of aliases) {
              entriesNameSet.delete(alias);
            }
            return false;
          }
          return true;
        };
        absoluteEntries = absoluteEntries.filter(filterCb);
        relativeEntries = relativeEntries.filter(filterCb);
        return isRemoved;
      };
      const removeByReference = (toRemove) => {
        let isRemoved = false;
        const filterCb = (entry) => {
          if (entry.middleware === toRemove) {
            isRemoved = true;
            for (const alias of getAllAliases(entry.name, entry.aliases)) {
              entriesNameSet.delete(alias);
            }
            return false;
          }
          return true;
        };
        absoluteEntries = absoluteEntries.filter(filterCb);
        relativeEntries = relativeEntries.filter(filterCb);
        return isRemoved;
      };
      const cloneTo = (toStack) => {
        absoluteEntries.forEach((entry) => {
          toStack.add(entry.middleware, { ...entry });
        });
        relativeEntries.forEach((entry) => {
          toStack.addRelativeTo(entry.middleware, { ...entry });
        });
        toStack.identifyOnResolve?.(stack.identifyOnResolve());
        return toStack;
      };
      const expandRelativeMiddlewareList = (from) => {
        const expandedMiddlewareList = [];
        from.before.forEach((entry) => {
          if (entry.before.length === 0 && entry.after.length === 0) {
            expandedMiddlewareList.push(entry);
          } else {
            expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
          }
        });
        expandedMiddlewareList.push(from);
        from.after.reverse().forEach((entry) => {
          if (entry.before.length === 0 && entry.after.length === 0) {
            expandedMiddlewareList.push(entry);
          } else {
            expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
          }
        });
        return expandedMiddlewareList;
      };
      const getMiddlewareList = (debug = false) => {
        const normalizedAbsoluteEntries = [];
        const normalizedRelativeEntries = [];
        const normalizedEntriesNameMap = {};
        absoluteEntries.forEach((entry) => {
          const normalizedEntry = {
            ...entry,
            before: [],
            after: []
          };
          for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
            normalizedEntriesNameMap[alias] = normalizedEntry;
          }
          normalizedAbsoluteEntries.push(normalizedEntry);
        });
        relativeEntries.forEach((entry) => {
          const normalizedEntry = {
            ...entry,
            before: [],
            after: []
          };
          for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
            normalizedEntriesNameMap[alias] = normalizedEntry;
          }
          normalizedRelativeEntries.push(normalizedEntry);
        });
        normalizedRelativeEntries.forEach((entry) => {
          if (entry.toMiddleware) {
            const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];
            if (toMiddleware === void 0) {
              if (debug) {
                return;
              }
              throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`);
            }
            if (entry.relation === "after") {
              toMiddleware.after.push(entry);
            }
            if (entry.relation === "before") {
              toMiddleware.before.push(entry);
            }
          }
        });
        const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => {
          wholeList.push(...expandedMiddlewareList);
          return wholeList;
        }, []);
        return mainChain;
      };
      const stack = {
        add: (middleware, options = {}) => {
          const { name, override, aliases: _aliases } = options;
          const entry = {
            step: "initialize",
            priority: "normal",
            middleware,
            ...options
          };
          const aliases = getAllAliases(name, _aliases);
          if (aliases.length > 0) {
            if (aliases.some((alias) => entriesNameSet.has(alias))) {
              if (!override)
                throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
              for (const alias of aliases) {
                const toOverrideIndex = absoluteEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a5) => a5 === alias));
                if (toOverrideIndex === -1) {
                  continue;
                }
                const toOverride = absoluteEntries[toOverrideIndex];
                if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {
                  throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.`);
                }
                absoluteEntries.splice(toOverrideIndex, 1);
              }
            }
            for (const alias of aliases) {
              entriesNameSet.add(alias);
            }
          }
          absoluteEntries.push(entry);
        },
        addRelativeTo: (middleware, options) => {
          const { name, override, aliases: _aliases } = options;
          const entry = {
            middleware,
            ...options
          };
          const aliases = getAllAliases(name, _aliases);
          if (aliases.length > 0) {
            if (aliases.some((alias) => entriesNameSet.has(alias))) {
              if (!override)
                throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
              for (const alias of aliases) {
                const toOverrideIndex = relativeEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a5) => a5 === alias));
                if (toOverrideIndex === -1) {
                  continue;
                }
                const toOverride = relativeEntries[toOverrideIndex];
                if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {
                  throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.`);
                }
                relativeEntries.splice(toOverrideIndex, 1);
              }
            }
            for (const alias of aliases) {
              entriesNameSet.add(alias);
            }
          }
          relativeEntries.push(entry);
        },
        clone: () => cloneTo(constructStack()),
        use: (plugin) => {
          plugin.applyToStack(stack);
        },
        remove: (toRemove) => {
          if (typeof toRemove === "string")
            return removeByName(toRemove);
          else
            return removeByReference(toRemove);
        },
        removeByTag: (toRemove) => {
          let isRemoved = false;
          const filterCb = (entry) => {
            const { tags, name, aliases: _aliases } = entry;
            if (tags && tags.includes(toRemove)) {
              const aliases = getAllAliases(name, _aliases);
              for (const alias of aliases) {
                entriesNameSet.delete(alias);
              }
              isRemoved = true;
              return false;
            }
            return true;
          };
          absoluteEntries = absoluteEntries.filter(filterCb);
          relativeEntries = relativeEntries.filter(filterCb);
          return isRemoved;
        },
        concat: (from) => {
          const cloned = cloneTo(constructStack());
          cloned.use(from);
          cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false));
          return cloned;
        },
        applyToStack: cloneTo,
        identify: () => {
          return getMiddlewareList(true).map((mw) => {
            const step = mw.step ?? mw.relation + " " + mw.toMiddleware;
            return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step;
          });
        },
        identifyOnResolve(toggle) {
          if (typeof toggle === "boolean")
            identifyOnResolve = toggle;
          return identifyOnResolve;
        },
        resolve: (handler2, context) => {
          for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {
            handler2 = middleware(handler2, context);
          }
          if (identifyOnResolve) {
            console.log(stack.identify());
          }
          return handler2;
        }
      };
      return stack;
    };
    var stepWeights = {
      initialize: 5,
      serialize: 4,
      build: 3,
      finalizeRequest: 2,
      deserialize: 1
    };
    var priorityWeights = {
      high: 3,
      normal: 2,
      low: 1
    };
    exports2.constructStack = constructStack;
  }
});

// ../../node_modules/@smithy/smithy-client/dist-cjs/index.js
var require_dist_cjs34 = __commonJS({
  "../../node_modules/@smithy/smithy-client/dist-cjs/index.js"(exports2) {
    "use strict";
    var middlewareStack = require_dist_cjs33();
    var types = require_dist_cjs();
    var schema = (init_schema(), __toCommonJS(schema_exports));
    var serde = (init_serde(), __toCommonJS(serde_exports));
    var protocols = (init_protocols(), __toCommonJS(protocols_exports));
    var Client = class {
      config;
      middlewareStack = middlewareStack.constructStack();
      initConfig;
      handlers;
      constructor(config) {
        this.config = config;
        const { protocol, protocolSettings } = config;
        if (protocolSettings) {
          if (typeof protocol === "function") {
            config.protocol = new protocol(protocolSettings);
          }
        }
      }
      send(command, optionsOrCb, cb) {
        const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0;
        const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb;
        const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true;
        let handler2;
        if (useHandlerCache) {
          if (!this.handlers) {
            this.handlers = /* @__PURE__ */ new WeakMap();
          }
          const handlers = this.handlers;
          if (handlers.has(command.constructor)) {
            handler2 = handlers.get(command.constructor);
          } else {
            handler2 = command.resolveMiddleware(this.middlewareStack, this.config, options);
            handlers.set(command.constructor, handler2);
          }
        } else {
          delete this.handlers;
          handler2 = command.resolveMiddleware(this.middlewareStack, this.config, options);
        }
        if (callback) {
          handler2(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => {
          });
        } else {
          return handler2(command).then((result) => result.output);
        }
      }
      destroy() {
        this.config?.requestHandler?.destroy?.();
        delete this.handlers;
      }
    };
    var SENSITIVE_STRING$1 = "***SensitiveInformation***";
    function schemaLogFilter(schema$1, data2) {
      if (data2 == null) {
        return data2;
      }
      const ns = schema.NormalizedSchema.of(schema$1);
      if (ns.getMergedTraits().sensitive) {
        return SENSITIVE_STRING$1;
      }
      if (ns.isListSchema()) {
        const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive;
        if (isSensitive) {
          return SENSITIVE_STRING$1;
        }
      } else if (ns.isMapSchema()) {
        const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive;
        if (isSensitive) {
          return SENSITIVE_STRING$1;
        }
      } else if (ns.isStructSchema() && typeof data2 === "object") {
        const object = data2;
        const newObject = {};
        for (const [member2, memberNs] of ns.structIterator()) {
          if (object[member2] != null) {
            newObject[member2] = schemaLogFilter(memberNs, object[member2]);
          }
        }
        return newObject;
      }
      return data2;
    }
    var Command = class {
      middlewareStack = middlewareStack.constructStack();
      schema;
      static classBuilder() {
        return new ClassBuilder();
      }
      resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) {
        for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {
          this.middlewareStack.use(mw);
        }
        const stack = clientStack.concat(this.middlewareStack);
        const { logger: logger2 } = configuration;
        const handlerExecutionContext = {
          logger: logger2,
          clientName,
          commandName,
          inputFilterSensitiveLog,
          outputFilterSensitiveLog,
          [types.SMITHY_CONTEXT_KEY]: {
            commandInstance: this,
            ...smithyContext
          },
          ...additionalContext
        };
        const { requestHandler } = configuration;
        let requestOptions = options ?? {};
        if (smithyContext.eventStream) {
          requestOptions = {
            isEventStream: true,
            ...requestOptions
          };
        }
        return stack.resolve((request) => requestHandler.handle(request.request, requestOptions), handlerExecutionContext);
      }
    };
    var ClassBuilder = class {
      _init = () => {
      };
      _ep = {};
      _middlewareFn = () => [];
      _commandName = "";
      _clientName = "";
      _additionalContext = {};
      _smithyContext = {};
      _inputFilterSensitiveLog = void 0;
      _outputFilterSensitiveLog = void 0;
      _serializer = null;
      _deserializer = null;
      _operationSchema;
      init(cb) {
        this._init = cb;
      }
      ep(endpointParameterInstructions) {
        this._ep = endpointParameterInstructions;
        return this;
      }
      m(middlewareSupplier) {
        this._middlewareFn = middlewareSupplier;
        return this;
      }
      s(service, operation2, smithyContext = {}) {
        this._smithyContext = {
          service,
          operation: operation2,
          ...smithyContext
        };
        return this;
      }
      c(additionalContext = {}) {
        this._additionalContext = additionalContext;
        return this;
      }
      n(clientName, commandName) {
        this._clientName = clientName;
        this._commandName = commandName;
        return this;
      }
      f(inputFilter = (_) => _, outputFilter = (_) => _) {
        this._inputFilterSensitiveLog = inputFilter;
        this._outputFilterSensitiveLog = outputFilter;
        return this;
      }
      ser(serializer) {
        this._serializer = serializer;
        return this;
      }
      de(deserializer) {
        this._deserializer = deserializer;
        return this;
      }
      sc(operation2) {
        this._operationSchema = operation2;
        this._smithyContext.operationSchema = operation2;
        return this;
      }
      build() {
        const closure = this;
        let CommandRef;
        return CommandRef = class extends Command {
          input;
          static getEndpointParameterInstructions() {
            return closure._ep;
          }
          constructor(...[input]) {
            super();
            this.input = input ?? {};
            closure._init(this);
            this.schema = closure._operationSchema;
          }
          resolveMiddleware(stack, configuration, options) {
            const op2 = closure._operationSchema;
            const input = op2?.[4] ?? op2?.input;
            const output = op2?.[5] ?? op2?.output;
            return this.resolveMiddlewareWithContext(stack, configuration, options, {
              CommandCtor: CommandRef,
              middlewareFn: closure._middlewareFn,
              clientName: closure._clientName,
              commandName: closure._commandName,
              inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, input) : (_) => _),
              outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, output) : (_) => _),
              smithyContext: closure._smithyContext,
              additionalContext: closure._additionalContext
            });
          }
          serialize = closure._serializer;
          deserialize = closure._deserializer;
        };
      }
    };
    var SENSITIVE_STRING = "***SensitiveInformation***";
    var createAggregatedClient5 = (commands5, Client2, options) => {
      for (const [command, CommandCtor] of Object.entries(commands5)) {
        const methodImpl = async function(args, optionsOrCb, cb) {
          const command2 = new CommandCtor(args);
          if (typeof optionsOrCb === "function") {
            this.send(command2, optionsOrCb);
          } else if (typeof cb === "function") {
            if (typeof optionsOrCb !== "object")
              throw new Error(`Expected http options but got ${typeof optionsOrCb}`);
            this.send(command2, optionsOrCb || {}, cb);
          } else {
            return this.send(command2, optionsOrCb);
          }
        };
        const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, "");
        Client2.prototype[methodName] = methodImpl;
      }
      const { paginators = {}, waiters = {} } = options ?? {};
      for (const [paginatorName, paginatorFn] of Object.entries(paginators)) {
        if (Client2.prototype[paginatorName] === void 0) {
          Client2.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) {
            return paginatorFn({
              ...paginationConfiguration,
              client: this
            }, commandInput, ...rest);
          };
        }
      }
      for (const [waiterName, waiterFn] of Object.entries(waiters)) {
        if (Client2.prototype[waiterName] === void 0) {
          Client2.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) {
            let config = waiterConfiguration;
            if (typeof waiterConfiguration === "number") {
              config = {
                maxWaitTime: waiterConfiguration
              };
            }
            return waiterFn({
              ...config,
              client: this
            }, commandInput, ...rest);
          };
        }
      }
    };
    var ServiceException = class _ServiceException extends Error {
      $fault;
      $response;
      $retryable;
      $metadata;
      constructor(options) {
        super(options.message);
        Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);
        this.name = options.name;
        this.$fault = options.$fault;
        this.$metadata = options.$metadata;
      }
      static isInstance(value) {
        if (!value)
          return false;
        const candidate = value;
        return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server");
      }
      static [Symbol.hasInstance](instance) {
        if (!instance)
          return false;
        const candidate = instance;
        if (this === _ServiceException) {
          return _ServiceException.isInstance(instance);
        }
        if (_ServiceException.isInstance(instance)) {
          if (candidate.name && this.name) {
            return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;
          }
          return this.prototype.isPrototypeOf(instance);
        }
        return false;
      }
    };
    var decorateServiceException2 = (exception, additions = {}) => {
      Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k5, v]) => {
        if (exception[k5] == void 0 || exception[k5] === "") {
          exception[k5] = v;
        }
      });
      const message = exception.message || exception.Message || "UnknownError";
      exception.message = message;
      delete exception.Message;
      return exception;
    };
    var throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => {
      const $metadata = deserializeMetadata(output);
      const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
      const response = new exceptionCtor({
        name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError",
        $fault: "client",
        $metadata
      });
      throw decorateServiceException2(response, parsedBody);
    };
    var withBaseException = (ExceptionCtor) => {
      return ({ output, parsedBody, errorCode }) => {
        throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });
      };
    };
    var deserializeMetadata = (output) => ({
      httpStatusCode: output.statusCode,
      requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
      extendedRequestId: output.headers["x-amz-id-2"],
      cfId: output.headers["x-amz-cf-id"]
    });
    var loadConfigsForDefaultMode5 = (mode) => {
      switch (mode) {
        case "standard":
          return {
            retryMode: "standard",
            connectionTimeout: 3100
          };
        case "in-region":
          return {
            retryMode: "standard",
            connectionTimeout: 1100
          };
        case "cross-region":
          return {
            retryMode: "standard",
            connectionTimeout: 3100
          };
        case "mobile":
          return {
            retryMode: "standard",
            connectionTimeout: 3e4
          };
        default:
          return {};
      }
    };
    var warningEmitted = false;
    var emitWarningIfUnsupportedVersion6 = (version) => {
      if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) {
        warningEmitted = true;
      }
    };
    var knownAlgorithms = Object.values(types.AlgorithmId);
    var getChecksumConfiguration = (runtimeConfig) => {
      const checksumAlgorithms = [];
      for (const id in types.AlgorithmId) {
        const algorithmId = types.AlgorithmId[id];
        if (runtimeConfig[algorithmId] === void 0) {
          continue;
        }
        checksumAlgorithms.push({
          algorithmId: () => algorithmId,
          checksumConstructor: () => runtimeConfig[algorithmId]
        });
      }
      for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) {
        checksumAlgorithms.push({
          algorithmId: () => id,
          checksumConstructor: () => ChecksumCtor
        });
      }
      return {
        addChecksumAlgorithm(algo) {
          runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {};
          const id = algo.algorithmId();
          const ctor = algo.checksumConstructor();
          if (knownAlgorithms.includes(id)) {
            runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor;
          } else {
            runtimeConfig.checksumAlgorithms[id] = ctor;
          }
          checksumAlgorithms.push(algo);
        },
        checksumAlgorithms() {
          return checksumAlgorithms;
        }
      };
    };
    var resolveChecksumRuntimeConfig = (clientConfig) => {
      const runtimeConfig = {};
      clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
        const id = checksumAlgorithm.algorithmId();
        if (knownAlgorithms.includes(id)) {
          runtimeConfig[id] = checksumAlgorithm.checksumConstructor();
        }
      });
      return runtimeConfig;
    };
    var getRetryConfiguration = (runtimeConfig) => {
      return {
        setRetryStrategy(retryStrategy) {
          runtimeConfig.retryStrategy = retryStrategy;
        },
        retryStrategy() {
          return runtimeConfig.retryStrategy;
        }
      };
    };
    var resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {
      const runtimeConfig = {};
      runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();
      return runtimeConfig;
    };
    var getDefaultExtensionConfiguration5 = (runtimeConfig) => {
      return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));
    };
    var getDefaultClientConfiguration = getDefaultExtensionConfiguration5;
    var resolveDefaultRuntimeConfig5 = (config) => {
      return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));
    };
    var getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];
    var getValueFromTextNode3 = (obj) => {
      const textNodeName = "#text";
      for (const key in obj) {
        if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) {
          obj[key] = obj[key][textNodeName];
        } else if (typeof obj[key] === "object" && obj[key] !== null) {
          obj[key] = getValueFromTextNode3(obj[key]);
        }
      }
      return obj;
    };
    var isSerializableHeaderValue = (value) => {
      return value != null;
    };
    var NoOpLogger5 = class {
      trace() {
      }
      debug() {
      }
      info() {
      }
      warn() {
      }
      error() {
      }
    };
    function map2(arg0, arg1, arg2) {
      let target;
      let filter;
      let instructions;
      if (typeof arg1 === "undefined" && typeof arg2 === "undefined") {
        target = {};
        instructions = arg0;
      } else {
        target = arg0;
        if (typeof arg1 === "function") {
          filter = arg1;
          instructions = arg2;
          return mapWithFilter(target, filter, instructions);
        } else {
          instructions = arg1;
        }
      }
      for (const key of Object.keys(instructions)) {
        if (!Array.isArray(instructions[key])) {
          target[key] = instructions[key];
          continue;
        }
        applyInstruction(target, null, instructions, key);
      }
      return target;
    }
    var convertMap = (target) => {
      const output = {};
      for (const [k5, v] of Object.entries(target || {})) {
        output[k5] = [, v];
      }
      return output;
    };
    var take = (source, instructions) => {
      const out = {};
      for (const key in instructions) {
        applyInstruction(out, source, instructions, key);
      }
      return out;
    };
    var mapWithFilter = (target, filter, instructions) => {
      return map2(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {
        if (Array.isArray(value)) {
          _instructions[key] = value;
        } else {
          if (typeof value === "function") {
            _instructions[key] = [filter, value()];
          } else {
            _instructions[key] = [filter, value];
          }
        }
        return _instructions;
      }, {}));
    };
    var applyInstruction = (target, source, instructions, targetKey) => {
      if (source !== null) {
        let instruction = instructions[targetKey];
        if (typeof instruction === "function") {
          instruction = [, instruction];
        }
        const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;
        if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) {
          target[targetKey] = valueFn(source[sourceKey]);
        }
        return;
      }
      let [filter, value] = instructions[targetKey];
      if (typeof value === "function") {
        let _value;
        const defaultFilterPassed = filter === void 0 && (_value = value()) != null;
        const customFilterPassed = typeof filter === "function" && !!filter(void 0) || typeof filter !== "function" && !!filter;
        if (defaultFilterPassed) {
          target[targetKey] = _value;
        } else if (customFilterPassed) {
          target[targetKey] = value();
        }
      } else {
        const defaultFilterPassed = filter === void 0 && value != null;
        const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter;
        if (defaultFilterPassed || customFilterPassed) {
          target[targetKey] = value;
        }
      }
    };
    var nonNullish = (_) => _ != null;
    var pass = (_) => _;
    var serializeFloat = (value) => {
      if (value !== value) {
        return "NaN";
      }
      switch (value) {
        case Infinity:
          return "Infinity";
        case -Infinity:
          return "-Infinity";
        default:
          return value;
      }
    };
    var serializeDateTime = (date2) => date2.toISOString().replace(".000Z", "Z");
    var _json = (obj) => {
      if (obj == null) {
        return {};
      }
      if (Array.isArray(obj)) {
        return obj.filter((_) => _ != null).map(_json);
      }
      if (typeof obj === "object") {
        const target = {};
        for (const key of Object.keys(obj)) {
          if (obj[key] == null) {
            continue;
          }
          target[key] = _json(obj[key]);
        }
        return target;
      }
      return obj;
    };
    exports2.collectBody = protocols.collectBody;
    exports2.extendedEncodeURIComponent = protocols.extendedEncodeURIComponent;
    exports2.resolvedPath = protocols.resolvedPath;
    exports2.Client = Client;
    exports2.Command = Command;
    exports2.NoOpLogger = NoOpLogger5;
    exports2.SENSITIVE_STRING = SENSITIVE_STRING;
    exports2.ServiceException = ServiceException;
    exports2._json = _json;
    exports2.convertMap = convertMap;
    exports2.createAggregatedClient = createAggregatedClient5;
    exports2.decorateServiceException = decorateServiceException2;
    exports2.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion6;
    exports2.getArrayIfSingleItem = getArrayIfSingleItem;
    exports2.getDefaultClientConfiguration = getDefaultClientConfiguration;
    exports2.getDefaultExtensionConfiguration = getDefaultExtensionConfiguration5;
    exports2.getValueFromTextNode = getValueFromTextNode3;
    exports2.isSerializableHeaderValue = isSerializableHeaderValue;
    exports2.loadConfigsForDefaultMode = loadConfigsForDefaultMode5;
    exports2.map = map2;
    exports2.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig5;
    exports2.serializeDateTime = serializeDateTime;
    exports2.serializeFloat = serializeFloat;
    exports2.take = take;
    exports2.throwDefaultError = throwDefaultError;
    exports2.withBaseException = withBaseException;
    Object.prototype.hasOwnProperty.call(serde, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: serde["__proto__"]
    });
    Object.keys(serde).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = serde[k5];
    });
  }
});

// ../../node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js
var require_isStreamingPayload = __commonJS({
  "../../node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.isStreamingPayload = void 0;
    var stream_1 = require("stream");
    var isStreamingPayload = (request) => request?.body instanceof stream_1.Readable || typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream;
    exports2.isStreamingPayload = isStreamingPayload;
  }
});

// ../../node_modules/@smithy/middleware-retry/dist-cjs/index.js
var require_dist_cjs35 = __commonJS({
  "../../node_modules/@smithy/middleware-retry/dist-cjs/index.js"(exports2) {
    "use strict";
    var utilRetry = require_dist_cjs23();
    var protocolHttp = require_dist_cjs2();
    var serviceErrorClassification = require_dist_cjs22();
    var uuid = require_dist_cjs19();
    var utilMiddleware = require_dist_cjs6();
    var smithyClient = require_dist_cjs34();
    var isStreamingPayload = require_isStreamingPayload();
    var serde = (init_serde(), __toCommonJS(serde_exports));
    var asSdkError = (error3) => {
      if (error3 instanceof Error)
        return error3;
      if (error3 instanceof Object)
        return Object.assign(new Error(), error3);
      if (typeof error3 === "string")
        return new Error(error3);
      return new Error(`AWS SDK error wrapper for ${error3}`);
    };
    var getDefaultRetryQuota = (initialRetryTokens, options) => {
      const MAX_CAPACITY = initialRetryTokens;
      const noRetryIncrement = utilRetry.NO_RETRY_INCREMENT;
      const retryCost = utilRetry.RETRY_COST;
      const timeoutRetryCost = utilRetry.TIMEOUT_RETRY_COST;
      let availableCapacity = initialRetryTokens;
      const getCapacityAmount = (error3) => error3.name === "TimeoutError" ? timeoutRetryCost : retryCost;
      const hasRetryTokens = (error3) => getCapacityAmount(error3) <= availableCapacity;
      const retrieveRetryTokens = (error3) => {
        if (!hasRetryTokens(error3)) {
          throw new Error("No retry token available");
        }
        const capacityAmount = getCapacityAmount(error3);
        availableCapacity -= capacityAmount;
        return capacityAmount;
      };
      const releaseRetryTokens = (capacityReleaseAmount) => {
        availableCapacity += capacityReleaseAmount ?? noRetryIncrement;
        availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);
      };
      return Object.freeze({
        hasRetryTokens,
        retrieveRetryTokens,
        releaseRetryTokens
      });
    };
    var defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(utilRetry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));
    var defaultRetryDecider = (error3) => {
      if (!error3) {
        return false;
      }
      return serviceErrorClassification.isRetryableByTrait(error3) || serviceErrorClassification.isClockSkewError(error3) || serviceErrorClassification.isThrottlingError(error3) || serviceErrorClassification.isTransientError(error3);
    };
    var StandardRetryStrategy = class {
      maxAttemptsProvider;
      retryDecider;
      delayDecider;
      retryQuota;
      mode = utilRetry.RETRY_MODES.STANDARD;
      constructor(maxAttemptsProvider, options) {
        this.maxAttemptsProvider = maxAttemptsProvider;
        this.retryDecider = options?.retryDecider ?? defaultRetryDecider;
        this.delayDecider = options?.delayDecider ?? defaultDelayDecider;
        this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(utilRetry.INITIAL_RETRY_TOKENS);
      }
      shouldRetry(error3, attempts, maxAttempts) {
        return attempts < maxAttempts && this.retryDecider(error3) && this.retryQuota.hasRetryTokens(error3);
      }
      async getMaxAttempts() {
        let maxAttempts;
        try {
          maxAttempts = await this.maxAttemptsProvider();
        } catch (error3) {
          maxAttempts = utilRetry.DEFAULT_MAX_ATTEMPTS;
        }
        return maxAttempts;
      }
      async retry(next, args, options) {
        let retryTokenAmount;
        let attempts = 0;
        let totalDelay = 0;
        const maxAttempts = await this.getMaxAttempts();
        const { request } = args;
        if (protocolHttp.HttpRequest.isInstance(request)) {
          request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4();
        }
        while (true) {
          try {
            if (protocolHttp.HttpRequest.isInstance(request)) {
              request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
            }
            if (options?.beforeRequest) {
              await options.beforeRequest();
            }
            const { response, output } = await next(args);
            if (options?.afterRequest) {
              options.afterRequest(response);
            }
            this.retryQuota.releaseRetryTokens(retryTokenAmount);
            output.$metadata.attempts = attempts + 1;
            output.$metadata.totalRetryDelay = totalDelay;
            return { response, output };
          } catch (e5) {
            const err = asSdkError(e5);
            attempts++;
            if (this.shouldRetry(err, attempts, maxAttempts)) {
              retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);
              const delayFromDecider = this.delayDecider(serviceErrorClassification.isThrottlingError(err) ? utilRetry.THROTTLING_RETRY_DELAY_BASE : utilRetry.DEFAULT_RETRY_DELAY_BASE, attempts);
              const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
              const delay = Math.max(delayFromResponse || 0, delayFromDecider);
              totalDelay += delay;
              await new Promise((resolve) => setTimeout(resolve, delay));
              continue;
            }
            if (!err.$metadata) {
              err.$metadata = {};
            }
            err.$metadata.attempts = attempts;
            err.$metadata.totalRetryDelay = totalDelay;
            throw err;
          }
        }
      }
    };
    var getDelayFromRetryAfterHeader = (response) => {
      if (!protocolHttp.HttpResponse.isInstance(response))
        return;
      const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
      if (!retryAfterHeaderName)
        return;
      const retryAfter = response.headers[retryAfterHeaderName];
      const retryAfterSeconds = Number(retryAfter);
      if (!Number.isNaN(retryAfterSeconds))
        return retryAfterSeconds * 1e3;
      const retryAfterDate = new Date(retryAfter);
      return retryAfterDate.getTime() - Date.now();
    };
    var AdaptiveRetryStrategy = class extends StandardRetryStrategy {
      rateLimiter;
      constructor(maxAttemptsProvider, options) {
        const { rateLimiter, ...superOptions } = options ?? {};
        super(maxAttemptsProvider, superOptions);
        this.rateLimiter = rateLimiter ?? new utilRetry.DefaultRateLimiter();
        this.mode = utilRetry.RETRY_MODES.ADAPTIVE;
      }
      async retry(next, args) {
        return super.retry(next, args, {
          beforeRequest: async () => {
            return this.rateLimiter.getSendToken();
          },
          afterRequest: (response) => {
            this.rateLimiter.updateClientSendingRate(response);
          }
        });
      }
    };
    var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
    var CONFIG_MAX_ATTEMPTS = "max_attempts";
    var NODE_MAX_ATTEMPT_CONFIG_OPTIONS5 = {
      environmentVariableSelector: (env2) => {
        const value = env2[ENV_MAX_ATTEMPTS];
        if (!value)
          return void 0;
        const maxAttempt = parseInt(value);
        if (Number.isNaN(maxAttempt)) {
          throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`);
        }
        return maxAttempt;
      },
      configFileSelector: (profile) => {
        const value = profile[CONFIG_MAX_ATTEMPTS];
        if (!value)
          return void 0;
        const maxAttempt = parseInt(value);
        if (Number.isNaN(maxAttempt)) {
          throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`);
        }
        return maxAttempt;
      },
      default: utilRetry.DEFAULT_MAX_ATTEMPTS
    };
    var resolveRetryConfig5 = (input) => {
      const { retryStrategy, retryMode } = input;
      const maxAttempts = utilMiddleware.normalizeProvider(input.maxAttempts ?? utilRetry.DEFAULT_MAX_ATTEMPTS);
      let controller = retryStrategy ? Promise.resolve(retryStrategy) : void 0;
      const getDefault = async () => await utilMiddleware.normalizeProvider(retryMode)() === utilRetry.RETRY_MODES.ADAPTIVE ? new utilRetry.AdaptiveRetryStrategy(maxAttempts) : new utilRetry.StandardRetryStrategy(maxAttempts);
      return Object.assign(input, {
        maxAttempts,
        retryStrategy: () => controller ??= getDefault()
      });
    };
    var ENV_RETRY_MODE = "AWS_RETRY_MODE";
    var CONFIG_RETRY_MODE = "retry_mode";
    var NODE_RETRY_MODE_CONFIG_OPTIONS5 = {
      environmentVariableSelector: (env2) => env2[ENV_RETRY_MODE],
      configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],
      default: utilRetry.DEFAULT_RETRY_MODE
    };
    var omitRetryHeadersMiddleware = () => (next) => async (args) => {
      const { request } = args;
      if (protocolHttp.HttpRequest.isInstance(request)) {
        delete request.headers[utilRetry.INVOCATION_ID_HEADER];
        delete request.headers[utilRetry.REQUEST_HEADER];
      }
      return next(args);
    };
    var omitRetryHeadersMiddlewareOptions = {
      name: "omitRetryHeadersMiddleware",
      tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"],
      relation: "before",
      toMiddleware: "awsAuthMiddleware",
      override: true
    };
    var getOmitRetryHeadersPlugin = (options) => ({
      applyToStack: (clientStack) => {
        clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);
      }
    });
    function parseRetryAfterHeader(response, logger2) {
      if (!protocolHttp.HttpResponse.isInstance(response)) {
        return;
      }
      for (const header of Object.keys(response.headers)) {
        const h5 = header.toLowerCase();
        if (h5 === "retry-after") {
          const retryAfter = response.headers[header];
          let retryAfterSeconds = NaN;
          if (retryAfter.endsWith("GMT")) {
            try {
              const date2 = serde.parseRfc7231DateTime(retryAfter);
              retryAfterSeconds = (date2.getTime() - Date.now()) / 1e3;
            } catch (e5) {
              logger2?.trace?.("Failed to parse retry-after header");
              logger2?.trace?.(e5);
            }
          } else if (retryAfter.match(/ GMT, ((\d+)|(\d+\.\d+))$/)) {
            retryAfterSeconds = Number(retryAfter.match(/ GMT, ([\d.]+)$/)?.[1]);
          } else if (retryAfter.match(/^((\d+)|(\d+\.\d+))$/)) {
            retryAfterSeconds = Number(retryAfter);
          } else if (Date.parse(retryAfter) >= Date.now()) {
            retryAfterSeconds = (Date.parse(retryAfter) - Date.now()) / 1e3;
          }
          if (isNaN(retryAfterSeconds)) {
            return;
          }
          return new Date(Date.now() + retryAfterSeconds * 1e3);
        } else if (h5 === "x-amz-retry-after") {
          const v = response.headers[header];
          const backoffMilliseconds = Number(v);
          if (isNaN(backoffMilliseconds)) {
            logger2?.trace?.(`Failed to parse x-amz-retry-after=${v}`);
            return;
          }
          return new Date(Date.now() + backoffMilliseconds);
        }
      }
    }
    function getRetryAfterHint(response, logger2) {
      return parseRetryAfterHeader(response, logger2);
    }
    var retryMiddleware = (options) => (next, context) => async (args) => {
      let retryStrategy = await options.retryStrategy();
      const maxAttempts = await options.maxAttempts();
      if (isRetryStrategyV2(retryStrategy)) {
        retryStrategy = retryStrategy;
        let retryToken = await retryStrategy.acquireInitialRetryToken((context["partition_id"] ?? "") + (context.__retryLongPoll ? ":longpoll" : ""));
        let lastError = new Error();
        let attempts = 0;
        let totalRetryDelay = 0;
        const { request } = args;
        const isRequest = protocolHttp.HttpRequest.isInstance(request);
        if (isRequest) {
          request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4();
        }
        while (true) {
          try {
            if (isRequest) {
              request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
            }
            const { response, output } = await next(args);
            retryStrategy.recordSuccess(retryToken);
            output.$metadata.attempts = attempts + 1;
            output.$metadata.totalRetryDelay = totalRetryDelay;
            return { response, output };
          } catch (e5) {
            const retryErrorInfo = getRetryErrorInfo(e5, options.logger);
            lastError = asSdkError(e5);
            if (isRequest && isStreamingPayload.isStreamingPayload(request)) {
              (context.logger instanceof smithyClient.NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request.");
              throw lastError;
            }
            try {
              retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);
            } catch (refreshError) {
              if (typeof refreshError.$backoff === "number") {
                await cooldown(refreshError.$backoff);
              }
              if (!lastError.$metadata) {
                lastError.$metadata = {};
              }
              lastError.$metadata.attempts = attempts + 1;
              lastError.$metadata.totalRetryDelay = totalRetryDelay;
              throw lastError;
            }
            attempts = retryToken.getRetryCount();
            const delay = retryToken.getRetryDelay();
            totalRetryDelay += delay;
            await cooldown(delay);
          }
        }
      } else {
        retryStrategy = retryStrategy;
        if (retryStrategy?.mode) {
          context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]];
        }
        return retryStrategy.retry(next, args);
      }
    };
    var cooldown = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
    var isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined";
    var getRetryErrorInfo = (error3, logger2) => {
      const errorInfo = {
        error: error3,
        errorType: getRetryErrorType(error3)
      };
      const retryAfterHint = parseRetryAfterHeader(error3.$response, logger2);
      if (retryAfterHint) {
        errorInfo.retryAfterHint = retryAfterHint;
      }
      return errorInfo;
    };
    var getRetryErrorType = (error3) => {
      if (serviceErrorClassification.isThrottlingError(error3))
        return "THROTTLING";
      if (serviceErrorClassification.isTransientError(error3))
        return "TRANSIENT";
      if (serviceErrorClassification.isServerError(error3))
        return "SERVER_ERROR";
      return "CLIENT_ERROR";
    };
    var retryMiddlewareOptions = {
      name: "retryMiddleware",
      tags: ["RETRY"],
      step: "finalizeRequest",
      priority: "high",
      override: true
    };
    var getRetryPlugin5 = (options) => ({
      applyToStack: (clientStack) => {
        clientStack.add(retryMiddleware(options), retryMiddlewareOptions);
      }
    });
    exports2.AdaptiveRetryStrategy = AdaptiveRetryStrategy;
    exports2.CONFIG_MAX_ATTEMPTS = CONFIG_MAX_ATTEMPTS;
    exports2.CONFIG_RETRY_MODE = CONFIG_RETRY_MODE;
    exports2.ENV_MAX_ATTEMPTS = ENV_MAX_ATTEMPTS;
    exports2.ENV_RETRY_MODE = ENV_RETRY_MODE;
    exports2.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = NODE_MAX_ATTEMPT_CONFIG_OPTIONS5;
    exports2.NODE_RETRY_MODE_CONFIG_OPTIONS = NODE_RETRY_MODE_CONFIG_OPTIONS5;
    exports2.StandardRetryStrategy = StandardRetryStrategy;
    exports2.defaultDelayDecider = defaultDelayDecider;
    exports2.defaultRetryDecider = defaultRetryDecider;
    exports2.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin;
    exports2.getRetryAfterHint = getRetryAfterHint;
    exports2.getRetryPlugin = getRetryPlugin5;
    exports2.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware;
    exports2.omitRetryHeadersMiddlewareOptions = omitRetryHeadersMiddlewareOptions;
    exports2.resolveRetryConfig = resolveRetryConfig5;
    exports2.retryMiddleware = retryMiddleware;
    exports2.retryMiddlewareOptions = retryMiddlewareOptions;
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js
var import_protocol_http9, getDateHeader;
var init_getDateHeader = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js"() {
    import_protocol_http9 = __toESM(require_dist_cjs2());
    getDateHeader = (response) => import_protocol_http9.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0;
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js
var getSkewCorrectedDate;
var init_getSkewCorrectedDate = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js"() {
    getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js
var isClockSkewed;
var init_isClockSkewed = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js"() {
    init_getSkewCorrectedDate();
    isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5;
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js
var getUpdatedSystemClockOffset;
var init_getUpdatedSystemClockOffset = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js"() {
    init_isClockSkewed();
    getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {
      const clockTimeInMs = Date.parse(clockTime);
      if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
        return clockTimeInMs - Date.now();
      }
      return currentSystemClockOffset;
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js
var init_utils = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js"() {
    init_getDateHeader();
    init_getSkewCorrectedDate();
    init_getUpdatedSystemClockOffset();
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js
var import_protocol_http10, throwSigningPropertyError, validateSigningProperties, AwsSdkSigV4Signer, AWSSDKSigV4Signer;
var init_AwsSdkSigV4Signer = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js"() {
    import_protocol_http10 = __toESM(require_dist_cjs2());
    init_utils();
    throwSigningPropertyError = (name, property) => {
      if (!property) {
        throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
      }
      return property;
    };
    validateSigningProperties = async (signingProperties) => {
      const context = throwSigningPropertyError("context", signingProperties.context);
      const config = throwSigningPropertyError("config", signingProperties.config);
      const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
      const signerFunction = throwSigningPropertyError("signer", config.signer);
      const signer = await signerFunction(authScheme);
      const signingRegion = signingProperties?.signingRegion;
      const signingRegionSet = signingProperties?.signingRegionSet;
      const signingName = signingProperties?.signingName;
      return {
        config,
        signer,
        signingRegion,
        signingRegionSet,
        signingName
      };
    };
    AwsSdkSigV4Signer = class {
      async sign(httpRequest, identity, signingProperties) {
        if (!import_protocol_http10.HttpRequest.isInstance(httpRequest)) {
          throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
        }
        const validatedProps = await validateSigningProperties(signingProperties);
        const { config, signer } = validatedProps;
        let { signingRegion, signingName } = validatedProps;
        const handlerExecutionContext = signingProperties.context;
        if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {
          const [first, second] = handlerExecutionContext.authSchemes;
          if (first?.name === "sigv4a" && second?.name === "sigv4") {
            signingRegion = second?.signingRegion ?? signingRegion;
            signingName = second?.signingName ?? signingName;
          }
        }
        const signedRequest = await signer.sign(httpRequest, {
          signingDate: getSkewCorrectedDate(config.systemClockOffset),
          signingRegion,
          signingService: signingName
        });
        return signedRequest;
      }
      errorHandler(signingProperties) {
        return (error3) => {
          const serverTime = error3.ServerTime ?? getDateHeader(error3.$response);
          if (serverTime) {
            const config = throwSigningPropertyError("config", signingProperties.config);
            const initialSystemClockOffset = config.systemClockOffset;
            config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
            const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;
            if (clockSkewCorrected && error3.$metadata) {
              error3.$metadata.clockSkewCorrected = true;
            }
          }
          throw error3;
        };
      }
      successHandler(httpResponse, signingProperties) {
        const dateHeader = getDateHeader(httpResponse);
        if (dateHeader) {
          const config = throwSigningPropertyError("config", signingProperties.config);
          config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
        }
      }
    };
    AWSSDKSigV4Signer = AwsSdkSigV4Signer;
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js
var import_protocol_http11, AwsSdkSigV4ASigner;
var init_AwsSdkSigV4ASigner = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js"() {
    import_protocol_http11 = __toESM(require_dist_cjs2());
    init_utils();
    init_AwsSdkSigV4Signer();
    AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer {
      async sign(httpRequest, identity, signingProperties) {
        if (!import_protocol_http11.HttpRequest.isInstance(httpRequest)) {
          throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
        }
        const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties);
        const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();
        const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(",");
        const signedRequest = await signer.sign(httpRequest, {
          signingDate: getSkewCorrectedDate(config.systemClockOffset),
          signingRegion: multiRegionOverride,
          signingService: signingName
        });
        return signedRequest;
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.js
var getArrayForCommaSeparatedString;
var init_getArrayForCommaSeparatedString = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.js"() {
    getArrayForCommaSeparatedString = (str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : [];
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js
var getBearerTokenEnvKey;
var init_getBearerTokenEnvKey = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js"() {
    getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`;
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js
var NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY, NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS;
var init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js"() {
    init_getArrayForCommaSeparatedString();
    init_getBearerTokenEnvKey();
    NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE";
    NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference";
    NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {
      environmentVariableSelector: (env2, options) => {
        if (options?.signingName) {
          const bearerTokenKey = getBearerTokenEnvKey(options.signingName);
          if (bearerTokenKey in env2)
            return ["httpBearerAuth"];
        }
        if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env2))
          return void 0;
        return getArrayForCommaSeparatedString(env2[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
      },
      configFileSelector: (profile) => {
        if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))
          return void 0;
        return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);
      },
      default: []
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js
var import_property_provider, resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS;
var init_resolveAwsSdkSigV4AConfig = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js"() {
    init_dist_es();
    import_property_provider = __toESM(require_dist_cjs28());
    resolveAwsSdkSigV4AConfig = (config) => {
      config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet);
      return config;
    };
    NODE_SIGV4A_CONFIG_OPTIONS = {
      environmentVariableSelector(env2) {
        if (env2.AWS_SIGV4A_SIGNING_REGION_SET) {
          return env2.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim());
        }
        throw new import_property_provider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", {
          tryNextLink: true
        });
      },
      configFileSelector(profile) {
        if (profile.sigv4a_signing_region_set) {
          return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim());
        }
        throw new import_property_provider.ProviderError("sigv4a_signing_region_set not set in profile.", {
          tryNextLink: true
        });
      },
      default: void 0
    };
  }
});

// ../../node_modules/@smithy/signature-v4/dist-cjs/index.js
var require_dist_cjs36 = __commonJS({
  "../../node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2) {
    "use strict";
    var utilHexEncoding = require_dist_cjs15();
    var utilUtf8 = require_dist_cjs9();
    var isArrayBuffer = require_dist_cjs7();
    var protocolHttp = require_dist_cjs2();
    var utilMiddleware = require_dist_cjs6();
    var utilUriEscape = require_dist_cjs11();
    var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm";
    var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential";
    var AMZ_DATE_QUERY_PARAM = "X-Amz-Date";
    var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders";
    var EXPIRES_QUERY_PARAM = "X-Amz-Expires";
    var SIGNATURE_QUERY_PARAM = "X-Amz-Signature";
    var TOKEN_QUERY_PARAM = "X-Amz-Security-Token";
    var REGION_SET_PARAM = "X-Amz-Region-Set";
    var AUTH_HEADER = "authorization";
    var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();
    var DATE_HEADER = "date";
    var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];
    var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();
    var SHA256_HEADER = "x-amz-content-sha256";
    var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();
    var HOST_HEADER = "host";
    var ALWAYS_UNSIGNABLE_HEADERS = {
      authorization: true,
      "cache-control": true,
      connection: true,
      expect: true,
      from: true,
      "keep-alive": true,
      "max-forwards": true,
      pragma: true,
      referer: true,
      te: true,
      trailer: true,
      "transfer-encoding": true,
      upgrade: true,
      "user-agent": true,
      "x-amzn-trace-id": true
    };
    var PROXY_HEADER_PATTERN = /^proxy-/;
    var SEC_HEADER_PATTERN = /^sec-/;
    var UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];
    var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256";
    var ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256";
    var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD";
    var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
    var MAX_CACHE_SIZE = 50;
    var KEY_TYPE_IDENTIFIER = "aws4_request";
    var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;
    var signingKeyCache = {};
    var cacheQueue = [];
    var createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;
    var getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {
      const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);
      const cacheKey = `${shortDate}:${region}:${service}:${utilHexEncoding.toHex(credsHash)}:${credentials.sessionToken}`;
      if (cacheKey in signingKeyCache) {
        return signingKeyCache[cacheKey];
      }
      cacheQueue.push(cacheKey);
      while (cacheQueue.length > MAX_CACHE_SIZE) {
        delete signingKeyCache[cacheQueue.shift()];
      }
      let key = `AWS4${credentials.secretAccessKey}`;
      for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {
        key = await hmac(sha256Constructor, key, signable);
      }
      return signingKeyCache[cacheKey] = key;
    };
    var clearCredentialCache = () => {
      cacheQueue.length = 0;
      Object.keys(signingKeyCache).forEach((cacheKey) => {
        delete signingKeyCache[cacheKey];
      });
    };
    var hmac = (ctor, secret, data2) => {
      const hash = new ctor(secret);
      hash.update(utilUtf8.toUint8Array(data2));
      return hash.digest();
    };
    var getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {
      const canonical = {};
      for (const headerName of Object.keys(headers).sort()) {
        if (headers[headerName] == void 0) {
          continue;
        }
        const canonicalHeaderName = headerName.toLowerCase();
        if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) {
          if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) {
            continue;
          }
        }
        canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " ");
      }
      return canonical;
    };
    var getPayloadHash = async ({ headers, body }, hashConstructor) => {
      for (const headerName of Object.keys(headers)) {
        if (headerName.toLowerCase() === SHA256_HEADER) {
          return headers[headerName];
        }
      }
      if (body == void 0) {
        return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
      } else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer.isArrayBuffer(body)) {
        const hashCtor = new hashConstructor();
        hashCtor.update(utilUtf8.toUint8Array(body));
        return utilHexEncoding.toHex(await hashCtor.digest());
      }
      return UNSIGNED_PAYLOAD;
    };
    var HeaderFormatter = class {
      format(headers) {
        const chunks2 = [];
        for (const headerName of Object.keys(headers)) {
          const bytes = utilUtf8.fromUtf8(headerName);
          chunks2.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
        }
        const out = new Uint8Array(chunks2.reduce((carry, bytes) => carry + bytes.byteLength, 0));
        let position = 0;
        for (const chunk of chunks2) {
          out.set(chunk, position);
          position += chunk.byteLength;
        }
        return out;
      }
      formatHeaderValue(header) {
        switch (header.type) {
          case "boolean":
            return Uint8Array.from([header.value ? 0 : 1]);
          case "byte":
            return Uint8Array.from([2, header.value]);
          case "short":
            const shortView = new DataView(new ArrayBuffer(3));
            shortView.setUint8(0, 3);
            shortView.setInt16(1, header.value, false);
            return new Uint8Array(shortView.buffer);
          case "integer":
            const intView = new DataView(new ArrayBuffer(5));
            intView.setUint8(0, 4);
            intView.setInt32(1, header.value, false);
            return new Uint8Array(intView.buffer);
          case "long":
            const longBytes = new Uint8Array(9);
            longBytes[0] = 5;
            longBytes.set(header.value.bytes, 1);
            return longBytes;
          case "binary":
            const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
            binView.setUint8(0, 6);
            binView.setUint16(1, header.value.byteLength, false);
            const binBytes = new Uint8Array(binView.buffer);
            binBytes.set(header.value, 3);
            return binBytes;
          case "string":
            const utf8Bytes = utilUtf8.fromUtf8(header.value);
            const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
            strView.setUint8(0, 7);
            strView.setUint16(1, utf8Bytes.byteLength, false);
            const strBytes = new Uint8Array(strView.buffer);
            strBytes.set(utf8Bytes, 3);
            return strBytes;
          case "timestamp":
            const tsBytes = new Uint8Array(9);
            tsBytes[0] = 8;
            tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);
            return tsBytes;
          case "uuid":
            if (!UUID_PATTERN.test(header.value)) {
              throw new Error(`Invalid UUID received: ${header.value}`);
            }
            const uuidBytes = new Uint8Array(17);
            uuidBytes[0] = 9;
            uuidBytes.set(utilHexEncoding.fromHex(header.value.replace(/\-/g, "")), 1);
            return uuidBytes;
        }
      }
    };
    var HEADER_VALUE_TYPE;
    (function(HEADER_VALUE_TYPE2) {
      HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolTrue"] = 0] = "boolTrue";
      HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolFalse"] = 1] = "boolFalse";
      HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byte"] = 2] = "byte";
      HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["short"] = 3] = "short";
      HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["integer"] = 4] = "integer";
      HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["long"] = 5] = "long";
      HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byteArray"] = 6] = "byteArray";
      HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["string"] = 7] = "string";
      HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["timestamp"] = 8] = "timestamp";
      HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["uuid"] = 9] = "uuid";
    })(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));
    var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
    var Int64 = class _Int64 {
      bytes;
      constructor(bytes) {
        this.bytes = bytes;
        if (bytes.byteLength !== 8) {
          throw new Error("Int64 buffers must be exactly 8 bytes");
        }
      }
      static fromNumber(number) {
        if (number > 9223372036854776e3 || number < -9223372036854776e3) {
          throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
        }
        const bytes = new Uint8Array(8);
        for (let i5 = 7, remaining = Math.abs(Math.round(number)); i5 > -1 && remaining > 0; i5--, remaining /= 256) {
          bytes[i5] = remaining;
        }
        if (number < 0) {
          negate(bytes);
        }
        return new _Int64(bytes);
      }
      valueOf() {
        const bytes = this.bytes.slice(0);
        const negative = bytes[0] & 128;
        if (negative) {
          negate(bytes);
        }
        return parseInt(utilHexEncoding.toHex(bytes), 16) * (negative ? -1 : 1);
      }
      toString() {
        return String(this.valueOf());
      }
    };
    function negate(bytes) {
      for (let i5 = 0; i5 < 8; i5++) {
        bytes[i5] ^= 255;
      }
      for (let i5 = 7; i5 > -1; i5--) {
        bytes[i5]++;
        if (bytes[i5] !== 0)
          break;
      }
    }
    var hasHeader = (soughtHeader, headers) => {
      soughtHeader = soughtHeader.toLowerCase();
      for (const headerName of Object.keys(headers)) {
        if (soughtHeader === headerName.toLowerCase()) {
          return true;
        }
      }
      return false;
    };
    var moveHeadersToQuery = (request, options = {}) => {
      const { headers, query = {} } = protocolHttp.HttpRequest.clone(request);
      for (const name of Object.keys(headers)) {
        const lname = name.toLowerCase();
        if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {
          query[name] = headers[name];
          delete headers[name];
        }
      }
      return {
        ...request,
        headers,
        query
      };
    };
    var prepareRequest = (request) => {
      request = protocolHttp.HttpRequest.clone(request);
      for (const headerName of Object.keys(request.headers)) {
        if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
          delete request.headers[headerName];
        }
      }
      return request;
    };
    var getCanonicalQuery = ({ query = {} }) => {
      const keys = [];
      const serialized = {};
      for (const key of Object.keys(query)) {
        if (key.toLowerCase() === SIGNATURE_HEADER) {
          continue;
        }
        const encodedKey = utilUriEscape.escapeUri(key);
        keys.push(encodedKey);
        const value = query[key];
        if (typeof value === "string") {
          serialized[encodedKey] = `${encodedKey}=${utilUriEscape.escapeUri(value)}`;
        } else if (Array.isArray(value)) {
          serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${utilUriEscape.escapeUri(value2)}`]), []).sort().join("&");
        }
      }
      return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&");
    };
    var iso8601 = (time2) => toDate(time2).toISOString().replace(/\.\d{3}Z$/, "Z");
    var toDate = (time2) => {
      if (typeof time2 === "number") {
        return new Date(time2 * 1e3);
      }
      if (typeof time2 === "string") {
        if (Number(time2)) {
          return new Date(Number(time2) * 1e3);
        }
        return new Date(time2);
      }
      return time2;
    };
    var SignatureV4Base = class {
      service;
      regionProvider;
      credentialProvider;
      sha256;
      uriEscapePath;
      applyChecksum;
      constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) {
        this.service = service;
        this.sha256 = sha256;
        this.uriEscapePath = uriEscapePath;
        this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true;
        this.regionProvider = utilMiddleware.normalizeProvider(region);
        this.credentialProvider = utilMiddleware.normalizeProvider(credentials);
      }
      createCanonicalRequest(request, canonicalHeaders, payloadHash) {
        const sortedHeaders = Object.keys(canonicalHeaders).sort();
        return `${request.method}
${this.getCanonicalPath(request)}
${getCanonicalQuery(request)}
${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")}

${sortedHeaders.join(";")}
${payloadHash}`;
      }
      async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {
        const hash = new this.sha256();
        hash.update(utilUtf8.toUint8Array(canonicalRequest));
        const hashedRequest = await hash.digest();
        return `${algorithmIdentifier}
${longDate}
${credentialScope}
${utilHexEncoding.toHex(hashedRequest)}`;
      }
      getCanonicalPath({ path }) {
        if (this.uriEscapePath) {
          const normalizedPathSegments = [];
          for (const pathSegment of path.split("/")) {
            if (pathSegment?.length === 0)
              continue;
            if (pathSegment === ".")
              continue;
            if (pathSegment === "..") {
              normalizedPathSegments.pop();
            } else {
              normalizedPathSegments.push(pathSegment);
            }
          }
          const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`;
          const doubleEncoded = utilUriEscape.escapeUri(normalizedPath);
          return doubleEncoded.replace(/%2F/g, "/");
        }
        return path;
      }
      validateResolvedCredentials(credentials) {
        if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
          throw new Error("Resolved credential object is not valid");
        }
      }
      formatDate(now) {
        const longDate = iso8601(now).replace(/[\-:]/g, "");
        return {
          longDate,
          shortDate: longDate.slice(0, 8)
        };
      }
      getCanonicalHeaderList(headers) {
        return Object.keys(headers).sort().join(";");
      }
    };
    var SignatureV42 = class extends SignatureV4Base {
      headerFormatter = new HeaderFormatter();
      constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) {
        super({
          applyChecksum,
          credentials,
          region,
          service,
          sha256,
          uriEscapePath
        });
      }
      async presign(originalRequest, options = {}) {
        const { signingDate = /* @__PURE__ */ new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService } = options;
        const credentials = await this.credentialProvider();
        this.validateResolvedCredentials(credentials);
        const region = signingRegion ?? await this.regionProvider();
        const { longDate, shortDate } = this.formatDate(signingDate);
        if (expiresIn > MAX_PRESIGNED_TTL) {
          return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");
        }
        const scope = createScope(shortDate, region, signingService ?? this.service);
        const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders });
        if (credentials.sessionToken) {
          request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;
        }
        request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;
        request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;
        request.query[AMZ_DATE_QUERY_PARAM] = longDate;
        request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);
        const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
        request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders);
        request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)));
        return request;
      }
      async sign(toSign, options) {
        if (typeof toSign === "string") {
          return this.signString(toSign, options);
        } else if (toSign.headers && toSign.payload) {
          return this.signEvent(toSign, options);
        } else if (toSign.message) {
          return this.signMessage(toSign, options);
        } else {
          return this.signRequest(toSign, options);
        }
      }
      async signEvent({ headers, payload: payload2 }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService, eventStreamCredentials }) {
        const region = signingRegion ?? await this.regionProvider();
        const { shortDate, longDate } = this.formatDate(signingDate);
        const scope = createScope(shortDate, region, signingService ?? this.service);
        const hashedPayload = await getPayloadHash({ headers: {}, body: payload2 }, this.sha256);
        const hash = new this.sha256();
        hash.update(headers);
        const hashedHeaders = utilHexEncoding.toHex(await hash.digest());
        const stringToSign = [
          EVENT_ALGORITHM_IDENTIFIER,
          longDate,
          scope,
          priorSignature,
          hashedHeaders,
          hashedPayload
        ].join("\n");
        return this.signString(stringToSign, {
          signingDate,
          signingRegion: region,
          signingService,
          eventStreamCredentials
        });
      }
      async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService, eventStreamCredentials }) {
        const promise = this.signEvent({
          headers: this.headerFormatter.format(signableMessage.message.headers),
          payload: signableMessage.message.body
        }, {
          signingDate,
          signingRegion,
          signingService,
          priorSignature: signableMessage.priorSignature,
          eventStreamCredentials
        });
        return promise.then((signature) => {
          return { message: signableMessage.message, signature };
        });
      }
      async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService, eventStreamCredentials } = {}) {
        const credentials = eventStreamCredentials ?? await this.credentialProvider();
        this.validateResolvedCredentials(credentials);
        const region = signingRegion ?? await this.regionProvider();
        const { shortDate } = this.formatDate(signingDate);
        const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));
        hash.update(utilUtf8.toUint8Array(stringToSign));
        return utilHexEncoding.toHex(await hash.digest());
      }
      async signRequest(requestToSign, { signingDate = /* @__PURE__ */ new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) {
        const credentials = await this.credentialProvider();
        this.validateResolvedCredentials(credentials);
        const region = signingRegion ?? await this.regionProvider();
        const request = prepareRequest(requestToSign);
        const { longDate, shortDate } = this.formatDate(signingDate);
        const scope = createScope(shortDate, region, signingService ?? this.service);
        request.headers[AMZ_DATE_HEADER] = longDate;
        if (credentials.sessionToken) {
          request.headers[TOKEN_HEADER] = credentials.sessionToken;
        }
        const payloadHash = await getPayloadHash(request, this.sha256);
        if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {
          request.headers[SHA256_HEADER] = payloadHash;
        }
        const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
        const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash));
        request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`;
        return request;
      }
      async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
        const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);
        const hash = new this.sha256(await keyPromise);
        hash.update(utilUtf8.toUint8Array(stringToSign));
        return utilHexEncoding.toHex(await hash.digest());
      }
      getSigningKey(credentials, region, shortDate, service) {
        return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);
      }
    };
    var signatureV4aContainer = {
      SignatureV4a: null
    };
    exports2.ALGORITHM_IDENTIFIER = ALGORITHM_IDENTIFIER;
    exports2.ALGORITHM_IDENTIFIER_V4A = ALGORITHM_IDENTIFIER_V4A;
    exports2.ALGORITHM_QUERY_PARAM = ALGORITHM_QUERY_PARAM;
    exports2.ALWAYS_UNSIGNABLE_HEADERS = ALWAYS_UNSIGNABLE_HEADERS;
    exports2.AMZ_DATE_HEADER = AMZ_DATE_HEADER;
    exports2.AMZ_DATE_QUERY_PARAM = AMZ_DATE_QUERY_PARAM;
    exports2.AUTH_HEADER = AUTH_HEADER;
    exports2.CREDENTIAL_QUERY_PARAM = CREDENTIAL_QUERY_PARAM;
    exports2.DATE_HEADER = DATE_HEADER;
    exports2.EVENT_ALGORITHM_IDENTIFIER = EVENT_ALGORITHM_IDENTIFIER;
    exports2.EXPIRES_QUERY_PARAM = EXPIRES_QUERY_PARAM;
    exports2.GENERATED_HEADERS = GENERATED_HEADERS;
    exports2.HOST_HEADER = HOST_HEADER;
    exports2.KEY_TYPE_IDENTIFIER = KEY_TYPE_IDENTIFIER;
    exports2.MAX_CACHE_SIZE = MAX_CACHE_SIZE;
    exports2.MAX_PRESIGNED_TTL = MAX_PRESIGNED_TTL;
    exports2.PROXY_HEADER_PATTERN = PROXY_HEADER_PATTERN;
    exports2.REGION_SET_PARAM = REGION_SET_PARAM;
    exports2.SEC_HEADER_PATTERN = SEC_HEADER_PATTERN;
    exports2.SHA256_HEADER = SHA256_HEADER;
    exports2.SIGNATURE_HEADER = SIGNATURE_HEADER;
    exports2.SIGNATURE_QUERY_PARAM = SIGNATURE_QUERY_PARAM;
    exports2.SIGNED_HEADERS_QUERY_PARAM = SIGNED_HEADERS_QUERY_PARAM;
    exports2.SignatureV4 = SignatureV42;
    exports2.SignatureV4Base = SignatureV4Base;
    exports2.TOKEN_HEADER = TOKEN_HEADER;
    exports2.TOKEN_QUERY_PARAM = TOKEN_QUERY_PARAM;
    exports2.UNSIGNABLE_PATTERNS = UNSIGNABLE_PATTERNS;
    exports2.UNSIGNED_PAYLOAD = UNSIGNED_PAYLOAD;
    exports2.clearCredentialCache = clearCredentialCache;
    exports2.createScope = createScope;
    exports2.getCanonicalHeaders = getCanonicalHeaders;
    exports2.getCanonicalQuery = getCanonicalQuery;
    exports2.getPayloadHash = getPayloadHash;
    exports2.getSigningKey = getSigningKey;
    exports2.hasHeader = hasHeader;
    exports2.moveHeadersToQuery = moveHeadersToQuery;
    exports2.prepareRequest = prepareRequest;
    exports2.signatureV4aContainer = signatureV4aContainer;
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js
function normalizeCredentialProvider(config, { credentials, credentialDefaultProvider }) {
  let credentialsProvider;
  if (credentials) {
    if (!credentials?.memoized) {
      credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh);
    } else {
      credentialsProvider = credentials;
    }
  } else {
    if (credentialDefaultProvider) {
      credentialsProvider = normalizeProvider(credentialDefaultProvider(Object.assign({}, config, {
        parentClientConfig: config
      })));
    } else {
      credentialsProvider = async () => {
        throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.");
      };
    }
  }
  credentialsProvider.memoized = true;
  return credentialsProvider;
}
function bindCallerConfig(config, credentialsProvider) {
  if (credentialsProvider.configBound) {
    return credentialsProvider;
  }
  const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });
  fn.memoized = credentialsProvider.memoized;
  fn.configBound = true;
  return fn;
}
var import_signature_v4, resolveAwsSdkSigV4Config, resolveAWSSDKSigV4Config;
var init_resolveAwsSdkSigV4Config = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js"() {
    init_client();
    init_dist_es();
    import_signature_v4 = __toESM(require_dist_cjs36());
    resolveAwsSdkSigV4Config = (config) => {
      let inputCredentials = config.credentials;
      let isUserSupplied = !!config.credentials;
      let resolvedCredentials = void 0;
      Object.defineProperty(config, "credentials", {
        set(credentials) {
          if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {
            isUserSupplied = true;
          }
          inputCredentials = credentials;
          const memoizedProvider = normalizeCredentialProvider(config, {
            credentials: inputCredentials,
            credentialDefaultProvider: config.credentialDefaultProvider
          });
          const boundProvider = bindCallerConfig(config, memoizedProvider);
          if (isUserSupplied && !boundProvider.attributed) {
            const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null;
            resolvedCredentials = async (options) => {
              const creds = await boundProvider(options);
              const attributedCreds = creds;
              if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {
                return setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e");
              }
              return attributedCreds;
            };
            resolvedCredentials.memoized = boundProvider.memoized;
            resolvedCredentials.configBound = boundProvider.configBound;
            resolvedCredentials.attributed = true;
          } else {
            resolvedCredentials = boundProvider;
          }
        },
        get() {
          return resolvedCredentials;
        },
        enumerable: true,
        configurable: true
      });
      config.credentials = inputCredentials;
      const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256 } = config;
      let signer;
      if (config.signer) {
        signer = normalizeProvider(config.signer);
      } else if (config.regionInfoProvider) {
        signer = () => normalizeProvider(config.region)().then(async (region) => [
          await config.regionInfoProvider(region, {
            useFipsEndpoint: await config.useFipsEndpoint(),
            useDualstackEndpoint: await config.useDualstackEndpoint()
          }) || {},
          region
        ]).then(([regionInfo, region]) => {
          const { signingRegion, signingService } = regionInfo;
          config.signingRegion = config.signingRegion || signingRegion || region;
          config.signingName = config.signingName || signingService || config.serviceId;
          const params = {
            ...config,
            credentials: config.credentials,
            region: config.signingRegion,
            service: config.signingName,
            sha256,
            uriEscapePath: signingEscapePath
          };
          const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;
          return new SignerCtor(params);
        });
      } else {
        signer = async (authScheme) => {
          authScheme = Object.assign({}, {
            name: "sigv4",
            signingName: config.signingName || config.defaultSigningName,
            signingRegion: await normalizeProvider(config.region)(),
            properties: {}
          }, authScheme);
          const signingRegion = authScheme.signingRegion;
          const signingService = authScheme.signingName;
          config.signingRegion = config.signingRegion || signingRegion;
          config.signingName = config.signingName || signingService || config.serviceId;
          const params = {
            ...config,
            credentials: config.credentials,
            region: config.signingRegion,
            service: config.signingName,
            sha256,
            uriEscapePath: signingEscapePath
          };
          const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;
          return new SignerCtor(params);
        };
      }
      const resolvedConfig = Object.assign(config, {
        systemClockOffset,
        signingEscapePath,
        signer
      });
      return resolvedConfig;
    };
    resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js
var init_aws_sdk = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js"() {
    init_AwsSdkSigV4Signer();
    init_AwsSdkSigV4ASigner();
    init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS();
    init_resolveAwsSdkSigV4AConfig();
    init_resolveAwsSdkSigV4Config();
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js
var httpAuthSchemes_exports = {};
__export(httpAuthSchemes_exports, {
  AWSSDKSigV4Signer: () => AWSSDKSigV4Signer,
  AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner,
  AwsSdkSigV4Signer: () => AwsSdkSigV4Signer,
  NODE_AUTH_SCHEME_PREFERENCE_OPTIONS: () => NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
  NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS,
  getBearerTokenEnvKey: () => getBearerTokenEnvKey,
  resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config,
  resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig,
  resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config,
  validateSigningProperties: () => validateSigningProperties
});
var init_httpAuthSchemes2 = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js"() {
    init_aws_sdk();
    init_getBearerTokenEnvKey();
  }
});

// ../../node_modules/@aws-sdk/client-iot/dist-cjs/auth/httpAuthSchemeProvider.js
var require_httpAuthSchemeProvider = __commonJS({
  "../../node_modules/@aws-sdk/client-iot/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.resolveHttpAuthSchemeConfig = exports2.defaultIoTHttpAuthSchemeProvider = exports2.defaultIoTHttpAuthSchemeParametersProvider = void 0;
    var httpAuthSchemes_1 = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
    var util_middleware_1 = require_dist_cjs6();
    var defaultIoTHttpAuthSchemeParametersProvider = async (config, context, input) => {
      return {
        operation: (0, util_middleware_1.getSmithyContext)(context).operation,
        region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
          throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
        })()
      };
    };
    exports2.defaultIoTHttpAuthSchemeParametersProvider = defaultIoTHttpAuthSchemeParametersProvider;
    function createAwsAuthSigv4HttpAuthOption5(authParameters) {
      return {
        schemeId: "aws.auth#sigv4",
        signingProperties: {
          name: "iot",
          region: authParameters.region
        },
        propertiesExtractor: (config, context) => ({
          signingProperties: {
            config,
            context
          }
        })
      };
    }
    var defaultIoTHttpAuthSchemeProvider = (authParameters) => {
      const options = [];
      switch (authParameters.operation) {
        default: {
          options.push(createAwsAuthSigv4HttpAuthOption5(authParameters));
        }
      }
      return options;
    };
    exports2.defaultIoTHttpAuthSchemeProvider = defaultIoTHttpAuthSchemeProvider;
    var resolveHttpAuthSchemeConfig5 = (config) => {
      const config_0 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config);
      return Object.assign(config_0, {
        authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? [])
      });
    };
    exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig5;
  }
});

// ../../node_modules/@aws-sdk/client-iot/package.json
var require_package2 = __commonJS({
  "../../node_modules/@aws-sdk/client-iot/package.json"(exports2, module2) {
    module2.exports = {
      name: "@aws-sdk/client-iot",
      description: "AWS SDK for JavaScript Iot Client for Node.js, Browser and React Native",
      version: "3.1037.0",
      scripts: {
        build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
        "build:cjs": "node ../../scripts/compilation/inline client-iot",
        "build:es": "tsc -p tsconfig.es.json",
        "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
        "build:types": "tsc -p tsconfig.types.json",
        "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
        clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
        "extract:docs": "api-extractor run --local",
        "generate:client": "node ../../scripts/generate-clients/single-service --solo iot",
        "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development",
        "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts",
        "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
      },
      main: "./dist-cjs/index.js",
      types: "./dist-types/index.d.ts",
      module: "./dist-es/index.js",
      sideEffects: false,
      dependencies: {
        "@aws-crypto/sha256-browser": "5.2.0",
        "@aws-crypto/sha256-js": "5.2.0",
        "@aws-sdk/core": "^3.974.5",
        "@aws-sdk/credential-provider-node": "^3.972.36",
        "@aws-sdk/middleware-host-header": "^3.972.10",
        "@aws-sdk/middleware-logger": "^3.972.10",
        "@aws-sdk/middleware-recursion-detection": "^3.972.11",
        "@aws-sdk/middleware-user-agent": "^3.972.35",
        "@aws-sdk/region-config-resolver": "^3.972.13",
        "@aws-sdk/types": "^3.973.8",
        "@aws-sdk/util-endpoints": "^3.996.8",
        "@aws-sdk/util-user-agent-browser": "^3.972.10",
        "@aws-sdk/util-user-agent-node": "^3.973.21",
        "@smithy/config-resolver": "^4.4.17",
        "@smithy/core": "^3.23.17",
        "@smithy/fetch-http-handler": "^5.3.17",
        "@smithy/hash-node": "^4.2.14",
        "@smithy/invalid-dependency": "^4.2.14",
        "@smithy/middleware-content-length": "^4.2.14",
        "@smithy/middleware-endpoint": "^4.4.32",
        "@smithy/middleware-retry": "^4.5.5",
        "@smithy/middleware-serde": "^4.2.20",
        "@smithy/middleware-stack": "^4.2.14",
        "@smithy/node-config-provider": "^4.3.14",
        "@smithy/node-http-handler": "^4.6.1",
        "@smithy/protocol-http": "^5.3.14",
        "@smithy/smithy-client": "^4.12.13",
        "@smithy/types": "^4.14.1",
        "@smithy/url-parser": "^4.2.14",
        "@smithy/util-base64": "^4.3.2",
        "@smithy/util-body-length-browser": "^4.2.2",
        "@smithy/util-body-length-node": "^4.2.3",
        "@smithy/util-defaults-mode-browser": "^4.3.49",
        "@smithy/util-defaults-mode-node": "^4.2.54",
        "@smithy/util-endpoints": "^3.4.2",
        "@smithy/util-middleware": "^4.2.14",
        "@smithy/util-retry": "^4.3.4",
        "@smithy/util-utf8": "^4.2.2",
        tslib: "^2.6.2"
      },
      devDependencies: {
        "@tsconfig/node20": "20.1.8",
        "@types/node": "^20.14.8",
        concurrently: "7.0.0",
        "downlevel-dts": "0.10.1",
        premove: "4.0.0",
        typescript: "~5.8.3"
      },
      engines: {
        node: ">=20.0.0"
      },
      typesVersions: {
        "<4.5": {
          "dist-types/*": [
            "dist-types/ts3.4/*"
          ]
        }
      },
      files: [
        "dist-*/**"
      ],
      author: {
        name: "AWS SDK for JavaScript Team",
        url: "https://aws.amazon.com/javascript/"
      },
      license: "Apache-2.0",
      browser: {
        "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
      },
      "react-native": {
        "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
      },
      homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-iot",
      repository: {
        type: "git",
        url: "https://github.com/aws/aws-sdk-js-v3.git",
        directory: "clients/client-iot"
      }
    };
  }
});

// ../../node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js
var require_dist_cjs37 = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js"(exports2) {
    "use strict";
    var client = (init_client(), __toCommonJS(client_exports));
    var propertyProvider = require_dist_cjs28();
    var ENV_KEY = "AWS_ACCESS_KEY_ID";
    var ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
    var ENV_SESSION = "AWS_SESSION_TOKEN";
    var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
    var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
    var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID";
    var fromEnv = (init) => async () => {
      init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");
      const accessKeyId = process.env[ENV_KEY];
      const secretAccessKey = process.env[ENV_SECRET];
      const sessionToken = process.env[ENV_SESSION];
      const expiry = process.env[ENV_EXPIRATION];
      const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];
      const accountId = process.env[ENV_ACCOUNT_ID];
      if (accessKeyId && secretAccessKey) {
        const credentials = {
          accessKeyId,
          secretAccessKey,
          ...sessionToken && { sessionToken },
          ...expiry && { expiration: new Date(expiry) },
          ...credentialScope && { credentialScope },
          ...accountId && { accountId }
        };
        client.setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS", "g");
        return credentials;
      }
      throw new propertyProvider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger });
    };
    exports2.ENV_ACCOUNT_ID = ENV_ACCOUNT_ID;
    exports2.ENV_CREDENTIAL_SCOPE = ENV_CREDENTIAL_SCOPE;
    exports2.ENV_EXPIRATION = ENV_EXPIRATION;
    exports2.ENV_KEY = ENV_KEY;
    exports2.ENV_SECRET = ENV_SECRET;
    exports2.ENV_SESSION = ENV_SESSION;
    exports2.fromEnv = fromEnv;
  }
});

// ../../node_modules/@smithy/credential-provider-imds/dist-cjs/index.js
var require_dist_cjs38 = __commonJS({
  "../../node_modules/@smithy/credential-provider-imds/dist-cjs/index.js"(exports2) {
    "use strict";
    var propertyProvider = require_dist_cjs28();
    var url = require("url");
    var buffer = require("buffer");
    var http = require("http");
    var nodeConfigProvider = require_dist_cjs30();
    var urlParser = require_dist_cjs18();
    function httpRequest(options) {
      return new Promise((resolve, reject) => {
        const req = http.request({
          method: "GET",
          ...options,
          hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1")
        });
        req.on("error", (err) => {
          reject(Object.assign(new propertyProvider.ProviderError("Unable to connect to instance metadata service"), err));
          req.destroy();
        });
        req.on("timeout", () => {
          reject(new propertyProvider.ProviderError("TimeoutError from instance metadata service"));
          req.destroy();
        });
        req.on("response", (res) => {
          const { statusCode = 400 } = res;
          if (statusCode < 200 || 300 <= statusCode) {
            reject(Object.assign(new propertyProvider.ProviderError("Error response received from instance metadata service"), { statusCode }));
            req.destroy();
          }
          const chunks2 = [];
          res.on("data", (chunk) => {
            chunks2.push(chunk);
          });
          res.on("end", () => {
            resolve(buffer.Buffer.concat(chunks2));
            req.destroy();
          });
        });
        req.end();
      });
    }
    var isImdsCredentials = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string";
    var fromImdsCredentials = (creds) => ({
      accessKeyId: creds.AccessKeyId,
      secretAccessKey: creds.SecretAccessKey,
      sessionToken: creds.Token,
      expiration: new Date(creds.Expiration),
      ...creds.AccountId && { accountId: creds.AccountId }
    });
    var DEFAULT_TIMEOUT = 1e3;
    var DEFAULT_MAX_RETRIES = 0;
    var providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT }) => ({ maxRetries, timeout });
    var retry = (toRetry, maxRetries) => {
      let promise = toRetry();
      for (let i5 = 0; i5 < maxRetries; i5++) {
        promise = promise.catch(toRetry);
      }
      return promise;
    };
    var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
    var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
    var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
    var fromContainerMetadata = (init = {}) => {
      const { timeout, maxRetries } = providerConfigFromInit(init);
      return () => retry(async () => {
        const requestOptions = await getCmdsUri({ logger: init.logger });
        const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));
        if (!isImdsCredentials(credsResponse)) {
          throw new propertyProvider.CredentialsProviderError("Invalid response received from instance metadata service.", {
            logger: init.logger
          });
        }
        return fromImdsCredentials(credsResponse);
      }, maxRetries);
    };
    var requestFromEcsImds = async (timeout, options) => {
      if (process.env[ENV_CMDS_AUTH_TOKEN]) {
        options.headers = {
          ...options.headers,
          Authorization: process.env[ENV_CMDS_AUTH_TOKEN]
        };
      }
      const buffer2 = await httpRequest({
        ...options,
        timeout
      });
      return buffer2.toString();
    };
    var CMDS_IP = "169.254.170.2";
    var GREENGRASS_HOSTS = {
      localhost: true,
      "127.0.0.1": true
    };
    var GREENGRASS_PROTOCOLS = {
      "http:": true,
      "https:": true
    };
    var getCmdsUri = async ({ logger: logger2 }) => {
      if (process.env[ENV_CMDS_RELATIVE_URI]) {
        return {
          hostname: CMDS_IP,
          path: process.env[ENV_CMDS_RELATIVE_URI]
        };
      }
      if (process.env[ENV_CMDS_FULL_URI]) {
        const parsed = url.parse(process.env[ENV_CMDS_FULL_URI]);
        if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {
          throw new propertyProvider.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {
            tryNextLink: false,
            logger: logger2
          });
        }
        if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {
          throw new propertyProvider.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {
            tryNextLink: false,
            logger: logger2
          });
        }
        return {
          ...parsed,
          port: parsed.port ? parseInt(parsed.port, 10) : void 0
        };
      }
      throw new propertyProvider.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, {
        tryNextLink: false,
        logger: logger2
      });
    };
    var InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends propertyProvider.CredentialsProviderError {
      tryNextLink;
      name = "InstanceMetadataV1FallbackError";
      constructor(message, tryNextLink = true) {
        super(message, tryNextLink);
        this.tryNextLink = tryNextLink;
        Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError.prototype);
      }
    };
    exports2.Endpoint = void 0;
    (function(Endpoint) {
      Endpoint["IPv4"] = "http://169.254.169.254";
      Endpoint["IPv6"] = "http://[fd00:ec2::254]";
    })(exports2.Endpoint || (exports2.Endpoint = {}));
    var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT";
    var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint";
    var ENDPOINT_CONFIG_OPTIONS = {
      environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_NAME],
      configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],
      default: void 0
    };
    var EndpointMode;
    (function(EndpointMode2) {
      EndpointMode2["IPv4"] = "IPv4";
      EndpointMode2["IPv6"] = "IPv6";
    })(EndpointMode || (EndpointMode = {}));
    var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE";
    var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode";
    var ENDPOINT_MODE_CONFIG_OPTIONS = {
      environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_MODE_NAME],
      configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],
      default: EndpointMode.IPv4
    };
    var getInstanceMetadataEndpoint = async () => urlParser.parseUrl(await getFromEndpointConfig() || await getFromEndpointModeConfig());
    var getFromEndpointConfig = async () => nodeConfigProvider.loadConfig(ENDPOINT_CONFIG_OPTIONS)();
    var getFromEndpointModeConfig = async () => {
      const endpointMode = await nodeConfigProvider.loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();
      switch (endpointMode) {
        case EndpointMode.IPv4:
          return exports2.Endpoint.IPv4;
        case EndpointMode.IPv6:
          return exports2.Endpoint.IPv6;
        default:
          throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`);
      }
    };
    var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;
    var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;
    var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html";
    var getExtendedInstanceMetadataCredentials = (credentials, logger2) => {
      const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);
      const newExpiration = new Date(Date.now() + refreshInterval * 1e3);
      logger2.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}.
For more information, please visit: ` + STATIC_STABILITY_DOC_URL);
      const originalExpiration = credentials.originalExpiration ?? credentials.expiration;
      return {
        ...credentials,
        ...originalExpiration ? { originalExpiration } : {},
        expiration: newExpiration
      };
    };
    var staticStabilityProvider = (provider, options = {}) => {
      const logger2 = options?.logger || console;
      let pastCredentials;
      return async () => {
        let credentials;
        try {
          credentials = await provider();
          if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {
            credentials = getExtendedInstanceMetadataCredentials(credentials, logger2);
          }
        } catch (e5) {
          if (pastCredentials) {
            logger2.warn("Credential renew failed: ", e5);
            credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger2);
          } else {
            throw e5;
          }
        }
        pastCredentials = credentials;
        return credentials;
      };
    };
    var IMDS_PATH = "/latest/meta-data/iam/security-credentials/";
    var IMDS_TOKEN_PATH = "/latest/api/token";
    var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED";
    var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled";
    var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token";
    var fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger });
    var getInstanceMetadataProvider = (init = {}) => {
      let disableFetchToken = false;
      const { logger: logger2, profile } = init;
      const { timeout, maxRetries } = providerConfigFromInit(init);
      const getCredentials = async (maxRetries2, options) => {
        const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;
        if (isImdsV1Fallback) {
          let fallbackBlockedFromProfile = false;
          let fallbackBlockedFromProcessEnv = false;
          const configValue = await nodeConfigProvider.loadConfig({
            environmentVariableSelector: (env2) => {
              const envValue = env2[AWS_EC2_METADATA_V1_DISABLED];
              fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false";
              if (envValue === void 0) {
                throw new propertyProvider.CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });
              }
              return fallbackBlockedFromProcessEnv;
            },
            configFileSelector: (profile2) => {
              const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED];
              fallbackBlockedFromProfile = !!profileValue && profileValue !== "false";
              return fallbackBlockedFromProfile;
            },
            default: false
          }, {
            profile
          })();
          if (init.ec2MetadataV1Disabled || configValue) {
            const causes = [];
            if (init.ec2MetadataV1Disabled)
              causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");
            if (fallbackBlockedFromProfile)
              causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);
            if (fallbackBlockedFromProcessEnv)
              causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);
            throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(", ")}].`);
          }
        }
        const imdsProfile = (await retry(async () => {
          let profile2;
          try {
            profile2 = await getProfile(options);
          } catch (err) {
            if (err.statusCode === 401) {
              disableFetchToken = false;
            }
            throw err;
          }
          return profile2;
        }, maxRetries2)).trim();
        return retry(async () => {
          let creds;
          try {
            creds = await getCredentialsFromProfile(imdsProfile, options, init);
          } catch (err) {
            if (err.statusCode === 401) {
              disableFetchToken = false;
            }
            throw err;
          }
          return creds;
        }, maxRetries2);
      };
      return async () => {
        const endpoint = await getInstanceMetadataEndpoint();
        if (disableFetchToken) {
          logger2?.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)");
          return getCredentials(maxRetries, { ...endpoint, timeout });
        } else {
          let token;
          try {
            token = (await getMetadataToken({ ...endpoint, timeout })).toString();
          } catch (error3) {
            if (error3?.statusCode === 400) {
              throw Object.assign(error3, {
                message: "EC2 Metadata token request returned error"
              });
            } else if (error3.message === "TimeoutError" || [403, 404, 405].includes(error3.statusCode)) {
              disableFetchToken = true;
            }
            logger2?.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)");
            return getCredentials(maxRetries, { ...endpoint, timeout });
          }
          return getCredentials(maxRetries, {
            ...endpoint,
            headers: {
              [X_AWS_EC2_METADATA_TOKEN]: token
            },
            timeout
          });
        }
      };
    };
    var getMetadataToken = async (options) => httpRequest({
      ...options,
      path: IMDS_TOKEN_PATH,
      method: "PUT",
      headers: {
        "x-aws-ec2-metadata-token-ttl-seconds": "21600"
      }
    });
    var getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString();
    var getCredentialsFromProfile = async (profile, options, init) => {
      const credentialsResponse = JSON.parse((await httpRequest({
        ...options,
        path: IMDS_PATH + profile
      })).toString());
      if (!isImdsCredentials(credentialsResponse)) {
        throw new propertyProvider.CredentialsProviderError("Invalid response received from instance metadata service.", {
          logger: init.logger
        });
      }
      return fromImdsCredentials(credentialsResponse);
    };
    exports2.DEFAULT_MAX_RETRIES = DEFAULT_MAX_RETRIES;
    exports2.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
    exports2.ENV_CMDS_AUTH_TOKEN = ENV_CMDS_AUTH_TOKEN;
    exports2.ENV_CMDS_FULL_URI = ENV_CMDS_FULL_URI;
    exports2.ENV_CMDS_RELATIVE_URI = ENV_CMDS_RELATIVE_URI;
    exports2.fromContainerMetadata = fromContainerMetadata;
    exports2.fromInstanceMetadata = fromInstanceMetadata;
    exports2.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint;
    exports2.httpRequest = httpRequest;
    exports2.providerConfigFromInit = providerConfigFromInit;
  }
});

// ../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js
var require_checkUrl = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.checkUrl = void 0;
    var property_provider_1 = require_dist_cjs28();
    var ECS_CONTAINER_HOST = "169.254.170.2";
    var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23";
    var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]";
    var checkUrl = (url, logger2) => {
      if (url.protocol === "https:") {
        return;
      }
      if (url.hostname === ECS_CONTAINER_HOST || url.hostname === EKS_CONTAINER_HOST_IPv4 || url.hostname === EKS_CONTAINER_HOST_IPv6) {
        return;
      }
      if (url.hostname.includes("[")) {
        if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") {
          return;
        }
      } else {
        if (url.hostname === "localhost") {
          return;
        }
        const ipComponents = url.hostname.split(".");
        const inRange = (component) => {
          const num = parseInt(component, 10);
          return 0 <= num && num <= 255;
        };
        if (ipComponents[0] === "127" && inRange(ipComponents[1]) && inRange(ipComponents[2]) && inRange(ipComponents[3]) && ipComponents.length === 4) {
          return;
        }
      }
      throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
  - loopback CIDR 127.0.0.0/8 or [::1/128]
  - ECS container host 169.254.170.2
  - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger: logger2 });
    };
    exports2.checkUrl = checkUrl;
  }
});

// ../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js
var require_requestHelpers = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.createGetRequest = createGetRequest;
    exports2.getCredentials = getCredentials;
    var property_provider_1 = require_dist_cjs28();
    var protocol_http_1 = require_dist_cjs2();
    var smithy_client_1 = require_dist_cjs34();
    var util_stream_1 = require_dist_cjs16();
    function createGetRequest(url) {
      return new protocol_http_1.HttpRequest({
        protocol: url.protocol,
        hostname: url.hostname,
        port: Number(url.port),
        path: url.pathname,
        query: Array.from(url.searchParams.entries()).reduce((acc, [k5, v]) => {
          acc[k5] = v;
          return acc;
        }, {}),
        fragment: url.hash
      });
    }
    async function getCredentials(response, logger2) {
      const stream = (0, util_stream_1.sdkStreamMixin)(response.body);
      const str = await stream.transformToString();
      if (response.statusCode === 200) {
        const parsed = JSON.parse(str);
        if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") {
          throw new property_provider_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger: logger2 });
        }
        return {
          accessKeyId: parsed.AccessKeyId,
          secretAccessKey: parsed.SecretAccessKey,
          sessionToken: parsed.Token,
          expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration)
        };
      }
      if (response.statusCode >= 400 && response.statusCode < 500) {
        let parsedBody = {};
        try {
          parsedBody = JSON.parse(str);
        } catch (e5) {
        }
        throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger2 }), {
          Code: parsedBody.Code,
          Message: parsedBody.Message
        });
      }
      throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger2 });
    }
  }
});

// ../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js
var require_retry_wrapper = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.retryWrapper = void 0;
    var retryWrapper = (toRetry, maxRetries, delayMs) => {
      return async () => {
        for (let i5 = 0; i5 < maxRetries; ++i5) {
          try {
            return await toRetry();
          } catch (e5) {
            await new Promise((resolve) => setTimeout(resolve, delayMs));
          }
        }
        return await toRetry();
      };
    };
    exports2.retryWrapper = retryWrapper;
  }
});

// ../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js
var require_fromHttp = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.fromHttp = void 0;
    var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
    var client_1 = (init_client(), __toCommonJS(client_exports));
    var node_http_handler_1 = require_dist_cjs13();
    var property_provider_1 = require_dist_cjs28();
    var promises_1 = tslib_1.__importDefault(require("node:fs/promises"));
    var checkUrl_1 = require_checkUrl();
    var requestHelpers_1 = require_requestHelpers();
    var retry_wrapper_1 = require_retry_wrapper();
    var AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
    var DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2";
    var AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
    var AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE";
    var AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
    var fromHttp = (options = {}) => {
      options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
      let host;
      const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
      const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];
      const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];
      const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];
      const warn2 = options.logger?.constructor?.name === "NoOpLogger" || !options.logger?.warn ? console.warn : options.logger.warn.bind(options.logger);
      if (relative && full) {
        warn2("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.");
        warn2("awsContainerCredentialsFullUri will take precedence.");
      }
      if (token && tokenFile) {
        warn2("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.");
        warn2("awsContainerAuthorizationToken will take precedence.");
      }
      if (full) {
        host = full;
      } else if (relative) {
        host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;
      } else {
        throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided.
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });
      }
      const url = new URL(host);
      (0, checkUrl_1.checkUrl)(url, options.logger);
      const requestHandler = node_http_handler_1.NodeHttpHandler.create({
        requestTimeout: options.timeout ?? 1e3,
        connectionTimeout: options.timeout ?? 1e3
      });
      return (0, retry_wrapper_1.retryWrapper)(async () => {
        const request = (0, requestHelpers_1.createGetRequest)(url);
        if (token) {
          request.headers.Authorization = token;
        } else if (tokenFile) {
          request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString();
        }
        try {
          const result = await requestHandler.handle(request);
          return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, "CREDENTIALS_HTTP", "z"));
        } catch (e5) {
          throw new property_provider_1.CredentialsProviderError(String(e5), { logger: options.logger });
        }
      }, options.maxRetries ?? 3, options.timeout ?? 1e3);
    };
    exports2.fromHttp = fromHttp;
  }
});

// ../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js
var require_dist_cjs39 = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.fromHttp = void 0;
    var fromHttp_1 = require_fromHttp();
    Object.defineProperty(exports2, "fromHttp", { enumerable: true, get: function() {
      return fromHttp_1.fromHttp;
    } });
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js
function createAwsAuthSigv4HttpAuthOption(authParameters) {
  return {
    schemeId: "aws.auth#sigv4",
    signingProperties: {
      name: "sso-oauth",
      region: authParameters.region
    },
    propertiesExtractor: (config, context) => ({
      signingProperties: {
        config,
        context
      }
    })
  };
}
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
  return {
    schemeId: "smithy.api#noAuth"
  };
}
var import_util_middleware5, defaultSSOOIDCHttpAuthSchemeParametersProvider, defaultSSOOIDCHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig;
var init_httpAuthSchemeProvider = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js"() {
    init_httpAuthSchemes2();
    import_util_middleware5 = __toESM(require_dist_cjs6());
    defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
      return {
        operation: (0, import_util_middleware5.getSmithyContext)(context).operation,
        region: await (0, import_util_middleware5.normalizeProvider)(config.region)() || (() => {
          throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
        })()
      };
    };
    defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {
      const options = [];
      switch (authParameters.operation) {
        case "CreateToken": {
          options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
          break;
        }
        default: {
          options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
        }
      }
      return options;
    };
    resolveHttpAuthSchemeConfig = (config) => {
      const config_0 = resolveAwsSdkSigV4Config(config);
      return Object.assign(config_0, {
        authSchemePreference: (0, import_util_middleware5.normalizeProvider)(config.authSchemePreference ?? [])
      });
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js
var resolveClientEndpointParameters, commonParams;
var init_EndpointParameters = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js"() {
    resolveClientEndpointParameters = (options) => {
      return Object.assign(options, {
        useDualstackEndpoint: options.useDualstackEndpoint ?? false,
        useFipsEndpoint: options.useFipsEndpoint ?? false,
        defaultSigningName: "sso-oauth"
      });
    };
    commonParams = {
      UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
      Endpoint: { type: "builtInParams", name: "endpoint" },
      Region: { type: "builtInParams", name: "region" },
      UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/package.json
var package_default;
var init_package = __esm({
  "../../node_modules/@aws-sdk/nested-clients/package.json"() {
    package_default = {
      name: "@aws-sdk/nested-clients",
      version: "3.997.3",
      description: "Nested clients for AWS SDK packages.",
      main: "./dist-cjs/index.js",
      module: "./dist-es/index.js",
      types: "./dist-types/index.d.ts",
      scripts: {
        build: "yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
        "build:cjs": "node ../../scripts/compilation/inline nested-clients",
        "build:es": "tsc -p tsconfig.es.json",
        "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
        "build:types": "tsc -p tsconfig.types.json",
        "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
        clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
        lint: "node ../../scripts/validation/submodules-linter.js --pkg nested-clients",
        test: "yarn g:vitest run",
        "test:watch": "yarn g:vitest watch"
      },
      engines: {
        node: ">=20.0.0"
      },
      sideEffects: false,
      author: {
        name: "AWS SDK for JavaScript Team",
        url: "https://aws.amazon.com/javascript/"
      },
      license: "Apache-2.0",
      dependencies: {
        "@aws-crypto/sha256-browser": "5.2.0",
        "@aws-crypto/sha256-js": "5.2.0",
        "@aws-sdk/core": "^3.974.5",
        "@aws-sdk/middleware-host-header": "^3.972.10",
        "@aws-sdk/middleware-logger": "^3.972.10",
        "@aws-sdk/middleware-recursion-detection": "^3.972.11",
        "@aws-sdk/middleware-user-agent": "^3.972.35",
        "@aws-sdk/region-config-resolver": "^3.972.13",
        "@aws-sdk/signature-v4-multi-region": "^3.996.22",
        "@aws-sdk/types": "^3.973.8",
        "@aws-sdk/util-endpoints": "^3.996.8",
        "@aws-sdk/util-user-agent-browser": "^3.972.10",
        "@aws-sdk/util-user-agent-node": "^3.973.21",
        "@smithy/config-resolver": "^4.4.17",
        "@smithy/core": "^3.23.17",
        "@smithy/fetch-http-handler": "^5.3.17",
        "@smithy/hash-node": "^4.2.14",
        "@smithy/invalid-dependency": "^4.2.14",
        "@smithy/middleware-content-length": "^4.2.14",
        "@smithy/middleware-endpoint": "^4.4.32",
        "@smithy/middleware-retry": "^4.5.5",
        "@smithy/middleware-serde": "^4.2.20",
        "@smithy/middleware-stack": "^4.2.14",
        "@smithy/node-config-provider": "^4.3.14",
        "@smithy/node-http-handler": "^4.6.1",
        "@smithy/protocol-http": "^5.3.14",
        "@smithy/smithy-client": "^4.12.13",
        "@smithy/types": "^4.14.1",
        "@smithy/url-parser": "^4.2.14",
        "@smithy/util-base64": "^4.3.2",
        "@smithy/util-body-length-browser": "^4.2.2",
        "@smithy/util-body-length-node": "^4.2.3",
        "@smithy/util-defaults-mode-browser": "^4.3.49",
        "@smithy/util-defaults-mode-node": "^4.2.54",
        "@smithy/util-endpoints": "^3.4.2",
        "@smithy/util-middleware": "^4.2.14",
        "@smithy/util-retry": "^4.3.4",
        "@smithy/util-utf8": "^4.2.2",
        tslib: "^2.6.2"
      },
      devDependencies: {
        concurrently: "7.0.0",
        "downlevel-dts": "0.10.1",
        premove: "4.0.0",
        typescript: "~5.8.3"
      },
      typesVersions: {
        "<4.5": {
          "dist-types/*": [
            "dist-types/ts3.4/*"
          ]
        }
      },
      files: [
        "./cognito-identity.d.ts",
        "./cognito-identity.js",
        "./signin.d.ts",
        "./signin.js",
        "./sso-oidc.d.ts",
        "./sso-oidc.js",
        "./sso.d.ts",
        "./sso.js",
        "./sts.d.ts",
        "./sts.js",
        "dist-*/**"
      ],
      browser: {
        "./dist-es/submodules/cognito-identity/runtimeConfig": "./dist-es/submodules/cognito-identity/runtimeConfig.browser",
        "./dist-es/submodules/signin/runtimeConfig": "./dist-es/submodules/signin/runtimeConfig.browser",
        "./dist-es/submodules/sso-oidc/runtimeConfig": "./dist-es/submodules/sso-oidc/runtimeConfig.browser",
        "./dist-es/submodules/sso/runtimeConfig": "./dist-es/submodules/sso/runtimeConfig.browser",
        "./dist-es/submodules/sts/runtimeConfig": "./dist-es/submodules/sts/runtimeConfig.browser"
      },
      "react-native": {},
      homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
      repository: {
        type: "git",
        url: "https://github.com/aws/aws-sdk-js-v3.git",
        directory: "packages/nested-clients"
      },
      exports: {
        "./package.json": "./package.json",
        "./sso-oidc": {
          types: "./dist-types/submodules/sso-oidc/index.d.ts",
          module: "./dist-es/submodules/sso-oidc/index.js",
          node: "./dist-cjs/submodules/sso-oidc/index.js",
          import: "./dist-es/submodules/sso-oidc/index.js",
          require: "./dist-cjs/submodules/sso-oidc/index.js"
        },
        "./sts": {
          types: "./dist-types/submodules/sts/index.d.ts",
          module: "./dist-es/submodules/sts/index.js",
          node: "./dist-cjs/submodules/sts/index.js",
          import: "./dist-es/submodules/sts/index.js",
          require: "./dist-cjs/submodules/sts/index.js"
        },
        "./signin": {
          types: "./dist-types/submodules/signin/index.d.ts",
          module: "./dist-es/submodules/signin/index.js",
          node: "./dist-cjs/submodules/signin/index.js",
          import: "./dist-es/submodules/signin/index.js",
          require: "./dist-cjs/submodules/signin/index.js"
        },
        "./cognito-identity": {
          types: "./dist-types/submodules/cognito-identity/index.d.ts",
          module: "./dist-es/submodules/cognito-identity/index.js",
          node: "./dist-cjs/submodules/cognito-identity/index.js",
          import: "./dist-es/submodules/cognito-identity/index.js",
          require: "./dist-cjs/submodules/cognito-identity/index.js"
        },
        "./sso": {
          types: "./dist-types/submodules/sso/index.d.ts",
          module: "./dist-es/submodules/sso/index.js",
          node: "./dist-cjs/submodules/sso/index.js",
          import: "./dist-es/submodules/sso/index.js",
          require: "./dist-cjs/submodules/sso/index.js"
        }
      }
    };
  }
});

// ../../node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js
var require_dist_cjs40 = __commonJS({
  "../../node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js"(exports2) {
    "use strict";
    var node_os = require("node:os");
    var node_process = require("node:process");
    var utilConfigProvider = require_dist_cjs25();
    var promises = require("node:fs/promises");
    var node_path = require("node:path");
    var middlewareUserAgent = require_dist_cjs24();
    var getRuntimeUserAgentPair = () => {
      const runtimesToCheck = ["deno", "bun", "llrt"];
      for (const runtime of runtimesToCheck) {
        if (node_process.versions[runtime]) {
          return [`md/${runtime}`, node_process.versions[runtime]];
        }
      }
      return ["md/nodejs", node_process.versions.node];
    };
    var getNodeModulesParentDirs = (dirname) => {
      const cwd = process.cwd();
      if (!dirname) {
        return [cwd];
      }
      const normalizedPath = node_path.normalize(dirname);
      const parts = normalizedPath.split(node_path.sep);
      const nodeModulesIndex = parts.indexOf("node_modules");
      const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(node_path.sep) : normalizedPath;
      if (cwd === parentDir) {
        return [cwd];
      }
      return [parentDir, cwd];
    };
    var SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/;
    var getSanitizedTypeScriptVersion = (version = "") => {
      const match = version.match(SEMVER_REGEX);
      if (!match) {
        return void 0;
      }
      const [major, minor, patch, prerelease] = [match[1], match[2], match[3], match[4]];
      return prerelease ? `${major}.${minor}.${patch}-${prerelease}` : `${major}.${minor}.${patch}`;
    };
    var ALLOWED_PREFIXES = ["^", "~", ">=", "<=", ">", "<"];
    var ALLOWED_DIST_TAGS = ["latest", "beta", "dev", "rc", "insiders", "next"];
    var getSanitizedDevTypeScriptVersion = (version = "") => {
      if (ALLOWED_DIST_TAGS.includes(version)) {
        return version;
      }
      const prefix = ALLOWED_PREFIXES.find((p2) => version.startsWith(p2)) ?? "";
      const sanitizedTypeScriptVersion = getSanitizedTypeScriptVersion(version.slice(prefix.length));
      if (!sanitizedTypeScriptVersion) {
        return void 0;
      }
      return `${prefix}${sanitizedTypeScriptVersion}`;
    };
    var tscVersion;
    var TS_PACKAGE_JSON = node_path.join("node_modules", "typescript", "package.json");
    var getTypeScriptUserAgentPair = async () => {
      if (tscVersion === null) {
        return void 0;
      } else if (typeof tscVersion === "string") {
        return ["md/tsc", tscVersion];
      }
      let isTypeScriptDetectionDisabled = false;
      try {
        isTypeScriptDetectionDisabled = utilConfigProvider.booleanSelector(process.env, "AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED", utilConfigProvider.SelectorType.ENV) || false;
      } catch {
      }
      if (isTypeScriptDetectionDisabled) {
        tscVersion = null;
        return void 0;
      }
      const dirname = typeof __dirname !== "undefined" ? __dirname : void 0;
      const nodeModulesParentDirs = getNodeModulesParentDirs(dirname);
      let versionFromApp;
      for (const nodeModulesParentDir of nodeModulesParentDirs) {
        try {
          const appPackageJsonPath = node_path.join(nodeModulesParentDir, "package.json");
          const packageJson = await promises.readFile(appPackageJsonPath, "utf-8");
          const { dependencies, devDependencies } = JSON.parse(packageJson);
          const version = devDependencies?.typescript ?? dependencies?.typescript;
          if (typeof version !== "string") {
            continue;
          }
          versionFromApp = version;
          break;
        } catch {
        }
      }
      if (!versionFromApp) {
        tscVersion = null;
        return void 0;
      }
      let versionFromNodeModules;
      for (const nodeModulesParentDir of nodeModulesParentDirs) {
        try {
          const tsPackageJsonPath = node_path.join(nodeModulesParentDir, TS_PACKAGE_JSON);
          const packageJson = await promises.readFile(tsPackageJsonPath, "utf-8");
          const { version } = JSON.parse(packageJson);
          const sanitizedVersion2 = getSanitizedTypeScriptVersion(version);
          if (typeof sanitizedVersion2 !== "string") {
            continue;
          }
          versionFromNodeModules = sanitizedVersion2;
          break;
        } catch {
        }
      }
      if (versionFromNodeModules) {
        tscVersion = versionFromNodeModules;
        return ["md/tsc", tscVersion];
      }
      const sanitizedVersion = getSanitizedDevTypeScriptVersion(versionFromApp);
      if (typeof sanitizedVersion !== "string") {
        tscVersion = null;
        return void 0;
      }
      tscVersion = `dev_${sanitizedVersion}`;
      return ["md/tsc", tscVersion];
    };
    var crtAvailability = {
      isCrtAvailable: false
    };
    var isCrtAvailable = () => {
      if (crtAvailability.isCrtAvailable) {
        return ["md/crt-avail"];
      }
      return null;
    };
    var createDefaultUserAgentProvider5 = ({ serviceId, clientVersion }) => {
      const runtimeUserAgentPair = getRuntimeUserAgentPair();
      return async (config) => {
        const sections = [
          ["aws-sdk-js", clientVersion],
          ["ua", "2.1"],
          [`os/${node_os.platform()}`, node_os.release()],
          ["lang/js"],
          runtimeUserAgentPair
        ];
        const typescriptUserAgentPair = await getTypeScriptUserAgentPair();
        if (typescriptUserAgentPair) {
          sections.push(typescriptUserAgentPair);
        }
        const crtAvailable = isCrtAvailable();
        if (crtAvailable) {
          sections.push(crtAvailable);
        }
        if (serviceId) {
          sections.push([`api/${serviceId}`, clientVersion]);
        }
        if (node_process.env.AWS_EXECUTION_ENV) {
          sections.push([`exec-env/${node_process.env.AWS_EXECUTION_ENV}`]);
        }
        const appId = await config?.userAgentAppId?.();
        const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
        return resolvedUserAgent;
      };
    };
    var defaultUserAgent = createDefaultUserAgentProvider5;
    var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
    var UA_APP_ID_INI_NAME = "sdk_ua_app_id";
    var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";
    var NODE_APP_ID_CONFIG_OPTIONS5 = {
      environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME],
      configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED],
      default: middlewareUserAgent.DEFAULT_UA_APP_ID
    };
    exports2.NODE_APP_ID_CONFIG_OPTIONS = NODE_APP_ID_CONFIG_OPTIONS5;
    exports2.UA_APP_ID_ENV_NAME = UA_APP_ID_ENV_NAME;
    exports2.UA_APP_ID_INI_NAME = UA_APP_ID_INI_NAME;
    exports2.createDefaultUserAgentProvider = createDefaultUserAgentProvider5;
    exports2.crtAvailability = crtAvailability;
    exports2.defaultUserAgent = defaultUserAgent;
  }
});

// ../../node_modules/@smithy/hash-node/dist-cjs/index.js
var require_dist_cjs41 = __commonJS({
  "../../node_modules/@smithy/hash-node/dist-cjs/index.js"(exports2) {
    "use strict";
    var utilBufferFrom = require_dist_cjs8();
    var utilUtf8 = require_dist_cjs9();
    var buffer = require("buffer");
    var crypto3 = require("crypto");
    var Hash5 = class {
      algorithmIdentifier;
      secret;
      hash;
      constructor(algorithmIdentifier, secret) {
        this.algorithmIdentifier = algorithmIdentifier;
        this.secret = secret;
        this.reset();
      }
      update(toHash, encoding) {
        this.hash.update(utilUtf8.toUint8Array(castSourceData(toHash, encoding)));
      }
      digest() {
        return Promise.resolve(this.hash.digest());
      }
      reset() {
        this.hash = this.secret ? crypto3.createHmac(this.algorithmIdentifier, castSourceData(this.secret)) : crypto3.createHash(this.algorithmIdentifier);
      }
    };
    function castSourceData(toCast, encoding) {
      if (buffer.Buffer.isBuffer(toCast)) {
        return toCast;
      }
      if (typeof toCast === "string") {
        return utilBufferFrom.fromString(toCast, encoding);
      }
      if (ArrayBuffer.isView(toCast)) {
        return utilBufferFrom.fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength);
      }
      return utilBufferFrom.fromArrayBuffer(toCast);
    }
    exports2.Hash = Hash5;
  }
});

// ../../node_modules/@smithy/util-body-length-node/dist-cjs/index.js
var require_dist_cjs42 = __commonJS({
  "../../node_modules/@smithy/util-body-length-node/dist-cjs/index.js"(exports2) {
    "use strict";
    var node_fs = require("node:fs");
    var calculateBodyLength5 = (body) => {
      if (!body) {
        return 0;
      }
      if (typeof body === "string") {
        return Buffer.byteLength(body);
      } else if (typeof body.byteLength === "number") {
        return body.byteLength;
      } else if (typeof body.size === "number") {
        return body.size;
      } else if (typeof body.start === "number" && typeof body.end === "number") {
        return body.end + 1 - body.start;
      } else if (body instanceof node_fs.ReadStream) {
        if (body.path != null) {
          return node_fs.lstatSync(body.path).size;
        } else if (typeof body.fd === "number") {
          return node_fs.fstatSync(body.fd).size;
        }
      }
      throw new Error(`Body Length computation failed for ${body}`);
    };
    exports2.calculateBodyLength = calculateBodyLength5;
  }
});

// ../../node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js
var require_dist_cjs43 = __commonJS({
  "../../node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js"(exports2) {
    "use strict";
    var configResolver = require_dist_cjs26();
    var nodeConfigProvider = require_dist_cjs30();
    var propertyProvider = require_dist_cjs28();
    var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV";
    var AWS_REGION_ENV = "AWS_REGION";
    var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION";
    var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
    var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"];
    var IMDS_REGION_PATH = "/latest/meta-data/placement/region";
    var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE";
    var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode";
    var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {
      environmentVariableSelector: (env2) => {
        return env2[AWS_DEFAULTS_MODE_ENV];
      },
      configFileSelector: (profile) => {
        return profile[AWS_DEFAULTS_MODE_CONFIG];
      },
      default: "legacy"
    };
    var resolveDefaultsModeConfig5 = ({ region = nodeConfigProvider.loadConfig(configResolver.NODE_REGION_CONFIG_OPTIONS), defaultsMode = nodeConfigProvider.loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => propertyProvider.memoize(async () => {
      const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
      switch (mode?.toLowerCase()) {
        case "auto":
          return resolveNodeDefaultsModeAuto(region);
        case "in-region":
        case "cross-region":
        case "mobile":
        case "standard":
        case "legacy":
          return Promise.resolve(mode?.toLocaleLowerCase());
        case void 0:
          return Promise.resolve("legacy");
        default:
          throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`);
      }
    });
    var resolveNodeDefaultsModeAuto = async (clientRegion) => {
      if (clientRegion) {
        const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion;
        const inferredRegion = await inferPhysicalRegion();
        if (!inferredRegion) {
          return "standard";
        }
        if (resolvedRegion === inferredRegion) {
          return "in-region";
        } else {
          return "cross-region";
        }
      }
      return "standard";
    };
    var inferPhysicalRegion = async () => {
      if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) {
        return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV];
      }
      if (!process.env[ENV_IMDS_DISABLED]) {
        try {
          const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM(require_dist_cjs38()));
          const endpoint = await getInstanceMetadataEndpoint();
          return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString();
        } catch (e5) {
        }
      }
    };
    exports2.resolveDefaultsModeConfig = resolveDefaultsModeConfig5;
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/cbor/cbor-types.js
function alloc(size) {
  return typeof Buffer !== "undefined" ? Buffer.alloc(size) : new Uint8Array(size);
}
function tag(data2) {
  data2[tagSymbol] = true;
  return data2;
}
var majorUint64, majorNegativeInt64, majorUnstructuredByteString, majorUtf8String, majorList, majorMap, majorTag, majorSpecial, specialFalse, specialTrue, specialNull, specialUndefined, extendedOneByte, extendedFloat16, extendedFloat32, extendedFloat64, minorIndefinite, tagSymbol;
var init_cbor_types = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/cbor/cbor-types.js"() {
    majorUint64 = 0;
    majorNegativeInt64 = 1;
    majorUnstructuredByteString = 2;
    majorUtf8String = 3;
    majorList = 4;
    majorMap = 5;
    majorTag = 6;
    majorSpecial = 7;
    specialFalse = 20;
    specialTrue = 21;
    specialNull = 22;
    specialUndefined = 23;
    extendedOneByte = 24;
    extendedFloat16 = 25;
    extendedFloat32 = 26;
    extendedFloat64 = 27;
    minorIndefinite = 31;
    tagSymbol = /* @__PURE__ */ Symbol("@smithy/core/cbor::tagSymbol");
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js
function setPayload(bytes) {
  payload = bytes;
  dataView = new DataView(payload.buffer, payload.byteOffset, payload.byteLength);
}
function decode(at, to) {
  if (at >= to) {
    throw new Error("unexpected end of (decode) payload.");
  }
  const major = (payload[at] & 224) >> 5;
  const minor = payload[at] & 31;
  switch (major) {
    case majorUint64:
    case majorNegativeInt64:
    case majorTag:
      let unsignedInt;
      let offset;
      if (minor < 24) {
        unsignedInt = minor;
        offset = 1;
      } else {
        switch (minor) {
          case extendedOneByte:
          case extendedFloat16:
          case extendedFloat32:
          case extendedFloat64:
            const countLength = minorValueToArgumentLength[minor];
            const countOffset = countLength + 1;
            offset = countOffset;
            if (to - at < countOffset) {
              throw new Error(`countLength ${countLength} greater than remaining buf len.`);
            }
            const countIndex = at + 1;
            if (countLength === 1) {
              unsignedInt = payload[countIndex];
            } else if (countLength === 2) {
              unsignedInt = dataView.getUint16(countIndex);
            } else if (countLength === 4) {
              unsignedInt = dataView.getUint32(countIndex);
            } else {
              unsignedInt = dataView.getBigUint64(countIndex);
            }
            break;
          default:
            throw new Error(`unexpected minor value ${minor}.`);
        }
      }
      if (major === majorUint64) {
        _offset = offset;
        return castBigInt(unsignedInt);
      } else if (major === majorNegativeInt64) {
        let negativeInt;
        if (typeof unsignedInt === "bigint") {
          negativeInt = BigInt(-1) - unsignedInt;
        } else {
          negativeInt = -1 - unsignedInt;
        }
        _offset = offset;
        return castBigInt(negativeInt);
      } else {
        if (minor === 2 || minor === 3) {
          const length = decodeCount(at + offset, to);
          let b5 = BigInt(0);
          const start = at + offset + _offset;
          for (let i5 = start; i5 < start + length; ++i5) {
            b5 = b5 << BigInt(8) | BigInt(payload[i5]);
          }
          _offset = offset + _offset + length;
          return minor === 3 ? -b5 - BigInt(1) : b5;
        } else if (minor === 4) {
          const decimalFraction = decode(at + offset, to);
          const [exponent, mantissa] = decimalFraction;
          const normalizer = mantissa < 0 ? -1 : 1;
          const mantissaStr = "0".repeat(Math.abs(exponent) + 1) + String(BigInt(normalizer) * BigInt(mantissa));
          let numericString;
          const sign = mantissa < 0 ? "-" : "";
          numericString = exponent === 0 ? mantissaStr : mantissaStr.slice(0, mantissaStr.length + exponent) + "." + mantissaStr.slice(exponent);
          numericString = numericString.replace(/^0+/g, "");
          if (numericString === "") {
            numericString = "0";
          }
          if (numericString[0] === ".") {
            numericString = "0" + numericString;
          }
          numericString = sign + numericString;
          _offset = offset + _offset;
          return nv(numericString);
        } else {
          const value = decode(at + offset, to);
          const valueOffset = _offset;
          _offset = offset + valueOffset;
          return tag({ tag: castBigInt(unsignedInt), value });
        }
      }
    case majorUtf8String:
    case majorMap:
    case majorList:
    case majorUnstructuredByteString:
      if (minor === minorIndefinite) {
        switch (major) {
          case majorUtf8String:
            return decodeUtf8StringIndefinite(at, to);
          case majorMap:
            return decodeMapIndefinite(at, to);
          case majorList:
            return decodeListIndefinite(at, to);
          case majorUnstructuredByteString:
            return decodeUnstructuredByteStringIndefinite(at, to);
        }
      } else {
        switch (major) {
          case majorUtf8String:
            return decodeUtf8String(at, to);
          case majorMap:
            return decodeMap(at, to);
          case majorList:
            return decodeList(at, to);
          case majorUnstructuredByteString:
            return decodeUnstructuredByteString(at, to);
        }
      }
    default:
      return decodeSpecial(at, to);
  }
}
function bytesToUtf8(bytes, at, to) {
  if (USE_BUFFER && bytes.constructor?.name === "Buffer") {
    return bytes.toString("utf-8", at, to);
  }
  if (textDecoder) {
    return textDecoder.decode(bytes.subarray(at, to));
  }
  return (0, import_util_utf84.toUtf8)(bytes.subarray(at, to));
}
function demote(bigInteger) {
  const num = Number(bigInteger);
  if (num < Number.MIN_SAFE_INTEGER || Number.MAX_SAFE_INTEGER < num) {
    console.warn(new Error(`@smithy/core/cbor - truncating BigInt(${bigInteger}) to ${num} with loss of precision.`));
  }
  return num;
}
function bytesToFloat16(a5, b5) {
  const sign = a5 >> 7;
  const exponent = (a5 & 124) >> 2;
  const fraction = (a5 & 3) << 8 | b5;
  const scalar = sign === 0 ? 1 : -1;
  let exponentComponent;
  let summation;
  if (exponent === 0) {
    if (fraction === 0) {
      return 0;
    } else {
      exponentComponent = Math.pow(2, 1 - 15);
      summation = 0;
    }
  } else if (exponent === 31) {
    if (fraction === 0) {
      return scalar * Infinity;
    } else {
      return NaN;
    }
  } else {
    exponentComponent = Math.pow(2, exponent - 15);
    summation = 1;
  }
  summation += fraction / 1024;
  return scalar * (exponentComponent * summation);
}
function decodeCount(at, to) {
  const minor = payload[at] & 31;
  if (minor < 24) {
    _offset = 1;
    return minor;
  }
  if (minor === extendedOneByte || minor === extendedFloat16 || minor === extendedFloat32 || minor === extendedFloat64) {
    const countLength = minorValueToArgumentLength[minor];
    _offset = countLength + 1;
    if (to - at < _offset) {
      throw new Error(`countLength ${countLength} greater than remaining buf len.`);
    }
    const countIndex = at + 1;
    if (countLength === 1) {
      return payload[countIndex];
    } else if (countLength === 2) {
      return dataView.getUint16(countIndex);
    } else if (countLength === 4) {
      return dataView.getUint32(countIndex);
    }
    return demote(dataView.getBigUint64(countIndex));
  }
  throw new Error(`unexpected minor value ${minor}.`);
}
function decodeUtf8String(at, to) {
  const length = decodeCount(at, to);
  const offset = _offset;
  at += offset;
  if (to - at < length) {
    throw new Error(`string len ${length} greater than remaining buf len.`);
  }
  const value = bytesToUtf8(payload, at, at + length);
  _offset = offset + length;
  return value;
}
function decodeUtf8StringIndefinite(at, to) {
  at += 1;
  const vector = [];
  for (const base = at; at < to; ) {
    if (payload[at] === 255) {
      const data2 = alloc(vector.length);
      data2.set(vector, 0);
      _offset = at - base + 2;
      return bytesToUtf8(data2, 0, data2.length);
    }
    const major = (payload[at] & 224) >> 5;
    const minor = payload[at] & 31;
    if (major !== majorUtf8String) {
      throw new Error(`unexpected major type ${major} in indefinite string.`);
    }
    if (minor === minorIndefinite) {
      throw new Error("nested indefinite string.");
    }
    const bytes = decodeUnstructuredByteString(at, to);
    const length = _offset;
    at += length;
    for (let i5 = 0; i5 < bytes.length; ++i5) {
      vector.push(bytes[i5]);
    }
  }
  throw new Error("expected break marker.");
}
function decodeUnstructuredByteString(at, to) {
  const length = decodeCount(at, to);
  const offset = _offset;
  at += offset;
  if (to - at < length) {
    throw new Error(`unstructured byte string len ${length} greater than remaining buf len.`);
  }
  const value = payload.subarray(at, at + length);
  _offset = offset + length;
  return value;
}
function decodeUnstructuredByteStringIndefinite(at, to) {
  at += 1;
  const vector = [];
  for (const base = at; at < to; ) {
    if (payload[at] === 255) {
      const data2 = alloc(vector.length);
      data2.set(vector, 0);
      _offset = at - base + 2;
      return data2;
    }
    const major = (payload[at] & 224) >> 5;
    const minor = payload[at] & 31;
    if (major !== majorUnstructuredByteString) {
      throw new Error(`unexpected major type ${major} in indefinite string.`);
    }
    if (minor === minorIndefinite) {
      throw new Error("nested indefinite string.");
    }
    const bytes = decodeUnstructuredByteString(at, to);
    const length = _offset;
    at += length;
    for (let i5 = 0; i5 < bytes.length; ++i5) {
      vector.push(bytes[i5]);
    }
  }
  throw new Error("expected break marker.");
}
function decodeList(at, to) {
  const listDataLength = decodeCount(at, to);
  const offset = _offset;
  at += offset;
  const base = at;
  const list2 = Array(listDataLength);
  for (let i5 = 0; i5 < listDataLength; ++i5) {
    const item = decode(at, to);
    const itemOffset = _offset;
    list2[i5] = item;
    at += itemOffset;
  }
  _offset = offset + (at - base);
  return list2;
}
function decodeListIndefinite(at, to) {
  at += 1;
  const list2 = [];
  for (const base = at; at < to; ) {
    if (payload[at] === 255) {
      _offset = at - base + 2;
      return list2;
    }
    const item = decode(at, to);
    const n2 = _offset;
    at += n2;
    list2.push(item);
  }
  throw new Error("expected break marker.");
}
function decodeMap(at, to) {
  const mapDataLength = decodeCount(at, to);
  const offset = _offset;
  at += offset;
  const base = at;
  const map2 = {};
  for (let i5 = 0; i5 < mapDataLength; ++i5) {
    if (at >= to) {
      throw new Error("unexpected end of map payload.");
    }
    const major = (payload[at] & 224) >> 5;
    if (major !== majorUtf8String) {
      throw new Error(`unexpected major type ${major} for map key at index ${at}.`);
    }
    const key = decode(at, to);
    at += _offset;
    const value = decode(at, to);
    at += _offset;
    map2[key] = value;
  }
  _offset = offset + (at - base);
  return map2;
}
function decodeMapIndefinite(at, to) {
  at += 1;
  const base = at;
  const map2 = {};
  for (; at < to; ) {
    if (at >= to) {
      throw new Error("unexpected end of map payload.");
    }
    if (payload[at] === 255) {
      _offset = at - base + 2;
      return map2;
    }
    const major = (payload[at] & 224) >> 5;
    if (major !== majorUtf8String) {
      throw new Error(`unexpected major type ${major} for map key.`);
    }
    const key = decode(at, to);
    at += _offset;
    const value = decode(at, to);
    at += _offset;
    map2[key] = value;
  }
  throw new Error("expected break marker.");
}
function decodeSpecial(at, to) {
  const minor = payload[at] & 31;
  switch (minor) {
    case specialTrue:
    case specialFalse:
      _offset = 1;
      return minor === specialTrue;
    case specialNull:
      _offset = 1;
      return null;
    case specialUndefined:
      _offset = 1;
      return null;
    case extendedFloat16:
      if (to - at < 3) {
        throw new Error("incomplete float16 at end of buf.");
      }
      _offset = 3;
      return bytesToFloat16(payload[at + 1], payload[at + 2]);
    case extendedFloat32:
      if (to - at < 5) {
        throw new Error("incomplete float32 at end of buf.");
      }
      _offset = 5;
      return dataView.getFloat32(at + 1);
    case extendedFloat64:
      if (to - at < 9) {
        throw new Error("incomplete float64 at end of buf.");
      }
      _offset = 9;
      return dataView.getFloat64(at + 1);
    default:
      throw new Error(`unexpected minor value ${minor}.`);
  }
}
function castBigInt(bigInt) {
  if (typeof bigInt === "number") {
    return bigInt;
  }
  const num = Number(bigInt);
  if (Number.MIN_SAFE_INTEGER <= num && num <= Number.MAX_SAFE_INTEGER) {
    return num;
  }
  return bigInt;
}
var import_util_utf84, USE_TEXT_DECODER, USE_BUFFER, payload, dataView, textDecoder, _offset, minorValueToArgumentLength;
var init_cbor_decode = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js"() {
    init_serde();
    import_util_utf84 = __toESM(require_dist_cjs9());
    init_cbor_types();
    USE_TEXT_DECODER = typeof TextDecoder !== "undefined";
    USE_BUFFER = typeof Buffer !== "undefined";
    payload = alloc(0);
    dataView = new DataView(payload.buffer, payload.byteOffset, payload.byteLength);
    textDecoder = USE_TEXT_DECODER ? new TextDecoder() : null;
    _offset = 0;
    minorValueToArgumentLength = {
      [extendedOneByte]: 1,
      [extendedFloat16]: 2,
      [extendedFloat32]: 4,
      [extendedFloat64]: 8
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js
function ensureSpace(bytes) {
  const remaining = data.byteLength - cursor;
  if (remaining < bytes) {
    if (cursor < 16e6) {
      resize(Math.max(data.byteLength * 4, data.byteLength + bytes));
    } else {
      resize(data.byteLength + bytes + 16e6);
    }
  }
}
function toUint8Array() {
  const out = alloc(cursor);
  out.set(data.subarray(0, cursor), 0);
  cursor = 0;
  return out;
}
function resize(size) {
  const old = data;
  data = alloc(size);
  if (old) {
    if (old.copy) {
      old.copy(data, 0, 0, old.byteLength);
    } else {
      data.set(old, 0);
    }
  }
  dataView2 = new DataView(data.buffer, data.byteOffset, data.byteLength);
}
function encodeHeader(major, value) {
  if (value < 24) {
    data[cursor++] = major << 5 | value;
  } else if (value < 1 << 8) {
    data[cursor++] = major << 5 | 24;
    data[cursor++] = value;
  } else if (value < 1 << 16) {
    data[cursor++] = major << 5 | extendedFloat16;
    dataView2.setUint16(cursor, value);
    cursor += 2;
  } else if (value < 2 ** 32) {
    data[cursor++] = major << 5 | extendedFloat32;
    dataView2.setUint32(cursor, value);
    cursor += 4;
  } else {
    data[cursor++] = major << 5 | extendedFloat64;
    dataView2.setBigUint64(cursor, typeof value === "bigint" ? value : BigInt(value));
    cursor += 8;
  }
}
function encode(_input) {
  const encodeStack = [_input];
  while (encodeStack.length) {
    const input = encodeStack.pop();
    ensureSpace(typeof input === "string" ? input.length * 4 : 64);
    if (typeof input === "string") {
      if (USE_BUFFER2) {
        encodeHeader(majorUtf8String, Buffer.byteLength(input));
        cursor += data.write(input, cursor);
      } else {
        const bytes = (0, import_util_utf85.fromUtf8)(input);
        encodeHeader(majorUtf8String, bytes.byteLength);
        data.set(bytes, cursor);
        cursor += bytes.byteLength;
      }
      continue;
    } else if (typeof input === "number") {
      if (Number.isInteger(input)) {
        const nonNegative = input >= 0;
        const major = nonNegative ? majorUint64 : majorNegativeInt64;
        const value = nonNegative ? input : -input - 1;
        if (value < 24) {
          data[cursor++] = major << 5 | value;
        } else if (value < 256) {
          data[cursor++] = major << 5 | 24;
          data[cursor++] = value;
        } else if (value < 65536) {
          data[cursor++] = major << 5 | extendedFloat16;
          data[cursor++] = value >> 8;
          data[cursor++] = value;
        } else if (value < 4294967296) {
          data[cursor++] = major << 5 | extendedFloat32;
          dataView2.setUint32(cursor, value);
          cursor += 4;
        } else {
          data[cursor++] = major << 5 | extendedFloat64;
          dataView2.setBigUint64(cursor, BigInt(value));
          cursor += 8;
        }
        continue;
      }
      data[cursor++] = majorSpecial << 5 | extendedFloat64;
      dataView2.setFloat64(cursor, input);
      cursor += 8;
      continue;
    } else if (typeof input === "bigint") {
      const nonNegative = input >= 0;
      const major = nonNegative ? majorUint64 : majorNegativeInt64;
      const value = nonNegative ? input : -input - BigInt(1);
      const n2 = Number(value);
      if (n2 < 24) {
        data[cursor++] = major << 5 | n2;
      } else if (n2 < 256) {
        data[cursor++] = major << 5 | 24;
        data[cursor++] = n2;
      } else if (n2 < 65536) {
        data[cursor++] = major << 5 | extendedFloat16;
        data[cursor++] = n2 >> 8;
        data[cursor++] = n2 & 255;
      } else if (n2 < 4294967296) {
        data[cursor++] = major << 5 | extendedFloat32;
        dataView2.setUint32(cursor, n2);
        cursor += 4;
      } else if (value < BigInt("18446744073709551616")) {
        data[cursor++] = major << 5 | extendedFloat64;
        dataView2.setBigUint64(cursor, value);
        cursor += 8;
      } else {
        const binaryBigInt = value.toString(2);
        const bigIntBytes = new Uint8Array(Math.ceil(binaryBigInt.length / 8));
        let b5 = value;
        let i5 = 0;
        while (bigIntBytes.byteLength - ++i5 >= 0) {
          bigIntBytes[bigIntBytes.byteLength - i5] = Number(b5 & BigInt(255));
          b5 >>= BigInt(8);
        }
        ensureSpace(bigIntBytes.byteLength * 2);
        data[cursor++] = nonNegative ? 194 : 195;
        if (USE_BUFFER2) {
          encodeHeader(majorUnstructuredByteString, Buffer.byteLength(bigIntBytes));
        } else {
          encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength);
        }
        data.set(bigIntBytes, cursor);
        cursor += bigIntBytes.byteLength;
      }
      continue;
    } else if (input === null) {
      data[cursor++] = majorSpecial << 5 | specialNull;
      continue;
    } else if (typeof input === "boolean") {
      data[cursor++] = majorSpecial << 5 | (input ? specialTrue : specialFalse);
      continue;
    } else if (typeof input === "undefined") {
      throw new Error("@smithy/core/cbor: client may not serialize undefined value.");
    } else if (Array.isArray(input)) {
      for (let i5 = input.length - 1; i5 >= 0; --i5) {
        encodeStack.push(input[i5]);
      }
      encodeHeader(majorList, input.length);
      continue;
    } else if (typeof input.byteLength === "number") {
      ensureSpace(input.length * 2);
      encodeHeader(majorUnstructuredByteString, input.length);
      data.set(input, cursor);
      cursor += input.byteLength;
      continue;
    } else if (typeof input === "object") {
      if (input instanceof NumericValue) {
        const decimalIndex = input.string.indexOf(".");
        const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1;
        const mantissa = BigInt(input.string.replace(".", ""));
        data[cursor++] = 196;
        encodeStack.push(mantissa);
        encodeStack.push(exponent);
        encodeHeader(majorList, 2);
        continue;
      }
      if (input[tagSymbol]) {
        if ("tag" in input && "value" in input) {
          encodeStack.push(input.value);
          encodeHeader(majorTag, input.tag);
          continue;
        } else {
          throw new Error("tag encountered with missing fields, need 'tag' and 'value', found: " + JSON.stringify(input));
        }
      }
      const keys = Object.keys(input);
      for (let i5 = keys.length - 1; i5 >= 0; --i5) {
        const key = keys[i5];
        encodeStack.push(input[key]);
        encodeStack.push(key);
      }
      encodeHeader(majorMap, keys.length);
      continue;
    }
    throw new Error(`data type ${input?.constructor?.name ?? typeof input} not compatible for encoding.`);
  }
}
var import_util_utf85, USE_BUFFER2, initialSize, data, dataView2, cursor;
var init_cbor_encode = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js"() {
    init_serde();
    import_util_utf85 = __toESM(require_dist_cjs9());
    init_cbor_types();
    USE_BUFFER2 = typeof Buffer !== "undefined";
    initialSize = 2048;
    data = alloc(initialSize);
    dataView2 = new DataView(data.buffer, data.byteOffset, data.byteLength);
    cursor = 0;
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/cbor/cbor.js
var cbor;
var init_cbor = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/cbor/cbor.js"() {
    init_cbor_decode();
    init_cbor_encode();
    cbor = {
      deserialize(payload2) {
        setPayload(payload2);
        return decode(0, payload2.length);
      },
      serialize(input) {
        try {
          encode(input);
          return toUint8Array();
        } catch (e5) {
          toUint8Array();
          throw e5;
        }
      },
      resizeEncodingBuffer(size) {
        resize(size);
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js
var dateToTag, loadSmithyRpcV2CborErrorCode;
var init_parseCborBody = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js"() {
    init_cbor_types();
    dateToTag = (date2) => {
      return tag({
        tag: 1,
        value: date2.getTime() / 1e3
      });
    };
    loadSmithyRpcV2CborErrorCode = (output, data2) => {
      const sanitizeErrorCode2 = (rawValue) => {
        let cleanValue = rawValue;
        if (typeof cleanValue === "number") {
          cleanValue = cleanValue.toString();
        }
        if (cleanValue.indexOf(",") >= 0) {
          cleanValue = cleanValue.split(",")[0];
        }
        if (cleanValue.indexOf(":") >= 0) {
          cleanValue = cleanValue.split(":")[0];
        }
        if (cleanValue.indexOf("#") >= 0) {
          cleanValue = cleanValue.split("#")[1];
        }
        return cleanValue;
      };
      if (data2["__type"] !== void 0) {
        return sanitizeErrorCode2(data2["__type"]);
      }
      let codeKey;
      for (const key in data2) {
        if (key.toLowerCase() === "code") {
          codeKey = key;
          break;
        }
      }
      if (codeKey && data2[codeKey] !== void 0) {
        return sanitizeErrorCode2(data2[codeKey]);
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js
var import_util_base643, CborCodec, CborShapeSerializer, CborShapeDeserializer;
var init_CborCodec = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js"() {
    init_protocols();
    init_schema();
    init_serde();
    init_serde();
    import_util_base643 = __toESM(require_dist_cjs10());
    init_cbor();
    init_parseCborBody();
    CborCodec = class extends SerdeContext {
      createSerializer() {
        const serializer = new CborShapeSerializer();
        serializer.setSerdeContext(this.serdeContext);
        return serializer;
      }
      createDeserializer() {
        const deserializer = new CborShapeDeserializer();
        deserializer.setSerdeContext(this.serdeContext);
        return deserializer;
      }
    };
    CborShapeSerializer = class extends SerdeContext {
      value;
      write(schema, value) {
        this.value = this.serialize(schema, value);
      }
      serialize(schema, source) {
        const ns = NormalizedSchema.of(schema);
        if (source == null) {
          if (ns.isIdempotencyToken()) {
            return (0, import_uuid.v4)();
          }
          return source;
        }
        if (ns.isBlobSchema()) {
          if (typeof source === "string") {
            return (this.serdeContext?.base64Decoder ?? import_util_base643.fromBase64)(source);
          }
          return source;
        }
        if (ns.isTimestampSchema()) {
          if (typeof source === "number" || typeof source === "bigint") {
            return dateToTag(new Date(Number(source) / 1e3 | 0));
          }
          return dateToTag(source);
        }
        if (typeof source === "function" || typeof source === "object") {
          const sourceObject = source;
          if (ns.isListSchema() && Array.isArray(sourceObject)) {
            const sparse = !!ns.getMergedTraits().sparse;
            const newArray = [];
            let i5 = 0;
            for (const item of sourceObject) {
              const value = this.serialize(ns.getValueSchema(), item);
              if (value != null || sparse) {
                newArray[i5++] = value;
              }
            }
            return newArray;
          }
          if (sourceObject instanceof Date) {
            return dateToTag(sourceObject);
          }
          const newObject = {};
          if (ns.isMapSchema()) {
            const sparse = !!ns.getMergedTraits().sparse;
            for (const key in sourceObject) {
              const value = this.serialize(ns.getValueSchema(), sourceObject[key]);
              if (value != null || sparse) {
                newObject[key] = value;
              }
            }
          } else if (ns.isStructSchema()) {
            for (const [key, memberSchema] of ns.structIterator()) {
              const value = this.serialize(memberSchema, sourceObject[key]);
              if (value != null) {
                newObject[key] = value;
              }
            }
            const isUnion = ns.isUnionSchema();
            if (isUnion && Array.isArray(sourceObject.$unknown)) {
              const [k5, v] = sourceObject.$unknown;
              newObject[k5] = v;
            } else if (typeof sourceObject.__type === "string") {
              for (const k5 in sourceObject) {
                if (!(k5 in newObject)) {
                  newObject[k5] = this.serialize(15, sourceObject[k5]);
                }
              }
            }
          } else if (ns.isDocumentSchema()) {
            for (const key in sourceObject) {
              newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);
            }
          } else if (ns.isBigDecimalSchema()) {
            return sourceObject;
          }
          return newObject;
        }
        return source;
      }
      flush() {
        const buffer = cbor.serialize(this.value);
        this.value = void 0;
        return buffer;
      }
    };
    CborShapeDeserializer = class extends SerdeContext {
      read(schema, bytes) {
        const data2 = cbor.deserialize(bytes);
        return this.readValue(schema, data2);
      }
      readValue(_schema, value) {
        const ns = NormalizedSchema.of(_schema);
        if (ns.isTimestampSchema()) {
          if (typeof value === "number") {
            return _parseEpochTimestamp(value);
          }
          if (typeof value === "object") {
            if (value.tag === 1 && "value" in value) {
              return _parseEpochTimestamp(value.value);
            }
          }
        }
        if (ns.isBlobSchema()) {
          if (typeof value === "string") {
            return (this.serdeContext?.base64Decoder ?? import_util_base643.fromBase64)(value);
          }
          return value;
        }
        if (typeof value === "undefined" || typeof value === "boolean" || typeof value === "number" || typeof value === "string" || typeof value === "bigint" || typeof value === "symbol") {
          return value;
        } else if (typeof value === "object") {
          if (value === null) {
            return null;
          }
          if ("byteLength" in value) {
            return value;
          }
          if (value instanceof Date) {
            return value;
          }
          if (ns.isDocumentSchema()) {
            return value;
          }
          if (ns.isListSchema()) {
            const newArray = [];
            const memberSchema = ns.getValueSchema();
            for (const item of value) {
              const itemValue = this.readValue(memberSchema, item);
              newArray.push(itemValue);
            }
            return newArray;
          }
          const newObject = {};
          if (ns.isMapSchema()) {
            const targetSchema = ns.getValueSchema();
            for (const key in value) {
              const itemValue = this.readValue(targetSchema, value[key]);
              newObject[key] = itemValue;
            }
          } else if (ns.isStructSchema()) {
            const isUnion = ns.isUnionSchema();
            let keys;
            if (isUnion) {
              keys = /* @__PURE__ */ new Set();
              for (const k5 in value) {
                if (k5 !== "__type") {
                  keys.add(k5);
                }
              }
            }
            for (const [key, memberSchema] of ns.structIterator()) {
              if (isUnion) {
                keys.delete(key);
              }
              if (value[key] != null) {
                newObject[key] = this.readValue(memberSchema, value[key]);
              }
            }
            if (isUnion && keys?.size === 1) {
              let newObjectEmpty = true;
              for (const _ in newObject) {
                newObjectEmpty = false;
                break;
              }
              if (newObjectEmpty) {
                const k5 = keys.values().next().value;
                newObject.$unknown = [k5, value[k5]];
              }
            } else if (typeof value.__type === "string") {
              for (const k5 in value) {
                if (!(k5 in newObject)) {
                  newObject[k5] = value[k5];
                }
              }
            }
          } else if (value instanceof NumericValue) {
            return value;
          }
          return newObject;
        } else {
          return value;
        }
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js
var import_util_middleware6, SmithyRpcV2CborProtocol;
var init_SmithyRpcV2CborProtocol = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js"() {
    init_protocols();
    init_schema();
    init_schema();
    import_util_middleware6 = __toESM(require_dist_cjs6());
    init_CborCodec();
    init_parseCborBody();
    SmithyRpcV2CborProtocol = class extends RpcProtocol {
      codec = new CborCodec();
      serializer = this.codec.createSerializer();
      deserializer = this.codec.createDeserializer();
      constructor({ defaultNamespace, errorTypeRegistries: errorTypeRegistries5 }) {
        super({ defaultNamespace, errorTypeRegistries: errorTypeRegistries5 });
      }
      getShapeId() {
        return "smithy.protocols#rpcv2Cbor";
      }
      getPayloadCodec() {
        return this.codec;
      }
      async serializeRequest(operationSchema, input, context) {
        const request = await super.serializeRequest(operationSchema, input, context);
        Object.assign(request.headers, {
          "content-type": this.getDefaultContentType(),
          "smithy-protocol": "rpc-v2-cbor",
          accept: this.getDefaultContentType()
        });
        if (deref(operationSchema.input) === "unit") {
          delete request.body;
          delete request.headers["content-type"];
        } else {
          if (!request.body) {
            this.serializer.write(15, {});
            request.body = this.serializer.flush();
          }
          try {
            request.headers["content-length"] = String(request.body.byteLength);
          } catch (e5) {
          }
        }
        const { service, operation: operation2 } = (0, import_util_middleware6.getSmithyContext)(context);
        const path = `/service/${service}/operation/${operation2}`;
        if (request.path.endsWith("/")) {
          request.path += path.slice(1);
        } else {
          request.path += path;
        }
        return request;
      }
      async deserializeResponse(operationSchema, context, response) {
        return super.deserializeResponse(operationSchema, context, response);
      }
      async handleError(operationSchema, context, response, dataObject, metadata) {
        const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
        const errorMetadata = {
          $metadata: metadata,
          $fault: response.statusCode <= 500 ? "client" : "server"
        };
        let namespace = this.options.defaultNamespace;
        if (errorName.includes("#")) {
          [namespace] = errorName.split("#");
        }
        const registry = this.compositeErrorRegistry;
        const nsRegistry = TypeRegistry.for(namespace);
        registry.copyFrom(nsRegistry);
        let errorSchema;
        try {
          errorSchema = registry.getSchema(errorName);
        } catch (e5) {
          if (dataObject.Message) {
            dataObject.message = dataObject.Message;
          }
          const syntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace);
          registry.copyFrom(syntheticRegistry);
          const baseExceptionSchema = registry.getBaseException();
          if (baseExceptionSchema) {
            const ErrorCtor2 = registry.getErrorCtor(baseExceptionSchema);
            throw Object.assign(new ErrorCtor2({ name: errorName }), errorMetadata, dataObject);
          }
          throw Object.assign(new Error(errorName), errorMetadata, dataObject);
        }
        const ns = NormalizedSchema.of(errorSchema);
        const ErrorCtor = registry.getErrorCtor(errorSchema);
        const message = dataObject.message ?? dataObject.Message ?? "Unknown";
        const exception = new ErrorCtor(message);
        const output = {};
        for (const [name, member2] of ns.structIterator()) {
          output[name] = this.deserializer.readValue(member2, dataObject[name]);
        }
        throw Object.assign(exception, errorMetadata, {
          $fault: ns.getMergedTraits().error,
          message
        }, output);
      }
      getDefaultContentType() {
        return "application/cbor";
      }
    };
  }
});

// ../../node_modules/@smithy/core/dist-es/submodules/cbor/index.js
var init_cbor2 = __esm({
  "../../node_modules/@smithy/core/dist-es/submodules/cbor/index.js"() {
    init_parseCborBody();
    init_SmithyRpcV2CborProtocol();
    init_CborCodec();
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js
var import_smithy_client, ProtocolLib;
var init_ProtocolLib = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js"() {
    init_schema();
    import_smithy_client = __toESM(require_dist_cjs34());
    ProtocolLib = class {
      queryCompat;
      errorRegistry;
      constructor(queryCompat = false) {
        this.queryCompat = queryCompat;
      }
      resolveRestContentType(defaultContentType, inputSchema) {
        const members = inputSchema.getMemberSchemas();
        const httpPayloadMember = Object.values(members).find((m3) => {
          return !!m3.getMergedTraits().httpPayload;
        });
        if (httpPayloadMember) {
          const mediaType = httpPayloadMember.getMergedTraits().mediaType;
          if (mediaType) {
            return mediaType;
          } else if (httpPayloadMember.isStringSchema()) {
            return "text/plain";
          } else if (httpPayloadMember.isBlobSchema()) {
            return "application/octet-stream";
          } else {
            return defaultContentType;
          }
        } else if (!inputSchema.isUnitSchema()) {
          const hasBody = Object.values(members).find((m3) => {
            const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m3.getMergedTraits();
            const noPrefixHeaders = httpPrefixHeaders === void 0;
            return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders;
          });
          if (hasBody) {
            return defaultContentType;
          }
        }
      }
      async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) {
        let errorName = errorIdentifier;
        if (errorIdentifier.includes("#")) {
          [, errorName] = errorIdentifier.split("#");
        }
        const errorMetadata = {
          $metadata: metadata,
          $fault: response.statusCode < 500 ? "client" : "server"
        };
        if (!this.errorRegistry) {
          throw new Error("@aws-sdk/core/protocols - error handler not initialized.");
        }
        try {
          const errorSchema = getErrorSchema?.(this.errorRegistry, errorName) ?? this.errorRegistry.getSchema(errorIdentifier);
          return { errorSchema, errorMetadata };
        } catch (e5) {
          dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError";
          const synthetic = this.errorRegistry;
          const baseExceptionSchema = synthetic.getBaseException();
          if (baseExceptionSchema) {
            const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error;
            throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject);
          }
          const d5 = dataObject;
          const message = d5?.message ?? d5?.Message ?? d5?.Error?.Message ?? d5?.Error?.message;
          throw this.decorateServiceException(Object.assign(new Error(message), {
            name: errorName
          }, errorMetadata), dataObject);
        }
      }
      compose(composite, errorIdentifier, defaultNamespace) {
        let namespace = defaultNamespace;
        if (errorIdentifier.includes("#")) {
          [namespace] = errorIdentifier.split("#");
        }
        const staticRegistry = TypeRegistry.for(namespace);
        const defaultSyntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + defaultNamespace);
        composite.copyFrom(staticRegistry);
        composite.copyFrom(defaultSyntheticRegistry);
        this.errorRegistry = composite;
      }
      decorateServiceException(exception, additions = {}) {
        if (this.queryCompat) {
          const msg = exception.Message ?? additions.Message;
          const error3 = (0, import_smithy_client.decorateServiceException)(exception, additions);
          if (msg) {
            error3.message = msg;
          }
          const errorObj = error3.Error ?? {};
          errorObj.Type = error3.Error?.Type;
          errorObj.Code = error3.Error?.Code;
          errorObj.Message = error3.Error?.message ?? error3.Error?.Message ?? msg;
          error3.Error = errorObj;
          const reqId = error3.$metadata.requestId;
          if (reqId) {
            error3.RequestId = reqId;
          }
          return error3;
        }
        return (0, import_smithy_client.decorateServiceException)(exception, additions);
      }
      setQueryCompatError(output, response) {
        const queryErrorHeader = response.headers?.["x-amzn-query-error"];
        if (output !== void 0 && queryErrorHeader != null) {
          const [Code, Type] = queryErrorHeader.split(";");
          const keys = Object.keys(output);
          const Error2 = {
            Code,
            Type
          };
          output.Code = Code;
          output.Type = Type;
          for (let i5 = 0; i5 < keys.length; i5++) {
            const k5 = keys[i5];
            Error2[k5 === "message" ? "Message" : k5] = output[k5];
          }
          delete Error2.__type;
          output.Error = Error2;
        }
      }
      queryCompatOutput(queryCompatErrorData, errorData) {
        if (queryCompatErrorData.Error) {
          errorData.Error = queryCompatErrorData.Error;
        }
        if (queryCompatErrorData.Type) {
          errorData.Type = queryCompatErrorData.Type;
        }
        if (queryCompatErrorData.Code) {
          errorData.Code = queryCompatErrorData.Code;
        }
      }
      findQueryCompatibleError(registry, errorName) {
        try {
          return registry.getSchema(errorName);
        } catch (e5) {
          return registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName);
        }
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js
var AwsSmithyRpcV2CborProtocol;
var init_AwsSmithyRpcV2CborProtocol = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js"() {
    init_cbor2();
    init_schema();
    init_ProtocolLib();
    AwsSmithyRpcV2CborProtocol = class extends SmithyRpcV2CborProtocol {
      awsQueryCompatible;
      mixin;
      constructor({ defaultNamespace, errorTypeRegistries: errorTypeRegistries5, awsQueryCompatible }) {
        super({ defaultNamespace, errorTypeRegistries: errorTypeRegistries5 });
        this.awsQueryCompatible = !!awsQueryCompatible;
        this.mixin = new ProtocolLib(this.awsQueryCompatible);
      }
      async serializeRequest(operationSchema, input, context) {
        const request = await super.serializeRequest(operationSchema, input, context);
        if (this.awsQueryCompatible) {
          request.headers["x-amzn-query-mode"] = "true";
        }
        return request;
      }
      async handleError(operationSchema, context, response, dataObject, metadata) {
        if (this.awsQueryCompatible) {
          this.mixin.setQueryCompatError(dataObject, response);
        }
        const errorName = (() => {
          const compatHeader = response.headers["x-amzn-query-error"];
          if (compatHeader && this.awsQueryCompatible) {
            return compatHeader.split(";")[0];
          }
          return loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
        })();
        this.mixin.compose(this.compositeErrorRegistry, errorName, this.options.defaultNamespace);
        const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : void 0);
        const ns = NormalizedSchema.of(errorSchema);
        const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
        const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
        const exception = new ErrorCtor(message);
        const output = {};
        for (const [name, member2] of ns.structIterator()) {
          if (dataObject[name] != null) {
            output[name] = this.deserializer.readValue(member2, dataObject[name]);
          }
        }
        if (this.awsQueryCompatible) {
          this.mixin.queryCompatOutput(dataObject, output);
        }
        throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
          $fault: ns.getMergedTraits().error,
          message
        }, output), dataObject);
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js
var _toStr, _toBool, _toNum;
var init_coercing_serializers = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js"() {
    _toStr = (val) => {
      if (val == null) {
        return val;
      }
      if (typeof val === "number" || typeof val === "bigint") {
        const warning = new Error(`Received number ${val} where a string was expected.`);
        warning.name = "Warning";
        console.warn(warning);
        return String(val);
      }
      if (typeof val === "boolean") {
        const warning = new Error(`Received boolean ${val} where a string was expected.`);
        warning.name = "Warning";
        console.warn(warning);
        return String(val);
      }
      return val;
    };
    _toBool = (val) => {
      if (val == null) {
        return val;
      }
      if (typeof val === "number") {
      }
      if (typeof val === "string") {
        const lowercase = val.toLowerCase();
        if (val !== "" && lowercase !== "false" && lowercase !== "true") {
          const warning = new Error(`Received string "${val}" where a boolean was expected.`);
          warning.name = "Warning";
          console.warn(warning);
        }
        return val !== "" && lowercase !== "false";
      }
      return val;
    };
    _toNum = (val) => {
      if (val == null) {
        return val;
      }
      if (typeof val === "boolean") {
      }
      if (typeof val === "string") {
        const num = Number(val);
        if (num.toString() !== val) {
          const warning = new Error(`Received string "${val}" where a number was expected.`);
          warning.name = "Warning";
          console.warn(warning);
          return val;
        }
        return num;
      }
      return val;
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js
var SerdeContextConfig;
var init_ConfigurableSerdeContext = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js"() {
    SerdeContextConfig = class {
      serdeContext;
      setSerdeContext(serdeContext) {
        this.serdeContext = serdeContext;
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js
var UnionSerde;
var init_UnionSerde = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js"() {
    UnionSerde = class {
      from;
      to;
      keys;
      constructor(from, to) {
        this.from = from;
        this.to = to;
        const keys = Object.keys(this.from);
        const set = new Set(keys);
        set.delete("__type");
        this.keys = set;
      }
      mark(key) {
        this.keys.delete(key);
      }
      hasUnknown() {
        return this.keys.size === 1 && Object.keys(this.to).length === 0;
      }
      writeUnknown() {
        if (this.hasUnknown()) {
          const k5 = this.keys.values().next().value;
          const v = this.from[k5];
          this.to.$unknown = [k5, v];
        }
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js
function jsonReviver(key, value, context) {
  if (context?.source) {
    const numericString = context.source;
    if (typeof value === "number") {
      if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {
        const isFractional = numericString.includes(".");
        if (isFractional) {
          return new NumericValue(numericString, "bigDecimal");
        } else {
          return BigInt(numericString);
        }
      }
    }
  }
  return value;
}
var init_jsonReviver = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js"() {
    init_serde();
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js
var import_smithy_client2, import_util_utf86, collectBodyString;
var init_common = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"() {
    import_smithy_client2 = __toESM(require_dist_cjs34());
    import_util_utf86 = __toESM(require_dist_cjs9());
    collectBodyString = (streamBody, context) => (0, import_smithy_client2.collectBody)(streamBody, context).then((body) => (context?.utf8Encoder ?? import_util_utf86.toUtf8)(body));
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js
var parseJsonBody, parseJsonErrorBody, findKey, sanitizeErrorCode, loadRestJsonErrorCode;
var init_parseJsonBody = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() {
    init_common();
    parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
      if (encoded.length) {
        try {
          return JSON.parse(encoded);
        } catch (e5) {
          if (e5?.name === "SyntaxError") {
            Object.defineProperty(e5, "$responseBodyText", {
              value: encoded
            });
          }
          throw e5;
        }
      }
      return {};
    });
    parseJsonErrorBody = async (errorBody, context) => {
      const value = await parseJsonBody(errorBody, context);
      value.message = value.message ?? value.Message;
      return value;
    };
    findKey = (object, key) => Object.keys(object).find((k5) => k5.toLowerCase() === key.toLowerCase());
    sanitizeErrorCode = (rawValue) => {
      let cleanValue = rawValue;
      if (typeof cleanValue === "number") {
        cleanValue = cleanValue.toString();
      }
      if (cleanValue.indexOf(",") >= 0) {
        cleanValue = cleanValue.split(",")[0];
      }
      if (cleanValue.indexOf(":") >= 0) {
        cleanValue = cleanValue.split(":")[0];
      }
      if (cleanValue.indexOf("#") >= 0) {
        cleanValue = cleanValue.split("#")[1];
      }
      return cleanValue;
    };
    loadRestJsonErrorCode = (output, data2) => {
      const headerKey = findKey(output.headers, "x-amzn-errortype");
      if (headerKey !== void 0) {
        return sanitizeErrorCode(output.headers[headerKey]);
      }
      if (data2 && typeof data2 === "object") {
        const codeKey = findKey(data2, "code");
        if (codeKey && data2[codeKey] !== void 0) {
          return sanitizeErrorCode(data2[codeKey]);
        }
        if (data2["__type"] !== void 0) {
          return sanitizeErrorCode(data2["__type"]);
        }
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js
var import_util_base644, JsonShapeDeserializer;
var init_JsonShapeDeserializer = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js"() {
    init_protocols();
    init_schema();
    init_serde();
    import_util_base644 = __toESM(require_dist_cjs10());
    init_ConfigurableSerdeContext();
    init_UnionSerde();
    init_jsonReviver();
    init_parseJsonBody();
    JsonShapeDeserializer = class extends SerdeContextConfig {
      settings;
      constructor(settings) {
        super();
        this.settings = settings;
      }
      async read(schema, data2) {
        return this._read(schema, typeof data2 === "string" ? JSON.parse(data2, jsonReviver) : await parseJsonBody(data2, this.serdeContext));
      }
      readObject(schema, data2) {
        return this._read(schema, data2);
      }
      _read(schema, value) {
        const isObject = value !== null && typeof value === "object";
        const ns = NormalizedSchema.of(schema);
        if (isObject) {
          if (ns.isStructSchema()) {
            const record = value;
            const union = ns.isUnionSchema();
            const out = {};
            let nameMap = void 0;
            const { jsonName } = this.settings;
            if (jsonName) {
              nameMap = {};
            }
            let unionSerde;
            if (union) {
              unionSerde = new UnionSerde(record, out);
            }
            for (const [memberName, memberSchema] of ns.structIterator()) {
              let fromKey = memberName;
              if (jsonName) {
                fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;
                nameMap[fromKey] = memberName;
              }
              if (union) {
                unionSerde.mark(fromKey);
              }
              if (record[fromKey] != null) {
                out[memberName] = this._read(memberSchema, record[fromKey]);
              }
            }
            if (union) {
              unionSerde.writeUnknown();
            } else if (typeof record.__type === "string") {
              for (const k5 in record) {
                const v = record[k5];
                const t = jsonName ? nameMap[k5] ?? k5 : k5;
                if (!(t in out)) {
                  out[t] = v;
                }
              }
            }
            return out;
          }
          if (Array.isArray(value) && ns.isListSchema()) {
            const listMember = ns.getValueSchema();
            const out = [];
            for (const item of value) {
              out.push(this._read(listMember, item));
            }
            return out;
          }
          if (ns.isMapSchema()) {
            const mapMember = ns.getValueSchema();
            const out = {};
            for (const _k in value) {
              out[_k] = this._read(mapMember, value[_k]);
            }
            return out;
          }
        }
        if (ns.isBlobSchema() && typeof value === "string") {
          return (0, import_util_base644.fromBase64)(value);
        }
        const mediaType = ns.getMergedTraits().mediaType;
        if (ns.isStringSchema() && typeof value === "string" && mediaType) {
          const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
          if (isJson) {
            return LazyJsonString.from(value);
          }
          return value;
        }
        if (ns.isTimestampSchema() && value != null) {
          const format2 = determineTimestampFormat(ns, this.settings);
          switch (format2) {
            case 5:
              return parseRfc3339DateTimeWithOffset(value);
            case 6:
              return parseRfc7231DateTime(value);
            case 7:
              return parseEpochTimestamp(value);
            default:
              console.warn("Missing timestamp format, parsing value with Date constructor:", value);
              return new Date(value);
          }
        }
        if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) {
          return BigInt(value);
        }
        if (ns.isBigDecimalSchema() && value != void 0) {
          if (value instanceof NumericValue) {
            return value;
          }
          const untyped = value;
          if (untyped.type === "bigDecimal" && "string" in untyped) {
            return new NumericValue(untyped.string, untyped.type);
          }
          return new NumericValue(String(value), "bigDecimal");
        }
        if (ns.isNumericSchema() && typeof value === "string") {
          switch (value) {
            case "Infinity":
              return Infinity;
            case "-Infinity":
              return -Infinity;
            case "NaN":
              return NaN;
          }
          return value;
        }
        if (ns.isDocumentSchema()) {
          if (isObject) {
            const out = Array.isArray(value) ? [] : {};
            for (const k5 in value) {
              const v = value[k5];
              if (v instanceof NumericValue) {
                out[k5] = v;
              } else {
                out[k5] = this._read(ns, v);
              }
            }
            return out;
          } else {
            return structuredClone(value);
          }
        }
        return value;
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js
var NUMERIC_CONTROL_CHAR, JsonReplacer;
var init_jsonReplacer = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js"() {
    init_serde();
    NUMERIC_CONTROL_CHAR = String.fromCharCode(925);
    JsonReplacer = class {
      values = /* @__PURE__ */ new Map();
      counter = 0;
      stage = 0;
      createReplacer() {
        if (this.stage === 1) {
          throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");
        }
        if (this.stage === 2) {
          throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
        }
        this.stage = 1;
        return (key, value) => {
          if (value instanceof NumericValue) {
            const v = `${NUMERIC_CONTROL_CHAR + "nv" + this.counter++}_` + value.string;
            this.values.set(`"${v}"`, value.string);
            return v;
          }
          if (typeof value === "bigint") {
            const s = value.toString();
            const v = `${NUMERIC_CONTROL_CHAR + "b" + this.counter++}_` + s;
            this.values.set(`"${v}"`, s);
            return v;
          }
          return value;
        };
      }
      replaceInJson(json) {
        if (this.stage === 0) {
          throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");
        }
        if (this.stage === 2) {
          throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
        }
        this.stage = 2;
        if (this.counter === 0) {
          return json;
        }
        for (const [key, value] of this.values) {
          json = json.replace(key, value);
        }
        return json;
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js
var import_util_base645, JsonShapeSerializer;
var init_JsonShapeSerializer = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js"() {
    init_protocols();
    init_schema();
    init_serde();
    import_util_base645 = __toESM(require_dist_cjs10());
    init_ConfigurableSerdeContext();
    init_jsonReplacer();
    JsonShapeSerializer = class extends SerdeContextConfig {
      settings;
      buffer;
      useReplacer = false;
      rootSchema;
      constructor(settings) {
        super();
        this.settings = settings;
      }
      write(schema, value) {
        this.rootSchema = NormalizedSchema.of(schema);
        this.buffer = this._write(this.rootSchema, value);
      }
      flush() {
        const { rootSchema, useReplacer } = this;
        this.rootSchema = void 0;
        this.useReplacer = false;
        if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) {
          if (!useReplacer) {
            return JSON.stringify(this.buffer);
          }
          const replacer = new JsonReplacer();
          return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));
        }
        return this.buffer;
      }
      writeDiscriminatedDocument(schema, value) {
        this.write(schema, value);
        if (typeof this.buffer === "object") {
          this.buffer.__type = NormalizedSchema.of(schema).getName(true);
        }
      }
      _write(schema, value, container) {
        const isObject = value !== null && typeof value === "object";
        const ns = NormalizedSchema.of(schema);
        if (isObject) {
          if (ns.isStructSchema()) {
            const record = value;
            const out = {};
            const { jsonName } = this.settings;
            let nameMap = void 0;
            if (jsonName) {
              nameMap = {};
            }
            let outCount = 0;
            for (const [memberName, memberSchema] of ns.structIterator()) {
              const serializableValue = this._write(memberSchema, record[memberName], ns);
              if (serializableValue !== void 0) {
                let targetKey = memberName;
                if (jsonName) {
                  targetKey = memberSchema.getMergedTraits().jsonName ?? memberName;
                  nameMap[memberName] = targetKey;
                }
                out[targetKey] = serializableValue;
                outCount++;
              }
            }
            if (ns.isUnionSchema() && outCount === 0) {
              const { $unknown } = record;
              if (Array.isArray($unknown)) {
                const [k5, v] = $unknown;
                out[k5] = this._write(15, v);
              }
            } else if (typeof record.__type === "string") {
              for (const k5 in record) {
                const v = record[k5];
                const targetKey = jsonName ? nameMap[k5] ?? k5 : k5;
                if (!(targetKey in out)) {
                  out[targetKey] = this._write(15, v);
                }
              }
            }
            return out;
          }
          if (Array.isArray(value) && ns.isListSchema()) {
            const listMember = ns.getValueSchema();
            const out = [];
            const sparse = !!ns.getMergedTraits().sparse;
            for (const item of value) {
              if (sparse || item != null) {
                out.push(this._write(listMember, item));
              }
            }
            return out;
          }
          if (ns.isMapSchema()) {
            const mapMember = ns.getValueSchema();
            const out = {};
            const sparse = !!ns.getMergedTraits().sparse;
            for (const _k in value) {
              const _v = value[_k];
              if (sparse || _v != null) {
                out[_k] = this._write(mapMember, _v);
              }
            }
            return out;
          }
          if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {
            if (ns === this.rootSchema) {
              return value;
            }
            return (this.serdeContext?.base64Encoder ?? import_util_base645.toBase64)(value);
          }
          if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {
            const format2 = determineTimestampFormat(ns, this.settings);
            switch (format2) {
              case 5:
                return value.toISOString().replace(".000Z", "Z");
              case 6:
                return dateToUtcString(value);
              case 7:
                return value.getTime() / 1e3;
              default:
                console.warn("Missing timestamp format, using epoch seconds", value);
                return value.getTime() / 1e3;
            }
          }
          if (value instanceof NumericValue) {
            this.useReplacer = true;
          }
        }
        if (value === null && container?.isStructSchema()) {
          return void 0;
        }
        if (ns.isStringSchema()) {
          if (typeof value === "undefined" && ns.isIdempotencyToken()) {
            return (0, import_uuid.v4)();
          }
          const mediaType = ns.getMergedTraits().mediaType;
          if (value != null && mediaType) {
            const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
            if (isJson) {
              return LazyJsonString.from(value);
            }
          }
          return value;
        }
        if (typeof value === "number" && ns.isNumericSchema()) {
          if (Math.abs(value) === Infinity || isNaN(value)) {
            return String(value);
          }
          return value;
        }
        if (typeof value === "string" && ns.isBlobSchema()) {
          if (ns === this.rootSchema) {
            return value;
          }
          return (this.serdeContext?.base64Encoder ?? import_util_base645.toBase64)(value);
        }
        if (typeof value === "bigint") {
          this.useReplacer = true;
        }
        if (ns.isDocumentSchema()) {
          if (isObject) {
            const out = Array.isArray(value) ? [] : {};
            for (const k5 in value) {
              const v = value[k5];
              if (v instanceof NumericValue) {
                this.useReplacer = true;
                out[k5] = v;
              } else {
                out[k5] = this._write(ns, v);
              }
            }
            return out;
          } else {
            return structuredClone(value);
          }
        }
        return value;
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js
var JsonCodec;
var init_JsonCodec = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js"() {
    init_ConfigurableSerdeContext();
    init_JsonShapeDeserializer();
    init_JsonShapeSerializer();
    JsonCodec = class extends SerdeContextConfig {
      settings;
      constructor(settings) {
        super();
        this.settings = settings;
      }
      createSerializer() {
        const serializer = new JsonShapeSerializer(this.settings);
        serializer.setSerdeContext(this.serdeContext);
        return serializer;
      }
      createDeserializer() {
        const deserializer = new JsonShapeDeserializer(this.settings);
        deserializer.setSerdeContext(this.serdeContext);
        return deserializer;
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js
var AwsJsonRpcProtocol;
var init_AwsJsonRpcProtocol = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js"() {
    init_protocols();
    init_schema();
    init_ProtocolLib();
    init_JsonCodec();
    init_parseJsonBody();
    AwsJsonRpcProtocol = class extends RpcProtocol {
      serializer;
      deserializer;
      serviceTarget;
      codec;
      mixin;
      awsQueryCompatible;
      constructor({ defaultNamespace, errorTypeRegistries: errorTypeRegistries5, serviceTarget, awsQueryCompatible, jsonCodec }) {
        super({
          defaultNamespace,
          errorTypeRegistries: errorTypeRegistries5
        });
        this.serviceTarget = serviceTarget;
        this.codec = jsonCodec ?? new JsonCodec({
          timestampFormat: {
            useTrait: true,
            default: 7
          },
          jsonName: false
        });
        this.serializer = this.codec.createSerializer();
        this.deserializer = this.codec.createDeserializer();
        this.awsQueryCompatible = !!awsQueryCompatible;
        this.mixin = new ProtocolLib(this.awsQueryCompatible);
      }
      async serializeRequest(operationSchema, input, context) {
        const request = await super.serializeRequest(operationSchema, input, context);
        if (!request.path.endsWith("/")) {
          request.path += "/";
        }
        request.headers["content-type"] = `application/x-amz-json-${this.getJsonRpcVersion()}`;
        request.headers["x-amz-target"] = `${this.serviceTarget}.${operationSchema.name}`;
        if (this.awsQueryCompatible) {
          request.headers["x-amzn-query-mode"] = "true";
        }
        if (deref(operationSchema.input) === "unit" || !request.body) {
          request.body = "{}";
        }
        return request;
      }
      getPayloadCodec() {
        return this.codec;
      }
      async handleError(operationSchema, context, response, dataObject, metadata) {
        if (this.awsQueryCompatible) {
          this.mixin.setQueryCompatError(dataObject, response);
        }
        const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
        this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
        const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : void 0);
        const ns = NormalizedSchema.of(errorSchema);
        const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
        const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
        const exception = new ErrorCtor(message);
        const output = {};
        const errorDeserializer = this.codec.createDeserializer();
        for (const [name, member2] of ns.structIterator()) {
          if (dataObject[name] != null) {
            output[name] = errorDeserializer.readObject(member2, dataObject[name]);
          }
        }
        if (this.awsQueryCompatible) {
          this.mixin.queryCompatOutput(dataObject, output);
        }
        throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
          $fault: ns.getMergedTraits().error,
          message
        }, output), dataObject);
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js
var AwsJson1_0Protocol;
var init_AwsJson1_0Protocol = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js"() {
    init_AwsJsonRpcProtocol();
    AwsJson1_0Protocol = class extends AwsJsonRpcProtocol {
      constructor({ defaultNamespace, errorTypeRegistries: errorTypeRegistries5, serviceTarget, awsQueryCompatible, jsonCodec }) {
        super({
          defaultNamespace,
          errorTypeRegistries: errorTypeRegistries5,
          serviceTarget,
          awsQueryCompatible,
          jsonCodec
        });
      }
      getShapeId() {
        return "aws.protocols#awsJson1_0";
      }
      getJsonRpcVersion() {
        return "1.0";
      }
      getDefaultContentType() {
        return "application/x-amz-json-1.0";
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js
var AwsJson1_1Protocol;
var init_AwsJson1_1Protocol = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js"() {
    init_AwsJsonRpcProtocol();
    AwsJson1_1Protocol = class extends AwsJsonRpcProtocol {
      constructor({ defaultNamespace, errorTypeRegistries: errorTypeRegistries5, serviceTarget, awsQueryCompatible, jsonCodec }) {
        super({
          defaultNamespace,
          errorTypeRegistries: errorTypeRegistries5,
          serviceTarget,
          awsQueryCompatible,
          jsonCodec
        });
      }
      getShapeId() {
        return "aws.protocols#awsJson1_1";
      }
      getJsonRpcVersion() {
        return "1.1";
      }
      getDefaultContentType() {
        return "application/x-amz-json-1.1";
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js
var AwsRestJsonProtocol;
var init_AwsRestJsonProtocol = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js"() {
    init_protocols();
    init_schema();
    init_ProtocolLib();
    init_JsonCodec();
    init_parseJsonBody();
    AwsRestJsonProtocol = class extends HttpBindingProtocol {
      serializer;
      deserializer;
      codec;
      mixin = new ProtocolLib();
      constructor({ defaultNamespace, errorTypeRegistries: errorTypeRegistries5 }) {
        super({
          defaultNamespace,
          errorTypeRegistries: errorTypeRegistries5
        });
        const settings = {
          timestampFormat: {
            useTrait: true,
            default: 7
          },
          httpBindings: true,
          jsonName: true
        };
        this.codec = new JsonCodec(settings);
        this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);
        this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);
      }
      getShapeId() {
        return "aws.protocols#restJson1";
      }
      getPayloadCodec() {
        return this.codec;
      }
      setSerdeContext(serdeContext) {
        this.codec.setSerdeContext(serdeContext);
        super.setSerdeContext(serdeContext);
      }
      async serializeRequest(operationSchema, input, context) {
        const request = await super.serializeRequest(operationSchema, input, context);
        const inputSchema = NormalizedSchema.of(operationSchema.input);
        if (!request.headers["content-type"]) {
          const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
          if (contentType) {
            request.headers["content-type"] = contentType;
          }
        }
        if (request.body == null && request.headers["content-type"] === this.getDefaultContentType()) {
          request.body = "{}";
        }
        return request;
      }
      async deserializeResponse(operationSchema, context, response) {
        const output = await super.deserializeResponse(operationSchema, context, response);
        const outputSchema = NormalizedSchema.of(operationSchema.output);
        for (const [name, member2] of outputSchema.structIterator()) {
          if (member2.getMemberTraits().httpPayload && !(name in output)) {
            output[name] = null;
          }
        }
        return output;
      }
      async handleError(operationSchema, context, response, dataObject, metadata) {
        const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
        this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
        const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
        const ns = NormalizedSchema.of(errorSchema);
        const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
        const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
        const exception = new ErrorCtor(message);
        await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
        const output = {};
        const errorDeserializer = this.codec.createDeserializer();
        for (const [name, member2] of ns.structIterator()) {
          const target = member2.getMergedTraits().jsonName ?? name;
          output[name] = errorDeserializer.readObject(member2, dataObject[target]);
        }
        throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
          $fault: ns.getMergedTraits().error,
          message
        }, output), dataObject);
      }
      getDefaultContentType() {
        return "application/json";
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js
var import_smithy_client3, awsExpectUnion;
var init_awsExpectUnion = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js"() {
    import_smithy_client3 = __toESM(require_dist_cjs34());
    awsExpectUnion = (value) => {
      if (value == null) {
        return void 0;
      }
      if (typeof value === "object" && "__type" in value) {
        delete value.__type;
      }
      return (0, import_smithy_client3.expectUnion)(value);
    };
  }
});

// ../../node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.cjs
var require_fxp = __commonJS({
  "../../node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) {
    (() => {
      "use strict";
      var t = { d: (e6, n3) => {
        for (var i6 in n3) t.o(n3, i6) && !t.o(e6, i6) && Object.defineProperty(e6, i6, { enumerable: true, get: n3[i6] });
      }, o: (t2, e6) => Object.prototype.hasOwnProperty.call(t2, e6), r: (t2) => {
        "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true });
      } }, e5 = {};
      t.r(e5), t.d(e5, { XMLBuilder: () => Bt, XMLParser: () => Tt, XMLValidator: () => Ut });
      const n2 = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", i5 = new RegExp("^[" + n2 + "][" + n2 + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
      function s(t2, e6) {
        const n3 = [];
        let i6 = e6.exec(t2);
        for (; i6; ) {
          const s2 = [];
          s2.startIndex = e6.lastIndex - i6[0].length;
          const r6 = i6.length;
          for (let t3 = 0; t3 < r6; t3++) s2.push(i6[t3]);
          n3.push(s2), i6 = e6.exec(t2);
        }
        return n3;
      }
      const r5 = function(t2) {
        return !(null == i5.exec(t2));
      }, o2 = ["hasOwnProperty", "toString", "valueOf", "__defineGetter__", "__defineSetter__", "__lookupGetter__", "__lookupSetter__"], a5 = ["__proto__", "constructor", "prototype"], h5 = { allowBooleanAttributes: false, unpairedTags: [] };
      function l3(t2, e6) {
        e6 = Object.assign({}, h5, e6);
        const n3 = [];
        let i6 = false, s2 = false;
        "\uFEFF" === t2[0] && (t2 = t2.substr(1));
        for (let r6 = 0; r6 < t2.length; r6++) if ("<" === t2[r6] && "?" === t2[r6 + 1]) {
          if (r6 += 2, r6 = p2(t2, r6), r6.err) return r6;
        } else {
          if ("<" !== t2[r6]) {
            if (u(t2[r6])) continue;
            return b5("InvalidChar", "char '" + t2[r6] + "' is not expected.", w(t2, r6));
          }
          {
            let o3 = r6;
            if (r6++, "!" === t2[r6]) {
              r6 = c5(t2, r6);
              continue;
            }
            {
              let a6 = false;
              "/" === t2[r6] && (a6 = true, r6++);
              let h6 = "";
              for (; r6 < t2.length && ">" !== t2[r6] && " " !== t2[r6] && "	" !== t2[r6] && "\n" !== t2[r6] && "\r" !== t2[r6]; r6++) h6 += t2[r6];
              if (h6 = h6.trim(), "/" === h6[h6.length - 1] && (h6 = h6.substring(0, h6.length - 1), r6--), !E(h6)) {
                let e7;
                return e7 = 0 === h6.trim().length ? "Invalid space after '<'." : "Tag '" + h6 + "' is an invalid name.", b5("InvalidTag", e7, w(t2, r6));
              }
              const l4 = g5(t2, r6);
              if (false === l4) return b5("InvalidAttr", "Attributes for '" + h6 + "' have open quote.", w(t2, r6));
              let d6 = l4.value;
              if (r6 = l4.index, "/" === d6[d6.length - 1]) {
                const n4 = r6 - d6.length;
                d6 = d6.substring(0, d6.length - 1);
                const s3 = x(d6, e6);
                if (true !== s3) return b5(s3.err.code, s3.err.msg, w(t2, n4 + s3.err.line));
                i6 = true;
              } else if (a6) {
                if (!l4.tagClosed) return b5("InvalidTag", "Closing tag '" + h6 + "' doesn't have proper closing.", w(t2, r6));
                if (d6.trim().length > 0) return b5("InvalidTag", "Closing tag '" + h6 + "' can't have attributes or invalid starting.", w(t2, o3));
                if (0 === n3.length) return b5("InvalidTag", "Closing tag '" + h6 + "' has not been opened.", w(t2, o3));
                {
                  const e7 = n3.pop();
                  if (h6 !== e7.tagName) {
                    let n4 = w(t2, e7.tagStartPos);
                    return b5("InvalidTag", "Expected closing tag '" + e7.tagName + "' (opened in line " + n4.line + ", col " + n4.col + ") instead of closing tag '" + h6 + "'.", w(t2, o3));
                  }
                  0 == n3.length && (s2 = true);
                }
              } else {
                const a7 = x(d6, e6);
                if (true !== a7) return b5(a7.err.code, a7.err.msg, w(t2, r6 - d6.length + a7.err.line));
                if (true === s2) return b5("InvalidXml", "Multiple possible root nodes found.", w(t2, r6));
                -1 !== e6.unpairedTags.indexOf(h6) || n3.push({ tagName: h6, tagStartPos: o3 }), i6 = true;
              }
              for (r6++; r6 < t2.length; r6++) if ("<" === t2[r6]) {
                if ("!" === t2[r6 + 1]) {
                  r6++, r6 = c5(t2, r6);
                  continue;
                }
                if ("?" !== t2[r6 + 1]) break;
                if (r6 = p2(t2, ++r6), r6.err) return r6;
              } else if ("&" === t2[r6]) {
                const e7 = N(t2, r6);
                if (-1 == e7) return b5("InvalidChar", "char '&' is not expected.", w(t2, r6));
                r6 = e7;
              } else if (true === s2 && !u(t2[r6])) return b5("InvalidXml", "Extra text at the end", w(t2, r6));
              "<" === t2[r6] && r6--;
            }
          }
        }
        return i6 ? 1 == n3.length ? b5("InvalidTag", "Unclosed tag '" + n3[0].tagName + "'.", w(t2, n3[0].tagStartPos)) : !(n3.length > 0) || b5("InvalidXml", "Invalid '" + JSON.stringify(n3.map((t3) => t3.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : b5("InvalidXml", "Start tag expected.", 1);
      }
      function u(t2) {
        return " " === t2 || "	" === t2 || "\n" === t2 || "\r" === t2;
      }
      function p2(t2, e6) {
        const n3 = e6;
        for (; e6 < t2.length; e6++) if ("?" == t2[e6] || " " == t2[e6]) {
          const i6 = t2.substr(n3, e6 - n3);
          if (e6 > 5 && "xml" === i6) return b5("InvalidXml", "XML declaration allowed only at the start of the document.", w(t2, e6));
          if ("?" == t2[e6] && ">" == t2[e6 + 1]) {
            e6++;
            break;
          }
          continue;
        }
        return e6;
      }
      function c5(t2, e6) {
        if (t2.length > e6 + 5 && "-" === t2[e6 + 1] && "-" === t2[e6 + 2]) {
          for (e6 += 3; e6 < t2.length; e6++) if ("-" === t2[e6] && "-" === t2[e6 + 1] && ">" === t2[e6 + 2]) {
            e6 += 2;
            break;
          }
        } else if (t2.length > e6 + 8 && "D" === t2[e6 + 1] && "O" === t2[e6 + 2] && "C" === t2[e6 + 3] && "T" === t2[e6 + 4] && "Y" === t2[e6 + 5] && "P" === t2[e6 + 6] && "E" === t2[e6 + 7]) {
          let n3 = 1;
          for (e6 += 8; e6 < t2.length; e6++) if ("<" === t2[e6]) n3++;
          else if (">" === t2[e6] && (n3--, 0 === n3)) break;
        } else if (t2.length > e6 + 9 && "[" === t2[e6 + 1] && "C" === t2[e6 + 2] && "D" === t2[e6 + 3] && "A" === t2[e6 + 4] && "T" === t2[e6 + 5] && "A" === t2[e6 + 6] && "[" === t2[e6 + 7]) {
          for (e6 += 8; e6 < t2.length; e6++) if ("]" === t2[e6] && "]" === t2[e6 + 1] && ">" === t2[e6 + 2]) {
            e6 += 2;
            break;
          }
        }
        return e6;
      }
      const d5 = '"', f5 = "'";
      function g5(t2, e6) {
        let n3 = "", i6 = "", s2 = false;
        for (; e6 < t2.length; e6++) {
          if (t2[e6] === d5 || t2[e6] === f5) "" === i6 ? i6 = t2[e6] : i6 !== t2[e6] || (i6 = "");
          else if (">" === t2[e6] && "" === i6) {
            s2 = true;
            break;
          }
          n3 += t2[e6];
        }
        return "" === i6 && { value: n3, index: e6, tagClosed: s2 };
      }
      const m3 = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
      function x(t2, e6) {
        const n3 = s(t2, m3), i6 = {};
        for (let t3 = 0; t3 < n3.length; t3++) {
          if (0 === n3[t3][1].length) return b5("InvalidAttr", "Attribute '" + n3[t3][2] + "' has no space in starting.", v(n3[t3]));
          if (void 0 !== n3[t3][3] && void 0 === n3[t3][4]) return b5("InvalidAttr", "Attribute '" + n3[t3][2] + "' is without value.", v(n3[t3]));
          if (void 0 === n3[t3][3] && !e6.allowBooleanAttributes) return b5("InvalidAttr", "boolean attribute '" + n3[t3][2] + "' is not allowed.", v(n3[t3]));
          const s2 = n3[t3][2];
          if (!y(s2)) return b5("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", v(n3[t3]));
          if (Object.prototype.hasOwnProperty.call(i6, s2)) return b5("InvalidAttr", "Attribute '" + s2 + "' is repeated.", v(n3[t3]));
          i6[s2] = 1;
        }
        return true;
      }
      function N(t2, e6) {
        if (";" === t2[++e6]) return -1;
        if ("#" === t2[e6]) return (function(t3, e7) {
          let n4 = /\d/;
          for ("x" === t3[e7] && (e7++, n4 = /[\da-fA-F]/); e7 < t3.length; e7++) {
            if (";" === t3[e7]) return e7;
            if (!t3[e7].match(n4)) break;
          }
          return -1;
        })(t2, ++e6);
        let n3 = 0;
        for (; e6 < t2.length; e6++, n3++) if (!(t2[e6].match(/\w/) && n3 < 20)) {
          if (";" === t2[e6]) break;
          return -1;
        }
        return e6;
      }
      function b5(t2, e6, n3) {
        return { err: { code: t2, msg: e6, line: n3.line || n3, col: n3.col } };
      }
      function y(t2) {
        return r5(t2);
      }
      function E(t2) {
        return r5(t2);
      }
      function w(t2, e6) {
        const n3 = t2.substring(0, e6).split(/\r?\n/);
        return { line: n3.length, col: n3[n3.length - 1].length + 1 };
      }
      function v(t2) {
        return t2.startIndex + t2[1].length;
      }
      const S = (t2) => o2.includes(t2) ? "__" + t2 : t2, _ = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e6) {
        return e6;
      }, attributeValueProcessor: function(t2, e6) {
        return e6;
      }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, entityDecoder: null, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e6, n3) {
        return t2;
      }, captureMetaData: false, maxNestedTags: 100, strictReservedNames: true, jPath: true, onDangerousProperty: S };
      function A(t2, e6) {
        if ("string" != typeof t2) return;
        const n3 = t2.toLowerCase();
        if (o2.some((t3) => n3 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e6}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
        if (a5.some((t3) => n3 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e6}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
      }
      function T(t2, e6) {
        return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 1e4, maxTotalExpansions: 1 / 0, maxExpandedLength: 1e5, maxEntityCount: 1e3, allowedTags: null, tagFilter: null, appliesTo: "all" } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 1e4), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1 / 0), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 1e3), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null, appliesTo: t2.appliesTo ?? "all" } : T(true);
      }
      const C = function(t2) {
        const e6 = Object.assign({}, _, t2), n3 = [{ value: e6.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e6.attributesGroupName, name: "attributesGroupName" }, { value: e6.textNodeName, name: "textNodeName" }, { value: e6.cdataPropName, name: "cdataPropName" }, { value: e6.commentPropName, name: "commentPropName" }];
        for (const { value: t3, name: e7 } of n3) t3 && A(t3, e7);
        return null === e6.onDangerousProperty && (e6.onDangerousProperty = S), e6.processEntities = T(e6.processEntities, e6.htmlEntities), e6.unpairedTagsSet = new Set(e6.unpairedTags), e6.stopNodes && Array.isArray(e6.stopNodes) && (e6.stopNodes = e6.stopNodes.map((t3) => "string" == typeof t3 && t3.startsWith("*.") ? ".." + t3.substring(2) : t3)), e6;
      };
      let P;
      P = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata");
      class O {
        constructor(t2) {
          this.tagname = t2, this.child = [], this[":@"] = /* @__PURE__ */ Object.create(null);
        }
        add(t2, e6) {
          "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e6 });
        }
        addChild(t2, e6) {
          "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e6 && (this.child[this.child.length - 1][P] = { startIndex: e6 });
        }
        static getMetaDataSymbol() {
          return P;
        }
      }
      class $ {
        constructor(t2) {
          this.suppressValidationErr = !t2, this.options = t2;
        }
        readDocType(t2, e6) {
          const n3 = /* @__PURE__ */ Object.create(null);
          let i6 = 0;
          if ("O" !== t2[e6 + 3] || "C" !== t2[e6 + 4] || "T" !== t2[e6 + 5] || "Y" !== t2[e6 + 6] || "P" !== t2[e6 + 7] || "E" !== t2[e6 + 8]) throw new Error("Invalid Tag instead of DOCTYPE");
          {
            e6 += 9;
            let s2 = 1, r6 = false, o3 = false, a6 = "";
            for (; e6 < t2.length; e6++) if ("<" !== t2[e6] || o3) if (">" === t2[e6]) {
              if (o3 ? "-" === t2[e6 - 1] && "-" === t2[e6 - 2] && (o3 = false, s2--) : s2--, 0 === s2) break;
            } else "[" === t2[e6] ? r6 = true : a6 += t2[e6];
            else {
              if (r6 && D(t2, "!ENTITY", e6)) {
                let s3, r7;
                if (e6 += 7, [s3, r7, e6] = this.readEntityExp(t2, e6 + 1, this.suppressValidationErr), -1 === r7.indexOf("&")) {
                  if (false !== this.options.enabled && null != this.options.maxEntityCount && i6 >= this.options.maxEntityCount) throw new Error(`Entity count (${i6 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
                  n3[s3] = r7, i6++;
                }
              } else if (r6 && D(t2, "!ELEMENT", e6)) {
                e6 += 8;
                const { index: n4 } = this.readElementExp(t2, e6 + 1);
                e6 = n4;
              } else if (r6 && D(t2, "!ATTLIST", e6)) e6 += 8;
              else if (r6 && D(t2, "!NOTATION", e6)) {
                e6 += 9;
                const { index: n4 } = this.readNotationExp(t2, e6 + 1, this.suppressValidationErr);
                e6 = n4;
              } else {
                if (!D(t2, "!--", e6)) throw new Error("Invalid DOCTYPE");
                o3 = true;
              }
              s2++, a6 = "";
            }
            if (0 !== s2) throw new Error("Unclosed DOCTYPE");
          }
          return { entities: n3, i: e6 };
        }
        readEntityExp(t2, e6) {
          const n3 = e6 = I(t2, e6);
          for (; e6 < t2.length && !/\s/.test(t2[e6]) && '"' !== t2[e6] && "'" !== t2[e6]; ) e6++;
          let i6 = t2.substring(n3, e6);
          if (M(i6), e6 = I(t2, e6), !this.suppressValidationErr) {
            if ("SYSTEM" === t2.substring(e6, e6 + 6).toUpperCase()) throw new Error("External entities are not supported");
            if ("%" === t2[e6]) throw new Error("Parameter entities are not supported");
          }
          let s2 = "";
          if ([e6, s2] = this.readIdentifierVal(t2, e6, "entity"), false !== this.options.enabled && null != this.options.maxEntitySize && s2.length > this.options.maxEntitySize) throw new Error(`Entity "${i6}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
          return [i6, s2, --e6];
        }
        readNotationExp(t2, e6) {
          const n3 = e6 = I(t2, e6);
          for (; e6 < t2.length && !/\s/.test(t2[e6]); ) e6++;
          let i6 = t2.substring(n3, e6);
          !this.suppressValidationErr && M(i6), e6 = I(t2, e6);
          const s2 = t2.substring(e6, e6 + 6).toUpperCase();
          if (!this.suppressValidationErr && "SYSTEM" !== s2 && "PUBLIC" !== s2) throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
          e6 += s2.length, e6 = I(t2, e6);
          let r6 = null, o3 = null;
          if ("PUBLIC" === s2) [e6, r6] = this.readIdentifierVal(t2, e6, "publicIdentifier"), '"' !== t2[e6 = I(t2, e6)] && "'" !== t2[e6] || ([e6, o3] = this.readIdentifierVal(t2, e6, "systemIdentifier"));
          else if ("SYSTEM" === s2 && ([e6, o3] = this.readIdentifierVal(t2, e6, "systemIdentifier"), !this.suppressValidationErr && !o3)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
          return { notationName: i6, publicIdentifier: r6, systemIdentifier: o3, index: --e6 };
        }
        readIdentifierVal(t2, e6, n3) {
          let i6 = "";
          const s2 = t2[e6];
          if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`);
          const r6 = ++e6;
          for (; e6 < t2.length && t2[e6] !== s2; ) e6++;
          if (i6 = t2.substring(r6, e6), t2[e6] !== s2) throw new Error(`Unterminated ${n3} value`);
          return [++e6, i6];
        }
        readElementExp(t2, e6) {
          const n3 = e6 = I(t2, e6);
          for (; e6 < t2.length && !/\s/.test(t2[e6]); ) e6++;
          let i6 = t2.substring(n3, e6);
          if (!this.suppressValidationErr && !r5(i6)) throw new Error(`Invalid element name: "${i6}"`);
          let s2 = "";
          if ("E" === t2[e6 = I(t2, e6)] && D(t2, "MPTY", e6)) e6 += 4;
          else if ("A" === t2[e6] && D(t2, "NY", e6)) e6 += 2;
          else if ("(" === t2[e6]) {
            const n4 = ++e6;
            for (; e6 < t2.length && ")" !== t2[e6]; ) e6++;
            if (s2 = t2.substring(n4, e6), ")" !== t2[e6]) throw new Error("Unterminated content model");
          } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e6]}"`);
          return { elementName: i6, contentModel: s2.trim(), index: e6 };
        }
        readAttlistExp(t2, e6) {
          let n3 = e6 = I(t2, e6);
          for (; e6 < t2.length && !/\s/.test(t2[e6]); ) e6++;
          let i6 = t2.substring(n3, e6);
          for (M(i6), n3 = e6 = I(t2, e6); e6 < t2.length && !/\s/.test(t2[e6]); ) e6++;
          let s2 = t2.substring(n3, e6);
          if (!M(s2)) throw new Error(`Invalid attribute name: "${s2}"`);
          e6 = I(t2, e6);
          let r6 = "";
          if ("NOTATION" === t2.substring(e6, e6 + 8).toUpperCase()) {
            if (r6 = "NOTATION", "(" !== t2[e6 = I(t2, e6 += 8)]) throw new Error(`Expected '(', found "${t2[e6]}"`);
            e6++;
            let n4 = [];
            for (; e6 < t2.length && ")" !== t2[e6]; ) {
              const i7 = e6;
              for (; e6 < t2.length && "|" !== t2[e6] && ")" !== t2[e6]; ) e6++;
              let s3 = t2.substring(i7, e6);
              if (s3 = s3.trim(), !M(s3)) throw new Error(`Invalid notation name: "${s3}"`);
              n4.push(s3), "|" === t2[e6] && (e6++, e6 = I(t2, e6));
            }
            if (")" !== t2[e6]) throw new Error("Unterminated list of notations");
            e6++, r6 += " (" + n4.join("|") + ")";
          } else {
            const n4 = e6;
            for (; e6 < t2.length && !/\s/.test(t2[e6]); ) e6++;
            r6 += t2.substring(n4, e6);
            const i7 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
            if (!this.suppressValidationErr && !i7.includes(r6.toUpperCase())) throw new Error(`Invalid attribute type: "${r6}"`);
          }
          e6 = I(t2, e6);
          let o3 = "";
          return "#REQUIRED" === t2.substring(e6, e6 + 8).toUpperCase() ? (o3 = "#REQUIRED", e6 += 8) : "#IMPLIED" === t2.substring(e6, e6 + 7).toUpperCase() ? (o3 = "#IMPLIED", e6 += 7) : [e6, o3] = this.readIdentifierVal(t2, e6, "ATTLIST"), { elementName: i6, attributeName: s2, attributeType: r6, defaultValue: o3, index: e6 };
        }
      }
      const I = (t2, e6) => {
        for (; e6 < t2.length && /\s/.test(t2[e6]); ) e6++;
        return e6;
      };
      function D(t2, e6, n3) {
        for (let i6 = 0; i6 < e6.length; i6++) if (e6[i6] !== t2[n3 + i6 + 1]) return false;
        return true;
      }
      function M(t2) {
        if (r5(t2)) return t2;
        throw new Error(`Invalid entity name ${t2}`);
      }
      const j5 = /^[-+]?0x[a-fA-F0-9]+$/, V = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, L = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
      const k5 = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
      class F {
        constructor(t2) {
          this._matcher = t2;
        }
        get separator() {
          return this._matcher.separator;
        }
        getCurrentTag() {
          const t2 = this._matcher.path;
          return t2.length > 0 ? t2[t2.length - 1].tag : void 0;
        }
        getCurrentNamespace() {
          const t2 = this._matcher.path;
          return t2.length > 0 ? t2[t2.length - 1].namespace : void 0;
        }
        getAttrValue(t2) {
          const e6 = this._matcher.path;
          if (0 !== e6.length) return e6[e6.length - 1].values?.[t2];
        }
        hasAttr(t2) {
          const e6 = this._matcher.path;
          if (0 === e6.length) return false;
          const n3 = e6[e6.length - 1];
          return void 0 !== n3.values && t2 in n3.values;
        }
        getPosition() {
          const t2 = this._matcher.path;
          return 0 === t2.length ? -1 : t2[t2.length - 1].position ?? 0;
        }
        getCounter() {
          const t2 = this._matcher.path;
          return 0 === t2.length ? -1 : t2[t2.length - 1].counter ?? 0;
        }
        getIndex() {
          return this.getPosition();
        }
        getDepth() {
          return this._matcher.path.length;
        }
        toString(t2, e6 = true) {
          return this._matcher.toString(t2, e6);
        }
        toArray() {
          return this._matcher.path.map((t2) => t2.tag);
        }
        matches(t2) {
          return this._matcher.matches(t2);
        }
        matchesAny(t2) {
          return t2.matchesAny(this._matcher);
        }
      }
      class R {
        constructor(t2 = {}) {
          this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new F(this);
        }
        push(t2, e6 = null, n3 = null) {
          this._pathStringCache = null, this.path.length > 0 && (this.path[this.path.length - 1].values = void 0);
          const i6 = this.path.length;
          this.siblingStacks[i6] || (this.siblingStacks[i6] = /* @__PURE__ */ new Map());
          const s2 = this.siblingStacks[i6], r6 = n3 ? `${n3}:${t2}` : t2, o3 = s2.get(r6) || 0;
          let a6 = 0;
          for (const t3 of s2.values()) a6 += t3;
          s2.set(r6, o3 + 1);
          const h6 = { tag: t2, position: a6, counter: o3 };
          null != n3 && (h6.namespace = n3), null != e6 && (h6.values = e6), this.path.push(h6);
        }
        pop() {
          if (0 === this.path.length) return;
          this._pathStringCache = null;
          const t2 = this.path.pop();
          return this.siblingStacks.length > this.path.length + 1 && (this.siblingStacks.length = this.path.length + 1), t2;
        }
        updateCurrent(t2) {
          if (this.path.length > 0) {
            const e6 = this.path[this.path.length - 1];
            null != t2 && (e6.values = t2);
          }
        }
        getCurrentTag() {
          return this.path.length > 0 ? this.path[this.path.length - 1].tag : void 0;
        }
        getCurrentNamespace() {
          return this.path.length > 0 ? this.path[this.path.length - 1].namespace : void 0;
        }
        getAttrValue(t2) {
          if (0 !== this.path.length) return this.path[this.path.length - 1].values?.[t2];
        }
        hasAttr(t2) {
          if (0 === this.path.length) return false;
          const e6 = this.path[this.path.length - 1];
          return void 0 !== e6.values && t2 in e6.values;
        }
        getPosition() {
          return 0 === this.path.length ? -1 : this.path[this.path.length - 1].position ?? 0;
        }
        getCounter() {
          return 0 === this.path.length ? -1 : this.path[this.path.length - 1].counter ?? 0;
        }
        getIndex() {
          return this.getPosition();
        }
        getDepth() {
          return this.path.length;
        }
        toString(t2, e6 = true) {
          const n3 = t2 || this.separator;
          if (n3 === this.separator && true === e6) {
            if (null !== this._pathStringCache) return this._pathStringCache;
            const t3 = this.path.map((t4) => t4.namespace ? `${t4.namespace}:${t4.tag}` : t4.tag).join(n3);
            return this._pathStringCache = t3, t3;
          }
          return this.path.map((t3) => e6 && t3.namespace ? `${t3.namespace}:${t3.tag}` : t3.tag).join(n3);
        }
        toArray() {
          return this.path.map((t2) => t2.tag);
        }
        reset() {
          this._pathStringCache = null, this.path = [], this.siblingStacks = [];
        }
        matches(t2) {
          const e6 = t2.segments;
          return 0 !== e6.length && (t2.hasDeepWildcard() ? this._matchWithDeepWildcard(e6) : this._matchSimple(e6));
        }
        _matchSimple(t2) {
          if (this.path.length !== t2.length) return false;
          for (let e6 = 0; e6 < t2.length; e6++) if (!this._matchSegment(t2[e6], this.path[e6], e6 === this.path.length - 1)) return false;
          return true;
        }
        _matchWithDeepWildcard(t2) {
          let e6 = this.path.length - 1, n3 = t2.length - 1;
          for (; n3 >= 0 && e6 >= 0; ) {
            const i6 = t2[n3];
            if ("deep-wildcard" === i6.type) {
              if (n3--, n3 < 0) return true;
              const i7 = t2[n3];
              let s2 = false;
              for (let t3 = e6; t3 >= 0; t3--) if (this._matchSegment(i7, this.path[t3], t3 === this.path.length - 1)) {
                e6 = t3 - 1, n3--, s2 = true;
                break;
              }
              if (!s2) return false;
            } else {
              if (!this._matchSegment(i6, this.path[e6], e6 === this.path.length - 1)) return false;
              e6--, n3--;
            }
          }
          return n3 < 0;
        }
        _matchSegment(t2, e6, n3) {
          if ("*" !== t2.tag && t2.tag !== e6.tag) return false;
          if (void 0 !== t2.namespace && "*" !== t2.namespace && t2.namespace !== e6.namespace) return false;
          if (void 0 !== t2.attrName) {
            if (!n3) return false;
            if (!e6.values || !(t2.attrName in e6.values)) return false;
            if (void 0 !== t2.attrValue && String(e6.values[t2.attrName]) !== String(t2.attrValue)) return false;
          }
          if (void 0 !== t2.position) {
            if (!n3) return false;
            const i6 = e6.counter ?? 0;
            if ("first" === t2.position && 0 !== i6) return false;
            if ("odd" === t2.position && i6 % 2 != 1) return false;
            if ("even" === t2.position && i6 % 2 != 0) return false;
            if ("nth" === t2.position && i6 !== t2.positionValue) return false;
          }
          return true;
        }
        matchesAny(t2) {
          return t2.matchesAny(this);
        }
        snapshot() {
          return { path: this.path.map((t2) => ({ ...t2 })), siblingStacks: this.siblingStacks.map((t2) => new Map(t2)) };
        }
        restore(t2) {
          this._pathStringCache = null, this.path = t2.path.map((t3) => ({ ...t3 })), this.siblingStacks = t2.siblingStacks.map((t3) => new Map(t3));
        }
        readOnly() {
          return this._view;
        }
      }
      class G {
        constructor(t2, e6 = {}, n3) {
          this.pattern = t2, this.separator = e6.separator || ".", this.segments = this._parse(t2), this.data = n3, this._hasDeepWildcard = this.segments.some((t3) => "deep-wildcard" === t3.type), this._hasAttributeCondition = this.segments.some((t3) => void 0 !== t3.attrName), this._hasPositionSelector = this.segments.some((t3) => void 0 !== t3.position);
        }
        _parse(t2) {
          const e6 = [];
          let n3 = 0, i6 = "";
          for (; n3 < t2.length; ) t2[n3] === this.separator ? n3 + 1 < t2.length && t2[n3 + 1] === this.separator ? (i6.trim() && (e6.push(this._parseSegment(i6.trim())), i6 = ""), e6.push({ type: "deep-wildcard" }), n3 += 2) : (i6.trim() && e6.push(this._parseSegment(i6.trim())), i6 = "", n3++) : (i6 += t2[n3], n3++);
          return i6.trim() && e6.push(this._parseSegment(i6.trim())), e6;
        }
        _parseSegment(t2) {
          const e6 = { type: "tag" };
          let n3 = null, i6 = t2;
          const s2 = t2.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);
          if (s2 && (i6 = s2[1] + s2[3], s2[2])) {
            const t3 = s2[2].slice(1, -1);
            t3 && (n3 = t3);
          }
          let r6, o3, a6 = i6;
          if (i6.includes("::")) {
            const e7 = i6.indexOf("::");
            if (r6 = i6.substring(0, e7).trim(), a6 = i6.substring(e7 + 2).trim(), !r6) throw new Error(`Invalid namespace in pattern: ${t2}`);
          }
          let h6 = null;
          if (a6.includes(":")) {
            const t3 = a6.lastIndexOf(":"), e7 = a6.substring(0, t3).trim(), n4 = a6.substring(t3 + 1).trim();
            ["first", "last", "odd", "even"].includes(n4) || /^nth\(\d+\)$/.test(n4) ? (o3 = e7, h6 = n4) : o3 = a6;
          } else o3 = a6;
          if (!o3) throw new Error(`Invalid segment pattern: ${t2}`);
          if (e6.tag = o3, r6 && (e6.namespace = r6), n3) if (n3.includes("=")) {
            const t3 = n3.indexOf("=");
            e6.attrName = n3.substring(0, t3).trim(), e6.attrValue = n3.substring(t3 + 1).trim();
          } else e6.attrName = n3.trim();
          if (h6) {
            const t3 = h6.match(/^nth\((\d+)\)$/);
            t3 ? (e6.position = "nth", e6.positionValue = parseInt(t3[1], 10)) : e6.position = h6;
          }
          return e6;
        }
        get length() {
          return this.segments.length;
        }
        hasDeepWildcard() {
          return this._hasDeepWildcard;
        }
        hasAttributeCondition() {
          return this._hasAttributeCondition;
        }
        hasPositionSelector() {
          return this._hasPositionSelector;
        }
        toString() {
          return this.pattern;
        }
      }
      class B {
        constructor() {
          this._byDepthAndTag = /* @__PURE__ */ new Map(), this._wildcardByDepth = /* @__PURE__ */ new Map(), this._deepWildcards = [], this._patterns = /* @__PURE__ */ new Set(), this._sealed = false;
        }
        add(t2) {
          if (this._sealed) throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");
          if (this._patterns.has(t2.pattern)) return this;
          if (this._patterns.add(t2.pattern), t2.hasDeepWildcard()) return this._deepWildcards.push(t2), this;
          const e6 = t2.length, n3 = t2.segments[t2.segments.length - 1], i6 = n3?.tag;
          if (i6 && "*" !== i6) {
            const n4 = `${e6}:${i6}`;
            this._byDepthAndTag.has(n4) || this._byDepthAndTag.set(n4, []), this._byDepthAndTag.get(n4).push(t2);
          } else this._wildcardByDepth.has(e6) || this._wildcardByDepth.set(e6, []), this._wildcardByDepth.get(e6).push(t2);
          return this;
        }
        addAll(t2) {
          for (const e6 of t2) this.add(e6);
          return this;
        }
        has(t2) {
          return this._patterns.has(t2.pattern);
        }
        get size() {
          return this._patterns.size;
        }
        seal() {
          return this._sealed = true, this;
        }
        get isSealed() {
          return this._sealed;
        }
        matchesAny(t2) {
          return null !== this.findMatch(t2);
        }
        findMatch(t2) {
          const e6 = t2.getDepth(), n3 = `${e6}:${t2.getCurrentTag()}`, i6 = this._byDepthAndTag.get(n3);
          if (i6) {
            for (let e7 = 0; e7 < i6.length; e7++) if (t2.matches(i6[e7])) return i6[e7];
          }
          const s2 = this._wildcardByDepth.get(e6);
          if (s2) {
            for (let e7 = 0; e7 < s2.length; e7++) if (t2.matches(s2[e7])) return s2[e7];
          }
          for (let e7 = 0; e7 < this._deepWildcards.length; e7++) if (t2.matches(this._deepWildcards[e7])) return this._deepWildcards[e7];
          return null;
        }
      }
      const U = { cent: "\xA2", pound: "\xA3", curren: "\xA4", yen: "\xA5", euro: "\u20AC", dollar: "$", euro: "\u20AC", fnof: "\u0192", inr: "\u20B9", af: "\u060B", birr: "\u1265\u122D", peso: "\u20B1", rub: "\u20BD", won: "\u20A9", yuan: "\xA5", cedil: "\xB8" }, W = { amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' }, X = { nbsp: "\xA0", copy: "\xA9", reg: "\xAE", trade: "\u2122", mdash: "\u2014", ndash: "\u2013", hellip: "\u2026", laquo: "\xAB", raquo: "\xBB", lsquo: "\u2018", rsquo: "\u2019", ldquo: "\u201C", rdquo: "\u201D", bull: "\u2022", para: "\xB6", sect: "\xA7", deg: "\xB0", frac12: "\xBD", frac14: "\xBC", frac34: "\xBE" }, Y = new Set("!?\\\\/[]$%{}^&*()<>|+");
      function z(t2) {
        if ("#" === t2[0]) throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${t2}"`);
        for (const e6 of t2) if (Y.has(e6)) throw new Error(`[EntityReplacer] Invalid character '${e6}' in entity name: "${t2}"`);
        return t2;
      }
      function q2(...t2) {
        const e6 = /* @__PURE__ */ Object.create(null);
        for (const n3 of t2) if (n3) for (const t3 of Object.keys(n3)) {
          const i6 = n3[t3];
          if ("string" == typeof i6) e6[t3] = i6;
          else if (i6 && "object" == typeof i6 && void 0 !== i6.val) {
            const n4 = i6.val;
            "string" == typeof n4 && (e6[t3] = n4);
          }
        }
        return e6;
      }
      const Z = "external", J = "base", K = "all", Q = Object.freeze({ allow: 0, leave: 1, remove: 2, throw: 3 }), H = /* @__PURE__ */ new Set([9, 10, 13]);
      class tt {
        constructor(t2 = {}) {
          var e6;
          this._limit = t2.limit || {}, this._maxTotalExpansions = this._limit.maxTotalExpansions || 0, this._maxExpandedLength = this._limit.maxExpandedLength || 0, this._postCheck = "function" == typeof t2.postCheck ? t2.postCheck : (t3) => t3, this._limitTiers = (e6 = this._limit.applyLimitsTo ?? Z) && e6 !== Z ? e6 === K ? /* @__PURE__ */ new Set([K]) : e6 === J ? /* @__PURE__ */ new Set([J]) : Array.isArray(e6) ? new Set(e6) : /* @__PURE__ */ new Set([Z]) : /* @__PURE__ */ new Set([Z]), this._numericAllowed = t2.numericAllowed ?? true, this._baseMap = q2(W, t2.namedEntities || null), this._externalMap = /* @__PURE__ */ Object.create(null), this._inputMap = /* @__PURE__ */ Object.create(null), this._totalExpansions = 0, this._expandedLength = 0, this._removeSet = new Set(t2.remove && Array.isArray(t2.remove) ? t2.remove : []), this._leaveSet = new Set(t2.leave && Array.isArray(t2.leave) ? t2.leave : []);
          const n3 = (function(t3) {
            if (!t3) return { xmlVersion: 1, onLevel: Q.allow, nullLevel: Q.remove };
            const e7 = 1.1 === t3.xmlVersion ? 1.1 : 1, n4 = Q[t3.onNCR] ?? Q.allow, i6 = Q[t3.nullNCR] ?? Q.remove;
            return { xmlVersion: e7, onLevel: n4, nullLevel: Math.max(i6, Q.remove) };
          })(t2.ncr);
          this._ncrXmlVersion = n3.xmlVersion, this._ncrOnLevel = n3.onLevel, this._ncrNullLevel = n3.nullLevel;
        }
        setExternalEntities(t2) {
          if (t2) for (const e6 of Object.keys(t2)) z(e6);
          this._externalMap = q2(t2);
        }
        addExternalEntity(t2, e6) {
          z(t2), "string" == typeof e6 && -1 === e6.indexOf("&") && (this._externalMap[t2] = e6);
        }
        addInputEntities(t2) {
          this._totalExpansions = 0, this._expandedLength = 0, this._inputMap = q2(t2);
        }
        reset() {
          return this._inputMap = /* @__PURE__ */ Object.create(null), this._totalExpansions = 0, this._expandedLength = 0, this;
        }
        setXmlVersion(t2) {
          this._ncrXmlVersion = 1.1 === t2 ? 1.1 : 1;
        }
        decode(t2) {
          if ("string" != typeof t2 || 0 === t2.length) return t2;
          const e6 = t2, n3 = [], i6 = t2.length;
          let s2 = 0, r6 = 0;
          const o3 = this._maxTotalExpansions > 0, a6 = this._maxExpandedLength > 0, h6 = o3 || a6;
          for (; r6 < i6; ) {
            if (38 !== t2.charCodeAt(r6)) {
              r6++;
              continue;
            }
            let e7 = r6 + 1;
            for (; e7 < i6 && 59 !== t2.charCodeAt(e7) && e7 - r6 <= 32; ) e7++;
            if (e7 >= i6 || 59 !== t2.charCodeAt(e7)) {
              r6++;
              continue;
            }
            const l5 = t2.slice(r6 + 1, e7);
            if (0 === l5.length) {
              r6++;
              continue;
            }
            let u2, p3;
            if (this._removeSet.has(l5)) u2 = "", void 0 === p3 && (p3 = Z);
            else {
              if (this._leaveSet.has(l5)) {
                r6++;
                continue;
              }
              if (35 === l5.charCodeAt(0)) {
                const t3 = this._resolveNCR(l5);
                if (void 0 === t3) {
                  r6++;
                  continue;
                }
                u2 = t3, p3 = J;
              } else {
                const t3 = this._resolveName(l5);
                u2 = t3?.value, p3 = t3?.tier;
              }
            }
            if (void 0 !== u2) {
              if (r6 > s2 && n3.push(t2.slice(s2, r6)), n3.push(u2), s2 = e7 + 1, r6 = s2, h6 && this._tierCounts(p3)) {
                if (o3 && (this._totalExpansions++, this._totalExpansions > this._maxTotalExpansions)) throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);
                if (a6) {
                  const t3 = u2.length - (l5.length + 2);
                  if (t3 > 0 && (this._expandedLength += t3, this._expandedLength > this._maxExpandedLength)) throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`);
                }
              }
            } else r6++;
          }
          s2 < i6 && n3.push(t2.slice(s2));
          const l4 = 0 === n3.length ? t2 : n3.join("");
          return this._postCheck(l4, e6);
        }
        _tierCounts(t2) {
          return !!this._limitTiers.has(K) || this._limitTiers.has(t2);
        }
        _resolveName(t2) {
          return t2 in this._inputMap ? { value: this._inputMap[t2], tier: Z } : t2 in this._externalMap ? { value: this._externalMap[t2], tier: Z } : t2 in this._baseMap ? { value: this._baseMap[t2], tier: J } : void 0;
        }
        _classifyNCR(t2) {
          return 0 === t2 ? this._ncrNullLevel : t2 >= 55296 && t2 <= 57343 || 1 === this._ncrXmlVersion && t2 >= 1 && t2 <= 31 && !H.has(t2) ? Q.remove : -1;
        }
        _applyNCRAction(t2, e6, n3) {
          switch (t2) {
            case Q.allow:
              return String.fromCodePoint(n3);
            case Q.remove:
              return "";
            case Q.leave:
              return;
            case Q.throw:
              throw new Error(`[EntityDecoder] Prohibited numeric character reference &${e6}; (U+${n3.toString(16).toUpperCase().padStart(4, "0")})`);
            default:
              return String.fromCodePoint(n3);
          }
        }
        _resolveNCR(t2) {
          const e6 = t2.charCodeAt(1);
          let n3;
          if (n3 = 120 === e6 || 88 === e6 ? parseInt(t2.slice(2), 16) : parseInt(t2.slice(1), 10), Number.isNaN(n3) || n3 < 0 || n3 > 1114111) return;
          const i6 = this._classifyNCR(n3);
          if (!this._numericAllowed && i6 < Q.remove) return;
          const s2 = -1 === i6 ? this._ncrOnLevel : Math.max(this._ncrOnLevel, i6);
          return this._applyNCRAction(s2, t2, n3);
        }
      }
      function et(t2, e6) {
        if (!t2) return {};
        const n3 = e6.attributesGroupName ? t2[e6.attributesGroupName] : t2;
        if (!n3) return {};
        const i6 = {};
        for (const t3 in n3) t3.startsWith(e6.attributeNamePrefix) ? i6[t3.substring(e6.attributeNamePrefix.length)] = n3[t3] : i6[t3] = n3[t3];
        return i6;
      }
      function nt(t2) {
        if (!t2 || "string" != typeof t2) return;
        const e6 = t2.indexOf(":");
        if (-1 !== e6 && e6 > 0) {
          const n3 = t2.substring(0, e6);
          if ("xmlns" !== n3) return n3;
        }
      }
      class it {
        constructor(t2) {
          var e6;
          this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.parseXml = ht, this.parseTextData = st, this.resolveNameSpace = rt, this.buildAttributesMap = at, this.isItStopNode = ct, this.replaceEntitiesValue = ut, this.readStopNodeData = mt, this.saveTextToParentTag = pt, this.addChild = lt, this.ignoreAttributesFn = "function" == typeof (e6 = this.options.ignoreAttributes) ? e6 : Array.isArray(e6) ? (t3) => {
            for (const n4 of e6) {
              if ("string" == typeof n4 && t3 === n4) return true;
              if (n4 instanceof RegExp && n4.test(t3)) return true;
            }
          } : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0;
          let n3 = { ...W };
          this.options.entityDecoder ? this.entityDecoder = this.options.entityDecoder : ("object" == typeof this.options.htmlEntities ? n3 = this.options.htmlEntities : true === this.options.htmlEntities && (n3 = { ...X, ...U }), this.entityDecoder = new tt({ namedEntities: n3, numericAllowed: this.options.htmlEntities, limit: { maxTotalExpansions: this.options.processEntities.maxTotalExpansions, maxExpandedLength: this.options.processEntities.maxExpandedLength, applyLimitsTo: this.options.processEntities.appliesTo } })), this.matcher = new R(), this.readonlyMatcher = this.matcher.readOnly(), this.isCurrentNodeStopNode = false, this.stopNodeExpressionsSet = new B();
          const i6 = this.options.stopNodes;
          if (i6 && i6.length > 0) {
            for (let t3 = 0; t3 < i6.length; t3++) {
              const e7 = i6[t3];
              "string" == typeof e7 ? this.stopNodeExpressionsSet.add(new G(e7)) : e7 instanceof G && this.stopNodeExpressionsSet.add(e7);
            }
            this.stopNodeExpressionsSet.seal();
          }
        }
      }
      function st(t2, e6, n3, i6, s2, r6, o3) {
        const a6 = this.options;
        if (void 0 !== t2 && (a6.trimValues && !i6 && (t2 = t2.trim()), t2.length > 0)) {
          o3 || (t2 = this.replaceEntitiesValue(t2, e6, n3));
          const i7 = a6.jPath ? n3.toString() : n3, h6 = a6.tagValueProcessor(e6, t2, i7, s2, r6);
          return null == h6 ? t2 : typeof h6 != typeof t2 || h6 !== t2 ? h6 : a6.trimValues || t2.trim() === t2 ? xt(t2, a6.parseTagValue, a6.numberParseOptions) : t2;
        }
      }
      function rt(t2) {
        if (this.options.removeNSPrefix) {
          const e6 = t2.split(":"), n3 = "/" === t2.charAt(0) ? "/" : "";
          if ("xmlns" === e6[0]) return "";
          2 === e6.length && (t2 = n3 + e6[1]);
        }
        return t2;
      }
      const ot = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
      function at(t2, e6, n3, i6 = false) {
        const r6 = this.options;
        if (true === i6 || true !== r6.ignoreAttributes && "string" == typeof t2) {
          const i7 = s(t2, ot), o3 = i7.length, a6 = {}, h6 = new Array(o3);
          let l4 = false;
          const u2 = {};
          for (let t3 = 0; t3 < o3; t3++) {
            const e7 = this.resolveNameSpace(i7[t3][1]), s2 = i7[t3][4];
            if (e7.length && void 0 !== s2) {
              let i8 = s2;
              r6.trimValues && (i8 = i8.trim()), i8 = this.replaceEntitiesValue(i8, n3, this.readonlyMatcher), h6[t3] = i8, u2[e7] = i8, l4 = true;
            }
          }
          l4 && "object" == typeof e6 && e6.updateCurrent && e6.updateCurrent(u2);
          const p3 = r6.jPath ? e6.toString() : this.readonlyMatcher;
          let c6 = false;
          for (let t3 = 0; t3 < o3; t3++) {
            const e7 = this.resolveNameSpace(i7[t3][1]);
            if (this.ignoreAttributesFn(e7, p3)) continue;
            let n4 = r6.attributeNamePrefix + e7;
            if (e7.length) if (r6.transformAttributeName && (n4 = r6.transformAttributeName(n4)), n4 = bt(n4, r6), void 0 !== i7[t3][4]) {
              const i8 = h6[t3], s2 = r6.attributeValueProcessor(e7, i8, p3);
              a6[n4] = null == s2 ? i8 : typeof s2 != typeof i8 || s2 !== i8 ? s2 : xt(i8, r6.parseAttributeValue, r6.numberParseOptions), c6 = true;
            } else r6.allowBooleanAttributes && (a6[n4] = true, c6 = true);
          }
          if (!c6) return;
          if (r6.attributesGroupName) {
            const t3 = {};
            return t3[r6.attributesGroupName] = a6, t3;
          }
          return a6;
        }
      }
      const ht = function(t2) {
        t2 = t2.replace(/\r\n?/g, "\n");
        const e6 = new O("!xml");
        let n3 = e6, i6 = "";
        this.matcher.reset(), this.entityDecoder.reset(), this.entityExpansionCount = 0, this.currentExpandedLength = 0;
        const s2 = this.options, r6 = new $(s2.processEntities), o3 = t2.length;
        for (let a6 = 0; a6 < o3; a6++) if ("<" === t2[a6]) {
          const h6 = t2.charCodeAt(a6 + 1);
          if (47 === h6) {
            const e7 = dt(t2, ">", a6, "Closing Tag is not closed.");
            let r7 = t2.substring(a6 + 2, e7).trim();
            if (s2.removeNSPrefix) {
              const t3 = r7.indexOf(":");
              -1 !== t3 && (r7 = r7.substr(t3 + 1));
            }
            r7 = Nt(s2.transformTagName, r7, "", s2).tagName, n3 && (i6 = this.saveTextToParentTag(i6, n3, this.readonlyMatcher));
            const o4 = this.matcher.getCurrentTag();
            if (r7 && s2.unpairedTagsSet.has(r7)) throw new Error(`Unpaired tag can not be used as closing tag: </${r7}>`);
            o4 && s2.unpairedTagsSet.has(o4) && (this.matcher.pop(), this.tagsNodeStack.pop()), this.matcher.pop(), this.isCurrentNodeStopNode = false, n3 = this.tagsNodeStack.pop(), i6 = "", a6 = e7;
          } else if (63 === h6) {
            let e7 = gt(t2, a6, false, "?>");
            if (!e7) throw new Error("Pi Tag is not closed.");
            i6 = this.saveTextToParentTag(i6, n3, this.readonlyMatcher);
            const r7 = this.buildAttributesMap(e7.tagExp, this.matcher, e7.tagName, true);
            if (r7) {
              const t3 = r7[this.options.attributeNamePrefix + "version"];
              this.entityDecoder.setXmlVersion(Number(t3) || 1);
            }
            if (s2.ignoreDeclaration && "?xml" === e7.tagName || s2.ignorePiTags) ;
            else {
              const t3 = new O(e7.tagName);
              t3.add(s2.textNodeName, ""), e7.tagName !== e7.tagExp && e7.attrExpPresent && true !== s2.ignoreAttributes && (t3[":@"] = r7), this.addChild(n3, t3, this.readonlyMatcher, a6);
            }
            a6 = e7.closeIndex + 1;
          } else if (33 === h6 && 45 === t2.charCodeAt(a6 + 2) && 45 === t2.charCodeAt(a6 + 3)) {
            const e7 = dt(t2, "-->", a6 + 4, "Comment is not closed.");
            if (s2.commentPropName) {
              const r7 = t2.substring(a6 + 4, e7 - 2);
              i6 = this.saveTextToParentTag(i6, n3, this.readonlyMatcher), n3.add(s2.commentPropName, [{ [s2.textNodeName]: r7 }]);
            }
            a6 = e7;
          } else if (33 === h6 && 68 === t2.charCodeAt(a6 + 2)) {
            const e7 = r6.readDocType(t2, a6);
            this.entityDecoder.addInputEntities(e7.entities), a6 = e7.i;
          } else if (33 === h6 && 91 === t2.charCodeAt(a6 + 2)) {
            const e7 = dt(t2, "]]>", a6, "CDATA is not closed.") - 2, r7 = t2.substring(a6 + 9, e7);
            i6 = this.saveTextToParentTag(i6, n3, this.readonlyMatcher);
            let o4 = this.parseTextData(r7, n3.tagname, this.readonlyMatcher, true, false, true, true);
            null == o4 && (o4 = ""), s2.cdataPropName ? n3.add(s2.cdataPropName, [{ [s2.textNodeName]: r7 }]) : n3.add(s2.textNodeName, o4), a6 = e7 + 2;
          } else {
            let r7 = gt(t2, a6, s2.removeNSPrefix);
            if (!r7) {
              const e7 = t2.substring(Math.max(0, a6 - 50), Math.min(o3, a6 + 50));
              throw new Error(`readTagExp returned undefined at position ${a6}. Context: "${e7}"`);
            }
            let h7 = r7.tagName;
            const l4 = r7.rawTagName;
            let u2 = r7.tagExp, p3 = r7.attrExpPresent, c6 = r7.closeIndex;
            if ({ tagName: h7, tagExp: u2 } = Nt(s2.transformTagName, h7, u2, s2), s2.strictReservedNames && (h7 === s2.commentPropName || h7 === s2.cdataPropName || h7 === s2.textNodeName || h7 === s2.attributesGroupName)) throw new Error(`Invalid tag name: ${h7}`);
            n3 && i6 && "!xml" !== n3.tagname && (i6 = this.saveTextToParentTag(i6, n3, this.readonlyMatcher, false));
            const d6 = n3;
            d6 && s2.unpairedTagsSet.has(d6.tagname) && (n3 = this.tagsNodeStack.pop(), this.matcher.pop());
            let f6 = false;
            u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1 && (f6 = true, "/" === h7[h7.length - 1] ? (h7 = h7.substr(0, h7.length - 1), u2 = h7) : u2 = u2.substr(0, u2.length - 1), p3 = h7 !== u2);
            let g6, m4 = null, x2 = {};
            g6 = nt(l4), h7 !== e6.tagname && this.matcher.push(h7, {}, g6), h7 !== u2 && p3 && (m4 = this.buildAttributesMap(u2, this.matcher, h7), m4 && (x2 = et(m4, s2))), h7 !== e6.tagname && (this.isCurrentNodeStopNode = this.isItStopNode());
            const N2 = a6;
            if (this.isCurrentNodeStopNode) {
              let e7 = "";
              if (f6) a6 = r7.closeIndex;
              else if (s2.unpairedTagsSet.has(h7)) a6 = r7.closeIndex;
              else {
                const n4 = this.readStopNodeData(t2, l4, c6 + 1);
                if (!n4) throw new Error(`Unexpected end of ${l4}`);
                a6 = n4.i, e7 = n4.tagContent;
              }
              const i7 = new O(h7);
              m4 && (i7[":@"] = m4), i7.add(s2.textNodeName, e7), this.matcher.pop(), this.isCurrentNodeStopNode = false, this.addChild(n3, i7, this.readonlyMatcher, N2);
            } else {
              if (f6) {
                ({ tagName: h7, tagExp: u2 } = Nt(s2.transformTagName, h7, u2, s2));
                const t3 = new O(h7);
                m4 && (t3[":@"] = m4), this.addChild(n3, t3, this.readonlyMatcher, N2), this.matcher.pop(), this.isCurrentNodeStopNode = false;
              } else {
                if (s2.unpairedTagsSet.has(h7)) {
                  const t3 = new O(h7);
                  m4 && (t3[":@"] = m4), this.addChild(n3, t3, this.readonlyMatcher, N2), this.matcher.pop(), this.isCurrentNodeStopNode = false, a6 = r7.closeIndex;
                  continue;
                }
                {
                  const t3 = new O(h7);
                  if (this.tagsNodeStack.length > s2.maxNestedTags) throw new Error("Maximum nested tags exceeded");
                  this.tagsNodeStack.push(n3), m4 && (t3[":@"] = m4), this.addChild(n3, t3, this.readonlyMatcher, N2), n3 = t3;
                }
              }
              i6 = "", a6 = c6;
            }
          }
        } else i6 += t2[a6];
        return e6.child;
      };
      function lt(t2, e6, n3, i6) {
        this.options.captureMetaData || (i6 = void 0);
        const s2 = this.options.jPath ? n3.toString() : n3, r6 = this.options.updateTag(e6.tagname, s2, e6[":@"]);
        false === r6 || ("string" == typeof r6 ? (e6.tagname = r6, t2.addChild(e6, i6)) : t2.addChild(e6, i6));
      }
      function ut(t2, e6, n3) {
        const i6 = this.options.processEntities;
        if (!i6 || !i6.enabled) return t2;
        if (i6.allowedTags) {
          const s2 = this.options.jPath ? n3.toString() : n3;
          if (!(Array.isArray(i6.allowedTags) ? i6.allowedTags.includes(e6) : i6.allowedTags(e6, s2))) return t2;
        }
        if (i6.tagFilter) {
          const s2 = this.options.jPath ? n3.toString() : n3;
          if (!i6.tagFilter(e6, s2)) return t2;
        }
        return this.entityDecoder.decode(t2);
      }
      function pt(t2, e6, n3, i6) {
        return t2 && (void 0 === i6 && (i6 = 0 === e6.child.length), void 0 !== (t2 = this.parseTextData(t2, e6.tagname, n3, false, !!e6[":@"] && 0 !== Object.keys(e6[":@"]).length, i6)) && "" !== t2 && e6.add(this.options.textNodeName, t2), t2 = ""), t2;
      }
      function ct() {
        return 0 !== this.stopNodeExpressionsSet.size && this.matcher.matchesAny(this.stopNodeExpressionsSet);
      }
      function dt(t2, e6, n3, i6) {
        const s2 = t2.indexOf(e6, n3);
        if (-1 === s2) throw new Error(i6);
        return s2 + e6.length - 1;
      }
      function ft(t2, e6, n3, i6) {
        const s2 = t2.indexOf(e6, n3);
        if (-1 === s2) throw new Error(i6);
        return s2;
      }
      function gt(t2, e6, n3, i6 = ">") {
        const s2 = (function(t3, e7, n4 = ">") {
          let i7 = 0;
          const s3 = [], r7 = t3.length, o4 = n4.charCodeAt(0), a7 = n4.length > 1 ? n4.charCodeAt(1) : -1;
          for (let n5 = e7; n5 < r7; n5++) {
            const e8 = t3.charCodeAt(n5);
            if (i7) e8 === i7 && (i7 = 0);
            else if (34 === e8 || 39 === e8) i7 = e8;
            else if (e8 === o4) {
              if (-1 === a7) return { data: String.fromCharCode(...s3), index: n5 };
              if (t3.charCodeAt(n5 + 1) === a7) return { data: String.fromCharCode(...s3), index: n5 };
            } else if (9 === e8) {
              s3.push(32);
              continue;
            }
            s3.push(e8);
          }
        })(t2, e6 + 1, i6);
        if (!s2) return;
        let r6 = s2.data;
        const o3 = s2.index, a6 = r6.search(/\s/);
        let h6 = r6, l4 = true;
        -1 !== a6 && (h6 = r6.substring(0, a6), r6 = r6.substring(a6 + 1).trimStart());
        const u2 = h6;
        if (n3) {
          const t3 = h6.indexOf(":");
          -1 !== t3 && (h6 = h6.substr(t3 + 1), l4 = h6 !== s2.data.substr(t3 + 1));
        }
        return { tagName: h6, tagExp: r6, closeIndex: o3, attrExpPresent: l4, rawTagName: u2 };
      }
      function mt(t2, e6, n3) {
        const i6 = n3;
        let s2 = 1;
        const r6 = t2.length;
        for (; n3 < r6; n3++) if ("<" === t2[n3]) {
          const r7 = t2.charCodeAt(n3 + 1);
          if (47 === r7) {
            const r8 = ft(t2, ">", n3, `${e6} is not closed`);
            if (t2.substring(n3 + 2, r8).trim() === e6 && (s2--, 0 === s2)) return { tagContent: t2.substring(i6, n3), i: r8 };
            n3 = r8;
          } else if (63 === r7) n3 = dt(t2, "?>", n3 + 1, "StopNode is not closed.");
          else if (33 === r7 && 45 === t2.charCodeAt(n3 + 2) && 45 === t2.charCodeAt(n3 + 3)) n3 = dt(t2, "-->", n3 + 3, "StopNode is not closed.");
          else if (33 === r7 && 91 === t2.charCodeAt(n3 + 2)) n3 = dt(t2, "]]>", n3, "StopNode is not closed.") - 2;
          else {
            const i7 = gt(t2, n3, ">");
            i7 && ((i7 && i7.tagName) === e6 && "/" !== i7.tagExp[i7.tagExp.length - 1] && s2++, n3 = i7.closeIndex);
          }
        }
      }
      function xt(t2, e6, n3) {
        if (e6 && "string" == typeof t2) {
          const e7 = t2.trim();
          return "true" === e7 || "false" !== e7 && (function(t3, e8 = {}) {
            if (e8 = Object.assign({}, L, e8), !t3 || "string" != typeof t3) return t3;
            let n4 = t3.trim();
            if (0 === n4.length) return t3;
            if (void 0 !== e8.skipLike && e8.skipLike.test(n4)) return t3;
            if ("0" === n4) return 0;
            if (e8.hex && j5.test(n4)) return (function(t4) {
              if (parseInt) return parseInt(t4, 16);
              if (Number.parseInt) return Number.parseInt(t4, 16);
              if (window && window.parseInt) return window.parseInt(t4, 16);
              throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
            })(n4);
            if (isFinite(n4)) {
              if (n4.includes("e") || n4.includes("E")) return (function(t4, e9, n5) {
                if (!n5.eNotation) return t4;
                const i7 = e9.match(k5);
                if (i7) {
                  let s2 = i7[1] || "";
                  const r6 = -1 === i7[3].indexOf("e") ? "E" : "e", o3 = i7[2], a6 = s2 ? t4[o3.length + 1] === r6 : t4[o3.length] === r6;
                  return o3.length > 1 && a6 ? t4 : (1 !== o3.length || !i7[3].startsWith(`.${r6}`) && i7[3][0] !== r6) && o3.length > 0 ? n5.leadingZeros && !a6 ? (e9 = (i7[1] || "") + i7[3], Number(e9)) : t4 : Number(e9);
                }
                return t4;
              })(t3, n4, e8);
              {
                const s2 = V.exec(n4);
                if (s2) {
                  const r6 = s2[1] || "", o3 = s2[2];
                  let a6 = (i6 = s2[3]) && -1 !== i6.indexOf(".") ? ("." === (i6 = i6.replace(/0+$/, "")) ? i6 = "0" : "." === i6[0] ? i6 = "0" + i6 : "." === i6[i6.length - 1] && (i6 = i6.substring(0, i6.length - 1)), i6) : i6;
                  const h6 = r6 ? "." === t3[o3.length + 1] : "." === t3[o3.length];
                  if (!e8.leadingZeros && (o3.length > 1 || 1 === o3.length && !h6)) return t3;
                  {
                    const i7 = Number(n4), s3 = String(i7);
                    if (0 === i7) return i7;
                    if (-1 !== s3.search(/[eE]/)) return e8.eNotation ? i7 : t3;
                    if (-1 !== n4.indexOf(".")) return "0" === s3 || s3 === a6 || s3 === `${r6}${a6}` ? i7 : t3;
                    let h7 = o3 ? a6 : n4;
                    return o3 ? h7 === s3 || r6 + h7 === s3 ? i7 : t3 : h7 === s3 || h7 === r6 + s3 ? i7 : t3;
                  }
                }
                return t3;
              }
            }
            var i6;
            return (function(t4, e9, n5) {
              const i7 = e9 === 1 / 0;
              switch (n5.infinity.toLowerCase()) {
                case "null":
                  return null;
                case "infinity":
                  return e9;
                case "string":
                  return i7 ? "Infinity" : "-Infinity";
                default:
                  return t4;
              }
            })(t3, Number(n4), e8);
          })(t2, n3);
        }
        return void 0 !== t2 ? t2 : "";
      }
      function Nt(t2, e6, n3, i6) {
        if (t2) {
          const i7 = t2(e6);
          n3 === e6 && (n3 = i7), e6 = i7;
        }
        return { tagName: e6 = bt(e6, i6), tagExp: n3 };
      }
      function bt(t2, e6) {
        if (a5.includes(t2)) throw new Error(`[SECURITY] Invalid name: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
        return o2.includes(t2) ? e6.onDangerousProperty(t2) : t2;
      }
      const yt = O.getMetaDataSymbol();
      function Et(t2, e6) {
        if (!t2 || "object" != typeof t2) return {};
        if (!e6) return t2;
        const n3 = {};
        for (const i6 in t2) i6.startsWith(e6) ? n3[i6.substring(e6.length)] = t2[i6] : n3[i6] = t2[i6];
        return n3;
      }
      function wt(t2, e6, n3, i6) {
        return vt(t2, e6, n3, i6);
      }
      function vt(t2, e6, n3, i6) {
        let s2;
        const r6 = {};
        for (let o3 = 0; o3 < t2.length; o3++) {
          const a6 = t2[o3], h6 = St(a6);
          if (void 0 !== h6 && h6 !== e6.textNodeName) {
            const t3 = Et(a6[":@"] || {}, e6.attributeNamePrefix);
            n3.push(h6, t3);
          }
          if (h6 === e6.textNodeName) void 0 === s2 ? s2 = a6[h6] : s2 += "" + a6[h6];
          else {
            if (void 0 === h6) continue;
            if (a6[h6]) {
              let t3 = vt(a6[h6], e6, n3, i6);
              const s3 = At(t3, e6);
              if (a6[":@"] ? _t(t3, a6[":@"], i6, e6) : 1 !== Object.keys(t3).length || void 0 === t3[e6.textNodeName] || e6.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e6.alwaysCreateTextNode ? t3[e6.textNodeName] = "" : t3 = "") : t3 = t3[e6.textNodeName], void 0 !== a6[yt] && "object" == typeof t3 && null !== t3 && (t3[yt] = a6[yt]), void 0 !== r6[h6] && Object.prototype.hasOwnProperty.call(r6, h6)) Array.isArray(r6[h6]) || (r6[h6] = [r6[h6]]), r6[h6].push(t3);
              else {
                const n4 = e6.jPath ? i6.toString() : i6;
                e6.isArray(h6, n4, s3) ? r6[h6] = [t3] : r6[h6] = t3;
              }
              void 0 !== h6 && h6 !== e6.textNodeName && n3.pop();
            }
          }
        }
        return "string" == typeof s2 ? s2.length > 0 && (r6[e6.textNodeName] = s2) : void 0 !== s2 && (r6[e6.textNodeName] = s2), r6;
      }
      function St(t2) {
        const e6 = Object.keys(t2);
        for (let t3 = 0; t3 < e6.length; t3++) {
          const n3 = e6[t3];
          if (":@" !== n3) return n3;
        }
      }
      function _t(t2, e6, n3, i6) {
        if (e6) {
          const s2 = Object.keys(e6), r6 = s2.length;
          for (let o3 = 0; o3 < r6; o3++) {
            const r7 = s2[o3], a6 = r7.startsWith(i6.attributeNamePrefix) ? r7.substring(i6.attributeNamePrefix.length) : r7, h6 = i6.jPath ? n3.toString() + "." + a6 : n3;
            i6.isArray(r7, h6, true, true) ? t2[r7] = [e6[r7]] : t2[r7] = e6[r7];
          }
        }
      }
      function At(t2, e6) {
        const { textNodeName: n3 } = e6, i6 = Object.keys(t2).length;
        return 0 === i6 || !(1 !== i6 || !t2[n3] && "boolean" != typeof t2[n3] && 0 !== t2[n3]);
      }
      class Tt {
        constructor(t2) {
          this.externalEntities = {}, this.options = C(t2);
        }
        parse(t2, e6) {
          if ("string" != typeof t2 && t2.toString) t2 = t2.toString();
          else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form.");
          if (e6) {
            true === e6 && (e6 = {});
            const n4 = l3(t2, e6);
            if (true !== n4) throw Error(`${n4.err.msg}:${n4.err.line}:${n4.err.col}`);
          }
          const n3 = new it(this.options);
          n3.entityDecoder.setExternalEntities(this.externalEntities);
          const i6 = n3.parseXml(t2);
          return this.options.preserveOrder || void 0 === i6 ? i6 : wt(i6, this.options, n3.matcher, n3.readonlyMatcher);
        }
        addEntity(t2, e6) {
          if (-1 !== e6.indexOf("&")) throw new Error("Entity value can't have '&'");
          if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");
          if ("&" === e6) throw new Error("An entity with value '&' is not permitted");
          this.externalEntities[t2] = e6;
        }
        static getMetaDataSymbol() {
          return O.getMetaDataSymbol();
        }
      }
      function Ct(t2, e6) {
        let n3 = "";
        e6.format && e6.indentBy.length > 0 && (n3 = "\n");
        const i6 = [];
        if (e6.stopNodes && Array.isArray(e6.stopNodes)) for (let t3 = 0; t3 < e6.stopNodes.length; t3++) {
          const n4 = e6.stopNodes[t3];
          "string" == typeof n4 ? i6.push(new G(n4)) : n4 instanceof G && i6.push(n4);
        }
        return Pt(t2, e6, n3, new R(), i6);
      }
      function Pt(t2, e6, n3, i6, s2) {
        let r6 = "", o3 = false;
        if (e6.maxNestedTags && i6.getDepth() > e6.maxNestedTags) throw new Error("Maximum nested tags exceeded");
        if (!Array.isArray(t2)) {
          if (null != t2) {
            let n4 = t2.toString();
            return n4 = Vt(n4, e6), n4;
          }
          return "";
        }
        for (let a6 = 0; a6 < t2.length; a6++) {
          const h6 = t2[a6], l4 = Dt(h6);
          if (void 0 === l4) continue;
          const u2 = Ot(h6[":@"], e6);
          i6.push(l4, u2);
          const p3 = jt(i6, s2);
          if (l4 === e6.textNodeName) {
            let t3 = h6[l4];
            p3 || (t3 = e6.tagValueProcessor(l4, t3), t3 = Vt(t3, e6)), o3 && (r6 += n3), r6 += t3, o3 = false, i6.pop();
            continue;
          }
          if (l4 === e6.cdataPropName) {
            o3 && (r6 += n3);
            const t3 = h6[l4][0][e6.textNodeName];
            r6 += `<![CDATA[${String(t3).replace(/\]\]>/g, "]]]]><![CDATA[>")}]]>`, o3 = false, i6.pop();
            continue;
          }
          if (l4 === e6.commentPropName) {
            const t3 = h6[l4][0][e6.textNodeName];
            r6 += n3 + `<!--${String(t3).replace(/--/g, "- -").replace(/-$/, "- ")}-->`, o3 = true, i6.pop();
            continue;
          }
          if ("?" === l4[0]) {
            const t3 = Mt(h6[":@"], e6, p3), s3 = "?xml" === l4 ? "" : n3;
            let a7 = h6[l4][0][e6.textNodeName];
            a7 = 0 !== a7.length ? " " + a7 : "", r6 += s3 + `<${l4}${a7}${t3}?>`, o3 = true, i6.pop();
            continue;
          }
          let c6 = n3;
          "" !== c6 && (c6 += e6.indentBy);
          const d6 = n3 + `<${l4}${Mt(h6[":@"], e6, p3)}`;
          let f6;
          f6 = p3 ? $t(h6[l4], e6) : Pt(h6[l4], e6, c6, i6, s2), -1 !== e6.unpairedTags.indexOf(l4) ? e6.suppressUnpairedNode ? r6 += d6 + ">" : r6 += d6 + "/>" : f6 && 0 !== f6.length || !e6.suppressEmptyNode ? f6 && f6.endsWith(">") ? r6 += d6 + `>${f6}${n3}</${l4}>` : (r6 += d6 + ">", f6 && "" !== n3 && (f6.includes("/>") || f6.includes("</")) ? r6 += n3 + e6.indentBy + f6 + n3 : r6 += f6, r6 += `</${l4}>`) : r6 += d6 + "/>", o3 = true, i6.pop();
        }
        return r6;
      }
      function Ot(t2, e6) {
        if (!t2 || e6.ignoreAttributes) return null;
        const n3 = {};
        let i6 = false;
        for (let s2 in t2) Object.prototype.hasOwnProperty.call(t2, s2) && (n3[s2.startsWith(e6.attributeNamePrefix) ? s2.substr(e6.attributeNamePrefix.length) : s2] = t2[s2], i6 = true);
        return i6 ? n3 : null;
      }
      function $t(t2, e6) {
        if (!Array.isArray(t2)) return null != t2 ? t2.toString() : "";
        let n3 = "";
        for (let i6 = 0; i6 < t2.length; i6++) {
          const s2 = t2[i6], r6 = Dt(s2);
          if (r6 === e6.textNodeName) n3 += s2[r6];
          else if (r6 === e6.cdataPropName) n3 += s2[r6][0][e6.textNodeName];
          else if (r6 === e6.commentPropName) n3 += s2[r6][0][e6.textNodeName];
          else {
            if (r6 && "?" === r6[0]) continue;
            if (r6) {
              const t3 = It(s2[":@"], e6), i7 = $t(s2[r6], e6);
              i7 && 0 !== i7.length ? n3 += `<${r6}${t3}>${i7}</${r6}>` : n3 += `<${r6}${t3}/>`;
            }
          }
        }
        return n3;
      }
      function It(t2, e6) {
        let n3 = "";
        if (t2 && !e6.ignoreAttributes) for (let i6 in t2) {
          if (!Object.prototype.hasOwnProperty.call(t2, i6)) continue;
          let s2 = t2[i6];
          true === s2 && e6.suppressBooleanAttributes ? n3 += ` ${i6.substr(e6.attributeNamePrefix.length)}` : n3 += ` ${i6.substr(e6.attributeNamePrefix.length)}="${s2}"`;
        }
        return n3;
      }
      function Dt(t2) {
        const e6 = Object.keys(t2);
        for (let n3 = 0; n3 < e6.length; n3++) {
          const i6 = e6[n3];
          if (Object.prototype.hasOwnProperty.call(t2, i6) && ":@" !== i6) return i6;
        }
      }
      function Mt(t2, e6, n3) {
        let i6 = "";
        if (t2 && !e6.ignoreAttributes) for (let s2 in t2) {
          if (!Object.prototype.hasOwnProperty.call(t2, s2)) continue;
          let r6;
          n3 ? r6 = t2[s2] : (r6 = e6.attributeValueProcessor(s2, t2[s2]), r6 = Vt(r6, e6)), true === r6 && e6.suppressBooleanAttributes ? i6 += ` ${s2.substr(e6.attributeNamePrefix.length)}` : i6 += ` ${s2.substr(e6.attributeNamePrefix.length)}="${r6}"`;
        }
        return i6;
      }
      function jt(t2, e6) {
        if (!e6 || 0 === e6.length) return false;
        for (let n3 = 0; n3 < e6.length; n3++) if (t2.matches(e6[n3])) return true;
        return false;
      }
      function Vt(t2, e6) {
        if (t2 && t2.length > 0 && e6.processEntities) for (let n3 = 0; n3 < e6.entities.length; n3++) {
          const i6 = e6.entities[n3];
          t2 = t2.replace(i6.regex, i6.val);
        }
        return t2;
      }
      const Lt = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: "  ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e6) {
        return e6;
      }, attributeValueProcessor: function(t2, e6) {
        return e6;
      }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&amp;" }, { regex: new RegExp(">", "g"), val: "&gt;" }, { regex: new RegExp("<", "g"), val: "&lt;" }, { regex: new RegExp("'", "g"), val: "&apos;" }, { regex: new RegExp('"', "g"), val: "&quot;" }], processEntities: true, stopNodes: [], oneListGroup: false, maxNestedTags: 100, jPath: true };
      function kt(t2) {
        if (this.options = Object.assign({}, Lt, t2), this.options.stopNodes && Array.isArray(this.options.stopNodes) && (this.options.stopNodes = this.options.stopNodes.map((t3) => "string" == typeof t3 && t3.startsWith("*.") ? ".." + t3.substring(2) : t3)), this.stopNodeExpressions = [], this.options.stopNodes && Array.isArray(this.options.stopNodes)) for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
          const e7 = this.options.stopNodes[t3];
          "string" == typeof e7 ? this.stopNodeExpressions.push(new G(e7)) : e7 instanceof G && this.stopNodeExpressions.push(e7);
        }
        var e6;
        true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
          return false;
        } : (this.ignoreAttributesFn = "function" == typeof (e6 = this.options.ignoreAttributes) ? e6 : Array.isArray(e6) ? (t3) => {
          for (const n3 of e6) {
            if ("string" == typeof n3 && t3 === n3) return true;
            if (n3 instanceof RegExp && n3.test(t3)) return true;
          }
        } : () => false, this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Gt), this.processTextOrObjNode = Ft, this.options.format ? (this.indentate = Rt, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
          return "";
        }, this.tagEndChar = ">", this.newLine = "");
      }
      function Ft(t2, e6, n3, i6) {
        const s2 = this.extractAttributes(t2);
        if (i6.push(e6, s2), this.checkStopNode(i6)) {
          const s3 = this.buildRawContent(t2), r7 = this.buildAttributesForStopNode(t2);
          return i6.pop(), this.buildObjectNode(s3, e6, r7, n3);
        }
        const r6 = this.j2x(t2, n3 + 1, i6);
        return i6.pop(), void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e6, r6.attrStr, n3, i6) : this.buildObjectNode(r6.val, e6, r6.attrStr, n3);
      }
      function Rt(t2) {
        return this.options.indentBy.repeat(t2);
      }
      function Gt(t2) {
        return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen);
      }
      kt.prototype.build = function(t2) {
        if (this.options.preserveOrder) return Ct(t2, this.options);
        {
          Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
          const e6 = new R();
          return this.j2x(t2, 0, e6).val;
        }
      }, kt.prototype.j2x = function(t2, e6, n3) {
        let i6 = "", s2 = "";
        if (this.options.maxNestedTags && n3.getDepth() >= this.options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
        const r6 = this.options.jPath ? n3.toString() : n3, o3 = this.checkStopNode(n3);
        for (let a6 in t2) if (Object.prototype.hasOwnProperty.call(t2, a6)) if (void 0 === t2[a6]) this.isAttribute(a6) && (s2 += "");
        else if (null === t2[a6]) this.isAttribute(a6) || a6 === this.options.cdataPropName ? s2 += "" : "?" === a6[0] ? s2 += this.indentate(e6) + "<" + a6 + "?" + this.tagEndChar : s2 += this.indentate(e6) + "<" + a6 + "/" + this.tagEndChar;
        else if (t2[a6] instanceof Date) s2 += this.buildTextValNode(t2[a6], a6, "", e6, n3);
        else if ("object" != typeof t2[a6]) {
          const h6 = this.isAttribute(a6);
          if (h6 && !this.ignoreAttributesFn(h6, r6)) i6 += this.buildAttrPairStr(h6, "" + t2[a6], o3);
          else if (!h6) if (a6 === this.options.textNodeName) {
            let e7 = this.options.tagValueProcessor(a6, "" + t2[a6]);
            s2 += this.replaceEntitiesValue(e7);
          } else {
            n3.push(a6);
            const i7 = this.checkStopNode(n3);
            if (n3.pop(), i7) {
              const n4 = "" + t2[a6];
              s2 += "" === n4 ? this.indentate(e6) + "<" + a6 + this.closeTag(a6) + this.tagEndChar : this.indentate(e6) + "<" + a6 + ">" + n4 + "</" + a6 + this.tagEndChar;
            } else s2 += this.buildTextValNode(t2[a6], a6, "", e6, n3);
          }
        } else if (Array.isArray(t2[a6])) {
          const i7 = t2[a6].length;
          let r7 = "", o4 = "";
          for (let h6 = 0; h6 < i7; h6++) {
            const i8 = t2[a6][h6];
            if (void 0 === i8) ;
            else if (null === i8) "?" === a6[0] ? s2 += this.indentate(e6) + "<" + a6 + "?" + this.tagEndChar : s2 += this.indentate(e6) + "<" + a6 + "/" + this.tagEndChar;
            else if ("object" == typeof i8) if (this.options.oneListGroup) {
              n3.push(a6);
              const t3 = this.j2x(i8, e6 + 1, n3);
              n3.pop(), r7 += t3.val, this.options.attributesGroupName && i8.hasOwnProperty(this.options.attributesGroupName) && (o4 += t3.attrStr);
            } else r7 += this.processTextOrObjNode(i8, a6, e6, n3);
            else if (this.options.oneListGroup) {
              let t3 = this.options.tagValueProcessor(a6, i8);
              t3 = this.replaceEntitiesValue(t3), r7 += t3;
            } else {
              n3.push(a6);
              const t3 = this.checkStopNode(n3);
              if (n3.pop(), t3) {
                const t4 = "" + i8;
                r7 += "" === t4 ? this.indentate(e6) + "<" + a6 + this.closeTag(a6) + this.tagEndChar : this.indentate(e6) + "<" + a6 + ">" + t4 + "</" + a6 + this.tagEndChar;
              } else r7 += this.buildTextValNode(i8, a6, "", e6, n3);
            }
          }
          this.options.oneListGroup && (r7 = this.buildObjectNode(r7, a6, o4, e6)), s2 += r7;
        } else if (this.options.attributesGroupName && a6 === this.options.attributesGroupName) {
          const e7 = Object.keys(t2[a6]), n4 = e7.length;
          for (let s3 = 0; s3 < n4; s3++) i6 += this.buildAttrPairStr(e7[s3], "" + t2[a6][e7[s3]], o3);
        } else s2 += this.processTextOrObjNode(t2[a6], a6, e6, n3);
        return { attrStr: i6, val: s2 };
      }, kt.prototype.buildAttrPairStr = function(t2, e6, n3) {
        return n3 || (e6 = this.options.attributeValueProcessor(t2, "" + e6), e6 = this.replaceEntitiesValue(e6)), this.options.suppressBooleanAttributes && "true" === e6 ? " " + t2 : " " + t2 + '="' + e6 + '"';
      }, kt.prototype.extractAttributes = function(t2) {
        if (!t2 || "object" != typeof t2) return null;
        const e6 = {};
        let n3 = false;
        if (this.options.attributesGroupName && t2[this.options.attributesGroupName]) {
          const i6 = t2[this.options.attributesGroupName];
          for (let t3 in i6) Object.prototype.hasOwnProperty.call(i6, t3) && (e6[t3.startsWith(this.options.attributeNamePrefix) ? t3.substring(this.options.attributeNamePrefix.length) : t3] = i6[t3], n3 = true);
        } else for (let i6 in t2) {
          if (!Object.prototype.hasOwnProperty.call(t2, i6)) continue;
          const s2 = this.isAttribute(i6);
          s2 && (e6[s2] = t2[i6], n3 = true);
        }
        return n3 ? e6 : null;
      }, kt.prototype.buildRawContent = function(t2) {
        if ("string" == typeof t2) return t2;
        if ("object" != typeof t2 || null === t2) return String(t2);
        if (void 0 !== t2[this.options.textNodeName]) return t2[this.options.textNodeName];
        let e6 = "";
        for (let n3 in t2) {
          if (!Object.prototype.hasOwnProperty.call(t2, n3)) continue;
          if (this.isAttribute(n3)) continue;
          if (this.options.attributesGroupName && n3 === this.options.attributesGroupName) continue;
          const i6 = t2[n3];
          if (n3 === this.options.textNodeName) e6 += i6;
          else if (Array.isArray(i6)) {
            for (let t3 of i6) if ("string" == typeof t3 || "number" == typeof t3) e6 += `<${n3}>${t3}</${n3}>`;
            else if ("object" == typeof t3 && null !== t3) {
              const i7 = this.buildRawContent(t3), s2 = this.buildAttributesForStopNode(t3);
              e6 += "" === i7 ? `<${n3}${s2}/>` : `<${n3}${s2}>${i7}</${n3}>`;
            }
          } else if ("object" == typeof i6 && null !== i6) {
            const t3 = this.buildRawContent(i6), s2 = this.buildAttributesForStopNode(i6);
            e6 += "" === t3 ? `<${n3}${s2}/>` : `<${n3}${s2}>${t3}</${n3}>`;
          } else e6 += `<${n3}>${i6}</${n3}>`;
        }
        return e6;
      }, kt.prototype.buildAttributesForStopNode = function(t2) {
        if (!t2 || "object" != typeof t2) return "";
        let e6 = "";
        if (this.options.attributesGroupName && t2[this.options.attributesGroupName]) {
          const n3 = t2[this.options.attributesGroupName];
          for (let t3 in n3) {
            if (!Object.prototype.hasOwnProperty.call(n3, t3)) continue;
            const i6 = t3.startsWith(this.options.attributeNamePrefix) ? t3.substring(this.options.attributeNamePrefix.length) : t3, s2 = n3[t3];
            true === s2 && this.options.suppressBooleanAttributes ? e6 += " " + i6 : e6 += " " + i6 + '="' + s2 + '"';
          }
        } else for (let n3 in t2) {
          if (!Object.prototype.hasOwnProperty.call(t2, n3)) continue;
          const i6 = this.isAttribute(n3);
          if (i6) {
            const s2 = t2[n3];
            true === s2 && this.options.suppressBooleanAttributes ? e6 += " " + i6 : e6 += " " + i6 + '="' + s2 + '"';
          }
        }
        return e6;
      }, kt.prototype.buildObjectNode = function(t2, e6, n3, i6) {
        if ("" === t2) return "?" === e6[0] ? this.indentate(i6) + "<" + e6 + n3 + "?" + this.tagEndChar : this.indentate(i6) + "<" + e6 + n3 + this.closeTag(e6) + this.tagEndChar;
        {
          let s2 = "</" + e6 + this.tagEndChar, r6 = "";
          return "?" === e6[0] && (r6 = "?", s2 = ""), !n3 && "" !== n3 || -1 !== t2.indexOf("<") ? false !== this.options.commentPropName && e6 === this.options.commentPropName && 0 === r6.length ? this.indentate(i6) + `<!--${t2}-->` + this.newLine : this.indentate(i6) + "<" + e6 + n3 + r6 + this.tagEndChar + t2 + this.indentate(i6) + s2 : this.indentate(i6) + "<" + e6 + n3 + r6 + ">" + t2 + s2;
        }
      }, kt.prototype.closeTag = function(t2) {
        let e6 = "";
        return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e6 = "/") : e6 = this.options.suppressEmptyNode ? "/" : `></${t2}`, e6;
      }, kt.prototype.checkStopNode = function(t2) {
        if (!this.stopNodeExpressions || 0 === this.stopNodeExpressions.length) return false;
        for (let e6 = 0; e6 < this.stopNodeExpressions.length; e6++) if (t2.matches(this.stopNodeExpressions[e6])) return true;
        return false;
      }, kt.prototype.buildTextValNode = function(t2, e6, n3, i6, s2) {
        if (false !== this.options.cdataPropName && e6 === this.options.cdataPropName) {
          const e7 = String(t2).replace(/\]\]>/g, "]]]]><![CDATA[>");
          return this.indentate(i6) + `<![CDATA[${e7}]]>` + this.newLine;
        }
        if (false !== this.options.commentPropName && e6 === this.options.commentPropName) {
          const e7 = String(t2).replace(/--/g, "- -").replace(/-$/, "- ");
          return this.indentate(i6) + `<!--${e7}-->` + this.newLine;
        }
        if ("?" === e6[0]) return this.indentate(i6) + "<" + e6 + n3 + "?" + this.tagEndChar;
        {
          let s3 = this.options.tagValueProcessor(e6, t2);
          return s3 = this.replaceEntitiesValue(s3), "" === s3 ? this.indentate(i6) + "<" + e6 + n3 + this.closeTag(e6) + this.tagEndChar : this.indentate(i6) + "<" + e6 + n3 + ">" + s3 + "</" + e6 + this.tagEndChar;
        }
      }, kt.prototype.replaceEntitiesValue = function(t2) {
        if (t2 && t2.length > 0 && this.options.processEntities) for (let e6 = 0; e6 < this.options.entities.length; e6++) {
          const n3 = this.options.entities[e6];
          t2 = t2.replace(n3.regex, n3.val);
        }
        return t2;
      };
      const Bt = kt, Ut = { validate: l3 };
      module2.exports = e5;
    })();
  }
});

// ../../node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js
var require_xml_parser = __commonJS({
  "../../node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.parseXML = parseXML3;
    var fast_xml_parser_1 = require_fxp();
    var parser = new fast_xml_parser_1.XMLParser({
      attributeNamePrefix: "",
      processEntities: {
        enabled: true,
        maxTotalExpansions: Infinity
      },
      htmlEntities: true,
      ignoreAttributes: false,
      ignoreDeclaration: true,
      parseTagValue: false,
      trimValues: false,
      tagValueProcessor: (_, val) => val.trim() === "" && val.includes("\n") ? "" : void 0,
      maxNestedTags: Infinity
    });
    function parseXML3(xmlString) {
      return parser.parse(xmlString, true);
    }
  }
});

// ../../node_modules/@aws-sdk/xml-builder/dist-cjs/index.js
var require_dist_cjs44 = __commonJS({
  "../../node_modules/@aws-sdk/xml-builder/dist-cjs/index.js"(exports2) {
    "use strict";
    var xmlParser = require_xml_parser();
    var ATTR_ESCAPE_RE = /[&<>"]/g;
    var ATTR_ESCAPE_MAP = {
      "&": "&amp;",
      "<": "&lt;",
      ">": "&gt;",
      '"': "&quot;"
    };
    function escapeAttribute(value) {
      return value.replace(ATTR_ESCAPE_RE, (ch) => ATTR_ESCAPE_MAP[ch]);
    }
    var ELEMENT_ESCAPE_RE = /[&"'<>\r\n\u0085\u2028]/g;
    var ELEMENT_ESCAPE_MAP = {
      "&": "&amp;",
      '"': "&quot;",
      "'": "&apos;",
      "<": "&lt;",
      ">": "&gt;",
      "\r": "&#x0D;",
      "\n": "&#x0A;",
      "\x85": "&#x85;",
      "\u2028": "&#x2028;"
    };
    function escapeElement(value) {
      return value.replace(ELEMENT_ESCAPE_RE, (ch) => ELEMENT_ESCAPE_MAP[ch]);
    }
    var XmlText2 = class {
      value;
      constructor(value) {
        this.value = value;
      }
      toString() {
        return escapeElement("" + this.value);
      }
    };
    var XmlNode2 = class _XmlNode {
      name;
      children;
      attributes = {};
      static of(name, childText, withName) {
        const node = new _XmlNode(name);
        if (childText !== void 0) {
          node.addChildNode(new XmlText2(childText));
        }
        if (withName !== void 0) {
          node.withName(withName);
        }
        return node;
      }
      constructor(name, children = []) {
        this.name = name;
        this.children = children;
      }
      withName(name) {
        this.name = name;
        return this;
      }
      addAttribute(name, value) {
        this.attributes[name] = value;
        return this;
      }
      addChildNode(child) {
        this.children.push(child);
        return this;
      }
      removeAttribute(name) {
        delete this.attributes[name];
        return this;
      }
      n(name) {
        this.name = name;
        return this;
      }
      c(child) {
        this.children.push(child);
        return this;
      }
      a(name, value) {
        if (value != null) {
          this.attributes[name] = value;
        }
        return this;
      }
      cc(input, field, withName = field) {
        if (input[field] != null) {
          const node = _XmlNode.of(field, input[field]).withName(withName);
          this.c(node);
        }
      }
      l(input, listName, memberName, valueProvider) {
        if (input[listName] != null) {
          const nodes5 = valueProvider();
          nodes5.map((node) => {
            node.withName(memberName);
            this.c(node);
          });
        }
      }
      lc(input, listName, memberName, valueProvider) {
        if (input[listName] != null) {
          const nodes5 = valueProvider();
          const containerNode = new _XmlNode(memberName);
          nodes5.map((node) => {
            containerNode.c(node);
          });
          this.c(containerNode);
        }
      }
      toString() {
        const hasChildren = Boolean(this.children.length);
        let xmlText = `<${this.name}`;
        const attributes = this.attributes;
        for (const attributeName of Object.keys(attributes)) {
          const attribute = attributes[attributeName];
          if (attribute != null) {
            xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`;
          }
        }
        return xmlText += !hasChildren ? "/>" : `>${this.children.map((c5) => c5.toString()).join("")}</${this.name}>`;
      }
    };
    exports2.parseXML = xmlParser.parseXML;
    exports2.XmlNode = XmlNode2;
    exports2.XmlText = XmlText2;
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js
var import_xml_builder, import_smithy_client4, import_util_utf87, XmlShapeDeserializer;
var init_XmlShapeDeserializer = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js"() {
    import_xml_builder = __toESM(require_dist_cjs44());
    init_protocols();
    init_schema();
    import_smithy_client4 = __toESM(require_dist_cjs34());
    import_util_utf87 = __toESM(require_dist_cjs9());
    init_ConfigurableSerdeContext();
    init_UnionSerde();
    XmlShapeDeserializer = class extends SerdeContextConfig {
      settings;
      stringDeserializer;
      constructor(settings) {
        super();
        this.settings = settings;
        this.stringDeserializer = new FromStringShapeDeserializer(settings);
      }
      setSerdeContext(serdeContext) {
        this.serdeContext = serdeContext;
        this.stringDeserializer.setSerdeContext(serdeContext);
      }
      read(schema, bytes, key) {
        const ns = NormalizedSchema.of(schema);
        const memberSchemas = ns.getMemberSchemas();
        const isEventPayload = ns.isStructSchema() && ns.isMemberSchema() && !!Object.values(memberSchemas).find((memberNs) => {
          return !!memberNs.getMemberTraits().eventPayload;
        });
        if (isEventPayload) {
          const output = {};
          const memberName = Object.keys(memberSchemas)[0];
          const eventMemberSchema = memberSchemas[memberName];
          if (eventMemberSchema.isBlobSchema()) {
            output[memberName] = bytes;
          } else {
            output[memberName] = this.read(memberSchemas[memberName], bytes);
          }
          return output;
        }
        const xmlString = (this.serdeContext?.utf8Encoder ?? import_util_utf87.toUtf8)(bytes);
        const parsedObject = this.parseXml(xmlString);
        return this.readSchema(schema, key ? parsedObject[key] : parsedObject);
      }
      readSchema(_schema, value) {
        const ns = NormalizedSchema.of(_schema);
        if (ns.isUnitSchema()) {
          return;
        }
        const traits = ns.getMergedTraits();
        if (ns.isListSchema() && !Array.isArray(value)) {
          return this.readSchema(ns, [value]);
        }
        if (value == null) {
          return value;
        }
        if (typeof value === "object") {
          const flat = !!traits.xmlFlattened;
          if (ns.isListSchema()) {
            const listValue = ns.getValueSchema();
            const buffer2 = [];
            const sourceKey = listValue.getMergedTraits().xmlName ?? "member";
            const source = flat ? value : (value[0] ?? value)[sourceKey];
            if (source == null) {
              return buffer2;
            }
            const sourceArray = Array.isArray(source) ? source : [source];
            for (const v of sourceArray) {
              buffer2.push(this.readSchema(listValue, v));
            }
            return buffer2;
          }
          const buffer = {};
          if (ns.isMapSchema()) {
            const keyNs = ns.getKeySchema();
            const memberNs = ns.getValueSchema();
            let entries;
            if (flat) {
              entries = Array.isArray(value) ? value : [value];
            } else {
              entries = Array.isArray(value.entry) ? value.entry : [value.entry];
            }
            const keyProperty = keyNs.getMergedTraits().xmlName ?? "key";
            const valueProperty = memberNs.getMergedTraits().xmlName ?? "value";
            for (const entry of entries) {
              const key = entry[keyProperty];
              const value2 = entry[valueProperty];
              buffer[key] = this.readSchema(memberNs, value2);
            }
            return buffer;
          }
          if (ns.isStructSchema()) {
            const union = ns.isUnionSchema();
            let unionSerde;
            if (union) {
              unionSerde = new UnionSerde(value, buffer);
            }
            for (const [memberName, memberSchema] of ns.structIterator()) {
              const memberTraits = memberSchema.getMergedTraits();
              const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName();
              if (union) {
                unionSerde.mark(xmlObjectKey);
              }
              if (value[xmlObjectKey] != null) {
                buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]);
              }
            }
            if (union) {
              unionSerde.writeUnknown();
            }
            return buffer;
          }
          if (ns.isDocumentSchema()) {
            return value;
          }
          throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`);
        }
        if (ns.isListSchema()) {
          return [];
        }
        if (ns.isMapSchema() || ns.isStructSchema()) {
          return {};
        }
        return this.stringDeserializer.read(ns, value);
      }
      parseXml(xml) {
        if (xml.length) {
          let parsedObj;
          try {
            parsedObj = (0, import_xml_builder.parseXML)(xml);
          } catch (e5) {
            if (e5 && typeof e5 === "object") {
              Object.defineProperty(e5, "$responseBodyText", {
                value: xml
              });
            }
            throw e5;
          }
          const textNodeName = "#text";
          const key = Object.keys(parsedObj)[0];
          const parsedObjToReturn = parsedObj[key];
          if (parsedObjToReturn[textNodeName]) {
            parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
            delete parsedObjToReturn[textNodeName];
          }
          return (0, import_smithy_client4.getValueFromTextNode)(parsedObjToReturn);
        }
        return {};
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js
var import_smithy_client5, import_util_base646, QueryShapeSerializer;
var init_QueryShapeSerializer = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js"() {
    init_protocols();
    init_schema();
    init_serde();
    import_smithy_client5 = __toESM(require_dist_cjs34());
    import_util_base646 = __toESM(require_dist_cjs10());
    init_ConfigurableSerdeContext();
    QueryShapeSerializer = class extends SerdeContextConfig {
      settings;
      buffer;
      constructor(settings) {
        super();
        this.settings = settings;
      }
      write(schema, value, prefix = "") {
        if (this.buffer === void 0) {
          this.buffer = "";
        }
        const ns = NormalizedSchema.of(schema);
        if (prefix && !prefix.endsWith(".")) {
          prefix += ".";
        }
        if (ns.isBlobSchema()) {
          if (typeof value === "string" || value instanceof Uint8Array) {
            this.writeKey(prefix);
            this.writeValue((this.serdeContext?.base64Encoder ?? import_util_base646.toBase64)(value));
          }
        } else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) {
          if (value != null) {
            this.writeKey(prefix);
            this.writeValue(String(value));
          } else if (ns.isIdempotencyToken()) {
            this.writeKey(prefix);
            this.writeValue((0, import_uuid.v4)());
          }
        } else if (ns.isBigIntegerSchema()) {
          if (value != null) {
            this.writeKey(prefix);
            this.writeValue(String(value));
          }
        } else if (ns.isBigDecimalSchema()) {
          if (value != null) {
            this.writeKey(prefix);
            this.writeValue(value instanceof NumericValue ? value.string : String(value));
          }
        } else if (ns.isTimestampSchema()) {
          if (value instanceof Date) {
            this.writeKey(prefix);
            const format2 = determineTimestampFormat(ns, this.settings);
            switch (format2) {
              case 5:
                this.writeValue(value.toISOString().replace(".000Z", "Z"));
                break;
              case 6:
                this.writeValue((0, import_smithy_client5.dateToUtcString)(value));
                break;
              case 7:
                this.writeValue(String(value.getTime() / 1e3));
                break;
            }
          }
        } else if (ns.isDocumentSchema()) {
          if (Array.isArray(value)) {
            this.write(64 | 15, value, prefix);
          } else if (value instanceof Date) {
            this.write(4, value, prefix);
          } else if (value instanceof Uint8Array) {
            this.write(21, value, prefix);
          } else if (value && typeof value === "object") {
            this.write(128 | 15, value, prefix);
          } else {
            this.writeKey(prefix);
            this.writeValue(String(value));
          }
        } else if (ns.isListSchema()) {
          if (Array.isArray(value)) {
            if (value.length === 0) {
              if (this.settings.serializeEmptyLists) {
                this.writeKey(prefix);
                this.writeValue("");
              }
            } else {
              const member2 = ns.getValueSchema();
              const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened;
              let i5 = 1;
              for (const item of value) {
                if (item == null) {
                  continue;
                }
                const traits = member2.getMergedTraits();
                const suffix = this.getKey("member", traits.xmlName, traits.ec2QueryName);
                const key = flat ? `${prefix}${i5}` : `${prefix}${suffix}.${i5}`;
                this.write(member2, item, key);
                ++i5;
              }
            }
          }
        } else if (ns.isMapSchema()) {
          if (value && typeof value === "object") {
            const keySchema = ns.getKeySchema();
            const memberSchema = ns.getValueSchema();
            const flat = ns.getMergedTraits().xmlFlattened;
            let i5 = 1;
            for (const k5 in value) {
              const v = value[k5];
              if (v == null) {
                continue;
              }
              const keyTraits = keySchema.getMergedTraits();
              const keySuffix = this.getKey("key", keyTraits.xmlName, keyTraits.ec2QueryName);
              const key = flat ? `${prefix}${i5}.${keySuffix}` : `${prefix}entry.${i5}.${keySuffix}`;
              const valTraits = memberSchema.getMergedTraits();
              const valueSuffix = this.getKey("value", valTraits.xmlName, valTraits.ec2QueryName);
              const valueKey = flat ? `${prefix}${i5}.${valueSuffix}` : `${prefix}entry.${i5}.${valueSuffix}`;
              this.write(keySchema, k5, key);
              this.write(memberSchema, v, valueKey);
              ++i5;
            }
          }
        } else if (ns.isStructSchema()) {
          if (value && typeof value === "object") {
            let didWriteMember = false;
            for (const [memberName, member2] of ns.structIterator()) {
              if (value[memberName] == null && !member2.isIdempotencyToken()) {
                continue;
              }
              const traits = member2.getMergedTraits();
              const suffix = this.getKey(memberName, traits.xmlName, traits.ec2QueryName, "struct");
              const key = `${prefix}${suffix}`;
              this.write(member2, value[memberName], key);
              didWriteMember = true;
            }
            if (!didWriteMember && ns.isUnionSchema()) {
              const { $unknown } = value;
              if (Array.isArray($unknown)) {
                const [k5, v] = $unknown;
                const key = `${prefix}${k5}`;
                this.write(15, v, key);
              }
            }
          }
        } else if (ns.isUnitSchema()) {
        } else {
          throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`);
        }
      }
      flush() {
        if (this.buffer === void 0) {
          throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");
        }
        const str = this.buffer;
        delete this.buffer;
        return str;
      }
      getKey(memberName, xmlName, ec2QueryName, keySource) {
        const { ec2, capitalizeKeys } = this.settings;
        if (ec2 && ec2QueryName) {
          return ec2QueryName;
        }
        const key = xmlName ?? memberName;
        if (capitalizeKeys && keySource === "struct") {
          return key[0].toUpperCase() + key.slice(1);
        }
        return key;
      }
      writeKey(key) {
        if (key.endsWith(".")) {
          key = key.slice(0, key.length - 1);
        }
        this.buffer += `&${extendedEncodeURIComponent(key)}=`;
      }
      writeValue(value) {
        this.buffer += extendedEncodeURIComponent(value);
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js
var AwsQueryProtocol;
var init_AwsQueryProtocol = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js"() {
    init_protocols();
    init_schema();
    init_ProtocolLib();
    init_XmlShapeDeserializer();
    init_QueryShapeSerializer();
    AwsQueryProtocol = class extends RpcProtocol {
      options;
      serializer;
      deserializer;
      mixin = new ProtocolLib();
      constructor(options) {
        super({
          defaultNamespace: options.defaultNamespace,
          errorTypeRegistries: options.errorTypeRegistries
        });
        this.options = options;
        const settings = {
          timestampFormat: {
            useTrait: true,
            default: 5
          },
          httpBindings: false,
          xmlNamespace: options.xmlNamespace,
          serviceNamespace: options.defaultNamespace,
          serializeEmptyLists: true
        };
        this.serializer = new QueryShapeSerializer(settings);
        this.deserializer = new XmlShapeDeserializer(settings);
      }
      getShapeId() {
        return "aws.protocols#awsQuery";
      }
      setSerdeContext(serdeContext) {
        this.serializer.setSerdeContext(serdeContext);
        this.deserializer.setSerdeContext(serdeContext);
      }
      getPayloadCodec() {
        throw new Error("AWSQuery protocol has no payload codec.");
      }
      async serializeRequest(operationSchema, input, context) {
        const request = await super.serializeRequest(operationSchema, input, context);
        if (!request.path.endsWith("/")) {
          request.path += "/";
        }
        request.headers["content-type"] = "application/x-www-form-urlencoded";
        if (deref(operationSchema.input) === "unit" || !request.body) {
          request.body = "";
        }
        const action = operationSchema.name.split("#")[1] ?? operationSchema.name;
        request.body = `Action=${action}&Version=${this.options.version}` + request.body;
        if (request.body.endsWith("&")) {
          request.body = request.body.slice(-1);
        }
        return request;
      }
      async deserializeResponse(operationSchema, context, response) {
        const deserializer = this.deserializer;
        const ns = NormalizedSchema.of(operationSchema.output);
        const dataObject = {};
        if (response.statusCode >= 300) {
          const bytes2 = await collectBody(response.body, context);
          if (bytes2.byteLength > 0) {
            Object.assign(dataObject, await deserializer.read(15, bytes2));
          }
          await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
        }
        for (const header in response.headers) {
          const value = response.headers[header];
          delete response.headers[header];
          response.headers[header.toLowerCase()] = value;
        }
        const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
        const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : void 0;
        const bytes = await collectBody(response.body, context);
        if (bytes.byteLength > 0) {
          Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
        }
        dataObject.$metadata = this.deserializeMetadata(response);
        return dataObject;
      }
      useNestedResult() {
        return true;
      }
      async handleError(operationSchema, context, response, dataObject, metadata) {
        const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
        this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
        const errorData = this.loadQueryError(dataObject) ?? {};
        const message = this.loadQueryErrorMessage(dataObject);
        errorData.message = message;
        errorData.Error = {
          Type: errorData.Type,
          Code: errorData.Code,
          Message: message
        };
        const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError);
        const ns = NormalizedSchema.of(errorSchema);
        const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
        const exception = new ErrorCtor(message);
        const output = {
          Type: errorData.Error.Type,
          Code: errorData.Error.Code,
          Error: errorData.Error
        };
        for (const [name, member2] of ns.structIterator()) {
          const target = member2.getMergedTraits().xmlName ?? name;
          const value = errorData[target] ?? dataObject[target];
          output[name] = this.deserializer.readSchema(member2, value);
        }
        throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
          $fault: ns.getMergedTraits().error,
          message
        }, output), dataObject);
      }
      loadQueryErrorCode(output, data2) {
        const code = (data2.Errors?.[0]?.Error ?? data2.Errors?.Error ?? data2.Error)?.Code;
        if (code !== void 0) {
          return code;
        }
        if (output.statusCode == 404) {
          return "NotFound";
        }
      }
      loadQueryError(data2) {
        return data2.Errors?.[0]?.Error ?? data2.Errors?.Error ?? data2.Error;
      }
      loadQueryErrorMessage(data2) {
        const errorData = this.loadQueryError(data2);
        return errorData?.message ?? errorData?.Message ?? data2.message ?? data2.Message ?? "Unknown";
      }
      getDefaultContentType() {
        return "application/x-www-form-urlencoded";
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js
var AwsEc2QueryProtocol;
var init_AwsEc2QueryProtocol = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js"() {
    init_AwsQueryProtocol();
    AwsEc2QueryProtocol = class extends AwsQueryProtocol {
      options;
      constructor(options) {
        super(options);
        this.options = options;
        const ec2Settings = {
          capitalizeKeys: true,
          flattenLists: true,
          serializeEmptyLists: false,
          ec2: true
        };
        Object.assign(this.serializer.settings, ec2Settings);
      }
      getShapeId() {
        return "aws.protocols#ec2Query";
      }
      useNestedResult() {
        return false;
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QuerySerializerSettings.js
var init_QuerySerializerSettings = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QuerySerializerSettings.js"() {
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js
var import_xml_builder2, import_smithy_client6, parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode;
var init_parseXmlBody = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js"() {
    import_xml_builder2 = __toESM(require_dist_cjs44());
    import_smithy_client6 = __toESM(require_dist_cjs34());
    init_common();
    parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
      if (encoded.length) {
        let parsedObj;
        try {
          parsedObj = (0, import_xml_builder2.parseXML)(encoded);
        } catch (e5) {
          if (e5 && typeof e5 === "object") {
            Object.defineProperty(e5, "$responseBodyText", {
              value: encoded
            });
          }
          throw e5;
        }
        const textNodeName = "#text";
        const key = Object.keys(parsedObj)[0];
        const parsedObjToReturn = parsedObj[key];
        if (parsedObjToReturn[textNodeName]) {
          parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
          delete parsedObjToReturn[textNodeName];
        }
        return (0, import_smithy_client6.getValueFromTextNode)(parsedObjToReturn);
      }
      return {};
    });
    parseXmlErrorBody = async (errorBody, context) => {
      const value = await parseXmlBody(errorBody, context);
      if (value.Error) {
        value.Error.message = value.Error.message ?? value.Error.Message;
      }
      return value;
    };
    loadRestXmlErrorCode = (output, data2) => {
      if (data2?.Error?.Code !== void 0) {
        return data2.Error.Code;
      }
      if (data2?.Code !== void 0) {
        return data2.Code;
      }
      if (output.statusCode == 404) {
        return "NotFound";
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js
var import_xml_builder3, import_smithy_client7, import_util_base647, XmlShapeSerializer;
var init_XmlShapeSerializer = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js"() {
    import_xml_builder3 = __toESM(require_dist_cjs44());
    init_protocols();
    init_schema();
    init_serde();
    import_smithy_client7 = __toESM(require_dist_cjs34());
    import_util_base647 = __toESM(require_dist_cjs10());
    init_ConfigurableSerdeContext();
    XmlShapeSerializer = class extends SerdeContextConfig {
      settings;
      stringBuffer;
      byteBuffer;
      buffer;
      constructor(settings) {
        super();
        this.settings = settings;
      }
      write(schema, value) {
        const ns = NormalizedSchema.of(schema);
        if (ns.isStringSchema() && typeof value === "string") {
          this.stringBuffer = value;
        } else if (ns.isBlobSchema()) {
          this.byteBuffer = "byteLength" in value ? value : (this.serdeContext?.base64Decoder ?? import_util_base647.fromBase64)(value);
        } else {
          this.buffer = this.writeStruct(ns, value, void 0);
          const traits = ns.getMergedTraits();
          if (traits.httpPayload && !traits.xmlName) {
            this.buffer.withName(ns.getName());
          }
        }
      }
      flush() {
        if (this.byteBuffer !== void 0) {
          const bytes = this.byteBuffer;
          delete this.byteBuffer;
          return bytes;
        }
        if (this.stringBuffer !== void 0) {
          const str = this.stringBuffer;
          delete this.stringBuffer;
          return str;
        }
        const buffer = this.buffer;
        if (this.settings.xmlNamespace) {
          if (!buffer?.attributes?.["xmlns"]) {
            buffer.addAttribute("xmlns", this.settings.xmlNamespace);
          }
        }
        delete this.buffer;
        return buffer.toString();
      }
      writeStruct(ns, value, parentXmlns) {
        const traits = ns.getMergedTraits();
        const name = ns.isMemberSchema() && !traits.httpPayload ? ns.getMemberTraits().xmlName ?? ns.getMemberName() : traits.xmlName ?? ns.getName();
        if (!name || !ns.isStructSchema()) {
          throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(true)}.`);
        }
        const structXmlNode = import_xml_builder3.XmlNode.of(name);
        const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);
        for (const [memberName, memberSchema] of ns.structIterator()) {
          const val = value[memberName];
          if (val != null || memberSchema.isIdempotencyToken()) {
            if (memberSchema.getMergedTraits().xmlAttribute) {
              structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val));
              continue;
            }
            if (memberSchema.isListSchema()) {
              this.writeList(memberSchema, val, structXmlNode, xmlns);
            } else if (memberSchema.isMapSchema()) {
              this.writeMap(memberSchema, val, structXmlNode, xmlns);
            } else if (memberSchema.isStructSchema()) {
              structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns));
            } else {
              const memberNode = import_xml_builder3.XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName());
              this.writeSimpleInto(memberSchema, val, memberNode, xmlns);
              structXmlNode.addChildNode(memberNode);
            }
          }
        }
        const { $unknown } = value;
        if ($unknown && ns.isUnionSchema() && Array.isArray($unknown) && Object.keys(value).length === 1) {
          const [k5, v] = $unknown;
          const node = import_xml_builder3.XmlNode.of(k5);
          if (typeof v !== "string") {
            if (value instanceof import_xml_builder3.XmlNode || value instanceof import_xml_builder3.XmlText) {
              structXmlNode.addChildNode(value);
            } else {
              throw new Error(`@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`);
            }
          }
          this.writeSimpleInto(0, v, node, xmlns);
          structXmlNode.addChildNode(node);
        }
        if (xmlns) {
          structXmlNode.addAttribute(xmlnsAttr, xmlns);
        }
        return structXmlNode;
      }
      writeList(listMember, array, container, parentXmlns) {
        if (!listMember.isMemberSchema()) {
          throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`);
        }
        const listTraits = listMember.getMergedTraits();
        const listValueSchema = listMember.getValueSchema();
        const listValueTraits = listValueSchema.getMergedTraits();
        const sparse = !!listValueTraits.sparse;
        const flat = !!listTraits.xmlFlattened;
        const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns);
        const writeItem = (container2, value) => {
          if (listValueSchema.isListSchema()) {
            this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container2, xmlns);
          } else if (listValueSchema.isMapSchema()) {
            this.writeMap(listValueSchema, value, container2, xmlns);
          } else if (listValueSchema.isStructSchema()) {
            const struct2 = this.writeStruct(listValueSchema, value, xmlns);
            container2.addChildNode(struct2.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member"));
          } else {
            const listItemNode = import_xml_builder3.XmlNode.of(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member");
            this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns);
            container2.addChildNode(listItemNode);
          }
        };
        if (flat) {
          for (const value of array) {
            if (sparse || value != null) {
              writeItem(container, value);
            }
          }
        } else {
          const listNode = import_xml_builder3.XmlNode.of(listTraits.xmlName ?? listMember.getMemberName());
          if (xmlns) {
            listNode.addAttribute(xmlnsAttr, xmlns);
          }
          for (const value of array) {
            if (sparse || value != null) {
              writeItem(listNode, value);
            }
          }
          container.addChildNode(listNode);
        }
      }
      writeMap(mapMember, map2, container, parentXmlns, containerIsMap = false) {
        if (!mapMember.isMemberSchema()) {
          throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`);
        }
        const mapTraits = mapMember.getMergedTraits();
        const mapKeySchema = mapMember.getKeySchema();
        const mapKeyTraits = mapKeySchema.getMergedTraits();
        const keyTag = mapKeyTraits.xmlName ?? "key";
        const mapValueSchema = mapMember.getValueSchema();
        const mapValueTraits = mapValueSchema.getMergedTraits();
        const valueTag = mapValueTraits.xmlName ?? "value";
        const sparse = !!mapValueTraits.sparse;
        const flat = !!mapTraits.xmlFlattened;
        const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns);
        const addKeyValue = (entry, key, val) => {
          const keyNode = import_xml_builder3.XmlNode.of(keyTag, key);
          const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns);
          if (keyXmlns) {
            keyNode.addAttribute(keyXmlnsAttr, keyXmlns);
          }
          entry.addChildNode(keyNode);
          let valueNode = import_xml_builder3.XmlNode.of(valueTag);
          if (mapValueSchema.isListSchema()) {
            this.writeList(mapValueSchema, val, valueNode, xmlns);
          } else if (mapValueSchema.isMapSchema()) {
            this.writeMap(mapValueSchema, val, valueNode, xmlns, true);
          } else if (mapValueSchema.isStructSchema()) {
            valueNode = this.writeStruct(mapValueSchema, val, xmlns);
          } else {
            this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns);
          }
          entry.addChildNode(valueNode);
        };
        if (flat) {
          for (const key in map2) {
            const val = map2[key];
            if (sparse || val != null) {
              const entry = import_xml_builder3.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());
              addKeyValue(entry, key, val);
              container.addChildNode(entry);
            }
          }
        } else {
          let mapNode;
          if (!containerIsMap) {
            mapNode = import_xml_builder3.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());
            if (xmlns) {
              mapNode.addAttribute(xmlnsAttr, xmlns);
            }
            container.addChildNode(mapNode);
          }
          for (const key in map2) {
            const val = map2[key];
            if (sparse || val != null) {
              const entry = import_xml_builder3.XmlNode.of("entry");
              addKeyValue(entry, key, val);
              (containerIsMap ? container : mapNode).addChildNode(entry);
            }
          }
        }
      }
      writeSimple(_schema, value) {
        if (null === value) {
          throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");
        }
        const ns = NormalizedSchema.of(_schema);
        let nodeContents = null;
        if (value && typeof value === "object") {
          if (ns.isBlobSchema()) {
            nodeContents = (this.serdeContext?.base64Encoder ?? import_util_base647.toBase64)(value);
          } else if (ns.isTimestampSchema() && value instanceof Date) {
            const format2 = determineTimestampFormat(ns, this.settings);
            switch (format2) {
              case 5:
                nodeContents = value.toISOString().replace(".000Z", "Z");
                break;
              case 6:
                nodeContents = (0, import_smithy_client7.dateToUtcString)(value);
                break;
              case 7:
                nodeContents = String(value.getTime() / 1e3);
                break;
              default:
                console.warn("Missing timestamp format, using http date", value);
                nodeContents = (0, import_smithy_client7.dateToUtcString)(value);
                break;
            }
          } else if (ns.isBigDecimalSchema() && value) {
            if (value instanceof NumericValue) {
              return value.string;
            }
            return String(value);
          } else if (ns.isMapSchema() || ns.isListSchema()) {
            throw new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.");
          } else {
            throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`);
          }
        }
        if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
          nodeContents = String(value);
        }
        if (ns.isStringSchema()) {
          if (value === void 0 && ns.isIdempotencyToken()) {
            nodeContents = (0, import_uuid.v4)();
          } else {
            nodeContents = String(value);
          }
        }
        if (nodeContents === null) {
          throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`);
        }
        return nodeContents;
      }
      writeSimpleInto(_schema, value, into, parentXmlns) {
        const nodeContents = this.writeSimple(_schema, value);
        const ns = NormalizedSchema.of(_schema);
        const content = new import_xml_builder3.XmlText(nodeContents);
        const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);
        if (xmlns) {
          into.addAttribute(xmlnsAttr, xmlns);
        }
        into.addChildNode(content);
      }
      getXmlnsAttribute(ns, parentXmlns) {
        const traits = ns.getMergedTraits();
        const [prefix, xmlns] = traits.xmlNamespace ?? [];
        if (xmlns && xmlns !== parentXmlns) {
          return [prefix ? `xmlns:${prefix}` : "xmlns", xmlns];
        }
        return [void 0, void 0];
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js
var XmlCodec;
var init_XmlCodec = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js"() {
    init_ConfigurableSerdeContext();
    init_XmlShapeDeserializer();
    init_XmlShapeSerializer();
    XmlCodec = class extends SerdeContextConfig {
      settings;
      constructor(settings) {
        super();
        this.settings = settings;
      }
      createSerializer() {
        const serializer = new XmlShapeSerializer(this.settings);
        serializer.setSerdeContext(this.serdeContext);
        return serializer;
      }
      createDeserializer() {
        const deserializer = new XmlShapeDeserializer(this.settings);
        deserializer.setSerdeContext(this.serdeContext);
        return deserializer;
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js
var AwsRestXmlProtocol;
var init_AwsRestXmlProtocol = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js"() {
    init_protocols();
    init_schema();
    init_ProtocolLib();
    init_parseXmlBody();
    init_XmlCodec();
    AwsRestXmlProtocol = class extends HttpBindingProtocol {
      codec;
      serializer;
      deserializer;
      mixin = new ProtocolLib();
      constructor(options) {
        super(options);
        const settings = {
          timestampFormat: {
            useTrait: true,
            default: 5
          },
          httpBindings: true,
          xmlNamespace: options.xmlNamespace,
          serviceNamespace: options.defaultNamespace
        };
        this.codec = new XmlCodec(settings);
        this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);
        this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);
      }
      getPayloadCodec() {
        return this.codec;
      }
      getShapeId() {
        return "aws.protocols#restXml";
      }
      async serializeRequest(operationSchema, input, context) {
        const request = await super.serializeRequest(operationSchema, input, context);
        const inputSchema = NormalizedSchema.of(operationSchema.input);
        if (!request.headers["content-type"]) {
          const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
          if (contentType) {
            request.headers["content-type"] = contentType;
          }
        }
        if (typeof request.body === "string" && request.headers["content-type"] === this.getDefaultContentType() && !request.body.startsWith("<?xml ") && !this.hasUnstructuredPayloadBinding(inputSchema)) {
          request.body = '<?xml version="1.0" encoding="UTF-8"?>' + request.body;
        }
        return request;
      }
      async deserializeResponse(operationSchema, context, response) {
        return super.deserializeResponse(operationSchema, context, response);
      }
      async handleError(operationSchema, context, response, dataObject, metadata) {
        const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
        this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
        if (dataObject.Error && typeof dataObject.Error === "object") {
          for (const key of Object.keys(dataObject.Error)) {
            dataObject[key] = dataObject.Error[key];
            if (key.toLowerCase() === "message") {
              dataObject.message = dataObject.Error[key];
            }
          }
        }
        if (dataObject.RequestId && !metadata.requestId) {
          metadata.requestId = dataObject.RequestId;
        }
        const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
        const ns = NormalizedSchema.of(errorSchema);
        const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "UnknownError";
        const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
        const exception = new ErrorCtor(message);
        await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
        const output = {};
        const errorDeserializer = this.codec.createDeserializer();
        for (const [name, member2] of ns.structIterator()) {
          const target = member2.getMergedTraits().xmlName ?? name;
          const value = dataObject.Error?.[target] ?? dataObject[target];
          output[name] = errorDeserializer.readSchema(member2, value);
        }
        throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
          $fault: ns.getMergedTraits().error,
          message
        }, output), dataObject);
      }
      getDefaultContentType() {
        return "application/xml";
      }
      hasUnstructuredPayloadBinding(ns) {
        for (const [, member2] of ns.structIterator()) {
          if (member2.getMergedTraits().httpPayload) {
            return !(member2.isStructSchema() || member2.isMapSchema() || member2.isListSchema());
          }
        }
        return false;
      }
    };
  }
});

// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js
var protocols_exports2 = {};
__export(protocols_exports2, {
  AwsEc2QueryProtocol: () => AwsEc2QueryProtocol,
  AwsJson1_0Protocol: () => AwsJson1_0Protocol,
  AwsJson1_1Protocol: () => AwsJson1_1Protocol,
  AwsJsonRpcProtocol: () => AwsJsonRpcProtocol,
  AwsQueryProtocol: () => AwsQueryProtocol,
  AwsRestJsonProtocol: () => AwsRestJsonProtocol,
  AwsRestXmlProtocol: () => AwsRestXmlProtocol,
  AwsSmithyRpcV2CborProtocol: () => AwsSmithyRpcV2CborProtocol,
  JsonCodec: () => JsonCodec,
  JsonShapeDeserializer: () => JsonShapeDeserializer,
  JsonShapeSerializer: () => JsonShapeSerializer,
  QueryShapeSerializer: () => QueryShapeSerializer,
  XmlCodec: () => XmlCodec,
  XmlShapeDeserializer: () => XmlShapeDeserializer,
  XmlShapeSerializer: () => XmlShapeSerializer,
  _toBool: () => _toBool,
  _toNum: () => _toNum,
  _toStr: () => _toStr,
  awsExpectUnion: () => awsExpectUnion,
  loadRestJsonErrorCode: () => loadRestJsonErrorCode,
  loadRestXmlErrorCode: () => loadRestXmlErrorCode,
  parseJsonBody: () => parseJsonBody,
  parseJsonErrorBody: () => parseJsonErrorBody,
  parseXmlBody: () => parseXmlBody,
  parseXmlErrorBody: () => parseXmlErrorBody
});
var init_protocols2 = __esm({
  "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js"() {
    init_AwsSmithyRpcV2CborProtocol();
    init_coercing_serializers();
    init_AwsJson1_0Protocol();
    init_AwsJson1_1Protocol();
    init_AwsJsonRpcProtocol();
    init_AwsRestJsonProtocol();
    init_JsonCodec();
    init_JsonShapeDeserializer();
    init_JsonShapeSerializer();
    init_awsExpectUnion();
    init_parseJsonBody();
    init_AwsEc2QueryProtocol();
    init_AwsQueryProtocol();
    init_QuerySerializerSettings();
    init_QueryShapeSerializer();
    init_AwsRestXmlProtocol();
    init_XmlCodec();
    init_XmlShapeDeserializer();
    init_XmlShapeSerializer();
    init_parseXmlBody();
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/bdd.js
var import_util_endpoints, k, a, b, c, d, e, f, g, h, i, j, _data, root, r, nodes, bdd;
var init_bdd = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/bdd.js"() {
    import_util_endpoints = __toESM(require_dist_cjs20());
    k = "ref";
    a = -1;
    b = true;
    c = "isSet";
    d = "PartitionResult";
    e = "booleanEquals";
    f = "getAttr";
    g = { [k]: "Endpoint" };
    h = { [k]: d };
    i = {};
    j = [{ [k]: "Region" }];
    _data = {
      conditions: [
        [c, [g]],
        [c, j],
        ["aws.partition", j, d],
        [e, [{ [k]: "UseFIPS" }, b]],
        [e, [{ [k]: "UseDualStack" }, b]],
        [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
        [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]],
        ["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws-us-gov"]]
      ],
      results: [
        [a],
        [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
        [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
        [g, i],
        ["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
        [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
        ["https://oidc.{Region}.amazonaws.com", i],
        ["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", i],
        [a, "FIPS is enabled but this partition does not support FIPS"],
        ["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
        [a, "DualStack is enabled but this partition does not support DualStack"],
        ["https://oidc.{Region}.{PartitionResult#dnsSuffix}", i],
        [a, "Invalid Configuration: Missing Region"]
      ]
    };
    root = 2;
    r = 1e8;
    nodes = new Int32Array([
      -1,
      1,
      -1,
      0,
      13,
      3,
      1,
      4,
      r + 12,
      2,
      5,
      r + 12,
      3,
      8,
      6,
      4,
      7,
      r + 11,
      5,
      r + 9,
      r + 10,
      4,
      11,
      9,
      6,
      10,
      r + 8,
      7,
      r + 6,
      r + 7,
      5,
      12,
      r + 5,
      6,
      r + 4,
      r + 5,
      3,
      r + 1,
      14,
      4,
      r + 2,
      r + 3
    ]);
    bdd = import_util_endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js
var import_util_endpoints2, import_util_endpoints3, cache, defaultEndpointResolver;
var init_endpointResolver = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js"() {
    import_util_endpoints2 = __toESM(require_dist_cjs21());
    import_util_endpoints3 = __toESM(require_dist_cjs20());
    init_bdd();
    cache = new import_util_endpoints3.EndpointCache({
      size: 50,
      params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
    });
    defaultEndpointResolver = (endpointParams, context = {}) => {
      return cache.get(endpointParams, () => (0, import_util_endpoints3.decideEndpoint)(bdd, {
        endpointParams,
        logger: context.logger
      }));
    };
    import_util_endpoints3.customEndpointFunctions.aws = import_util_endpoints2.awsEndpointFunctions;
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js
var import_smithy_client8, SSOOIDCServiceException;
var init_SSOOIDCServiceException = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js"() {
    import_smithy_client8 = __toESM(require_dist_cjs34());
    SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client8.ServiceException {
      constructor(options) {
        super(options);
        Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype);
      }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/errors.js
var AccessDeniedException, AuthorizationPendingException, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidGrantException, InvalidRequestException, InvalidScopeException, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException;
var init_errors = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/errors.js"() {
    init_SSOOIDCServiceException();
    AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException {
      name = "AccessDeniedException";
      $fault = "client";
      error;
      reason;
      error_description;
      constructor(opts) {
        super({
          name: "AccessDeniedException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _AccessDeniedException.prototype);
        this.error = opts.error;
        this.reason = opts.reason;
        this.error_description = opts.error_description;
      }
    };
    AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException {
      name = "AuthorizationPendingException";
      $fault = "client";
      error;
      error_description;
      constructor(opts) {
        super({
          name: "AuthorizationPendingException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _AuthorizationPendingException.prototype);
        this.error = opts.error;
        this.error_description = opts.error_description;
      }
    };
    ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException {
      name = "ExpiredTokenException";
      $fault = "client";
      error;
      error_description;
      constructor(opts) {
        super({
          name: "ExpiredTokenException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _ExpiredTokenException.prototype);
        this.error = opts.error;
        this.error_description = opts.error_description;
      }
    };
    InternalServerException = class _InternalServerException extends SSOOIDCServiceException {
      name = "InternalServerException";
      $fault = "server";
      error;
      error_description;
      constructor(opts) {
        super({
          name: "InternalServerException",
          $fault: "server",
          ...opts
        });
        Object.setPrototypeOf(this, _InternalServerException.prototype);
        this.error = opts.error;
        this.error_description = opts.error_description;
      }
    };
    InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException {
      name = "InvalidClientException";
      $fault = "client";
      error;
      error_description;
      constructor(opts) {
        super({
          name: "InvalidClientException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _InvalidClientException.prototype);
        this.error = opts.error;
        this.error_description = opts.error_description;
      }
    };
    InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException {
      name = "InvalidGrantException";
      $fault = "client";
      error;
      error_description;
      constructor(opts) {
        super({
          name: "InvalidGrantException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _InvalidGrantException.prototype);
        this.error = opts.error;
        this.error_description = opts.error_description;
      }
    };
    InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException {
      name = "InvalidRequestException";
      $fault = "client";
      error;
      reason;
      error_description;
      constructor(opts) {
        super({
          name: "InvalidRequestException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _InvalidRequestException.prototype);
        this.error = opts.error;
        this.reason = opts.reason;
        this.error_description = opts.error_description;
      }
    };
    InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException {
      name = "InvalidScopeException";
      $fault = "client";
      error;
      error_description;
      constructor(opts) {
        super({
          name: "InvalidScopeException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _InvalidScopeException.prototype);
        this.error = opts.error;
        this.error_description = opts.error_description;
      }
    };
    SlowDownException = class _SlowDownException extends SSOOIDCServiceException {
      name = "SlowDownException";
      $fault = "client";
      error;
      error_description;
      constructor(opts) {
        super({
          name: "SlowDownException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _SlowDownException.prototype);
        this.error = opts.error;
        this.error_description = opts.error_description;
      }
    };
    UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException {
      name = "UnauthorizedClientException";
      $fault = "client";
      error;
      error_description;
      constructor(opts) {
        super({
          name: "UnauthorizedClientException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _UnauthorizedClientException.prototype);
        this.error = opts.error;
        this.error_description = opts.error_description;
      }
    };
    UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException {
      name = "UnsupportedGrantTypeException";
      $fault = "client";
      error;
      error_description;
      constructor(opts) {
        super({
          name: "UnsupportedGrantTypeException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype);
        this.error = opts.error;
        this.error_description = opts.error_description;
      }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/schemas/schemas_0.js
var _ADE, _APE, _AT, _CS, _CT, _CTR, _CTRr, _CV, _ETE, _ICE, _IGE, _IRE, _ISE, _ISEn, _IT, _RT, _SDE, _UCE, _UGTE, _aT, _c, _cI, _cS, _cV, _co, _dC, _e, _eI, _ed, _gT, _h, _hE, _iT, _r, _rT, _rU, _s, _sc, _se, _tT, n0, _s_registry, SSOOIDCServiceException$, n0_registry, AccessDeniedException$, AuthorizationPendingException$, ExpiredTokenException$, InternalServerException$, InvalidClientException$, InvalidGrantException$, InvalidRequestException$, InvalidScopeException$, SlowDownException$, UnauthorizedClientException$, UnsupportedGrantTypeException$, errorTypeRegistries, AccessToken, ClientSecret, CodeVerifier, IdToken, RefreshToken, CreateTokenRequest$, CreateTokenResponse$, Scopes, CreateToken$;
var init_schemas_0 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/schemas/schemas_0.js"() {
    init_schema();
    init_errors();
    init_SSOOIDCServiceException();
    _ADE = "AccessDeniedException";
    _APE = "AuthorizationPendingException";
    _AT = "AccessToken";
    _CS = "ClientSecret";
    _CT = "CreateToken";
    _CTR = "CreateTokenRequest";
    _CTRr = "CreateTokenResponse";
    _CV = "CodeVerifier";
    _ETE = "ExpiredTokenException";
    _ICE = "InvalidClientException";
    _IGE = "InvalidGrantException";
    _IRE = "InvalidRequestException";
    _ISE = "InternalServerException";
    _ISEn = "InvalidScopeException";
    _IT = "IdToken";
    _RT = "RefreshToken";
    _SDE = "SlowDownException";
    _UCE = "UnauthorizedClientException";
    _UGTE = "UnsupportedGrantTypeException";
    _aT = "accessToken";
    _c = "client";
    _cI = "clientId";
    _cS = "clientSecret";
    _cV = "codeVerifier";
    _co = "code";
    _dC = "deviceCode";
    _e = "error";
    _eI = "expiresIn";
    _ed = "error_description";
    _gT = "grantType";
    _h = "http";
    _hE = "httpError";
    _iT = "idToken";
    _r = "reason";
    _rT = "refreshToken";
    _rU = "redirectUri";
    _s = "smithy.ts.sdk.synthetic.com.amazonaws.ssooidc";
    _sc = "scope";
    _se = "server";
    _tT = "tokenType";
    n0 = "com.amazonaws.ssooidc";
    _s_registry = TypeRegistry.for(_s);
    SSOOIDCServiceException$ = [-3, _s, "SSOOIDCServiceException", 0, [], []];
    _s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException);
    n0_registry = TypeRegistry.for(n0);
    AccessDeniedException$ = [
      -3,
      n0,
      _ADE,
      { [_e]: _c, [_hE]: 400 },
      [_e, _r, _ed],
      [0, 0, 0]
    ];
    n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
    AuthorizationPendingException$ = [
      -3,
      n0,
      _APE,
      { [_e]: _c, [_hE]: 400 },
      [_e, _ed],
      [0, 0]
    ];
    n0_registry.registerError(AuthorizationPendingException$, AuthorizationPendingException);
    ExpiredTokenException$ = [-3, n0, _ETE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
    n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);
    InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _ed], [0, 0]];
    n0_registry.registerError(InternalServerException$, InternalServerException);
    InvalidClientException$ = [-3, n0, _ICE, { [_e]: _c, [_hE]: 401 }, [_e, _ed], [0, 0]];
    n0_registry.registerError(InvalidClientException$, InvalidClientException);
    InvalidGrantException$ = [-3, n0, _IGE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
    n0_registry.registerError(InvalidGrantException$, InvalidGrantException);
    InvalidRequestException$ = [
      -3,
      n0,
      _IRE,
      { [_e]: _c, [_hE]: 400 },
      [_e, _r, _ed],
      [0, 0, 0]
    ];
    n0_registry.registerError(InvalidRequestException$, InvalidRequestException);
    InvalidScopeException$ = [-3, n0, _ISEn, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
    n0_registry.registerError(InvalidScopeException$, InvalidScopeException);
    SlowDownException$ = [-3, n0, _SDE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
    n0_registry.registerError(SlowDownException$, SlowDownException);
    UnauthorizedClientException$ = [
      -3,
      n0,
      _UCE,
      { [_e]: _c, [_hE]: 400 },
      [_e, _ed],
      [0, 0]
    ];
    n0_registry.registerError(UnauthorizedClientException$, UnauthorizedClientException);
    UnsupportedGrantTypeException$ = [
      -3,
      n0,
      _UGTE,
      { [_e]: _c, [_hE]: 400 },
      [_e, _ed],
      [0, 0]
    ];
    n0_registry.registerError(UnsupportedGrantTypeException$, UnsupportedGrantTypeException);
    errorTypeRegistries = [_s_registry, n0_registry];
    AccessToken = [0, n0, _AT, 8, 0];
    ClientSecret = [0, n0, _CS, 8, 0];
    CodeVerifier = [0, n0, _CV, 8, 0];
    IdToken = [0, n0, _IT, 8, 0];
    RefreshToken = [0, n0, _RT, 8, 0];
    CreateTokenRequest$ = [
      3,
      n0,
      _CTR,
      0,
      [_cI, _cS, _gT, _dC, _co, _rT, _sc, _rU, _cV],
      [0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]],
      3
    ];
    CreateTokenResponse$ = [
      3,
      n0,
      _CTRr,
      0,
      [_aT, _tT, _eI, _rT, _iT],
      [[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]]
    ];
    Scopes = 64 | 0;
    CreateToken$ = [
      9,
      n0,
      _CT,
      { [_h]: ["POST", "/token", 200] },
      () => CreateTokenRequest$,
      () => CreateTokenResponse$
    ];
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js
var import_smithy_client9, import_url_parser2, import_util_base648, import_util_utf88, getRuntimeConfig;
var init_runtimeConfig_shared = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js"() {
    init_httpAuthSchemes2();
    init_protocols2();
    init_dist_es();
    import_smithy_client9 = __toESM(require_dist_cjs34());
    import_url_parser2 = __toESM(require_dist_cjs18());
    import_util_base648 = __toESM(require_dist_cjs10());
    import_util_utf88 = __toESM(require_dist_cjs9());
    init_httpAuthSchemeProvider();
    init_endpointResolver();
    init_schemas_0();
    getRuntimeConfig = (config) => {
      return {
        apiVersion: "2019-06-10",
        base64Decoder: config?.base64Decoder ?? import_util_base648.fromBase64,
        base64Encoder: config?.base64Encoder ?? import_util_base648.toBase64,
        disableHostPrefix: config?.disableHostPrefix ?? false,
        endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
        extensions: config?.extensions ?? [],
        httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider,
        httpAuthSchemes: config?.httpAuthSchemes ?? [
          {
            schemeId: "aws.auth#sigv4",
            identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
            signer: new AwsSdkSigV4Signer()
          },
          {
            schemeId: "smithy.api#noAuth",
            identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
            signer: new NoAuthSigner()
          }
        ],
        logger: config?.logger ?? new import_smithy_client9.NoOpLogger(),
        protocol: config?.protocol ?? AwsRestJsonProtocol,
        protocolSettings: config?.protocolSettings ?? {
          defaultNamespace: "com.amazonaws.ssooidc",
          errorTypeRegistries,
          version: "2019-06-10",
          serviceTarget: "AWSSSOOIDCService"
        },
        serviceId: config?.serviceId ?? "SSO OIDC",
        urlParser: config?.urlParser ?? import_url_parser2.parseUrl,
        utf8Decoder: config?.utf8Decoder ?? import_util_utf88.fromUtf8,
        utf8Encoder: config?.utf8Encoder ?? import_util_utf88.toUtf8
      };
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js
var import_util_user_agent_node, import_config_resolver, import_hash_node, import_middleware_retry, import_node_config_provider, import_node_http_handler, import_smithy_client10, import_util_body_length_node, import_util_defaults_mode_node, import_util_retry2, getRuntimeConfig2;
var init_runtimeConfig = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js"() {
    init_package();
    init_client();
    init_httpAuthSchemes2();
    import_util_user_agent_node = __toESM(require_dist_cjs40());
    import_config_resolver = __toESM(require_dist_cjs26());
    import_hash_node = __toESM(require_dist_cjs41());
    import_middleware_retry = __toESM(require_dist_cjs35());
    import_node_config_provider = __toESM(require_dist_cjs30());
    import_node_http_handler = __toESM(require_dist_cjs13());
    import_smithy_client10 = __toESM(require_dist_cjs34());
    import_util_body_length_node = __toESM(require_dist_cjs42());
    import_util_defaults_mode_node = __toESM(require_dist_cjs43());
    import_util_retry2 = __toESM(require_dist_cjs23());
    init_runtimeConfig_shared();
    getRuntimeConfig2 = (config) => {
      (0, import_smithy_client10.emitWarningIfUnsupportedVersion)(process.version);
      const defaultsMode = (0, import_util_defaults_mode_node.resolveDefaultsModeConfig)(config);
      const defaultConfigProvider = () => defaultsMode().then(import_smithy_client10.loadConfigsForDefaultMode);
      const clientSharedValues = getRuntimeConfig(config);
      emitWarningIfUnsupportedVersion(process.version);
      const loaderConfig = {
        profile: config?.profile,
        logger: clientSharedValues.logger
      };
      return {
        ...clientSharedValues,
        ...config,
        runtime: "node",
        defaultsMode,
        authSchemePreference: config?.authSchemePreference ?? (0, import_node_config_provider.loadConfig)(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
        bodyLengthChecker: config?.bodyLengthChecker ?? import_util_body_length_node.calculateBodyLength,
        defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, import_util_user_agent_node.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }),
        maxAttempts: config?.maxAttempts ?? (0, import_node_config_provider.loadConfig)(import_middleware_retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
        region: config?.region ?? (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS, { ...import_config_resolver.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
        requestHandler: import_node_http_handler.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
        retryMode: config?.retryMode ?? (0, import_node_config_provider.loadConfig)({
          ...import_middleware_retry.NODE_RETRY_MODE_CONFIG_OPTIONS,
          default: async () => (await defaultConfigProvider()).retryMode || import_util_retry2.DEFAULT_RETRY_MODE
        }, config),
        sha256: config?.sha256 ?? import_hash_node.Hash.bind(null, "sha256"),
        streamCollector: config?.streamCollector ?? import_node_http_handler.streamCollector,
        useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
        useFipsEndpoint: config?.useFipsEndpoint ?? (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
        userAgentAppId: config?.userAgentAppId ?? (0, import_node_config_provider.loadConfig)(import_util_user_agent_node.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
      };
    };
  }
});

// ../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/stsRegionDefaultResolver.js
var require_stsRegionDefaultResolver = __commonJS({
  "../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/stsRegionDefaultResolver.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.warning = void 0;
    exports2.stsRegionDefaultResolver = stsRegionDefaultResolver2;
    var config_resolver_1 = require_dist_cjs26();
    var node_config_provider_1 = require_dist_cjs30();
    function stsRegionDefaultResolver2(loaderConfig = {}) {
      return (0, node_config_provider_1.loadConfig)({
        ...config_resolver_1.NODE_REGION_CONFIG_OPTIONS,
        async default() {
          if (!exports2.warning.silence) {
            console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");
          }
          return "us-east-1";
        }
      }, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig });
    }
    exports2.warning = {
      silence: false
    };
  }
});

// ../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js
var require_dist_cjs45 = __commonJS({
  "../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js"(exports2) {
    "use strict";
    var stsRegionDefaultResolver2 = require_stsRegionDefaultResolver();
    var configResolver = require_dist_cjs26();
    var getAwsRegionExtensionConfiguration5 = (runtimeConfig) => {
      return {
        setRegion(region) {
          runtimeConfig.region = region;
        },
        region() {
          return runtimeConfig.region;
        }
      };
    };
    var resolveAwsRegionExtensionConfiguration5 = (awsRegionExtensionConfiguration) => {
      return {
        region: awsRegionExtensionConfiguration.region()
      };
    };
    exports2.NODE_REGION_CONFIG_FILE_OPTIONS = configResolver.NODE_REGION_CONFIG_FILE_OPTIONS;
    exports2.NODE_REGION_CONFIG_OPTIONS = configResolver.NODE_REGION_CONFIG_OPTIONS;
    exports2.REGION_ENV_NAME = configResolver.REGION_ENV_NAME;
    exports2.REGION_INI_NAME = configResolver.REGION_INI_NAME;
    exports2.resolveRegionConfig = configResolver.resolveRegionConfig;
    exports2.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration5;
    exports2.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration5;
    Object.prototype.hasOwnProperty.call(stsRegionDefaultResolver2, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: stsRegionDefaultResolver2["__proto__"]
    });
    Object.keys(stsRegionDefaultResolver2).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = stsRegionDefaultResolver2[k5];
    });
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.js
var getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig;
var init_httpAuthExtensionConfiguration = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.js"() {
    getHttpAuthExtensionConfiguration = (runtimeConfig) => {
      const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
      let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
      let _credentials = runtimeConfig.credentials;
      return {
        setHttpAuthScheme(httpAuthScheme) {
          const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
          if (index === -1) {
            _httpAuthSchemes.push(httpAuthScheme);
          } else {
            _httpAuthSchemes.splice(index, 1, httpAuthScheme);
          }
        },
        httpAuthSchemes() {
          return _httpAuthSchemes;
        },
        setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
          _httpAuthSchemeProvider = httpAuthSchemeProvider;
        },
        httpAuthSchemeProvider() {
          return _httpAuthSchemeProvider;
        },
        setCredentials(credentials) {
          _credentials = credentials;
        },
        credentials() {
          return _credentials;
        }
      };
    };
    resolveHttpAuthRuntimeConfig = (config) => {
      return {
        httpAuthSchemes: config.httpAuthSchemes(),
        httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
        credentials: config.credentials()
      };
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js
var import_region_config_resolver, import_protocol_http12, import_smithy_client11, resolveRuntimeExtensions;
var init_runtimeExtensions = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js"() {
    import_region_config_resolver = __toESM(require_dist_cjs45());
    import_protocol_http12 = __toESM(require_dist_cjs2());
    import_smithy_client11 = __toESM(require_dist_cjs34());
    init_httpAuthExtensionConfiguration();
    resolveRuntimeExtensions = (runtimeConfig, extensions) => {
      const extensionConfiguration = Object.assign((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client11.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http12.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
      extensions.forEach((extension) => extension.configure(extensionConfiguration));
      return Object.assign(runtimeConfig, (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client11.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http12.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js
var import_middleware_host_header, import_middleware_logger, import_middleware_recursion_detection, import_middleware_user_agent, import_config_resolver2, import_middleware_content_length, import_middleware_endpoint, import_middleware_retry2, import_smithy_client12, SSOOIDCClient;
var init_SSOOIDCClient = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js"() {
    import_middleware_host_header = __toESM(require_dist_cjs3());
    import_middleware_logger = __toESM(require_dist_cjs4());
    import_middleware_recursion_detection = __toESM(require_dist_cjs5());
    import_middleware_user_agent = __toESM(require_dist_cjs24());
    import_config_resolver2 = __toESM(require_dist_cjs26());
    init_dist_es();
    init_schema();
    import_middleware_content_length = __toESM(require_dist_cjs27());
    import_middleware_endpoint = __toESM(require_dist_cjs32());
    import_middleware_retry2 = __toESM(require_dist_cjs35());
    import_smithy_client12 = __toESM(require_dist_cjs34());
    init_httpAuthSchemeProvider();
    init_EndpointParameters();
    init_runtimeConfig();
    init_runtimeExtensions();
    SSOOIDCClient = class extends import_smithy_client12.Client {
      config;
      constructor(...[configuration]) {
        const _config_0 = getRuntimeConfig2(configuration || {});
        super(_config_0);
        this.initConfig = _config_0;
        const _config_1 = resolveClientEndpointParameters(_config_0);
        const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
        const _config_3 = (0, import_middleware_retry2.resolveRetryConfig)(_config_2);
        const _config_4 = (0, import_config_resolver2.resolveRegionConfig)(_config_3);
        const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
        const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
        const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
        const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
        this.config = _config_8;
        this.middlewareStack.use(getSchemaSerdePlugin(this.config));
        this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_retry2.getRetryPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
        this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
          httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider,
          identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
            "aws.auth#sigv4": config.credentials
          })
        }));
        this.middlewareStack.use(getHttpSigningPlugin(this.config));
      }
      destroy() {
        super.destroy();
      }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js
var import_middleware_endpoint2, import_smithy_client13, CreateTokenCommand;
var init_CreateTokenCommand = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js"() {
    import_middleware_endpoint2 = __toESM(require_dist_cjs32());
    import_smithy_client13 = __toESM(require_dist_cjs34());
    init_EndpointParameters();
    init_schemas_0();
    CreateTokenCommand = class extends import_smithy_client13.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o2) {
      return [(0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())];
    }).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").sc(CreateToken$).build() {
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js
var import_smithy_client14, commands, SSOOIDC;
var init_SSOOIDC = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js"() {
    import_smithy_client14 = __toESM(require_dist_cjs34());
    init_CreateTokenCommand();
    init_SSOOIDCClient();
    commands = {
      CreateTokenCommand
    };
    SSOOIDC = class extends SSOOIDCClient {
    };
    (0, import_smithy_client14.createAggregatedClient)(commands, SSOOIDC);
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/index.js
var init_commands = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/index.js"() {
    init_CreateTokenCommand();
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/enums.js
var AccessDeniedExceptionReason, InvalidRequestExceptionReason;
var init_enums = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/enums.js"() {
    AccessDeniedExceptionReason = {
      KMS_ACCESS_DENIED: "KMS_AccessDeniedException"
    };
    InvalidRequestExceptionReason = {
      KMS_DISABLED_KEY: "KMS_DisabledException",
      KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException",
      KMS_INVALID_STATE: "KMS_InvalidStateException",
      KMS_KEY_NOT_FOUND: "KMS_NotFoundException"
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/models_0.js
var init_models_0 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/models_0.js"() {
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/index.js
var sso_oidc_exports = {};
__export(sso_oidc_exports, {
  $Command: () => import_smithy_client13.Command,
  AccessDeniedException: () => AccessDeniedException,
  AccessDeniedException$: () => AccessDeniedException$,
  AccessDeniedExceptionReason: () => AccessDeniedExceptionReason,
  AuthorizationPendingException: () => AuthorizationPendingException,
  AuthorizationPendingException$: () => AuthorizationPendingException$,
  CreateToken$: () => CreateToken$,
  CreateTokenCommand: () => CreateTokenCommand,
  CreateTokenRequest$: () => CreateTokenRequest$,
  CreateTokenResponse$: () => CreateTokenResponse$,
  ExpiredTokenException: () => ExpiredTokenException,
  ExpiredTokenException$: () => ExpiredTokenException$,
  InternalServerException: () => InternalServerException,
  InternalServerException$: () => InternalServerException$,
  InvalidClientException: () => InvalidClientException,
  InvalidClientException$: () => InvalidClientException$,
  InvalidGrantException: () => InvalidGrantException,
  InvalidGrantException$: () => InvalidGrantException$,
  InvalidRequestException: () => InvalidRequestException,
  InvalidRequestException$: () => InvalidRequestException$,
  InvalidRequestExceptionReason: () => InvalidRequestExceptionReason,
  InvalidScopeException: () => InvalidScopeException,
  InvalidScopeException$: () => InvalidScopeException$,
  SSOOIDC: () => SSOOIDC,
  SSOOIDCClient: () => SSOOIDCClient,
  SSOOIDCServiceException: () => SSOOIDCServiceException,
  SSOOIDCServiceException$: () => SSOOIDCServiceException$,
  SlowDownException: () => SlowDownException,
  SlowDownException$: () => SlowDownException$,
  UnauthorizedClientException: () => UnauthorizedClientException,
  UnauthorizedClientException$: () => UnauthorizedClientException$,
  UnsupportedGrantTypeException: () => UnsupportedGrantTypeException,
  UnsupportedGrantTypeException$: () => UnsupportedGrantTypeException$,
  __Client: () => import_smithy_client12.Client,
  errorTypeRegistries: () => errorTypeRegistries
});
var init_sso_oidc = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/index.js"() {
    init_SSOOIDCClient();
    init_SSOOIDC();
    init_commands();
    init_schemas_0();
    init_enums();
    init_errors();
    init_models_0();
    init_SSOOIDCServiceException();
  }
});

// ../../node_modules/@aws-sdk/token-providers/dist-cjs/index.js
var require_dist_cjs46 = __commonJS({
  "../../node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2) {
    "use strict";
    var client = (init_client(), __toCommonJS(client_exports));
    var httpAuthSchemes = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
    var propertyProvider = require_dist_cjs28();
    var sharedIniFileLoader = require_dist_cjs29();
    var node_fs = require("node:fs");
    var fromEnvSigningName = ({ logger: logger2, signingName } = {}) => async () => {
      logger2?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
      if (!signingName) {
        throw new propertyProvider.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger: logger2 });
      }
      const bearerTokenKey = httpAuthSchemes.getBearerTokenEnvKey(signingName);
      if (!(bearerTokenKey in process.env)) {
        throw new propertyProvider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger: logger2 });
      }
      const token = { token: process.env[bearerTokenKey] };
      client.setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3");
      return token;
    };
    var EXPIRE_WINDOW_MS = 5 * 60 * 1e3;
    var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
    var getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
      const { SSOOIDCClient: SSOOIDCClient2 } = await Promise.resolve().then(() => (init_sso_oidc(), sso_oidc_exports));
      const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
      const ssoOidcClient = new SSOOIDCClient2(Object.assign({}, init.clientConfig ?? {}, {
        region: ssoRegion ?? init.clientConfig?.region,
        logger: coalesce("logger"),
        userAgentAppId: coalesce("userAgentAppId")
      }));
      return ssoOidcClient;
    };
    var getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
      const { CreateTokenCommand: CreateTokenCommand2 } = await Promise.resolve().then(() => (init_sso_oidc(), sso_oidc_exports));
      const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
      return ssoOidcClient.send(new CreateTokenCommand2({
        clientId: ssoToken.clientId,
        clientSecret: ssoToken.clientSecret,
        refreshToken: ssoToken.refreshToken,
        grantType: "refresh_token"
      }));
    };
    var validateTokenExpiry = (token) => {
      if (token.expiration && token.expiration.getTime() < Date.now()) {
        throw new propertyProvider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
      }
    };
    var validateTokenKey = (key, value, forRefresh = false) => {
      if (typeof value === "undefined") {
        throw new propertyProvider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
      }
    };
    var { writeFile } = node_fs.promises;
    var writeSSOTokenToFile = (id, ssoToken) => {
      const tokenFilepath = sharedIniFileLoader.getSSOTokenFilepath(id);
      const tokenString = JSON.stringify(ssoToken, null, 2);
      return writeFile(tokenFilepath, tokenString);
    };
    var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);
    var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
      init.logger?.debug("@aws-sdk/token-providers - fromSso");
      const profiles = await sharedIniFileLoader.parseKnownFiles(init);
      const profileName = sharedIniFileLoader.getProfileName({
        profile: init.profile ?? callerClientConfig?.profile
      });
      const profile = profiles[profileName];
      if (!profile) {
        throw new propertyProvider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
      } else if (!profile["sso_session"]) {
        throw new propertyProvider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
      }
      const ssoSessionName = profile["sso_session"];
      const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);
      const ssoSession = ssoSessions[ssoSessionName];
      if (!ssoSession) {
        throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
      }
      for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
        if (!ssoSession[ssoSessionRequiredKey]) {
          throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
        }
      }
      ssoSession["sso_start_url"];
      const ssoRegion = ssoSession["sso_region"];
      let ssoToken;
      try {
        ssoToken = await sharedIniFileLoader.getSSOTokenFromFile(ssoSessionName);
      } catch (e5) {
        throw new propertyProvider.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
      }
      validateTokenKey("accessToken", ssoToken.accessToken);
      validateTokenKey("expiresAt", ssoToken.expiresAt);
      const { accessToken, expiresAt } = ssoToken;
      const existingToken = { token: accessToken, expiration: new Date(expiresAt) };
      if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
        return existingToken;
      }
      if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {
        validateTokenExpiry(existingToken);
        return existingToken;
      }
      validateTokenKey("clientId", ssoToken.clientId, true);
      validateTokenKey("clientSecret", ssoToken.clientSecret, true);
      validateTokenKey("refreshToken", ssoToken.refreshToken, true);
      try {
        lastRefreshAttemptTime.setTime(Date.now());
        const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
        validateTokenKey("accessToken", newSsoOidcToken.accessToken);
        validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
        const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);
        try {
          await writeSSOTokenToFile(ssoSessionName, {
            ...ssoToken,
            accessToken: newSsoOidcToken.accessToken,
            expiresAt: newTokenExpiration.toISOString(),
            refreshToken: newSsoOidcToken.refreshToken
          });
        } catch (error3) {
        }
        return {
          token: newSsoOidcToken.accessToken,
          expiration: newTokenExpiration
        };
      } catch (error3) {
        validateTokenExpiry(existingToken);
        return existingToken;
      }
    };
    var fromStatic = ({ token, logger: logger2 }) => async () => {
      logger2?.debug("@aws-sdk/token-providers - fromStatic");
      if (!token || !token.token) {
        throw new propertyProvider.TokenProviderError(`Please pass a valid token to fromStatic`, false);
      }
      return token;
    };
    var nodeProvider = (init = {}) => propertyProvider.memoize(propertyProvider.chain(fromSso(init), async () => {
      throw new propertyProvider.TokenProviderError("Could not load token from any providers", false);
    }), (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, (token) => token.expiration !== void 0);
    exports2.fromEnvSigningName = fromEnvSigningName;
    exports2.fromSso = fromSso;
    exports2.fromStatic = fromStatic;
    exports2.nodeProvider = nodeProvider;
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js
function createAwsAuthSigv4HttpAuthOption2(authParameters) {
  return {
    schemeId: "aws.auth#sigv4",
    signingProperties: {
      name: "awsssoportal",
      region: authParameters.region
    },
    propertiesExtractor: (config, context) => ({
      signingProperties: {
        config,
        context
      }
    })
  };
}
function createSmithyApiNoAuthHttpAuthOption2(authParameters) {
  return {
    schemeId: "smithy.api#noAuth"
  };
}
var import_util_middleware7, defaultSSOHttpAuthSchemeParametersProvider, defaultSSOHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig2;
var init_httpAuthSchemeProvider2 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js"() {
    init_httpAuthSchemes2();
    import_util_middleware7 = __toESM(require_dist_cjs6());
    defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
      return {
        operation: (0, import_util_middleware7.getSmithyContext)(context).operation,
        region: await (0, import_util_middleware7.normalizeProvider)(config.region)() || (() => {
          throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
        })()
      };
    };
    defaultSSOHttpAuthSchemeProvider = (authParameters) => {
      const options = [];
      switch (authParameters.operation) {
        case "GetRoleCredentials": {
          options.push(createSmithyApiNoAuthHttpAuthOption2(authParameters));
          break;
        }
        default: {
          options.push(createAwsAuthSigv4HttpAuthOption2(authParameters));
        }
      }
      return options;
    };
    resolveHttpAuthSchemeConfig2 = (config) => {
      const config_0 = resolveAwsSdkSigV4Config(config);
      return Object.assign(config_0, {
        authSchemePreference: (0, import_util_middleware7.normalizeProvider)(config.authSchemePreference ?? [])
      });
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/EndpointParameters.js
var resolveClientEndpointParameters2, commonParams2;
var init_EndpointParameters2 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/EndpointParameters.js"() {
    resolveClientEndpointParameters2 = (options) => {
      return Object.assign(options, {
        useDualstackEndpoint: options.useDualstackEndpoint ?? false,
        useFipsEndpoint: options.useFipsEndpoint ?? false,
        defaultSigningName: "awsssoportal"
      });
    };
    commonParams2 = {
      UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
      Endpoint: { type: "builtInParams", name: "endpoint" },
      Region: { type: "builtInParams", name: "region" },
      UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/bdd.js
var import_util_endpoints4, k2, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, _data2, root2, r2, nodes2, bdd2;
var init_bdd2 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/bdd.js"() {
    import_util_endpoints4 = __toESM(require_dist_cjs20());
    k2 = "ref";
    a2 = -1;
    b2 = true;
    c2 = "isSet";
    d2 = "PartitionResult";
    e2 = "booleanEquals";
    f2 = "getAttr";
    g2 = { [k2]: "Endpoint" };
    h2 = { [k2]: d2 };
    i2 = {};
    j2 = [{ [k2]: "Region" }];
    _data2 = {
      conditions: [
        [c2, [g2]],
        [c2, j2],
        ["aws.partition", j2, d2],
        [e2, [{ [k2]: "UseFIPS" }, b2]],
        [e2, [{ [k2]: "UseDualStack" }, b2]],
        [e2, [{ fn: f2, argv: [h2, "supportsDualStack"] }, b2]],
        [e2, [{ fn: f2, argv: [h2, "supportsFIPS"] }, b2]],
        ["stringEquals", [{ fn: f2, argv: [h2, "name"] }, "aws-us-gov"]]
      ],
      results: [
        [a2],
        [a2, "Invalid Configuration: FIPS and custom endpoint are not supported"],
        [a2, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
        [g2, i2],
        ["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i2],
        [a2, "FIPS and DualStack are enabled, but this partition does not support one or both"],
        ["https://portal.sso.{Region}.amazonaws.com", i2],
        ["https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", i2],
        [a2, "FIPS is enabled but this partition does not support FIPS"],
        ["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", i2],
        [a2, "DualStack is enabled but this partition does not support DualStack"],
        ["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", i2],
        [a2, "Invalid Configuration: Missing Region"]
      ]
    };
    root2 = 2;
    r2 = 1e8;
    nodes2 = new Int32Array([
      -1,
      1,
      -1,
      0,
      13,
      3,
      1,
      4,
      r2 + 12,
      2,
      5,
      r2 + 12,
      3,
      8,
      6,
      4,
      7,
      r2 + 11,
      5,
      r2 + 9,
      r2 + 10,
      4,
      11,
      9,
      6,
      10,
      r2 + 8,
      7,
      r2 + 6,
      r2 + 7,
      5,
      12,
      r2 + 5,
      6,
      r2 + 4,
      r2 + 5,
      3,
      r2 + 1,
      14,
      4,
      r2 + 2,
      r2 + 3
    ]);
    bdd2 = import_util_endpoints4.BinaryDecisionDiagram.from(nodes2, root2, _data2.conditions, _data2.results);
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/endpointResolver.js
var import_util_endpoints5, import_util_endpoints6, cache2, defaultEndpointResolver2;
var init_endpointResolver2 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/endpointResolver.js"() {
    import_util_endpoints5 = __toESM(require_dist_cjs21());
    import_util_endpoints6 = __toESM(require_dist_cjs20());
    init_bdd2();
    cache2 = new import_util_endpoints6.EndpointCache({
      size: 50,
      params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
    });
    defaultEndpointResolver2 = (endpointParams, context = {}) => {
      return cache2.get(endpointParams, () => (0, import_util_endpoints6.decideEndpoint)(bdd2, {
        endpointParams,
        logger: context.logger
      }));
    };
    import_util_endpoints6.customEndpointFunctions.aws = import_util_endpoints5.awsEndpointFunctions;
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js
var import_smithy_client15, SSOServiceException;
var init_SSOServiceException = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js"() {
    import_smithy_client15 = __toESM(require_dist_cjs34());
    SSOServiceException = class _SSOServiceException extends import_smithy_client15.ServiceException {
      constructor(options) {
        super(options);
        Object.setPrototypeOf(this, _SSOServiceException.prototype);
      }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/errors.js
var InvalidRequestException2, ResourceNotFoundException, TooManyRequestsException, UnauthorizedException;
var init_errors2 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/errors.js"() {
    init_SSOServiceException();
    InvalidRequestException2 = class _InvalidRequestException extends SSOServiceException {
      name = "InvalidRequestException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "InvalidRequestException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _InvalidRequestException.prototype);
      }
    };
    ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException {
      name = "ResourceNotFoundException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "ResourceNotFoundException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
      }
    };
    TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException {
      name = "TooManyRequestsException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "TooManyRequestsException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _TooManyRequestsException.prototype);
      }
    };
    UnauthorizedException = class _UnauthorizedException extends SSOServiceException {
      name = "UnauthorizedException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "UnauthorizedException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _UnauthorizedException.prototype);
      }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js
var _ATT, _GRC, _GRCR, _GRCRe, _IRE2, _RC, _RNFE, _SAKT, _STT, _TMRE, _UE, _aI, _aKI, _aT2, _ai, _c2, _e2, _ex, _h2, _hE2, _hH, _hQ, _m, _rC, _rN, _rn, _s2, _sAK, _sT, _xasbt, n02, _s_registry2, SSOServiceException$, n0_registry2, InvalidRequestException$2, ResourceNotFoundException$, TooManyRequestsException$, UnauthorizedException$, errorTypeRegistries2, AccessTokenType, SecretAccessKeyType, SessionTokenType, GetRoleCredentialsRequest$, GetRoleCredentialsResponse$, RoleCredentials$, GetRoleCredentials$;
var init_schemas_02 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js"() {
    init_schema();
    init_errors2();
    init_SSOServiceException();
    _ATT = "AccessTokenType";
    _GRC = "GetRoleCredentials";
    _GRCR = "GetRoleCredentialsRequest";
    _GRCRe = "GetRoleCredentialsResponse";
    _IRE2 = "InvalidRequestException";
    _RC = "RoleCredentials";
    _RNFE = "ResourceNotFoundException";
    _SAKT = "SecretAccessKeyType";
    _STT = "SessionTokenType";
    _TMRE = "TooManyRequestsException";
    _UE = "UnauthorizedException";
    _aI = "accountId";
    _aKI = "accessKeyId";
    _aT2 = "accessToken";
    _ai = "account_id";
    _c2 = "client";
    _e2 = "error";
    _ex = "expiration";
    _h2 = "http";
    _hE2 = "httpError";
    _hH = "httpHeader";
    _hQ = "httpQuery";
    _m = "message";
    _rC = "roleCredentials";
    _rN = "roleName";
    _rn = "role_name";
    _s2 = "smithy.ts.sdk.synthetic.com.amazonaws.sso";
    _sAK = "secretAccessKey";
    _sT = "sessionToken";
    _xasbt = "x-amz-sso_bearer_token";
    n02 = "com.amazonaws.sso";
    _s_registry2 = TypeRegistry.for(_s2);
    SSOServiceException$ = [-3, _s2, "SSOServiceException", 0, [], []];
    _s_registry2.registerError(SSOServiceException$, SSOServiceException);
    n0_registry2 = TypeRegistry.for(n02);
    InvalidRequestException$2 = [-3, n02, _IRE2, { [_e2]: _c2, [_hE2]: 400 }, [_m], [0]];
    n0_registry2.registerError(InvalidRequestException$2, InvalidRequestException2);
    ResourceNotFoundException$ = [-3, n02, _RNFE, { [_e2]: _c2, [_hE2]: 404 }, [_m], [0]];
    n0_registry2.registerError(ResourceNotFoundException$, ResourceNotFoundException);
    TooManyRequestsException$ = [-3, n02, _TMRE, { [_e2]: _c2, [_hE2]: 429 }, [_m], [0]];
    n0_registry2.registerError(TooManyRequestsException$, TooManyRequestsException);
    UnauthorizedException$ = [-3, n02, _UE, { [_e2]: _c2, [_hE2]: 401 }, [_m], [0]];
    n0_registry2.registerError(UnauthorizedException$, UnauthorizedException);
    errorTypeRegistries2 = [_s_registry2, n0_registry2];
    AccessTokenType = [0, n02, _ATT, 8, 0];
    SecretAccessKeyType = [0, n02, _SAKT, 8, 0];
    SessionTokenType = [0, n02, _STT, 8, 0];
    GetRoleCredentialsRequest$ = [
      3,
      n02,
      _GRCR,
      0,
      [_rN, _aI, _aT2],
      [
        [0, { [_hQ]: _rn }],
        [0, { [_hQ]: _ai }],
        [() => AccessTokenType, { [_hH]: _xasbt }]
      ],
      3
    ];
    GetRoleCredentialsResponse$ = [
      3,
      n02,
      _GRCRe,
      0,
      [_rC],
      [[() => RoleCredentials$, 0]]
    ];
    RoleCredentials$ = [
      3,
      n02,
      _RC,
      0,
      [_aKI, _sAK, _sT, _ex],
      [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1]
    ];
    GetRoleCredentials$ = [
      9,
      n02,
      _GRC,
      { [_h2]: ["GET", "/federation/credentials", 200] },
      () => GetRoleCredentialsRequest$,
      () => GetRoleCredentialsResponse$
    ];
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.shared.js
var import_smithy_client16, import_url_parser3, import_util_base649, import_util_utf89, getRuntimeConfig3;
var init_runtimeConfig_shared2 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.shared.js"() {
    init_httpAuthSchemes2();
    init_protocols2();
    init_dist_es();
    import_smithy_client16 = __toESM(require_dist_cjs34());
    import_url_parser3 = __toESM(require_dist_cjs18());
    import_util_base649 = __toESM(require_dist_cjs10());
    import_util_utf89 = __toESM(require_dist_cjs9());
    init_httpAuthSchemeProvider2();
    init_endpointResolver2();
    init_schemas_02();
    getRuntimeConfig3 = (config) => {
      return {
        apiVersion: "2019-06-10",
        base64Decoder: config?.base64Decoder ?? import_util_base649.fromBase64,
        base64Encoder: config?.base64Encoder ?? import_util_base649.toBase64,
        disableHostPrefix: config?.disableHostPrefix ?? false,
        endpointProvider: config?.endpointProvider ?? defaultEndpointResolver2,
        extensions: config?.extensions ?? [],
        httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider,
        httpAuthSchemes: config?.httpAuthSchemes ?? [
          {
            schemeId: "aws.auth#sigv4",
            identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
            signer: new AwsSdkSigV4Signer()
          },
          {
            schemeId: "smithy.api#noAuth",
            identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
            signer: new NoAuthSigner()
          }
        ],
        logger: config?.logger ?? new import_smithy_client16.NoOpLogger(),
        protocol: config?.protocol ?? AwsRestJsonProtocol,
        protocolSettings: config?.protocolSettings ?? {
          defaultNamespace: "com.amazonaws.sso",
          errorTypeRegistries: errorTypeRegistries2,
          version: "2019-06-10",
          serviceTarget: "SWBPortalService"
        },
        serviceId: config?.serviceId ?? "SSO",
        urlParser: config?.urlParser ?? import_url_parser3.parseUrl,
        utf8Decoder: config?.utf8Decoder ?? import_util_utf89.fromUtf8,
        utf8Encoder: config?.utf8Encoder ?? import_util_utf89.toUtf8
      };
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js
var import_util_user_agent_node2, import_config_resolver3, import_hash_node2, import_middleware_retry3, import_node_config_provider2, import_node_http_handler2, import_smithy_client17, import_util_body_length_node2, import_util_defaults_mode_node2, import_util_retry3, getRuntimeConfig4;
var init_runtimeConfig2 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js"() {
    init_package();
    init_client();
    init_httpAuthSchemes2();
    import_util_user_agent_node2 = __toESM(require_dist_cjs40());
    import_config_resolver3 = __toESM(require_dist_cjs26());
    import_hash_node2 = __toESM(require_dist_cjs41());
    import_middleware_retry3 = __toESM(require_dist_cjs35());
    import_node_config_provider2 = __toESM(require_dist_cjs30());
    import_node_http_handler2 = __toESM(require_dist_cjs13());
    import_smithy_client17 = __toESM(require_dist_cjs34());
    import_util_body_length_node2 = __toESM(require_dist_cjs42());
    import_util_defaults_mode_node2 = __toESM(require_dist_cjs43());
    import_util_retry3 = __toESM(require_dist_cjs23());
    init_runtimeConfig_shared2();
    getRuntimeConfig4 = (config) => {
      (0, import_smithy_client17.emitWarningIfUnsupportedVersion)(process.version);
      const defaultsMode = (0, import_util_defaults_mode_node2.resolveDefaultsModeConfig)(config);
      const defaultConfigProvider = () => defaultsMode().then(import_smithy_client17.loadConfigsForDefaultMode);
      const clientSharedValues = getRuntimeConfig3(config);
      emitWarningIfUnsupportedVersion(process.version);
      const loaderConfig = {
        profile: config?.profile,
        logger: clientSharedValues.logger
      };
      return {
        ...clientSharedValues,
        ...config,
        runtime: "node",
        defaultsMode,
        authSchemePreference: config?.authSchemePreference ?? (0, import_node_config_provider2.loadConfig)(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
        bodyLengthChecker: config?.bodyLengthChecker ?? import_util_body_length_node2.calculateBodyLength,
        defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, import_util_user_agent_node2.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }),
        maxAttempts: config?.maxAttempts ?? (0, import_node_config_provider2.loadConfig)(import_middleware_retry3.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
        region: config?.region ?? (0, import_node_config_provider2.loadConfig)(import_config_resolver3.NODE_REGION_CONFIG_OPTIONS, { ...import_config_resolver3.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
        requestHandler: import_node_http_handler2.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
        retryMode: config?.retryMode ?? (0, import_node_config_provider2.loadConfig)({
          ...import_middleware_retry3.NODE_RETRY_MODE_CONFIG_OPTIONS,
          default: async () => (await defaultConfigProvider()).retryMode || import_util_retry3.DEFAULT_RETRY_MODE
        }, config),
        sha256: config?.sha256 ?? import_hash_node2.Hash.bind(null, "sha256"),
        streamCollector: config?.streamCollector ?? import_node_http_handler2.streamCollector,
        useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, import_node_config_provider2.loadConfig)(import_config_resolver3.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
        useFipsEndpoint: config?.useFipsEndpoint ?? (0, import_node_config_provider2.loadConfig)(import_config_resolver3.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
        userAgentAppId: config?.userAgentAppId ?? (0, import_node_config_provider2.loadConfig)(import_util_user_agent_node2.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
      };
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthExtensionConfiguration.js
var getHttpAuthExtensionConfiguration2, resolveHttpAuthRuntimeConfig2;
var init_httpAuthExtensionConfiguration2 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthExtensionConfiguration.js"() {
    getHttpAuthExtensionConfiguration2 = (runtimeConfig) => {
      const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
      let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
      let _credentials = runtimeConfig.credentials;
      return {
        setHttpAuthScheme(httpAuthScheme) {
          const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
          if (index === -1) {
            _httpAuthSchemes.push(httpAuthScheme);
          } else {
            _httpAuthSchemes.splice(index, 1, httpAuthScheme);
          }
        },
        httpAuthSchemes() {
          return _httpAuthSchemes;
        },
        setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
          _httpAuthSchemeProvider = httpAuthSchemeProvider;
        },
        httpAuthSchemeProvider() {
          return _httpAuthSchemeProvider;
        },
        setCredentials(credentials) {
          _credentials = credentials;
        },
        credentials() {
          return _credentials;
        }
      };
    };
    resolveHttpAuthRuntimeConfig2 = (config) => {
      return {
        httpAuthSchemes: config.httpAuthSchemes(),
        httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
        credentials: config.credentials()
      };
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeExtensions.js
var import_region_config_resolver2, import_protocol_http13, import_smithy_client18, resolveRuntimeExtensions2;
var init_runtimeExtensions2 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeExtensions.js"() {
    import_region_config_resolver2 = __toESM(require_dist_cjs45());
    import_protocol_http13 = __toESM(require_dist_cjs2());
    import_smithy_client18 = __toESM(require_dist_cjs34());
    init_httpAuthExtensionConfiguration2();
    resolveRuntimeExtensions2 = (runtimeConfig, extensions) => {
      const extensionConfiguration = Object.assign((0, import_region_config_resolver2.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client18.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http13.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration2(runtimeConfig));
      extensions.forEach((extension) => extension.configure(extensionConfiguration));
      return Object.assign(runtimeConfig, (0, import_region_config_resolver2.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client18.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http13.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig2(extensionConfiguration));
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSOClient.js
var import_middleware_host_header2, import_middleware_logger2, import_middleware_recursion_detection2, import_middleware_user_agent2, import_config_resolver4, import_middleware_content_length2, import_middleware_endpoint3, import_middleware_retry4, import_smithy_client19, SSOClient;
var init_SSOClient = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSOClient.js"() {
    import_middleware_host_header2 = __toESM(require_dist_cjs3());
    import_middleware_logger2 = __toESM(require_dist_cjs4());
    import_middleware_recursion_detection2 = __toESM(require_dist_cjs5());
    import_middleware_user_agent2 = __toESM(require_dist_cjs24());
    import_config_resolver4 = __toESM(require_dist_cjs26());
    init_dist_es();
    init_schema();
    import_middleware_content_length2 = __toESM(require_dist_cjs27());
    import_middleware_endpoint3 = __toESM(require_dist_cjs32());
    import_middleware_retry4 = __toESM(require_dist_cjs35());
    import_smithy_client19 = __toESM(require_dist_cjs34());
    init_httpAuthSchemeProvider2();
    init_EndpointParameters2();
    init_runtimeConfig2();
    init_runtimeExtensions2();
    SSOClient = class extends import_smithy_client19.Client {
      config;
      constructor(...[configuration]) {
        const _config_0 = getRuntimeConfig4(configuration || {});
        super(_config_0);
        this.initConfig = _config_0;
        const _config_1 = resolveClientEndpointParameters2(_config_0);
        const _config_2 = (0, import_middleware_user_agent2.resolveUserAgentConfig)(_config_1);
        const _config_3 = (0, import_middleware_retry4.resolveRetryConfig)(_config_2);
        const _config_4 = (0, import_config_resolver4.resolveRegionConfig)(_config_3);
        const _config_5 = (0, import_middleware_host_header2.resolveHostHeaderConfig)(_config_4);
        const _config_6 = (0, import_middleware_endpoint3.resolveEndpointConfig)(_config_5);
        const _config_7 = resolveHttpAuthSchemeConfig2(_config_6);
        const _config_8 = resolveRuntimeExtensions2(_config_7, configuration?.extensions || []);
        this.config = _config_8;
        this.middlewareStack.use(getSchemaSerdePlugin(this.config));
        this.middlewareStack.use((0, import_middleware_user_agent2.getUserAgentPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_retry4.getRetryPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_content_length2.getContentLengthPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_host_header2.getHostHeaderPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_logger2.getLoggerPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_recursion_detection2.getRecursionDetectionPlugin)(this.config));
        this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
          httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,
          identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
            "aws.auth#sigv4": config.credentials
          })
        }));
        this.middlewareStack.use(getHttpSigningPlugin(this.config));
      }
      destroy() {
        super.destroy();
      }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js
var import_middleware_endpoint4, import_smithy_client20, GetRoleCredentialsCommand;
var init_GetRoleCredentialsCommand = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js"() {
    import_middleware_endpoint4 = __toESM(require_dist_cjs32());
    import_smithy_client20 = __toESM(require_dist_cjs34());
    init_EndpointParameters2();
    init_schemas_02();
    GetRoleCredentialsCommand = class extends import_smithy_client20.Command.classBuilder().ep(commonParams2).m(function(Command, cs, config, o2) {
      return [(0, import_middleware_endpoint4.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())];
    }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").sc(GetRoleCredentials$).build() {
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSO.js
var import_smithy_client21, commands2, SSO;
var init_SSO = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSO.js"() {
    import_smithy_client21 = __toESM(require_dist_cjs34());
    init_GetRoleCredentialsCommand();
    init_SSOClient();
    commands2 = {
      GetRoleCredentialsCommand
    };
    SSO = class extends SSOClient {
    };
    (0, import_smithy_client21.createAggregatedClient)(commands2, SSO);
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/index.js
var init_commands2 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/index.js"() {
    init_GetRoleCredentialsCommand();
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/models_0.js
var init_models_02 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/models_0.js"() {
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/index.js
var sso_exports = {};
__export(sso_exports, {
  $Command: () => import_smithy_client20.Command,
  GetRoleCredentials$: () => GetRoleCredentials$,
  GetRoleCredentialsCommand: () => GetRoleCredentialsCommand,
  GetRoleCredentialsRequest$: () => GetRoleCredentialsRequest$,
  GetRoleCredentialsResponse$: () => GetRoleCredentialsResponse$,
  InvalidRequestException: () => InvalidRequestException2,
  InvalidRequestException$: () => InvalidRequestException$2,
  ResourceNotFoundException: () => ResourceNotFoundException,
  ResourceNotFoundException$: () => ResourceNotFoundException$,
  RoleCredentials$: () => RoleCredentials$,
  SSO: () => SSO,
  SSOClient: () => SSOClient,
  SSOServiceException: () => SSOServiceException,
  SSOServiceException$: () => SSOServiceException$,
  TooManyRequestsException: () => TooManyRequestsException,
  TooManyRequestsException$: () => TooManyRequestsException$,
  UnauthorizedException: () => UnauthorizedException,
  UnauthorizedException$: () => UnauthorizedException$,
  __Client: () => import_smithy_client19.Client,
  errorTypeRegistries: () => errorTypeRegistries2
});
var init_sso = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/index.js"() {
    init_SSOClient();
    init_SSO();
    init_commands2();
    init_schemas_02();
    init_errors2();
    init_models_02();
    init_SSOServiceException();
  }
});

// ../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js
var require_loadSso_BKDNrsal = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js"(exports2) {
    "use strict";
    var sso = (init_sso(), __toCommonJS(sso_exports));
    exports2.GetRoleCredentialsCommand = sso.GetRoleCredentialsCommand;
    exports2.SSOClient = sso.SSOClient;
  }
});

// ../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js
var require_dist_cjs47 = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js"(exports2) {
    "use strict";
    var propertyProvider = require_dist_cjs28();
    var sharedIniFileLoader = require_dist_cjs29();
    var client = (init_client(), __toCommonJS(client_exports));
    var tokenProviders = require_dist_cjs46();
    var isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string");
    var SHOULD_FAIL_CREDENTIAL_CHAIN = false;
    var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger: logger2 }) => {
      let token;
      const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
      if (ssoSession) {
        try {
          const _token = await tokenProviders.fromSso({
            profile,
            filepath,
            configFilepath,
            ignoreCache
          })();
          token = {
            accessToken: _token.token,
            expiresAt: new Date(_token.expiration).toISOString()
          };
        } catch (e5) {
          throw new propertyProvider.CredentialsProviderError(e5.message, {
            tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
            logger: logger2
          });
        }
      } else {
        try {
          token = await sharedIniFileLoader.getSSOTokenFromFile(ssoStartUrl);
        } catch (e5) {
          throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
            tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
            logger: logger2
          });
        }
      }
      if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
        throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
          tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
          logger: logger2
        });
      }
      const { accessToken } = token;
      const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(function() {
        return require_loadSso_BKDNrsal();
      });
      const sso = ssoClient || new SSOClient2(Object.assign({}, clientConfig ?? {}, {
        logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,
        region: clientConfig?.region ?? ssoRegion,
        userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId
      }));
      let ssoResp;
      try {
        ssoResp = await sso.send(new GetRoleCredentialsCommand2({
          accountId: ssoAccountId,
          roleName: ssoRoleName,
          accessToken
        }));
      } catch (e5) {
        throw new propertyProvider.CredentialsProviderError(e5, {
          tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
          logger: logger2
        });
      }
      const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} } = ssoResp;
      if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
        throw new propertyProvider.CredentialsProviderError("SSO returns an invalid temporary credential.", {
          tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
          logger: logger2
        });
      }
      const credentials = {
        accessKeyId,
        secretAccessKey,
        sessionToken,
        expiration: new Date(expiration),
        ...credentialScope && { credentialScope },
        ...accountId && { accountId }
      };
      if (ssoSession) {
        client.setCredentialFeature(credentials, "CREDENTIALS_SSO", "s");
      } else {
        client.setCredentialFeature(credentials, "CREDENTIALS_SSO_LEGACY", "u");
      }
      return credentials;
    };
    var validateSsoProfile = (profile, logger2) => {
      const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
      if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
        throw new propertyProvider.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger: logger2 });
      }
      return profile;
    };
    var fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
      init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
      const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
      const { ssoClient } = init;
      const profileName = sharedIniFileLoader.getProfileName({
        profile: init.profile ?? callerClientConfig?.profile
      });
      if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
        const profiles = await sharedIniFileLoader.parseKnownFiles(init);
        const profile = profiles[profileName];
        if (!profile) {
          throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
        }
        if (!isSsoProfile(profile)) {
          throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
            logger: init.logger
          });
        }
        if (profile?.sso_session) {
          const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);
          const session = ssoSessions[profile.sso_session];
          const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
          if (ssoRegion && ssoRegion !== session.sso_region) {
            throw new propertyProvider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
              tryNextLink: false,
              logger: init.logger
            });
          }
          if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
            throw new propertyProvider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
              tryNextLink: false,
              logger: init.logger
            });
          }
          profile.sso_region = session.sso_region;
          profile.sso_start_url = session.sso_start_url;
        }
        const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);
        return resolveSSOCredentials({
          ssoStartUrl: sso_start_url,
          ssoSession: sso_session,
          ssoAccountId: sso_account_id,
          ssoRegion: sso_region,
          ssoRoleName: sso_role_name,
          ssoClient,
          clientConfig: init.clientConfig,
          parentClientConfig: init.parentClientConfig,
          callerClientConfig: init.callerClientConfig,
          profile: profileName,
          filepath: init.filepath,
          configFilepath: init.configFilepath,
          ignoreCache: init.ignoreCache,
          logger: init.logger
        });
      } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
        throw new propertyProvider.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
      } else {
        return resolveSSOCredentials({
          ssoStartUrl,
          ssoSession,
          ssoAccountId,
          ssoRegion,
          ssoRoleName,
          ssoClient,
          clientConfig: init.clientConfig,
          parentClientConfig: init.parentClientConfig,
          callerClientConfig: init.callerClientConfig,
          profile: profileName,
          filepath: init.filepath,
          configFilepath: init.configFilepath,
          ignoreCache: init.ignoreCache,
          logger: init.logger
        });
      }
    };
    exports2.fromSSO = fromSSO;
    exports2.isSsoProfile = isSsoProfile;
    exports2.validateSsoProfile = validateSsoProfile;
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthSchemeProvider.js
function createAwsAuthSigv4HttpAuthOption3(authParameters) {
  return {
    schemeId: "aws.auth#sigv4",
    signingProperties: {
      name: "signin",
      region: authParameters.region
    },
    propertiesExtractor: (config, context) => ({
      signingProperties: {
        config,
        context
      }
    })
  };
}
function createSmithyApiNoAuthHttpAuthOption3(authParameters) {
  return {
    schemeId: "smithy.api#noAuth"
  };
}
var import_util_middleware8, defaultSigninHttpAuthSchemeParametersProvider, defaultSigninHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig3;
var init_httpAuthSchemeProvider3 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthSchemeProvider.js"() {
    init_httpAuthSchemes2();
    import_util_middleware8 = __toESM(require_dist_cjs6());
    defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => {
      return {
        operation: (0, import_util_middleware8.getSmithyContext)(context).operation,
        region: await (0, import_util_middleware8.normalizeProvider)(config.region)() || (() => {
          throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
        })()
      };
    };
    defaultSigninHttpAuthSchemeProvider = (authParameters) => {
      const options = [];
      switch (authParameters.operation) {
        case "CreateOAuth2Token": {
          options.push(createSmithyApiNoAuthHttpAuthOption3(authParameters));
          break;
        }
        default: {
          options.push(createAwsAuthSigv4HttpAuthOption3(authParameters));
        }
      }
      return options;
    };
    resolveHttpAuthSchemeConfig3 = (config) => {
      const config_0 = resolveAwsSdkSigV4Config(config);
      return Object.assign(config_0, {
        authSchemePreference: (0, import_util_middleware8.normalizeProvider)(config.authSchemePreference ?? [])
      });
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/EndpointParameters.js
var resolveClientEndpointParameters3, commonParams3;
var init_EndpointParameters3 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/EndpointParameters.js"() {
    resolveClientEndpointParameters3 = (options) => {
      return Object.assign(options, {
        useDualstackEndpoint: options.useDualstackEndpoint ?? false,
        useFipsEndpoint: options.useFipsEndpoint ?? false,
        defaultSigningName: "signin"
      });
    };
    commonParams3 = {
      UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
      Endpoint: { type: "builtInParams", name: "endpoint" },
      Region: { type: "builtInParams", name: "region" },
      UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js
var import_util_endpoints7, m, a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l, _data3, root3, r3, nodes3, bdd3;
var init_bdd3 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js"() {
    import_util_endpoints7 = __toESM(require_dist_cjs20());
    m = "ref";
    a3 = -1;
    b3 = true;
    c3 = "isSet";
    d3 = "PartitionResult";
    e3 = "booleanEquals";
    f3 = "getAttr";
    g3 = "stringEquals";
    h3 = { [m]: "Endpoint" };
    i3 = { [m]: d3 };
    j3 = { fn: f3, argv: [i3, "name"] };
    k3 = {};
    l = [{ [m]: "Region" }];
    _data3 = {
      conditions: [
        [c3, [h3]],
        [c3, l],
        ["aws.partition", l, d3],
        [e3, [{ [m]: "UseFIPS" }, b3]],
        [e3, [{ [m]: "UseDualStack" }, b3]],
        [e3, [{ fn: f3, argv: [i3, "supportsDualStack"] }, b3]],
        [e3, [{ fn: f3, argv: [i3, "supportsFIPS"] }, b3]],
        [g3, [j3, "aws"]],
        [g3, [j3, "aws-cn"]],
        [g3, [j3, "aws-us-gov"]]
      ],
      results: [
        [a3],
        [a3, "Invalid Configuration: FIPS and custom endpoint are not supported"],
        [a3, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
        [h3, k3],
        ["https://{Region}.signin.aws.amazon.com", k3],
        ["https://{Region}.signin.amazonaws.cn", k3],
        ["https://{Region}.signin.amazonaws-us-gov.com", k3],
        ["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", k3],
        [a3, "FIPS and DualStack are enabled, but this partition does not support one or both"],
        ["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}", k3],
        [a3, "FIPS is enabled but this partition does not support FIPS"],
        ["https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}", k3],
        [a3, "DualStack is enabled but this partition does not support DualStack"],
        ["https://signin.{Region}.{PartitionResult#dnsSuffix}", k3],
        [a3, "Invalid Configuration: Missing Region"]
      ]
    };
    root3 = 2;
    r3 = 1e8;
    nodes3 = new Int32Array([
      -1,
      1,
      -1,
      0,
      15,
      3,
      1,
      4,
      r3 + 14,
      2,
      5,
      r3 + 14,
      3,
      11,
      6,
      4,
      10,
      7,
      7,
      r3 + 4,
      8,
      8,
      r3 + 5,
      9,
      9,
      r3 + 6,
      r3 + 13,
      5,
      r3 + 11,
      r3 + 12,
      4,
      13,
      12,
      6,
      r3 + 9,
      r3 + 10,
      5,
      14,
      r3 + 8,
      6,
      r3 + 7,
      r3 + 8,
      3,
      r3 + 1,
      16,
      4,
      r3 + 2,
      r3 + 3
    ]);
    bdd3 = import_util_endpoints7.BinaryDecisionDiagram.from(nodes3, root3, _data3.conditions, _data3.results);
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js
var import_util_endpoints8, import_util_endpoints9, cache3, defaultEndpointResolver3;
var init_endpointResolver3 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js"() {
    import_util_endpoints8 = __toESM(require_dist_cjs21());
    import_util_endpoints9 = __toESM(require_dist_cjs20());
    init_bdd3();
    cache3 = new import_util_endpoints9.EndpointCache({
      size: 50,
      params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
    });
    defaultEndpointResolver3 = (endpointParams, context = {}) => {
      return cache3.get(endpointParams, () => (0, import_util_endpoints9.decideEndpoint)(bdd3, {
        endpointParams,
        logger: context.logger
      }));
    };
    import_util_endpoints9.customEndpointFunctions.aws = import_util_endpoints8.awsEndpointFunctions;
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js
var import_smithy_client22, SigninServiceException;
var init_SigninServiceException = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js"() {
    import_smithy_client22 = __toESM(require_dist_cjs34());
    SigninServiceException = class _SigninServiceException extends import_smithy_client22.ServiceException {
      constructor(options) {
        super(options);
        Object.setPrototypeOf(this, _SigninServiceException.prototype);
      }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/errors.js
var AccessDeniedException2, InternalServerException2, TooManyRequestsError, ValidationException;
var init_errors3 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/errors.js"() {
    init_SigninServiceException();
    AccessDeniedException2 = class _AccessDeniedException extends SigninServiceException {
      name = "AccessDeniedException";
      $fault = "client";
      error;
      constructor(opts) {
        super({
          name: "AccessDeniedException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _AccessDeniedException.prototype);
        this.error = opts.error;
      }
    };
    InternalServerException2 = class _InternalServerException extends SigninServiceException {
      name = "InternalServerException";
      $fault = "server";
      error;
      constructor(opts) {
        super({
          name: "InternalServerException",
          $fault: "server",
          ...opts
        });
        Object.setPrototypeOf(this, _InternalServerException.prototype);
        this.error = opts.error;
      }
    };
    TooManyRequestsError = class _TooManyRequestsError extends SigninServiceException {
      name = "TooManyRequestsError";
      $fault = "client";
      error;
      constructor(opts) {
        super({
          name: "TooManyRequestsError",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _TooManyRequestsError.prototype);
        this.error = opts.error;
      }
    };
    ValidationException = class _ValidationException extends SigninServiceException {
      name = "ValidationException";
      $fault = "client";
      error;
      constructor(opts) {
        super({
          name: "ValidationException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _ValidationException.prototype);
        this.error = opts.error;
      }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/schemas/schemas_0.js
var _ADE2, _AT2, _COAT, _COATR, _COATRB, _COATRBr, _COATRr, _ISE2, _RT2, _TMRE2, _VE, _aKI2, _aT3, _c3, _cI2, _cV2, _co2, _e3, _eI2, _gT2, _h3, _hE3, _iT2, _jN, _m2, _rT2, _rU2, _s3, _sAK2, _sT2, _se2, _tI, _tO, _tT2, n03, _s_registry3, SigninServiceException$, n0_registry3, AccessDeniedException$2, InternalServerException$2, TooManyRequestsError$, ValidationException$, errorTypeRegistries3, RefreshToken2, AccessToken$, CreateOAuth2TokenRequest$, CreateOAuth2TokenRequestBody$, CreateOAuth2TokenResponse$, CreateOAuth2TokenResponseBody$, CreateOAuth2Token$;
var init_schemas_03 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/schemas/schemas_0.js"() {
    init_schema();
    init_errors3();
    init_SigninServiceException();
    _ADE2 = "AccessDeniedException";
    _AT2 = "AccessToken";
    _COAT = "CreateOAuth2Token";
    _COATR = "CreateOAuth2TokenRequest";
    _COATRB = "CreateOAuth2TokenRequestBody";
    _COATRBr = "CreateOAuth2TokenResponseBody";
    _COATRr = "CreateOAuth2TokenResponse";
    _ISE2 = "InternalServerException";
    _RT2 = "RefreshToken";
    _TMRE2 = "TooManyRequestsError";
    _VE = "ValidationException";
    _aKI2 = "accessKeyId";
    _aT3 = "accessToken";
    _c3 = "client";
    _cI2 = "clientId";
    _cV2 = "codeVerifier";
    _co2 = "code";
    _e3 = "error";
    _eI2 = "expiresIn";
    _gT2 = "grantType";
    _h3 = "http";
    _hE3 = "httpError";
    _iT2 = "idToken";
    _jN = "jsonName";
    _m2 = "message";
    _rT2 = "refreshToken";
    _rU2 = "redirectUri";
    _s3 = "smithy.ts.sdk.synthetic.com.amazonaws.signin";
    _sAK2 = "secretAccessKey";
    _sT2 = "sessionToken";
    _se2 = "server";
    _tI = "tokenInput";
    _tO = "tokenOutput";
    _tT2 = "tokenType";
    n03 = "com.amazonaws.signin";
    _s_registry3 = TypeRegistry.for(_s3);
    SigninServiceException$ = [-3, _s3, "SigninServiceException", 0, [], []];
    _s_registry3.registerError(SigninServiceException$, SigninServiceException);
    n0_registry3 = TypeRegistry.for(n03);
    AccessDeniedException$2 = [-3, n03, _ADE2, { [_e3]: _c3 }, [_e3, _m2], [0, 0], 2];
    n0_registry3.registerError(AccessDeniedException$2, AccessDeniedException2);
    InternalServerException$2 = [-3, n03, _ISE2, { [_e3]: _se2, [_hE3]: 500 }, [_e3, _m2], [0, 0], 2];
    n0_registry3.registerError(InternalServerException$2, InternalServerException2);
    TooManyRequestsError$ = [-3, n03, _TMRE2, { [_e3]: _c3, [_hE3]: 429 }, [_e3, _m2], [0, 0], 2];
    n0_registry3.registerError(TooManyRequestsError$, TooManyRequestsError);
    ValidationException$ = [-3, n03, _VE, { [_e3]: _c3, [_hE3]: 400 }, [_e3, _m2], [0, 0], 2];
    n0_registry3.registerError(ValidationException$, ValidationException);
    errorTypeRegistries3 = [_s_registry3, n0_registry3];
    RefreshToken2 = [0, n03, _RT2, 8, 0];
    AccessToken$ = [
      3,
      n03,
      _AT2,
      8,
      [_aKI2, _sAK2, _sT2],
      [
        [0, { [_jN]: _aKI2 }],
        [0, { [_jN]: _sAK2 }],
        [0, { [_jN]: _sT2 }]
      ],
      3
    ];
    CreateOAuth2TokenRequest$ = [
      3,
      n03,
      _COATR,
      0,
      [_tI],
      [[() => CreateOAuth2TokenRequestBody$, 16]],
      1
    ];
    CreateOAuth2TokenRequestBody$ = [
      3,
      n03,
      _COATRB,
      0,
      [_cI2, _gT2, _co2, _rU2, _cV2, _rT2],
      [
        [0, { [_jN]: _cI2 }],
        [0, { [_jN]: _gT2 }],
        0,
        [0, { [_jN]: _rU2 }],
        [0, { [_jN]: _cV2 }],
        [() => RefreshToken2, { [_jN]: _rT2 }]
      ],
      2
    ];
    CreateOAuth2TokenResponse$ = [
      3,
      n03,
      _COATRr,
      0,
      [_tO],
      [[() => CreateOAuth2TokenResponseBody$, 16]],
      1
    ];
    CreateOAuth2TokenResponseBody$ = [
      3,
      n03,
      _COATRBr,
      0,
      [_aT3, _tT2, _eI2, _rT2, _iT2],
      [
        [() => AccessToken$, { [_jN]: _aT3 }],
        [0, { [_jN]: _tT2 }],
        [1, { [_jN]: _eI2 }],
        [() => RefreshToken2, { [_jN]: _rT2 }],
        [0, { [_jN]: _iT2 }]
      ],
      4
    ];
    CreateOAuth2Token$ = [
      9,
      n03,
      _COAT,
      { [_h3]: ["POST", "/v1/token", 200] },
      () => CreateOAuth2TokenRequest$,
      () => CreateOAuth2TokenResponse$
    ];
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.shared.js
var import_smithy_client23, import_url_parser4, import_util_base6410, import_util_utf810, getRuntimeConfig5;
var init_runtimeConfig_shared3 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.shared.js"() {
    init_httpAuthSchemes2();
    init_protocols2();
    init_dist_es();
    import_smithy_client23 = __toESM(require_dist_cjs34());
    import_url_parser4 = __toESM(require_dist_cjs18());
    import_util_base6410 = __toESM(require_dist_cjs10());
    import_util_utf810 = __toESM(require_dist_cjs9());
    init_httpAuthSchemeProvider3();
    init_endpointResolver3();
    init_schemas_03();
    getRuntimeConfig5 = (config) => {
      return {
        apiVersion: "2023-01-01",
        base64Decoder: config?.base64Decoder ?? import_util_base6410.fromBase64,
        base64Encoder: config?.base64Encoder ?? import_util_base6410.toBase64,
        disableHostPrefix: config?.disableHostPrefix ?? false,
        endpointProvider: config?.endpointProvider ?? defaultEndpointResolver3,
        extensions: config?.extensions ?? [],
        httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSigninHttpAuthSchemeProvider,
        httpAuthSchemes: config?.httpAuthSchemes ?? [
          {
            schemeId: "aws.auth#sigv4",
            identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
            signer: new AwsSdkSigV4Signer()
          },
          {
            schemeId: "smithy.api#noAuth",
            identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
            signer: new NoAuthSigner()
          }
        ],
        logger: config?.logger ?? new import_smithy_client23.NoOpLogger(),
        protocol: config?.protocol ?? AwsRestJsonProtocol,
        protocolSettings: config?.protocolSettings ?? {
          defaultNamespace: "com.amazonaws.signin",
          errorTypeRegistries: errorTypeRegistries3,
          version: "2023-01-01",
          serviceTarget: "Signin"
        },
        serviceId: config?.serviceId ?? "Signin",
        urlParser: config?.urlParser ?? import_url_parser4.parseUrl,
        utf8Decoder: config?.utf8Decoder ?? import_util_utf810.fromUtf8,
        utf8Encoder: config?.utf8Encoder ?? import_util_utf810.toUtf8
      };
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js
var import_util_user_agent_node3, import_config_resolver5, import_hash_node3, import_middleware_retry5, import_node_config_provider3, import_node_http_handler3, import_smithy_client24, import_util_body_length_node3, import_util_defaults_mode_node3, import_util_retry4, getRuntimeConfig6;
var init_runtimeConfig3 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js"() {
    init_package();
    init_client();
    init_httpAuthSchemes2();
    import_util_user_agent_node3 = __toESM(require_dist_cjs40());
    import_config_resolver5 = __toESM(require_dist_cjs26());
    import_hash_node3 = __toESM(require_dist_cjs41());
    import_middleware_retry5 = __toESM(require_dist_cjs35());
    import_node_config_provider3 = __toESM(require_dist_cjs30());
    import_node_http_handler3 = __toESM(require_dist_cjs13());
    import_smithy_client24 = __toESM(require_dist_cjs34());
    import_util_body_length_node3 = __toESM(require_dist_cjs42());
    import_util_defaults_mode_node3 = __toESM(require_dist_cjs43());
    import_util_retry4 = __toESM(require_dist_cjs23());
    init_runtimeConfig_shared3();
    getRuntimeConfig6 = (config) => {
      (0, import_smithy_client24.emitWarningIfUnsupportedVersion)(process.version);
      const defaultsMode = (0, import_util_defaults_mode_node3.resolveDefaultsModeConfig)(config);
      const defaultConfigProvider = () => defaultsMode().then(import_smithy_client24.loadConfigsForDefaultMode);
      const clientSharedValues = getRuntimeConfig5(config);
      emitWarningIfUnsupportedVersion(process.version);
      const loaderConfig = {
        profile: config?.profile,
        logger: clientSharedValues.logger
      };
      return {
        ...clientSharedValues,
        ...config,
        runtime: "node",
        defaultsMode,
        authSchemePreference: config?.authSchemePreference ?? (0, import_node_config_provider3.loadConfig)(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
        bodyLengthChecker: config?.bodyLengthChecker ?? import_util_body_length_node3.calculateBodyLength,
        defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, import_util_user_agent_node3.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }),
        maxAttempts: config?.maxAttempts ?? (0, import_node_config_provider3.loadConfig)(import_middleware_retry5.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
        region: config?.region ?? (0, import_node_config_provider3.loadConfig)(import_config_resolver5.NODE_REGION_CONFIG_OPTIONS, { ...import_config_resolver5.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
        requestHandler: import_node_http_handler3.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
        retryMode: config?.retryMode ?? (0, import_node_config_provider3.loadConfig)({
          ...import_middleware_retry5.NODE_RETRY_MODE_CONFIG_OPTIONS,
          default: async () => (await defaultConfigProvider()).retryMode || import_util_retry4.DEFAULT_RETRY_MODE
        }, config),
        sha256: config?.sha256 ?? import_hash_node3.Hash.bind(null, "sha256"),
        streamCollector: config?.streamCollector ?? import_node_http_handler3.streamCollector,
        useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, import_node_config_provider3.loadConfig)(import_config_resolver5.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
        useFipsEndpoint: config?.useFipsEndpoint ?? (0, import_node_config_provider3.loadConfig)(import_config_resolver5.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
        userAgentAppId: config?.userAgentAppId ?? (0, import_node_config_provider3.loadConfig)(import_util_user_agent_node3.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
      };
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthExtensionConfiguration.js
var getHttpAuthExtensionConfiguration3, resolveHttpAuthRuntimeConfig3;
var init_httpAuthExtensionConfiguration3 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthExtensionConfiguration.js"() {
    getHttpAuthExtensionConfiguration3 = (runtimeConfig) => {
      const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
      let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
      let _credentials = runtimeConfig.credentials;
      return {
        setHttpAuthScheme(httpAuthScheme) {
          const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
          if (index === -1) {
            _httpAuthSchemes.push(httpAuthScheme);
          } else {
            _httpAuthSchemes.splice(index, 1, httpAuthScheme);
          }
        },
        httpAuthSchemes() {
          return _httpAuthSchemes;
        },
        setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
          _httpAuthSchemeProvider = httpAuthSchemeProvider;
        },
        httpAuthSchemeProvider() {
          return _httpAuthSchemeProvider;
        },
        setCredentials(credentials) {
          _credentials = credentials;
        },
        credentials() {
          return _credentials;
        }
      };
    };
    resolveHttpAuthRuntimeConfig3 = (config) => {
      return {
        httpAuthSchemes: config.httpAuthSchemes(),
        httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
        credentials: config.credentials()
      };
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeExtensions.js
var import_region_config_resolver3, import_protocol_http14, import_smithy_client25, resolveRuntimeExtensions3;
var init_runtimeExtensions3 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeExtensions.js"() {
    import_region_config_resolver3 = __toESM(require_dist_cjs45());
    import_protocol_http14 = __toESM(require_dist_cjs2());
    import_smithy_client25 = __toESM(require_dist_cjs34());
    init_httpAuthExtensionConfiguration3();
    resolveRuntimeExtensions3 = (runtimeConfig, extensions) => {
      const extensionConfiguration = Object.assign((0, import_region_config_resolver3.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client25.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http14.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration3(runtimeConfig));
      extensions.forEach((extension) => extension.configure(extensionConfiguration));
      return Object.assign(runtimeConfig, (0, import_region_config_resolver3.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client25.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http14.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig3(extensionConfiguration));
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/SigninClient.js
var import_middleware_host_header3, import_middleware_logger3, import_middleware_recursion_detection3, import_middleware_user_agent3, import_config_resolver6, import_middleware_content_length3, import_middleware_endpoint5, import_middleware_retry6, import_smithy_client26, SigninClient;
var init_SigninClient = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/SigninClient.js"() {
    import_middleware_host_header3 = __toESM(require_dist_cjs3());
    import_middleware_logger3 = __toESM(require_dist_cjs4());
    import_middleware_recursion_detection3 = __toESM(require_dist_cjs5());
    import_middleware_user_agent3 = __toESM(require_dist_cjs24());
    import_config_resolver6 = __toESM(require_dist_cjs26());
    init_dist_es();
    init_schema();
    import_middleware_content_length3 = __toESM(require_dist_cjs27());
    import_middleware_endpoint5 = __toESM(require_dist_cjs32());
    import_middleware_retry6 = __toESM(require_dist_cjs35());
    import_smithy_client26 = __toESM(require_dist_cjs34());
    init_httpAuthSchemeProvider3();
    init_EndpointParameters3();
    init_runtimeConfig3();
    init_runtimeExtensions3();
    SigninClient = class extends import_smithy_client26.Client {
      config;
      constructor(...[configuration]) {
        const _config_0 = getRuntimeConfig6(configuration || {});
        super(_config_0);
        this.initConfig = _config_0;
        const _config_1 = resolveClientEndpointParameters3(_config_0);
        const _config_2 = (0, import_middleware_user_agent3.resolveUserAgentConfig)(_config_1);
        const _config_3 = (0, import_middleware_retry6.resolveRetryConfig)(_config_2);
        const _config_4 = (0, import_config_resolver6.resolveRegionConfig)(_config_3);
        const _config_5 = (0, import_middleware_host_header3.resolveHostHeaderConfig)(_config_4);
        const _config_6 = (0, import_middleware_endpoint5.resolveEndpointConfig)(_config_5);
        const _config_7 = resolveHttpAuthSchemeConfig3(_config_6);
        const _config_8 = resolveRuntimeExtensions3(_config_7, configuration?.extensions || []);
        this.config = _config_8;
        this.middlewareStack.use(getSchemaSerdePlugin(this.config));
        this.middlewareStack.use((0, import_middleware_user_agent3.getUserAgentPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_retry6.getRetryPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_content_length3.getContentLengthPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_host_header3.getHostHeaderPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_logger3.getLoggerPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_recursion_detection3.getRecursionDetectionPlugin)(this.config));
        this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
          httpAuthSchemeParametersProvider: defaultSigninHttpAuthSchemeParametersProvider,
          identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
            "aws.auth#sigv4": config.credentials
          })
        }));
        this.middlewareStack.use(getHttpSigningPlugin(this.config));
      }
      destroy() {
        super.destroy();
      }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js
var import_middleware_endpoint6, import_smithy_client27, CreateOAuth2TokenCommand;
var init_CreateOAuth2TokenCommand = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js"() {
    import_middleware_endpoint6 = __toESM(require_dist_cjs32());
    import_smithy_client27 = __toESM(require_dist_cjs34());
    init_EndpointParameters3();
    init_schemas_03();
    CreateOAuth2TokenCommand = class extends import_smithy_client27.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config, o2) {
      return [(0, import_middleware_endpoint6.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())];
    }).s("Signin", "CreateOAuth2Token", {}).n("SigninClient", "CreateOAuth2TokenCommand").sc(CreateOAuth2Token$).build() {
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/Signin.js
var import_smithy_client28, commands3, Signin;
var init_Signin = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/Signin.js"() {
    import_smithy_client28 = __toESM(require_dist_cjs34());
    init_CreateOAuth2TokenCommand();
    init_SigninClient();
    commands3 = {
      CreateOAuth2TokenCommand
    };
    Signin = class extends SigninClient {
    };
    (0, import_smithy_client28.createAggregatedClient)(commands3, Signin);
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/index.js
var init_commands3 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/index.js"() {
    init_CreateOAuth2TokenCommand();
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js
var OAuth2ErrorCode;
var init_enums2 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js"() {
    OAuth2ErrorCode = {
      AUTHCODE_EXPIRED: "AUTHCODE_EXPIRED",
      INSUFFICIENT_PERMISSIONS: "INSUFFICIENT_PERMISSIONS",
      INVALID_REQUEST: "INVALID_REQUEST",
      SERVER_ERROR: "server_error",
      TOKEN_EXPIRED: "TOKEN_EXPIRED",
      USER_CREDENTIALS_CHANGED: "USER_CREDENTIALS_CHANGED"
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/models_0.js
var init_models_03 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/models_0.js"() {
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/index.js
var signin_exports = {};
__export(signin_exports, {
  $Command: () => import_smithy_client27.Command,
  AccessDeniedException: () => AccessDeniedException2,
  AccessDeniedException$: () => AccessDeniedException$2,
  AccessToken$: () => AccessToken$,
  CreateOAuth2Token$: () => CreateOAuth2Token$,
  CreateOAuth2TokenCommand: () => CreateOAuth2TokenCommand,
  CreateOAuth2TokenRequest$: () => CreateOAuth2TokenRequest$,
  CreateOAuth2TokenRequestBody$: () => CreateOAuth2TokenRequestBody$,
  CreateOAuth2TokenResponse$: () => CreateOAuth2TokenResponse$,
  CreateOAuth2TokenResponseBody$: () => CreateOAuth2TokenResponseBody$,
  InternalServerException: () => InternalServerException2,
  InternalServerException$: () => InternalServerException$2,
  OAuth2ErrorCode: () => OAuth2ErrorCode,
  Signin: () => Signin,
  SigninClient: () => SigninClient,
  SigninServiceException: () => SigninServiceException,
  SigninServiceException$: () => SigninServiceException$,
  TooManyRequestsError: () => TooManyRequestsError,
  TooManyRequestsError$: () => TooManyRequestsError$,
  ValidationException: () => ValidationException,
  ValidationException$: () => ValidationException$,
  __Client: () => import_smithy_client26.Client,
  errorTypeRegistries: () => errorTypeRegistries3
});
var init_signin = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/index.js"() {
    init_SigninClient();
    init_Signin();
    init_commands3();
    init_schemas_03();
    init_enums2();
    init_errors3();
    init_models_03();
    init_SigninServiceException();
  }
});

// ../../node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js
var require_dist_cjs48 = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js"(exports2) {
    "use strict";
    var client = (init_client(), __toCommonJS(client_exports));
    var propertyProvider = require_dist_cjs28();
    var sharedIniFileLoader = require_dist_cjs29();
    var protocolHttp = require_dist_cjs2();
    var node_crypto = require("node:crypto");
    var node_fs = require("node:fs");
    var node_os = require("node:os");
    var node_path = require("node:path");
    var LoginCredentialsFetcher = class _LoginCredentialsFetcher {
      profileData;
      init;
      callerClientConfig;
      static REFRESH_THRESHOLD = 5 * 60 * 1e3;
      constructor(profileData, init, callerClientConfig) {
        this.profileData = profileData;
        this.init = init;
        this.callerClientConfig = callerClientConfig;
      }
      async loadCredentials() {
        const token = await this.loadToken();
        if (!token) {
          throw new propertyProvider.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });
        }
        const accessToken = token.accessToken;
        const now = Date.now();
        const expiryTime = new Date(accessToken.expiresAt).getTime();
        const timeUntilExpiry = expiryTime - now;
        if (timeUntilExpiry <= _LoginCredentialsFetcher.REFRESH_THRESHOLD) {
          return this.refresh(token);
        }
        return {
          accessKeyId: accessToken.accessKeyId,
          secretAccessKey: accessToken.secretAccessKey,
          sessionToken: accessToken.sessionToken,
          accountId: accessToken.accountId,
          expiration: new Date(accessToken.expiresAt)
        };
      }
      get logger() {
        return this.init?.logger;
      }
      get loginSession() {
        return this.profileData.login_session;
      }
      async refresh(token) {
        const { SigninClient: SigninClient2, CreateOAuth2TokenCommand: CreateOAuth2TokenCommand2 } = await Promise.resolve().then(() => (init_signin(), signin_exports));
        const { logger: logger2, userAgentAppId } = this.callerClientConfig ?? {};
        const isH22 = (requestHandler2) => {
          return requestHandler2?.metadata?.handlerProtocol === "h2";
        };
        const requestHandler = isH22(this.callerClientConfig?.requestHandler) ? void 0 : this.callerClientConfig?.requestHandler;
        const region = this.profileData.region ?? await this.callerClientConfig?.region?.() ?? process.env.AWS_REGION;
        const client2 = new SigninClient2({
          credentials: {
            accessKeyId: "",
            secretAccessKey: ""
          },
          region,
          requestHandler,
          logger: logger2,
          userAgentAppId,
          ...this.init?.clientConfig
        });
        this.createDPoPInterceptor(client2.middlewareStack);
        const commandInput = {
          tokenInput: {
            clientId: token.clientId,
            refreshToken: token.refreshToken,
            grantType: "refresh_token"
          }
        };
        try {
          const response = await client2.send(new CreateOAuth2TokenCommand2(commandInput));
          const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};
          const { refreshToken, expiresIn } = response.tokenOutput ?? {};
          if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {
            throw new propertyProvider.CredentialsProviderError("Token refresh response missing required fields", {
              logger: this.logger,
              tryNextLink: false
            });
          }
          const expiresInMs = (expiresIn ?? 900) * 1e3;
          const expiration = new Date(Date.now() + expiresInMs);
          const updatedToken = {
            ...token,
            accessToken: {
              ...token.accessToken,
              accessKeyId,
              secretAccessKey,
              sessionToken,
              expiresAt: expiration.toISOString()
            },
            refreshToken
          };
          await this.saveToken(updatedToken);
          const newAccessToken = updatedToken.accessToken;
          return {
            accessKeyId: newAccessToken.accessKeyId,
            secretAccessKey: newAccessToken.secretAccessKey,
            sessionToken: newAccessToken.sessionToken,
            accountId: newAccessToken.accountId,
            expiration
          };
        } catch (error3) {
          if (error3.name === "AccessDeniedException") {
            const errorType = error3.error;
            let message;
            switch (errorType) {
              case "TOKEN_EXPIRED":
                message = "Your session has expired. Please reauthenticate.";
                break;
              case "USER_CREDENTIALS_CHANGED":
                message = "Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";
                break;
              case "INSUFFICIENT_PERMISSIONS":
                message = "Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";
                break;
              default:
                message = `Failed to refresh token: ${String(error3)}. Please re-authenticate using \`aws login\``;
            }
            throw new propertyProvider.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });
          }
          throw new propertyProvider.CredentialsProviderError(`Failed to refresh token: ${String(error3)}. Please re-authenticate using aws login`, { logger: this.logger });
        }
      }
      async loadToken() {
        const tokenFilePath = this.getTokenFilePath();
        try {
          let tokenData;
          try {
            tokenData = await sharedIniFileLoader.readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });
          } catch {
            tokenData = await node_fs.promises.readFile(tokenFilePath, "utf8");
          }
          const token = JSON.parse(tokenData);
          const missingFields = ["accessToken", "clientId", "refreshToken", "dpopKey"].filter((k5) => !token[k5]);
          if (!token.accessToken?.accountId) {
            missingFields.push("accountId");
          }
          if (missingFields.length > 0) {
            throw new propertyProvider.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, {
              logger: this.logger,
              tryNextLink: false
            });
          }
          return token;
        } catch (error3) {
          throw new propertyProvider.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error3)}`, {
            logger: this.logger,
            tryNextLink: false
          });
        }
      }
      async saveToken(token) {
        const tokenFilePath = this.getTokenFilePath();
        const directory = node_path.dirname(tokenFilePath);
        try {
          await node_fs.promises.mkdir(directory, { recursive: true });
        } catch (error3) {
        }
        await node_fs.promises.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
      }
      getTokenFilePath() {
        const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? node_path.join(node_os.homedir(), ".aws", "login", "cache");
        const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
        const loginSessionSha256 = node_crypto.createHash("sha256").update(loginSessionBytes).digest("hex");
        return node_path.join(directory, `${loginSessionSha256}.json`);
      }
      derToRawSignature(derSignature) {
        let offset = 2;
        if (derSignature[offset] !== 2) {
          throw new Error("Invalid DER signature");
        }
        offset++;
        const rLength = derSignature[offset++];
        let r5 = derSignature.subarray(offset, offset + rLength);
        offset += rLength;
        if (derSignature[offset] !== 2) {
          throw new Error("Invalid DER signature");
        }
        offset++;
        const sLength = derSignature[offset++];
        let s = derSignature.subarray(offset, offset + sLength);
        r5 = r5[0] === 0 ? r5.subarray(1) : r5;
        s = s[0] === 0 ? s.subarray(1) : s;
        const rPadded = Buffer.concat([Buffer.alloc(32 - r5.length), r5]);
        const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]);
        return Buffer.concat([rPadded, sPadded]);
      }
      createDPoPInterceptor(middlewareStack) {
        middlewareStack.add((next) => async (args) => {
          if (protocolHttp.HttpRequest.isInstance(args.request)) {
            const request = args.request;
            const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : ""}${request.path}`;
            const dpop = await this.generateDpop(request.method, actualEndpoint);
            request.headers = {
              ...request.headers,
              DPoP: dpop
            };
          }
          return next(args);
        }, {
          step: "finalizeRequest",
          name: "dpopInterceptor",
          override: true
        });
      }
      async generateDpop(method = "POST", endpoint) {
        const token = await this.loadToken();
        try {
          const privateKey = node_crypto.createPrivateKey({
            key: token.dpopKey,
            format: "pem",
            type: "sec1"
          });
          const publicKey = node_crypto.createPublicKey(privateKey);
          const publicDer = publicKey.export({ format: "der", type: "spki" });
          let pointStart = -1;
          for (let i5 = 0; i5 < publicDer.length; i5++) {
            if (publicDer[i5] === 4) {
              pointStart = i5;
              break;
            }
          }
          const x = publicDer.slice(pointStart + 1, pointStart + 33);
          const y = publicDer.slice(pointStart + 33, pointStart + 65);
          const header = {
            alg: "ES256",
            typ: "dpop+jwt",
            jwk: {
              kty: "EC",
              crv: "P-256",
              x: x.toString("base64url"),
              y: y.toString("base64url")
            }
          };
          const payload2 = {
            jti: crypto.randomUUID(),
            htm: method,
            htu: endpoint,
            iat: Math.floor(Date.now() / 1e3)
          };
          const headerB64 = Buffer.from(JSON.stringify(header)).toString("base64url");
          const payloadB64 = Buffer.from(JSON.stringify(payload2)).toString("base64url");
          const message = `${headerB64}.${payloadB64}`;
          const asn1Signature = node_crypto.sign("sha256", Buffer.from(message), privateKey);
          const rawSignature = this.derToRawSignature(asn1Signature);
          const signatureB64 = rawSignature.toString("base64url");
          return `${message}.${signatureB64}`;
        } catch (error3) {
          throw new propertyProvider.CredentialsProviderError(`Failed to generate Dpop proof: ${error3 instanceof Error ? error3.message : String(error3)}`, { logger: this.logger, tryNextLink: false });
        }
      }
    };
    var fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {
      init?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");
      const profiles = await sharedIniFileLoader.parseKnownFiles(init || {});
      const profileName = sharedIniFileLoader.getProfileName({
        profile: init?.profile ?? callerClientConfig?.profile
      });
      const profile = profiles[profileName];
      if (!profile?.login_session) {
        throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {
          tryNextLink: true,
          logger: init?.logger
        });
      }
      const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);
      const credentials = await fetcher.loadCredentials();
      return client.setCredentialFeature(credentials, "CREDENTIALS_LOGIN", "AD");
    };
    exports2.fromLoginCredentials = fromLoginCredentials;
  }
});

// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/toStream.js
var require_toStream = __commonJS({
  "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/toStream.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.toStream = toStream;
    var node_stream_1 = require("node:stream");
    function toStream(bytes) {
      return node_stream_1.Readable.from(Buffer.from(bytes));
    }
  }
});

// ../../node_modules/@aws-sdk/util-arn-parser/dist-cjs/index.js
var require_dist_cjs49 = __commonJS({
  "../../node_modules/@aws-sdk/util-arn-parser/dist-cjs/index.js"(exports2) {
    "use strict";
    var validate = (str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6;
    var parse = (arn) => {
      const segments = arn.split(":");
      if (segments.length < 6 || segments[0] !== "arn")
        throw new Error("Malformed ARN");
      const [, partition, service, region, accountId, ...resource] = segments;
      return {
        partition,
        service,
        region,
        accountId,
        resource: resource.join(":")
      };
    };
    var build = (arnObject) => {
      const { partition = "aws", service, region, accountId, resource } = arnObject;
      if ([service, region, accountId, resource].some((segment) => typeof segment !== "string")) {
        throw new Error("Input ARN object is invalid");
      }
      return `arn:${partition}:${service}:${region}:${accountId}:${resource}`;
    };
    exports2.build = build;
    exports2.parse = parse;
    exports2.validate = validate;
  }
});

// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js
var require_dist_cjs50 = __commonJS({
  "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js"(exports2) {
    "use strict";
    var protocolHttp = require_dist_cjs2();
    var smithyClient = require_dist_cjs34();
    var toStream = require_toStream();
    var utilArnParser = require_dist_cjs49();
    var protocols = (init_protocols2(), __toCommonJS(protocols_exports2));
    var schema = (init_schema(), __toCommonJS(schema_exports));
    var signatureV4 = require_dist_cjs36();
    var utilConfigProvider = require_dist_cjs25();
    var client = (init_client(), __toCommonJS(client_exports));
    var core = (init_dist_es(), __toCommonJS(dist_es_exports));
    var utilMiddleware = require_dist_cjs6();
    var CONTENT_LENGTH_HEADER = "content-length";
    var DECODED_CONTENT_LENGTH_HEADER = "x-amz-decoded-content-length";
    function checkContentLengthHeader() {
      return (next, context) => async (args) => {
        const { request } = args;
        if (protocolHttp.HttpRequest.isInstance(request)) {
          if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) {
            const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`;
            if (typeof context?.logger?.warn === "function" && !(context.logger instanceof smithyClient.NoOpLogger)) {
              context.logger.warn(message);
            } else {
              console.warn(message);
            }
          }
        }
        return next({ ...args });
      };
    }
    var checkContentLengthHeaderMiddlewareOptions = {
      step: "finalizeRequest",
      tags: ["CHECK_CONTENT_LENGTH_HEADER"],
      name: "getCheckContentLengthHeaderPlugin",
      override: true
    };
    var getCheckContentLengthHeaderPlugin = (unused) => ({
      applyToStack: (clientStack) => {
        clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions);
      }
    });
    var regionRedirectEndpointMiddleware = (config) => {
      return (next, context) => async (args) => {
        const originalRegion = await config.region();
        const regionProviderRef = config.region;
        let unlock = () => {
        };
        if (context.__s3RegionRedirect) {
          Object.defineProperty(config, "region", {
            writable: false,
            value: async () => {
              return context.__s3RegionRedirect;
            }
          });
          unlock = () => Object.defineProperty(config, "region", {
            writable: true,
            value: regionProviderRef
          });
        }
        try {
          const result = await next(args);
          if (context.__s3RegionRedirect) {
            unlock();
            const region = await config.region();
            if (originalRegion !== region) {
              throw new Error("Region was not restored following S3 region redirect.");
            }
          }
          return result;
        } catch (e5) {
          unlock();
          throw e5;
        }
      };
    };
    var regionRedirectEndpointMiddlewareOptions = {
      tags: ["REGION_REDIRECT", "S3"],
      name: "regionRedirectEndpointMiddleware",
      override: true,
      relation: "before",
      toMiddleware: "endpointV2Middleware"
    };
    function regionRedirectMiddleware(clientConfig) {
      return (next, context) => async (args) => {
        try {
          return await next(args);
        } catch (err) {
          if (clientConfig.followRegionRedirects) {
            const statusCode = err?.$metadata?.httpStatusCode;
            const isHeadBucket = context.commandName === "HeadBucketCommand";
            const bucketRegionHeader = err?.$response?.headers?.["x-amz-bucket-region"];
            if (bucketRegionHeader) {
              if (statusCode === 301 || statusCode === 400 && (err?.name === "IllegalLocationConstraintException" || isHeadBucket)) {
                try {
                  const actualRegion = bucketRegionHeader;
                  context.logger?.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`);
                  context.__s3RegionRedirect = actualRegion;
                } catch (e5) {
                  throw new Error("Region redirect failed: " + e5);
                }
                return next(args);
              }
            }
          }
          throw err;
        }
      };
    }
    var regionRedirectMiddlewareOptions = {
      step: "initialize",
      tags: ["REGION_REDIRECT", "S3"],
      name: "regionRedirectMiddleware",
      override: true
    };
    var getRegionRedirectMiddlewarePlugin = (clientConfig) => ({
      applyToStack: (clientStack) => {
        clientStack.add(regionRedirectMiddleware(clientConfig), regionRedirectMiddlewareOptions);
        clientStack.addRelativeTo(regionRedirectEndpointMiddleware(clientConfig), regionRedirectEndpointMiddlewareOptions);
      }
    });
    var s3ExpiresMiddleware = (config) => {
      return (next, context) => async (args) => {
        const result = await next(args);
        const { response } = result;
        if (protocolHttp.HttpResponse.isInstance(response)) {
          if (response.headers.expires) {
            response.headers.expiresstring = response.headers.expires;
            try {
              smithyClient.parseRfc7231DateTime(response.headers.expires);
            } catch (e5) {
              context.logger?.warn(`AWS SDK Warning for ${context.clientName}::${context.commandName} response parsing (${response.headers.expires}): ${e5}`);
              delete response.headers.expires;
            }
          }
        }
        return result;
      };
    };
    var s3ExpiresMiddlewareOptions = {
      tags: ["S3"],
      name: "s3ExpiresMiddleware",
      override: true,
      relation: "after",
      toMiddleware: "deserializerMiddleware"
    };
    var getS3ExpiresMiddlewarePlugin = (clientConfig) => ({
      applyToStack: (clientStack) => {
        clientStack.addRelativeTo(s3ExpiresMiddleware(), s3ExpiresMiddlewareOptions);
      }
    });
    var S3ExpressIdentityCache = class _S3ExpressIdentityCache {
      data;
      lastPurgeTime = Date.now();
      static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS = 3e4;
      constructor(data2 = {}) {
        this.data = data2;
      }
      get(key) {
        const entry = this.data[key];
        if (!entry) {
          return;
        }
        return entry;
      }
      set(key, entry) {
        this.data[key] = entry;
        return entry;
      }
      delete(key) {
        delete this.data[key];
      }
      async purgeExpired() {
        const now = Date.now();
        if (this.lastPurgeTime + _S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) {
          return;
        }
        for (const key in this.data) {
          const entry = this.data[key];
          if (!entry.isRefreshing) {
            const credential = await entry.identity;
            if (credential.expiration) {
              if (credential.expiration.getTime() < now) {
                delete this.data[key];
              }
            }
          }
        }
      }
    };
    var S3ExpressIdentityCacheEntry = class {
      _identity;
      isRefreshing;
      accessed;
      constructor(_identity, isRefreshing = false, accessed = Date.now()) {
        this._identity = _identity;
        this.isRefreshing = isRefreshing;
        this.accessed = accessed;
      }
      get identity() {
        this.accessed = Date.now();
        return this._identity;
      }
    };
    var S3ExpressIdentityProviderImpl = class _S3ExpressIdentityProviderImpl {
      createSessionFn;
      cache;
      static REFRESH_WINDOW_MS = 6e4;
      constructor(createSessionFn, cache5 = new S3ExpressIdentityCache()) {
        this.createSessionFn = createSessionFn;
        this.cache = cache5;
      }
      async getS3ExpressIdentity(awsIdentity, identityProperties) {
        const key = identityProperties.Bucket;
        const { cache: cache5 } = this;
        const entry = cache5.get(key);
        if (entry) {
          return entry.identity.then((identity) => {
            const isExpired = (identity.expiration?.getTime() ?? 0) < Date.now();
            if (isExpired) {
              return cache5.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;
            }
            const isExpiringSoon = (identity.expiration?.getTime() ?? 0) < Date.now() + _S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS;
            if (isExpiringSoon && !entry.isRefreshing) {
              entry.isRefreshing = true;
              this.getIdentity(key).then((id) => {
                cache5.set(key, new S3ExpressIdentityCacheEntry(Promise.resolve(id)));
              });
            }
            return identity;
          });
        }
        return cache5.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;
      }
      async getIdentity(key) {
        await this.cache.purgeExpired().catch((error3) => {
          console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n" + error3);
        });
        const session = await this.createSessionFn(key);
        if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) {
          throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");
        }
        const identity = {
          accessKeyId: session.Credentials.AccessKeyId,
          secretAccessKey: session.Credentials.SecretAccessKey,
          sessionToken: session.Credentials.SessionToken,
          expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : void 0
        };
        return identity;
      }
    };
    var S3_EXPRESS_BUCKET_TYPE = "Directory";
    var S3_EXPRESS_BACKEND = "S3Express";
    var S3_EXPRESS_AUTH_SCHEME = "sigv4-s3express";
    var SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token";
    var SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();
    var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH";
    var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = "s3_disable_express_session_auth";
    var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = {
      environmentVariableSelector: (env2) => utilConfigProvider.booleanSelector(env2, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, utilConfigProvider.SelectorType.ENV),
      configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, utilConfigProvider.SelectorType.CONFIG),
      default: false
    };
    var SignatureV4S3Express = class extends signatureV4.SignatureV4 {
      async signWithCredentials(requestToSign, credentials, options) {
        const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
        requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken;
        const privateAccess = this;
        setSingleOverride(privateAccess, credentialsWithoutSessionToken);
        return privateAccess.signRequest(requestToSign, options ?? {});
      }
      async presignWithCredentials(requestToSign, credentials, options) {
        const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
        delete requestToSign.headers[SESSION_TOKEN_HEADER];
        requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
        requestToSign.query = requestToSign.query ?? {};
        requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
        const privateAccess = this;
        setSingleOverride(privateAccess, credentialsWithoutSessionToken);
        return this.presign(requestToSign, options);
      }
    };
    function getCredentialsWithoutSessionToken(credentials) {
      const credentialsWithoutSessionToken = {
        accessKeyId: credentials.accessKeyId,
        secretAccessKey: credentials.secretAccessKey,
        expiration: credentials.expiration
      };
      return credentialsWithoutSessionToken;
    }
    function setSingleOverride(privateAccess, credentialsWithoutSessionToken) {
      const id = setTimeout(() => {
        throw new Error("SignatureV4S3Express credential override was created but not called.");
      }, 10);
      const currentCredentialProvider = privateAccess.credentialProvider;
      const overrideCredentialsProviderOnce = () => {
        clearTimeout(id);
        privateAccess.credentialProvider = currentCredentialProvider;
        return Promise.resolve(credentialsWithoutSessionToken);
      };
      privateAccess.credentialProvider = overrideCredentialsProviderOnce;
    }
    var s3ExpressMiddleware = (options) => {
      return (next, context) => async (args) => {
        if (context.endpointV2) {
          const endpoint = context.endpointV2;
          const isS3ExpressAuth = endpoint.properties?.authSchemes?.[0]?.name === S3_EXPRESS_AUTH_SCHEME;
          const isS3ExpressBucket = endpoint.properties?.backend === S3_EXPRESS_BACKEND || endpoint.properties?.bucketType === S3_EXPRESS_BUCKET_TYPE;
          if (isS3ExpressBucket) {
            client.setFeature(context, "S3_EXPRESS_BUCKET", "J");
            context.isS3ExpressBucket = true;
          }
          if (isS3ExpressAuth) {
            const requestBucket = args.input.Bucket;
            if (requestBucket) {
              const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity(await options.credentials(), {
                Bucket: requestBucket
              });
              context.s3ExpressIdentity = s3ExpressIdentity;
              if (protocolHttp.HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) {
                args.request.headers[SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken;
              }
            }
          }
        }
        return next(args);
      };
    };
    var s3ExpressMiddlewareOptions = {
      name: "s3ExpressMiddleware",
      step: "build",
      tags: ["S3", "S3_EXPRESS"],
      override: true
    };
    var getS3ExpressPlugin = (options) => ({
      applyToStack: (clientStack) => {
        clientStack.add(s3ExpressMiddleware(options), s3ExpressMiddlewareOptions);
      }
    });
    var signS3Express = async (s3ExpressIdentity, signingOptions, request, sigV4MultiRegionSigner) => {
      const signedRequest = await sigV4MultiRegionSigner.signWithCredentials(request, s3ExpressIdentity, {});
      if (signedRequest.headers["X-Amz-Security-Token"] || signedRequest.headers["x-amz-security-token"]) {
        throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");
      }
      return signedRequest;
    };
    var defaultErrorHandler2 = (signingProperties) => (error3) => {
      throw error3;
    };
    var defaultSuccessHandler2 = (httpResponse, signingProperties) => {
    };
    var s3ExpressHttpSigningMiddlewareOptions = core.httpSigningMiddlewareOptions;
    var s3ExpressHttpSigningMiddleware = (config) => (next, context) => async (args) => {
      if (!protocolHttp.HttpRequest.isInstance(args.request)) {
        return next(args);
      }
      const smithyContext = utilMiddleware.getSmithyContext(context);
      const scheme = smithyContext.selectedHttpAuthScheme;
      if (!scheme) {
        throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
      }
      const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme;
      let request;
      if (context.s3ExpressIdentity) {
        request = await signS3Express(context.s3ExpressIdentity, signingProperties, args.request, await config.signer());
      } else {
        request = await signer.sign(args.request, identity, signingProperties);
      }
      const output = await next({
        ...args,
        request
      }).catch((signer.errorHandler || defaultErrorHandler2)(signingProperties));
      (signer.successHandler || defaultSuccessHandler2)(output.response, signingProperties);
      return output;
    };
    var getS3ExpressHttpSigningPlugin = (config) => ({
      applyToStack: (clientStack) => {
        clientStack.addRelativeTo(s3ExpressHttpSigningMiddleware(config), core.httpSigningMiddlewareOptions);
      }
    });
    var resolveS3Config = (input, { session }) => {
      const [s3ClientProvider, CreateSessionCommandCtor] = session;
      const { forcePathStyle, useAccelerateEndpoint, disableMultiregionAccessPoints, followRegionRedirects, s3ExpressIdentityProvider, bucketEndpoint, expectContinueHeader } = input;
      return Object.assign(input, {
        forcePathStyle: forcePathStyle ?? false,
        useAccelerateEndpoint: useAccelerateEndpoint ?? false,
        disableMultiregionAccessPoints: disableMultiregionAccessPoints ?? false,
        followRegionRedirects: followRegionRedirects ?? false,
        s3ExpressIdentityProvider: s3ExpressIdentityProvider ?? new S3ExpressIdentityProviderImpl(async (key) => s3ClientProvider().send(new CreateSessionCommandCtor({
          Bucket: key
        }))),
        bucketEndpoint: bucketEndpoint ?? false,
        expectContinueHeader: expectContinueHeader ?? 2097152
      });
    };
    var THROW_IF_EMPTY_BODY = {
      CopyObjectCommand: true,
      UploadPartCopyCommand: true,
      CompleteMultipartUploadCommand: true
    };
    var throw200ExceptionsMiddleware = (config) => (next, context) => async (args) => {
      const result = await next(args);
      const { response } = result;
      if (!protocolHttp.HttpResponse.isInstance(response)) {
        return result;
      }
      const { statusCode, body } = response;
      if (statusCode < 200 || statusCode >= 300) {
        return result;
      }
      const bodyBytes = await collectBody3(body, config);
      response.body = toStream.toStream(bodyBytes);
      if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) {
        const err = new Error("S3 aborted request");
        err.$metadata = {
          httpStatusCode: 503
        };
        err.name = "InternalError";
        throw err;
      }
      const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16));
      if (bodyStringTail && bodyStringTail.endsWith("</Error>")) {
        response.statusCode = 503;
      }
      return result;
    };
    var collectBody3 = (streamBody = new Uint8Array(), context) => {
      if (streamBody instanceof Uint8Array) {
        return Promise.resolve(streamBody);
      }
      return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
    };
    var throw200ExceptionsMiddlewareOptions = {
      relation: "after",
      toMiddleware: "deserializerMiddleware",
      tags: ["THROW_200_EXCEPTIONS", "S3"],
      name: "throw200ExceptionsMiddleware",
      override: true
    };
    var getThrow200ExceptionsPlugin = (config) => ({
      applyToStack: (clientStack) => {
        clientStack.addRelativeTo(throw200ExceptionsMiddleware(config), throw200ExceptionsMiddlewareOptions);
      }
    });
    function bucketEndpointMiddleware(options) {
      return (next, context) => async (args) => {
        if (options.bucketEndpoint) {
          const endpoint = context.endpointV2;
          if (endpoint) {
            const bucket = args.input.Bucket;
            if (typeof bucket === "string") {
              try {
                const bucketEndpointUrl = new URL(bucket);
                context.endpointV2 = {
                  ...endpoint,
                  url: bucketEndpointUrl
                };
              } catch (e5) {
                const warning = `@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${bucket} could not be parsed as URL.`;
                if (context.logger?.constructor?.name === "NoOpLogger") {
                  console.warn(warning);
                } else {
                  context.logger?.warn?.(warning);
                }
                throw e5;
              }
            }
          }
        }
        return next(args);
      };
    }
    var bucketEndpointMiddlewareOptions = {
      name: "bucketEndpointMiddleware",
      override: true,
      relation: "after",
      toMiddleware: "endpointV2Middleware"
    };
    function validateBucketNameMiddleware({ bucketEndpoint }) {
      return (next) => async (args) => {
        const { input: { Bucket } } = args;
        if (!bucketEndpoint && typeof Bucket === "string" && !utilArnParser.validate(Bucket) && Bucket.indexOf("/") >= 0) {
          const err = new Error(`Bucket name shouldn't contain '/', received '${Bucket}'`);
          err.name = "InvalidBucketName";
          throw err;
        }
        return next({ ...args });
      };
    }
    var validateBucketNameMiddlewareOptions = {
      step: "initialize",
      tags: ["VALIDATE_BUCKET_NAME"],
      name: "validateBucketNameMiddleware",
      override: true
    };
    var getValidateBucketNamePlugin = (options) => ({
      applyToStack: (clientStack) => {
        clientStack.add(validateBucketNameMiddleware(options), validateBucketNameMiddlewareOptions);
        clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions);
      }
    });
    var S3RestXmlProtocol = class extends protocols.AwsRestXmlProtocol {
      async serializeRequest(operationSchema, input, context) {
        const request = await super.serializeRequest(operationSchema, input, context);
        const ns = schema.NormalizedSchema.of(operationSchema.input);
        const staticStructureSchema = ns.getSchema();
        let bucketMemberIndex = 0;
        const requiredMemberCount = staticStructureSchema[6] ?? 0;
        if (input && typeof input === "object") {
          for (const [memberName, memberNs] of ns.structIterator()) {
            if (++bucketMemberIndex > requiredMemberCount) {
              break;
            }
            if (memberName === "Bucket") {
              if (!input.Bucket && memberNs.getMergedTraits().httpLabel) {
                throw new Error(`No value provided for input HTTP label: Bucket.`);
              }
              break;
            }
          }
        }
        return request;
      }
    };
    exports2.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS;
    exports2.S3ExpressIdentityCache = S3ExpressIdentityCache;
    exports2.S3ExpressIdentityCacheEntry = S3ExpressIdentityCacheEntry;
    exports2.S3ExpressIdentityProviderImpl = S3ExpressIdentityProviderImpl;
    exports2.S3RestXmlProtocol = S3RestXmlProtocol;
    exports2.SignatureV4S3Express = SignatureV4S3Express;
    exports2.checkContentLengthHeader = checkContentLengthHeader;
    exports2.checkContentLengthHeaderMiddlewareOptions = checkContentLengthHeaderMiddlewareOptions;
    exports2.getCheckContentLengthHeaderPlugin = getCheckContentLengthHeaderPlugin;
    exports2.getRegionRedirectMiddlewarePlugin = getRegionRedirectMiddlewarePlugin;
    exports2.getS3ExpiresMiddlewarePlugin = getS3ExpiresMiddlewarePlugin;
    exports2.getS3ExpressHttpSigningPlugin = getS3ExpressHttpSigningPlugin;
    exports2.getS3ExpressPlugin = getS3ExpressPlugin;
    exports2.getThrow200ExceptionsPlugin = getThrow200ExceptionsPlugin;
    exports2.getValidateBucketNamePlugin = getValidateBucketNamePlugin;
    exports2.regionRedirectEndpointMiddleware = regionRedirectEndpointMiddleware;
    exports2.regionRedirectEndpointMiddlewareOptions = regionRedirectEndpointMiddlewareOptions;
    exports2.regionRedirectMiddleware = regionRedirectMiddleware;
    exports2.regionRedirectMiddlewareOptions = regionRedirectMiddlewareOptions;
    exports2.resolveS3Config = resolveS3Config;
    exports2.s3ExpiresMiddleware = s3ExpiresMiddleware;
    exports2.s3ExpiresMiddlewareOptions = s3ExpiresMiddlewareOptions;
    exports2.s3ExpressHttpSigningMiddleware = s3ExpressHttpSigningMiddleware;
    exports2.s3ExpressHttpSigningMiddlewareOptions = s3ExpressHttpSigningMiddlewareOptions;
    exports2.s3ExpressMiddleware = s3ExpressMiddleware;
    exports2.s3ExpressMiddlewareOptions = s3ExpressMiddlewareOptions;
    exports2.throw200ExceptionsMiddleware = throw200ExceptionsMiddleware;
    exports2.throw200ExceptionsMiddlewareOptions = throw200ExceptionsMiddlewareOptions;
    exports2.validateBucketNameMiddleware = validateBucketNameMiddleware;
    exports2.validateBucketNameMiddlewareOptions = validateBucketNameMiddlewareOptions;
  }
});

// ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js
var require_dist_cjs51 = __commonJS({
  "../../node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js"(exports2) {
    "use strict";
    var middlewareSdkS3 = require_dist_cjs50();
    var signatureV4 = require_dist_cjs36();
    var signatureV4CrtContainer = {
      CrtSignerV4: null
    };
    var SignatureV4MultiRegion3 = class {
      sigv4aSigner;
      sigv4Signer;
      signerOptions;
      static sigv4aDependency() {
        if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") {
          return "crt";
        } else if (typeof signatureV4.signatureV4aContainer.SignatureV4a === "function") {
          return "js";
        }
        return "none";
      }
      constructor(options) {
        this.sigv4Signer = new middlewareSdkS3.SignatureV4S3Express(options);
        this.signerOptions = options;
      }
      async sign(requestToSign, options = {}) {
        if (options.signingRegion === "*") {
          return this.getSigv4aSigner().sign(requestToSign, options);
        }
        return this.sigv4Signer.sign(requestToSign, options);
      }
      async signWithCredentials(requestToSign, credentials, options = {}) {
        if (options.signingRegion === "*") {
          const signer = this.getSigv4aSigner();
          const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
          if (CrtSignerV4 && signer instanceof CrtSignerV4) {
            return signer.signWithCredentials(requestToSign, credentials, options);
          } else {
            throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);
          }
        }
        return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);
      }
      async presign(originalRequest, options = {}) {
        if (options.signingRegion === "*") {
          const signer = this.getSigv4aSigner();
          const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
          if (CrtSignerV4 && signer instanceof CrtSignerV4) {
            return signer.presign(originalRequest, options);
          } else {
            throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);
          }
        }
        return this.sigv4Signer.presign(originalRequest, options);
      }
      async presignWithCredentials(originalRequest, credentials, options = {}) {
        if (options.signingRegion === "*") {
          throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");
        }
        return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);
      }
      getSigv4aSigner() {
        if (!this.sigv4aSigner) {
          const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
          const JsSigV4aSigner = signatureV4.signatureV4aContainer.SignatureV4a;
          if (this.signerOptions.runtime === "node") {
            if (!CrtSignerV4 && !JsSigV4aSigner) {
              throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
            }
            if (CrtSignerV4 && typeof CrtSignerV4 === "function") {
              this.sigv4aSigner = new CrtSignerV4({
                ...this.signerOptions,
                signingAlgorithm: 1
              });
            } else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") {
              this.sigv4aSigner = new JsSigV4aSigner({
                ...this.signerOptions
              });
            } else {
              throw new Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
            }
          } else {
            if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") {
              throw new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");
            }
            this.sigv4aSigner = new JsSigV4aSigner({
              ...this.signerOptions
            });
          }
        }
        return this.sigv4aSigner;
      }
    };
    exports2.SignatureV4MultiRegion = SignatureV4MultiRegion3;
    exports2.signatureV4CrtContainer = signatureV4CrtContainer;
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/bdd.js
var import_util_endpoints10, q, a4, b4, c4, d4, e4, f4, g4, h4, i4, j4, k4, l2, m2, n, o, p, _data4, root4, r4, nodes4, bdd4;
var init_bdd4 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/bdd.js"() {
    import_util_endpoints10 = __toESM(require_dist_cjs20());
    q = "ref";
    a4 = -1;
    b4 = true;
    c4 = "isSet";
    d4 = "PartitionResult";
    e4 = "booleanEquals";
    f4 = "stringEquals";
    g4 = "getAttr";
    h4 = "us-east-1";
    i4 = "sigv4";
    j4 = "sts";
    k4 = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
    l2 = { [q]: "Endpoint" };
    m2 = { [q]: "Region" };
    n = { [q]: d4 };
    o = {};
    p = [m2];
    _data4 = {
      conditions: [
        [c4, [l2]],
        [c4, p],
        ["aws.partition", p, d4],
        [e4, [{ [q]: "UseFIPS" }, b4]],
        [e4, [{ [q]: "UseDualStack" }, b4]],
        [f4, [m2, "aws-global"]],
        [e4, [{ [q]: "UseGlobalEndpoint" }, b4]],
        [f4, [m2, "eu-central-1"]],
        [e4, [{ fn: g4, argv: [n, "supportsDualStack"] }, b4]],
        [e4, [{ fn: g4, argv: [n, "supportsFIPS"] }, b4]],
        [f4, [m2, "ap-south-1"]],
        [f4, [m2, "eu-north-1"]],
        [f4, [m2, "eu-west-1"]],
        [f4, [m2, "eu-west-2"]],
        [f4, [m2, "eu-west-3"]],
        [f4, [m2, "sa-east-1"]],
        [f4, [m2, h4]],
        [f4, [m2, "us-east-2"]],
        [f4, [m2, "us-west-2"]],
        [f4, [m2, "us-west-1"]],
        [f4, [m2, "ca-central-1"]],
        [f4, [m2, "ap-southeast-1"]],
        [f4, [m2, "ap-northeast-1"]],
        [f4, [m2, "ap-southeast-2"]],
        [f4, [{ fn: g4, argv: [n, "name"] }, "aws-us-gov"]]
      ],
      results: [
        [a4],
        ["https://sts.amazonaws.com", { authSchemes: [{ name: i4, signingName: j4, signingRegion: h4 }] }],
        [k4, { authSchemes: [{ name: i4, signingName: j4, signingRegion: "{Region}" }] }],
        [a4, "Invalid Configuration: FIPS and custom endpoint are not supported"],
        [a4, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
        [l2, o],
        ["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", o],
        [a4, "FIPS and DualStack are enabled, but this partition does not support one or both"],
        ["https://sts.{Region}.amazonaws.com", o],
        ["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", o],
        [a4, "FIPS is enabled but this partition does not support FIPS"],
        ["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", o],
        [a4, "DualStack is enabled but this partition does not support DualStack"],
        [k4, o],
        [a4, "Invalid Configuration: Missing Region"]
      ]
    };
    root4 = 2;
    r4 = 1e8;
    nodes4 = new Int32Array([
      -1,
      1,
      -1,
      0,
      30,
      3,
      1,
      4,
      r4 + 14,
      2,
      5,
      r4 + 14,
      3,
      25,
      6,
      4,
      24,
      7,
      5,
      r4 + 1,
      8,
      6,
      9,
      r4 + 13,
      7,
      r4 + 1,
      10,
      10,
      r4 + 1,
      11,
      11,
      r4 + 1,
      12,
      12,
      r4 + 1,
      13,
      13,
      r4 + 1,
      14,
      14,
      r4 + 1,
      15,
      15,
      r4 + 1,
      16,
      16,
      r4 + 1,
      17,
      17,
      r4 + 1,
      18,
      18,
      r4 + 1,
      19,
      19,
      r4 + 1,
      20,
      20,
      r4 + 1,
      21,
      21,
      r4 + 1,
      22,
      22,
      r4 + 1,
      23,
      23,
      r4 + 1,
      r4 + 2,
      8,
      r4 + 11,
      r4 + 12,
      4,
      28,
      26,
      9,
      27,
      r4 + 10,
      24,
      r4 + 8,
      r4 + 9,
      8,
      29,
      r4 + 7,
      9,
      r4 + 6,
      r4 + 7,
      3,
      r4 + 3,
      31,
      4,
      r4 + 4,
      r4 + 5
    ]);
    bdd4 = import_util_endpoints10.BinaryDecisionDiagram.from(nodes4, root4, _data4.conditions, _data4.results);
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js
var import_util_endpoints11, import_util_endpoints12, cache4, defaultEndpointResolver4;
var init_endpointResolver4 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js"() {
    import_util_endpoints11 = __toESM(require_dist_cjs21());
    import_util_endpoints12 = __toESM(require_dist_cjs20());
    init_bdd4();
    cache4 = new import_util_endpoints12.EndpointCache({
      size: 50,
      params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
    });
    defaultEndpointResolver4 = (endpointParams, context = {}) => {
      return cache4.get(endpointParams, () => (0, import_util_endpoints12.decideEndpoint)(bdd4, {
        endpointParams,
        logger: context.logger
      }));
    };
    import_util_endpoints12.customEndpointFunctions.aws = import_util_endpoints11.awsEndpointFunctions;
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js
function createAwsAuthSigv4HttpAuthOption4(authParameters) {
  return {
    schemeId: "aws.auth#sigv4",
    signingProperties: {
      name: "sts",
      region: authParameters.region
    },
    propertiesExtractor: (config, context) => ({
      signingProperties: {
        config,
        context
      }
    })
  };
}
function createAwsAuthSigv4aHttpAuthOption(authParameters) {
  return {
    schemeId: "aws.auth#sigv4a",
    signingProperties: {
      name: "sts",
      region: authParameters.region
    },
    propertiesExtractor: (config, context) => ({
      signingProperties: {
        config,
        context
      }
    })
  };
}
function createSmithyApiNoAuthHttpAuthOption4(authParameters) {
  return {
    schemeId: "smithy.api#noAuth"
  };
}
var import_signature_v4_multi_region, import_middleware_endpoint7, import_util_middleware9, createEndpointRuleSetHttpAuthSchemeParametersProvider, _defaultSTSHttpAuthSchemeParametersProvider, defaultSTSHttpAuthSchemeParametersProvider, createEndpointRuleSetHttpAuthSchemeProvider, _defaultSTSHttpAuthSchemeProvider, defaultSTSHttpAuthSchemeProvider, resolveStsAuthConfig, resolveHttpAuthSchemeConfig4;
var init_httpAuthSchemeProvider4 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js"() {
    init_httpAuthSchemes2();
    import_signature_v4_multi_region = __toESM(require_dist_cjs51());
    import_middleware_endpoint7 = __toESM(require_dist_cjs32());
    import_util_middleware9 = __toESM(require_dist_cjs6());
    init_endpointResolver4();
    init_STSClient();
    createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
      if (!input) {
        throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
      }
      const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
      const instructionsFn = (0, import_util_middleware9.getSmithyContext)(context)?.commandInstance?.constructor?.getEndpointParameterInstructions;
      if (!instructionsFn) {
        throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
      }
      const endpointParameters = await (0, import_middleware_endpoint7.resolveParams)(input, { getEndpointParameterInstructions: instructionsFn }, config);
      return Object.assign(defaultParameters, endpointParameters);
    };
    _defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
      return {
        operation: (0, import_util_middleware9.getSmithyContext)(context).operation,
        region: await (0, import_util_middleware9.normalizeProvider)(config.region)() || (() => {
          throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
        })()
      };
    };
    defaultSTSHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultSTSHttpAuthSchemeParametersProvider);
    createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver5, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
      const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
        const endpoint = defaultEndpointResolver5(authParameters);
        const authSchemes = endpoint.properties?.authSchemes;
        if (!authSchemes) {
          return defaultHttpAuthSchemeResolver(authParameters);
        }
        const options = [];
        for (const scheme of authSchemes) {
          const { name: resolvedName, properties = {}, ...rest } = scheme;
          const name = resolvedName.toLowerCase();
          if (resolvedName !== name) {
            console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);
          }
          let schemeId;
          if (name === "sigv4a") {
            schemeId = "aws.auth#sigv4a";
            const sigv4Present = authSchemes.find((s) => {
              const name2 = s.name.toLowerCase();
              return name2 !== "sigv4a" && name2.startsWith("sigv4");
            });
            if (import_signature_v4_multi_region.SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
              continue;
            }
          } else if (name.startsWith("sigv4")) {
            schemeId = "aws.auth#sigv4";
          } else {
            throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);
          }
          const createOption = createHttpAuthOptionFunctions[schemeId];
          if (!createOption) {
            throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);
          }
          const option = createOption(authParameters);
          option.schemeId = schemeId;
          option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties };
          options.push(option);
        }
        return options;
      };
      return endpointRuleSetHttpAuthSchemeProvider;
    };
    _defaultSTSHttpAuthSchemeProvider = (authParameters) => {
      const options = [];
      switch (authParameters.operation) {
        case "AssumeRoleWithWebIdentity": {
          options.push(createSmithyApiNoAuthHttpAuthOption4(authParameters));
          options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
          break;
        }
        default: {
          options.push(createAwsAuthSigv4HttpAuthOption4(authParameters));
          options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
        }
      }
      return options;
    };
    defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver4, _defaultSTSHttpAuthSchemeProvider, {
      "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption4,
      "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
      "smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption4
    });
    resolveStsAuthConfig = (input) => Object.assign(input, {
      stsClientCtor: STSClient
    });
    resolveHttpAuthSchemeConfig4 = (config) => {
      const config_0 = resolveStsAuthConfig(config);
      const config_1 = resolveAwsSdkSigV4Config(config_0);
      const config_2 = resolveAwsSdkSigV4AConfig(config_1);
      return Object.assign(config_2, {
        authSchemePreference: (0, import_util_middleware9.normalizeProvider)(config.authSchemePreference ?? [])
      });
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/EndpointParameters.js
var resolveClientEndpointParameters4, commonParams4;
var init_EndpointParameters4 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/EndpointParameters.js"() {
    resolveClientEndpointParameters4 = (options) => {
      return Object.assign(options, {
        useDualstackEndpoint: options.useDualstackEndpoint ?? false,
        useFipsEndpoint: options.useFipsEndpoint ?? false,
        useGlobalEndpoint: options.useGlobalEndpoint ?? false,
        defaultSigningName: "sts"
      });
    };
    commonParams4 = {
      UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
      UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
      Endpoint: { type: "builtInParams", name: "endpoint" },
      Region: { type: "builtInParams", name: "region" },
      UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js
var import_smithy_client29, STSServiceException;
var init_STSServiceException = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js"() {
    import_smithy_client29 = __toESM(require_dist_cjs34());
    STSServiceException = class _STSServiceException extends import_smithy_client29.ServiceException {
      constructor(options) {
        super(options);
        Object.setPrototypeOf(this, _STSServiceException.prototype);
      }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js
var ExpiredTokenException2, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, IDPRejectedClaimException, InvalidIdentityTokenException, IDPCommunicationErrorException;
var init_errors4 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js"() {
    init_STSServiceException();
    ExpiredTokenException2 = class _ExpiredTokenException extends STSServiceException {
      name = "ExpiredTokenException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "ExpiredTokenException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _ExpiredTokenException.prototype);
      }
    };
    MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException {
      name = "MalformedPolicyDocumentException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "MalformedPolicyDocumentException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype);
      }
    };
    PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException {
      name = "PackedPolicyTooLargeException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "PackedPolicyTooLargeException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype);
      }
    };
    RegionDisabledException = class _RegionDisabledException extends STSServiceException {
      name = "RegionDisabledException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "RegionDisabledException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _RegionDisabledException.prototype);
      }
    };
    IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException {
      name = "IDPRejectedClaimException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "IDPRejectedClaimException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype);
      }
    };
    InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException {
      name = "InvalidIdentityTokenException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "InvalidIdentityTokenException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype);
      }
    };
    IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException {
      name = "IDPCommunicationErrorException";
      $fault = "client";
      $retryable = {};
      constructor(opts) {
        super({
          name: "IDPCommunicationErrorException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype);
      }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js
var _A, _AKI, _AR, _ARI, _ARR, _ARRs, _ARU, _ARWWI, _ARWWIR, _ARWWIRs, _Au, _C, _CA, _DS, _E, _EI, _ETE2, _IDPCEE, _IDPRCE, _IITE, _K, _MPDE, _P, _PA, _PAr, _PC, _PCLT, _PCr, _PDT, _PI, _PPS, _PPTLE, _Pr, _RA, _RDE, _RSN, _SAK, _SFWIT, _SI, _SN, _ST, _T, _TC, _TTK, _Ta, _V, _WIT, _a, _aKST, _aQE, _c4, _cTT, _e4, _hE4, _m3, _pDLT, _s4, _tLT, n04, _s_registry4, STSServiceException$, n0_registry4, ExpiredTokenException$2, IDPCommunicationErrorException$, IDPRejectedClaimException$, InvalidIdentityTokenException$, MalformedPolicyDocumentException$, PackedPolicyTooLargeException$, RegionDisabledException$, errorTypeRegistries4, accessKeySecretType, clientTokenType, AssumedRoleUser$, AssumeRoleRequest$, AssumeRoleResponse$, AssumeRoleWithWebIdentityRequest$, AssumeRoleWithWebIdentityResponse$, Credentials$, PolicyDescriptorType$, ProvidedContext$, Tag$, policyDescriptorListType, ProvidedContextsListType, tagKeyListType, tagListType, AssumeRole$, AssumeRoleWithWebIdentity$;
var init_schemas_04 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js"() {
    init_schema();
    init_errors4();
    init_STSServiceException();
    _A = "Arn";
    _AKI = "AccessKeyId";
    _AR = "AssumeRole";
    _ARI = "AssumedRoleId";
    _ARR = "AssumeRoleRequest";
    _ARRs = "AssumeRoleResponse";
    _ARU = "AssumedRoleUser";
    _ARWWI = "AssumeRoleWithWebIdentity";
    _ARWWIR = "AssumeRoleWithWebIdentityRequest";
    _ARWWIRs = "AssumeRoleWithWebIdentityResponse";
    _Au = "Audience";
    _C = "Credentials";
    _CA = "ContextAssertion";
    _DS = "DurationSeconds";
    _E = "Expiration";
    _EI = "ExternalId";
    _ETE2 = "ExpiredTokenException";
    _IDPCEE = "IDPCommunicationErrorException";
    _IDPRCE = "IDPRejectedClaimException";
    _IITE = "InvalidIdentityTokenException";
    _K = "Key";
    _MPDE = "MalformedPolicyDocumentException";
    _P = "Policy";
    _PA = "PolicyArns";
    _PAr = "ProviderArn";
    _PC = "ProvidedContexts";
    _PCLT = "ProvidedContextsListType";
    _PCr = "ProvidedContext";
    _PDT = "PolicyDescriptorType";
    _PI = "ProviderId";
    _PPS = "PackedPolicySize";
    _PPTLE = "PackedPolicyTooLargeException";
    _Pr = "Provider";
    _RA = "RoleArn";
    _RDE = "RegionDisabledException";
    _RSN = "RoleSessionName";
    _SAK = "SecretAccessKey";
    _SFWIT = "SubjectFromWebIdentityToken";
    _SI = "SourceIdentity";
    _SN = "SerialNumber";
    _ST = "SessionToken";
    _T = "Tags";
    _TC = "TokenCode";
    _TTK = "TransitiveTagKeys";
    _Ta = "Tag";
    _V = "Value";
    _WIT = "WebIdentityToken";
    _a = "arn";
    _aKST = "accessKeySecretType";
    _aQE = "awsQueryError";
    _c4 = "client";
    _cTT = "clientTokenType";
    _e4 = "error";
    _hE4 = "httpError";
    _m3 = "message";
    _pDLT = "policyDescriptorListType";
    _s4 = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
    _tLT = "tagListType";
    n04 = "com.amazonaws.sts";
    _s_registry4 = TypeRegistry.for(_s4);
    STSServiceException$ = [-3, _s4, "STSServiceException", 0, [], []];
    _s_registry4.registerError(STSServiceException$, STSServiceException);
    n0_registry4 = TypeRegistry.for(n04);
    ExpiredTokenException$2 = [
      -3,
      n04,
      _ETE2,
      { [_aQE]: [`ExpiredTokenException`, 400], [_e4]: _c4, [_hE4]: 400 },
      [_m3],
      [0]
    ];
    n0_registry4.registerError(ExpiredTokenException$2, ExpiredTokenException2);
    IDPCommunicationErrorException$ = [
      -3,
      n04,
      _IDPCEE,
      { [_aQE]: [`IDPCommunicationError`, 400], [_e4]: _c4, [_hE4]: 400 },
      [_m3],
      [0]
    ];
    n0_registry4.registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
    IDPRejectedClaimException$ = [
      -3,
      n04,
      _IDPRCE,
      { [_aQE]: [`IDPRejectedClaim`, 403], [_e4]: _c4, [_hE4]: 403 },
      [_m3],
      [0]
    ];
    n0_registry4.registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
    InvalidIdentityTokenException$ = [
      -3,
      n04,
      _IITE,
      { [_aQE]: [`InvalidIdentityToken`, 400], [_e4]: _c4, [_hE4]: 400 },
      [_m3],
      [0]
    ];
    n0_registry4.registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
    MalformedPolicyDocumentException$ = [
      -3,
      n04,
      _MPDE,
      { [_aQE]: [`MalformedPolicyDocument`, 400], [_e4]: _c4, [_hE4]: 400 },
      [_m3],
      [0]
    ];
    n0_registry4.registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
    PackedPolicyTooLargeException$ = [
      -3,
      n04,
      _PPTLE,
      { [_aQE]: [`PackedPolicyTooLarge`, 400], [_e4]: _c4, [_hE4]: 400 },
      [_m3],
      [0]
    ];
    n0_registry4.registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
    RegionDisabledException$ = [
      -3,
      n04,
      _RDE,
      { [_aQE]: [`RegionDisabledException`, 403], [_e4]: _c4, [_hE4]: 403 },
      [_m3],
      [0]
    ];
    n0_registry4.registerError(RegionDisabledException$, RegionDisabledException);
    errorTypeRegistries4 = [_s_registry4, n0_registry4];
    accessKeySecretType = [0, n04, _aKST, 8, 0];
    clientTokenType = [0, n04, _cTT, 8, 0];
    AssumedRoleUser$ = [3, n04, _ARU, 0, [_ARI, _A], [0, 0], 2];
    AssumeRoleRequest$ = [
      3,
      n04,
      _ARR,
      0,
      [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
      [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
      2
    ];
    AssumeRoleResponse$ = [
      3,
      n04,
      _ARRs,
      0,
      [_C, _ARU, _PPS, _SI],
      [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0]
    ];
    AssumeRoleWithWebIdentityRequest$ = [
      3,
      n04,
      _ARWWIR,
      0,
      [_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
      [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
      3
    ];
    AssumeRoleWithWebIdentityResponse$ = [
      3,
      n04,
      _ARWWIRs,
      0,
      [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
      [[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0]
    ];
    Credentials$ = [
      3,
      n04,
      _C,
      0,
      [_AKI, _SAK, _ST, _E],
      [0, [() => accessKeySecretType, 0], 0, 4],
      4
    ];
    PolicyDescriptorType$ = [3, n04, _PDT, 0, [_a], [0]];
    ProvidedContext$ = [3, n04, _PCr, 0, [_PAr, _CA], [0, 0]];
    Tag$ = [3, n04, _Ta, 0, [_K, _V], [0, 0], 2];
    policyDescriptorListType = [1, n04, _pDLT, 0, () => PolicyDescriptorType$];
    ProvidedContextsListType = [1, n04, _PCLT, 0, () => ProvidedContext$];
    tagKeyListType = 64 | 0;
    tagListType = [1, n04, _tLT, 0, () => Tag$];
    AssumeRole$ = [9, n04, _AR, 0, () => AssumeRoleRequest$, () => AssumeRoleResponse$];
    AssumeRoleWithWebIdentity$ = [
      9,
      n04,
      _ARWWI,
      0,
      () => AssumeRoleWithWebIdentityRequest$,
      () => AssumeRoleWithWebIdentityResponse$
    ];
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js
var import_signature_v4_multi_region2, import_smithy_client30, import_url_parser5, import_util_base6411, import_util_utf811, getRuntimeConfig7;
var init_runtimeConfig_shared4 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js"() {
    init_httpAuthSchemes2();
    init_protocols2();
    import_signature_v4_multi_region2 = __toESM(require_dist_cjs51());
    init_dist_es();
    import_smithy_client30 = __toESM(require_dist_cjs34());
    import_url_parser5 = __toESM(require_dist_cjs18());
    import_util_base6411 = __toESM(require_dist_cjs10());
    import_util_utf811 = __toESM(require_dist_cjs9());
    init_httpAuthSchemeProvider4();
    init_endpointResolver4();
    init_schemas_04();
    getRuntimeConfig7 = (config) => {
      return {
        apiVersion: "2011-06-15",
        base64Decoder: config?.base64Decoder ?? import_util_base6411.fromBase64,
        base64Encoder: config?.base64Encoder ?? import_util_base6411.toBase64,
        disableHostPrefix: config?.disableHostPrefix ?? false,
        endpointProvider: config?.endpointProvider ?? defaultEndpointResolver4,
        extensions: config?.extensions ?? [],
        httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider,
        httpAuthSchemes: config?.httpAuthSchemes ?? [
          {
            schemeId: "aws.auth#sigv4",
            identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
            signer: new AwsSdkSigV4Signer()
          },
          {
            schemeId: "aws.auth#sigv4a",
            identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
            signer: new AwsSdkSigV4ASigner()
          },
          {
            schemeId: "smithy.api#noAuth",
            identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
            signer: new NoAuthSigner()
          }
        ],
        logger: config?.logger ?? new import_smithy_client30.NoOpLogger(),
        protocol: config?.protocol ?? AwsQueryProtocol,
        protocolSettings: config?.protocolSettings ?? {
          defaultNamespace: "com.amazonaws.sts",
          errorTypeRegistries: errorTypeRegistries4,
          xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
          version: "2011-06-15",
          serviceTarget: "AWSSecurityTokenServiceV20110615"
        },
        serviceId: config?.serviceId ?? "STS",
        signerConstructor: config?.signerConstructor ?? import_signature_v4_multi_region2.SignatureV4MultiRegion,
        urlParser: config?.urlParser ?? import_url_parser5.parseUrl,
        utf8Decoder: config?.utf8Decoder ?? import_util_utf811.fromUtf8,
        utf8Encoder: config?.utf8Encoder ?? import_util_utf811.toUtf8
      };
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js
var import_util_user_agent_node4, import_config_resolver7, import_hash_node4, import_middleware_retry7, import_node_config_provider4, import_node_http_handler4, import_smithy_client31, import_util_body_length_node4, import_util_defaults_mode_node4, import_util_retry5, getRuntimeConfig8;
var init_runtimeConfig4 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js"() {
    init_package();
    init_client();
    init_httpAuthSchemes2();
    import_util_user_agent_node4 = __toESM(require_dist_cjs40());
    import_config_resolver7 = __toESM(require_dist_cjs26());
    init_dist_es();
    import_hash_node4 = __toESM(require_dist_cjs41());
    import_middleware_retry7 = __toESM(require_dist_cjs35());
    import_node_config_provider4 = __toESM(require_dist_cjs30());
    import_node_http_handler4 = __toESM(require_dist_cjs13());
    import_smithy_client31 = __toESM(require_dist_cjs34());
    import_util_body_length_node4 = __toESM(require_dist_cjs42());
    import_util_defaults_mode_node4 = __toESM(require_dist_cjs43());
    import_util_retry5 = __toESM(require_dist_cjs23());
    init_runtimeConfig_shared4();
    getRuntimeConfig8 = (config) => {
      (0, import_smithy_client31.emitWarningIfUnsupportedVersion)(process.version);
      const defaultsMode = (0, import_util_defaults_mode_node4.resolveDefaultsModeConfig)(config);
      const defaultConfigProvider = () => defaultsMode().then(import_smithy_client31.loadConfigsForDefaultMode);
      const clientSharedValues = getRuntimeConfig7(config);
      emitWarningIfUnsupportedVersion(process.version);
      const loaderConfig = {
        profile: config?.profile,
        logger: clientSharedValues.logger
      };
      return {
        ...clientSharedValues,
        ...config,
        runtime: "node",
        defaultsMode,
        authSchemePreference: config?.authSchemePreference ?? (0, import_node_config_provider4.loadConfig)(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
        bodyLengthChecker: config?.bodyLengthChecker ?? import_util_body_length_node4.calculateBodyLength,
        defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, import_util_user_agent_node4.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }),
        httpAuthSchemes: config?.httpAuthSchemes ?? [
          {
            schemeId: "aws.auth#sigv4",
            identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),
            signer: new AwsSdkSigV4Signer()
          },
          {
            schemeId: "aws.auth#sigv4a",
            identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
            signer: new AwsSdkSigV4ASigner()
          },
          {
            schemeId: "smithy.api#noAuth",
            identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
            signer: new NoAuthSigner()
          }
        ],
        maxAttempts: config?.maxAttempts ?? (0, import_node_config_provider4.loadConfig)(import_middleware_retry7.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
        region: config?.region ?? (0, import_node_config_provider4.loadConfig)(import_config_resolver7.NODE_REGION_CONFIG_OPTIONS, { ...import_config_resolver7.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
        requestHandler: import_node_http_handler4.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
        retryMode: config?.retryMode ?? (0, import_node_config_provider4.loadConfig)({
          ...import_middleware_retry7.NODE_RETRY_MODE_CONFIG_OPTIONS,
          default: async () => (await defaultConfigProvider()).retryMode || import_util_retry5.DEFAULT_RETRY_MODE
        }, config),
        sha256: config?.sha256 ?? import_hash_node4.Hash.bind(null, "sha256"),
        sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, import_node_config_provider4.loadConfig)(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
        streamCollector: config?.streamCollector ?? import_node_http_handler4.streamCollector,
        useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, import_node_config_provider4.loadConfig)(import_config_resolver7.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
        useFipsEndpoint: config?.useFipsEndpoint ?? (0, import_node_config_provider4.loadConfig)(import_config_resolver7.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
        userAgentAppId: config?.userAgentAppId ?? (0, import_node_config_provider4.loadConfig)(import_util_user_agent_node4.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
      };
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthExtensionConfiguration.js
var getHttpAuthExtensionConfiguration4, resolveHttpAuthRuntimeConfig4;
var init_httpAuthExtensionConfiguration4 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthExtensionConfiguration.js"() {
    getHttpAuthExtensionConfiguration4 = (runtimeConfig) => {
      const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
      let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
      let _credentials = runtimeConfig.credentials;
      return {
        setHttpAuthScheme(httpAuthScheme) {
          const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
          if (index === -1) {
            _httpAuthSchemes.push(httpAuthScheme);
          } else {
            _httpAuthSchemes.splice(index, 1, httpAuthScheme);
          }
        },
        httpAuthSchemes() {
          return _httpAuthSchemes;
        },
        setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
          _httpAuthSchemeProvider = httpAuthSchemeProvider;
        },
        httpAuthSchemeProvider() {
          return _httpAuthSchemeProvider;
        },
        setCredentials(credentials) {
          _credentials = credentials;
        },
        credentials() {
          return _credentials;
        }
      };
    };
    resolveHttpAuthRuntimeConfig4 = (config) => {
      return {
        httpAuthSchemes: config.httpAuthSchemes(),
        httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
        credentials: config.credentials()
      };
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js
var import_region_config_resolver4, import_protocol_http15, import_smithy_client32, resolveRuntimeExtensions4;
var init_runtimeExtensions4 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js"() {
    import_region_config_resolver4 = __toESM(require_dist_cjs45());
    import_protocol_http15 = __toESM(require_dist_cjs2());
    import_smithy_client32 = __toESM(require_dist_cjs34());
    init_httpAuthExtensionConfiguration4();
    resolveRuntimeExtensions4 = (runtimeConfig, extensions) => {
      const extensionConfiguration = Object.assign((0, import_region_config_resolver4.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client32.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http15.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration4(runtimeConfig));
      extensions.forEach((extension) => extension.configure(extensionConfiguration));
      return Object.assign(runtimeConfig, (0, import_region_config_resolver4.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client32.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http15.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig4(extensionConfiguration));
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js
var import_middleware_host_header4, import_middleware_logger4, import_middleware_recursion_detection4, import_middleware_user_agent4, import_config_resolver8, import_middleware_content_length4, import_middleware_endpoint8, import_middleware_retry8, import_smithy_client33, STSClient;
var init_STSClient = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js"() {
    import_middleware_host_header4 = __toESM(require_dist_cjs3());
    import_middleware_logger4 = __toESM(require_dist_cjs4());
    import_middleware_recursion_detection4 = __toESM(require_dist_cjs5());
    import_middleware_user_agent4 = __toESM(require_dist_cjs24());
    import_config_resolver8 = __toESM(require_dist_cjs26());
    init_dist_es();
    init_schema();
    import_middleware_content_length4 = __toESM(require_dist_cjs27());
    import_middleware_endpoint8 = __toESM(require_dist_cjs32());
    import_middleware_retry8 = __toESM(require_dist_cjs35());
    import_smithy_client33 = __toESM(require_dist_cjs34());
    init_httpAuthSchemeProvider4();
    init_EndpointParameters4();
    init_runtimeConfig4();
    init_runtimeExtensions4();
    STSClient = class extends import_smithy_client33.Client {
      config;
      constructor(...[configuration]) {
        const _config_0 = getRuntimeConfig8(configuration || {});
        super(_config_0);
        this.initConfig = _config_0;
        const _config_1 = resolveClientEndpointParameters4(_config_0);
        const _config_2 = (0, import_middleware_user_agent4.resolveUserAgentConfig)(_config_1);
        const _config_3 = (0, import_middleware_retry8.resolveRetryConfig)(_config_2);
        const _config_4 = (0, import_config_resolver8.resolveRegionConfig)(_config_3);
        const _config_5 = (0, import_middleware_host_header4.resolveHostHeaderConfig)(_config_4);
        const _config_6 = (0, import_middleware_endpoint8.resolveEndpointConfig)(_config_5);
        const _config_7 = resolveHttpAuthSchemeConfig4(_config_6);
        const _config_8 = resolveRuntimeExtensions4(_config_7, configuration?.extensions || []);
        this.config = _config_8;
        this.middlewareStack.use(getSchemaSerdePlugin(this.config));
        this.middlewareStack.use((0, import_middleware_user_agent4.getUserAgentPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_retry8.getRetryPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_content_length4.getContentLengthPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_host_header4.getHostHeaderPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_logger4.getLoggerPlugin)(this.config));
        this.middlewareStack.use((0, import_middleware_recursion_detection4.getRecursionDetectionPlugin)(this.config));
        this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
          httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
          identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
            "aws.auth#sigv4": config.credentials,
            "aws.auth#sigv4a": config.credentials
          })
        }));
        this.middlewareStack.use(getHttpSigningPlugin(this.config));
      }
      destroy() {
        super.destroy();
      }
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js
var import_middleware_endpoint9, import_smithy_client34, AssumeRoleCommand;
var init_AssumeRoleCommand = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js"() {
    import_middleware_endpoint9 = __toESM(require_dist_cjs32());
    import_smithy_client34 = __toESM(require_dist_cjs34());
    init_EndpointParameters4();
    init_schemas_04();
    AssumeRoleCommand = class extends import_smithy_client34.Command.classBuilder().ep(commonParams4).m(function(Command, cs, config, o2) {
      return [(0, import_middleware_endpoint9.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())];
    }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(AssumeRole$).build() {
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js
var import_middleware_endpoint10, import_smithy_client35, AssumeRoleWithWebIdentityCommand;
var init_AssumeRoleWithWebIdentityCommand = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js"() {
    import_middleware_endpoint10 = __toESM(require_dist_cjs32());
    import_smithy_client35 = __toESM(require_dist_cjs34());
    init_EndpointParameters4();
    init_schemas_04();
    AssumeRoleWithWebIdentityCommand = class extends import_smithy_client35.Command.classBuilder().ep(commonParams4).m(function(Command, cs, config, o2) {
      return [(0, import_middleware_endpoint10.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())];
    }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(AssumeRoleWithWebIdentity$).build() {
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js
var import_smithy_client36, commands4, STS;
var init_STS = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js"() {
    import_smithy_client36 = __toESM(require_dist_cjs34());
    init_AssumeRoleCommand();
    init_AssumeRoleWithWebIdentityCommand();
    init_STSClient();
    commands4 = {
      AssumeRoleCommand,
      AssumeRoleWithWebIdentityCommand
    };
    STS = class extends STSClient {
    };
    (0, import_smithy_client36.createAggregatedClient)(commands4, STS);
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/index.js
var init_commands4 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/index.js"() {
    init_AssumeRoleCommand();
    init_AssumeRoleWithWebIdentityCommand();
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/models_0.js
var init_models_04 = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/models_0.js"() {
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js
var import_region_config_resolver5, getAccountIdFromAssumedRoleUser, resolveRegion, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity, isH2;
var init_defaultStsRoleAssumers = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js"() {
    init_client();
    import_region_config_resolver5 = __toESM(require_dist_cjs45());
    init_AssumeRoleCommand();
    init_AssumeRoleWithWebIdentityCommand();
    getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
      if (typeof assumedRoleUser?.Arn === "string") {
        const arnComponents = assumedRoleUser.Arn.split(":");
        if (arnComponents.length > 4 && arnComponents[4] !== "") {
          return arnComponents[4];
        }
      }
      return void 0;
    };
    resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
      const region = typeof _region === "function" ? await _region() : _region;
      const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
      let stsDefaultRegion = "";
      const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await (0, import_region_config_resolver5.stsRegionDefaultResolver)(loaderConfig)());
      credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
      return resolvedRegion;
    };
    getDefaultRoleAssumer = (stsOptions, STSClient2) => {
      let stsClient;
      let closureSourceCreds;
      return async (sourceCreds, params) => {
        closureSourceCreds = sourceCreds;
        if (!stsClient) {
          const { logger: logger2 = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
          const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
            logger: logger2,
            profile
          });
          const isCompatibleRequestHandler = !isH2(requestHandler);
          stsClient = new STSClient2({
            ...stsOptions,
            userAgentAppId,
            profile,
            credentialDefaultProvider: () => async () => closureSourceCreds,
            region: resolvedRegion,
            requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
            logger: logger2
          });
        }
        const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
        if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
          throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
        }
        const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
        const credentials = {
          accessKeyId: Credentials.AccessKeyId,
          secretAccessKey: Credentials.SecretAccessKey,
          sessionToken: Credentials.SessionToken,
          expiration: Credentials.Expiration,
          ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
          ...accountId && { accountId }
        };
        setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
        return credentials;
      };
    };
    getDefaultRoleAssumerWithWebIdentity = (stsOptions, STSClient2) => {
      let stsClient;
      return async (params) => {
        if (!stsClient) {
          const { logger: logger2 = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
          const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
            logger: logger2,
            profile
          });
          const isCompatibleRequestHandler = !isH2(requestHandler);
          stsClient = new STSClient2({
            ...stsOptions,
            userAgentAppId,
            profile,
            region: resolvedRegion,
            requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
            logger: logger2
          });
        }
        const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
        if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
          throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
        }
        const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
        const credentials = {
          accessKeyId: Credentials.AccessKeyId,
          secretAccessKey: Credentials.SecretAccessKey,
          sessionToken: Credentials.SessionToken,
          expiration: Credentials.Expiration,
          ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
          ...accountId && { accountId }
        };
        if (accountId) {
          setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
        }
        setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
        return credentials;
      };
    };
    isH2 = (requestHandler) => {
      return requestHandler?.metadata?.handlerProtocol === "h2";
    };
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js
var getCustomizableStsClientCtor, getDefaultRoleAssumer2, getDefaultRoleAssumerWithWebIdentity2, decorateDefaultCredentialProvider;
var init_defaultRoleAssumers = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js"() {
    init_defaultStsRoleAssumers();
    init_STSClient();
    getCustomizableStsClientCtor = (baseCtor, customizations) => {
      if (!customizations)
        return baseCtor;
      else
        return class CustomizableSTSClient extends baseCtor {
          constructor(config) {
            super(config);
            for (const customization of customizations) {
              this.middlewareStack.use(customization);
            }
          }
        };
    };
    getDefaultRoleAssumer2 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
    getDefaultRoleAssumerWithWebIdentity2 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
    decorateDefaultCredentialProvider = (provider) => (input) => provider({
      roleAssumer: getDefaultRoleAssumer2(input),
      roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input),
      ...input
    });
  }
});

// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/index.js
var sts_exports = {};
__export(sts_exports, {
  AssumeRole$: () => AssumeRole$,
  AssumeRoleCommand: () => AssumeRoleCommand,
  AssumeRoleRequest$: () => AssumeRoleRequest$,
  AssumeRoleResponse$: () => AssumeRoleResponse$,
  AssumeRoleWithWebIdentity$: () => AssumeRoleWithWebIdentity$,
  AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand,
  AssumeRoleWithWebIdentityRequest$: () => AssumeRoleWithWebIdentityRequest$,
  AssumeRoleWithWebIdentityResponse$: () => AssumeRoleWithWebIdentityResponse$,
  AssumedRoleUser$: () => AssumedRoleUser$,
  Credentials$: () => Credentials$,
  ExpiredTokenException: () => ExpiredTokenException2,
  ExpiredTokenException$: () => ExpiredTokenException$2,
  IDPCommunicationErrorException: () => IDPCommunicationErrorException,
  IDPCommunicationErrorException$: () => IDPCommunicationErrorException$,
  IDPRejectedClaimException: () => IDPRejectedClaimException,
  IDPRejectedClaimException$: () => IDPRejectedClaimException$,
  InvalidIdentityTokenException: () => InvalidIdentityTokenException,
  InvalidIdentityTokenException$: () => InvalidIdentityTokenException$,
  MalformedPolicyDocumentException: () => MalformedPolicyDocumentException,
  MalformedPolicyDocumentException$: () => MalformedPolicyDocumentException$,
  PackedPolicyTooLargeException: () => PackedPolicyTooLargeException,
  PackedPolicyTooLargeException$: () => PackedPolicyTooLargeException$,
  PolicyDescriptorType$: () => PolicyDescriptorType$,
  ProvidedContext$: () => ProvidedContext$,
  RegionDisabledException: () => RegionDisabledException,
  RegionDisabledException$: () => RegionDisabledException$,
  STS: () => STS,
  STSClient: () => STSClient,
  STSServiceException: () => STSServiceException,
  STSServiceException$: () => STSServiceException$,
  Tag$: () => Tag$,
  __Client: () => import_smithy_client33.Client,
  decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider,
  errorTypeRegistries: () => errorTypeRegistries4,
  getDefaultRoleAssumer: () => getDefaultRoleAssumer2,
  getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2
});
var init_sts = __esm({
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/index.js"() {
    init_STSClient();
    init_STS();
    init_commands4();
    init_schemas_04();
    init_errors4();
    init_models_04();
    init_defaultRoleAssumers();
    init_STSServiceException();
  }
});

// ../../node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js
var require_dist_cjs52 = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js"(exports2) {
    "use strict";
    var sharedIniFileLoader = require_dist_cjs29();
    var propertyProvider = require_dist_cjs28();
    var node_child_process = require("node:child_process");
    var node_util = require("node:util");
    var client = (init_client(), __toCommonJS(client_exports));
    var getValidatedProcessCredentials = (profileName, data2, profiles) => {
      if (data2.Version !== 1) {
        throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
      }
      if (data2.AccessKeyId === void 0 || data2.SecretAccessKey === void 0) {
        throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
      }
      if (data2.Expiration) {
        const currentTime = /* @__PURE__ */ new Date();
        const expireTime = new Date(data2.Expiration);
        if (expireTime < currentTime) {
          throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
        }
      }
      let accountId = data2.AccountId;
      if (!accountId && profiles?.[profileName]?.aws_account_id) {
        accountId = profiles[profileName].aws_account_id;
      }
      const credentials = {
        accessKeyId: data2.AccessKeyId,
        secretAccessKey: data2.SecretAccessKey,
        ...data2.SessionToken && { sessionToken: data2.SessionToken },
        ...data2.Expiration && { expiration: new Date(data2.Expiration) },
        ...data2.CredentialScope && { credentialScope: data2.CredentialScope },
        ...accountId && { accountId }
      };
      client.setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
      return credentials;
    };
    var resolveProcessCredentials = async (profileName, profiles, logger2) => {
      const profile = profiles[profileName];
      if (profiles[profileName]) {
        const credentialProcess = profile["credential_process"];
        if (credentialProcess !== void 0) {
          const execPromise = node_util.promisify(sharedIniFileLoader.externalDataInterceptor?.getTokenRecord?.().exec ?? node_child_process.exec);
          try {
            const { stdout } = await execPromise(credentialProcess);
            let data2;
            try {
              data2 = JSON.parse(stdout.trim());
            } catch {
              throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
            }
            return getValidatedProcessCredentials(profileName, data2, profiles);
          } catch (error3) {
            throw new propertyProvider.CredentialsProviderError(error3.message, { logger: logger2 });
          }
        } else {
          throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger: logger2 });
        }
      } else {
        throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
          logger: logger2
        });
      }
    };
    var fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
      init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
      const profiles = await sharedIniFileLoader.parseKnownFiles(init);
      return resolveProcessCredentials(sharedIniFileLoader.getProfileName({
        profile: init.profile ?? callerClientConfig?.profile
      }), profiles, init.logger);
    };
    exports2.fromProcess = fromProcess;
  }
});

// ../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js
var require_fromWebToken = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js"(exports2) {
    "use strict";
    var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m3, k5, k22) {
      if (k22 === void 0) k22 = k5;
      var desc = Object.getOwnPropertyDescriptor(m3, k5);
      if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m3[k5];
        } };
      }
      Object.defineProperty(o2, k22, desc);
    }) : (function(o2, m3, k5, k22) {
      if (k22 === void 0) k22 = k5;
      o2[k22] = m3[k5];
    }));
    var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o2, v) {
      Object.defineProperty(o2, "default", { enumerable: true, value: v });
    }) : function(o2, v) {
      o2["default"] = v;
    });
    var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
      var ownKeys2 = function(o2) {
        ownKeys2 = Object.getOwnPropertyNames || function(o3) {
          var ar = [];
          for (var k5 in o3) if (Object.prototype.hasOwnProperty.call(o3, k5)) ar[ar.length] = k5;
          return ar;
        };
        return ownKeys2(o2);
      };
      return function(mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) {
          for (var k5 = ownKeys2(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding2(result, mod, k5[i5]);
        }
        __setModuleDefault2(result, mod);
        return result;
      };
    })();
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.fromWebToken = void 0;
    var fromWebToken = (init) => async (awsIdentityProperties) => {
      init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
      const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
      let { roleAssumerWithWebIdentity } = init;
      if (!roleAssumerWithWebIdentity) {
        const { getDefaultRoleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity3 } = await Promise.resolve().then(() => __importStar2((init_sts(), __toCommonJS(sts_exports))));
        roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity3({
          ...init.clientConfig,
          credentialProviderLogger: init.logger,
          parentClientConfig: {
            ...awsIdentityProperties?.callerClientConfig,
            ...init.parentClientConfig
          }
        }, init.clientPlugins);
      }
      return roleAssumerWithWebIdentity({
        RoleArn: roleArn,
        RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,
        WebIdentityToken: webIdentityToken,
        ProviderId: providerId,
        PolicyArns: policyArns,
        Policy: policy,
        DurationSeconds: durationSeconds
      });
    };
    exports2.fromWebToken = fromWebToken;
  }
});

// ../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js
var require_fromTokenFile = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.fromTokenFile = void 0;
    var client_1 = (init_client(), __toCommonJS(client_exports));
    var property_provider_1 = require_dist_cjs28();
    var shared_ini_file_loader_1 = require_dist_cjs29();
    var node_fs_1 = require("node:fs");
    var fromWebToken_1 = require_fromWebToken();
    var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
    var ENV_ROLE_ARN = "AWS_ROLE_ARN";
    var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
    var fromTokenFile = (init = {}) => async (awsIdentityProperties) => {
      init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");
      const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];
      const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];
      const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];
      if (!webIdentityTokenFile || !roleArn) {
        throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified", {
          logger: init.logger
        });
      }
      const credentials = await (0, fromWebToken_1.fromWebToken)({
        ...init,
        webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? (0, node_fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
        roleArn,
        roleSessionName
      })(awsIdentityProperties);
      if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
        (0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
      }
      return credentials;
    };
    exports2.fromTokenFile = fromTokenFile;
  }
});

// ../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js
var require_dist_cjs53 = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2) {
    "use strict";
    var fromTokenFile = require_fromTokenFile();
    var fromWebToken = require_fromWebToken();
    Object.prototype.hasOwnProperty.call(fromTokenFile, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: fromTokenFile["__proto__"]
    });
    Object.keys(fromTokenFile).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = fromTokenFile[k5];
    });
    Object.prototype.hasOwnProperty.call(fromWebToken, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: fromWebToken["__proto__"]
    });
    Object.keys(fromWebToken).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = fromWebToken[k5];
    });
  }
});

// ../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js
var require_dist_cjs54 = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports2) {
    "use strict";
    var sharedIniFileLoader = require_dist_cjs29();
    var propertyProvider = require_dist_cjs28();
    var client = (init_client(), __toCommonJS(client_exports));
    var credentialProviderLogin = require_dist_cjs48();
    var resolveCredentialSource = (credentialSource, profileName, logger2) => {
      const sourceProvidersMap = {
        EcsContainer: async (options) => {
          const { fromHttp } = await Promise.resolve().then(() => __toESM(require_dist_cjs39()));
          const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs38()));
          logger2?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
          return async () => propertyProvider.chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
        },
        Ec2InstanceMetadata: async (options) => {
          logger2?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
          const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs38()));
          return async () => fromInstanceMetadata(options)().then(setNamedProvider);
        },
        Environment: async (options) => {
          logger2?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
          const { fromEnv } = await Promise.resolve().then(() => __toESM(require_dist_cjs37()));
          return async () => fromEnv(options)().then(setNamedProvider);
        }
      };
      if (credentialSource in sourceProvidersMap) {
        return sourceProvidersMap[credentialSource];
      } else {
        throw new propertyProvider.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger: logger2 });
      }
    };
    var setNamedProvider = (creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
    var isAssumeRoleProfile = (arg, { profile = "default", logger: logger2 } = {}) => {
      return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger: logger2 }) || isCredentialSourceProfile(arg, { profile, logger: logger2 }));
    };
    var isAssumeRoleWithSourceProfile = (arg, { profile, logger: logger2 }) => {
      const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
      if (withSourceProfile) {
        logger2?.debug?.(`    ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
      }
      return withSourceProfile;
    };
    var isCredentialSourceProfile = (arg, { profile, logger: logger2 }) => {
      const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
      if (withProviderProfile) {
        logger2?.debug?.(`    ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
      }
      return withProviderProfile;
    };
    var resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData2) => {
      options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
      const profileData = profiles[profileName];
      const { source_profile, region } = profileData;
      if (!options.roleAssumer) {
        const { getDefaultRoleAssumer: getDefaultRoleAssumer3 } = await Promise.resolve().then(() => (init_sts(), sts_exports));
        options.roleAssumer = getDefaultRoleAssumer3({
          ...options.clientConfig,
          credentialProviderLogger: options.logger,
          parentClientConfig: {
            ...callerClientConfig,
            ...options?.parentClientConfig,
            region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region
          }
        }, options.clientPlugins);
      }
      if (source_profile && source_profile in visitedProfiles) {
        throw new propertyProvider.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${sharedIniFileLoader.getProfileName(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), { logger: options.logger });
      }
      options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
      const sourceCredsProvider = source_profile ? resolveProfileData2(source_profile, profiles, options, callerClientConfig, {
        ...visitedProfiles,
        [source_profile]: true
      }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();
      if (isCredentialSourceWithoutRoleArn(profileData)) {
        return sourceCredsProvider.then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
      } else {
        const params = {
          RoleArn: profileData.role_arn,
          RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,
          ExternalId: profileData.external_id,
          DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10)
        };
        const { mfa_serial } = profileData;
        if (mfa_serial) {
          if (!options.mfaCodeProvider) {
            throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
          }
          params.SerialNumber = mfa_serial;
          params.TokenCode = await options.mfaCodeProvider(mfa_serial);
        }
        const sourceCreds = await sourceCredsProvider;
        return options.roleAssumer(sourceCreds, params).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
      }
    };
    var isCredentialSourceWithoutRoleArn = (section) => {
      return !section.role_arn && !!section.credential_source;
    };
    var isLoginProfile = (data2) => {
      return Boolean(data2 && data2.login_session);
    };
    var resolveLoginCredentials = async (profileName, options, callerClientConfig) => {
      const credentials = await credentialProviderLogin.fromLoginCredentials({
        ...options,
        profile: profileName
      })({ callerClientConfig });
      return client.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
    };
    var isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
    var resolveProcessCredentials = async (options, profile) => Promise.resolve().then(() => __toESM(require_dist_cjs52())).then(({ fromProcess }) => fromProcess({
      ...options,
      profile
    })().then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v")));
    var resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
      const { fromSSO } = await Promise.resolve().then(() => __toESM(require_dist_cjs47()));
      return fromSSO({
        profile,
        logger: options.logger,
        parentClientConfig: options.parentClientConfig,
        clientConfig: options.clientConfig
      })({
        callerClientConfig
      }).then((creds) => {
        if (profileData.sso_session) {
          return client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
        } else {
          return client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
        }
      });
    };
    var isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string");
    var isStaticCredsProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1;
    var resolveStaticCredentials = async (profile, options) => {
      options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
      const credentials = {
        accessKeyId: profile.aws_access_key_id,
        secretAccessKey: profile.aws_secret_access_key,
        sessionToken: profile.aws_session_token,
        ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },
        ...profile.aws_account_id && { accountId: profile.aws_account_id }
      };
      return client.setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
    };
    var isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
    var resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => Promise.resolve().then(() => __toESM(require_dist_cjs53())).then(({ fromTokenFile }) => fromTokenFile({
      webIdentityTokenFile: profile.web_identity_token_file,
      roleArn: profile.role_arn,
      roleSessionName: profile.role_session_name,
      roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
      logger: options.logger,
      parentClientConfig: options.parentClientConfig
    })({
      callerClientConfig
    }).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")));
    var resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
      const data2 = profiles[profileName];
      if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data2)) {
        return resolveStaticCredentials(data2, options);
      }
      if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data2, { profile: profileName, logger: options.logger })) {
        return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);
      }
      if (isStaticCredsProfile(data2)) {
        return resolveStaticCredentials(data2, options);
      }
      if (isWebIdentityProfile(data2)) {
        return resolveWebIdentityCredentials(data2, options, callerClientConfig);
      }
      if (isProcessProfile(data2)) {
        return resolveProcessCredentials(options, profileName);
      }
      if (isSsoProfile(data2)) {
        return await resolveSsoCredentials(profileName, data2, options, callerClientConfig);
      }
      if (isLoginProfile(data2)) {
        return resolveLoginCredentials(profileName, options, callerClientConfig);
      }
      throw new propertyProvider.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
    };
    var fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
      init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
      const profiles = await sharedIniFileLoader.parseKnownFiles(init);
      return resolveProfileData(sharedIniFileLoader.getProfileName({
        profile: init.profile ?? callerClientConfig?.profile
      }), profiles, init, callerClientConfig);
    };
    exports2.fromIni = fromIni;
  }
});

// ../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js
var require_dist_cjs55 = __commonJS({
  "../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports2) {
    "use strict";
    var credentialProviderEnv = require_dist_cjs37();
    var propertyProvider = require_dist_cjs28();
    var sharedIniFileLoader = require_dist_cjs29();
    var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
    var remoteProvider = async (init) => {
      const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs38()));
      if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
        init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");
        const { fromHttp } = await Promise.resolve().then(() => __toESM(require_dist_cjs39()));
        return propertyProvider.chain(fromHttp(init), fromContainerMetadata(init));
      }
      if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") {
        return async () => {
          throw new propertyProvider.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger });
        };
      }
      init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata");
      return fromInstanceMetadata(init);
    };
    function memoizeChain(providers, treatAsExpired) {
      const chain = internalCreateChain(providers);
      let activeLock;
      let passiveLock;
      let credentials;
      const provider = async (options) => {
        if (options?.forceRefresh) {
          return await chain(options);
        }
        if (credentials?.expiration) {
          if (credentials?.expiration?.getTime() < Date.now()) {
            credentials = void 0;
          }
        }
        if (activeLock) {
          await activeLock;
        } else if (!credentials || treatAsExpired?.(credentials)) {
          if (credentials) {
            if (!passiveLock) {
              passiveLock = chain(options).then((c5) => {
                credentials = c5;
              }).finally(() => {
                passiveLock = void 0;
              });
            }
          } else {
            activeLock = chain(options).then((c5) => {
              credentials = c5;
            }).finally(() => {
              activeLock = void 0;
            });
            return provider(options);
          }
        }
        return credentials;
      };
      return provider;
    }
    var internalCreateChain = (providers) => async (awsIdentityProperties) => {
      let lastProviderError;
      for (const provider of providers) {
        try {
          return await provider(awsIdentityProperties);
        } catch (err) {
          lastProviderError = err;
          if (err?.tryNextLink) {
            continue;
          }
          throw err;
        }
      }
      throw lastProviderError;
    };
    var multipleCredentialSourceWarningEmitted = false;
    var defaultProvider = (init = {}) => memoizeChain([
      async () => {
        const profile = init.profile ?? process.env[sharedIniFileLoader.ENV_PROFILE];
        if (profile) {
          const envStaticCredentialsAreSet = process.env[credentialProviderEnv.ENV_KEY] && process.env[credentialProviderEnv.ENV_SECRET];
          if (envStaticCredentialsAreSet) {
            if (!multipleCredentialSourceWarningEmitted) {
              const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn.bind(init.logger) : console.warn;
              warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
    Multiple credential sources detected: 
    Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
    This SDK will proceed with the AWS_PROFILE value.
    
    However, a future version may change this behavior to prefer the ENV static credentials.
    Please ensure that your environment only sets either the AWS_PROFILE or the
    AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
`);
              multipleCredentialSourceWarningEmitted = true;
            }
          }
          throw new propertyProvider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
            logger: init.logger,
            tryNextLink: true
          });
        }
        init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
        return credentialProviderEnv.fromEnv(init)();
      },
      async (awsIdentityProperties) => {
        init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
        const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
        if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
          throw new propertyProvider.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
        }
        const { fromSSO } = await Promise.resolve().then(() => __toESM(require_dist_cjs47()));
        return fromSSO(init)(awsIdentityProperties);
      },
      async (awsIdentityProperties) => {
        init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
        const { fromIni } = await Promise.resolve().then(() => __toESM(require_dist_cjs54()));
        return fromIni(init)(awsIdentityProperties);
      },
      async (awsIdentityProperties) => {
        init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
        const { fromProcess } = await Promise.resolve().then(() => __toESM(require_dist_cjs52()));
        return fromProcess(init)(awsIdentityProperties);
      },
      async (awsIdentityProperties) => {
        init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");
        const { fromTokenFile } = await Promise.resolve().then(() => __toESM(require_dist_cjs53()));
        return fromTokenFile(init)(awsIdentityProperties);
      },
      async () => {
        init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider");
        return (await remoteProvider(init))();
      },
      async () => {
        throw new propertyProvider.CredentialsProviderError("Could not load credentials from any providers", {
          tryNextLink: false,
          logger: init.logger
        });
      }
    ], credentialsTreatedAsExpired);
    var credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== void 0;
    var credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5;
    exports2.credentialsTreatedAsExpired = credentialsTreatedAsExpired;
    exports2.credentialsWillNeedRefresh = credentialsWillNeedRefresh;
    exports2.defaultProvider = defaultProvider;
  }
});

// ../../node_modules/@aws-sdk/client-iot/dist-cjs/endpoint/bdd.js
var require_bdd = __commonJS({
  "../../node_modules/@aws-sdk/client-iot/dist-cjs/endpoint/bdd.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.bdd = void 0;
    var util_endpoints_1 = require_dist_cjs20();
    var m3 = "ref";
    var a5 = -1;
    var b5 = true;
    var c5 = "isSet";
    var d5 = "PartitionResult";
    var e5 = "booleanEquals";
    var f5 = "getAttr";
    var g5 = "stringEquals";
    var h5 = { [m3]: "Endpoint" };
    var i5 = { [m3]: d5 };
    var j5 = { "fn": f5, "argv": [i5, "name"] };
    var k5 = {};
    var l3 = [{ [m3]: "Region" }];
    var _data5 = {
      conditions: [
        [c5, [h5]],
        [c5, l3],
        ["aws.partition", l3, d5],
        [e5, [{ [m3]: "UseFIPS" }, b5]],
        [e5, [{ fn: f5, argv: [i5, "supportsFIPS"] }, b5]],
        [e5, [{ [m3]: "UseDualStack" }, b5]],
        [e5, [{ fn: f5, argv: [i5, "supportsDualStack"] }, b5]],
        [g5, [j5, "aws"]],
        [g5, [j5, "aws-cn"]],
        [g5, [j5, "aws-us-gov"]]
      ],
      results: [
        [a5],
        [a5, "Invalid Configuration: FIPS and custom endpoint are not supported"],
        [a5, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
        [h5, k5],
        ["https://iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", k5],
        [a5, "FIPS and DualStack are enabled, but this partition does not support one or both"],
        ["https://iot-fips.{Region}.{PartitionResult#dnsSuffix}", k5],
        [a5, "FIPS is enabled but this partition does not support FIPS"],
        ["https://iot.{Region}.{PartitionResult#dualStackDnsSuffix}", k5],
        [a5, "DualStack is enabled but this partition does not support DualStack"],
        ["https://iot.{Region}.amazonaws.com", k5],
        ["https://iot.{Region}.amazonaws.com.cn", k5],
        ["https://iot.{Region}.{PartitionResult#dnsSuffix}", k5],
        [a5, "Invalid Configuration: Missing Region"]
      ]
    };
    var root5 = 2;
    var r5 = 1e8;
    var nodes5 = new Int32Array([
      -1,
      1,
      -1,
      0,
      15,
      3,
      1,
      4,
      r5 + 13,
      2,
      5,
      r5 + 13,
      3,
      11,
      6,
      5,
      10,
      7,
      7,
      r5 + 10,
      8,
      8,
      r5 + 11,
      9,
      9,
      r5 + 10,
      r5 + 12,
      6,
      r5 + 8,
      r5 + 9,
      4,
      13,
      12,
      5,
      r5 + 5,
      r5 + 7,
      5,
      14,
      r5 + 6,
      6,
      r5 + 4,
      r5 + 5,
      3,
      r5 + 1,
      16,
      5,
      r5 + 2,
      r5 + 3
    ]);
    exports2.bdd = util_endpoints_1.BinaryDecisionDiagram.from(nodes5, root5, _data5.conditions, _data5.results);
  }
});

// ../../node_modules/@aws-sdk/client-iot/dist-cjs/endpoint/endpointResolver.js
var require_endpointResolver = __commonJS({
  "../../node_modules/@aws-sdk/client-iot/dist-cjs/endpoint/endpointResolver.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.defaultEndpointResolver = void 0;
    var util_endpoints_1 = require_dist_cjs21();
    var util_endpoints_2 = require_dist_cjs20();
    var bdd_1 = require_bdd();
    var cache5 = new util_endpoints_2.EndpointCache({
      size: 50,
      params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
    });
    var defaultEndpointResolver5 = (endpointParams, context = {}) => {
      return cache5.get(endpointParams, () => (0, util_endpoints_2.decideEndpoint)(bdd_1.bdd, {
        endpointParams,
        logger: context.logger
      }));
    };
    exports2.defaultEndpointResolver = defaultEndpointResolver5;
    util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
  }
});

// ../../node_modules/@aws-sdk/client-iot/dist-cjs/models/IoTServiceException.js
var require_IoTServiceException = __commonJS({
  "../../node_modules/@aws-sdk/client-iot/dist-cjs/models/IoTServiceException.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.IoTServiceException = exports2.__ServiceException = void 0;
    var smithy_client_1 = require_dist_cjs34();
    Object.defineProperty(exports2, "__ServiceException", { enumerable: true, get: function() {
      return smithy_client_1.ServiceException;
    } });
    var IoTServiceException = class _IoTServiceException extends smithy_client_1.ServiceException {
      constructor(options) {
        super(options);
        Object.setPrototypeOf(this, _IoTServiceException.prototype);
      }
    };
    exports2.IoTServiceException = IoTServiceException;
  }
});

// ../../node_modules/@aws-sdk/client-iot/dist-cjs/models/errors.js
var require_errors3 = __commonJS({
  "../../node_modules/@aws-sdk/client-iot/dist-cjs/models/errors.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.TransferConflictException = exports2.InvalidResponseException = exports2.TaskAlreadyExistsException = exports2.ResourceRegistrationFailureException = exports2.CertificateConflictException = exports2.RegistrationCodeValidationException = exports2.NotConfiguredException = exports2.CertificateStateException = exports2.DeleteConflictException = exports2.SqlParseException = exports2.VersionsLimitExceededException = exports2.MalformedPolicyException = exports2.InvalidAggregationException = exports2.IndexNotReadyException = exports2.InvalidQueryException = exports2.CertificateValidationException = exports2.ResourceAlreadyExistsException = exports2.InternalException = exports2.ConflictingResourceUpdateException = exports2.InvalidStateTransitionException = exports2.VersionConflictException = exports2.LimitExceededException = exports2.ValidationException = exports2.ServiceQuotaExceededException = exports2.InternalServerException = exports2.ConflictException = exports2.UnauthorizedException = exports2.TransferAlreadyCompletedException = exports2.ThrottlingException = exports2.ServiceUnavailableException = exports2.ResourceNotFoundException = exports2.InvalidRequestException = exports2.InternalFailureException = void 0;
    var IoTServiceException_1 = require_IoTServiceException();
    var InternalFailureException = class _InternalFailureException extends IoTServiceException_1.IoTServiceException {
      name = "InternalFailureException";
      $fault = "server";
      constructor(opts) {
        super({
          name: "InternalFailureException",
          $fault: "server",
          ...opts
        });
        Object.setPrototypeOf(this, _InternalFailureException.prototype);
      }
    };
    exports2.InternalFailureException = InternalFailureException;
    var InvalidRequestException3 = class _InvalidRequestException extends IoTServiceException_1.IoTServiceException {
      name = "InvalidRequestException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "InvalidRequestException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _InvalidRequestException.prototype);
      }
    };
    exports2.InvalidRequestException = InvalidRequestException3;
    var ResourceNotFoundException2 = class _ResourceNotFoundException extends IoTServiceException_1.IoTServiceException {
      name = "ResourceNotFoundException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "ResourceNotFoundException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
      }
    };
    exports2.ResourceNotFoundException = ResourceNotFoundException2;
    var ServiceUnavailableException = class _ServiceUnavailableException extends IoTServiceException_1.IoTServiceException {
      name = "ServiceUnavailableException";
      $fault = "server";
      constructor(opts) {
        super({
          name: "ServiceUnavailableException",
          $fault: "server",
          ...opts
        });
        Object.setPrototypeOf(this, _ServiceUnavailableException.prototype);
      }
    };
    exports2.ServiceUnavailableException = ServiceUnavailableException;
    var ThrottlingException = class _ThrottlingException extends IoTServiceException_1.IoTServiceException {
      name = "ThrottlingException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "ThrottlingException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _ThrottlingException.prototype);
      }
    };
    exports2.ThrottlingException = ThrottlingException;
    var TransferAlreadyCompletedException = class _TransferAlreadyCompletedException extends IoTServiceException_1.IoTServiceException {
      name = "TransferAlreadyCompletedException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "TransferAlreadyCompletedException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _TransferAlreadyCompletedException.prototype);
      }
    };
    exports2.TransferAlreadyCompletedException = TransferAlreadyCompletedException;
    var UnauthorizedException2 = class _UnauthorizedException extends IoTServiceException_1.IoTServiceException {
      name = "UnauthorizedException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "UnauthorizedException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _UnauthorizedException.prototype);
      }
    };
    exports2.UnauthorizedException = UnauthorizedException2;
    var ConflictException = class _ConflictException extends IoTServiceException_1.IoTServiceException {
      name = "ConflictException";
      $fault = "client";
      resourceId;
      constructor(opts) {
        super({
          name: "ConflictException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _ConflictException.prototype);
        this.resourceId = opts.resourceId;
      }
    };
    exports2.ConflictException = ConflictException;
    var InternalServerException3 = class _InternalServerException extends IoTServiceException_1.IoTServiceException {
      name = "InternalServerException";
      $fault = "server";
      constructor(opts) {
        super({
          name: "InternalServerException",
          $fault: "server",
          ...opts
        });
        Object.setPrototypeOf(this, _InternalServerException.prototype);
      }
    };
    exports2.InternalServerException = InternalServerException3;
    var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends IoTServiceException_1.IoTServiceException {
      name = "ServiceQuotaExceededException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "ServiceQuotaExceededException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
      }
    };
    exports2.ServiceQuotaExceededException = ServiceQuotaExceededException;
    var ValidationException2 = class _ValidationException extends IoTServiceException_1.IoTServiceException {
      name = "ValidationException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "ValidationException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _ValidationException.prototype);
      }
    };
    exports2.ValidationException = ValidationException2;
    var LimitExceededException = class _LimitExceededException extends IoTServiceException_1.IoTServiceException {
      name = "LimitExceededException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "LimitExceededException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _LimitExceededException.prototype);
      }
    };
    exports2.LimitExceededException = LimitExceededException;
    var VersionConflictException = class _VersionConflictException extends IoTServiceException_1.IoTServiceException {
      name = "VersionConflictException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "VersionConflictException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _VersionConflictException.prototype);
      }
    };
    exports2.VersionConflictException = VersionConflictException;
    var InvalidStateTransitionException = class _InvalidStateTransitionException extends IoTServiceException_1.IoTServiceException {
      name = "InvalidStateTransitionException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "InvalidStateTransitionException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _InvalidStateTransitionException.prototype);
      }
    };
    exports2.InvalidStateTransitionException = InvalidStateTransitionException;
    var ConflictingResourceUpdateException = class _ConflictingResourceUpdateException extends IoTServiceException_1.IoTServiceException {
      name = "ConflictingResourceUpdateException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "ConflictingResourceUpdateException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _ConflictingResourceUpdateException.prototype);
      }
    };
    exports2.ConflictingResourceUpdateException = ConflictingResourceUpdateException;
    var InternalException = class _InternalException extends IoTServiceException_1.IoTServiceException {
      name = "InternalException";
      $fault = "server";
      constructor(opts) {
        super({
          name: "InternalException",
          $fault: "server",
          ...opts
        });
        Object.setPrototypeOf(this, _InternalException.prototype);
      }
    };
    exports2.InternalException = InternalException;
    var ResourceAlreadyExistsException = class _ResourceAlreadyExistsException extends IoTServiceException_1.IoTServiceException {
      name = "ResourceAlreadyExistsException";
      $fault = "client";
      resourceId;
      resourceArn;
      constructor(opts) {
        super({
          name: "ResourceAlreadyExistsException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _ResourceAlreadyExistsException.prototype);
        this.resourceId = opts.resourceId;
        this.resourceArn = opts.resourceArn;
      }
    };
    exports2.ResourceAlreadyExistsException = ResourceAlreadyExistsException;
    var CertificateValidationException = class _CertificateValidationException extends IoTServiceException_1.IoTServiceException {
      name = "CertificateValidationException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "CertificateValidationException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _CertificateValidationException.prototype);
      }
    };
    exports2.CertificateValidationException = CertificateValidationException;
    var InvalidQueryException = class _InvalidQueryException extends IoTServiceException_1.IoTServiceException {
      name = "InvalidQueryException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "InvalidQueryException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _InvalidQueryException.prototype);
      }
    };
    exports2.InvalidQueryException = InvalidQueryException;
    var IndexNotReadyException = class _IndexNotReadyException extends IoTServiceException_1.IoTServiceException {
      name = "IndexNotReadyException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "IndexNotReadyException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _IndexNotReadyException.prototype);
      }
    };
    exports2.IndexNotReadyException = IndexNotReadyException;
    var InvalidAggregationException = class _InvalidAggregationException extends IoTServiceException_1.IoTServiceException {
      name = "InvalidAggregationException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "InvalidAggregationException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _InvalidAggregationException.prototype);
      }
    };
    exports2.InvalidAggregationException = InvalidAggregationException;
    var MalformedPolicyException = class _MalformedPolicyException extends IoTServiceException_1.IoTServiceException {
      name = "MalformedPolicyException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "MalformedPolicyException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _MalformedPolicyException.prototype);
      }
    };
    exports2.MalformedPolicyException = MalformedPolicyException;
    var VersionsLimitExceededException = class _VersionsLimitExceededException extends IoTServiceException_1.IoTServiceException {
      name = "VersionsLimitExceededException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "VersionsLimitExceededException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _VersionsLimitExceededException.prototype);
      }
    };
    exports2.VersionsLimitExceededException = VersionsLimitExceededException;
    var SqlParseException = class _SqlParseException extends IoTServiceException_1.IoTServiceException {
      name = "SqlParseException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "SqlParseException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _SqlParseException.prototype);
      }
    };
    exports2.SqlParseException = SqlParseException;
    var DeleteConflictException = class _DeleteConflictException extends IoTServiceException_1.IoTServiceException {
      name = "DeleteConflictException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "DeleteConflictException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _DeleteConflictException.prototype);
      }
    };
    exports2.DeleteConflictException = DeleteConflictException;
    var CertificateStateException = class _CertificateStateException extends IoTServiceException_1.IoTServiceException {
      name = "CertificateStateException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "CertificateStateException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _CertificateStateException.prototype);
      }
    };
    exports2.CertificateStateException = CertificateStateException;
    var NotConfiguredException = class _NotConfiguredException extends IoTServiceException_1.IoTServiceException {
      name = "NotConfiguredException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "NotConfiguredException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _NotConfiguredException.prototype);
      }
    };
    exports2.NotConfiguredException = NotConfiguredException;
    var RegistrationCodeValidationException = class _RegistrationCodeValidationException extends IoTServiceException_1.IoTServiceException {
      name = "RegistrationCodeValidationException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "RegistrationCodeValidationException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _RegistrationCodeValidationException.prototype);
      }
    };
    exports2.RegistrationCodeValidationException = RegistrationCodeValidationException;
    var CertificateConflictException = class _CertificateConflictException extends IoTServiceException_1.IoTServiceException {
      name = "CertificateConflictException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "CertificateConflictException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _CertificateConflictException.prototype);
      }
    };
    exports2.CertificateConflictException = CertificateConflictException;
    var ResourceRegistrationFailureException = class _ResourceRegistrationFailureException extends IoTServiceException_1.IoTServiceException {
      name = "ResourceRegistrationFailureException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "ResourceRegistrationFailureException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _ResourceRegistrationFailureException.prototype);
      }
    };
    exports2.ResourceRegistrationFailureException = ResourceRegistrationFailureException;
    var TaskAlreadyExistsException = class _TaskAlreadyExistsException extends IoTServiceException_1.IoTServiceException {
      name = "TaskAlreadyExistsException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "TaskAlreadyExistsException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _TaskAlreadyExistsException.prototype);
      }
    };
    exports2.TaskAlreadyExistsException = TaskAlreadyExistsException;
    var InvalidResponseException = class _InvalidResponseException extends IoTServiceException_1.IoTServiceException {
      name = "InvalidResponseException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "InvalidResponseException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _InvalidResponseException.prototype);
      }
    };
    exports2.InvalidResponseException = InvalidResponseException;
    var TransferConflictException = class _TransferConflictException extends IoTServiceException_1.IoTServiceException {
      name = "TransferConflictException";
      $fault = "client";
      constructor(opts) {
        super({
          name: "TransferConflictException",
          $fault: "client",
          ...opts
        });
        Object.setPrototypeOf(this, _TransferConflictException.prototype);
      }
    };
    exports2.TransferConflictException = TransferConflictException;
  }
});

// ../../node_modules/@aws-sdk/client-iot/dist-cjs/schemas/schemas_0.js
var require_schemas_0 = __commonJS({
  "../../node_modules/@aws-sdk/client-iot/dist-cjs/schemas/schemas_0.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.AssetPropertyValue$ = exports2.AssetPropertyTimestamp$ = exports2.Allowed$ = exports2.AlertTarget$ = exports2.AggregationType$ = exports2.AddThingToThingGroupResponse$ = exports2.AddThingToThingGroupRequest$ = exports2.AddThingToBillingGroupResponse$ = exports2.AddThingToBillingGroupRequest$ = exports2.AddThingsToThingGroupParams$ = exports2.ActiveViolation$ = exports2.Action$ = exports2.AcceptCertificateTransferRequest$ = exports2.AbortCriteria$ = exports2.AbortConfig$ = exports2.errorTypeRegistries = exports2.VersionsLimitExceededException$ = exports2.VersionConflictException$ = exports2.ValidationException$ = exports2.UnauthorizedException$ = exports2.TransferConflictException$ = exports2.TransferAlreadyCompletedException$ = exports2.ThrottlingException$ = exports2.TaskAlreadyExistsException$ = exports2.SqlParseException$ = exports2.ServiceUnavailableException$ = exports2.ServiceQuotaExceededException$ = exports2.ResourceRegistrationFailureException$ = exports2.ResourceNotFoundException$ = exports2.ResourceAlreadyExistsException$ = exports2.RegistrationCodeValidationException$ = exports2.NotConfiguredException$ = exports2.MalformedPolicyException$ = exports2.LimitExceededException$ = exports2.InvalidStateTransitionException$ = exports2.InvalidResponseException$ = exports2.InvalidRequestException$ = exports2.InvalidQueryException$ = exports2.InvalidAggregationException$ = exports2.InternalServerException$ = exports2.InternalFailureException$ = exports2.InternalException$ = exports2.IndexNotReadyException$ = exports2.DeleteConflictException$ = exports2.ConflictingResourceUpdateException$ = exports2.ConflictException$ = exports2.CertificateValidationException$ = exports2.CertificateStateException$ = exports2.CertificateConflictException$ = exports2.IoTServiceException$ = void 0;
    exports2.CancelDetectMitigationActionsTaskResponse$ = exports2.CancelDetectMitigationActionsTaskRequest$ = exports2.CancelCertificateTransferRequest$ = exports2.CancelAuditTaskResponse$ = exports2.CancelAuditTaskRequest$ = exports2.CancelAuditMitigationActionsTaskResponse$ = exports2.CancelAuditMitigationActionsTaskRequest$ = exports2.CACertificateDescription$ = exports2.CACertificate$ = exports2.BucketsAggregationType$ = exports2.Bucket$ = exports2.BillingGroupProperties$ = exports2.BillingGroupMetadata$ = exports2.BehaviorModelTrainingSummary$ = exports2.BehaviorCriteria$ = exports2.Behavior$ = exports2.BatchConfig$ = exports2.AwsJsonSubstitutionCommandPreprocessorConfig$ = exports2.AwsJobTimeoutConfig$ = exports2.AwsJobRateIncreaseCriteria$ = exports2.AwsJobPresignedUrlConfig$ = exports2.AwsJobExponentialRolloutRate$ = exports2.AwsJobExecutionsRolloutConfig$ = exports2.AwsJobAbortCriteria$ = exports2.AwsJobAbortConfig$ = exports2.AuthResult$ = exports2.AuthorizerSummary$ = exports2.AuthorizerDescription$ = exports2.AuthorizerConfig$ = exports2.AuthInfo$ = exports2.AuditTaskMetadata$ = exports2.AuditSuppression$ = exports2.AuditNotificationTarget$ = exports2.AuditMitigationActionsTaskTarget$ = exports2.AuditMitigationActionsTaskMetadata$ = exports2.AuditMitigationActionExecutionMetadata$ = exports2.AuditFinding$ = exports2.AuditCheckDetails$ = exports2.AuditCheckConfiguration$ = exports2.AttributePayload$ = exports2.AttachThingPrincipalResponse$ = exports2.AttachThingPrincipalRequest$ = exports2.AttachSecurityProfileResponse$ = exports2.AttachSecurityProfileRequest$ = exports2.AttachPrincipalPolicyRequest$ = exports2.AttachPolicyRequest$ = exports2.AssociateTargetsWithJobResponse$ = exports2.AssociateTargetsWithJobRequest$ = exports2.AssociateSbomWithPackageVersionResponse$ = exports2.AssociateSbomWithPackageVersionRequest$ = void 0;
    exports2.CreateDynamicThingGroupResponse$ = exports2.CreateDynamicThingGroupRequest$ = exports2.CreateDomainConfigurationResponse$ = exports2.CreateDomainConfigurationRequest$ = exports2.CreateDimensionResponse$ = exports2.CreateDimensionRequest$ = exports2.CreateCustomMetricResponse$ = exports2.CreateCustomMetricRequest$ = exports2.CreateCommandResponse$ = exports2.CreateCommandRequest$ = exports2.CreateCertificateProviderResponse$ = exports2.CreateCertificateProviderRequest$ = exports2.CreateCertificateFromCsrResponse$ = exports2.CreateCertificateFromCsrRequest$ = exports2.CreateBillingGroupResponse$ = exports2.CreateBillingGroupRequest$ = exports2.CreateAuthorizerResponse$ = exports2.CreateAuthorizerRequest$ = exports2.CreateAuditSuppressionResponse$ = exports2.CreateAuditSuppressionRequest$ = exports2.ConfirmTopicRuleDestinationResponse$ = exports2.ConfirmTopicRuleDestinationRequest$ = exports2.ConfigurationDetails$ = exports2.Configuration$ = exports2.CommandSummary$ = exports2.CommandPreprocessor$ = exports2.CommandPayload$ = exports2.CommandParameterValueNumberRange$ = exports2.CommandParameterValueCondition$ = exports2.CommandParameterValueComparisonOperand$ = exports2.CommandParameterValue$ = exports2.CommandParameter$ = exports2.CommandExecutionSummary$ = exports2.CommandExecutionResult$ = exports2.CodeSigningSignature$ = exports2.CodeSigningCertificateChain$ = exports2.CodeSigning$ = exports2.CloudwatchMetricAction$ = exports2.CloudwatchLogsAction$ = exports2.CloudwatchAlarmAction$ = exports2.ClientCertificateConfig$ = exports2.ClearDefaultAuthorizerResponse$ = exports2.ClearDefaultAuthorizerRequest$ = exports2.CertificateValidity$ = exports2.CertificateProviderSummary$ = exports2.CertificateDescription$ = exports2.Certificate$ = exports2.CancelJobResponse$ = exports2.CancelJobRequest$ = exports2.CancelJobExecutionRequest$ = void 0;
    exports2.DeleteAuthorizerResponse$ = exports2.DeleteAuthorizerRequest$ = exports2.DeleteAuditSuppressionResponse$ = exports2.DeleteAuditSuppressionRequest$ = exports2.DeleteAccountAuditConfigurationResponse$ = exports2.DeleteAccountAuditConfigurationRequest$ = exports2.CustomCodeSigning$ = exports2.CreateTopicRuleRequest$ = exports2.CreateTopicRuleDestinationResponse$ = exports2.CreateTopicRuleDestinationRequest$ = exports2.CreateThingTypeResponse$ = exports2.CreateThingTypeRequest$ = exports2.CreateThingResponse$ = exports2.CreateThingRequest$ = exports2.CreateThingGroupResponse$ = exports2.CreateThingGroupRequest$ = exports2.CreateStreamResponse$ = exports2.CreateStreamRequest$ = exports2.CreateSecurityProfileResponse$ = exports2.CreateSecurityProfileRequest$ = exports2.CreateScheduledAuditResponse$ = exports2.CreateScheduledAuditRequest$ = exports2.CreateRoleAliasResponse$ = exports2.CreateRoleAliasRequest$ = exports2.CreateProvisioningTemplateVersionResponse$ = exports2.CreateProvisioningTemplateVersionRequest$ = exports2.CreateProvisioningTemplateResponse$ = exports2.CreateProvisioningTemplateRequest$ = exports2.CreateProvisioningClaimResponse$ = exports2.CreateProvisioningClaimRequest$ = exports2.CreatePolicyVersionResponse$ = exports2.CreatePolicyVersionRequest$ = exports2.CreatePolicyResponse$ = exports2.CreatePolicyRequest$ = exports2.CreatePackageVersionResponse$ = exports2.CreatePackageVersionRequest$ = exports2.CreatePackageResponse$ = exports2.CreatePackageRequest$ = exports2.CreateOTAUpdateResponse$ = exports2.CreateOTAUpdateRequest$ = exports2.CreateMitigationActionResponse$ = exports2.CreateMitigationActionRequest$ = exports2.CreateKeysAndCertificateResponse$ = exports2.CreateKeysAndCertificateRequest$ = exports2.CreateJobTemplateResponse$ = exports2.CreateJobTemplateRequest$ = exports2.CreateJobResponse$ = exports2.CreateJobRequest$ = exports2.CreateFleetMetricResponse$ = exports2.CreateFleetMetricRequest$ = void 0;
    exports2.DeleteThingRequest$ = exports2.DeleteThingGroupResponse$ = exports2.DeleteThingGroupRequest$ = exports2.DeleteStreamResponse$ = exports2.DeleteStreamRequest$ = exports2.DeleteSecurityProfileResponse$ = exports2.DeleteSecurityProfileRequest$ = exports2.DeleteScheduledAuditResponse$ = exports2.DeleteScheduledAuditRequest$ = exports2.DeleteRoleAliasResponse$ = exports2.DeleteRoleAliasRequest$ = exports2.DeleteRegistrationCodeResponse$ = exports2.DeleteRegistrationCodeRequest$ = exports2.DeleteProvisioningTemplateVersionResponse$ = exports2.DeleteProvisioningTemplateVersionRequest$ = exports2.DeleteProvisioningTemplateResponse$ = exports2.DeleteProvisioningTemplateRequest$ = exports2.DeletePolicyVersionRequest$ = exports2.DeletePolicyRequest$ = exports2.DeletePackageVersionResponse$ = exports2.DeletePackageVersionRequest$ = exports2.DeletePackageResponse$ = exports2.DeletePackageRequest$ = exports2.DeleteOTAUpdateResponse$ = exports2.DeleteOTAUpdateRequest$ = exports2.DeleteMitigationActionResponse$ = exports2.DeleteMitigationActionRequest$ = exports2.DeleteJobTemplateRequest$ = exports2.DeleteJobRequest$ = exports2.DeleteJobExecutionRequest$ = exports2.DeleteFleetMetricRequest$ = exports2.DeleteDynamicThingGroupResponse$ = exports2.DeleteDynamicThingGroupRequest$ = exports2.DeleteDomainConfigurationResponse$ = exports2.DeleteDomainConfigurationRequest$ = exports2.DeleteDimensionResponse$ = exports2.DeleteDimensionRequest$ = exports2.DeleteCustomMetricResponse$ = exports2.DeleteCustomMetricRequest$ = exports2.DeleteCommandResponse$ = exports2.DeleteCommandRequest$ = exports2.DeleteCommandExecutionResponse$ = exports2.DeleteCommandExecutionRequest$ = exports2.DeleteCertificateRequest$ = exports2.DeleteCertificateProviderResponse$ = exports2.DeleteCertificateProviderRequest$ = exports2.DeleteCACertificateResponse$ = exports2.DeleteCACertificateRequest$ = exports2.DeleteBillingGroupResponse$ = exports2.DeleteBillingGroupRequest$ = void 0;
    exports2.DescribeIndexResponse$ = exports2.DescribeIndexRequest$ = exports2.DescribeFleetMetricResponse$ = exports2.DescribeFleetMetricRequest$ = exports2.DescribeEventConfigurationsResponse$ = exports2.DescribeEventConfigurationsRequest$ = exports2.DescribeEndpointResponse$ = exports2.DescribeEndpointRequest$ = exports2.DescribeEncryptionConfigurationResponse$ = exports2.DescribeEncryptionConfigurationRequest$ = exports2.DescribeDomainConfigurationResponse$ = exports2.DescribeDomainConfigurationRequest$ = exports2.DescribeDimensionResponse$ = exports2.DescribeDimensionRequest$ = exports2.DescribeDetectMitigationActionsTaskResponse$ = exports2.DescribeDetectMitigationActionsTaskRequest$ = exports2.DescribeDefaultAuthorizerResponse$ = exports2.DescribeDefaultAuthorizerRequest$ = exports2.DescribeCustomMetricResponse$ = exports2.DescribeCustomMetricRequest$ = exports2.DescribeCertificateResponse$ = exports2.DescribeCertificateRequest$ = exports2.DescribeCertificateProviderResponse$ = exports2.DescribeCertificateProviderRequest$ = exports2.DescribeCACertificateResponse$ = exports2.DescribeCACertificateRequest$ = exports2.DescribeBillingGroupResponse$ = exports2.DescribeBillingGroupRequest$ = exports2.DescribeAuthorizerResponse$ = exports2.DescribeAuthorizerRequest$ = exports2.DescribeAuditTaskResponse$ = exports2.DescribeAuditTaskRequest$ = exports2.DescribeAuditSuppressionResponse$ = exports2.DescribeAuditSuppressionRequest$ = exports2.DescribeAuditMitigationActionsTaskResponse$ = exports2.DescribeAuditMitigationActionsTaskRequest$ = exports2.DescribeAuditFindingResponse$ = exports2.DescribeAuditFindingRequest$ = exports2.DescribeAccountAuditConfigurationResponse$ = exports2.DescribeAccountAuditConfigurationRequest$ = exports2.DeprecateThingTypeResponse$ = exports2.DeprecateThingTypeRequest$ = exports2.Denied$ = exports2.DeleteV2LoggingLevelRequest$ = exports2.DeleteTopicRuleRequest$ = exports2.DeleteTopicRuleDestinationResponse$ = exports2.DeleteTopicRuleDestinationRequest$ = exports2.DeleteThingTypeResponse$ = exports2.DeleteThingTypeRequest$ = exports2.DeleteThingResponse$ = void 0;
    exports2.ElasticsearchAction$ = exports2.EffectivePolicy$ = exports2.DynamoDBv2Action$ = exports2.DynamoDBAction$ = exports2.DomainConfigurationSummary$ = exports2.DocumentParameter$ = exports2.DisassociateSbomFromPackageVersionResponse$ = exports2.DisassociateSbomFromPackageVersionRequest$ = exports2.DisableTopicRuleRequest$ = exports2.DetectMitigationActionsTaskTarget$ = exports2.DetectMitigationActionsTaskSummary$ = exports2.DetectMitigationActionsTaskStatistics$ = exports2.DetectMitigationActionExecution$ = exports2.DetachThingPrincipalResponse$ = exports2.DetachThingPrincipalRequest$ = exports2.DetachSecurityProfileResponse$ = exports2.DetachSecurityProfileRequest$ = exports2.DetachPrincipalPolicyRequest$ = exports2.DetachPolicyRequest$ = exports2.Destination$ = exports2.DescribeThingTypeResponse$ = exports2.DescribeThingTypeRequest$ = exports2.DescribeThingResponse$ = exports2.DescribeThingRequest$ = exports2.DescribeThingRegistrationTaskResponse$ = exports2.DescribeThingRegistrationTaskRequest$ = exports2.DescribeThingGroupResponse$ = exports2.DescribeThingGroupRequest$ = exports2.DescribeStreamResponse$ = exports2.DescribeStreamRequest$ = exports2.DescribeSecurityProfileResponse$ = exports2.DescribeSecurityProfileRequest$ = exports2.DescribeScheduledAuditResponse$ = exports2.DescribeScheduledAuditRequest$ = exports2.DescribeRoleAliasResponse$ = exports2.DescribeRoleAliasRequest$ = exports2.DescribeProvisioningTemplateVersionResponse$ = exports2.DescribeProvisioningTemplateVersionRequest$ = exports2.DescribeProvisioningTemplateResponse$ = exports2.DescribeProvisioningTemplateRequest$ = exports2.DescribeMitigationActionResponse$ = exports2.DescribeMitigationActionRequest$ = exports2.DescribeManagedJobTemplateResponse$ = exports2.DescribeManagedJobTemplateRequest$ = exports2.DescribeJobTemplateResponse$ = exports2.DescribeJobTemplateRequest$ = exports2.DescribeJobResponse$ = exports2.DescribeJobRequest$ = exports2.DescribeJobExecutionResponse$ = exports2.DescribeJobExecutionRequest$ = void 0;
    exports2.GetTopicRuleDestinationResponse$ = exports2.GetTopicRuleDestinationRequest$ = exports2.GetThingConnectivityDataResponse$ = exports2.GetThingConnectivityDataRequest$ = exports2.GetStatisticsResponse$ = exports2.GetStatisticsRequest$ = exports2.GetRegistrationCodeResponse$ = exports2.GetRegistrationCodeRequest$ = exports2.GetPolicyVersionResponse$ = exports2.GetPolicyVersionRequest$ = exports2.GetPolicyResponse$ = exports2.GetPolicyRequest$ = exports2.GetPercentilesResponse$ = exports2.GetPercentilesRequest$ = exports2.GetPackageVersionResponse$ = exports2.GetPackageVersionRequest$ = exports2.GetPackageResponse$ = exports2.GetPackageRequest$ = exports2.GetPackageConfigurationResponse$ = exports2.GetPackageConfigurationRequest$ = exports2.GetOTAUpdateResponse$ = exports2.GetOTAUpdateRequest$ = exports2.GetLoggingOptionsResponse$ = exports2.GetLoggingOptionsRequest$ = exports2.GetJobDocumentResponse$ = exports2.GetJobDocumentRequest$ = exports2.GetIndexingConfigurationResponse$ = exports2.GetIndexingConfigurationRequest$ = exports2.GetEffectivePoliciesResponse$ = exports2.GetEffectivePoliciesRequest$ = exports2.GetCommandResponse$ = exports2.GetCommandRequest$ = exports2.GetCommandExecutionResponse$ = exports2.GetCommandExecutionRequest$ = exports2.GetCardinalityResponse$ = exports2.GetCardinalityRequest$ = exports2.GetBucketsAggregationResponse$ = exports2.GetBucketsAggregationRequest$ = exports2.GetBehaviorModelTrainingSummariesResponse$ = exports2.GetBehaviorModelTrainingSummariesRequest$ = exports2.GeoLocationTarget$ = exports2.FleetMetricNameAndArn$ = exports2.FirehoseAction$ = exports2.FileLocation$ = exports2.Field$ = exports2.ExponentialRolloutRate$ = exports2.ExplicitDeny$ = exports2.ErrorInfo$ = exports2.EnableTopicRuleRequest$ = exports2.EnableIoTLoggingParams$ = void 0;
    exports2.ListAuthorizersResponse$ = exports2.ListAuthorizersRequest$ = exports2.ListAuditTasksResponse$ = exports2.ListAuditTasksRequest$ = exports2.ListAuditSuppressionsResponse$ = exports2.ListAuditSuppressionsRequest$ = exports2.ListAuditMitigationActionsTasksResponse$ = exports2.ListAuditMitigationActionsTasksRequest$ = exports2.ListAuditMitigationActionsExecutionsResponse$ = exports2.ListAuditMitigationActionsExecutionsRequest$ = exports2.ListAuditFindingsResponse$ = exports2.ListAuditFindingsRequest$ = exports2.ListAttachedPoliciesResponse$ = exports2.ListAttachedPoliciesRequest$ = exports2.ListActiveViolationsResponse$ = exports2.ListActiveViolationsRequest$ = exports2.LambdaAction$ = exports2.KinesisAction$ = exports2.KeyPair$ = exports2.KafkaActionHeader$ = exports2.KafkaAction$ = exports2.JobTemplateSummary$ = exports2.JobSummary$ = exports2.JobProcessDetails$ = exports2.JobExecutionSummaryForThing$ = exports2.JobExecutionSummaryForJob$ = exports2.JobExecutionSummary$ = exports2.JobExecutionStatusDetails$ = exports2.JobExecutionsRolloutConfig$ = exports2.JobExecutionsRetryConfig$ = exports2.JobExecution$ = exports2.Job$ = exports2.IssuerCertificateIdentifier$ = exports2.IotSiteWiseAction$ = exports2.IotEventsAction$ = exports2.IotAnalyticsAction$ = exports2.IndexingFilter$ = exports2.ImplicitDeny$ = exports2.HttpUrlDestinationSummary$ = exports2.HttpUrlDestinationProperties$ = exports2.HttpUrlDestinationConfiguration$ = exports2.HttpContext$ = exports2.HttpAuthorization$ = exports2.HttpActionHeader$ = exports2.HttpAction$ = exports2.GroupNameAndArn$ = exports2.GetV2LoggingOptionsResponse$ = exports2.GetV2LoggingOptionsRequest$ = exports2.GetTopicRuleResponse$ = exports2.GetTopicRuleRequest$ = void 0;
    exports2.ListPackageVersionsResponse$ = exports2.ListPackageVersionsRequest$ = exports2.ListPackagesResponse$ = exports2.ListPackagesRequest$ = exports2.ListOutgoingCertificatesResponse$ = exports2.ListOutgoingCertificatesRequest$ = exports2.ListOTAUpdatesResponse$ = exports2.ListOTAUpdatesRequest$ = exports2.ListMitigationActionsResponse$ = exports2.ListMitigationActionsRequest$ = exports2.ListMetricValuesResponse$ = exports2.ListMetricValuesRequest$ = exports2.ListManagedJobTemplatesResponse$ = exports2.ListManagedJobTemplatesRequest$ = exports2.ListJobTemplatesResponse$ = exports2.ListJobTemplatesRequest$ = exports2.ListJobsResponse$ = exports2.ListJobsRequest$ = exports2.ListJobExecutionsForThingResponse$ = exports2.ListJobExecutionsForThingRequest$ = exports2.ListJobExecutionsForJobResponse$ = exports2.ListJobExecutionsForJobRequest$ = exports2.ListIndicesResponse$ = exports2.ListIndicesRequest$ = exports2.ListFleetMetricsResponse$ = exports2.ListFleetMetricsRequest$ = exports2.ListDomainConfigurationsResponse$ = exports2.ListDomainConfigurationsRequest$ = exports2.ListDimensionsResponse$ = exports2.ListDimensionsRequest$ = exports2.ListDetectMitigationActionsTasksResponse$ = exports2.ListDetectMitigationActionsTasksRequest$ = exports2.ListDetectMitigationActionsExecutionsResponse$ = exports2.ListDetectMitigationActionsExecutionsRequest$ = exports2.ListCustomMetricsResponse$ = exports2.ListCustomMetricsRequest$ = exports2.ListCommandsResponse$ = exports2.ListCommandsRequest$ = exports2.ListCommandExecutionsResponse$ = exports2.ListCommandExecutionsRequest$ = exports2.ListCertificatesResponse$ = exports2.ListCertificatesRequest$ = exports2.ListCertificatesByCAResponse$ = exports2.ListCertificatesByCARequest$ = exports2.ListCertificateProvidersResponse$ = exports2.ListCertificateProvidersRequest$ = exports2.ListCACertificatesResponse$ = exports2.ListCACertificatesRequest$ = exports2.ListBillingGroupsResponse$ = exports2.ListBillingGroupsRequest$ = void 0;
    exports2.ListThingsInBillingGroupResponse$ = exports2.ListThingsInBillingGroupRequest$ = exports2.ListThingRegistrationTasksResponse$ = exports2.ListThingRegistrationTasksRequest$ = exports2.ListThingRegistrationTaskReportsResponse$ = exports2.ListThingRegistrationTaskReportsRequest$ = exports2.ListThingPrincipalsV2Response$ = exports2.ListThingPrincipalsV2Request$ = exports2.ListThingPrincipalsResponse$ = exports2.ListThingPrincipalsRequest$ = exports2.ListThingGroupsResponse$ = exports2.ListThingGroupsRequest$ = exports2.ListThingGroupsForThingResponse$ = exports2.ListThingGroupsForThingRequest$ = exports2.ListTargetsForSecurityProfileResponse$ = exports2.ListTargetsForSecurityProfileRequest$ = exports2.ListTargetsForPolicyResponse$ = exports2.ListTargetsForPolicyRequest$ = exports2.ListTagsForResourceResponse$ = exports2.ListTagsForResourceRequest$ = exports2.ListStreamsResponse$ = exports2.ListStreamsRequest$ = exports2.ListSecurityProfilesResponse$ = exports2.ListSecurityProfilesRequest$ = exports2.ListSecurityProfilesForTargetResponse$ = exports2.ListSecurityProfilesForTargetRequest$ = exports2.ListScheduledAuditsResponse$ = exports2.ListScheduledAuditsRequest$ = exports2.ListSbomValidationResultsResponse$ = exports2.ListSbomValidationResultsRequest$ = exports2.ListRoleAliasesResponse$ = exports2.ListRoleAliasesRequest$ = exports2.ListRelatedResourcesForAuditFindingResponse$ = exports2.ListRelatedResourcesForAuditFindingRequest$ = exports2.ListProvisioningTemplateVersionsResponse$ = exports2.ListProvisioningTemplateVersionsRequest$ = exports2.ListProvisioningTemplatesResponse$ = exports2.ListProvisioningTemplatesRequest$ = exports2.ListPrincipalThingsV2Response$ = exports2.ListPrincipalThingsV2Request$ = exports2.ListPrincipalThingsResponse$ = exports2.ListPrincipalThingsRequest$ = exports2.ListPrincipalPoliciesResponse$ = exports2.ListPrincipalPoliciesRequest$ = exports2.ListPolicyVersionsResponse$ = exports2.ListPolicyVersionsRequest$ = exports2.ListPolicyPrincipalsResponse$ = exports2.ListPolicyPrincipalsRequest$ = exports2.ListPoliciesResponse$ = exports2.ListPoliciesRequest$ = void 0;
    exports2.PropagatingAttribute$ = exports2.PrincipalThingObject$ = exports2.PresignedUrlConfig$ = exports2.PolicyVersionIdentifier$ = exports2.PolicyVersion$ = exports2.Policy$ = exports2.PercentPair$ = exports2.PackageVersionSummary$ = exports2.PackageVersionArtifact$ = exports2.PackageSummary$ = exports2.OutgoingCertificate$ = exports2.OTAUpdateSummary$ = exports2.OTAUpdateInfo$ = exports2.OTAUpdateFile$ = exports2.OpenSearchAction$ = exports2.NonCompliantResource$ = exports2.MqttHeaders$ = exports2.MqttContext$ = exports2.Mqtt5Configuration$ = exports2.MitigationActionParams$ = exports2.MitigationActionIdentifier$ = exports2.MitigationAction$ = exports2.MetricValue$ = exports2.MetricToRetain$ = exports2.MetricsExportConfig$ = exports2.MetricDimension$ = exports2.MetricDatum$ = exports2.ManagedJobTemplateSummary$ = exports2.MaintenanceWindow$ = exports2.MachineLearningDetectionConfig$ = exports2.LogTargetConfiguration$ = exports2.LogTarget$ = exports2.LoggingOptionsPayload$ = exports2.LogEventConfiguration$ = exports2.LocationTimestamp$ = exports2.LocationAction$ = exports2.ListViolationEventsResponse$ = exports2.ListViolationEventsRequest$ = exports2.ListV2LoggingLevelsResponse$ = exports2.ListV2LoggingLevelsRequest$ = exports2.ListTopicRulesResponse$ = exports2.ListTopicRulesRequest$ = exports2.ListTopicRuleDestinationsResponse$ = exports2.ListTopicRuleDestinationsRequest$ = exports2.ListThingTypesResponse$ = exports2.ListThingTypesRequest$ = exports2.ListThingsResponse$ = exports2.ListThingsRequest$ = exports2.ListThingsInThingGroupResponse$ = exports2.ListThingsInThingGroupRequest$ = void 0;
    exports2.SetLoggingOptionsRequest$ = exports2.SetDefaultPolicyVersionRequest$ = exports2.SetDefaultAuthorizerResponse$ = exports2.SetDefaultAuthorizerRequest$ = exports2.ServerCertificateSummary$ = exports2.ServerCertificateConfig$ = exports2.SecurityProfileTargetMapping$ = exports2.SecurityProfileTarget$ = exports2.SecurityProfileIdentifier$ = exports2.SearchIndexResponse$ = exports2.SearchIndexRequest$ = exports2.SchedulingConfig$ = exports2.ScheduledJobRollout$ = exports2.ScheduledAuditMetadata$ = exports2.SbomValidationResultSummary$ = exports2.Sbom$ = exports2.SalesforceAction$ = exports2.S3Location$ = exports2.S3Destination$ = exports2.S3Action$ = exports2.RoleAliasDescription$ = exports2.RetryCriteria$ = exports2.ResourceIdentifier$ = exports2.RepublishAction$ = exports2.ReplaceTopicRuleRequest$ = exports2.ReplaceDefaultPolicyVersionParams$ = exports2.RemoveThingFromThingGroupResponse$ = exports2.RemoveThingFromThingGroupRequest$ = exports2.RemoveThingFromBillingGroupResponse$ = exports2.RemoveThingFromBillingGroupRequest$ = exports2.RelatedResource$ = exports2.RejectCertificateTransferRequest$ = exports2.RegistrationConfig$ = exports2.RegisterThingResponse$ = exports2.RegisterThingRequest$ = exports2.RegisterCertificateWithoutCAResponse$ = exports2.RegisterCertificateWithoutCARequest$ = exports2.RegisterCertificateResponse$ = exports2.RegisterCertificateRequest$ = exports2.RegisterCACertificateResponse$ = exports2.RegisterCACertificateRequest$ = exports2.RateIncreaseCriteria$ = exports2.PutVerificationStateOnViolationResponse$ = exports2.PutVerificationStateOnViolationRequest$ = exports2.PutItemInput$ = exports2.PutAssetPropertyValueEntry$ = exports2.PublishFindingToSnsParams$ = exports2.ProvisioningTemplateVersionSummary$ = exports2.ProvisioningTemplateSummary$ = exports2.ProvisioningHook$ = void 0;
    exports2.TimestreamAction$ = exports2.TimeoutConfig$ = exports2.TimeFilter$ = exports2.ThingTypeProperties$ = exports2.ThingTypeMetadata$ = exports2.ThingTypeDefinition$ = exports2.ThingPrincipalObject$ = exports2.ThingIndexingConfiguration$ = exports2.ThingGroupProperties$ = exports2.ThingGroupMetadata$ = exports2.ThingGroupIndexingConfiguration$ = exports2.ThingGroupDocument$ = exports2.ThingDocument$ = exports2.ThingConnectivity$ = exports2.ThingAttribute$ = exports2.TestInvokeAuthorizerResponse$ = exports2.TestInvokeAuthorizerRequest$ = exports2.TestAuthorizationResponse$ = exports2.TestAuthorizationRequest$ = exports2.TermsAggregation$ = exports2.TaskStatisticsForAuditCheck$ = exports2.TaskStatistics$ = exports2.TagResourceResponse$ = exports2.TagResourceRequest$ = exports2.Tag$ = exports2.StreamSummary$ = exports2.StreamInfo$ = exports2.StreamFile$ = exports2._Stream$ = exports2.StopThingRegistrationTaskResponse$ = exports2.StopThingRegistrationTaskRequest$ = exports2.StepFunctionsAction$ = exports2.StatusReason$ = exports2.Statistics$ = exports2.StatisticalThreshold$ = exports2.StartThingRegistrationTaskResponse$ = exports2.StartThingRegistrationTaskRequest$ = exports2.StartSigningJobParameter$ = exports2.StartOnDemandAuditTaskResponse$ = exports2.StartOnDemandAuditTaskRequest$ = exports2.StartDetectMitigationActionsTaskResponse$ = exports2.StartDetectMitigationActionsTaskRequest$ = exports2.StartAuditMitigationActionsTaskResponse$ = exports2.StartAuditMitigationActionsTaskRequest$ = exports2.SqsAction$ = exports2.SnsAction$ = exports2.SigV4Authorization$ = exports2.SigningProfileParameter$ = exports2.SetV2LoggingOptionsRequest$ = exports2.SetV2LoggingLevelRequest$ = void 0;
    exports2.UpdatePackageConfigurationRequest$ = exports2.UpdateMitigationActionResponse$ = exports2.UpdateMitigationActionRequest$ = exports2.UpdateJobRequest$ = exports2.UpdateIndexingConfigurationResponse$ = exports2.UpdateIndexingConfigurationRequest$ = exports2.UpdateFleetMetricRequest$ = exports2.UpdateEventConfigurationsResponse$ = exports2.UpdateEventConfigurationsRequest$ = exports2.UpdateEncryptionConfigurationResponse$ = exports2.UpdateEncryptionConfigurationRequest$ = exports2.UpdateDynamicThingGroupResponse$ = exports2.UpdateDynamicThingGroupRequest$ = exports2.UpdateDomainConfigurationResponse$ = exports2.UpdateDomainConfigurationRequest$ = exports2.UpdateDimensionResponse$ = exports2.UpdateDimensionRequest$ = exports2.UpdateDeviceCertificateParams$ = exports2.UpdateCustomMetricResponse$ = exports2.UpdateCustomMetricRequest$ = exports2.UpdateCommandResponse$ = exports2.UpdateCommandRequest$ = exports2.UpdateCertificateRequest$ = exports2.UpdateCertificateProviderResponse$ = exports2.UpdateCertificateProviderRequest$ = exports2.UpdateCACertificateRequest$ = exports2.UpdateCACertificateParams$ = exports2.UpdateBillingGroupResponse$ = exports2.UpdateBillingGroupRequest$ = exports2.UpdateAuthorizerResponse$ = exports2.UpdateAuthorizerRequest$ = exports2.UpdateAuditSuppressionResponse$ = exports2.UpdateAuditSuppressionRequest$ = exports2.UpdateAccountAuditConfigurationResponse$ = exports2.UpdateAccountAuditConfigurationRequest$ = exports2.UntagResourceResponse$ = exports2.UntagResourceRequest$ = exports2.TransferData$ = exports2.TransferCertificateResponse$ = exports2.TransferCertificateRequest$ = exports2.TopicRulePayload$ = exports2.TopicRuleListItem$ = exports2.TopicRuleDestinationSummary$ = exports2.TopicRuleDestinationConfiguration$ = exports2.TopicRuleDestination$ = exports2.TopicRule$ = exports2.TlsContext$ = exports2.TlsConfig$ = exports2.TimestreamTimestamp$ = exports2.TimestreamDimension$ = void 0;
    exports2.CancelDetectMitigationActionsTask$ = exports2.CancelCertificateTransfer$ = exports2.CancelAuditTask$ = exports2.CancelAuditMitigationActionsTask$ = exports2.AttachThingPrincipal$ = exports2.AttachSecurityProfile$ = exports2.AttachPrincipalPolicy$ = exports2.AttachPolicy$ = exports2.AssociateTargetsWithJob$ = exports2.AssociateSbomWithPackageVersion$ = exports2.AddThingToThingGroup$ = exports2.AddThingToBillingGroup$ = exports2.AcceptCertificateTransfer$ = exports2.AssetPropertyVariant$ = exports2.VpcDestinationSummary$ = exports2.VpcDestinationProperties$ = exports2.VpcDestinationConfiguration$ = exports2.ViolationEventOccurrenceRange$ = exports2.ViolationEventAdditionalInfo$ = exports2.ViolationEvent$ = exports2.VersionUpdateByJobsConfig$ = exports2.ValidationError$ = exports2.ValidateSecurityProfileBehaviorsResponse$ = exports2.ValidateSecurityProfileBehaviorsRequest$ = exports2.UserProperty$ = exports2.UpdateTopicRuleDestinationResponse$ = exports2.UpdateTopicRuleDestinationRequest$ = exports2.UpdateThingTypeResponse$ = exports2.UpdateThingTypeRequest$ = exports2.UpdateThingResponse$ = exports2.UpdateThingRequest$ = exports2.UpdateThingGroupsForThingResponse$ = exports2.UpdateThingGroupsForThingRequest$ = exports2.UpdateThingGroupResponse$ = exports2.UpdateThingGroupRequest$ = exports2.UpdateStreamResponse$ = exports2.UpdateStreamRequest$ = exports2.UpdateSecurityProfileResponse$ = exports2.UpdateSecurityProfileRequest$ = exports2.UpdateScheduledAuditResponse$ = exports2.UpdateScheduledAuditRequest$ = exports2.UpdateRoleAliasResponse$ = exports2.UpdateRoleAliasRequest$ = exports2.UpdateProvisioningTemplateResponse$ = exports2.UpdateProvisioningTemplateRequest$ = exports2.UpdatePackageVersionResponse$ = exports2.UpdatePackageVersionRequest$ = exports2.UpdatePackageResponse$ = exports2.UpdatePackageRequest$ = exports2.UpdatePackageConfigurationResponse$ = void 0;
    exports2.DeleteFleetMetric$ = exports2.DeleteDynamicThingGroup$ = exports2.DeleteDomainConfiguration$ = exports2.DeleteDimension$ = exports2.DeleteCustomMetric$ = exports2.DeleteCommandExecution$ = exports2.DeleteCommand$ = exports2.DeleteCertificateProvider$ = exports2.DeleteCertificate$ = exports2.DeleteCACertificate$ = exports2.DeleteBillingGroup$ = exports2.DeleteAuthorizer$ = exports2.DeleteAuditSuppression$ = exports2.DeleteAccountAuditConfiguration$ = exports2.CreateTopicRuleDestination$ = exports2.CreateTopicRule$ = exports2.CreateThingType$ = exports2.CreateThingGroup$ = exports2.CreateThing$ = exports2.CreateStream$ = exports2.CreateSecurityProfile$ = exports2.CreateScheduledAudit$ = exports2.CreateRoleAlias$ = exports2.CreateProvisioningTemplateVersion$ = exports2.CreateProvisioningTemplate$ = exports2.CreateProvisioningClaim$ = exports2.CreatePolicyVersion$ = exports2.CreatePolicy$ = exports2.CreatePackageVersion$ = exports2.CreatePackage$ = exports2.CreateOTAUpdate$ = exports2.CreateMitigationAction$ = exports2.CreateKeysAndCertificate$ = exports2.CreateJobTemplate$ = exports2.CreateJob$ = exports2.CreateFleetMetric$ = exports2.CreateDynamicThingGroup$ = exports2.CreateDomainConfiguration$ = exports2.CreateDimension$ = exports2.CreateCustomMetric$ = exports2.CreateCommand$ = exports2.CreateCertificateProvider$ = exports2.CreateCertificateFromCsr$ = exports2.CreateBillingGroup$ = exports2.CreateAuthorizer$ = exports2.CreateAuditSuppression$ = exports2.ConfirmTopicRuleDestination$ = exports2.ClearDefaultAuthorizer$ = exports2.CancelJobExecution$ = exports2.CancelJob$ = void 0;
    exports2.DescribeProvisioningTemplateVersion$ = exports2.DescribeProvisioningTemplate$ = exports2.DescribeMitigationAction$ = exports2.DescribeManagedJobTemplate$ = exports2.DescribeJobTemplate$ = exports2.DescribeJobExecution$ = exports2.DescribeJob$ = exports2.DescribeIndex$ = exports2.DescribeFleetMetric$ = exports2.DescribeEventConfigurations$ = exports2.DescribeEndpoint$ = exports2.DescribeEncryptionConfiguration$ = exports2.DescribeDomainConfiguration$ = exports2.DescribeDimension$ = exports2.DescribeDetectMitigationActionsTask$ = exports2.DescribeDefaultAuthorizer$ = exports2.DescribeCustomMetric$ = exports2.DescribeCertificateProvider$ = exports2.DescribeCertificate$ = exports2.DescribeCACertificate$ = exports2.DescribeBillingGroup$ = exports2.DescribeAuthorizer$ = exports2.DescribeAuditTask$ = exports2.DescribeAuditSuppression$ = exports2.DescribeAuditMitigationActionsTask$ = exports2.DescribeAuditFinding$ = exports2.DescribeAccountAuditConfiguration$ = exports2.DeprecateThingType$ = exports2.DeleteV2LoggingLevel$ = exports2.DeleteTopicRuleDestination$ = exports2.DeleteTopicRule$ = exports2.DeleteThingType$ = exports2.DeleteThingGroup$ = exports2.DeleteThing$ = exports2.DeleteStream$ = exports2.DeleteSecurityProfile$ = exports2.DeleteScheduledAudit$ = exports2.DeleteRoleAlias$ = exports2.DeleteRegistrationCode$ = exports2.DeleteProvisioningTemplateVersion$ = exports2.DeleteProvisioningTemplate$ = exports2.DeletePolicyVersion$ = exports2.DeletePolicy$ = exports2.DeletePackageVersion$ = exports2.DeletePackage$ = exports2.DeleteOTAUpdate$ = exports2.DeleteMitigationAction$ = exports2.DeleteJobTemplate$ = exports2.DeleteJobExecution$ = exports2.DeleteJob$ = void 0;
    exports2.ListCertificatesByCA$ = exports2.ListCertificates$ = exports2.ListCertificateProviders$ = exports2.ListCACertificates$ = exports2.ListBillingGroups$ = exports2.ListAuthorizers$ = exports2.ListAuditTasks$ = exports2.ListAuditSuppressions$ = exports2.ListAuditMitigationActionsTasks$ = exports2.ListAuditMitigationActionsExecutions$ = exports2.ListAuditFindings$ = exports2.ListAttachedPolicies$ = exports2.ListActiveViolations$ = exports2.GetV2LoggingOptions$ = exports2.GetTopicRuleDestination$ = exports2.GetTopicRule$ = exports2.GetThingConnectivityData$ = exports2.GetStatistics$ = exports2.GetRegistrationCode$ = exports2.GetPolicyVersion$ = exports2.GetPolicy$ = exports2.GetPercentiles$ = exports2.GetPackageVersion$ = exports2.GetPackageConfiguration$ = exports2.GetPackage$ = exports2.GetOTAUpdate$ = exports2.GetLoggingOptions$ = exports2.GetJobDocument$ = exports2.GetIndexingConfiguration$ = exports2.GetEffectivePolicies$ = exports2.GetCommandExecution$ = exports2.GetCommand$ = exports2.GetCardinality$ = exports2.GetBucketsAggregation$ = exports2.GetBehaviorModelTrainingSummaries$ = exports2.EnableTopicRule$ = exports2.DisassociateSbomFromPackageVersion$ = exports2.DisableTopicRule$ = exports2.DetachThingPrincipal$ = exports2.DetachSecurityProfile$ = exports2.DetachPrincipalPolicy$ = exports2.DetachPolicy$ = exports2.DescribeThingType$ = exports2.DescribeThingRegistrationTask$ = exports2.DescribeThingGroup$ = exports2.DescribeThing$ = exports2.DescribeStream$ = exports2.DescribeSecurityProfile$ = exports2.DescribeScheduledAudit$ = exports2.DescribeRoleAlias$ = void 0;
    exports2.ListTopicRules$ = exports2.ListTopicRuleDestinations$ = exports2.ListThingTypes$ = exports2.ListThingsInThingGroup$ = exports2.ListThingsInBillingGroup$ = exports2.ListThings$ = exports2.ListThingRegistrationTasks$ = exports2.ListThingRegistrationTaskReports$ = exports2.ListThingPrincipalsV2$ = exports2.ListThingPrincipals$ = exports2.ListThingGroupsForThing$ = exports2.ListThingGroups$ = exports2.ListTargetsForSecurityProfile$ = exports2.ListTargetsForPolicy$ = exports2.ListTagsForResource$ = exports2.ListStreams$ = exports2.ListSecurityProfilesForTarget$ = exports2.ListSecurityProfiles$ = exports2.ListScheduledAudits$ = exports2.ListSbomValidationResults$ = exports2.ListRoleAliases$ = exports2.ListRelatedResourcesForAuditFinding$ = exports2.ListProvisioningTemplateVersions$ = exports2.ListProvisioningTemplates$ = exports2.ListPrincipalThingsV2$ = exports2.ListPrincipalThings$ = exports2.ListPrincipalPolicies$ = exports2.ListPolicyVersions$ = exports2.ListPolicyPrincipals$ = exports2.ListPolicies$ = exports2.ListPackageVersions$ = exports2.ListPackages$ = exports2.ListOutgoingCertificates$ = exports2.ListOTAUpdates$ = exports2.ListMitigationActions$ = exports2.ListMetricValues$ = exports2.ListManagedJobTemplates$ = exports2.ListJobTemplates$ = exports2.ListJobs$ = exports2.ListJobExecutionsForThing$ = exports2.ListJobExecutionsForJob$ = exports2.ListIndices$ = exports2.ListFleetMetrics$ = exports2.ListDomainConfigurations$ = exports2.ListDimensions$ = exports2.ListDetectMitigationActionsTasks$ = exports2.ListDetectMitigationActionsExecutions$ = exports2.ListCustomMetrics$ = exports2.ListCommands$ = exports2.ListCommandExecutions$ = void 0;
    exports2.UpdateRoleAlias$ = exports2.UpdateProvisioningTemplate$ = exports2.UpdatePackageVersion$ = exports2.UpdatePackageConfiguration$ = exports2.UpdatePackage$ = exports2.UpdateMitigationAction$ = exports2.UpdateJob$ = exports2.UpdateIndexingConfiguration$ = exports2.UpdateFleetMetric$ = exports2.UpdateEventConfigurations$ = exports2.UpdateEncryptionConfiguration$ = exports2.UpdateDynamicThingGroup$ = exports2.UpdateDomainConfiguration$ = exports2.UpdateDimension$ = exports2.UpdateCustomMetric$ = exports2.UpdateCommand$ = exports2.UpdateCertificateProvider$ = exports2.UpdateCertificate$ = exports2.UpdateCACertificate$ = exports2.UpdateBillingGroup$ = exports2.UpdateAuthorizer$ = exports2.UpdateAuditSuppression$ = exports2.UpdateAccountAuditConfiguration$ = exports2.UntagResource$ = exports2.TransferCertificate$ = exports2.TestInvokeAuthorizer$ = exports2.TestAuthorization$ = exports2.TagResource$ = exports2.StopThingRegistrationTask$ = exports2.StartThingRegistrationTask$ = exports2.StartOnDemandAuditTask$ = exports2.StartDetectMitigationActionsTask$ = exports2.StartAuditMitigationActionsTask$ = exports2.SetV2LoggingOptions$ = exports2.SetV2LoggingLevel$ = exports2.SetLoggingOptions$ = exports2.SetDefaultPolicyVersion$ = exports2.SetDefaultAuthorizer$ = exports2.SearchIndex$ = exports2.ReplaceTopicRule$ = exports2.RemoveThingFromThingGroup$ = exports2.RemoveThingFromBillingGroup$ = exports2.RejectCertificateTransfer$ = exports2.RegisterThing$ = exports2.RegisterCertificateWithoutCA$ = exports2.RegisterCertificate$ = exports2.RegisterCACertificate$ = exports2.PutVerificationStateOnViolation$ = exports2.ListViolationEvents$ = exports2.ListV2LoggingLevels$ = void 0;
    exports2.ValidateSecurityProfileBehaviors$ = exports2.UpdateTopicRuleDestination$ = exports2.UpdateThingType$ = exports2.UpdateThingGroupsForThing$ = exports2.UpdateThingGroup$ = exports2.UpdateThing$ = exports2.UpdateStream$ = exports2.UpdateSecurityProfile$ = exports2.UpdateScheduledAudit$ = void 0;
    var _A2 = "Action";
    var _AC = "AbortConfig";
    var _ACC = "AuditCheckConfiguration";
    var _ACCu = "AuditCheckConfigurations";
    var _ACD = "AuditCheckDetails";
    var _ACL = "AbortCriteriaList";
    var _ACT = "AcceptCertificateTransfer";
    var _ACTAM = "AuditCheckToActionsMapping";
    var _ACTR = "AcceptCertificateTransferRequest";
    var _ACTRCF = "AuditCheckToReasonCodeFilter";
    var _ACb = "AbortCriteria";
    var _ACu = "AuthorizerConfig";
    var _AD = "AuthorizerDescription";
    var _ADu = "AuditDetails";
    var _AF = "AuditFinding";
    var _AFu = "AuditFindings";
    var _AI = "AuthInfo";
    var _AIu = "AuthInfos";
    var _AJAC = "AwsJobAbortConfig";
    var _AJACL = "AwsJobAbortCriteriaList";
    var _AJACw = "AwsJobAbortCriteria";
    var _AJERC = "AwsJobExecutionsRolloutConfig";
    var _AJERR = "AwsJobExponentialRolloutRate";
    var _AJPUC = "AwsJobPresignedUrlConfig";
    var _AJRIC = "AwsJobRateIncreaseCriteria";
    var _AJSCPC = "AwsJsonSubstitutionCommandPreprocessorConfig";
    var _AJTC = "AwsJobTimeoutConfig";
    var _AL = "ActionList";
    var _AMAEM = "AuditMitigationActionExecutionMetadata";
    var _AMAEML = "AuditMitigationActionExecutionMetadataList";
    var _AMATM = "AuditMitigationActionsTaskMetadata";
    var _AMATML = "AuditMitigationActionsTaskMetadataList";
    var _AMATS = "AuditMitigationActionsTaskStatistics";
    var _AMATT = "AuditMitigationActionsTaskTarget";
    var _AMTRVL = "AdditionalMetricsToRetainV2List";
    var _ANT = "AuditNotificationTarget";
    var _ANTC = "AuditNotificationTargetConfigurations";
    var _AP = "AttributePayload";
    var _APP = "AttachPrincipalPolicy";
    var _APPR = "AttachPrincipalPolicyRequest";
    var _APR = "AttachPolicyRequest";
    var _APT = "AssetPropertyTimestamp";
    var _APV = "AssetPropertyValue";
    var _APVL = "AssetPropertyValueList";
    var _APVs = "AssetPropertyVariant";
    var _APt = "AttachPolicy";
    var _AR2 = "AuthResult";
    var _ARu = "AuthResults";
    var _AS = "AuditSuppression";
    var _ASL = "AuditSuppressionList";
    var _ASP = "AttachSecurityProfile";
    var _ASPR = "AttachSecurityProfileRequest";
    var _ASPRt = "AttachSecurityProfileResponse";
    var _ASWPV = "AssociateSbomWithPackageVersion";
    var _ASWPVR = "AssociateSbomWithPackageVersionRequest";
    var _ASWPVRs = "AssociateSbomWithPackageVersionResponse";
    var _ASu = "AuthorizerSummary";
    var _AT3 = "AggregationType";
    var _ATM = "AuditTaskMetadata";
    var _ATML = "AuditTaskMetadataList";
    var _ATP = "AttachThingPrincipal";
    var _ATPR = "AttachThingPrincipalRequest";
    var _ATPRt = "AttachThingPrincipalResponse";
    var _ATTBG = "AddThingToBillingGroup";
    var _ATTBGR = "AddThingToBillingGroupRequest";
    var _ATTBGRd = "AddThingToBillingGroupResponse";
    var _ATTTG = "AddThingToThingGroup";
    var _ATTTGP = "AddThingsToThingGroupParams";
    var _ATTTGR = "AddThingToThingGroupRequest";
    var _ATTTGRd = "AddThingToThingGroupResponse";
    var _ATWJ = "AssociateTargetsWithJob";
    var _ATWJR = "AssociateTargetsWithJobRequest";
    var _ATWJRs = "AssociateTargetsWithJobResponse";
    var _ATl = "AlertTarget";
    var _ATle = "AlertTargets";
    var _AV = "ActiveViolation";
    var _AVc = "ActiveViolations";
    var _Al = "Allowed";
    var _Au2 = "Authorizers";
    var _B = "Behavior";
    var _BAT = "BucketsAggregationType";
    var _BC = "BatchConfig";
    var _BCe = "BehaviorCriteria";
    var _BGM = "BillingGroupMetadata";
    var _BGNAAL = "BillingGroupNameAndArnList";
    var _BGP = "BillingGroupProperties";
    var _BIN = "BIN";
    var _BMTS = "BehaviorModelTrainingSummary";
    var _BMTSe = "BehaviorModelTrainingSummaries";
    var _B_ = "B";
    var _Be = "Behaviors";
    var _Bu = "Bucket";
    var _Buc = "Buckets";
    var _C2 = "Certificate";
    var _CA2 = "CreateAuthorizer";
    var _CAA = "CloudwatchAlarmAction";
    var _CAC = "CACertificate";
    var _CACD = "CACertificateDescription";
    var _CACe = "CACertificates";
    var _CAMAT = "CancelAuditMitigationActionsTask";
    var _CAMATR = "CancelAuditMitigationActionsTaskRequest";
    var _CAMATRa = "CancelAuditMitigationActionsTaskResponse";
    var _CAR = "CreateAuthorizerRequest";
    var _CARr = "CreateAuthorizerResponse";
    var _CAS = "CreateAuditSuppression";
    var _CASR = "CreateAuditSuppressionRequest";
    var _CASRr = "CreateAuditSuppressionResponse";
    var _CAT = "CancelAuditTask";
    var _CATN = "ConnectivityApiThingName";
    var _CATR = "CancelAuditTaskRequest";
    var _CATRa = "CancelAuditTaskResponse";
    var _CBG = "CreateBillingGroup";
    var _CBGR = "CreateBillingGroupRequest";
    var _CBGRr = "CreateBillingGroupResponse";
    var _CC = "CreateCommand";
    var _CCC = "ClientCertificateConfig";
    var _CCE = "CertificateConflictException";
    var _CCFC = "CreateCertificateFromCsr";
    var _CCFCR = "CreateCertificateFromCsrRequest";
    var _CCFCRr = "CreateCertificateFromCsrResponse";
    var _CCM = "CreateCustomMetric";
    var _CCMR = "CreateCustomMetricRequest";
    var _CCMRr = "CreateCustomMetricResponse";
    var _CCP = "CreateCertificateProvider";
    var _CCPR = "CreateCertificateProviderRequest";
    var _CCPRr = "CreateCertificateProviderResponse";
    var _CCR = "CreateCommandRequest";
    var _CCRr = "CreateCommandResponse";
    var _CCS = "CustomCodeSigning";
    var _CCT = "CancelCertificateTransfer";
    var _CCTR = "CancelCertificateTransferRequest";
    var _CD = "CertificateDescription";
    var _CDA = "ClearDefaultAuthorizer";
    var _CDAR = "ClearDefaultAuthorizerRequest";
    var _CDARl = "ClearDefaultAuthorizerResponse";
    var _CDC = "CreateDomainConfiguration";
    var _CDCR = "CreateDomainConfigurationRequest";
    var _CDCRr = "CreateDomainConfigurationResponse";
    var _CDMAT = "CancelDetectMitigationActionsTask";
    var _CDMATR = "CancelDetectMitigationActionsTaskRequest";
    var _CDMATRa = "CancelDetectMitigationActionsTaskResponse";
    var _CDR = "CreateDimensionRequest";
    var _CDRr = "CreateDimensionResponse";
    var _CDTG = "CreateDynamicThingGroup";
    var _CDTGR = "CreateDynamicThingGroupRequest";
    var _CDTGRr = "CreateDynamicThingGroupResponse";
    var _CDo = "ConfigurationDetails";
    var _CDr = "CreateDimension";
    var _CE = "ConflictException";
    var _CEPM = "CommandExecutionParameterMap";
    var _CER = "CommandExecutionResult";
    var _CERM = "CommandExecutionResultMap";
    var _CES = "CommandExecutionSummary";
    var _CESL = "CommandExecutionSummaryList";
    var _CFM = "CreateFleetMetric";
    var _CFMR = "CreateFleetMetricRequest";
    var _CFMRr = "CreateFleetMetricResponse";
    var _CJ = "CancelJob";
    var _CJE = "CancelJobExecution";
    var _CJER = "CancelJobExecutionRequest";
    var _CJR = "CancelJobRequest";
    var _CJRa = "CancelJobResponse";
    var _CJRr = "CreateJobRequest";
    var _CJRre = "CreateJobResponse";
    var _CJT = "CreateJobTemplate";
    var _CJTR = "CreateJobTemplateRequest";
    var _CJTRr = "CreateJobTemplateResponse";
    var _CJr = "CreateJob";
    var _CKAC = "CreateKeysAndCertificate";
    var _CKACR = "CreateKeysAndCertificateRequest";
    var _CKACRr = "CreateKeysAndCertificateResponse";
    var _CLA = "CloudwatchLogsAction";
    var _CMA = "CloudwatchMetricAction";
    var _CMAR = "CreateMitigationActionRequest";
    var _CMARr = "CreateMitigationActionResponse";
    var _CMAr = "CreateMitigationAction";
    var _COTAU = "CreateOTAUpdate";
    var _COTAUR = "CreateOTAUpdateRequest";
    var _COTAURr = "CreateOTAUpdateResponse";
    var _CP = "CommandParameter";
    var _CPC = "CreateProvisioningClaim";
    var _CPCR = "CreateProvisioningClaimRequest";
    var _CPCRr = "CreateProvisioningClaimResponse";
    var _CPL = "CommandParameterList";
    var _CPR = "CreatePackageRequest";
    var _CPRr = "CreatePackageResponse";
    var _CPRre = "CreatePolicyRequest";
    var _CPRrea = "CreatePolicyResponse";
    var _CPS = "CertificateProviderSummary";
    var _CPT = "CreateProvisioningTemplate";
    var _CPTR = "CreateProvisioningTemplateRequest";
    var _CPTRr = "CreateProvisioningTemplateResponse";
    var _CPTV = "CreateProvisioningTemplateVersion";
    var _CPTVR = "CreateProvisioningTemplateVersionRequest";
    var _CPTVRr = "CreateProvisioningTemplateVersionResponse";
    var _CPV = "CommandParameterValue";
    var _CPVC = "CommandParameterValueCondition";
    var _CPVCL = "CommandParameterValueConditionList";
    var _CPVCO = "CommandParameterValueComparisonOperand";
    var _CPVNR = "CommandParameterValueNumberRange";
    var _CPVR = "CreatePackageVersionRequest";
    var _CPVRr = "CreatePackageVersionResponse";
    var _CPVRre = "CreatePolicyVersionRequest";
    var _CPVRrea = "CreatePolicyVersionResponse";
    var _CPVr = "CreatePackageVersion";
    var _CPVre = "CreatePolicyVersion";
    var _CPe = "CertificateProviders";
    var _CPo = "CommandPayload";
    var _CPom = "CommandPreprocessor";
    var _CPr = "CreatePackage";
    var _CPre = "CreatePolicy";
    var _CRA = "CreateRoleAlias";
    var _CRAR = "CreateRoleAliasRequest";
    var _CRARr = "CreateRoleAliasResponse";
    var _CRUE = "ConflictingResourceUpdateException";
    var _CS2 = "CodeSigning";
    var _CSA = "CreateScheduledAudit";
    var _CSAR = "CreateScheduledAuditRequest";
    var _CSARr = "CreateScheduledAuditResponse";
    var _CSCC = "CodeSigningCertificateChain";
    var _CSE = "CertificateStateException";
    var _CSL = "CommandSummaryList";
    var _CSP = "CreateSecurityProfile";
    var _CSPR = "CreateSecurityProfileRequest";
    var _CSPRr = "CreateSecurityProfileResponse";
    var _CSR = "CreateStreamRequest";
    var _CSRr = "CreateStreamResponse";
    var _CSS = "CodeSigningSignature";
    var _CSo = "CommandSummary";
    var _CSr = "CreateStream";
    var _CT2 = "CreateThing";
    var _CTG = "CreateThingGroup";
    var _CTGR = "CreateThingGroupRequest";
    var _CTGRr = "CreateThingGroupResponse";
    var _CTR2 = "CreateThingRequest";
    var _CTRD = "ConfirmTopicRuleDestination";
    var _CTRDR = "ConfirmTopicRuleDestinationRequest";
    var _CTRDRo = "ConfirmTopicRuleDestinationResponse";
    var _CTRDRr = "CreateTopicRuleDestinationRequest";
    var _CTRDRre = "CreateTopicRuleDestinationResponse";
    var _CTRDr = "CreateTopicRuleDestination";
    var _CTRR = "CreateTopicRuleRequest";
    var _CTRr2 = "CreateThingResponse";
    var _CTRre = "CreateTopicRule";
    var _CTT = "CreateThingType";
    var _CTTR = "CreateThingTypeRequest";
    var _CTTRr = "CreateThingTypeResponse";
    var _CV2 = "CertificateValidity";
    var _CVE = "CertificateValidationException";
    var _Ce = "Certificates";
    var _Co = "Configuration";
    var _D = "D";
    var _DA = "DeleteAuthorizer";
    var _DAAC = "DeleteAccountAuditConfiguration";
    var _DAACR = "DeleteAccountAuditConfigurationRequest";
    var _DAACRe = "DeleteAccountAuditConfigurationResponse";
    var _DAACRes = "DescribeAccountAuditConfigurationRequest";
    var _DAACResc = "DescribeAccountAuditConfigurationResponse";
    var _DAACe = "DescribeAccountAuditConfiguration";
    var _DAF = "DescribeAuditFinding";
    var _DAFR = "DescribeAuditFindingRequest";
    var _DAFRe = "DescribeAuditFindingResponse";
    var _DAMAT = "DescribeAuditMitigationActionsTask";
    var _DAMATR = "DescribeAuditMitigationActionsTaskRequest";
    var _DAMATRe = "DescribeAuditMitigationActionsTaskResponse";
    var _DAR = "DeleteAuthorizerRequest";
    var _DARe = "DeleteAuthorizerResponse";
    var _DARes = "DescribeAuthorizerRequest";
    var _DAResc = "DescribeAuthorizerResponse";
    var _DAS = "DeleteAuditSuppression";
    var _DASR = "DeleteAuditSuppressionRequest";
    var _DASRe = "DeleteAuditSuppressionResponse";
    var _DASRes = "DescribeAuditSuppressionRequest";
    var _DASResc = "DescribeAuditSuppressionResponse";
    var _DASe = "DescribeAuditSuppression";
    var _DAT = "DescribeAuditTask";
    var _DATR = "DescribeAuditTaskRequest";
    var _DATRe = "DescribeAuditTaskResponse";
    var _DAe = "DescribeAuthorizer";
    var _DBG = "DeleteBillingGroup";
    var _DBGR = "DeleteBillingGroupRequest";
    var _DBGRe = "DeleteBillingGroupResponse";
    var _DBGRes = "DescribeBillingGroupRequest";
    var _DBGResc = "DescribeBillingGroupResponse";
    var _DBGe = "DescribeBillingGroup";
    var _DC = "DomainConfigurations";
    var _DCAC = "DeleteCACertificate";
    var _DCACR = "DeleteCACertificateRequest";
    var _DCACRe = "DeleteCACertificateResponse";
    var _DCACRes = "DescribeCACertificateRequest";
    var _DCACResc = "DescribeCACertificateResponse";
    var _DCACe = "DescribeCACertificate";
    var _DCE = "DeleteConflictException";
    var _DCER = "DeleteCommandExecutionRequest";
    var _DCERe = "DeleteCommandExecutionResponse";
    var _DCEe = "DeleteCommandExecution";
    var _DCM = "DeleteCustomMetric";
    var _DCMR = "DeleteCustomMetricRequest";
    var _DCMRe = "DeleteCustomMetricResponse";
    var _DCMRes = "DescribeCustomMetricRequest";
    var _DCMResc = "DescribeCustomMetricResponse";
    var _DCMe = "DescribeCustomMetric";
    var _DCP = "DeleteCertificateProvider";
    var _DCPR = "DeleteCertificateProviderRequest";
    var _DCPRe = "DeleteCertificateProviderResponse";
    var _DCPRes = "DescribeCertificateProviderRequest";
    var _DCPResc = "DescribeCertificateProviderResponse";
    var _DCPe = "DescribeCertificateProvider";
    var _DCR = "DeleteCertificateRequest";
    var _DCRe = "DeleteCommandRequest";
    var _DCRel = "DeleteCommandResponse";
    var _DCRes = "DescribeCertificateRequest";
    var _DCResc = "DescribeCertificateResponse";
    var _DCS = "DomainConfigurationSummary";
    var _DCe = "DeleteCertificate";
    var _DCel = "DeleteCommand";
    var _DCes = "DescribeCertificate";
    var _DD = "DeleteDimension";
    var _DDA = "DescribeDefaultAuthorizer";
    var _DDAR = "DescribeDefaultAuthorizerRequest";
    var _DDARe = "DescribeDefaultAuthorizerResponse";
    var _DDBA = "DynamoDBAction";
    var _DDBAy = "DynamoDBv2Action";
    var _DDC = "DeleteDomainConfiguration";
    var _DDCR = "DeleteDomainConfigurationRequest";
    var _DDCRe = "DeleteDomainConfigurationResponse";
    var _DDCRes = "DescribeDomainConfigurationRequest";
    var _DDCResc = "DescribeDomainConfigurationResponse";
    var _DDCe = "DescribeDomainConfiguration";
    var _DDMAT = "DescribeDetectMitigationActionsTask";
    var _DDMATR = "DescribeDetectMitigationActionsTaskRequest";
    var _DDMATRe = "DescribeDetectMitigationActionsTaskResponse";
    var _DDR = "DeleteDimensionRequest";
    var _DDRe = "DeleteDimensionResponse";
    var _DDRes = "DescribeDimensionRequest";
    var _DDResc = "DescribeDimensionResponse";
    var _DDTG = "DeleteDynamicThingGroup";
    var _DDTGR = "DeleteDynamicThingGroupRequest";
    var _DDTGRe = "DeleteDynamicThingGroupResponse";
    var _DDe = "DescribeDimension";
    var _DE = "DescribeEndpoint";
    var _DEC = "DescribeEncryptionConfiguration";
    var _DECR = "DescribeEncryptionConfigurationRequest";
    var _DECRe = "DescribeEncryptionConfigurationResponse";
    var _DECRes = "DescribeEventConfigurationsRequest";
    var _DECResc = "DescribeEventConfigurationsResponse";
    var _DECe = "DescribeEventConfigurations";
    var _DER = "DescribeEndpointRequest";
    var _DERe = "DescribeEndpointResponse";
    var _DFM = "DeleteFleetMetric";
    var _DFMR = "DeleteFleetMetricRequest";
    var _DFMRe = "DescribeFleetMetricRequest";
    var _DFMRes = "DescribeFleetMetricResponse";
    var _DFMe = "DescribeFleetMetric";
    var _DI = "DescribeIndex";
    var _DIR = "DescribeIndexRequest";
    var _DIRe = "DescribeIndexResponse";
    var _DJ = "DeleteJob";
    var _DJE = "DeleteJobExecution";
    var _DJER = "DeleteJobExecutionRequest";
    var _DJERe = "DescribeJobExecutionRequest";
    var _DJERes = "DescribeJobExecutionResponse";
    var _DJEe = "DescribeJobExecution";
    var _DJR = "DeleteJobRequest";
    var _DJRe = "DescribeJobRequest";
    var _DJRes = "DescribeJobResponse";
    var _DJT = "DeleteJobTemplate";
    var _DJTR = "DeleteJobTemplateRequest";
    var _DJTRe = "DescribeJobTemplateRequest";
    var _DJTRes = "DescribeJobTemplateResponse";
    var _DJTe = "DescribeJobTemplate";
    var _DJe = "DescribeJob";
    var _DMA = "DeleteMitigationAction";
    var _DMAE = "DetectMitigationActionExecution";
    var _DMAEL = "DetectMitigationActionExecutionList";
    var _DMAR = "DeleteMitigationActionRequest";
    var _DMARe = "DeleteMitigationActionResponse";
    var _DMARes = "DescribeMitigationActionRequest";
    var _DMAResc = "DescribeMitigationActionResponse";
    var _DMATS = "DetectMitigationActionsTaskStatistics";
    var _DMATSL = "DetectMitigationActionsTaskSummaryList";
    var _DMATSe = "DetectMitigationActionsTaskSummary";
    var _DMATT = "DetectMitigationActionsTaskTarget";
    var _DMAe = "DescribeMitigationAction";
    var _DMJT = "DescribeManagedJobTemplate";
    var _DMJTR = "DescribeManagedJobTemplateRequest";
    var _DMJTRe = "DescribeManagedJobTemplateResponse";
    var _DOTAU = "DeleteOTAUpdate";
    var _DOTAUR = "DeleteOTAUpdateRequest";
    var _DOTAURe = "DeleteOTAUpdateResponse";
    var _DP = "DocumentParameter";
    var _DPP = "DetachPrincipalPolicy";
    var _DPPR = "DetachPrincipalPolicyRequest";
    var _DPR = "DeletePackageRequest";
    var _DPRe = "DeletePackageResponse";
    var _DPRel = "DeletePolicyRequest";
    var _DPRet = "DetachPolicyRequest";
    var _DPT = "DeleteProvisioningTemplate";
    var _DPTR = "DeleteProvisioningTemplateRequest";
    var _DPTRe = "DeleteProvisioningTemplateResponse";
    var _DPTRes = "DescribeProvisioningTemplateRequest";
    var _DPTResc = "DescribeProvisioningTemplateResponse";
    var _DPTV = "DeleteProvisioningTemplateVersion";
    var _DPTVR = "DeleteProvisioningTemplateVersionRequest";
    var _DPTVRe = "DeleteProvisioningTemplateVersionResponse";
    var _DPTVRes = "DescribeProvisioningTemplateVersionRequest";
    var _DPTVResc = "DescribeProvisioningTemplateVersionResponse";
    var _DPTVe = "DescribeProvisioningTemplateVersion";
    var _DPTe = "DescribeProvisioningTemplate";
    var _DPV = "DeletePackageVersion";
    var _DPVR = "DeletePackageVersionRequest";
    var _DPVRe = "DeletePackageVersionResponse";
    var _DPVRel = "DeletePolicyVersionRequest";
    var _DPVe = "DeletePolicyVersion";
    var _DPe = "DeletePackage";
    var _DPel = "DeletePolicy";
    var _DPet = "DetachPolicy";
    var _DPo = "DocumentParameters";
    var _DRA = "DeleteRoleAlias";
    var _DRAR = "DeleteRoleAliasRequest";
    var _DRARe = "DeleteRoleAliasResponse";
    var _DRARes = "DescribeRoleAliasRequest";
    var _DRAResc = "DescribeRoleAliasResponse";
    var _DRAe = "DescribeRoleAlias";
    var _DRC = "DeleteRegistrationCode";
    var _DRCR = "DeleteRegistrationCodeRequest";
    var _DRCRe = "DeleteRegistrationCodeResponse";
    var _DS2 = "DeleteStream";
    var _DSA = "DeleteScheduledAudit";
    var _DSAR = "DeleteScheduledAuditRequest";
    var _DSARe = "DeleteScheduledAuditResponse";
    var _DSARes = "DescribeScheduledAuditRequest";
    var _DSAResc = "DescribeScheduledAuditResponse";
    var _DSAe = "DescribeScheduledAudit";
    var _DSFPV = "DisassociateSbomFromPackageVersion";
    var _DSFPVR = "DisassociateSbomFromPackageVersionRequest";
    var _DSFPVRi = "DisassociateSbomFromPackageVersionResponse";
    var _DSP = "DeleteSecurityProfile";
    var _DSPR = "DeleteSecurityProfileRequest";
    var _DSPRe = "DeleteSecurityProfileResponse";
    var _DSPRes = "DescribeSecurityProfileRequest";
    var _DSPResc = "DescribeSecurityProfileResponse";
    var _DSPRet = "DetachSecurityProfileRequest";
    var _DSPReta = "DetachSecurityProfileResponse";
    var _DSPe = "DescribeSecurityProfile";
    var _DSPet = "DetachSecurityProfile";
    var _DSR = "DeleteStreamRequest";
    var _DSRe = "DeleteStreamResponse";
    var _DSRes = "DescribeStreamRequest";
    var _DSResc = "DescribeStreamResponse";
    var _DSe = "DescribeStream";
    var _DT = "DeleteThing";
    var _DTG = "DeleteThingGroup";
    var _DTGR = "DeleteThingGroupRequest";
    var _DTGRe = "DeleteThingGroupResponse";
    var _DTGRes = "DescribeThingGroupRequest";
    var _DTGResc = "DescribeThingGroupResponse";
    var _DTGe = "DescribeThingGroup";
    var _DTP = "DetachThingPrincipal";
    var _DTPR = "DetachThingPrincipalRequest";
    var _DTPRe = "DetachThingPrincipalResponse";
    var _DTR = "DeleteThingRequest";
    var _DTRD = "DeleteTopicRuleDestination";
    var _DTRDR = "DeleteTopicRuleDestinationRequest";
    var _DTRDRe = "DeleteTopicRuleDestinationResponse";
    var _DTRR = "DeleteTopicRuleRequest";
    var _DTRRi = "DisableTopicRuleRequest";
    var _DTRT = "DescribeThingRegistrationTask";
    var _DTRTR = "DescribeThingRegistrationTaskRequest";
    var _DTRTRe = "DescribeThingRegistrationTaskResponse";
    var _DTRe = "DeleteThingResponse";
    var _DTRel = "DeleteTopicRule";
    var _DTRes = "DescribeThingRequest";
    var _DTResc = "DescribeThingResponse";
    var _DTRi = "DisableTopicRule";
    var _DTT = "DeleteThingType";
    var _DTTR = "DeleteThingTypeRequest";
    var _DTTRe = "DeleteThingTypeResponse";
    var _DTTRep = "DeprecateThingTypeRequest";
    var _DTTRepr = "DeprecateThingTypeResponse";
    var _DTTRes = "DescribeThingTypeRequest";
    var _DTTResc = "DescribeThingTypeResponse";
    var _DTTe = "DeprecateThingType";
    var _DTTes = "DescribeThingType";
    var _DTe = "DescribeThing";
    var _DVLL = "DeleteV2LoggingLevel";
    var _DVLLR = "DeleteV2LoggingLevelRequest";
    var _De = "Denied";
    var _Des = "Destination";
    var _E2 = "Enabled";
    var _EA = "ElasticsearchAction";
    var _EC = "EventConfigurations";
    var _ED = "ExplicitDeny";
    var _EI2 = "ErrorInfo";
    var _EITLP = "EnableIoTLoggingParams";
    var _EP = "EffectivePolicy";
    var _EPf = "EffectivePolicies";
    var _ERR = "ExponentialRolloutRate";
    var _ETR = "EnableTopicRule";
    var _ETRR = "EnableTopicRuleRequest";
    var _F = "Field";
    var _FA = "FirehoseAction";
    var _FL = "FileLocation";
    var _FMNAA = "FleetMetricNameAndArn";
    var _FMNAAL = "FleetMetricNameAndArnList";
    var _Fi = "Fields";
    var _GBA = "GetBucketsAggregation";
    var _GBAR = "GetBucketsAggregationRequest";
    var _GBARe = "GetBucketsAggregationResponse";
    var _GBMTS = "GetBehaviorModelTrainingSummaries";
    var _GBMTSR = "GetBehaviorModelTrainingSummariesRequest";
    var _GBMTSRe = "GetBehaviorModelTrainingSummariesResponse";
    var _GC = "GetCardinality";
    var _GCE = "GetCommandExecution";
    var _GCER = "GetCommandExecutionRequest";
    var _GCERe = "GetCommandExecutionResponse";
    var _GCR = "GetCardinalityRequest";
    var _GCRe = "GetCardinalityResponse";
    var _GCRet = "GetCommandRequest";
    var _GCReto = "GetCommandResponse";
    var _GCe = "GetCommand";
    var _GEP = "GetEffectivePolicies";
    var _GEPR = "GetEffectivePoliciesRequest";
    var _GEPRe = "GetEffectivePoliciesResponse";
    var _GIC = "GetIndexingConfiguration";
    var _GICR = "GetIndexingConfigurationRequest";
    var _GICRe = "GetIndexingConfigurationResponse";
    var _GJD = "GetJobDocument";
    var _GJDR = "GetJobDocumentRequest";
    var _GJDRe = "GetJobDocumentResponse";
    var _GLF = "GeoLocationsFilter";
    var _GLO = "GetLoggingOptions";
    var _GLOR = "GetLoggingOptionsRequest";
    var _GLORe = "GetLoggingOptionsResponse";
    var _GLT = "GeoLocationTarget";
    var _GNAA = "GroupNameAndArn";
    var _GOTAU = "GetOTAUpdate";
    var _GOTAUR = "GetOTAUpdateRequest";
    var _GOTAURe = "GetOTAUpdateResponse";
    var _GP = "GetPackage";
    var _GPC = "GetPackageConfiguration";
    var _GPCR = "GetPackageConfigurationRequest";
    var _GPCRe = "GetPackageConfigurationResponse";
    var _GPR = "GetPackageRequest";
    var _GPRe = "GetPackageResponse";
    var _GPRet = "GetPercentilesRequest";
    var _GPRete = "GetPercentilesResponse";
    var _GPReto = "GetPolicyRequest";
    var _GPRetol = "GetPolicyResponse";
    var _GPV = "GetPackageVersion";
    var _GPVR = "GetPackageVersionRequest";
    var _GPVRe = "GetPackageVersionResponse";
    var _GPVRet = "GetPolicyVersionRequest";
    var _GPVReto = "GetPolicyVersionResponse";
    var _GPVe = "GetPolicyVersion";
    var _GPe = "GetPercentiles";
    var _GPet = "GetPolicy";
    var _GRC2 = "GetRegistrationCode";
    var _GRCR2 = "GetRegistrationCodeRequest";
    var _GRCRe2 = "GetRegistrationCodeResponse";
    var _GS = "GetStatistics";
    var _GSR = "GetStatisticsRequest";
    var _GSRe = "GetStatisticsResponse";
    var _GTCD = "GetThingConnectivityData";
    var _GTCDR = "GetThingConnectivityDataRequest";
    var _GTCDRe = "GetThingConnectivityDataResponse";
    var _GTR = "GetTopicRule";
    var _GTRD = "GetTopicRuleDestination";
    var _GTRDR = "GetTopicRuleDestinationRequest";
    var _GTRDRe = "GetTopicRuleDestinationResponse";
    var _GTRR = "GetTopicRuleRequest";
    var _GTRRe = "GetTopicRuleResponse";
    var _GVLO = "GetV2LoggingOptions";
    var _GVLOR = "GetV2LoggingOptionsRequest";
    var _GVLORe = "GetV2LoggingOptionsResponse";
    var _HA = "HttpAction";
    var _HAH = "HttpActionHeader";
    var _HAt = "HttpAuthorization";
    var _HC = "HttpContext";
    var _HL = "HeaderList";
    var _HUDC = "HttpUrlDestinationConfiguration";
    var _HUDP = "HttpUrlDestinationProperties";
    var _HUDS = "HttpUrlDestinationSummary";
    var _I = "I";
    var _IAA = "IotAnalyticsAction";
    var _IAE = "InvalidAggregationException";
    var _ICI = "IssuerCertificateIdentifier";
    var _ID = "ImplicitDeny";
    var _IE = "InternalException";
    var _IEA = "IotEventsAction";
    var _IF = "IndexingFilter";
    var _IFE = "InternalFailureException";
    var _INRE = "IndexNotReadyException";
    var _IQE = "InvalidQueryException";
    var _IRE3 = "InvalidRequestException";
    var _IREn = "InvalidResponseException";
    var _ISE3 = "InternalServerException";
    var _ISTE = "InvalidStateTransitionException";
    var _ISWA = "IotSiteWiseAction";
    var _J = "Job";
    var _JE = "JobExecution";
    var _JERC = "JobExecutionsRetryConfig";
    var _JERCo = "JobExecutionsRolloutConfig";
    var _JES = "JobExecutionSummary";
    var _JESD = "JobExecutionStatusDetails";
    var _JESFJ = "JobExecutionSummaryForJob";
    var _JESFJL = "JobExecutionSummaryForJobList";
    var _JESFT = "JobExecutionSummaryForThing";
    var _JESFTL = "JobExecutionSummaryForThingList";
    var _JPD = "JobProcessDetails";
    var _JS = "JobSummary";
    var _JSL = "JobSummaryList";
    var _JTS = "JobTemplateSummary";
    var _JTSL = "JobTemplateSummaryList";
    var _K2 = "Key";
    var _KA = "KafkaAction";
    var _KAH = "KafkaActionHeader";
    var _KAi = "KinesisAction";
    var _KH = "KafkaHeaders";
    var _KP = "KeyPair";
    var _L = "L";
    var _LA = "LambdaAction";
    var _LAF = "ListAuditFindings";
    var _LAFR = "ListAuditFindingsRequest";
    var _LAFRi = "ListAuditFindingsResponse";
    var _LAMAE = "ListAuditMitigationActionsExecutions";
    var _LAMAER = "ListAuditMitigationActionsExecutionsRequest";
    var _LAMAERi = "ListAuditMitigationActionsExecutionsResponse";
    var _LAMAT = "ListAuditMitigationActionsTasks";
    var _LAMATR = "ListAuditMitigationActionsTasksRequest";
    var _LAMATRi = "ListAuditMitigationActionsTasksResponse";
    var _LAP = "ListAttachedPolicies";
    var _LAPR = "ListAttachedPoliciesRequest";
    var _LAPRi = "ListAttachedPoliciesResponse";
    var _LAR = "ListAuthorizersRequest";
    var _LARi = "ListAuthorizersResponse";
    var _LAS = "ListAuditSuppressions";
    var _LASR = "ListAuditSuppressionsRequest";
    var _LASRi = "ListAuditSuppressionsResponse";
    var _LAT = "ListAuditTasks";
    var _LATR = "ListAuditTasksRequest";
    var _LATRi = "ListAuditTasksResponse";
    var _LAV = "ListActiveViolations";
    var _LAVR = "ListActiveViolationsRequest";
    var _LAVRi = "ListActiveViolationsResponse";
    var _LAi = "ListAuthorizers";
    var _LAo = "LocationAction";
    var _LBG = "ListBillingGroups";
    var _LBGR = "ListBillingGroupsRequest";
    var _LBGRi = "ListBillingGroupsResponse";
    var _LC = "ListCertificates";
    var _LCAC = "ListCACertificates";
    var _LCACR = "ListCACertificatesRequest";
    var _LCACRi = "ListCACertificatesResponse";
    var _LCBCA = "ListCertificatesByCA";
    var _LCBCAR = "ListCertificatesByCARequest";
    var _LCBCARi = "ListCertificatesByCAResponse";
    var _LCE = "ListCommandExecutions";
    var _LCER = "ListCommandExecutionsRequest";
    var _LCERi = "ListCommandExecutionsResponse";
    var _LCM = "ListCustomMetrics";
    var _LCMR = "ListCustomMetricsRequest";
    var _LCMRi = "ListCustomMetricsResponse";
    var _LCP = "ListCertificateProviders";
    var _LCPR = "ListCertificateProvidersRequest";
    var _LCPRi = "ListCertificateProvidersResponse";
    var _LCR = "ListCertificatesRequest";
    var _LCRi = "ListCertificatesResponse";
    var _LCRis = "ListCommandsRequest";
    var _LCRist = "ListCommandsResponse";
    var _LCi = "ListCommands";
    var _LD = "ListDimensions";
    var _LDC = "ListDomainConfigurations";
    var _LDCR = "ListDomainConfigurationsRequest";
    var _LDCRi = "ListDomainConfigurationsResponse";
    var _LDMAE = "ListDetectMitigationActionsExecutions";
    var _LDMAER = "ListDetectMitigationActionsExecutionsRequest";
    var _LDMAERi = "ListDetectMitigationActionsExecutionsResponse";
    var _LDMAT = "ListDetectMitigationActionsTasks";
    var _LDMATR = "ListDetectMitigationActionsTasksRequest";
    var _LDMATRi = "ListDetectMitigationActionsTasksResponse";
    var _LDR = "ListDimensionsRequest";
    var _LDRi = "ListDimensionsResponse";
    var _LEC = "LogEventConfiguration";
    var _LECo = "LogEventConfigurations";
    var _LEE = "LimitExceededException";
    var _LFM = "ListFleetMetrics";
    var _LFMR = "ListFleetMetricsRequest";
    var _LFMRi = "ListFleetMetricsResponse";
    var _LI = "ListIndices";
    var _LIR = "ListIndicesRequest";
    var _LIRi = "ListIndicesResponse";
    var _LJ = "ListJobs";
    var _LJEFJ = "ListJobExecutionsForJob";
    var _LJEFJR = "ListJobExecutionsForJobRequest";
    var _LJEFJRi = "ListJobExecutionsForJobResponse";
    var _LJEFT = "ListJobExecutionsForThing";
    var _LJEFTR = "ListJobExecutionsForThingRequest";
    var _LJEFTRi = "ListJobExecutionsForThingResponse";
    var _LJR = "ListJobsRequest";
    var _LJRi = "ListJobsResponse";
    var _LJT = "ListJobTemplates";
    var _LJTR = "ListJobTemplatesRequest";
    var _LJTRi = "ListJobTemplatesResponse";
    var _LMA = "ListMitigationActions";
    var _LMAR = "ListMitigationActionsRequest";
    var _LMARi = "ListMitigationActionsResponse";
    var _LMJT = "ListManagedJobTemplates";
    var _LMJTR = "ListManagedJobTemplatesRequest";
    var _LMJTRi = "ListManagedJobTemplatesResponse";
    var _LMV = "ListMetricValues";
    var _LMVR = "ListMetricValuesRequest";
    var _LMVRi = "ListMetricValuesResponse";
    var _LOC = "ListOutgoingCertificates";
    var _LOCR = "ListOutgoingCertificatesRequest";
    var _LOCRi = "ListOutgoingCertificatesResponse";
    var _LOP = "LoggingOptionsPayload";
    var _LOTAU = "ListOTAUpdates";
    var _LOTAUR = "ListOTAUpdatesRequest";
    var _LOTAURi = "ListOTAUpdatesResponse";
    var _LP = "ListPackages";
    var _LPP = "ListPolicyPrincipals";
    var _LPPR = "ListPolicyPrincipalsRequest";
    var _LPPRi = "ListPolicyPrincipalsResponse";
    var _LPPRis = "ListPrincipalPoliciesRequest";
    var _LPPRist = "ListPrincipalPoliciesResponse";
    var _LPPi = "ListPrincipalPolicies";
    var _LPR = "ListPackagesRequest";
    var _LPRi = "ListPackagesResponse";
    var _LPRis = "ListPoliciesRequest";
    var _LPRist = "ListPoliciesResponse";
    var _LPT = "ListPrincipalThings";
    var _LPTR = "ListPrincipalThingsRequest";
    var _LPTRi = "ListPrincipalThingsResponse";
    var _LPTRis = "ListProvisioningTemplatesRequest";
    var _LPTRist = "ListProvisioningTemplatesResponse";
    var _LPTV = "ListPrincipalThingsV2";
    var _LPTVR = "ListPrincipalThingsV2Request";
    var _LPTVRi = "ListPrincipalThingsV2Response";
    var _LPTVRis = "ListProvisioningTemplateVersionsRequest";
    var _LPTVRist = "ListProvisioningTemplateVersionsResponse";
    var _LPTVi = "ListProvisioningTemplateVersions";
    var _LPTi = "ListProvisioningTemplates";
    var _LPV = "ListPackageVersions";
    var _LPVR = "ListPackageVersionsRequest";
    var _LPVRi = "ListPackageVersionsResponse";
    var _LPVRis = "ListPolicyVersionsRequest";
    var _LPVRist = "ListPolicyVersionsResponse";
    var _LPVi = "ListPolicyVersions";
    var _LPi = "ListPolicies";
    var _LRA = "ListRoleAliases";
    var _LRAR = "ListRoleAliasesRequest";
    var _LRARi = "ListRoleAliasesResponse";
    var _LRRFAF = "ListRelatedResourcesForAuditFinding";
    var _LRRFAFR = "ListRelatedResourcesForAuditFindingRequest";
    var _LRRFAFRi = "ListRelatedResourcesForAuditFindingResponse";
    var _LS = "ListStreams";
    var _LSA = "ListScheduledAudits";
    var _LSAR = "ListScheduledAuditsRequest";
    var _LSARi = "ListScheduledAuditsResponse";
    var _LSP = "ListSecurityProfiles";
    var _LSPFT = "ListSecurityProfilesForTarget";
    var _LSPFTR = "ListSecurityProfilesForTargetRequest";
    var _LSPFTRi = "ListSecurityProfilesForTargetResponse";
    var _LSPR = "ListSecurityProfilesRequest";
    var _LSPRi = "ListSecurityProfilesResponse";
    var _LSR = "ListStreamsRequest";
    var _LSRi = "ListStreamsResponse";
    var _LSVR = "ListSbomValidationResults";
    var _LSVRR = "ListSbomValidationResultsRequest";
    var _LSVRRi = "ListSbomValidationResultsResponse";
    var _LT = "LocationTimestamp";
    var _LTC = "LogTargetConfiguration";
    var _LTCo = "LogTargetConfigurations";
    var _LTFP = "ListTargetsForPolicy";
    var _LTFPR = "ListTargetsForPolicyRequest";
    var _LTFPRi = "ListTargetsForPolicyResponse";
    var _LTFR = "ListTagsForResource";
    var _LTFRR = "ListTagsForResourceRequest";
    var _LTFRRi = "ListTagsForResourceResponse";
    var _LTFSP = "ListTargetsForSecurityProfile";
    var _LTFSPR = "ListTargetsForSecurityProfileRequest";
    var _LTFSPRi = "ListTargetsForSecurityProfileResponse";
    var _LTG = "ListThingGroups";
    var _LTGFT = "ListThingGroupsForThing";
    var _LTGFTR = "ListThingGroupsForThingRequest";
    var _LTGFTRi = "ListThingGroupsForThingResponse";
    var _LTGR = "ListThingGroupsRequest";
    var _LTGRi = "ListThingGroupsResponse";
    var _LTIBG = "ListThingsInBillingGroup";
    var _LTIBGR = "ListThingsInBillingGroupRequest";
    var _LTIBGRi = "ListThingsInBillingGroupResponse";
    var _LTITG = "ListThingsInThingGroup";
    var _LTITGR = "ListThingsInThingGroupRequest";
    var _LTITGRi = "ListThingsInThingGroupResponse";
    var _LTP = "ListThingPrincipals";
    var _LTPR = "ListThingPrincipalsRequest";
    var _LTPRi = "ListThingPrincipalsResponse";
    var _LTPV = "ListThingPrincipalsV2";
    var _LTPVR = "ListThingPrincipalsV2Request";
    var _LTPVRi = "ListThingPrincipalsV2Response";
    var _LTR = "ListThingsRequest";
    var _LTRD = "ListTopicRuleDestinations";
    var _LTRDR = "ListTopicRuleDestinationsRequest";
    var _LTRDRi = "ListTopicRuleDestinationsResponse";
    var _LTRR = "ListTopicRulesRequest";
    var _LTRRi = "ListTopicRulesResponse";
    var _LTRT = "ListThingRegistrationTasks";
    var _LTRTR = "ListThingRegistrationTasksRequest";
    var _LTRTRR = "ListThingRegistrationTaskReportsRequest";
    var _LTRTRRi = "ListThingRegistrationTaskReportsResponse";
    var _LTRTRi = "ListThingRegistrationTasksResponse";
    var _LTRTRis = "ListThingRegistrationTaskReports";
    var _LTRi = "ListThingsResponse";
    var _LTRis = "ListTopicRules";
    var _LTT = "ListThingTypes";
    var _LTTR = "ListThingTypesRequest";
    var _LTTRi = "ListThingTypesResponse";
    var _LTi = "ListThings";
    var _LTo = "LogTarget";
    var _LVE = "ListViolationEvents";
    var _LVER = "ListViolationEventsRequest";
    var _LVERi = "ListViolationEventsResponse";
    var _LVLL = "ListV2LoggingLevels";
    var _LVLLR = "ListV2LoggingLevelsRequest";
    var _LVLLRi = "ListV2LoggingLevelsResponse";
    var _MA = "MitigationAction";
    var _MAI = "MitigationActionIdentifier";
    var _MAIL = "MitigationActionIdentifierList";
    var _MAL = "MitigationActionList";
    var _MAP = "MitigationActionParams";
    var _MC = "Mqtt5Configuration";
    var _MCq = "MqttContext";
    var _MD = "MetricDatum";
    var _MDL = "MetricDatumList";
    var _MDe = "MetricDimension";
    var _MEC = "MetricsExportConfig";
    var _MH = "MqttHeaders";
    var _MJTS = "ManagedJobTemplateSummary";
    var _MJTSL = "ManagedJobTemplatesSummaryList";
    var _MLDC = "MachineLearningDetectionConfig";
    var _MPE = "MalformedPolicyException";
    var _MTR = "MetricToRetain";
    var _MV = "MetricValue";
    var _MW = "MaintenanceWindow";
    var _MWa = "MaintenanceWindows";
    var _NCE = "NotConfiguredException";
    var _NCR = "NonCompliantResource";
    var _OC = "OutgoingCertificate";
    var _OCu = "OutgoingCertificates";
    var _OSA = "OpenSearchAction";
    var _OTAUF = "OTAUpdateFile";
    var _OTAUFp = "OTAUpdateFiles";
    var _OTAUI = "OTAUpdateInfo";
    var _OTAUS = "OTAUpdateSummary";
    var _OTAUSp = "OTAUpdatesSummary";
    var _P2 = "Policy";
    var _PA2 = "PropagatingAttribute";
    var _PAL = "PropagatingAttributeList";
    var _PAPVE = "PutAssetPropertyValueEntry";
    var _PAPVEL = "PutAssetPropertyValueEntryList";
    var _PFTSP = "PublishFindingToSnsParams";
    var _PH = "ProvisioningHook";
    var _PII = "PutItemInput";
    var _PK = "PrivateKey";
    var _PKu = "PublicKey";
    var _PP = "PercentPair";
    var _PS = "PackageSummary";
    var _PSL = "PackageSummaryList";
    var _PTL = "ProvisioningTemplateListing";
    var _PTO = "PrincipalThingObject";
    var _PTOr = "PrincipalThingObjects";
    var _PTS = "ProvisioningTemplateSummary";
    var _PTVL = "ProvisioningTemplateVersionListing";
    var _PTVS = "ProvisioningTemplateVersionSummary";
    var _PUC = "PresignedUrlConfig";
    var _PV = "PolicyVersion";
    var _PVA = "PackageVersionArtifact";
    var _PVI = "PolicyVersionIdentifier";
    var _PVR = "PackageVersionRecipe";
    var _PVS = "PackageVersionSummary";
    var _PVSL = "PackageVersionSummaryList";
    var _PVSOV = "PutVerificationStateOnViolation";
    var _PVSOVR = "PutVerificationStateOnViolationRequest";
    var _PVSOVRu = "PutVerificationStateOnViolationResponse";
    var _PVo = "PolicyVersions";
    var _Pe = "Percentiles";
    var _Po = "Policies";
    var _RA2 = "RepublishAction";
    var _RAD = "RoleAliasDescription";
    var _RAEE = "ResourceAlreadyExistsException";
    var _RAe = "ResourceAttributes";
    var _RC2 = "RegistrationConfig";
    var _RCAC = "RegisterCACertificate";
    var _RCACR = "RegisterCACertificateRequest";
    var _RCACRe = "RegisterCACertificateResponse";
    var _RCL = "RetryCriteriaList";
    var _RCR = "RegisterCertificateRequest";
    var _RCRe = "RegisterCertificateResponse";
    var _RCT = "RejectCertificateTransfer";
    var _RCTR = "RejectCertificateTransferRequest";
    var _RCVE = "RegistrationCodeValidationException";
    var _RCWCA = "RegisterCertificateWithoutCA";
    var _RCWCAR = "RegisterCertificateWithoutCARequest";
    var _RCWCARe = "RegisterCertificateWithoutCAResponse";
    var _RCe = "RetryCriteria";
    var _RCeg = "RegisterCertificate";
    var _RD = "ResourceDescription";
    var _RDPVP = "ReplaceDefaultPolicyVersionParams";
    var _RI = "ResourceIdentifier";
    var _RIC = "RateIncreaseCriteria";
    var _RNFE2 = "ResourceNotFoundException";
    var _RR = "RelatedResource";
    var _RRFE = "ResourceRegistrationFailureException";
    var _RRe = "RelatedResources";
    var _RT3 = "RegisterThing";
    var _RTFBG = "RemoveThingFromBillingGroup";
    var _RTFBGR = "RemoveThingFromBillingGroupRequest";
    var _RTFBGRe = "RemoveThingFromBillingGroupResponse";
    var _RTFTG = "RemoveThingFromThingGroup";
    var _RTFTGR = "RemoveThingFromThingGroupRequest";
    var _RTFTGRe = "RemoveThingFromThingGroupResponse";
    var _RTR = "RegisterThingRequest";
    var _RTRR = "ReplaceTopicRuleRequest";
    var _RTRe = "RegisterThingResponse";
    var _RTRep = "ReplaceTopicRule";
    var _S = "S";
    var _SA = "S3Action";
    var _SAM = "ScheduledAuditMetadata";
    var _SAMAT = "StartAuditMitigationActionsTask";
    var _SAMATR = "StartAuditMitigationActionsTaskRequest";
    var _SAMATRt = "StartAuditMitigationActionsTaskResponse";
    var _SAML = "ScheduledAuditMetadataList";
    var _SAa = "SalesforceAction";
    var _SAn = "SnsAction";
    var _SAq = "SqsAction";
    var _SC = "SchedulingConfig";
    var _SCC = "ServerCertificateConfig";
    var _SCS = "ServerCertificateSummary";
    var _SCe = "ServerCertificates";
    var _SD = "S3Destination";
    var _SDA = "SetDefaultAuthorizer";
    var _SDAR = "SetDefaultAuthorizerRequest";
    var _SDARe = "SetDefaultAuthorizerResponse";
    var _SDMAT = "StartDetectMitigationActionsTask";
    var _SDMATR = "StartDetectMitigationActionsTaskRequest";
    var _SDMATRt = "StartDetectMitigationActionsTaskResponse";
    var _SDPV = "SetDefaultPolicyVersion";
    var _SDPVR = "SetDefaultPolicyVersionRequest";
    var _SF = "StreamFile";
    var _SFA = "StepFunctionsAction";
    var _SFt = "StreamFiles";
    var _SI2 = "StreamInfo";
    var _SIR = "SearchIndexRequest";
    var _SIRe = "SearchIndexResponse";
    var _SIe = "SearchIndex";
    var _SJR = "ScheduledJobRollout";
    var _SJRL = "ScheduledJobRolloutList";
    var _SL = "S3Location";
    var _SLO = "SetLoggingOptions";
    var _SLOR = "SetLoggingOptionsRequest";
    var _SODAT = "StartOnDemandAuditTask";
    var _SODATR = "StartOnDemandAuditTaskRequest";
    var _SODATRt = "StartOnDemandAuditTaskResponse";
    var _SPE = "SqlParseException";
    var _SPI = "SecurityProfileIdentifier";
    var _SPIe = "SecurityProfileIdentifiers";
    var _SPP = "SigningProfileParameter";
    var _SPT = "SecurityProfileTarget";
    var _SPTM = "SecurityProfileTargetMapping";
    var _SPTMe = "SecurityProfileTargetMappings";
    var _SPTe = "SecurityProfileTargets";
    var _SQEE = "ServiceQuotaExceededException";
    var _SR = "StatusReason";
    var _SS = "StreamSummary";
    var _SSJP = "StartSigningJobParameter";
    var _SSt = "StreamsSummary";
    var _ST2 = "StatisticalThreshold";
    var _STRT = "StartThingRegistrationTask";
    var _STRTR = "StartThingRegistrationTaskRequest";
    var _STRTRt = "StartThingRegistrationTaskResponse";
    var _STRTRto = "StopThingRegistrationTaskRequest";
    var _STRTRtop = "StopThingRegistrationTaskResponse";
    var _STRTt = "StopThingRegistrationTask";
    var _SUE = "ServiceUnavailableException";
    var _SVA = "SigV4Authorization";
    var _SVLL = "SetV2LoggingLevel";
    var _SVLLR = "SetV2LoggingLevelRequest";
    var _SVLO = "SetV2LoggingOptions";
    var _SVLOR = "SetV2LoggingOptionsRequest";
    var _SVRS = "SbomValidationResultSummary";
    var _SVRSL = "SbomValidationResultSummaryList";
    var _Sb = "Sbom";
    var _St = "Statistics";
    var _Str = "Stream";
    var _T2 = "Tag";
    var _TA = "TermsAggregation";
    var _TACE = "TransferAlreadyCompletedException";
    var _TAEE = "TaskAlreadyExistsException";
    var _TAL = "ThingAttributeList";
    var _TAR = "TestAuthorizationRequest";
    var _TARe = "TestAuthorizationResponse";
    var _TAe = "TestAuthorization";
    var _TAh = "ThingAttribute";
    var _TAi = "TimestreamAction";
    var _TC2 = "ThingConnectivity";
    var _TCE = "TransferConflictException";
    var _TCR = "TransferCertificateRequest";
    var _TCRr = "TransferCertificateResponse";
    var _TCi = "TimeoutConfig";
    var _TCl = "TlsConfig";
    var _TCls = "TlsContext";
    var _TCr = "TransferCertificate";
    var _TD = "ThingDocument";
    var _TDL = "ThingDocumentList";
    var _TDLi = "TimestreamDimensionList";
    var _TDi = "TimestreamDimension";
    var _TDr = "TransferData";
    var _TE = "ThrottlingException";
    var _TF = "TimeFilter";
    var _TGD = "ThingGroupDocument";
    var _TGDL = "ThingGroupDocumentList";
    var _TGIC = "ThingGroupIndexingConfiguration";
    var _TGM = "ThingGroupMetadata";
    var _TGNAAL = "ThingGroupNameAndArnList";
    var _TGP = "ThingGroupProperties";
    var _TIA = "TestInvokeAuthorizer";
    var _TIAR = "TestInvokeAuthorizerRequest";
    var _TIARe = "TestInvokeAuthorizerResponse";
    var _TIC = "ThingIndexingConfiguration";
    var _TL = "TagList";
    var _TPO = "ThingPrincipalObject";
    var _TPOh = "ThingPrincipalObjects";
    var _TR = "TopicRule";
    var _TRD = "TopicRuleDestination";
    var _TRDC = "TopicRuleDestinationConfiguration";
    var _TRDS = "TopicRuleDestinationSummary";
    var _TRDSo = "TopicRuleDestinationSummaries";
    var _TRL = "TopicRuleList";
    var _TRLI = "TopicRuleListItem";
    var _TRP = "TopicRulePayload";
    var _TRR = "TagResourceRequest";
    var _TRRa = "TagResourceResponse";
    var _TRa = "TagResource";
    var _TS = "TaskStatistics";
    var _TSFAC = "TaskStatisticsForAuditCheck";
    var _TT = "TimestreamTimestamp";
    var _TTD = "ThingTypeDefinition";
    var _TTL = "ThingTypeList";
    var _TTM = "ThingTypeMetadata";
    var _TTP = "ThingTypeProperties";
    var _UA = "UpdateAuthorizer";
    var _UAAC = "UpdateAccountAuditConfiguration";
    var _UAACR = "UpdateAccountAuditConfigurationRequest";
    var _UAACRp = "UpdateAccountAuditConfigurationResponse";
    var _UAR = "UpdateAuthorizerRequest";
    var _UARp = "UpdateAuthorizerResponse";
    var _UAS = "UpdateAuditSuppression";
    var _UASR = "UpdateAuditSuppressionRequest";
    var _UASRp = "UpdateAuditSuppressionResponse";
    var _UBG = "UpdateBillingGroup";
    var _UBGR = "UpdateBillingGroupRequest";
    var _UBGRp = "UpdateBillingGroupResponse";
    var _UC = "UpdateCertificate";
    var _UCAC = "UpdateCACertificate";
    var _UCACP = "UpdateCACertificateParams";
    var _UCACR = "UpdateCACertificateRequest";
    var _UCM = "UpdateCustomMetric";
    var _UCMR = "UpdateCustomMetricRequest";
    var _UCMRp = "UpdateCustomMetricResponse";
    var _UCP = "UpdateCertificateProvider";
    var _UCPR = "UpdateCertificateProviderRequest";
    var _UCPRp = "UpdateCertificateProviderResponse";
    var _UCR = "UpdateCertificateRequest";
    var _UCRp = "UpdateCommandRequest";
    var _UCRpd = "UpdateCommandResponse";
    var _UCp = "UpdateCommand";
    var _UD = "UpdateDimension";
    var _UDC = "UpdateDomainConfiguration";
    var _UDCP = "UpdateDeviceCertificateParams";
    var _UDCR = "UpdateDomainConfigurationRequest";
    var _UDCRp = "UpdateDomainConfigurationResponse";
    var _UDR = "UpdateDimensionRequest";
    var _UDRp = "UpdateDimensionResponse";
    var _UDTG = "UpdateDynamicThingGroup";
    var _UDTGR = "UpdateDynamicThingGroupRequest";
    var _UDTGRp = "UpdateDynamicThingGroupResponse";
    var _UE2 = "UnauthorizedException";
    var _UEC = "UpdateEncryptionConfiguration";
    var _UECR = "UpdateEncryptionConfigurationRequest";
    var _UECRp = "UpdateEncryptionConfigurationResponse";
    var _UECRpd = "UpdateEventConfigurationsRequest";
    var _UECRpda = "UpdateEventConfigurationsResponse";
    var _UECp = "UpdateEventConfigurations";
    var _UFM = "UpdateFleetMetric";
    var _UFMR = "UpdateFleetMetricRequest";
    var _UIC = "UpdateIndexingConfiguration";
    var _UICR = "UpdateIndexingConfigurationRequest";
    var _UICRp = "UpdateIndexingConfigurationResponse";
    var _UJ = "UpdateJob";
    var _UJR = "UpdateJobRequest";
    var _UL = "UL";
    var _UMA = "UpdateMitigationAction";
    var _UMAR = "UpdateMitigationActionRequest";
    var _UMARp = "UpdateMitigationActionResponse";
    var _UP = "UserProperty";
    var _UPC = "UpdatePackageConfiguration";
    var _UPCR = "UpdatePackageConfigurationRequest";
    var _UPCRp = "UpdatePackageConfigurationResponse";
    var _UPR = "UpdatePackageRequest";
    var _UPRp = "UpdatePackageResponse";
    var _UPT = "UpdateProvisioningTemplate";
    var _UPTR = "UpdateProvisioningTemplateRequest";
    var _UPTRp = "UpdateProvisioningTemplateResponse";
    var _UPV = "UpdatePackageVersion";
    var _UPVR = "UpdatePackageVersionRequest";
    var _UPVRp = "UpdatePackageVersionResponse";
    var _UPp = "UpdatePackage";
    var _UPs = "UserProperties";
    var _UR = "UntagResource";
    var _URA = "UpdateRoleAlias";
    var _URAR = "UpdateRoleAliasRequest";
    var _URARp = "UpdateRoleAliasResponse";
    var _URR = "UntagResourceRequest";
    var _URRn = "UntagResourceResponse";
    var _US = "UpdateStream";
    var _USA = "UpdateScheduledAudit";
    var _USAR = "UpdateScheduledAuditRequest";
    var _USARp = "UpdateScheduledAuditResponse";
    var _USP = "UpdateSecurityProfile";
    var _USPR = "UpdateSecurityProfileRequest";
    var _USPRp = "UpdateSecurityProfileResponse";
    var _USR = "UpdateStreamRequest";
    var _USRp = "UpdateStreamResponse";
    var _UT = "UpdateThing";
    var _UTG = "UpdateThingGroup";
    var _UTGFT = "UpdateThingGroupsForThing";
    var _UTGFTR = "UpdateThingGroupsForThingRequest";
    var _UTGFTRp = "UpdateThingGroupsForThingResponse";
    var _UTGR = "UpdateThingGroupRequest";
    var _UTGRp = "UpdateThingGroupResponse";
    var _UTR = "UpdateThingRequest";
    var _UTRD = "UpdateTopicRuleDestination";
    var _UTRDR = "UpdateTopicRuleDestinationRequest";
    var _UTRDRp = "UpdateTopicRuleDestinationResponse";
    var _UTRp = "UpdateThingResponse";
    var _UTT = "UpdateThingType";
    var _UTTR = "UpdateThingTypeRequest";
    var _UTTRp = "UpdateThingTypeResponse";
    var _V2 = "Value";
    var _VCE = "VersionConflictException";
    var _VDC = "VpcDestinationConfiguration";
    var _VDP = "VpcDestinationProperties";
    var _VDS = "VpcDestinationSummary";
    var _VE2 = "ValidationException";
    var _VEAI = "ViolationEventAdditionalInfo";
    var _VEOR = "ViolationEventOccurrenceRange";
    var _VEa = "ValidationError";
    var _VEal = "ValidationErrors";
    var _VEi = "ViolationEvent";
    var _VEio = "ViolationEvents";
    var _VLEE = "VersionsLimitExceededException";
    var _VSPB = "ValidateSecurityProfileBehaviors";
    var _VSPBR = "ValidateSecurityProfileBehaviorsRequest";
    var _VSPBRa = "ValidateSecurityProfileBehaviorsResponse";
    var _VUBJC = "VersionUpdateByJobsConfig";
    var _a2 = "action";
    var _aA = "authorizerArn";
    var _aAO = "allowAuthorizerOverride";
    var _aAR = "allowAutoRegistration";
    var _aAc = "actionArn";
    var _aC = "authorizerConfig";
    var _aCC = "auditCheckConfigurations";
    var _aCL = "abortCriteriaList";
    var _aCTAM = "auditCheckToActionsMapping";
    var _aCTRCF = "auditCheckToReasonCodeFilter";
    var _aCb = "abortConfig";
    var _aD = "authDecision";
    var _aDFO = "accountDefaultForOperations";
    var _aDc = "actionsDefinition";
    var _aDcc = "acceptDate";
    var _aDu = "auditDetails";
    var _aDut = "authorizerDescription";
    var _aE = "actionsExecuted";
    var _aEc = "actionsExecutions";
    var _aF = "aggregationField";
    var _aFA = "authorizerFunctionArn";
    var _aFc = "actionsFailed";
    var _aI2 = "actionId";
    var _aIJA = "awsIotJobArn";
    var _aIJI = "awsIotJobId";
    var _aISV = "awsIotSqlVersion";
    var _aIc = "actionIdentifiers";
    var _aId = "additionalInfo";
    var _aIs = "assetId";
    var _aIu = "authInfo";
    var _aIut = "authInfos";
    var _aJAC = "awsJobAbortConfig";
    var _aJERC = "awsJobExecutionsRolloutConfig";
    var _aJPUC = "awsJobPresignedUrlConfig";
    var _aJS = "awsJsonSubstitution";
    var _aJTC = "awsJobTimeoutConfig";
    var _aMTR = "additionalMetricsToRetain";
    var _aMTRV = "additionalMetricsToRetainV2";
    var _aN = "actionName";
    var _aNTC = "auditNotificationTargetConfigurations";
    var _aNl = "alarmName";
    var _aNt = "attributeName";
    var _aNu = "authorizerName";
    var _aO = "ascendingOrder";
    var _aP = "applicationProtocol";
    var _aPc = "actionParams";
    var _aPd = "additionalParameters";
    var _aPt = "attributePayload";
    var _aR = "authResults";
    var _aRS = "autoRegistrationStatus";
    var _aS = "actionsSkipped";
    var _aSBTO = "approximateSecondsBeforeTimedOut";
    var _aSJI = "awsSignerJobId";
    var _aSc = "actionStatus";
    var _aT4 = "actionType";
    var _aTA = "alertTargetArn";
    var _aTI = "auditTaskId";
    var _aTTTGP = "addThingsToThingGroupParams";
    var _aTg = "aggregationType";
    var _aTl = "alertTargets";
    var _aTu = "authenticationType";
    var _aV = "activeViolations";
    var _aVt = "attributeValue";
    var _ac = "account";
    var _act = "actions";
    var _af = "after";
    var _al = "allowed";
    var _ar = "arn";
    var _art = "artifact";
    var _at = "attributes";
    var _au = "auth";
    var _aut = "authorizers";
    var _av = "average";
    var _b = "behavior";
    var _bAT = "bucketsAggregationType";
    var _bC = "batchConfig";
    var _bCT = "behaviorCriteriaType";
    var _bG = "billingGroups";
    var _bGA = "billingGroupArn";
    var _bGD = "billingGroupDescription";
    var _bGI = "billingGroupId";
    var _bGM = "billingGroupMetadata";
    var _bGN = "billingGroupName";
    var _bGP = "billingGroupProperties";
    var _bM = "batchMode";
    var _bN = "behaviorName";
    var _bNu = "bucketName";
    var _bRPM = "baseRatePerMinute";
    var _bS = "beforeSubstitution";
    var _bV = "booleanValue";
    var _be = "behaviors";
    var _bef = "before";
    var _bu = "buckets";
    var _buc = "bucket";
    var _c5 = "client";
    var _cA = "cloudwatchAlarm";
    var _cAa = "cannedAcl";
    var _cAe = "certificateArn";
    var _cAh = "channelArn";
    var _cAo = "commandArn";
    var _cAom = "completedAt";
    var _cAon = "connectionAttribute";
    var _cAr = "createdAt";
    var _cC = "checkCompliant";
    var _cCC = "clientCertificateConfig";
    var _cCCA = "clientCertificateCallbackArn";
    var _cCI = "caCertificateId";
    var _cCP = "caCertificatePem";
    var _cCS = "customCodeSigning";
    var _cCa = "caCertificate";
    var _cCan = "canceledChecks";
    var _cCe = "certificateChain";
    var _cCo = "compliantChecks";
    var _cD = "creationDate";
    var _cDS = "credentialDurationSeconds";
    var _cDTA = "consecutiveDatapointsToAlarm";
    var _cDTC = "consecutiveDatapointsToClear";
    var _cDe = "certificateDescription";
    var _cDo = "configurationDetails";
    var _cDor = "correlationData";
    var _cDr = "createDate";
    var _cE = "commandExecutions";
    var _cF = "customFields";
    var _cFC = "canceledFindingsCount";
    var _cI3 = "certificateId";
    var _cIPI = "cognitoIdentityPoolId";
    var _cIl = "clientId";
    var _cIo = "commandId";
    var _cL = "criteriaList";
    var _cLl = "cloudwatchLogs";
    var _cLo = "confidenceLevel";
    var _cM = "cloudwatchMetric";
    var _cMe = "certificateMode";
    var _cN = "checkName";
    var _cNe = "certificateName";
    var _cNh = "channelName";
    var _cO = "comparisonOperator";
    var _cP = "certificatePem";
    var _cPA = "certificateProviderArn";
    var _cPN = "certificateProviderName";
    var _cPNo = "commandParameterName";
    var _cPOD = "certificatePathOnDevice";
    var _cPe = "certificateProviders";
    var _cPl = "clientProperties";
    var _cRS = "checkRunStatus";
    var _cRT = "clientRequestToken";
    var _cS2 = "configurationStatus";
    var _cSR = "certificateSigningRequest";
    var _cSo = "codeSigning";
    var _cT = "clientToken";
    var _cTF = "completedTimeFilter";
    var _cTo = "contentType";
    var _cTon = "confirmationToken";
    var _cU = "confirmationUrl";
    var _cV3 = "customerVersion";
    var _ca = "cardinality";
    var _ce = "certificates";
    var _ci = "cidrs";
    var _co3 = "comment";
    var _cod = "code";
    var _com = "commands";
    var _con = "configuration";
    var _conn = "connected";
    var _conne = "connectivity";
    var _cont = "content";
    var _cou = "count";
    var _cr = "criteria";
    var _d = "description";
    var _dA = "destinationArn";
    var _dAIS = "disconnectAfterInSeconds";
    var _dAL = "disableAllLogs";
    var _dAMTR = "deleteAdditionalMetricsToRetain";
    var _dAN = "defaultAuthorizerName";
    var _dAT = "deleteAlertTargets";
    var _dB = "deleteBehaviors";
    var _dC2 = "destinationConfiguration";
    var _dCA = "domainConfigurationArn";
    var _dCAe = "deviceCertificateArn";
    var _dCI = "defaultClientId";
    var _dCIe = "deviceCertificateId";
    var _dCN = "domainConfigurationName";
    var _dCP = "datapointsCollectionPercentage";
    var _dCS = "domainConfigurationStatus";
    var _dCo = "domainConfigurations";
    var _dD = "deviceDefender";
    var _dDB = "dynamoDB";
    var _dDBy = "dynamoDBv2";
    var _dDIM = "deviceDefenderIndexingMode";
    var _dDe = "deprecationDate";
    var _dI = "deviceId";
    var _dIM = "durationInMinutes";
    var _dLL = "defaultLogLevel";
    var _dM = "detailsMap";
    var _dMEC = "deleteMetricsExportConfig";
    var _dN = "displayName";
    var _dNa = "databaseName";
    var _dNi = "dimensionNames";
    var _dNim = "dimensionName";
    var _dNo = "domainName";
    var _dOM = "dayOfMonth";
    var _dOW = "dayOfWeek";
    var _dP = "documentParameters";
    var _dPV = "destinationPackageVersions";
    var _dR = "disconnectReason";
    var _dS = "durationSeconds";
    var _dSA = "deleteScheduledAudits";
    var _dSN = "deliveryStreamName";
    var _dSe = "deleteStream";
    var _dSes = "destinationSummaries";
    var _dSo = "documentSource";
    var _dT = "domainType";
    var _dV = "defaultValue";
    var _dVI = "defaultVersionId";
    var _dVN = "defaultVersionName";
    var _dVO = "dimensionValueOperator";
    var _dVo = "doubleValue";
    var _de = "denied";
    var _dep = "deprecated";
    var _des = "destination";
    var _di = "dimensions";
    var _do = "document";
    var _e5 = "error";
    var _eA = "endpointAddress";
    var _eAr = "errorAction";
    var _eB = "enableBatching";
    var _eBn = "endBehavior";
    var _eC = "errorCode";
    var _eCFH = "enableCachingForHttp";
    var _eCv = "eventConfigurations";
    var _eD = "expirationDate";
    var _eDx = "explicitDeny";
    var _eED = "executionEndDate";
    var _eI3 = "executionId";
    var _eIS = "expiresInSec";
    var _eITLP = "enableIoTLoggingParams";
    var _eIn = "entryId";
    var _eIr = "errorInfo";
    var _eM = "exportMetric";
    var _eMr = "errorMessage";
    var _eN = "executionNumber";
    var _eNP = "executionNamePrefix";
    var _eOCSPC = "enableOCSPCheck";
    var _eP = "effectivePolicies";
    var _eR = "exponentialRate";
    var _eRr = "errorReason";
    var _eS = "executionSummaries";
    var _eSD = "executionStartDate";
    var _eT = "endTime";
    var _eTS = "executionTimeoutSeconds";
    var _eTn = "encryptionType";
    var _eTnd = "endpointType";
    var _eTv = "eventType";
    var _eV = "expectedVersion";
    var _el = "elasticsearch";
    var _en = "enabled";
    var _end = "endpoint";
    var _env = "environments";
    var _ex2 = "expiration";
    var _exa = "example";
    var _exe = "execution";
    var _f = "firehose";
    var _fA = "functionArn";
    var _fC = "failureCount";
    var _fCa = "failedChecks";
    var _fCo = "forceCanceled";
    var _fD = "forceDelete";
    var _fDAWSJ = "forceDeleteAWSJob";
    var _fFC = "failedFindingsCount";
    var _fI = "findingId";
    var _fIi = "findingIds";
    var _fIil = "fileId";
    var _fL = "fileLocation";
    var _fM = "fleetMetrics";
    var _fN = "fileName";
    var _fT = "failureType";
    var _fTi = "findingTime";
    var _fTil = "fileType";
    var _fV = "fileVersion";
    var _fi = "files";
    var _fil = "filter";
    var _fin = "finding";
    var _find = "findings";
    var _fo = "force";
    var _fr = "frequency";
    var _gA = "groupArn";
    var _gI = "generationId";
    var _gL = "geoLocations";
    var _gN = "groupName";
    var _h4 = "http";
    var _hA = "hashAlgorithm";
    var _hC = "httpContext";
    var _hE5 = "httpError";
    var _hH2 = "httpHeader";
    var _hKF = "hashKeyField";
    var _hKT = "hashKeyType";
    var _hKV = "hashKeyValue";
    var _hQ2 = "httpQuery";
    var _hUC = "httpUrlConfiguration";
    var _hUP = "httpUrlProperties";
    var _hUS = "httpUrlSummary";
    var _he = "headers";
    var _i = "index";
    var _iA = "iotAnalytics";
    var _iAO = "isAscendingOrder";
    var _iAs = "isAuthenticated";
    var _iC = "isConcurrent";
    var _iCI = "issuerCertificateIdentifier";
    var _iCS = "issuerCertificateSubject";
    var _iCSN = "issuerCertificateSerialNumber";
    var _iD = "inlineDocument";
    var _iDV = "isDefaultVersion";
    var _iDm = "implicitDeny";
    var _iE = "iotEvents";
    var _iF = "incrementFactor";
    var _iFB = "inputFileBucket";
    var _iFK = "inputFileKey";
    var _iI = "issuerId";
    var _iN = "indexName";
    var _iNn = "inputName";
    var _iNnd = "indexNames";
    var _iOAV = "includeOnlyActiveViolations";
    var _iPC = "inProgressChecks";
    var _iPTIM = "inProgressTimeoutInMinutes";
    var _iR = "includeResult";
    var _iRA = "iamRoleArn";
    var _iS = "isSuppressed";
    var _iSA = "includeSuppressedAlerts";
    var _iSW = "iotSiteWise";
    var _iSn = "indexStatus";
    var _iT3 = "idempotencyToken";
    var _iV = "integerValue";
    var _id = "id";
    var _j = "job";
    var _jA = "jobArn";
    var _jERC = "jobExecutionsRolloutConfig";
    var _jERCo = "jobExecutionsRetryConfig";
    var _jES = "jobExecutionSummary";
    var _jI = "jobId";
    var _jPD = "jobProcessDetails";
    var _jT = "jobTemplates";
    var _jTA = "jobTemplateArn";
    var _jTI = "jobTemplateId";
    var _jo = "jobs";
    var _k = "kinesis";
    var _kARA = "kmsAccessRoleArn";
    var _kKA = "kmsKeyArn";
    var _kP = "keyPair";
    var _kV = "keyValue";
    var _ka = "kafka";
    var _ke = "key";
    var _l = "lambda";
    var _lD = "logDestination";
    var _lFA = "lambdaFunctionArn";
    var _lGN = "logGroupName";
    var _lL = "logLevel";
    var _lMD = "lastModifiedDate";
    var _lMRD = "lastModelRefreshDate";
    var _lOP = "loggingOptionsPayload";
    var _lSA = "listSuppressedAlerts";
    var _lSCD = "lastStatusChangeDate";
    var _lSF = "listSuppressedFindings";
    var _lT = "logTarget";
    var _lTC = "logTargetConfigurations";
    var _lUA = "lastUpdatedAt";
    var _lVT = "lastViolationTime";
    var _lVV = "lastViolationValue";
    var _la = "latitude";
    var _lo = "location";
    var _lon = "longitude";
    var _m4 = "message";
    var _mA = "metricArn";
    var _mB = "maxBuckets";
    var _mBOM = "maxBatchOpenMs";
    var _mBS = "maxBatchSize";
    var _mBSB = "maxBatchSizeBytes";
    var _mC = "mqttContext";
    var _mCV = "missingContextValues";
    var _mCq = "mqtt5Configuration";
    var _mD = "metricDimension";
    var _mDC = "mlDetectionConfig";
    var _mDL = "metricDatumList";
    var _mE = "messageExpiry";
    var _mEC = "metricsExportConfig";
    var _mF = "messageFormat";
    var _mFa = "managedFields";
    var _mI = "messageId";
    var _mJT = "managedJobTemplates";
    var _mN = "metricNamespace";
    var _mNOET = "minNumberOfExecutedThings";
    var _mNe = "metricName";
    var _mNet = "metricNames";
    var _mP = "mandatoryParameters";
    var _mPM = "maximumPerMinute";
    var _mR = "maxResults";
    var _mS = "modelStatus";
    var _mT = "metricTimestamp";
    var _mTe = "metricType";
    var _mTq = "mqttTopic";
    var _mU = "metricUnit";
    var _mV = "metricValue";
    var _mW = "maintenanceWindows";
    var _ma = "max";
    var _mar = "marker";
    var _max = "maximum";
    var _me = "merge";
    var _met = "metric";
    var _mi = "min";
    var _min = "minimum";
    var _n = "name";
    var _nA = "notAfter";
    var _nARS = "newAutoRegistrationStatus";
    var _nB = "notBefore";
    var _nCC = "nonCompliantChecks";
    var _nCR = "nonCompliantResource";
    var _nCRC = "nonCompliantResourcesCount";
    var _nI = "namespaceId";
    var _nM = "nextMarker";
    var _nOCT = "numberOfCanceledThings";
    var _nOFT = "numberOfFailedThings";
    var _nOIPT = "numberOfInProgressThings";
    var _nONT = "numberOfNotifiedThings";
    var _nOQT = "numberOfQueuedThings";
    var _nOR = "numberOfRetries";
    var _nORT = "numberOfRejectedThings";
    var _nORTu = "numberOfRemovedThings";
    var _nOST = "numberOfSucceededThings";
    var _nOTOT = "numberOfTimedOutThings";
    var _nPF = "namePrefixFilter";
    var _nR = "numberRange";
    var _nS = "newStatus";
    var _nSIM = "namedShadowIndexingMode";
    var _nSN = "namedShadowNames";
    var _nT = "nextToken";
    var _na = "namespace";
    var _nu = "number";
    var _num = "numbers";
    var _o = "operand";
    var _oARA = "ocspAuthorizedResponderArn";
    var _oAVI = "onlyActiveViolationsIncluded";
    var _oB = "ownedBy";
    var _oC = "outgoingCertificates";
    var _oDG = "overrideDynamicGroups";
    var _oF = "outputFormat";
    var _oIN = "offsetInNanos";
    var _oLA = "ocspLambdaArn";
    var _oS = "openSearch";
    var _oU = "otaUpdates";
    var _oUA = "otaUpdateArn";
    var _oUF = "otaUpdateFiles";
    var _oUI = "otaUpdateId";
    var _oUIt = "otaUpdateInfo";
    var _oUS = "otaUpdateStatus";
    var _op = "optional";
    var _ope = "operation";
    var _oper = "operator";
    var _or = "order";
    var _ow = "owner";
    var _p = "policies";
    var _pA = "packageArn";
    var _pAPVE = "putAssetPropertyValueEntries";
    var _pAo = "policyArn";
    var _pAr = "propagatingAttributes";
    var _pAro = "propertyAlias";
    var _pD = "pendingDeletion";
    var _pDo = "policyDocument";
    var _pDol = "policyDocuments";
    var _pF = "payloadField";
    var _pFI = "payloadFormatIndicator";
    var _pFTSP = "publishFindingToSnsParams";
    var _pG = "parentGroup";
    var _pGN = "parentGroupName";
    var _pGNa = "parentGroupNames";
    var _pI = "putItem";
    var _pIr = "propertyId";
    var _pIri = "principalId";
    var _pK = "partitionKey";
    var _pN = "packageName";
    var _pNTA = "policyNamesToAdd";
    var _pNTS = "policyNamesToSkip";
    var _pNo = "policyName";
    var _pOB = "previousOwnedBy";
    var _pP = "percentageProgress";
    var _pPH = "preProvisioningHook";
    var _pRA = "provisioningRoleArn";
    var _pS = "pageSize";
    var _pSa = "packageSummaries";
    var _pT = "payloadTemplate";
    var _pTO = "principalThingObjects";
    var _pTr = "processingTargets";
    var _pUC = "presignedUrlConfig";
    var _pV = "policyVersions";
    var _pVA = "packageVersionArn";
    var _pVI = "policyVersionId";
    var _pVIo = "policyVersionIdentifier";
    var _pVS = "packageVersionSummaries";
    var _pVa = "payloadVersion";
    var _pVr = "propertyValues";
    var _pa = "payload";
    var _par = "parameters";
    var _part = "partition";
    var _pas = "password";
    var _pe = "period";
    var _per = "percents";
    var _perc = "percentiles";
    var _perce = "percent";
    var _pl = "platform";
    var _po = "ports";
    var _pr = "principal";
    var _pre = "preprocessor";
    var _pref = "prefix";
    var _pri = "principals";
    var _pro = "protocols";
    var _q = "quality";
    var _qA = "queuedAt";
    var _qS = "queryString";
    var _qU = "queueUrl";
    var _qV = "queryVersion";
    var _qo = "qos";
    var _r2 = "republish";
    var _rA = "resourceArn";
    var _rAA = "roleAliasArn";
    var _rAC = "removeAuthorizerConfig";
    var _rAD = "roleAliasDescription";
    var _rAFL = "roleArnForLogging";
    var _rAIS = "refreshAfterInSeconds";
    var _rAR = "removeAutoRegistration";
    var _rAe = "retryAttempt";
    var _rAes = "resourceArns";
    var _rAo = "roleArn";
    var _rAol = "roleAlias";
    var _rAole = "roleAliases";
    var _rAu = "ruleArn";
    var _rC2 = "reasonCode";
    var _rCe = "registrationConfig";
    var _rCeg = "registrationCode";
    var _rD = "ruleDisabled";
    var _rDPVP = "replaceDefaultPolicyVersionParams";
    var _rDe = "reasonDescription";
    var _rDej = "rejectDate";
    var _rFNC = "reasonForNonCompliance";
    var _rFNCC = "reasonForNonComplianceCode";
    var _rI = "resourceId";
    var _rIC = "rateIncreaseCriteria";
    var _rIe = "resourceIdentifier";
    var _rKF = "rangeKeyField";
    var _rKT = "rangeKeyType";
    var _rKV = "rangeKeyValue";
    var _rL = "resourceLinks";
    var _rN2 = "ruleName";
    var _rPPH = "removePreProvisioningHook";
    var _rR = "relatedResources";
    var _rRe = "rejectReason";
    var _rT3 = "reportType";
    var _rTPTG = "rootToParentThingGroups";
    var _rTT = "removeThingType";
    var _rTe = "responseTopic";
    var _rTes = "resourceType";
    var _re = "resources";
    var _rec = "recipe";
    var _recu = "recursive";
    var _reg = "regex";
    var _res = "result";
    var _ru = "rule";
    var _rul = "rules";
    var _s5 = "smithy.ts.sdk.synthetic.com.amazonaws.iot";
    var _sA = "suppressAlerts";
    var _sAA = "setAsActive";
    var _sAAc = "scheduledAuditArn";
    var _sAD = "setAsDefault";
    var _sAI = "suppressedAlertsIncluded";
    var _sAN = "scheduledAuditName";
    var _sAc = "scheduledAudits";
    var _sAe = "searchableAttributes";
    var _sAi = "signatureAlgorithm";
    var _sAt = "startedAt";
    var _sAtr = "streamArn";
    var _sC = "schedulingConfig";
    var _sCA = "serverCertificateArns";
    var _sCAe = "serverCertificateArn";
    var _sCC = "serverCertificateConfig";
    var _sCS = "serverCertificateStatus";
    var _sCSD = "serverCertificateStatusDetail";
    var _sCe = "serverCertificates";
    var _sCt = "statusCode";
    var _sCu = "successCount";
    var _sD = "signingDisabled";
    var _sDe = "s3Destination";
    var _sDt = "statusDetails";
    var _sDtd = "stdDeviation";
    var _sF = "stepFunctions";
    var _sFC = "succeededFindingsCount";
    var _sFCk = "skippedFindingsCount";
    var _sG = "securityGroups";
    var _sI = "suppressIndefinitely";
    var _sIt = "streamId";
    var _sItr = "streamInfo";
    var _sIu = "subnetIds";
    var _sJR = "scheduledJobRollouts";
    var _sL = "s3Location";
    var _sMN = "stateMachineName";
    var _sN = "streamName";
    var _sNCRC = "suppressedNonCompliantResourcesCount";
    var _sNe = "serviceName";
    var _sNer = "serverName";
    var _sO = "sortOrder";
    var _sOS = "sumOfSquares";
    var _sP = "securityPolicy";
    var _sPA = "securityProfileArn";
    var _sPD = "securityProfileDescription";
    var _sPI = "securityProfileIdentifiers";
    var _sPIe = "securityProfileIdentifier";
    var _sPN = "securityProfileName";
    var _sPNi = "signingProfileName";
    var _sPP = "signingProfileParameter";
    var _sPT = "securityProfileTargets";
    var _sPTA = "securityProfileTargetArn";
    var _sPTM = "securityProfileTargetMappings";
    var _sR = "stateReason";
    var _sRi = "signingRegion";
    var _sRt = "statusReason";
    var _sSJP = "startSigningJobParameter";
    var _sT3 = "startTime";
    var _sTF = "startedTimeFilter";
    var _sTe = "serviceType";
    var _sTt = "statisticalThreshold";
    var _sV = "stateValue";
    var _sVS = "sbomValidationStatus";
    var _sVt = "stringValues";
    var _sVtr = "streamVersion";
    var _sVtri = "stringValue";
    var _s_ = "s3";
    var _sa = "salesforce";
    var _sb = "sbom";
    var _sc2 = "schema";
    var _se3 = "server";
    var _sep = "separator";
    var _sev = "severity";
    var _sh = "shadow";
    var _si = "signature";
    var _sig = "sigv4";
    var _sn = "sns";
    var _sq = "sqs";
    var _sql = "sql";
    var _st = "status";
    var _sta = "statistics";
    var _stat = "statistic";
    var _str = "string";
    var _stre = "stream";
    var _strea = "streams";
    var _stri = "strings";
    var _su = "summaries";
    var _sum = "sum";
    var _sup = "suppressions";
    var _t = "timestream";
    var _tA = "thingArn";
    var _tAA = "targetAwsAccount";
    var _tAa = "targetArn";
    var _tAe = "termsAggregation";
    var _tAem = "templateArn";
    var _tAh = "thingAttribute";
    var _tAo = "topicArn";
    var _tB = "templateBody";
    var _tC = "tlsConfig";
    var _tCA = "transferredCertificateArn";
    var _tCIM = "thingConnectivityIndexingMode";
    var _tCN = "targetCheckNames";
    var _tCi = "timeoutConfig";
    var _tCl = "tlsContext";
    var _tCo = "totalCount";
    var _tCot = "totalChecks";
    var _tD = "transferData";
    var _tDCSD = "trainingDataCollectionStartDate";
    var _tDr = "transferDate";
    var _tET = "taskEndTime";
    var _tFC = "totalFindingsCount";
    var _tG = "thingGroups";
    var _tGA = "thingGroupArn";
    var _tGD = "thingGroupDescription";
    var _tGI = "thingGroupId";
    var _tGIC = "thingGroupIndexingConfiguration";
    var _tGIM = "thingGroupIndexingMode";
    var _tGM = "thingGroupMetadata";
    var _tGN = "thingGroupNames";
    var _tGNh = "thingGroupName";
    var _tGP = "thingGroupProperties";
    var _tGTA = "thingGroupsToAdd";
    var _tGTR = "thingGroupsToRemove";
    var _tI2 = "taskId";
    var _tIC = "thingIndexingConfiguration";
    var _tIM = "thingIndexingMode";
    var _tIS = "timeInSeconds";
    var _tIa = "taskIds";
    var _tIh = "thingId";
    var _tK = "tagKeys";
    var _tKN = "tokenKeyName";
    var _tM = "transferMessage";
    var _tN = "thingName";
    var _tNa = "targetName";
    var _tNab = "tableName";
    var _tNe = "templateName";
    var _tNr = "trackerName";
    var _tP = "thresholdPercentage";
    var _tPO = "thingPrincipalObjects";
    var _tPT = "thingPrincipalType";
    var _tPo = "topicPattern";
    var _tRC = "totalResourcesCount";
    var _tRD = "topicRuleDestination";
    var _tRP = "topicRulePayload";
    var _tS = "taskStatus";
    var _tSPK = "tokenSigningPublicKeys";
    var _tST = "taskStartTime";
    var _tSa = "targetSelection";
    var _tSas = "taskStatistics";
    var _tSask = "taskSummary";
    var _tSo = "tokenSignature";
    var _tT3 = "taskType";
    var _tTA = "thingTypeArn";
    var _tTD = "thingTypeDescription";
    var _tTI = "thingTypeId";
    var _tTL = "timeToLive";
    var _tTM = "thingTypeMetadata";
    var _tTN = "thingTypeName";
    var _tTP = "thingTypeProperties";
    var _tTa = "targetType";
    var _tTh = "thingTypes";
    var _tTr = "transferredTo";
    var _tV = "templateVersion";
    var _ta = "targets";
    var _tag = "tags";
    var _tar = "target";
    var _tas = "tasks";
    var _te = "templates";
    var _th = "things";
    var _ti = "timestamp";
    var _to = "topic";
    var _tok = "token";
    var _ty = "type";
    var _u = "unit";
    var _uB = "useBase64";
    var _uCACP = "updateCACertificateParams";
    var _uD = "undoDeprecate";
    var _uDCP = "updateDeviceCertificateParams";
    var _uDV = "unsetDefaultVersion";
    var _uP = "userProperties";
    var _uPAV = "usePrefixAttributeValue";
    var _uPK = "userPropertyKey";
    var _ur = "url";
    var _us = "username";
    var _v = "values";
    var _vC = "valueConditions";
    var _vCA = "validationCertificateArn";
    var _vCe = "verificationCertificate";
    var _vCp = "vpcConfiguration";
    var _vDS = "vpcDestinationSummary";
    var _vE = "violationEvents";
    var _vEAI = "violationEventAdditionalInfo";
    var _vEOR = "violationEventOccurrenceRange";
    var _vET = "violationEventType";
    var _vETi = "violationEventTime";
    var _vEa = "validationErrors";
    var _vI = "violationId";
    var _vIe = "versionId";
    var _vIi = "violationIds";
    var _vIp = "vpcId";
    var _vN = "versionName";
    var _vNe = "versionNumber";
    var _vP = "vpcProperties";
    var _vR = "validationResult";
    var _vRS = "validationResultSummaries";
    var _vS = "verificationState";
    var _vSD = "verificationStateDescription";
    var _vST = "violationStartTime";
    var _vUBJC = "versionUpdateByJobsConfig";
    var _va = "value";
    var _val = "validity";
    var _vali = "valid";
    var _var = "variance";
    var _ve = "version";
    var _ver = "verbose";
    var _vers = "versions";
    var _wFDCC = "waitingForDataCollectionChecks";
    var _xaip = "x-amzn-iot-principal";
    var _xaip_ = "x-amzn-iot-policy";
    var _xap = "x-amzn-principal";
    var _xat = "x-amz-tagging";
    var n05 = "com.amazonaws.iot";
    var schema_1 = (init_schema(), __toCommonJS(schema_exports));
    var errors_1 = require_errors3();
    var IoTServiceException_1 = require_IoTServiceException();
    var _s_registry5 = schema_1.TypeRegistry.for(_s5);
    exports2.IoTServiceException$ = [-3, _s5, "IoTServiceException", 0, [], []];
    _s_registry5.registerError(exports2.IoTServiceException$, IoTServiceException_1.IoTServiceException);
    var n0_registry5 = schema_1.TypeRegistry.for(n05);
    exports2.CertificateConflictException$ = [
      -3,
      n05,
      _CCE,
      { [_e5]: _c5, [_hE5]: 409 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.CertificateConflictException$, errors_1.CertificateConflictException);
    exports2.CertificateStateException$ = [
      -3,
      n05,
      _CSE,
      { [_e5]: _c5, [_hE5]: 406 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.CertificateStateException$, errors_1.CertificateStateException);
    exports2.CertificateValidationException$ = [
      -3,
      n05,
      _CVE,
      { [_e5]: _c5, [_hE5]: 400 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.CertificateValidationException$, errors_1.CertificateValidationException);
    exports2.ConflictException$ = [
      -3,
      n05,
      _CE,
      { [_e5]: _c5, [_hE5]: 409 },
      [_m4, _rI],
      [0, 0]
    ];
    n0_registry5.registerError(exports2.ConflictException$, errors_1.ConflictException);
    exports2.ConflictingResourceUpdateException$ = [
      -3,
      n05,
      _CRUE,
      { [_e5]: _c5, [_hE5]: 409 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.ConflictingResourceUpdateException$, errors_1.ConflictingResourceUpdateException);
    exports2.DeleteConflictException$ = [
      -3,
      n05,
      _DCE,
      { [_e5]: _c5, [_hE5]: 409 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.DeleteConflictException$, errors_1.DeleteConflictException);
    exports2.IndexNotReadyException$ = [
      -3,
      n05,
      _INRE,
      { [_e5]: _c5, [_hE5]: 400 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.IndexNotReadyException$, errors_1.IndexNotReadyException);
    exports2.InternalException$ = [
      -3,
      n05,
      _IE,
      { [_e5]: _se3, [_hE5]: 500 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.InternalException$, errors_1.InternalException);
    exports2.InternalFailureException$ = [
      -3,
      n05,
      _IFE,
      { [_e5]: _se3, [_hE5]: 500 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.InternalFailureException$, errors_1.InternalFailureException);
    exports2.InternalServerException$ = [
      -3,
      n05,
      _ISE3,
      { [_e5]: _se3, [_hE5]: 500 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.InternalServerException$, errors_1.InternalServerException);
    exports2.InvalidAggregationException$ = [
      -3,
      n05,
      _IAE,
      { [_e5]: _c5, [_hE5]: 400 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.InvalidAggregationException$, errors_1.InvalidAggregationException);
    exports2.InvalidQueryException$ = [
      -3,
      n05,
      _IQE,
      { [_e5]: _c5, [_hE5]: 400 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.InvalidQueryException$, errors_1.InvalidQueryException);
    exports2.InvalidRequestException$ = [
      -3,
      n05,
      _IRE3,
      { [_e5]: _c5, [_hE5]: 400 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.InvalidRequestException$, errors_1.InvalidRequestException);
    exports2.InvalidResponseException$ = [
      -3,
      n05,
      _IREn,
      { [_e5]: _c5, [_hE5]: 400 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.InvalidResponseException$, errors_1.InvalidResponseException);
    exports2.InvalidStateTransitionException$ = [
      -3,
      n05,
      _ISTE,
      { [_e5]: _c5, [_hE5]: 409 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.InvalidStateTransitionException$, errors_1.InvalidStateTransitionException);
    exports2.LimitExceededException$ = [
      -3,
      n05,
      _LEE,
      { [_e5]: _c5, [_hE5]: 410 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.LimitExceededException$, errors_1.LimitExceededException);
    exports2.MalformedPolicyException$ = [
      -3,
      n05,
      _MPE,
      { [_e5]: _c5, [_hE5]: 400 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.MalformedPolicyException$, errors_1.MalformedPolicyException);
    exports2.NotConfiguredException$ = [
      -3,
      n05,
      _NCE,
      { [_e5]: _c5, [_hE5]: 404 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.NotConfiguredException$, errors_1.NotConfiguredException);
    exports2.RegistrationCodeValidationException$ = [
      -3,
      n05,
      _RCVE,
      { [_e5]: _c5, [_hE5]: 400 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.RegistrationCodeValidationException$, errors_1.RegistrationCodeValidationException);
    exports2.ResourceAlreadyExistsException$ = [
      -3,
      n05,
      _RAEE,
      { [_e5]: _c5, [_hE5]: 409 },
      [_m4, _rI, _rA],
      [0, 0, 0]
    ];
    n0_registry5.registerError(exports2.ResourceAlreadyExistsException$, errors_1.ResourceAlreadyExistsException);
    exports2.ResourceNotFoundException$ = [
      -3,
      n05,
      _RNFE2,
      { [_e5]: _c5, [_hE5]: 404 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.ResourceNotFoundException$, errors_1.ResourceNotFoundException);
    exports2.ResourceRegistrationFailureException$ = [
      -3,
      n05,
      _RRFE,
      { [_e5]: _c5, [_hE5]: 400 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.ResourceRegistrationFailureException$, errors_1.ResourceRegistrationFailureException);
    exports2.ServiceQuotaExceededException$ = [
      -3,
      n05,
      _SQEE,
      { [_e5]: _c5, [_hE5]: 402 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.ServiceQuotaExceededException$, errors_1.ServiceQuotaExceededException);
    exports2.ServiceUnavailableException$ = [
      -3,
      n05,
      _SUE,
      { [_e5]: _se3, [_hE5]: 503 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.ServiceUnavailableException$, errors_1.ServiceUnavailableException);
    exports2.SqlParseException$ = [
      -3,
      n05,
      _SPE,
      { [_e5]: _c5, [_hE5]: 400 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.SqlParseException$, errors_1.SqlParseException);
    exports2.TaskAlreadyExistsException$ = [
      -3,
      n05,
      _TAEE,
      { [_e5]: _c5, [_hE5]: 400 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.TaskAlreadyExistsException$, errors_1.TaskAlreadyExistsException);
    exports2.ThrottlingException$ = [
      -3,
      n05,
      _TE,
      { [_e5]: _c5, [_hE5]: 400 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.ThrottlingException$, errors_1.ThrottlingException);
    exports2.TransferAlreadyCompletedException$ = [
      -3,
      n05,
      _TACE,
      { [_e5]: _c5, [_hE5]: 410 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.TransferAlreadyCompletedException$, errors_1.TransferAlreadyCompletedException);
    exports2.TransferConflictException$ = [
      -3,
      n05,
      _TCE,
      { [_e5]: _c5, [_hE5]: 409 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.TransferConflictException$, errors_1.TransferConflictException);
    exports2.UnauthorizedException$ = [
      -3,
      n05,
      _UE2,
      { [_e5]: _c5, [_hE5]: 401 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.UnauthorizedException$, errors_1.UnauthorizedException);
    exports2.ValidationException$ = [
      -3,
      n05,
      _VE2,
      { [_e5]: _c5, [_hE5]: 400 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.ValidationException$, errors_1.ValidationException);
    exports2.VersionConflictException$ = [
      -3,
      n05,
      _VCE,
      { [_e5]: _c5, [_hE5]: 409 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.VersionConflictException$, errors_1.VersionConflictException);
    exports2.VersionsLimitExceededException$ = [
      -3,
      n05,
      _VLEE,
      { [_e5]: _c5, [_hE5]: 409 },
      [_m4],
      [0]
    ];
    n0_registry5.registerError(exports2.VersionsLimitExceededException$, errors_1.VersionsLimitExceededException);
    exports2.errorTypeRegistries = [
      _s_registry5,
      n0_registry5
    ];
    var ConnectivityApiThingName = [0, n05, _CATN, 8, 0];
    var PackageVersionRecipe = [0, n05, _PVR, 8, 0];
    var PrivateKey = [0, n05, _PK, 8, 0];
    var ResourceDescription = [0, n05, _RD, 8, 0];
    exports2.AbortConfig$ = [
      3,
      n05,
      _AC,
      0,
      [_cL],
      [() => AbortCriteriaList],
      1
    ];
    exports2.AbortCriteria$ = [
      3,
      n05,
      _ACb,
      0,
      [_fT, _a2, _tP, _mNOET],
      [0, 0, 1, 1],
      4
    ];
    exports2.AcceptCertificateTransferRequest$ = [
      3,
      n05,
      _ACTR,
      0,
      [_cI3, _sAA],
      [[0, 1], [2, { [_hQ2]: _sAA }]],
      1
    ];
    exports2.Action$ = [
      3,
      n05,
      _A2,
      0,
      [_dDB, _dDBy, _l, _sn, _sq, _k, _r2, _s_, _f, _cM, _cA, _cLl, _el, _sa, _iA, _iE, _iSW, _sF, _t, _h4, _ka, _oS, _lo],
      [() => exports2.DynamoDBAction$, () => exports2.DynamoDBv2Action$, () => exports2.LambdaAction$, () => exports2.SnsAction$, () => exports2.SqsAction$, () => exports2.KinesisAction$, () => exports2.RepublishAction$, () => exports2.S3Action$, () => exports2.FirehoseAction$, () => exports2.CloudwatchMetricAction$, () => exports2.CloudwatchAlarmAction$, () => exports2.CloudwatchLogsAction$, () => exports2.ElasticsearchAction$, () => exports2.SalesforceAction$, () => exports2.IotAnalyticsAction$, () => exports2.IotEventsAction$, () => exports2.IotSiteWiseAction$, () => exports2.StepFunctionsAction$, () => exports2.TimestreamAction$, () => exports2.HttpAction$, () => exports2.KafkaAction$, () => exports2.OpenSearchAction$, () => exports2.LocationAction$]
    ];
    exports2.ActiveViolation$ = [
      3,
      n05,
      _AV,
      0,
      [_vI, _tN, _sPN, _b, _lVV, _vEAI, _vS, _vSD, _lVT, _vST],
      [0, 0, 0, () => exports2.Behavior$, () => exports2.MetricValue$, () => exports2.ViolationEventAdditionalInfo$, 0, 0, 4, 4]
    ];
    exports2.AddThingsToThingGroupParams$ = [
      3,
      n05,
      _ATTTGP,
      0,
      [_tGN, _oDG],
      [64 | 0, 2],
      1
    ];
    exports2.AddThingToBillingGroupRequest$ = [
      3,
      n05,
      _ATTBGR,
      0,
      [_bGN, _bGA, _tN, _tA],
      [0, 0, 0, 0]
    ];
    exports2.AddThingToBillingGroupResponse$ = [
      3,
      n05,
      _ATTBGRd,
      0,
      [],
      []
    ];
    exports2.AddThingToThingGroupRequest$ = [
      3,
      n05,
      _ATTTGR,
      0,
      [_tGNh, _tGA, _tN, _tA, _oDG],
      [0, 0, 0, 0, 2]
    ];
    exports2.AddThingToThingGroupResponse$ = [
      3,
      n05,
      _ATTTGRd,
      0,
      [],
      []
    ];
    exports2.AggregationType$ = [
      3,
      n05,
      _AT3,
      0,
      [_n, _v],
      [0, 64 | 0],
      1
    ];
    exports2.AlertTarget$ = [
      3,
      n05,
      _ATl,
      0,
      [_aTA, _rAo],
      [0, 0],
      2
    ];
    exports2.Allowed$ = [
      3,
      n05,
      _Al,
      0,
      [_p],
      [() => Policies]
    ];
    exports2.AssetPropertyTimestamp$ = [
      3,
      n05,
      _APT,
      0,
      [_tIS, _oIN],
      [0, 0],
      1
    ];
    exports2.AssetPropertyValue$ = [
      3,
      n05,
      _APV,
      0,
      [_va, _ti, _q],
      [() => exports2.AssetPropertyVariant$, () => exports2.AssetPropertyTimestamp$, 0],
      2
    ];
    exports2.AssociateSbomWithPackageVersionRequest$ = [
      3,
      n05,
      _ASWPVR,
      0,
      [_pN, _vN, _sb, _cT],
      [[0, 1], [0, 1], () => exports2.Sbom$, [0, { [_hQ2]: _cT, [_iT3]: 1 }]],
      3
    ];
    exports2.AssociateSbomWithPackageVersionResponse$ = [
      3,
      n05,
      _ASWPVRs,
      0,
      [_pN, _vN, _sb, _sVS],
      [0, 0, () => exports2.Sbom$, 0]
    ];
    exports2.AssociateTargetsWithJobRequest$ = [
      3,
      n05,
      _ATWJR,
      0,
      [_ta, _jI, _co3, _nI],
      [64 | 0, [0, 1], 0, [0, { [_hQ2]: _nI }]],
      2
    ];
    exports2.AssociateTargetsWithJobResponse$ = [
      3,
      n05,
      _ATWJRs,
      0,
      [_jA, _jI, _d],
      [0, 0, 0]
    ];
    exports2.AttachPolicyRequest$ = [
      3,
      n05,
      _APR,
      0,
      [_pNo, _tar],
      [[0, 1], 0],
      2
    ];
    exports2.AttachPrincipalPolicyRequest$ = [
      3,
      n05,
      _APPR,
      0,
      [_pNo, _pr],
      [[0, 1], [0, { [_hH2]: _xaip }]],
      2
    ];
    exports2.AttachSecurityProfileRequest$ = [
      3,
      n05,
      _ASPR,
      0,
      [_sPN, _sPTA],
      [[0, 1], [0, { [_hQ2]: _sPTA }]],
      2
    ];
    exports2.AttachSecurityProfileResponse$ = [
      3,
      n05,
      _ASPRt,
      0,
      [],
      []
    ];
    exports2.AttachThingPrincipalRequest$ = [
      3,
      n05,
      _ATPR,
      0,
      [_tN, _pr, _tPT],
      [[0, 1], [0, { [_hH2]: _xap }], [0, { [_hQ2]: _tPT }]],
      2
    ];
    exports2.AttachThingPrincipalResponse$ = [
      3,
      n05,
      _ATPRt,
      0,
      [],
      []
    ];
    exports2.AttributePayload$ = [
      3,
      n05,
      _AP,
      0,
      [_at, _me],
      [128 | 0, 2]
    ];
    exports2.AuditCheckConfiguration$ = [
      3,
      n05,
      _ACC,
      0,
      [_en, _con],
      [2, 128 | 0]
    ];
    exports2.AuditCheckDetails$ = [
      3,
      n05,
      _ACD,
      0,
      [_cRS, _cC, _tRC, _nCRC, _sNCRC, _eC, _m4],
      [0, 2, 1, 1, 1, 0, 0]
    ];
    exports2.AuditFinding$ = [
      3,
      n05,
      _AF,
      0,
      [_fI, _tI2, _cN, _tST, _fTi, _sev, _nCR, _rR, _rFNC, _rFNCC, _iS],
      [0, 0, 0, 4, 4, 0, () => exports2.NonCompliantResource$, () => RelatedResources, 0, 0, 2]
    ];
    exports2.AuditMitigationActionExecutionMetadata$ = [
      3,
      n05,
      _AMAEM,
      0,
      [_tI2, _fI, _aN, _aI2, _st, _sT3, _eT, _eC, _m4],
      [0, 0, 0, 0, 0, 4, 4, 0, 0]
    ];
    exports2.AuditMitigationActionsTaskMetadata$ = [
      3,
      n05,
      _AMATM,
      0,
      [_tI2, _sT3, _tS],
      [0, 4, 0]
    ];
    exports2.AuditMitigationActionsTaskTarget$ = [
      3,
      n05,
      _AMATT,
      0,
      [_aTI, _fIi, _aCTRCF],
      [0, 64 | 0, [2, n05, _ACTRCF, 0, 0, 64 | 0]]
    ];
    exports2.AuditNotificationTarget$ = [
      3,
      n05,
      _ANT,
      0,
      [_tAa, _rAo, _en],
      [0, 0, 2]
    ];
    exports2.AuditSuppression$ = [
      3,
      n05,
      _AS,
      0,
      [_cN, _rIe, _eD, _sI, _d],
      [0, () => exports2.ResourceIdentifier$, 4, 2, 0],
      2
    ];
    exports2.AuditTaskMetadata$ = [
      3,
      n05,
      _ATM,
      0,
      [_tI2, _tS, _tT3],
      [0, 0, 0]
    ];
    exports2.AuthInfo$ = [
      3,
      n05,
      _AI,
      0,
      [_re, _aT4],
      [64 | 0, 0],
      1
    ];
    exports2.AuthorizerConfig$ = [
      3,
      n05,
      _ACu,
      0,
      [_dAN, _aAO],
      [0, 2]
    ];
    exports2.AuthorizerDescription$ = [
      3,
      n05,
      _AD,
      0,
      [_aNu, _aA, _aFA, _tKN, _tSPK, _st, _cD, _lMD, _sD, _eCFH],
      [0, 0, 0, 0, 128 | 0, 0, 4, 4, 2, 2]
    ];
    exports2.AuthorizerSummary$ = [
      3,
      n05,
      _ASu,
      0,
      [_aNu, _aA],
      [0, 0]
    ];
    exports2.AuthResult$ = [
      3,
      n05,
      _AR2,
      0,
      [_aIu, _al, _de, _aD, _mCV],
      [() => exports2.AuthInfo$, () => exports2.Allowed$, () => exports2.Denied$, 0, 64 | 0]
    ];
    exports2.AwsJobAbortConfig$ = [
      3,
      n05,
      _AJAC,
      0,
      [_aCL],
      [() => AwsJobAbortCriteriaList],
      1
    ];
    exports2.AwsJobAbortCriteria$ = [
      3,
      n05,
      _AJACw,
      0,
      [_fT, _a2, _tP, _mNOET],
      [0, 0, 1, 1],
      4
    ];
    exports2.AwsJobExecutionsRolloutConfig$ = [
      3,
      n05,
      _AJERC,
      0,
      [_mPM, _eR],
      [1, () => exports2.AwsJobExponentialRolloutRate$]
    ];
    exports2.AwsJobExponentialRolloutRate$ = [
      3,
      n05,
      _AJERR,
      0,
      [_bRPM, _iF, _rIC],
      [1, 1, () => exports2.AwsJobRateIncreaseCriteria$],
      3
    ];
    exports2.AwsJobPresignedUrlConfig$ = [
      3,
      n05,
      _AJPUC,
      0,
      [_eIS],
      [1]
    ];
    exports2.AwsJobRateIncreaseCriteria$ = [
      3,
      n05,
      _AJRIC,
      0,
      [_nONT, _nOST],
      [1, 1]
    ];
    exports2.AwsJobTimeoutConfig$ = [
      3,
      n05,
      _AJTC,
      0,
      [_iPTIM],
      [1]
    ];
    exports2.AwsJsonSubstitutionCommandPreprocessorConfig$ = [
      3,
      n05,
      _AJSCPC,
      0,
      [_oF],
      [0],
      1
    ];
    exports2.BatchConfig$ = [
      3,
      n05,
      _BC,
      0,
      [_mBOM, _mBS, _mBSB],
      [1, 1, 1]
    ];
    exports2.Behavior$ = [
      3,
      n05,
      _B,
      0,
      [_n, _met, _mD, _cr, _sA, _eM],
      [0, 0, () => exports2.MetricDimension$, () => exports2.BehaviorCriteria$, 2, 2],
      1
    ];
    exports2.BehaviorCriteria$ = [
      3,
      n05,
      _BCe,
      0,
      [_cO, _va, _dS, _cDTA, _cDTC, _sTt, _mDC],
      [0, () => exports2.MetricValue$, 1, 1, 1, () => exports2.StatisticalThreshold$, () => exports2.MachineLearningDetectionConfig$]
    ];
    exports2.BehaviorModelTrainingSummary$ = [
      3,
      n05,
      _BMTS,
      0,
      [_sPN, _bN, _tDCSD, _mS, _dCP, _lMRD],
      [0, 0, 4, 0, 1, 4]
    ];
    exports2.BillingGroupMetadata$ = [
      3,
      n05,
      _BGM,
      0,
      [_cD],
      [4]
    ];
    exports2.BillingGroupProperties$ = [
      3,
      n05,
      _BGP,
      0,
      [_bGD],
      [0]
    ];
    exports2.Bucket$ = [
      3,
      n05,
      _Bu,
      0,
      [_kV, _cou],
      [0, 1]
    ];
    exports2.BucketsAggregationType$ = [
      3,
      n05,
      _BAT,
      0,
      [_tAe],
      [() => exports2.TermsAggregation$]
    ];
    exports2.CACertificate$ = [
      3,
      n05,
      _CAC,
      0,
      [_cAe, _cI3, _st, _cD],
      [0, 0, 0, 4]
    ];
    exports2.CACertificateDescription$ = [
      3,
      n05,
      _CACD,
      0,
      [_cAe, _cI3, _st, _cP, _oB, _cD, _aRS, _lMD, _cV3, _gI, _val, _cMe],
      [0, 0, 0, 0, 0, 4, 0, 4, 1, 0, () => exports2.CertificateValidity$, 0]
    ];
    exports2.CancelAuditMitigationActionsTaskRequest$ = [
      3,
      n05,
      _CAMATR,
      0,
      [_tI2],
      [[0, 1]],
      1
    ];
    exports2.CancelAuditMitigationActionsTaskResponse$ = [
      3,
      n05,
      _CAMATRa,
      0,
      [],
      []
    ];
    exports2.CancelAuditTaskRequest$ = [
      3,
      n05,
      _CATR,
      0,
      [_tI2],
      [[0, 1]],
      1
    ];
    exports2.CancelAuditTaskResponse$ = [
      3,
      n05,
      _CATRa,
      0,
      [],
      []
    ];
    exports2.CancelCertificateTransferRequest$ = [
      3,
      n05,
      _CCTR,
      0,
      [_cI3],
      [[0, 1]],
      1
    ];
    exports2.CancelDetectMitigationActionsTaskRequest$ = [
      3,
      n05,
      _CDMATR,
      0,
      [_tI2],
      [[0, 1]],
      1
    ];
    exports2.CancelDetectMitigationActionsTaskResponse$ = [
      3,
      n05,
      _CDMATRa,
      0,
      [],
      []
    ];
    exports2.CancelJobExecutionRequest$ = [
      3,
      n05,
      _CJER,
      0,
      [_jI, _tN, _fo, _eV, _sDt],
      [[0, 1], [0, 1], [2, { [_hQ2]: _fo }], 1, 128 | 0],
      2
    ];
    exports2.CancelJobRequest$ = [
      3,
      n05,
      _CJR,
      0,
      [_jI, _rC2, _co3, _fo],
      [[0, 1], 0, 0, [2, { [_hQ2]: _fo }]],
      1
    ];
    exports2.CancelJobResponse$ = [
      3,
      n05,
      _CJRa,
      0,
      [_jA, _jI, _d],
      [0, 0, 0]
    ];
    exports2.Certificate$ = [
      3,
      n05,
      _C2,
      0,
      [_cAe, _cI3, _st, _cMe, _cD],
      [0, 0, 0, 0, 4]
    ];
    exports2.CertificateDescription$ = [
      3,
      n05,
      _CD,
      0,
      [_cAe, _cI3, _cCI, _st, _cP, _oB, _pOB, _cD, _lMD, _cV3, _tD, _gI, _val, _cMe],
      [0, 0, 0, 0, 0, 0, 0, 4, 4, 1, () => exports2.TransferData$, 0, () => exports2.CertificateValidity$, 0]
    ];
    exports2.CertificateProviderSummary$ = [
      3,
      n05,
      _CPS,
      0,
      [_cPN, _cPA],
      [0, 0]
    ];
    exports2.CertificateValidity$ = [
      3,
      n05,
      _CV2,
      0,
      [_nB, _nA],
      [4, 4]
    ];
    exports2.ClearDefaultAuthorizerRequest$ = [
      3,
      n05,
      _CDAR,
      0,
      [],
      []
    ];
    exports2.ClearDefaultAuthorizerResponse$ = [
      3,
      n05,
      _CDARl,
      0,
      [],
      []
    ];
    exports2.ClientCertificateConfig$ = [
      3,
      n05,
      _CCC,
      0,
      [_cCCA],
      [0]
    ];
    exports2.CloudwatchAlarmAction$ = [
      3,
      n05,
      _CAA,
      0,
      [_rAo, _aNl, _sR, _sV],
      [0, 0, 0, 0],
      4
    ];
    exports2.CloudwatchLogsAction$ = [
      3,
      n05,
      _CLA,
      0,
      [_rAo, _lGN, _bM],
      [0, 0, 2],
      2
    ];
    exports2.CloudwatchMetricAction$ = [
      3,
      n05,
      _CMA,
      0,
      [_rAo, _mN, _mNe, _mV, _mU, _mT],
      [0, 0, 0, 0, 0, 0],
      5
    ];
    exports2.CodeSigning$ = [
      3,
      n05,
      _CS2,
      0,
      [_aSJI, _sSJP, _cCS],
      [0, () => exports2.StartSigningJobParameter$, () => exports2.CustomCodeSigning$]
    ];
    exports2.CodeSigningCertificateChain$ = [
      3,
      n05,
      _CSCC,
      0,
      [_cNe, _iD],
      [0, 0]
    ];
    exports2.CodeSigningSignature$ = [
      3,
      n05,
      _CSS,
      0,
      [_iD],
      [21]
    ];
    exports2.CommandExecutionResult$ = [
      3,
      n05,
      _CER,
      0,
      [_S, _B_, _BIN],
      [0, 2, 21]
    ];
    exports2.CommandExecutionSummary$ = [
      3,
      n05,
      _CES,
      0,
      [_cAo, _eI3, _tAa, _st, _cAr, _sAt, _cAom],
      [0, 0, 0, 0, 4, 4, 4]
    ];
    exports2.CommandParameter$ = [
      3,
      n05,
      _CP,
      0,
      [_n, _ty, _va, _dV, _vC, _d],
      [0, 0, () => exports2.CommandParameterValue$, () => exports2.CommandParameterValue$, () => CommandParameterValueConditionList, 0],
      1
    ];
    exports2.CommandParameterValue$ = [
      3,
      n05,
      _CPV,
      0,
      [_S, _B_, _I, _L, _D, _BIN, _UL],
      [0, 2, 1, 1, 1, 21, 0]
    ];
    exports2.CommandParameterValueComparisonOperand$ = [
      3,
      n05,
      _CPVCO,
      0,
      [_nu, _num, _str, _stri, _nR],
      [0, 64 | 0, 0, 64 | 0, () => exports2.CommandParameterValueNumberRange$]
    ];
    exports2.CommandParameterValueCondition$ = [
      3,
      n05,
      _CPVC,
      0,
      [_cO, _o],
      [0, () => exports2.CommandParameterValueComparisonOperand$],
      2
    ];
    exports2.CommandParameterValueNumberRange$ = [
      3,
      n05,
      _CPVNR,
      0,
      [_mi, _ma],
      [0, 0],
      2
    ];
    exports2.CommandPayload$ = [
      3,
      n05,
      _CPo,
      0,
      [_cont, _cTo],
      [21, 0]
    ];
    exports2.CommandPreprocessor$ = [
      3,
      n05,
      _CPom,
      0,
      [_aJS],
      [() => exports2.AwsJsonSubstitutionCommandPreprocessorConfig$]
    ];
    exports2.CommandSummary$ = [
      3,
      n05,
      _CSo,
      0,
      [_cAo, _cIo, _dN, _dep, _cAr, _lUA, _pD],
      [0, 0, 0, 2, 4, 4, 2]
    ];
    exports2.Configuration$ = [
      3,
      n05,
      _Co,
      0,
      [_E2],
      [2]
    ];
    exports2.ConfigurationDetails$ = [
      3,
      n05,
      _CDo,
      0,
      [_cS2, _eC, _eMr],
      [0, 0, 0]
    ];
    exports2.ConfirmTopicRuleDestinationRequest$ = [
      3,
      n05,
      _CTRDR,
      0,
      [_cTon],
      [[0, 1]],
      1
    ];
    exports2.ConfirmTopicRuleDestinationResponse$ = [
      3,
      n05,
      _CTRDRo,
      0,
      [],
      []
    ];
    exports2.CreateAuditSuppressionRequest$ = [
      3,
      n05,
      _CASR,
      0,
      [_cN, _rIe, _eD, _sI, _d, _cRT],
      [0, () => exports2.ResourceIdentifier$, 4, 2, 0, [0, 4]],
      2
    ];
    exports2.CreateAuditSuppressionResponse$ = [
      3,
      n05,
      _CASRr,
      0,
      [],
      []
    ];
    exports2.CreateAuthorizerRequest$ = [
      3,
      n05,
      _CAR,
      0,
      [_aNu, _aFA, _tKN, _tSPK, _st, _tag, _sD, _eCFH],
      [[0, 1], 0, 0, 128 | 0, 0, () => TagList, 2, 2],
      2
    ];
    exports2.CreateAuthorizerResponse$ = [
      3,
      n05,
      _CARr,
      0,
      [_aNu, _aA],
      [0, 0]
    ];
    exports2.CreateBillingGroupRequest$ = [
      3,
      n05,
      _CBGR,
      0,
      [_bGN, _bGP, _tag],
      [[0, 1], () => exports2.BillingGroupProperties$, () => TagList],
      1
    ];
    exports2.CreateBillingGroupResponse$ = [
      3,
      n05,
      _CBGRr,
      0,
      [_bGN, _bGA, _bGI],
      [0, 0, 0]
    ];
    exports2.CreateCertificateFromCsrRequest$ = [
      3,
      n05,
      _CCFCR,
      0,
      [_cSR, _sAA],
      [0, [2, { [_hQ2]: _sAA }]],
      1
    ];
    exports2.CreateCertificateFromCsrResponse$ = [
      3,
      n05,
      _CCFCRr,
      0,
      [_cAe, _cI3, _cP],
      [0, 0, 0]
    ];
    exports2.CreateCertificateProviderRequest$ = [
      3,
      n05,
      _CCPR,
      0,
      [_cPN, _lFA, _aDFO, _cT, _tag],
      [[0, 1], 0, 64 | 0, [0, 4], () => TagList],
      3
    ];
    exports2.CreateCertificateProviderResponse$ = [
      3,
      n05,
      _CCPRr,
      0,
      [_cPN, _cPA],
      [0, 0]
    ];
    exports2.CreateCommandRequest$ = [
      3,
      n05,
      _CCR,
      0,
      [_cIo, _na, _dN, _d, _pa, _pT, _pre, _mP, _rAo, _tag],
      [[0, 1], 0, 0, 0, () => exports2.CommandPayload$, 0, () => exports2.CommandPreprocessor$, () => CommandParameterList, 0, () => TagList],
      1
    ];
    exports2.CreateCommandResponse$ = [
      3,
      n05,
      _CCRr,
      0,
      [_cIo, _cAo],
      [0, 0]
    ];
    exports2.CreateCustomMetricRequest$ = [
      3,
      n05,
      _CCMR,
      0,
      [_mNe, _mTe, _dN, _tag, _cRT],
      [[0, 1], 0, 0, () => TagList, [0, 4]],
      2
    ];
    exports2.CreateCustomMetricResponse$ = [
      3,
      n05,
      _CCMRr,
      0,
      [_mNe, _mA],
      [0, 0]
    ];
    exports2.CreateDimensionRequest$ = [
      3,
      n05,
      _CDR,
      0,
      [_n, _ty, _sVt, _tag, _cRT],
      [[0, 1], 0, 64 | 0, () => TagList, [0, 4]],
      3
    ];
    exports2.CreateDimensionResponse$ = [
      3,
      n05,
      _CDRr,
      0,
      [_n, _ar],
      [0, 0]
    ];
    exports2.CreateDomainConfigurationRequest$ = [
      3,
      n05,
      _CDCR,
      0,
      [_dCN, _dNo, _sCA, _vCA, _aC, _sTe, _tag, _tC, _sCC, _aTu, _aP, _cCC],
      [[0, 1], 0, 64 | 0, 0, () => exports2.AuthorizerConfig$, 0, () => TagList, () => exports2.TlsConfig$, () => exports2.ServerCertificateConfig$, 0, 0, () => exports2.ClientCertificateConfig$],
      1
    ];
    exports2.CreateDomainConfigurationResponse$ = [
      3,
      n05,
      _CDCRr,
      0,
      [_dCN, _dCA],
      [0, 0]
    ];
    exports2.CreateDynamicThingGroupRequest$ = [
      3,
      n05,
      _CDTGR,
      0,
      [_tGNh, _qS, _tGP, _iN, _qV, _tag],
      [[0, 1], 0, () => exports2.ThingGroupProperties$, 0, 0, () => TagList],
      2
    ];
    exports2.CreateDynamicThingGroupResponse$ = [
      3,
      n05,
      _CDTGRr,
      0,
      [_tGNh, _tGA, _tGI, _iN, _qS, _qV],
      [0, 0, 0, 0, 0, 0]
    ];
    exports2.CreateFleetMetricRequest$ = [
      3,
      n05,
      _CFMR,
      0,
      [_mNe, _qS, _aTg, _pe, _aF, _d, _qV, _iN, _u, _tag],
      [[0, 1], 0, () => exports2.AggregationType$, 1, 0, 0, 0, 0, 0, () => TagList],
      5
    ];
    exports2.CreateFleetMetricResponse$ = [
      3,
      n05,
      _CFMRr,
      0,
      [_mNe, _mA],
      [0, 0]
    ];
    exports2.CreateJobRequest$ = [
      3,
      n05,
      _CJRr,
      0,
      [_jI, _ta, _dSo, _do, _d, _pUC, _tSa, _jERC, _aCb, _tCi, _tag, _nI, _jTA, _jERCo, _dP, _sC, _dPV],
      [[0, 1], 64 | 0, 0, 0, 0, () => exports2.PresignedUrlConfig$, 0, () => exports2.JobExecutionsRolloutConfig$, () => exports2.AbortConfig$, () => exports2.TimeoutConfig$, () => TagList, 0, 0, () => exports2.JobExecutionsRetryConfig$, 128 | 0, () => exports2.SchedulingConfig$, 64 | 0],
      2
    ];
    exports2.CreateJobResponse$ = [
      3,
      n05,
      _CJRre,
      0,
      [_jA, _jI, _d],
      [0, 0, 0]
    ];
    exports2.CreateJobTemplateRequest$ = [
      3,
      n05,
      _CJTR,
      0,
      [_jTI, _d, _jA, _dSo, _do, _pUC, _jERC, _aCb, _tCi, _tag, _jERCo, _mW, _dPV],
      [[0, 1], 0, 0, 0, 0, () => exports2.PresignedUrlConfig$, () => exports2.JobExecutionsRolloutConfig$, () => exports2.AbortConfig$, () => exports2.TimeoutConfig$, () => TagList, () => exports2.JobExecutionsRetryConfig$, () => MaintenanceWindows, 64 | 0],
      2
    ];
    exports2.CreateJobTemplateResponse$ = [
      3,
      n05,
      _CJTRr,
      0,
      [_jTA, _jTI],
      [0, 0]
    ];
    exports2.CreateKeysAndCertificateRequest$ = [
      3,
      n05,
      _CKACR,
      0,
      [_sAA],
      [[2, { [_hQ2]: _sAA }]]
    ];
    exports2.CreateKeysAndCertificateResponse$ = [
      3,
      n05,
      _CKACRr,
      0,
      [_cAe, _cI3, _cP, _kP],
      [0, 0, 0, [() => exports2.KeyPair$, 0]]
    ];
    exports2.CreateMitigationActionRequest$ = [
      3,
      n05,
      _CMAR,
      0,
      [_aN, _rAo, _aPc, _tag],
      [[0, 1], 0, () => exports2.MitigationActionParams$, () => TagList],
      3
    ];
    exports2.CreateMitigationActionResponse$ = [
      3,
      n05,
      _CMARr,
      0,
      [_aAc, _aI2],
      [0, 0]
    ];
    exports2.CreateOTAUpdateRequest$ = [
      3,
      n05,
      _COTAUR,
      0,
      [_oUI, _ta, _fi, _rAo, _d, _pro, _tSa, _aJERC, _aJPUC, _aJAC, _aJTC, _aPd, _tag],
      [[0, 1], 64 | 0, () => OTAUpdateFiles, 0, 0, 64 | 0, 0, () => exports2.AwsJobExecutionsRolloutConfig$, () => exports2.AwsJobPresignedUrlConfig$, () => exports2.AwsJobAbortConfig$, () => exports2.AwsJobTimeoutConfig$, 128 | 0, () => TagList],
      4
    ];
    exports2.CreateOTAUpdateResponse$ = [
      3,
      n05,
      _COTAURr,
      0,
      [_oUI, _aIJI, _oUA, _aIJA, _oUS],
      [0, 0, 0, 0, 0]
    ];
    exports2.CreatePackageRequest$ = [
      3,
      n05,
      _CPR,
      0,
      [_pN, _d, _tag, _cT],
      [[0, 1], [() => ResourceDescription, 0], 128 | 0, [0, { [_hQ2]: _cT, [_iT3]: 1 }]],
      1
    ];
    exports2.CreatePackageResponse$ = [
      3,
      n05,
      _CPRr,
      0,
      [_pN, _pA, _d],
      [0, 0, [() => ResourceDescription, 0]]
    ];
    exports2.CreatePackageVersionRequest$ = [
      3,
      n05,
      _CPVR,
      0,
      [_pN, _vN, _d, _at, _art, _rec, _tag, _cT],
      [[0, 1], [0, 1], [() => ResourceDescription, 0], [() => ResourceAttributes, 0], () => exports2.PackageVersionArtifact$, [() => PackageVersionRecipe, 0], 128 | 0, [0, { [_hQ2]: _cT, [_iT3]: 1 }]],
      2
    ];
    exports2.CreatePackageVersionResponse$ = [
      3,
      n05,
      _CPVRr,
      0,
      [_pVA, _pN, _vN, _d, _at, _st, _eRr],
      [0, 0, 0, [() => ResourceDescription, 0], [() => ResourceAttributes, 0], 0, 0]
    ];
    exports2.CreatePolicyRequest$ = [
      3,
      n05,
      _CPRre,
      0,
      [_pNo, _pDo, _tag],
      [[0, 1], 0, () => TagList],
      2
    ];
    exports2.CreatePolicyResponse$ = [
      3,
      n05,
      _CPRrea,
      0,
      [_pNo, _pAo, _pDo, _pVI],
      [0, 0, 0, 0]
    ];
    exports2.CreatePolicyVersionRequest$ = [
      3,
      n05,
      _CPVRre,
      0,
      [_pNo, _pDo, _sAD],
      [[0, 1], 0, [2, { [_hQ2]: _sAD }]],
      2
    ];
    exports2.CreatePolicyVersionResponse$ = [
      3,
      n05,
      _CPVRrea,
      0,
      [_pAo, _pDo, _pVI, _iDV],
      [0, 0, 0, 2]
    ];
    exports2.CreateProvisioningClaimRequest$ = [
      3,
      n05,
      _CPCR,
      0,
      [_tNe],
      [[0, 1]],
      1
    ];
    exports2.CreateProvisioningClaimResponse$ = [
      3,
      n05,
      _CPCRr,
      0,
      [_cI3, _cP, _kP, _ex2],
      [0, 0, [() => exports2.KeyPair$, 0], 4]
    ];
    exports2.CreateProvisioningTemplateRequest$ = [
      3,
      n05,
      _CPTR,
      0,
      [_tNe, _tB, _pRA, _d, _en, _pPH, _tag, _ty],
      [0, 0, 0, 0, 2, () => exports2.ProvisioningHook$, () => TagList, 0],
      3
    ];
    exports2.CreateProvisioningTemplateResponse$ = [
      3,
      n05,
      _CPTRr,
      0,
      [_tAem, _tNe, _dVI],
      [0, 0, 1]
    ];
    exports2.CreateProvisioningTemplateVersionRequest$ = [
      3,
      n05,
      _CPTVR,
      0,
      [_tNe, _tB, _sAD],
      [[0, 1], 0, [2, { [_hQ2]: _sAD }]],
      2
    ];
    exports2.CreateProvisioningTemplateVersionResponse$ = [
      3,
      n05,
      _CPTVRr,
      0,
      [_tAem, _tNe, _vIe, _iDV],
      [0, 0, 1, 2]
    ];
    exports2.CreateRoleAliasRequest$ = [
      3,
      n05,
      _CRAR,
      0,
      [_rAol, _rAo, _cDS, _tag],
      [[0, 1], 0, 1, () => TagList],
      2
    ];
    exports2.CreateRoleAliasResponse$ = [
      3,
      n05,
      _CRARr,
      0,
      [_rAol, _rAA],
      [0, 0]
    ];
    exports2.CreateScheduledAuditRequest$ = [
      3,
      n05,
      _CSAR,
      0,
      [_fr, _tCN, _sAN, _dOM, _dOW, _tag],
      [0, 64 | 0, [0, 1], 0, 0, () => TagList],
      3
    ];
    exports2.CreateScheduledAuditResponse$ = [
      3,
      n05,
      _CSARr,
      0,
      [_sAAc],
      [0]
    ];
    exports2.CreateSecurityProfileRequest$ = [
      3,
      n05,
      _CSPR,
      0,
      [_sPN, _sPD, _be, _aTl, _aMTR, _aMTRV, _tag, _mEC],
      [[0, 1], 0, () => Behaviors, () => AlertTargets, 64 | 0, () => AdditionalMetricsToRetainV2List, () => TagList, () => exports2.MetricsExportConfig$],
      1
    ];
    exports2.CreateSecurityProfileResponse$ = [
      3,
      n05,
      _CSPRr,
      0,
      [_sPN, _sPA],
      [0, 0]
    ];
    exports2.CreateStreamRequest$ = [
      3,
      n05,
      _CSR,
      0,
      [_sIt, _fi, _rAo, _d, _tag],
      [[0, 1], () => StreamFiles, 0, 0, () => TagList],
      3
    ];
    exports2.CreateStreamResponse$ = [
      3,
      n05,
      _CSRr,
      0,
      [_sIt, _sAtr, _d, _sVtr],
      [0, 0, 0, 1]
    ];
    exports2.CreateThingGroupRequest$ = [
      3,
      n05,
      _CTGR,
      0,
      [_tGNh, _pGN, _tGP, _tag],
      [[0, 1], 0, () => exports2.ThingGroupProperties$, () => TagList],
      1
    ];
    exports2.CreateThingGroupResponse$ = [
      3,
      n05,
      _CTGRr,
      0,
      [_tGNh, _tGA, _tGI],
      [0, 0, 0]
    ];
    exports2.CreateThingRequest$ = [
      3,
      n05,
      _CTR2,
      0,
      [_tN, _tTN, _aPt, _bGN],
      [[0, 1], 0, () => exports2.AttributePayload$, 0],
      1
    ];
    exports2.CreateThingResponse$ = [
      3,
      n05,
      _CTRr2,
      0,
      [_tN, _tA, _tIh],
      [0, 0, 0]
    ];
    exports2.CreateThingTypeRequest$ = [
      3,
      n05,
      _CTTR,
      0,
      [_tTN, _tTP, _tag],
      [[0, 1], () => exports2.ThingTypeProperties$, () => TagList],
      1
    ];
    exports2.CreateThingTypeResponse$ = [
      3,
      n05,
      _CTTRr,
      0,
      [_tTN, _tTA, _tTI],
      [0, 0, 0]
    ];
    exports2.CreateTopicRuleDestinationRequest$ = [
      3,
      n05,
      _CTRDRr,
      0,
      [_dC2],
      [() => exports2.TopicRuleDestinationConfiguration$],
      1
    ];
    exports2.CreateTopicRuleDestinationResponse$ = [
      3,
      n05,
      _CTRDRre,
      0,
      [_tRD],
      [() => exports2.TopicRuleDestination$]
    ];
    exports2.CreateTopicRuleRequest$ = [
      3,
      n05,
      _CTRR,
      0,
      [_rN2, _tRP, _tag],
      [[0, 1], [() => exports2.TopicRulePayload$, 16], [0, { [_hH2]: _xat }]],
      2
    ];
    exports2.CustomCodeSigning$ = [
      3,
      n05,
      _CCS,
      0,
      [_si, _cCe, _hA, _sAi],
      [() => exports2.CodeSigningSignature$, () => exports2.CodeSigningCertificateChain$, 0, 0]
    ];
    exports2.DeleteAccountAuditConfigurationRequest$ = [
      3,
      n05,
      _DAACR,
      0,
      [_dSA],
      [[2, { [_hQ2]: _dSA }]]
    ];
    exports2.DeleteAccountAuditConfigurationResponse$ = [
      3,
      n05,
      _DAACRe,
      0,
      [],
      []
    ];
    exports2.DeleteAuditSuppressionRequest$ = [
      3,
      n05,
      _DASR,
      0,
      [_cN, _rIe],
      [0, () => exports2.ResourceIdentifier$],
      2
    ];
    exports2.DeleteAuditSuppressionResponse$ = [
      3,
      n05,
      _DASRe,
      0,
      [],
      []
    ];
    exports2.DeleteAuthorizerRequest$ = [
      3,
      n05,
      _DAR,
      0,
      [_aNu],
      [[0, 1]],
      1
    ];
    exports2.DeleteAuthorizerResponse$ = [
      3,
      n05,
      _DARe,
      0,
      [],
      []
    ];
    exports2.DeleteBillingGroupRequest$ = [
      3,
      n05,
      _DBGR,
      0,
      [_bGN, _eV],
      [[0, 1], [1, { [_hQ2]: _eV }]],
      1
    ];
    exports2.DeleteBillingGroupResponse$ = [
      3,
      n05,
      _DBGRe,
      0,
      [],
      []
    ];
    exports2.DeleteCACertificateRequest$ = [
      3,
      n05,
      _DCACR,
      0,
      [_cI3],
      [[0, 1]],
      1
    ];
    exports2.DeleteCACertificateResponse$ = [
      3,
      n05,
      _DCACRe,
      0,
      [],
      []
    ];
    exports2.DeleteCertificateProviderRequest$ = [
      3,
      n05,
      _DCPR,
      0,
      [_cPN],
      [[0, 1]],
      1
    ];
    exports2.DeleteCertificateProviderResponse$ = [
      3,
      n05,
      _DCPRe,
      0,
      [],
      []
    ];
    exports2.DeleteCertificateRequest$ = [
      3,
      n05,
      _DCR,
      0,
      [_cI3, _fD],
      [[0, 1], [2, { [_hQ2]: _fD }]],
      1
    ];
    exports2.DeleteCommandExecutionRequest$ = [
      3,
      n05,
      _DCER,
      0,
      [_eI3, _tAa],
      [[0, 1], [0, { [_hQ2]: _tAa }]],
      2
    ];
    exports2.DeleteCommandExecutionResponse$ = [
      3,
      n05,
      _DCERe,
      0,
      [],
      []
    ];
    exports2.DeleteCommandRequest$ = [
      3,
      n05,
      _DCRe,
      0,
      [_cIo],
      [[0, 1]],
      1
    ];
    exports2.DeleteCommandResponse$ = [
      3,
      n05,
      _DCRel,
      0,
      [_sCt],
      [[1, 32]]
    ];
    exports2.DeleteCustomMetricRequest$ = [
      3,
      n05,
      _DCMR,
      0,
      [_mNe],
      [[0, 1]],
      1
    ];
    exports2.DeleteCustomMetricResponse$ = [
      3,
      n05,
      _DCMRe,
      0,
      [],
      []
    ];
    exports2.DeleteDimensionRequest$ = [
      3,
      n05,
      _DDR,
      0,
      [_n],
      [[0, 1]],
      1
    ];
    exports2.DeleteDimensionResponse$ = [
      3,
      n05,
      _DDRe,
      0,
      [],
      []
    ];
    exports2.DeleteDomainConfigurationRequest$ = [
      3,
      n05,
      _DDCR,
      0,
      [_dCN],
      [[0, 1]],
      1
    ];
    exports2.DeleteDomainConfigurationResponse$ = [
      3,
      n05,
      _DDCRe,
      0,
      [],
      []
    ];
    exports2.DeleteDynamicThingGroupRequest$ = [
      3,
      n05,
      _DDTGR,
      0,
      [_tGNh, _eV],
      [[0, 1], [1, { [_hQ2]: _eV }]],
      1
    ];
    exports2.DeleteDynamicThingGroupResponse$ = [
      3,
      n05,
      _DDTGRe,
      0,
      [],
      []
    ];
    exports2.DeleteFleetMetricRequest$ = [
      3,
      n05,
      _DFMR,
      0,
      [_mNe, _eV],
      [[0, 1], [1, { [_hQ2]: _eV }]],
      1
    ];
    exports2.DeleteJobExecutionRequest$ = [
      3,
      n05,
      _DJER,
      0,
      [_jI, _tN, _eN, _fo, _nI],
      [[0, 1], [0, 1], [1, 1], [2, { [_hQ2]: _fo }], [0, { [_hQ2]: _nI }]],
      3
    ];
    exports2.DeleteJobRequest$ = [
      3,
      n05,
      _DJR,
      0,
      [_jI, _fo, _nI],
      [[0, 1], [2, { [_hQ2]: _fo }], [0, { [_hQ2]: _nI }]],
      1
    ];
    exports2.DeleteJobTemplateRequest$ = [
      3,
      n05,
      _DJTR,
      0,
      [_jTI],
      [[0, 1]],
      1
    ];
    exports2.DeleteMitigationActionRequest$ = [
      3,
      n05,
      _DMAR,
      0,
      [_aN],
      [[0, 1]],
      1
    ];
    exports2.DeleteMitigationActionResponse$ = [
      3,
      n05,
      _DMARe,
      0,
      [],
      []
    ];
    exports2.DeleteOTAUpdateRequest$ = [
      3,
      n05,
      _DOTAUR,
      0,
      [_oUI, _dSe, _fDAWSJ],
      [[0, 1], [2, { [_hQ2]: _dSe }], [2, { [_hQ2]: _fDAWSJ }]],
      1
    ];
    exports2.DeleteOTAUpdateResponse$ = [
      3,
      n05,
      _DOTAURe,
      0,
      [],
      []
    ];
    exports2.DeletePackageRequest$ = [
      3,
      n05,
      _DPR,
      0,
      [_pN, _cT],
      [[0, 1], [0, { [_hQ2]: _cT, [_iT3]: 1 }]],
      1
    ];
    exports2.DeletePackageResponse$ = [
      3,
      n05,
      _DPRe,
      0,
      [],
      []
    ];
    exports2.DeletePackageVersionRequest$ = [
      3,
      n05,
      _DPVR,
      0,
      [_pN, _vN, _cT],
      [[0, 1], [0, 1], [0, { [_hQ2]: _cT, [_iT3]: 1 }]],
      2
    ];
    exports2.DeletePackageVersionResponse$ = [
      3,
      n05,
      _DPVRe,
      0,
      [],
      []
    ];
    exports2.DeletePolicyRequest$ = [
      3,
      n05,
      _DPRel,
      0,
      [_pNo],
      [[0, 1]],
      1
    ];
    exports2.DeletePolicyVersionRequest$ = [
      3,
      n05,
      _DPVRel,
      0,
      [_pNo, _pVI],
      [[0, 1], [0, 1]],
      2
    ];
    exports2.DeleteProvisioningTemplateRequest$ = [
      3,
      n05,
      _DPTR,
      0,
      [_tNe],
      [[0, 1]],
      1
    ];
    exports2.DeleteProvisioningTemplateResponse$ = [
      3,
      n05,
      _DPTRe,
      0,
      [],
      []
    ];
    exports2.DeleteProvisioningTemplateVersionRequest$ = [
      3,
      n05,
      _DPTVR,
      0,
      [_tNe, _vIe],
      [[0, 1], [1, 1]],
      2
    ];
    exports2.DeleteProvisioningTemplateVersionResponse$ = [
      3,
      n05,
      _DPTVRe,
      0,
      [],
      []
    ];
    exports2.DeleteRegistrationCodeRequest$ = [
      3,
      n05,
      _DRCR,
      0,
      [],
      []
    ];
    exports2.DeleteRegistrationCodeResponse$ = [
      3,
      n05,
      _DRCRe,
      0,
      [],
      []
    ];
    exports2.DeleteRoleAliasRequest$ = [
      3,
      n05,
      _DRAR,
      0,
      [_rAol],
      [[0, 1]],
      1
    ];
    exports2.DeleteRoleAliasResponse$ = [
      3,
      n05,
      _DRARe,
      0,
      [],
      []
    ];
    exports2.DeleteScheduledAuditRequest$ = [
      3,
      n05,
      _DSAR,
      0,
      [_sAN],
      [[0, 1]],
      1
    ];
    exports2.DeleteScheduledAuditResponse$ = [
      3,
      n05,
      _DSARe,
      0,
      [],
      []
    ];
    exports2.DeleteSecurityProfileRequest$ = [
      3,
      n05,
      _DSPR,
      0,
      [_sPN, _eV],
      [[0, 1], [1, { [_hQ2]: _eV }]],
      1
    ];
    exports2.DeleteSecurityProfileResponse$ = [
      3,
      n05,
      _DSPRe,
      0,
      [],
      []
    ];
    exports2.DeleteStreamRequest$ = [
      3,
      n05,
      _DSR,
      0,
      [_sIt],
      [[0, 1]],
      1
    ];
    exports2.DeleteStreamResponse$ = [
      3,
      n05,
      _DSRe,
      0,
      [],
      []
    ];
    exports2.DeleteThingGroupRequest$ = [
      3,
      n05,
      _DTGR,
      0,
      [_tGNh, _eV],
      [[0, 1], [1, { [_hQ2]: _eV }]],
      1
    ];
    exports2.DeleteThingGroupResponse$ = [
      3,
      n05,
      _DTGRe,
      0,
      [],
      []
    ];
    exports2.DeleteThingRequest$ = [
      3,
      n05,
      _DTR,
      0,
      [_tN, _eV],
      [[0, 1], [1, { [_hQ2]: _eV }]],
      1
    ];
    exports2.DeleteThingResponse$ = [
      3,
      n05,
      _DTRe,
      0,
      [],
      []
    ];
    exports2.DeleteThingTypeRequest$ = [
      3,
      n05,
      _DTTR,
      0,
      [_tTN],
      [[0, 1]],
      1
    ];
    exports2.DeleteThingTypeResponse$ = [
      3,
      n05,
      _DTTRe,
      0,
      [],
      []
    ];
    exports2.DeleteTopicRuleDestinationRequest$ = [
      3,
      n05,
      _DTRDR,
      0,
      [_ar],
      [[0, 1]],
      1
    ];
    exports2.DeleteTopicRuleDestinationResponse$ = [
      3,
      n05,
      _DTRDRe,
      0,
      [],
      []
    ];
    exports2.DeleteTopicRuleRequest$ = [
      3,
      n05,
      _DTRR,
      0,
      [_rN2],
      [[0, 1]],
      1
    ];
    exports2.DeleteV2LoggingLevelRequest$ = [
      3,
      n05,
      _DVLLR,
      0,
      [_tTa, _tNa],
      [[0, { [_hQ2]: _tTa }], [0, { [_hQ2]: _tNa }]],
      2
    ];
    exports2.Denied$ = [
      3,
      n05,
      _De,
      0,
      [_iDm, _eDx],
      [() => exports2.ImplicitDeny$, () => exports2.ExplicitDeny$]
    ];
    exports2.DeprecateThingTypeRequest$ = [
      3,
      n05,
      _DTTRep,
      0,
      [_tTN, _uD],
      [[0, 1], 2],
      1
    ];
    exports2.DeprecateThingTypeResponse$ = [
      3,
      n05,
      _DTTRepr,
      0,
      [],
      []
    ];
    exports2.DescribeAccountAuditConfigurationRequest$ = [
      3,
      n05,
      _DAACRes,
      0,
      [],
      []
    ];
    exports2.DescribeAccountAuditConfigurationResponse$ = [
      3,
      n05,
      _DAACResc,
      0,
      [_rAo, _aNTC, _aCC],
      [0, () => AuditNotificationTargetConfigurations, () => AuditCheckConfigurations]
    ];
    exports2.DescribeAuditFindingRequest$ = [
      3,
      n05,
      _DAFR,
      0,
      [_fI],
      [[0, 1]],
      1
    ];
    exports2.DescribeAuditFindingResponse$ = [
      3,
      n05,
      _DAFRe,
      0,
      [_fin],
      [() => exports2.AuditFinding$]
    ];
    exports2.DescribeAuditMitigationActionsTaskRequest$ = [
      3,
      n05,
      _DAMATR,
      0,
      [_tI2],
      [[0, 1]],
      1
    ];
    exports2.DescribeAuditMitigationActionsTaskResponse$ = [
      3,
      n05,
      _DAMATRe,
      0,
      [_tS, _sT3, _eT, _tSas, _tar, _aCTAM, _aDc],
      [0, 4, 4, () => AuditMitigationActionsTaskStatistics, () => exports2.AuditMitigationActionsTaskTarget$, [2, n05, _ACTAM, 0, 0, 64 | 0], () => MitigationActionList]
    ];
    exports2.DescribeAuditSuppressionRequest$ = [
      3,
      n05,
      _DASRes,
      0,
      [_cN, _rIe],
      [0, () => exports2.ResourceIdentifier$],
      2
    ];
    exports2.DescribeAuditSuppressionResponse$ = [
      3,
      n05,
      _DASResc,
      0,
      [_cN, _rIe, _eD, _sI, _d],
      [0, () => exports2.ResourceIdentifier$, 4, 2, 0]
    ];
    exports2.DescribeAuditTaskRequest$ = [
      3,
      n05,
      _DATR,
      0,
      [_tI2],
      [[0, 1]],
      1
    ];
    exports2.DescribeAuditTaskResponse$ = [
      3,
      n05,
      _DATRe,
      0,
      [_tS, _tT3, _tST, _tSas, _sAN, _aDu],
      [0, 0, 4, () => exports2.TaskStatistics$, 0, () => AuditDetails]
    ];
    exports2.DescribeAuthorizerRequest$ = [
      3,
      n05,
      _DARes,
      0,
      [_aNu],
      [[0, 1]],
      1
    ];
    exports2.DescribeAuthorizerResponse$ = [
      3,
      n05,
      _DAResc,
      0,
      [_aDut],
      [() => exports2.AuthorizerDescription$]
    ];
    exports2.DescribeBillingGroupRequest$ = [
      3,
      n05,
      _DBGRes,
      0,
      [_bGN],
      [[0, 1]],
      1
    ];
    exports2.DescribeBillingGroupResponse$ = [
      3,
      n05,
      _DBGResc,
      0,
      [_bGN, _bGI, _bGA, _ve, _bGP, _bGM],
      [0, 0, 0, 1, () => exports2.BillingGroupProperties$, () => exports2.BillingGroupMetadata$]
    ];
    exports2.DescribeCACertificateRequest$ = [
      3,
      n05,
      _DCACRes,
      0,
      [_cI3],
      [[0, 1]],
      1
    ];
    exports2.DescribeCACertificateResponse$ = [
      3,
      n05,
      _DCACResc,
      0,
      [_cDe, _rCe],
      [() => exports2.CACertificateDescription$, () => exports2.RegistrationConfig$]
    ];
    exports2.DescribeCertificateProviderRequest$ = [
      3,
      n05,
      _DCPRes,
      0,
      [_cPN],
      [[0, 1]],
      1
    ];
    exports2.DescribeCertificateProviderResponse$ = [
      3,
      n05,
      _DCPResc,
      0,
      [_cPN, _cPA, _lFA, _aDFO, _cD, _lMD],
      [0, 0, 0, 64 | 0, 4, 4]
    ];
    exports2.DescribeCertificateRequest$ = [
      3,
      n05,
      _DCRes,
      0,
      [_cI3],
      [[0, 1]],
      1
    ];
    exports2.DescribeCertificateResponse$ = [
      3,
      n05,
      _DCResc,
      0,
      [_cDe],
      [() => exports2.CertificateDescription$]
    ];
    exports2.DescribeCustomMetricRequest$ = [
      3,
      n05,
      _DCMRes,
      0,
      [_mNe],
      [[0, 1]],
      1
    ];
    exports2.DescribeCustomMetricResponse$ = [
      3,
      n05,
      _DCMResc,
      0,
      [_mNe, _mA, _mTe, _dN, _cD, _lMD],
      [0, 0, 0, 0, 4, 4]
    ];
    exports2.DescribeDefaultAuthorizerRequest$ = [
      3,
      n05,
      _DDAR,
      0,
      [],
      []
    ];
    exports2.DescribeDefaultAuthorizerResponse$ = [
      3,
      n05,
      _DDARe,
      0,
      [_aDut],
      [() => exports2.AuthorizerDescription$]
    ];
    exports2.DescribeDetectMitigationActionsTaskRequest$ = [
      3,
      n05,
      _DDMATR,
      0,
      [_tI2],
      [[0, 1]],
      1
    ];
    exports2.DescribeDetectMitigationActionsTaskResponse$ = [
      3,
      n05,
      _DDMATRe,
      0,
      [_tSask],
      [() => exports2.DetectMitigationActionsTaskSummary$]
    ];
    exports2.DescribeDimensionRequest$ = [
      3,
      n05,
      _DDRes,
      0,
      [_n],
      [[0, 1]],
      1
    ];
    exports2.DescribeDimensionResponse$ = [
      3,
      n05,
      _DDResc,
      0,
      [_n, _ar, _ty, _sVt, _cD, _lMD],
      [0, 0, 0, 64 | 0, 4, 4]
    ];
    exports2.DescribeDomainConfigurationRequest$ = [
      3,
      n05,
      _DDCRes,
      0,
      [_dCN],
      [[0, 1]],
      1
    ];
    exports2.DescribeDomainConfigurationResponse$ = [
      3,
      n05,
      _DDCResc,
      0,
      [_dCN, _dCA, _dNo, _sCe, _aC, _dCS, _sTe, _dT, _lSCD, _tC, _sCC, _aTu, _aP, _cCC],
      [0, 0, 0, () => ServerCertificates, () => exports2.AuthorizerConfig$, 0, 0, 0, 4, () => exports2.TlsConfig$, () => exports2.ServerCertificateConfig$, 0, 0, () => exports2.ClientCertificateConfig$]
    ];
    exports2.DescribeEncryptionConfigurationRequest$ = [
      3,
      n05,
      _DECR,
      0,
      [],
      []
    ];
    exports2.DescribeEncryptionConfigurationResponse$ = [
      3,
      n05,
      _DECRe,
      0,
      [_eTn, _kKA, _kARA, _cDo, _lMD],
      [0, 0, 0, () => exports2.ConfigurationDetails$, 4]
    ];
    exports2.DescribeEndpointRequest$ = [
      3,
      n05,
      _DER,
      0,
      [_eTnd],
      [[0, { [_hQ2]: _eTnd }]]
    ];
    exports2.DescribeEndpointResponse$ = [
      3,
      n05,
      _DERe,
      0,
      [_eA],
      [0]
    ];
    exports2.DescribeEventConfigurationsRequest$ = [
      3,
      n05,
      _DECRes,
      0,
      [],
      []
    ];
    exports2.DescribeEventConfigurationsResponse$ = [
      3,
      n05,
      _DECResc,
      0,
      [_eCv, _cD, _lMD],
      [() => EventConfigurations, 4, 4]
    ];
    exports2.DescribeFleetMetricRequest$ = [
      3,
      n05,
      _DFMRe,
      0,
      [_mNe],
      [[0, 1]],
      1
    ];
    exports2.DescribeFleetMetricResponse$ = [
      3,
      n05,
      _DFMRes,
      0,
      [_mNe, _qS, _aTg, _pe, _aF, _d, _qV, _iN, _cD, _lMD, _u, _ve, _mA],
      [0, 0, () => exports2.AggregationType$, 1, 0, 0, 0, 0, 4, 4, 0, 1, 0]
    ];
    exports2.DescribeIndexRequest$ = [
      3,
      n05,
      _DIR,
      0,
      [_iN],
      [[0, 1]],
      1
    ];
    exports2.DescribeIndexResponse$ = [
      3,
      n05,
      _DIRe,
      0,
      [_iN, _iSn, _sc2],
      [0, 0, 0]
    ];
    exports2.DescribeJobExecutionRequest$ = [
      3,
      n05,
      _DJERe,
      0,
      [_jI, _tN, _eN],
      [[0, 1], [0, 1], [1, { [_hQ2]: _eN }]],
      2
    ];
    exports2.DescribeJobExecutionResponse$ = [
      3,
      n05,
      _DJERes,
      0,
      [_exe],
      [() => exports2.JobExecution$]
    ];
    exports2.DescribeJobRequest$ = [
      3,
      n05,
      _DJRe,
      0,
      [_jI, _bS],
      [[0, 1], [2, { [_hQ2]: _bS }]],
      1
    ];
    exports2.DescribeJobResponse$ = [
      3,
      n05,
      _DJRes,
      0,
      [_dSo, _j],
      [0, () => exports2.Job$]
    ];
    exports2.DescribeJobTemplateRequest$ = [
      3,
      n05,
      _DJTRe,
      0,
      [_jTI],
      [[0, 1]],
      1
    ];
    exports2.DescribeJobTemplateResponse$ = [
      3,
      n05,
      _DJTRes,
      0,
      [_jTA, _jTI, _d, _dSo, _do, _cAr, _pUC, _jERC, _aCb, _tCi, _jERCo, _mW, _dPV],
      [0, 0, 0, 0, 0, 4, () => exports2.PresignedUrlConfig$, () => exports2.JobExecutionsRolloutConfig$, () => exports2.AbortConfig$, () => exports2.TimeoutConfig$, () => exports2.JobExecutionsRetryConfig$, () => MaintenanceWindows, 64 | 0]
    ];
    exports2.DescribeManagedJobTemplateRequest$ = [
      3,
      n05,
      _DMJTR,
      0,
      [_tNe, _tV],
      [[0, 1], [0, { [_hQ2]: _tV }]],
      1
    ];
    exports2.DescribeManagedJobTemplateResponse$ = [
      3,
      n05,
      _DMJTRe,
      0,
      [_tNe, _tAem, _d, _tV, _env, _dP, _do],
      [0, 0, 0, 0, 64 | 0, () => DocumentParameters, 0]
    ];
    exports2.DescribeMitigationActionRequest$ = [
      3,
      n05,
      _DMARes,
      0,
      [_aN],
      [[0, 1]],
      1
    ];
    exports2.DescribeMitigationActionResponse$ = [
      3,
      n05,
      _DMAResc,
      0,
      [_aN, _aT4, _aAc, _aI2, _rAo, _aPc, _cD, _lMD],
      [0, 0, 0, 0, 0, () => exports2.MitigationActionParams$, 4, 4]
    ];
    exports2.DescribeProvisioningTemplateRequest$ = [
      3,
      n05,
      _DPTRes,
      0,
      [_tNe],
      [[0, 1]],
      1
    ];
    exports2.DescribeProvisioningTemplateResponse$ = [
      3,
      n05,
      _DPTResc,
      0,
      [_tAem, _tNe, _d, _cD, _lMD, _dVI, _tB, _en, _pRA, _pPH, _ty],
      [0, 0, 0, 4, 4, 1, 0, 2, 0, () => exports2.ProvisioningHook$, 0]
    ];
    exports2.DescribeProvisioningTemplateVersionRequest$ = [
      3,
      n05,
      _DPTVRes,
      0,
      [_tNe, _vIe],
      [[0, 1], [1, 1]],
      2
    ];
    exports2.DescribeProvisioningTemplateVersionResponse$ = [
      3,
      n05,
      _DPTVResc,
      0,
      [_vIe, _cD, _tB, _iDV],
      [1, 4, 0, 2]
    ];
    exports2.DescribeRoleAliasRequest$ = [
      3,
      n05,
      _DRARes,
      0,
      [_rAol],
      [[0, 1]],
      1
    ];
    exports2.DescribeRoleAliasResponse$ = [
      3,
      n05,
      _DRAResc,
      0,
      [_rAD],
      [() => exports2.RoleAliasDescription$]
    ];
    exports2.DescribeScheduledAuditRequest$ = [
      3,
      n05,
      _DSARes,
      0,
      [_sAN],
      [[0, 1]],
      1
    ];
    exports2.DescribeScheduledAuditResponse$ = [
      3,
      n05,
      _DSAResc,
      0,
      [_fr, _dOM, _dOW, _tCN, _sAN, _sAAc],
      [0, 0, 0, 64 | 0, 0, 0]
    ];
    exports2.DescribeSecurityProfileRequest$ = [
      3,
      n05,
      _DSPRes,
      0,
      [_sPN],
      [[0, 1]],
      1
    ];
    exports2.DescribeSecurityProfileResponse$ = [
      3,
      n05,
      _DSPResc,
      0,
      [_sPN, _sPA, _sPD, _be, _aTl, _aMTR, _aMTRV, _ve, _cD, _lMD, _mEC],
      [0, 0, 0, () => Behaviors, () => AlertTargets, 64 | 0, () => AdditionalMetricsToRetainV2List, 1, 4, 4, () => exports2.MetricsExportConfig$]
    ];
    exports2.DescribeStreamRequest$ = [
      3,
      n05,
      _DSRes,
      0,
      [_sIt],
      [[0, 1]],
      1
    ];
    exports2.DescribeStreamResponse$ = [
      3,
      n05,
      _DSResc,
      0,
      [_sItr],
      [() => exports2.StreamInfo$]
    ];
    exports2.DescribeThingGroupRequest$ = [
      3,
      n05,
      _DTGRes,
      0,
      [_tGNh],
      [[0, 1]],
      1
    ];
    exports2.DescribeThingGroupResponse$ = [
      3,
      n05,
      _DTGResc,
      0,
      [_tGNh, _tGI, _tGA, _ve, _tGP, _tGM, _iN, _qS, _qV, _st],
      [0, 0, 0, 1, () => exports2.ThingGroupProperties$, () => exports2.ThingGroupMetadata$, 0, 0, 0, 0]
    ];
    exports2.DescribeThingRegistrationTaskRequest$ = [
      3,
      n05,
      _DTRTR,
      0,
      [_tI2],
      [[0, 1]],
      1
    ];
    exports2.DescribeThingRegistrationTaskResponse$ = [
      3,
      n05,
      _DTRTRe,
      0,
      [_tI2, _cD, _lMD, _tB, _iFB, _iFK, _rAo, _st, _m4, _sCu, _fC, _pP],
      [0, 4, 4, 0, 0, 0, 0, 0, 0, 1, 1, 1]
    ];
    exports2.DescribeThingRequest$ = [
      3,
      n05,
      _DTRes,
      0,
      [_tN],
      [[0, 1]],
      1
    ];
    exports2.DescribeThingResponse$ = [
      3,
      n05,
      _DTResc,
      0,
      [_dCI, _tN, _tIh, _tA, _tTN, _at, _ve, _bGN],
      [0, 0, 0, 0, 0, 128 | 0, 1, 0]
    ];
    exports2.DescribeThingTypeRequest$ = [
      3,
      n05,
      _DTTRes,
      0,
      [_tTN],
      [[0, 1]],
      1
    ];
    exports2.DescribeThingTypeResponse$ = [
      3,
      n05,
      _DTTResc,
      0,
      [_tTN, _tTI, _tTA, _tTP, _tTM],
      [0, 0, 0, () => exports2.ThingTypeProperties$, () => exports2.ThingTypeMetadata$]
    ];
    exports2.Destination$ = [
      3,
      n05,
      _Des,
      0,
      [_sDe],
      [() => exports2.S3Destination$]
    ];
    exports2.DetachPolicyRequest$ = [
      3,
      n05,
      _DPRet,
      0,
      [_pNo, _tar],
      [[0, 1], 0],
      2
    ];
    exports2.DetachPrincipalPolicyRequest$ = [
      3,
      n05,
      _DPPR,
      0,
      [_pNo, _pr],
      [[0, 1], [0, { [_hH2]: _xaip }]],
      2
    ];
    exports2.DetachSecurityProfileRequest$ = [
      3,
      n05,
      _DSPRet,
      0,
      [_sPN, _sPTA],
      [[0, 1], [0, { [_hQ2]: _sPTA }]],
      2
    ];
    exports2.DetachSecurityProfileResponse$ = [
      3,
      n05,
      _DSPReta,
      0,
      [],
      []
    ];
    exports2.DetachThingPrincipalRequest$ = [
      3,
      n05,
      _DTPR,
      0,
      [_tN, _pr],
      [[0, 1], [0, { [_hH2]: _xap }]],
      2
    ];
    exports2.DetachThingPrincipalResponse$ = [
      3,
      n05,
      _DTPRe,
      0,
      [],
      []
    ];
    exports2.DetectMitigationActionExecution$ = [
      3,
      n05,
      _DMAE,
      0,
      [_tI2, _vI, _aN, _tN, _eSD, _eED, _st, _eC, _m4],
      [0, 0, 0, 0, 4, 4, 0, 0, 0]
    ];
    exports2.DetectMitigationActionsTaskStatistics$ = [
      3,
      n05,
      _DMATS,
      0,
      [_aE, _aS, _aFc],
      [1, 1, 1]
    ];
    exports2.DetectMitigationActionsTaskSummary$ = [
      3,
      n05,
      _DMATSe,
      0,
      [_tI2, _tS, _tST, _tET, _tar, _vEOR, _oAVI, _sAI, _aDc, _tSas],
      [0, 0, 4, 4, () => exports2.DetectMitigationActionsTaskTarget$, () => exports2.ViolationEventOccurrenceRange$, 2, 2, () => MitigationActionList, () => exports2.DetectMitigationActionsTaskStatistics$]
    ];
    exports2.DetectMitigationActionsTaskTarget$ = [
      3,
      n05,
      _DMATT,
      0,
      [_vIi, _sPN, _bN],
      [64 | 0, 0, 0]
    ];
    exports2.DisableTopicRuleRequest$ = [
      3,
      n05,
      _DTRRi,
      0,
      [_rN2],
      [[0, 1]],
      1
    ];
    exports2.DisassociateSbomFromPackageVersionRequest$ = [
      3,
      n05,
      _DSFPVR,
      0,
      [_pN, _vN, _cT],
      [[0, 1], [0, 1], [0, { [_hQ2]: _cT, [_iT3]: 1 }]],
      2
    ];
    exports2.DisassociateSbomFromPackageVersionResponse$ = [
      3,
      n05,
      _DSFPVRi,
      0,
      [],
      []
    ];
    exports2.DocumentParameter$ = [
      3,
      n05,
      _DP,
      0,
      [_ke, _d, _reg, _exa, _op],
      [0, 0, 0, 0, 2]
    ];
    exports2.DomainConfigurationSummary$ = [
      3,
      n05,
      _DCS,
      0,
      [_dCN, _dCA, _sTe],
      [0, 0, 0]
    ];
    exports2.DynamoDBAction$ = [
      3,
      n05,
      _DDBA,
      0,
      [_tNab, _rAo, _hKF, _hKV, _ope, _hKT, _rKF, _rKV, _rKT, _pF],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      4
    ];
    exports2.DynamoDBv2Action$ = [
      3,
      n05,
      _DDBAy,
      0,
      [_rAo, _pI],
      [0, () => exports2.PutItemInput$],
      2
    ];
    exports2.EffectivePolicy$ = [
      3,
      n05,
      _EP,
      0,
      [_pNo, _pAo, _pDo],
      [0, 0, 0]
    ];
    exports2.ElasticsearchAction$ = [
      3,
      n05,
      _EA,
      0,
      [_rAo, _end, _i, _ty, _id],
      [0, 0, 0, 0, 0],
      5
    ];
    exports2.EnableIoTLoggingParams$ = [
      3,
      n05,
      _EITLP,
      0,
      [_rAFL, _lL],
      [0, 0],
      2
    ];
    exports2.EnableTopicRuleRequest$ = [
      3,
      n05,
      _ETRR,
      0,
      [_rN2],
      [[0, 1]],
      1
    ];
    exports2.ErrorInfo$ = [
      3,
      n05,
      _EI2,
      0,
      [_cod, _m4],
      [0, 0]
    ];
    exports2.ExplicitDeny$ = [
      3,
      n05,
      _ED,
      0,
      [_p],
      [() => Policies]
    ];
    exports2.ExponentialRolloutRate$ = [
      3,
      n05,
      _ERR,
      0,
      [_bRPM, _iF, _rIC],
      [1, 1, () => exports2.RateIncreaseCriteria$],
      3
    ];
    exports2.Field$ = [
      3,
      n05,
      _F,
      0,
      [_n, _ty],
      [0, 0]
    ];
    exports2.FileLocation$ = [
      3,
      n05,
      _FL,
      0,
      [_stre, _sL],
      [() => exports2._Stream$, () => exports2.S3Location$]
    ];
    exports2.FirehoseAction$ = [
      3,
      n05,
      _FA,
      0,
      [_rAo, _dSN, _sep, _bM],
      [0, 0, 0, 2],
      2
    ];
    exports2.FleetMetricNameAndArn$ = [
      3,
      n05,
      _FMNAA,
      0,
      [_mNe, _mA],
      [0, 0]
    ];
    exports2.GeoLocationTarget$ = [
      3,
      n05,
      _GLT,
      0,
      [_n, _or],
      [0, 0]
    ];
    exports2.GetBehaviorModelTrainingSummariesRequest$ = [
      3,
      n05,
      _GBMTSR,
      0,
      [_sPN, _mR, _nT],
      [[0, { [_hQ2]: _sPN }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]]
    ];
    exports2.GetBehaviorModelTrainingSummariesResponse$ = [
      3,
      n05,
      _GBMTSRe,
      0,
      [_su, _nT],
      [() => BehaviorModelTrainingSummaries, 0]
    ];
    exports2.GetBucketsAggregationRequest$ = [
      3,
      n05,
      _GBAR,
      0,
      [_qS, _aF, _bAT, _iN, _qV],
      [0, 0, () => exports2.BucketsAggregationType$, 0, 0],
      3
    ];
    exports2.GetBucketsAggregationResponse$ = [
      3,
      n05,
      _GBARe,
      0,
      [_tCo, _bu],
      [1, () => Buckets]
    ];
    exports2.GetCardinalityRequest$ = [
      3,
      n05,
      _GCR,
      0,
      [_qS, _iN, _aF, _qV],
      [0, 0, 0, 0],
      1
    ];
    exports2.GetCardinalityResponse$ = [
      3,
      n05,
      _GCRe,
      0,
      [_ca],
      [1]
    ];
    exports2.GetCommandExecutionRequest$ = [
      3,
      n05,
      _GCER,
      0,
      [_eI3, _tAa, _iR],
      [[0, 1], [0, { [_hQ2]: _tAa }], [2, { [_hQ2]: _iR }]],
      2
    ];
    exports2.GetCommandExecutionResponse$ = [
      3,
      n05,
      _GCERe,
      0,
      [_eI3, _cAo, _tAa, _st, _sRt, _res, _par, _eTS, _cAr, _lUA, _sAt, _cAom, _tTL],
      [0, 0, 0, 0, () => exports2.StatusReason$, () => CommandExecutionResultMap, () => CommandExecutionParameterMap, 1, 4, 4, 4, 4, 4]
    ];
    exports2.GetCommandRequest$ = [
      3,
      n05,
      _GCRet,
      0,
      [_cIo],
      [[0, 1]],
      1
    ];
    exports2.GetCommandResponse$ = [
      3,
      n05,
      _GCReto,
      0,
      [_cIo, _cAo, _na, _dN, _d, _mP, _pa, _pT, _pre, _rAo, _cAr, _lUA, _dep, _pD],
      [0, 0, 0, 0, 0, () => CommandParameterList, () => exports2.CommandPayload$, 0, () => exports2.CommandPreprocessor$, 0, 4, 4, 2, 2]
    ];
    exports2.GetEffectivePoliciesRequest$ = [
      3,
      n05,
      _GEPR,
      0,
      [_pr, _cIPI, _tN],
      [0, 0, [0, { [_hQ2]: _tN }]]
    ];
    exports2.GetEffectivePoliciesResponse$ = [
      3,
      n05,
      _GEPRe,
      0,
      [_eP],
      [() => EffectivePolicies]
    ];
    exports2.GetIndexingConfigurationRequest$ = [
      3,
      n05,
      _GICR,
      0,
      [],
      []
    ];
    exports2.GetIndexingConfigurationResponse$ = [
      3,
      n05,
      _GICRe,
      0,
      [_tIC, _tGIC],
      [() => exports2.ThingIndexingConfiguration$, () => exports2.ThingGroupIndexingConfiguration$]
    ];
    exports2.GetJobDocumentRequest$ = [
      3,
      n05,
      _GJDR,
      0,
      [_jI, _bS],
      [[0, 1], [2, { [_hQ2]: _bS }]],
      1
    ];
    exports2.GetJobDocumentResponse$ = [
      3,
      n05,
      _GJDRe,
      0,
      [_do],
      [0]
    ];
    exports2.GetLoggingOptionsRequest$ = [
      3,
      n05,
      _GLOR,
      0,
      [],
      []
    ];
    exports2.GetLoggingOptionsResponse$ = [
      3,
      n05,
      _GLORe,
      0,
      [_rAo, _lL],
      [0, 0]
    ];
    exports2.GetOTAUpdateRequest$ = [
      3,
      n05,
      _GOTAUR,
      0,
      [_oUI],
      [[0, 1]],
      1
    ];
    exports2.GetOTAUpdateResponse$ = [
      3,
      n05,
      _GOTAURe,
      0,
      [_oUIt],
      [() => exports2.OTAUpdateInfo$]
    ];
    exports2.GetPackageConfigurationRequest$ = [
      3,
      n05,
      _GPCR,
      0,
      [],
      []
    ];
    exports2.GetPackageConfigurationResponse$ = [
      3,
      n05,
      _GPCRe,
      0,
      [_vUBJC],
      [() => exports2.VersionUpdateByJobsConfig$]
    ];
    exports2.GetPackageRequest$ = [
      3,
      n05,
      _GPR,
      0,
      [_pN],
      [[0, 1]],
      1
    ];
    exports2.GetPackageResponse$ = [
      3,
      n05,
      _GPRe,
      0,
      [_pN, _pA, _d, _dVN, _cD, _lMD],
      [0, 0, [() => ResourceDescription, 0], 0, 4, 4]
    ];
    exports2.GetPackageVersionRequest$ = [
      3,
      n05,
      _GPVR,
      0,
      [_pN, _vN],
      [[0, 1], [0, 1]],
      2
    ];
    exports2.GetPackageVersionResponse$ = [
      3,
      n05,
      _GPVRe,
      0,
      [_pVA, _pN, _vN, _d, _at, _art, _st, _eRr, _cD, _lMD, _sb, _sVS, _rec],
      [0, 0, 0, [() => ResourceDescription, 0], [() => ResourceAttributes, 0], () => exports2.PackageVersionArtifact$, 0, 0, 4, 4, () => exports2.Sbom$, 0, [() => PackageVersionRecipe, 0]]
    ];
    exports2.GetPercentilesRequest$ = [
      3,
      n05,
      _GPRet,
      0,
      [_qS, _iN, _aF, _qV, _per],
      [0, 0, 0, 0, 64 | 1],
      1
    ];
    exports2.GetPercentilesResponse$ = [
      3,
      n05,
      _GPRete,
      0,
      [_perc],
      [() => Percentiles]
    ];
    exports2.GetPolicyRequest$ = [
      3,
      n05,
      _GPReto,
      0,
      [_pNo],
      [[0, 1]],
      1
    ];
    exports2.GetPolicyResponse$ = [
      3,
      n05,
      _GPRetol,
      0,
      [_pNo, _pAo, _pDo, _dVI, _cD, _lMD, _gI],
      [0, 0, 0, 0, 4, 4, 0]
    ];
    exports2.GetPolicyVersionRequest$ = [
      3,
      n05,
      _GPVRet,
      0,
      [_pNo, _pVI],
      [[0, 1], [0, 1]],
      2
    ];
    exports2.GetPolicyVersionResponse$ = [
      3,
      n05,
      _GPVReto,
      0,
      [_pAo, _pNo, _pDo, _pVI, _iDV, _cD, _lMD, _gI],
      [0, 0, 0, 0, 2, 4, 4, 0]
    ];
    exports2.GetRegistrationCodeRequest$ = [
      3,
      n05,
      _GRCR2,
      0,
      [],
      []
    ];
    exports2.GetRegistrationCodeResponse$ = [
      3,
      n05,
      _GRCRe2,
      0,
      [_rCeg],
      [0]
    ];
    exports2.GetStatisticsRequest$ = [
      3,
      n05,
      _GSR,
      0,
      [_qS, _iN, _aF, _qV],
      [0, 0, 0, 0],
      1
    ];
    exports2.GetStatisticsResponse$ = [
      3,
      n05,
      _GSRe,
      0,
      [_sta],
      [() => exports2.Statistics$]
    ];
    exports2.GetThingConnectivityDataRequest$ = [
      3,
      n05,
      _GTCDR,
      0,
      [_tN],
      [[() => ConnectivityApiThingName, 1]],
      1
    ];
    exports2.GetThingConnectivityDataResponse$ = [
      3,
      n05,
      _GTCDRe,
      0,
      [_tN, _conn, _ti, _dR],
      [[() => ConnectivityApiThingName, 0], 2, 4, 0]
    ];
    exports2.GetTopicRuleDestinationRequest$ = [
      3,
      n05,
      _GTRDR,
      0,
      [_ar],
      [[0, 1]],
      1
    ];
    exports2.GetTopicRuleDestinationResponse$ = [
      3,
      n05,
      _GTRDRe,
      0,
      [_tRD],
      [() => exports2.TopicRuleDestination$]
    ];
    exports2.GetTopicRuleRequest$ = [
      3,
      n05,
      _GTRR,
      0,
      [_rN2],
      [[0, 1]],
      1
    ];
    exports2.GetTopicRuleResponse$ = [
      3,
      n05,
      _GTRRe,
      0,
      [_rAu, _ru],
      [0, () => exports2.TopicRule$]
    ];
    exports2.GetV2LoggingOptionsRequest$ = [
      3,
      n05,
      _GVLOR,
      0,
      [_ver],
      [[2, { [_hQ2]: _ver }]]
    ];
    exports2.GetV2LoggingOptionsResponse$ = [
      3,
      n05,
      _GVLORe,
      0,
      [_rAo, _dLL, _dAL, _eCv],
      [0, 0, 2, () => LogEventConfigurations]
    ];
    exports2.GroupNameAndArn$ = [
      3,
      n05,
      _GNAA,
      0,
      [_gN, _gA],
      [0, 0]
    ];
    exports2.HttpAction$ = [
      3,
      n05,
      _HA,
      0,
      [_ur, _cU, _he, _au, _eB, _bC],
      [0, 0, () => HeaderList, () => exports2.HttpAuthorization$, 2, () => exports2.BatchConfig$],
      1
    ];
    exports2.HttpActionHeader$ = [
      3,
      n05,
      _HAH,
      0,
      [_ke, _va],
      [0, 0],
      2
    ];
    exports2.HttpAuthorization$ = [
      3,
      n05,
      _HAt,
      0,
      [_sig],
      [() => exports2.SigV4Authorization$]
    ];
    exports2.HttpContext$ = [
      3,
      n05,
      _HC,
      0,
      [_he, _qS],
      [128 | 0, 0]
    ];
    exports2.HttpUrlDestinationConfiguration$ = [
      3,
      n05,
      _HUDC,
      0,
      [_cU],
      [0],
      1
    ];
    exports2.HttpUrlDestinationProperties$ = [
      3,
      n05,
      _HUDP,
      0,
      [_cU],
      [0]
    ];
    exports2.HttpUrlDestinationSummary$ = [
      3,
      n05,
      _HUDS,
      0,
      [_cU],
      [0]
    ];
    exports2.ImplicitDeny$ = [
      3,
      n05,
      _ID,
      0,
      [_p],
      [() => Policies]
    ];
    exports2.IndexingFilter$ = [
      3,
      n05,
      _IF,
      0,
      [_nSN, _gL],
      [64 | 0, () => GeoLocationsFilter]
    ];
    exports2.IotAnalyticsAction$ = [
      3,
      n05,
      _IAA,
      0,
      [_cAh, _cNh, _bM, _rAo],
      [0, 0, 2, 0]
    ];
    exports2.IotEventsAction$ = [
      3,
      n05,
      _IEA,
      0,
      [_iNn, _rAo, _mI, _bM],
      [0, 0, 0, 2],
      2
    ];
    exports2.IotSiteWiseAction$ = [
      3,
      n05,
      _ISWA,
      0,
      [_pAPVE, _rAo],
      [() => PutAssetPropertyValueEntryList, 0],
      2
    ];
    exports2.IssuerCertificateIdentifier$ = [
      3,
      n05,
      _ICI,
      0,
      [_iCS, _iI, _iCSN],
      [0, 0, 0]
    ];
    exports2.Job$ = [
      3,
      n05,
      _J,
      0,
      [_jA, _jI, _tSa, _st, _fCo, _rC2, _co3, _ta, _d, _pUC, _jERC, _aCb, _cAr, _lUA, _cAom, _jPD, _tCi, _nI, _jTA, _jERCo, _dP, _iC, _sC, _sJR, _dPV],
      [0, 0, 0, 0, 2, 0, 0, 64 | 0, 0, () => exports2.PresignedUrlConfig$, () => exports2.JobExecutionsRolloutConfig$, () => exports2.AbortConfig$, 4, 4, 4, () => exports2.JobProcessDetails$, () => exports2.TimeoutConfig$, 0, 0, () => exports2.JobExecutionsRetryConfig$, 128 | 0, 2, () => exports2.SchedulingConfig$, () => ScheduledJobRolloutList, 64 | 0]
    ];
    exports2.JobExecution$ = [
      3,
      n05,
      _JE,
      0,
      [_jI, _st, _fCo, _sDt, _tA, _qA, _sAt, _lUA, _eN, _vNe, _aSBTO],
      [0, 0, 2, () => exports2.JobExecutionStatusDetails$, 0, 4, 4, 4, 1, 1, 1]
    ];
    exports2.JobExecutionsRetryConfig$ = [
      3,
      n05,
      _JERC,
      0,
      [_cL],
      [() => RetryCriteriaList],
      1
    ];
    exports2.JobExecutionsRolloutConfig$ = [
      3,
      n05,
      _JERCo,
      0,
      [_mPM, _eR],
      [1, () => exports2.ExponentialRolloutRate$]
    ];
    exports2.JobExecutionStatusDetails$ = [
      3,
      n05,
      _JESD,
      0,
      [_dM],
      [128 | 0]
    ];
    exports2.JobExecutionSummary$ = [
      3,
      n05,
      _JES,
      0,
      [_st, _qA, _sAt, _lUA, _eN, _rAe],
      [0, 4, 4, 4, 1, 1]
    ];
    exports2.JobExecutionSummaryForJob$ = [
      3,
      n05,
      _JESFJ,
      0,
      [_tA, _jES],
      [0, () => exports2.JobExecutionSummary$]
    ];
    exports2.JobExecutionSummaryForThing$ = [
      3,
      n05,
      _JESFT,
      0,
      [_jI, _jES],
      [0, () => exports2.JobExecutionSummary$]
    ];
    exports2.JobProcessDetails$ = [
      3,
      n05,
      _JPD,
      0,
      [_pTr, _nOCT, _nOST, _nOFT, _nORT, _nOQT, _nOIPT, _nORTu, _nOTOT],
      [64 | 0, 1, 1, 1, 1, 1, 1, 1, 1]
    ];
    exports2.JobSummary$ = [
      3,
      n05,
      _JS,
      0,
      [_jA, _jI, _tGI, _tSa, _st, _cAr, _lUA, _cAom, _iC],
      [0, 0, 0, 0, 0, 4, 4, 4, 2]
    ];
    exports2.JobTemplateSummary$ = [
      3,
      n05,
      _JTS,
      0,
      [_jTA, _jTI, _d, _cAr],
      [0, 0, 0, 4]
    ];
    exports2.KafkaAction$ = [
      3,
      n05,
      _KA,
      0,
      [_dA, _to, _cPl, _ke, _part, _he],
      [0, 0, 128 | 0, 0, 0, () => KafkaHeaders],
      3
    ];
    exports2.KafkaActionHeader$ = [
      3,
      n05,
      _KAH,
      0,
      [_ke, _va],
      [0, 0],
      2
    ];
    exports2.KeyPair$ = [
      3,
      n05,
      _KP,
      0,
      [_PKu, _PK],
      [0, [() => PrivateKey, 0]]
    ];
    exports2.KinesisAction$ = [
      3,
      n05,
      _KAi,
      0,
      [_rAo, _sN, _pK],
      [0, 0, 0],
      2
    ];
    exports2.LambdaAction$ = [
      3,
      n05,
      _LA,
      0,
      [_fA],
      [0],
      1
    ];
    exports2.ListActiveViolationsRequest$ = [
      3,
      n05,
      _LAVR,
      0,
      [_tN, _sPN, _bCT, _lSA, _vS, _nT, _mR],
      [[0, { [_hQ2]: _tN }], [0, { [_hQ2]: _sPN }], [0, { [_hQ2]: _bCT }], [2, { [_hQ2]: _lSA }], [0, { [_hQ2]: _vS }], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]]
    ];
    exports2.ListActiveViolationsResponse$ = [
      3,
      n05,
      _LAVRi,
      0,
      [_aV, _nT],
      [() => ActiveViolations, 0]
    ];
    exports2.ListAttachedPoliciesRequest$ = [
      3,
      n05,
      _LAPR,
      0,
      [_tar, _recu, _mar, _pS],
      [[0, 1], [2, { [_hQ2]: _recu }], [0, { [_hQ2]: _mar }], [1, { [_hQ2]: _pS }]],
      1
    ];
    exports2.ListAttachedPoliciesResponse$ = [
      3,
      n05,
      _LAPRi,
      0,
      [_p, _nM],
      [() => Policies, 0]
    ];
    exports2.ListAuditFindingsRequest$ = [
      3,
      n05,
      _LAFR,
      0,
      [_tI2, _cN, _rIe, _mR, _nT, _sT3, _eT, _lSF],
      [0, 0, () => exports2.ResourceIdentifier$, 1, 0, 4, 4, 2]
    ];
    exports2.ListAuditFindingsResponse$ = [
      3,
      n05,
      _LAFRi,
      0,
      [_find, _nT],
      [() => AuditFindings, 0]
    ];
    exports2.ListAuditMitigationActionsExecutionsRequest$ = [
      3,
      n05,
      _LAMAER,
      0,
      [_tI2, _fI, _aSc, _mR, _nT],
      [[0, { [_hQ2]: _tI2 }], [0, { [_hQ2]: _fI }], [0, { [_hQ2]: _aSc }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]],
      2
    ];
    exports2.ListAuditMitigationActionsExecutionsResponse$ = [
      3,
      n05,
      _LAMAERi,
      0,
      [_aEc, _nT],
      [() => AuditMitigationActionExecutionMetadataList, 0]
    ];
    exports2.ListAuditMitigationActionsTasksRequest$ = [
      3,
      n05,
      _LAMATR,
      0,
      [_sT3, _eT, _aTI, _fI, _tS, _mR, _nT],
      [[4, { [_hQ2]: _sT3 }], [4, { [_hQ2]: _eT }], [0, { [_hQ2]: _aTI }], [0, { [_hQ2]: _fI }], [0, { [_hQ2]: _tS }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]],
      2
    ];
    exports2.ListAuditMitigationActionsTasksResponse$ = [
      3,
      n05,
      _LAMATRi,
      0,
      [_tas, _nT],
      [() => AuditMitigationActionsTaskMetadataList, 0]
    ];
    exports2.ListAuditSuppressionsRequest$ = [
      3,
      n05,
      _LASR,
      0,
      [_cN, _rIe, _aO, _nT, _mR],
      [0, () => exports2.ResourceIdentifier$, 2, 0, 1]
    ];
    exports2.ListAuditSuppressionsResponse$ = [
      3,
      n05,
      _LASRi,
      0,
      [_sup, _nT],
      [() => AuditSuppressionList, 0]
    ];
    exports2.ListAuditTasksRequest$ = [
      3,
      n05,
      _LATR,
      0,
      [_sT3, _eT, _tT3, _tS, _nT, _mR],
      [[4, { [_hQ2]: _sT3 }], [4, { [_hQ2]: _eT }], [0, { [_hQ2]: _tT3 }], [0, { [_hQ2]: _tS }], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]],
      2
    ];
    exports2.ListAuditTasksResponse$ = [
      3,
      n05,
      _LATRi,
      0,
      [_tas, _nT],
      [() => AuditTaskMetadataList, 0]
    ];
    exports2.ListAuthorizersRequest$ = [
      3,
      n05,
      _LAR,
      0,
      [_pS, _mar, _aO, _st],
      [[1, { [_hQ2]: _pS }], [0, { [_hQ2]: _mar }], [2, { [_hQ2]: _iAO }], [0, { [_hQ2]: _st }]]
    ];
    exports2.ListAuthorizersResponse$ = [
      3,
      n05,
      _LARi,
      0,
      [_aut, _nM],
      [() => Authorizers, 0]
    ];
    exports2.ListBillingGroupsRequest$ = [
      3,
      n05,
      _LBGR,
      0,
      [_nT, _mR, _nPF],
      [[0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nPF }]]
    ];
    exports2.ListBillingGroupsResponse$ = [
      3,
      n05,
      _LBGRi,
      0,
      [_bG, _nT],
      [() => BillingGroupNameAndArnList, 0]
    ];
    exports2.ListCACertificatesRequest$ = [
      3,
      n05,
      _LCACR,
      0,
      [_pS, _mar, _aO, _tNe],
      [[1, { [_hQ2]: _pS }], [0, { [_hQ2]: _mar }], [2, { [_hQ2]: _iAO }], [0, { [_hQ2]: _tNe }]]
    ];
    exports2.ListCACertificatesResponse$ = [
      3,
      n05,
      _LCACRi,
      0,
      [_ce, _nM],
      [() => CACertificates, 0]
    ];
    exports2.ListCertificateProvidersRequest$ = [
      3,
      n05,
      _LCPR,
      0,
      [_nT, _aO],
      [[0, { [_hQ2]: _nT }], [2, { [_hQ2]: _iAO }]]
    ];
    exports2.ListCertificateProvidersResponse$ = [
      3,
      n05,
      _LCPRi,
      0,
      [_cPe, _nT],
      [() => CertificateProviders, 0]
    ];
    exports2.ListCertificatesByCARequest$ = [
      3,
      n05,
      _LCBCAR,
      0,
      [_cCI, _pS, _mar, _aO],
      [[0, 1], [1, { [_hQ2]: _pS }], [0, { [_hQ2]: _mar }], [2, { [_hQ2]: _iAO }]],
      1
    ];
    exports2.ListCertificatesByCAResponse$ = [
      3,
      n05,
      _LCBCARi,
      0,
      [_ce, _nM],
      [() => Certificates, 0]
    ];
    exports2.ListCertificatesRequest$ = [
      3,
      n05,
      _LCR,
      0,
      [_pS, _mar, _aO],
      [[1, { [_hQ2]: _pS }], [0, { [_hQ2]: _mar }], [2, { [_hQ2]: _iAO }]]
    ];
    exports2.ListCertificatesResponse$ = [
      3,
      n05,
      _LCRi,
      0,
      [_ce, _nM],
      [() => Certificates, 0]
    ];
    exports2.ListCommandExecutionsRequest$ = [
      3,
      n05,
      _LCER,
      0,
      [_mR, _nT, _na, _st, _sO, _sTF, _cTF, _tAa, _cAo],
      [[1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }], 0, 0, 0, () => exports2.TimeFilter$, () => exports2.TimeFilter$, 0, 0]
    ];
    exports2.ListCommandExecutionsResponse$ = [
      3,
      n05,
      _LCERi,
      0,
      [_cE, _nT],
      [() => CommandExecutionSummaryList, 0]
    ];
    exports2.ListCommandsRequest$ = [
      3,
      n05,
      _LCRis,
      0,
      [_mR, _nT, _na, _cPNo, _sO],
      [[1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }], [0, { [_hQ2]: _na }], [0, { [_hQ2]: _cPNo }], [0, { [_hQ2]: _sO }]]
    ];
    exports2.ListCommandsResponse$ = [
      3,
      n05,
      _LCRist,
      0,
      [_com, _nT],
      [() => CommandSummaryList, 0]
    ];
    exports2.ListCustomMetricsRequest$ = [
      3,
      n05,
      _LCMR,
      0,
      [_nT, _mR],
      [[0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]]
    ];
    exports2.ListCustomMetricsResponse$ = [
      3,
      n05,
      _LCMRi,
      0,
      [_mNet, _nT],
      [64 | 0, 0]
    ];
    exports2.ListDetectMitigationActionsExecutionsRequest$ = [
      3,
      n05,
      _LDMAER,
      0,
      [_tI2, _vI, _tN, _sT3, _eT, _mR, _nT],
      [[0, { [_hQ2]: _tI2 }], [0, { [_hQ2]: _vI }], [0, { [_hQ2]: _tN }], [4, { [_hQ2]: _sT3 }], [4, { [_hQ2]: _eT }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]]
    ];
    exports2.ListDetectMitigationActionsExecutionsResponse$ = [
      3,
      n05,
      _LDMAERi,
      0,
      [_aEc, _nT],
      [() => DetectMitigationActionExecutionList, 0]
    ];
    exports2.ListDetectMitigationActionsTasksRequest$ = [
      3,
      n05,
      _LDMATR,
      0,
      [_sT3, _eT, _mR, _nT],
      [[4, { [_hQ2]: _sT3 }], [4, { [_hQ2]: _eT }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]],
      2
    ];
    exports2.ListDetectMitigationActionsTasksResponse$ = [
      3,
      n05,
      _LDMATRi,
      0,
      [_tas, _nT],
      [() => DetectMitigationActionsTaskSummaryList, 0]
    ];
    exports2.ListDimensionsRequest$ = [
      3,
      n05,
      _LDR,
      0,
      [_nT, _mR],
      [[0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]]
    ];
    exports2.ListDimensionsResponse$ = [
      3,
      n05,
      _LDRi,
      0,
      [_dNi, _nT],
      [64 | 0, 0]
    ];
    exports2.ListDomainConfigurationsRequest$ = [
      3,
      n05,
      _LDCR,
      0,
      [_mar, _pS, _sTe],
      [[0, { [_hQ2]: _mar }], [1, { [_hQ2]: _pS }], [0, { [_hQ2]: _sTe }]]
    ];
    exports2.ListDomainConfigurationsResponse$ = [
      3,
      n05,
      _LDCRi,
      0,
      [_dCo, _nM],
      [() => DomainConfigurations, 0]
    ];
    exports2.ListFleetMetricsRequest$ = [
      3,
      n05,
      _LFMR,
      0,
      [_nT, _mR],
      [[0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]]
    ];
    exports2.ListFleetMetricsResponse$ = [
      3,
      n05,
      _LFMRi,
      0,
      [_fM, _nT],
      [() => FleetMetricNameAndArnList, 0]
    ];
    exports2.ListIndicesRequest$ = [
      3,
      n05,
      _LIR,
      0,
      [_nT, _mR],
      [[0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]]
    ];
    exports2.ListIndicesResponse$ = [
      3,
      n05,
      _LIRi,
      0,
      [_iNnd, _nT],
      [64 | 0, 0]
    ];
    exports2.ListJobExecutionsForJobRequest$ = [
      3,
      n05,
      _LJEFJR,
      0,
      [_jI, _st, _mR, _nT],
      [[0, 1], [0, { [_hQ2]: _st }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]],
      1
    ];
    exports2.ListJobExecutionsForJobResponse$ = [
      3,
      n05,
      _LJEFJRi,
      0,
      [_eS, _nT],
      [() => JobExecutionSummaryForJobList, 0]
    ];
    exports2.ListJobExecutionsForThingRequest$ = [
      3,
      n05,
      _LJEFTR,
      0,
      [_tN, _st, _nI, _mR, _nT, _jI],
      [[0, 1], [0, { [_hQ2]: _st }], [0, { [_hQ2]: _nI }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }], [0, { [_hQ2]: _jI }]],
      1
    ];
    exports2.ListJobExecutionsForThingResponse$ = [
      3,
      n05,
      _LJEFTRi,
      0,
      [_eS, _nT],
      [() => JobExecutionSummaryForThingList, 0]
    ];
    exports2.ListJobsRequest$ = [
      3,
      n05,
      _LJR,
      0,
      [_st, _tSa, _mR, _nT, _tGNh, _tGI, _nI],
      [[0, { [_hQ2]: _st }], [0, { [_hQ2]: _tSa }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }], [0, { [_hQ2]: _tGNh }], [0, { [_hQ2]: _tGI }], [0, { [_hQ2]: _nI }]]
    ];
    exports2.ListJobsResponse$ = [
      3,
      n05,
      _LJRi,
      0,
      [_jo, _nT],
      [() => JobSummaryList, 0]
    ];
    exports2.ListJobTemplatesRequest$ = [
      3,
      n05,
      _LJTR,
      0,
      [_mR, _nT],
      [[1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]]
    ];
    exports2.ListJobTemplatesResponse$ = [
      3,
      n05,
      _LJTRi,
      0,
      [_jT, _nT],
      [() => JobTemplateSummaryList, 0]
    ];
    exports2.ListManagedJobTemplatesRequest$ = [
      3,
      n05,
      _LMJTR,
      0,
      [_tNe, _mR, _nT],
      [[0, { [_hQ2]: _tNe }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]]
    ];
    exports2.ListManagedJobTemplatesResponse$ = [
      3,
      n05,
      _LMJTRi,
      0,
      [_mJT, _nT],
      [() => ManagedJobTemplatesSummaryList, 0]
    ];
    exports2.ListMetricValuesRequest$ = [
      3,
      n05,
      _LMVR,
      0,
      [_tN, _mNe, _sT3, _eT, _dNim, _dVO, _mR, _nT],
      [[0, { [_hQ2]: _tN }], [0, { [_hQ2]: _mNe }], [4, { [_hQ2]: _sT3 }], [4, { [_hQ2]: _eT }], [0, { [_hQ2]: _dNim }], [0, { [_hQ2]: _dVO }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]],
      4
    ];
    exports2.ListMetricValuesResponse$ = [
      3,
      n05,
      _LMVRi,
      0,
      [_mDL, _nT],
      [() => MetricDatumList, 0]
    ];
    exports2.ListMitigationActionsRequest$ = [
      3,
      n05,
      _LMAR,
      0,
      [_aT4, _mR, _nT],
      [[0, { [_hQ2]: _aT4 }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]]
    ];
    exports2.ListMitigationActionsResponse$ = [
      3,
      n05,
      _LMARi,
      0,
      [_aIc, _nT],
      [() => MitigationActionIdentifierList, 0]
    ];
    exports2.ListOTAUpdatesRequest$ = [
      3,
      n05,
      _LOTAUR,
      0,
      [_mR, _nT, _oUS],
      [[1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }], [0, { [_hQ2]: _oUS }]]
    ];
    exports2.ListOTAUpdatesResponse$ = [
      3,
      n05,
      _LOTAURi,
      0,
      [_oU, _nT],
      [() => OTAUpdatesSummary, 0]
    ];
    exports2.ListOutgoingCertificatesRequest$ = [
      3,
      n05,
      _LOCR,
      0,
      [_pS, _mar, _aO],
      [[1, { [_hQ2]: _pS }], [0, { [_hQ2]: _mar }], [2, { [_hQ2]: _iAO }]]
    ];
    exports2.ListOutgoingCertificatesResponse$ = [
      3,
      n05,
      _LOCRi,
      0,
      [_oC, _nM],
      [() => OutgoingCertificates, 0]
    ];
    exports2.ListPackagesRequest$ = [
      3,
      n05,
      _LPR,
      0,
      [_mR, _nT],
      [[1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]]
    ];
    exports2.ListPackagesResponse$ = [
      3,
      n05,
      _LPRi,
      0,
      [_pSa, _nT],
      [() => PackageSummaryList, 0]
    ];
    exports2.ListPackageVersionsRequest$ = [
      3,
      n05,
      _LPVR,
      0,
      [_pN, _st, _mR, _nT],
      [[0, 1], [0, { [_hQ2]: _st }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]],
      1
    ];
    exports2.ListPackageVersionsResponse$ = [
      3,
      n05,
      _LPVRi,
      0,
      [_pVS, _nT],
      [() => PackageVersionSummaryList, 0]
    ];
    exports2.ListPoliciesRequest$ = [
      3,
      n05,
      _LPRis,
      0,
      [_mar, _pS, _aO],
      [[0, { [_hQ2]: _mar }], [1, { [_hQ2]: _pS }], [2, { [_hQ2]: _iAO }]]
    ];
    exports2.ListPoliciesResponse$ = [
      3,
      n05,
      _LPRist,
      0,
      [_p, _nM],
      [() => Policies, 0]
    ];
    exports2.ListPolicyPrincipalsRequest$ = [
      3,
      n05,
      _LPPR,
      0,
      [_pNo, _mar, _pS, _aO],
      [[0, { [_hH2]: _xaip_ }], [0, { [_hQ2]: _mar }], [1, { [_hQ2]: _pS }], [2, { [_hQ2]: _iAO }]],
      1
    ];
    exports2.ListPolicyPrincipalsResponse$ = [
      3,
      n05,
      _LPPRi,
      0,
      [_pri, _nM],
      [64 | 0, 0]
    ];
    exports2.ListPolicyVersionsRequest$ = [
      3,
      n05,
      _LPVRis,
      0,
      [_pNo],
      [[0, 1]],
      1
    ];
    exports2.ListPolicyVersionsResponse$ = [
      3,
      n05,
      _LPVRist,
      0,
      [_pV],
      [() => PolicyVersions]
    ];
    exports2.ListPrincipalPoliciesRequest$ = [
      3,
      n05,
      _LPPRis,
      0,
      [_pr, _mar, _pS, _aO],
      [[0, { [_hH2]: _xaip }], [0, { [_hQ2]: _mar }], [1, { [_hQ2]: _pS }], [2, { [_hQ2]: _iAO }]],
      1
    ];
    exports2.ListPrincipalPoliciesResponse$ = [
      3,
      n05,
      _LPPRist,
      0,
      [_p, _nM],
      [() => Policies, 0]
    ];
    exports2.ListPrincipalThingsRequest$ = [
      3,
      n05,
      _LPTR,
      0,
      [_pr, _nT, _mR],
      [[0, { [_hH2]: _xap }], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]],
      1
    ];
    exports2.ListPrincipalThingsResponse$ = [
      3,
      n05,
      _LPTRi,
      0,
      [_th, _nT],
      [64 | 0, 0]
    ];
    exports2.ListPrincipalThingsV2Request$ = [
      3,
      n05,
      _LPTVR,
      0,
      [_pr, _nT, _mR, _tPT],
      [[0, { [_hH2]: _xap }], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _tPT }]],
      1
    ];
    exports2.ListPrincipalThingsV2Response$ = [
      3,
      n05,
      _LPTVRi,
      0,
      [_pTO, _nT],
      [() => PrincipalThingObjects, 0]
    ];
    exports2.ListProvisioningTemplatesRequest$ = [
      3,
      n05,
      _LPTRis,
      0,
      [_mR, _nT],
      [[1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]]
    ];
    exports2.ListProvisioningTemplatesResponse$ = [
      3,
      n05,
      _LPTRist,
      0,
      [_te, _nT],
      [() => ProvisioningTemplateListing, 0]
    ];
    exports2.ListProvisioningTemplateVersionsRequest$ = [
      3,
      n05,
      _LPTVRis,
      0,
      [_tNe, _mR, _nT],
      [[0, 1], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]],
      1
    ];
    exports2.ListProvisioningTemplateVersionsResponse$ = [
      3,
      n05,
      _LPTVRist,
      0,
      [_vers, _nT],
      [() => ProvisioningTemplateVersionListing, 0]
    ];
    exports2.ListRelatedResourcesForAuditFindingRequest$ = [
      3,
      n05,
      _LRRFAFR,
      0,
      [_fI, _nT, _mR],
      [[0, { [_hQ2]: _fI }], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]],
      1
    ];
    exports2.ListRelatedResourcesForAuditFindingResponse$ = [
      3,
      n05,
      _LRRFAFRi,
      0,
      [_rR, _nT],
      [() => RelatedResources, 0]
    ];
    exports2.ListRoleAliasesRequest$ = [
      3,
      n05,
      _LRAR,
      0,
      [_pS, _mar, _aO],
      [[1, { [_hQ2]: _pS }], [0, { [_hQ2]: _mar }], [2, { [_hQ2]: _iAO }]]
    ];
    exports2.ListRoleAliasesResponse$ = [
      3,
      n05,
      _LRARi,
      0,
      [_rAole, _nM],
      [64 | 0, 0]
    ];
    exports2.ListSbomValidationResultsRequest$ = [
      3,
      n05,
      _LSVRR,
      0,
      [_pN, _vN, _vR, _mR, _nT],
      [[0, 1], [0, 1], [0, { [_hQ2]: _vR }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]],
      2
    ];
    exports2.ListSbomValidationResultsResponse$ = [
      3,
      n05,
      _LSVRRi,
      0,
      [_vRS, _nT],
      [() => SbomValidationResultSummaryList, 0]
    ];
    exports2.ListScheduledAuditsRequest$ = [
      3,
      n05,
      _LSAR,
      0,
      [_nT, _mR],
      [[0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]]
    ];
    exports2.ListScheduledAuditsResponse$ = [
      3,
      n05,
      _LSARi,
      0,
      [_sAc, _nT],
      [() => ScheduledAuditMetadataList, 0]
    ];
    exports2.ListSecurityProfilesForTargetRequest$ = [
      3,
      n05,
      _LSPFTR,
      0,
      [_sPTA, _nT, _mR, _recu],
      [[0, { [_hQ2]: _sPTA }], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }], [2, { [_hQ2]: _recu }]],
      1
    ];
    exports2.ListSecurityProfilesForTargetResponse$ = [
      3,
      n05,
      _LSPFTRi,
      0,
      [_sPTM, _nT],
      [() => SecurityProfileTargetMappings, 0]
    ];
    exports2.ListSecurityProfilesRequest$ = [
      3,
      n05,
      _LSPR,
      0,
      [_nT, _mR, _dNim, _mNe],
      [[0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _dNim }], [0, { [_hQ2]: _mNe }]]
    ];
    exports2.ListSecurityProfilesResponse$ = [
      3,
      n05,
      _LSPRi,
      0,
      [_sPI, _nT],
      [() => SecurityProfileIdentifiers, 0]
    ];
    exports2.ListStreamsRequest$ = [
      3,
      n05,
      _LSR,
      0,
      [_mR, _nT, _aO],
      [[1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }], [2, { [_hQ2]: _iAO }]]
    ];
    exports2.ListStreamsResponse$ = [
      3,
      n05,
      _LSRi,
      0,
      [_strea, _nT],
      [() => StreamsSummary, 0]
    ];
    exports2.ListTagsForResourceRequest$ = [
      3,
      n05,
      _LTFRR,
      0,
      [_rA, _nT],
      [[0, { [_hQ2]: _rA }], [0, { [_hQ2]: _nT }]],
      1
    ];
    exports2.ListTagsForResourceResponse$ = [
      3,
      n05,
      _LTFRRi,
      0,
      [_tag, _nT],
      [() => TagList, 0]
    ];
    exports2.ListTargetsForPolicyRequest$ = [
      3,
      n05,
      _LTFPR,
      0,
      [_pNo, _mar, _pS],
      [[0, 1], [0, { [_hQ2]: _mar }], [1, { [_hQ2]: _pS }]],
      1
    ];
    exports2.ListTargetsForPolicyResponse$ = [
      3,
      n05,
      _LTFPRi,
      0,
      [_ta, _nM],
      [64 | 0, 0]
    ];
    exports2.ListTargetsForSecurityProfileRequest$ = [
      3,
      n05,
      _LTFSPR,
      0,
      [_sPN, _nT, _mR],
      [[0, 1], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]],
      1
    ];
    exports2.ListTargetsForSecurityProfileResponse$ = [
      3,
      n05,
      _LTFSPRi,
      0,
      [_sPT, _nT],
      [() => SecurityProfileTargets, 0]
    ];
    exports2.ListThingGroupsForThingRequest$ = [
      3,
      n05,
      _LTGFTR,
      0,
      [_tN, _nT, _mR],
      [[0, 1], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]],
      1
    ];
    exports2.ListThingGroupsForThingResponse$ = [
      3,
      n05,
      _LTGFTRi,
      0,
      [_tG, _nT],
      [() => ThingGroupNameAndArnList, 0]
    ];
    exports2.ListThingGroupsRequest$ = [
      3,
      n05,
      _LTGR,
      0,
      [_nT, _mR, _pG, _nPF, _recu],
      [[0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _pG }], [0, { [_hQ2]: _nPF }], [2, { [_hQ2]: _recu }]]
    ];
    exports2.ListThingGroupsResponse$ = [
      3,
      n05,
      _LTGRi,
      0,
      [_tG, _nT],
      [() => ThingGroupNameAndArnList, 0]
    ];
    exports2.ListThingPrincipalsRequest$ = [
      3,
      n05,
      _LTPR,
      0,
      [_tN, _nT, _mR],
      [[0, 1], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]],
      1
    ];
    exports2.ListThingPrincipalsResponse$ = [
      3,
      n05,
      _LTPRi,
      0,
      [_pri, _nT],
      [64 | 0, 0]
    ];
    exports2.ListThingPrincipalsV2Request$ = [
      3,
      n05,
      _LTPVR,
      0,
      [_tN, _nT, _mR, _tPT],
      [[0, 1], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _tPT }]],
      1
    ];
    exports2.ListThingPrincipalsV2Response$ = [
      3,
      n05,
      _LTPVRi,
      0,
      [_tPO, _nT],
      [() => ThingPrincipalObjects, 0]
    ];
    exports2.ListThingRegistrationTaskReportsRequest$ = [
      3,
      n05,
      _LTRTRR,
      0,
      [_tI2, _rT3, _nT, _mR],
      [[0, 1], [0, { [_hQ2]: _rT3 }], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]],
      2
    ];
    exports2.ListThingRegistrationTaskReportsResponse$ = [
      3,
      n05,
      _LTRTRRi,
      0,
      [_rL, _rT3, _nT],
      [64 | 0, 0, 0]
    ];
    exports2.ListThingRegistrationTasksRequest$ = [
      3,
      n05,
      _LTRTR,
      0,
      [_nT, _mR, _st],
      [[0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _st }]]
    ];
    exports2.ListThingRegistrationTasksResponse$ = [
      3,
      n05,
      _LTRTRi,
      0,
      [_tIa, _nT],
      [64 | 0, 0]
    ];
    exports2.ListThingsInBillingGroupRequest$ = [
      3,
      n05,
      _LTIBGR,
      0,
      [_bGN, _nT, _mR],
      [[0, 1], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]],
      1
    ];
    exports2.ListThingsInBillingGroupResponse$ = [
      3,
      n05,
      _LTIBGRi,
      0,
      [_th, _nT],
      [64 | 0, 0]
    ];
    exports2.ListThingsInThingGroupRequest$ = [
      3,
      n05,
      _LTITGR,
      0,
      [_tGNh, _recu, _nT, _mR],
      [[0, 1], [2, { [_hQ2]: _recu }], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]],
      1
    ];
    exports2.ListThingsInThingGroupResponse$ = [
      3,
      n05,
      _LTITGRi,
      0,
      [_th, _nT],
      [64 | 0, 0]
    ];
    exports2.ListThingsRequest$ = [
      3,
      n05,
      _LTR,
      0,
      [_nT, _mR, _aNt, _aVt, _tTN, _uPAV],
      [[0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _aNt }], [0, { [_hQ2]: _aVt }], [0, { [_hQ2]: _tTN }], [2, { [_hQ2]: _uPAV }]]
    ];
    exports2.ListThingsResponse$ = [
      3,
      n05,
      _LTRi,
      0,
      [_th, _nT],
      [() => ThingAttributeList, 0]
    ];
    exports2.ListThingTypesRequest$ = [
      3,
      n05,
      _LTTR,
      0,
      [_nT, _mR, _tTN],
      [[0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _tTN }]]
    ];
    exports2.ListThingTypesResponse$ = [
      3,
      n05,
      _LTTRi,
      0,
      [_tTh, _nT],
      [() => ThingTypeList, 0]
    ];
    exports2.ListTopicRuleDestinationsRequest$ = [
      3,
      n05,
      _LTRDR,
      0,
      [_mR, _nT],
      [[1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }]]
    ];
    exports2.ListTopicRuleDestinationsResponse$ = [
      3,
      n05,
      _LTRDRi,
      0,
      [_dSes, _nT],
      [() => TopicRuleDestinationSummaries, 0]
    ];
    exports2.ListTopicRulesRequest$ = [
      3,
      n05,
      _LTRR,
      0,
      [_to, _mR, _nT, _rD],
      [[0, { [_hQ2]: _to }], [1, { [_hQ2]: _mR }], [0, { [_hQ2]: _nT }], [2, { [_hQ2]: _rD }]]
    ];
    exports2.ListTopicRulesResponse$ = [
      3,
      n05,
      _LTRRi,
      0,
      [_rul, _nT],
      [() => TopicRuleList, 0]
    ];
    exports2.ListV2LoggingLevelsRequest$ = [
      3,
      n05,
      _LVLLR,
      0,
      [_tTa, _nT, _mR],
      [[0, { [_hQ2]: _tTa }], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]]
    ];
    exports2.ListV2LoggingLevelsResponse$ = [
      3,
      n05,
      _LVLLRi,
      0,
      [_lTC, _nT],
      [() => LogTargetConfigurations, 0]
    ];
    exports2.ListViolationEventsRequest$ = [
      3,
      n05,
      _LVER,
      0,
      [_sT3, _eT, _tN, _sPN, _bCT, _lSA, _vS, _nT, _mR],
      [[4, { [_hQ2]: _sT3 }], [4, { [_hQ2]: _eT }], [0, { [_hQ2]: _tN }], [0, { [_hQ2]: _sPN }], [0, { [_hQ2]: _bCT }], [2, { [_hQ2]: _lSA }], [0, { [_hQ2]: _vS }], [0, { [_hQ2]: _nT }], [1, { [_hQ2]: _mR }]],
      2
    ];
    exports2.ListViolationEventsResponse$ = [
      3,
      n05,
      _LVERi,
      0,
      [_vE, _nT],
      [() => ViolationEvents, 0]
    ];
    exports2.LocationAction$ = [
      3,
      n05,
      _LAo,
      0,
      [_rAo, _tNr, _dI, _la, _lon, _ti],
      [0, 0, 0, 0, 0, () => exports2.LocationTimestamp$],
      5
    ];
    exports2.LocationTimestamp$ = [
      3,
      n05,
      _LT,
      0,
      [_va, _u],
      [0, 0],
      1
    ];
    exports2.LogEventConfiguration$ = [
      3,
      n05,
      _LEC,
      0,
      [_eTv, _lL, _lD],
      [0, 0, 0],
      1
    ];
    exports2.LoggingOptionsPayload$ = [
      3,
      n05,
      _LOP,
      0,
      [_rAo, _lL],
      [0, 0],
      1
    ];
    exports2.LogTarget$ = [
      3,
      n05,
      _LTo,
      0,
      [_tTa, _tNa],
      [0, 0],
      1
    ];
    exports2.LogTargetConfiguration$ = [
      3,
      n05,
      _LTC,
      0,
      [_lT, _lL],
      [() => exports2.LogTarget$, 0]
    ];
    exports2.MachineLearningDetectionConfig$ = [
      3,
      n05,
      _MLDC,
      0,
      [_cLo],
      [0],
      1
    ];
    exports2.MaintenanceWindow$ = [
      3,
      n05,
      _MW,
      0,
      [_sT3, _dIM],
      [0, 1],
      2
    ];
    exports2.ManagedJobTemplateSummary$ = [
      3,
      n05,
      _MJTS,
      0,
      [_tAem, _tNe, _d, _env, _tV],
      [0, 0, 0, 64 | 0, 0]
    ];
    exports2.MetricDatum$ = [
      3,
      n05,
      _MD,
      0,
      [_ti, _va],
      [4, () => exports2.MetricValue$]
    ];
    exports2.MetricDimension$ = [
      3,
      n05,
      _MDe,
      0,
      [_dNim, _oper],
      [0, 0],
      1
    ];
    exports2.MetricsExportConfig$ = [
      3,
      n05,
      _MEC,
      0,
      [_mTq, _rAo],
      [0, 0],
      2
    ];
    exports2.MetricToRetain$ = [
      3,
      n05,
      _MTR,
      0,
      [_met, _mD, _eM],
      [0, () => exports2.MetricDimension$, 2],
      1
    ];
    exports2.MetricValue$ = [
      3,
      n05,
      _MV,
      0,
      [_cou, _ci, _po, _nu, _num, _stri],
      [1, 64 | 0, 64 | 1, 1, 64 | 1, 64 | 0]
    ];
    exports2.MitigationAction$ = [
      3,
      n05,
      _MA,
      0,
      [_n, _id, _rAo, _aPc],
      [0, 0, 0, () => exports2.MitigationActionParams$]
    ];
    exports2.MitigationActionIdentifier$ = [
      3,
      n05,
      _MAI,
      0,
      [_aN, _aAc, _cD],
      [0, 0, 4]
    ];
    exports2.MitigationActionParams$ = [
      3,
      n05,
      _MAP,
      0,
      [_uDCP, _uCACP, _aTTTGP, _rDPVP, _eITLP, _pFTSP],
      [() => exports2.UpdateDeviceCertificateParams$, () => exports2.UpdateCACertificateParams$, () => exports2.AddThingsToThingGroupParams$, () => exports2.ReplaceDefaultPolicyVersionParams$, () => exports2.EnableIoTLoggingParams$, () => exports2.PublishFindingToSnsParams$]
    ];
    exports2.Mqtt5Configuration$ = [
      3,
      n05,
      _MC,
      0,
      [_pAr],
      [() => PropagatingAttributeList]
    ];
    exports2.MqttContext$ = [
      3,
      n05,
      _MCq,
      0,
      [_us, _pas, _cIl],
      [0, 21, 0]
    ];
    exports2.MqttHeaders$ = [
      3,
      n05,
      _MH,
      0,
      [_pFI, _cTo, _rTe, _cDor, _mE, _uP],
      [0, 0, 0, 0, 0, () => UserProperties]
    ];
    exports2.NonCompliantResource$ = [
      3,
      n05,
      _NCR,
      0,
      [_rTes, _rIe, _aId],
      [0, () => exports2.ResourceIdentifier$, 128 | 0]
    ];
    exports2.OpenSearchAction$ = [
      3,
      n05,
      _OSA,
      0,
      [_rAo, _end, _i, _ty, _id],
      [0, 0, 0, 0, 0],
      5
    ];
    exports2.OTAUpdateFile$ = [
      3,
      n05,
      _OTAUF,
      0,
      [_fN, _fTil, _fV, _fL, _cSo, _at],
      [0, 1, 0, () => exports2.FileLocation$, () => exports2.CodeSigning$, 128 | 0]
    ];
    exports2.OTAUpdateInfo$ = [
      3,
      n05,
      _OTAUI,
      0,
      [_oUI, _oUA, _cD, _lMD, _d, _ta, _pro, _aJERC, _aJPUC, _tSa, _oUF, _oUS, _aIJI, _aIJA, _eIr, _aPd],
      [0, 0, 4, 4, 0, 64 | 0, 64 | 0, () => exports2.AwsJobExecutionsRolloutConfig$, () => exports2.AwsJobPresignedUrlConfig$, 0, () => OTAUpdateFiles, 0, 0, 0, () => exports2.ErrorInfo$, 128 | 0]
    ];
    exports2.OTAUpdateSummary$ = [
      3,
      n05,
      _OTAUS,
      0,
      [_oUI, _oUA, _cD],
      [0, 0, 4]
    ];
    exports2.OutgoingCertificate$ = [
      3,
      n05,
      _OC,
      0,
      [_cAe, _cI3, _tTr, _tDr, _tM, _cD],
      [0, 0, 0, 4, 0, 4]
    ];
    exports2.PackageSummary$ = [
      3,
      n05,
      _PS,
      0,
      [_pN, _dVN, _cD, _lMD],
      [0, 0, 4, 4]
    ];
    exports2.PackageVersionArtifact$ = [
      3,
      n05,
      _PVA,
      0,
      [_sL],
      [() => exports2.S3Location$]
    ];
    exports2.PackageVersionSummary$ = [
      3,
      n05,
      _PVS,
      0,
      [_pN, _vN, _st, _cD, _lMD],
      [0, 0, 0, 4, 4]
    ];
    exports2.PercentPair$ = [
      3,
      n05,
      _PP,
      0,
      [_perce, _va],
      [1, 1]
    ];
    exports2.Policy$ = [
      3,
      n05,
      _P2,
      0,
      [_pNo, _pAo],
      [0, 0]
    ];
    exports2.PolicyVersion$ = [
      3,
      n05,
      _PV,
      0,
      [_vIe, _iDV, _cDr],
      [0, 2, 4]
    ];
    exports2.PolicyVersionIdentifier$ = [
      3,
      n05,
      _PVI,
      0,
      [_pNo, _pVI],
      [0, 0]
    ];
    exports2.PresignedUrlConfig$ = [
      3,
      n05,
      _PUC,
      0,
      [_rAo, _eIS],
      [0, 1]
    ];
    exports2.PrincipalThingObject$ = [
      3,
      n05,
      _PTO,
      0,
      [_tN, _tPT],
      [0, 0],
      1
    ];
    exports2.PropagatingAttribute$ = [
      3,
      n05,
      _PA2,
      0,
      [_uPK, _tAh, _cAon],
      [0, 0, 0]
    ];
    exports2.ProvisioningHook$ = [
      3,
      n05,
      _PH,
      0,
      [_tAa, _pVa],
      [0, 0],
      1
    ];
    exports2.ProvisioningTemplateSummary$ = [
      3,
      n05,
      _PTS,
      0,
      [_tAem, _tNe, _d, _cD, _lMD, _en, _ty],
      [0, 0, 0, 4, 4, 2, 0]
    ];
    exports2.ProvisioningTemplateVersionSummary$ = [
      3,
      n05,
      _PTVS,
      0,
      [_vIe, _cD, _iDV],
      [1, 4, 2]
    ];
    exports2.PublishFindingToSnsParams$ = [
      3,
      n05,
      _PFTSP,
      0,
      [_tAo],
      [0],
      1
    ];
    exports2.PutAssetPropertyValueEntry$ = [
      3,
      n05,
      _PAPVE,
      0,
      [_pVr, _eIn, _aIs, _pIr, _pAro],
      [() => AssetPropertyValueList, 0, 0, 0, 0],
      1
    ];
    exports2.PutItemInput$ = [
      3,
      n05,
      _PII,
      0,
      [_tNab],
      [0],
      1
    ];
    exports2.PutVerificationStateOnViolationRequest$ = [
      3,
      n05,
      _PVSOVR,
      0,
      [_vI, _vS, _vSD],
      [[0, 1], 0, 0],
      2
    ];
    exports2.PutVerificationStateOnViolationResponse$ = [
      3,
      n05,
      _PVSOVRu,
      0,
      [],
      []
    ];
    exports2.RateIncreaseCriteria$ = [
      3,
      n05,
      _RIC,
      0,
      [_nONT, _nOST],
      [1, 1]
    ];
    exports2.RegisterCACertificateRequest$ = [
      3,
      n05,
      _RCACR,
      0,
      [_cCa, _vCe, _sAA, _aAR, _rCe, _tag, _cMe],
      [0, 0, [2, { [_hQ2]: _sAA }], [2, { [_hQ2]: _aAR }], () => exports2.RegistrationConfig$, () => TagList, 0],
      1
    ];
    exports2.RegisterCACertificateResponse$ = [
      3,
      n05,
      _RCACRe,
      0,
      [_cAe, _cI3],
      [0, 0]
    ];
    exports2.RegisterCertificateRequest$ = [
      3,
      n05,
      _RCR,
      0,
      [_cP, _cCP, _sAA, _st],
      [0, 0, [2, { [_hQ2]: _sAA }], 0],
      1
    ];
    exports2.RegisterCertificateResponse$ = [
      3,
      n05,
      _RCRe,
      0,
      [_cAe, _cI3],
      [0, 0]
    ];
    exports2.RegisterCertificateWithoutCARequest$ = [
      3,
      n05,
      _RCWCAR,
      0,
      [_cP, _st],
      [0, 0],
      1
    ];
    exports2.RegisterCertificateWithoutCAResponse$ = [
      3,
      n05,
      _RCWCARe,
      0,
      [_cAe, _cI3],
      [0, 0]
    ];
    exports2.RegisterThingRequest$ = [
      3,
      n05,
      _RTR,
      0,
      [_tB, _par],
      [0, 128 | 0],
      1
    ];
    exports2.RegisterThingResponse$ = [
      3,
      n05,
      _RTRe,
      0,
      [_cP, _rAes],
      [0, 128 | 0]
    ];
    exports2.RegistrationConfig$ = [
      3,
      n05,
      _RC2,
      0,
      [_tB, _rAo, _tNe],
      [0, 0, 0]
    ];
    exports2.RejectCertificateTransferRequest$ = [
      3,
      n05,
      _RCTR,
      0,
      [_cI3, _rRe],
      [[0, 1], 0],
      1
    ];
    exports2.RelatedResource$ = [
      3,
      n05,
      _RR,
      0,
      [_rTes, _rIe, _aId],
      [0, () => exports2.ResourceIdentifier$, 128 | 0]
    ];
    exports2.RemoveThingFromBillingGroupRequest$ = [
      3,
      n05,
      _RTFBGR,
      0,
      [_bGN, _bGA, _tN, _tA],
      [0, 0, 0, 0]
    ];
    exports2.RemoveThingFromBillingGroupResponse$ = [
      3,
      n05,
      _RTFBGRe,
      0,
      [],
      []
    ];
    exports2.RemoveThingFromThingGroupRequest$ = [
      3,
      n05,
      _RTFTGR,
      0,
      [_tGNh, _tGA, _tN, _tA],
      [0, 0, 0, 0]
    ];
    exports2.RemoveThingFromThingGroupResponse$ = [
      3,
      n05,
      _RTFTGRe,
      0,
      [],
      []
    ];
    exports2.ReplaceDefaultPolicyVersionParams$ = [
      3,
      n05,
      _RDPVP,
      0,
      [_tNe],
      [0],
      1
    ];
    exports2.ReplaceTopicRuleRequest$ = [
      3,
      n05,
      _RTRR,
      0,
      [_rN2, _tRP],
      [[0, 1], [() => exports2.TopicRulePayload$, 16]],
      2
    ];
    exports2.RepublishAction$ = [
      3,
      n05,
      _RA2,
      0,
      [_rAo, _to, _qo, _he],
      [0, 0, 1, () => exports2.MqttHeaders$],
      2
    ];
    exports2.ResourceIdentifier$ = [
      3,
      n05,
      _RI,
      0,
      [_dCIe, _cCI, _cIPI, _cIl, _pVIo, _ac, _iRA, _rAA, _iCI, _dCAe],
      [0, 0, 0, 0, () => exports2.PolicyVersionIdentifier$, 0, 0, 0, () => exports2.IssuerCertificateIdentifier$, 0]
    ];
    exports2.RetryCriteria$ = [
      3,
      n05,
      _RCe,
      0,
      [_fT, _nOR],
      [0, 1],
      2
    ];
    exports2.RoleAliasDescription$ = [
      3,
      n05,
      _RAD,
      0,
      [_rAol, _rAA, _rAo, _ow, _cDS, _cD, _lMD],
      [0, 0, 0, 0, 1, 4, 4]
    ];
    exports2.S3Action$ = [
      3,
      n05,
      _SA,
      0,
      [_rAo, _bNu, _ke, _cAa],
      [0, 0, 0, 0],
      3
    ];
    exports2.S3Destination$ = [
      3,
      n05,
      _SD,
      0,
      [_buc, _pref],
      [0, 0]
    ];
    exports2.S3Location$ = [
      3,
      n05,
      _SL,
      0,
      [_buc, _ke, _ve],
      [0, 0, 0]
    ];
    exports2.SalesforceAction$ = [
      3,
      n05,
      _SAa,
      0,
      [_tok, _ur],
      [0, 0],
      2
    ];
    exports2.Sbom$ = [
      3,
      n05,
      _Sb,
      0,
      [_sL],
      [() => exports2.S3Location$]
    ];
    exports2.SbomValidationResultSummary$ = [
      3,
      n05,
      _SVRS,
      0,
      [_fN, _vR, _eC, _eMr],
      [0, 0, 0, 0]
    ];
    exports2.ScheduledAuditMetadata$ = [
      3,
      n05,
      _SAM,
      0,
      [_sAN, _sAAc, _fr, _dOM, _dOW],
      [0, 0, 0, 0, 0]
    ];
    exports2.ScheduledJobRollout$ = [
      3,
      n05,
      _SJR,
      0,
      [_sT3],
      [0]
    ];
    exports2.SchedulingConfig$ = [
      3,
      n05,
      _SC,
      0,
      [_sT3, _eT, _eBn, _mW],
      [0, 0, 0, () => MaintenanceWindows]
    ];
    exports2.SearchIndexRequest$ = [
      3,
      n05,
      _SIR,
      0,
      [_qS, _iN, _nT, _mR, _qV],
      [0, 0, 0, 1, 0],
      1
    ];
    exports2.SearchIndexResponse$ = [
      3,
      n05,
      _SIRe,
      0,
      [_nT, _th, _tG],
      [0, () => ThingDocumentList, () => ThingGroupDocumentList]
    ];
    exports2.SecurityProfileIdentifier$ = [
      3,
      n05,
      _SPI,
      0,
      [_n, _ar],
      [0, 0],
      2
    ];
    exports2.SecurityProfileTarget$ = [
      3,
      n05,
      _SPT,
      0,
      [_ar],
      [0],
      1
    ];
    exports2.SecurityProfileTargetMapping$ = [
      3,
      n05,
      _SPTM,
      0,
      [_sPIe, _tar],
      [() => exports2.SecurityProfileIdentifier$, () => exports2.SecurityProfileTarget$]
    ];
    exports2.ServerCertificateConfig$ = [
      3,
      n05,
      _SCC,
      0,
      [_eOCSPC, _oLA, _oARA],
      [2, 0, 0]
    ];
    exports2.ServerCertificateSummary$ = [
      3,
      n05,
      _SCS,
      0,
      [_sCAe, _sCS, _sCSD],
      [0, 0, 0]
    ];
    exports2.SetDefaultAuthorizerRequest$ = [
      3,
      n05,
      _SDAR,
      0,
      [_aNu],
      [0],
      1
    ];
    exports2.SetDefaultAuthorizerResponse$ = [
      3,
      n05,
      _SDARe,
      0,
      [_aNu, _aA],
      [0, 0]
    ];
    exports2.SetDefaultPolicyVersionRequest$ = [
      3,
      n05,
      _SDPVR,
      0,
      [_pNo, _pVI],
      [[0, 1], [0, 1]],
      2
    ];
    exports2.SetLoggingOptionsRequest$ = [
      3,
      n05,
      _SLOR,
      0,
      [_lOP],
      [[() => exports2.LoggingOptionsPayload$, 16]],
      1
    ];
    exports2.SetV2LoggingLevelRequest$ = [
      3,
      n05,
      _SVLLR,
      0,
      [_lT, _lL],
      [() => exports2.LogTarget$, 0],
      2
    ];
    exports2.SetV2LoggingOptionsRequest$ = [
      3,
      n05,
      _SVLOR,
      0,
      [_rAo, _dLL, _dAL, _eCv],
      [0, 0, 2, () => LogEventConfigurations]
    ];
    exports2.SigningProfileParameter$ = [
      3,
      n05,
      _SPP,
      0,
      [_cAe, _pl, _cPOD],
      [0, 0, 0]
    ];
    exports2.SigV4Authorization$ = [
      3,
      n05,
      _SVA,
      0,
      [_sRi, _sNe, _rAo],
      [0, 0, 0],
      3
    ];
    exports2.SnsAction$ = [
      3,
      n05,
      _SAn,
      0,
      [_tAa, _rAo, _mF],
      [0, 0, 0],
      2
    ];
    exports2.SqsAction$ = [
      3,
      n05,
      _SAq,
      0,
      [_rAo, _qU, _uB],
      [0, 0, 2],
      2
    ];
    exports2.StartAuditMitigationActionsTaskRequest$ = [
      3,
      n05,
      _SAMATR,
      0,
      [_tI2, _tar, _aCTAM, _cRT],
      [[0, 1], () => exports2.AuditMitigationActionsTaskTarget$, [2, n05, _ACTAM, 0, 0, 64 | 0], [0, 4]],
      3
    ];
    exports2.StartAuditMitigationActionsTaskResponse$ = [
      3,
      n05,
      _SAMATRt,
      0,
      [_tI2],
      [0]
    ];
    exports2.StartDetectMitigationActionsTaskRequest$ = [
      3,
      n05,
      _SDMATR,
      0,
      [_tI2, _tar, _act, _vEOR, _iOAV, _iSA, _cRT],
      [[0, 1], () => exports2.DetectMitigationActionsTaskTarget$, 64 | 0, () => exports2.ViolationEventOccurrenceRange$, 2, 2, [0, 4]],
      3
    ];
    exports2.StartDetectMitigationActionsTaskResponse$ = [
      3,
      n05,
      _SDMATRt,
      0,
      [_tI2],
      [0]
    ];
    exports2.StartOnDemandAuditTaskRequest$ = [
      3,
      n05,
      _SODATR,
      0,
      [_tCN],
      [64 | 0],
      1
    ];
    exports2.StartOnDemandAuditTaskResponse$ = [
      3,
      n05,
      _SODATRt,
      0,
      [_tI2],
      [0]
    ];
    exports2.StartSigningJobParameter$ = [
      3,
      n05,
      _SSJP,
      0,
      [_sPP, _sPNi, _des],
      [() => exports2.SigningProfileParameter$, 0, () => exports2.Destination$]
    ];
    exports2.StartThingRegistrationTaskRequest$ = [
      3,
      n05,
      _STRTR,
      0,
      [_tB, _iFB, _iFK, _rAo],
      [0, 0, 0, 0],
      4
    ];
    exports2.StartThingRegistrationTaskResponse$ = [
      3,
      n05,
      _STRTRt,
      0,
      [_tI2],
      [0]
    ];
    exports2.StatisticalThreshold$ = [
      3,
      n05,
      _ST2,
      0,
      [_stat],
      [0]
    ];
    exports2.Statistics$ = [
      3,
      n05,
      _St,
      0,
      [_cou, _av, _sum, _min, _max, _sOS, _var, _sDtd],
      [1, 1, 1, 1, 1, 1, 1, 1]
    ];
    exports2.StatusReason$ = [
      3,
      n05,
      _SR,
      0,
      [_rC2, _rDe],
      [0, 0],
      1
    ];
    exports2.StepFunctionsAction$ = [
      3,
      n05,
      _SFA,
      0,
      [_sMN, _rAo, _eNP],
      [0, 0, 0],
      2
    ];
    exports2.StopThingRegistrationTaskRequest$ = [
      3,
      n05,
      _STRTRto,
      0,
      [_tI2],
      [[0, 1]],
      1
    ];
    exports2.StopThingRegistrationTaskResponse$ = [
      3,
      n05,
      _STRTRtop,
      0,
      [],
      []
    ];
    exports2._Stream$ = [
      3,
      n05,
      _Str,
      0,
      [_sIt, _fIil],
      [0, 1]
    ];
    exports2.StreamFile$ = [
      3,
      n05,
      _SF,
      0,
      [_fIil, _sL],
      [1, () => exports2.S3Location$]
    ];
    exports2.StreamInfo$ = [
      3,
      n05,
      _SI2,
      0,
      [_sIt, _sAtr, _sVtr, _d, _fi, _cAr, _lUA, _rAo],
      [0, 0, 1, 0, () => StreamFiles, 4, 4, 0]
    ];
    exports2.StreamSummary$ = [
      3,
      n05,
      _SS,
      0,
      [_sIt, _sAtr, _sVtr, _d],
      [0, 0, 1, 0]
    ];
    exports2.Tag$ = [
      3,
      n05,
      _T2,
      0,
      [_K2, _V2],
      [0, 0],
      1
    ];
    exports2.TagResourceRequest$ = [
      3,
      n05,
      _TRR,
      0,
      [_rA, _tag],
      [0, () => TagList],
      2
    ];
    exports2.TagResourceResponse$ = [
      3,
      n05,
      _TRRa,
      0,
      [],
      []
    ];
    exports2.TaskStatistics$ = [
      3,
      n05,
      _TS,
      0,
      [_tCot, _iPC, _wFDCC, _cCo, _nCC, _fCa, _cCan],
      [1, 1, 1, 1, 1, 1, 1]
    ];
    exports2.TaskStatisticsForAuditCheck$ = [
      3,
      n05,
      _TSFAC,
      0,
      [_tFC, _fFC, _sFC, _sFCk, _cFC],
      [1, 1, 1, 1, 1]
    ];
    exports2.TermsAggregation$ = [
      3,
      n05,
      _TA,
      0,
      [_mB],
      [1]
    ];
    exports2.TestAuthorizationRequest$ = [
      3,
      n05,
      _TAR,
      0,
      [_aIut, _pr, _cIPI, _cIl, _pNTA, _pNTS],
      [() => AuthInfos, 0, 0, [0, { [_hQ2]: _cIl }], 64 | 0, 64 | 0],
      1
    ];
    exports2.TestAuthorizationResponse$ = [
      3,
      n05,
      _TARe,
      0,
      [_aR],
      [() => AuthResults]
    ];
    exports2.TestInvokeAuthorizerRequest$ = [
      3,
      n05,
      _TIAR,
      0,
      [_aNu, _tok, _tSo, _hC, _mC, _tCl],
      [[0, 1], 0, 0, () => exports2.HttpContext$, () => exports2.MqttContext$, () => exports2.TlsContext$],
      1
    ];
    exports2.TestInvokeAuthorizerResponse$ = [
      3,
      n05,
      _TIARe,
      0,
      [_iAs, _pIri, _pDol, _rAIS, _dAIS],
      [2, 0, 64 | 0, 1, 1]
    ];
    exports2.ThingAttribute$ = [
      3,
      n05,
      _TAh,
      0,
      [_tN, _tTN, _tA, _at, _ve],
      [0, 0, 0, 128 | 0, 1]
    ];
    exports2.ThingConnectivity$ = [
      3,
      n05,
      _TC2,
      0,
      [_conn, _ti, _dR],
      [2, 1, 0]
    ];
    exports2.ThingDocument$ = [
      3,
      n05,
      _TD,
      0,
      [_tN, _tIh, _tTN, _tGN, _at, _sh, _dD, _conne],
      [0, 0, 0, 64 | 0, 128 | 0, 0, 0, () => exports2.ThingConnectivity$]
    ];
    exports2.ThingGroupDocument$ = [
      3,
      n05,
      _TGD,
      0,
      [_tGNh, _tGI, _tGD, _at, _pGNa],
      [0, 0, 0, 128 | 0, 64 | 0]
    ];
    exports2.ThingGroupIndexingConfiguration$ = [
      3,
      n05,
      _TGIC,
      0,
      [_tGIM, _mFa, _cF],
      [0, () => Fields, () => Fields],
      1
    ];
    exports2.ThingGroupMetadata$ = [
      3,
      n05,
      _TGM,
      0,
      [_pGN, _rTPTG, _cD],
      [0, () => ThingGroupNameAndArnList, 4]
    ];
    exports2.ThingGroupProperties$ = [
      3,
      n05,
      _TGP,
      0,
      [_tGD, _aPt],
      [0, () => exports2.AttributePayload$]
    ];
    exports2.ThingIndexingConfiguration$ = [
      3,
      n05,
      _TIC,
      0,
      [_tIM, _tCIM, _dDIM, _nSIM, _mFa, _cF, _fil],
      [0, 0, 0, 0, () => Fields, () => Fields, () => exports2.IndexingFilter$],
      1
    ];
    exports2.ThingPrincipalObject$ = [
      3,
      n05,
      _TPO,
      0,
      [_pr, _tPT],
      [0, 0],
      1
    ];
    exports2.ThingTypeDefinition$ = [
      3,
      n05,
      _TTD,
      0,
      [_tTN, _tTA, _tTP, _tTM],
      [0, 0, () => exports2.ThingTypeProperties$, () => exports2.ThingTypeMetadata$]
    ];
    exports2.ThingTypeMetadata$ = [
      3,
      n05,
      _TTM,
      0,
      [_dep, _dDe, _cD],
      [2, 4, 4]
    ];
    exports2.ThingTypeProperties$ = [
      3,
      n05,
      _TTP,
      0,
      [_tTD, _sAe, _mCq],
      [0, 64 | 0, () => exports2.Mqtt5Configuration$]
    ];
    exports2.TimeFilter$ = [
      3,
      n05,
      _TF,
      0,
      [_af, _bef],
      [0, 0]
    ];
    exports2.TimeoutConfig$ = [
      3,
      n05,
      _TCi,
      0,
      [_iPTIM],
      [1]
    ];
    exports2.TimestreamAction$ = [
      3,
      n05,
      _TAi,
      0,
      [_rAo, _dNa, _tNab, _di, _ti],
      [0, 0, 0, () => TimestreamDimensionList, () => exports2.TimestreamTimestamp$],
      4
    ];
    exports2.TimestreamDimension$ = [
      3,
      n05,
      _TDi,
      0,
      [_n, _va],
      [0, 0],
      2
    ];
    exports2.TimestreamTimestamp$ = [
      3,
      n05,
      _TT,
      0,
      [_va, _u],
      [0, 0],
      2
    ];
    exports2.TlsConfig$ = [
      3,
      n05,
      _TCl,
      0,
      [_sP],
      [0]
    ];
    exports2.TlsContext$ = [
      3,
      n05,
      _TCls,
      0,
      [_sNer],
      [0]
    ];
    exports2.TopicRule$ = [
      3,
      n05,
      _TR,
      0,
      [_rN2, _sql, _d, _cAr, _act, _rD, _aISV, _eAr],
      [0, 0, 0, 4, () => ActionList, 2, 0, () => exports2.Action$]
    ];
    exports2.TopicRuleDestination$ = [
      3,
      n05,
      _TRD,
      0,
      [_ar, _st, _cAr, _lUA, _sRt, _hUP, _vP],
      [0, 0, 4, 4, 0, () => exports2.HttpUrlDestinationProperties$, () => exports2.VpcDestinationProperties$]
    ];
    exports2.TopicRuleDestinationConfiguration$ = [
      3,
      n05,
      _TRDC,
      0,
      [_hUC, _vCp],
      [() => exports2.HttpUrlDestinationConfiguration$, () => exports2.VpcDestinationConfiguration$]
    ];
    exports2.TopicRuleDestinationSummary$ = [
      3,
      n05,
      _TRDS,
      0,
      [_ar, _st, _cAr, _lUA, _sRt, _hUS, _vDS],
      [0, 0, 4, 4, 0, () => exports2.HttpUrlDestinationSummary$, () => exports2.VpcDestinationSummary$]
    ];
    exports2.TopicRuleListItem$ = [
      3,
      n05,
      _TRLI,
      0,
      [_rAu, _rN2, _tPo, _cAr, _rD],
      [0, 0, 0, 4, 2]
    ];
    exports2.TopicRulePayload$ = [
      3,
      n05,
      _TRP,
      0,
      [_sql, _act, _d, _rD, _aISV, _eAr],
      [0, () => ActionList, 0, 2, 0, () => exports2.Action$],
      2
    ];
    exports2.TransferCertificateRequest$ = [
      3,
      n05,
      _TCR,
      0,
      [_cI3, _tAA, _tM],
      [[0, 1], [0, { [_hQ2]: _tAA }], 0],
      2
    ];
    exports2.TransferCertificateResponse$ = [
      3,
      n05,
      _TCRr,
      0,
      [_tCA],
      [0]
    ];
    exports2.TransferData$ = [
      3,
      n05,
      _TDr,
      0,
      [_tM, _rRe, _tDr, _aDcc, _rDej],
      [0, 0, 4, 4, 4]
    ];
    exports2.UntagResourceRequest$ = [
      3,
      n05,
      _URR,
      0,
      [_rA, _tK],
      [0, 64 | 0],
      2
    ];
    exports2.UntagResourceResponse$ = [
      3,
      n05,
      _URRn,
      0,
      [],
      []
    ];
    exports2.UpdateAccountAuditConfigurationRequest$ = [
      3,
      n05,
      _UAACR,
      0,
      [_rAo, _aNTC, _aCC],
      [0, () => AuditNotificationTargetConfigurations, () => AuditCheckConfigurations]
    ];
    exports2.UpdateAccountAuditConfigurationResponse$ = [
      3,
      n05,
      _UAACRp,
      0,
      [],
      []
    ];
    exports2.UpdateAuditSuppressionRequest$ = [
      3,
      n05,
      _UASR,
      0,
      [_cN, _rIe, _eD, _sI, _d],
      [0, () => exports2.ResourceIdentifier$, 4, 2, 0],
      2
    ];
    exports2.UpdateAuditSuppressionResponse$ = [
      3,
      n05,
      _UASRp,
      0,
      [],
      []
    ];
    exports2.UpdateAuthorizerRequest$ = [
      3,
      n05,
      _UAR,
      0,
      [_aNu, _aFA, _tKN, _tSPK, _st, _eCFH],
      [[0, 1], 0, 0, 128 | 0, 0, 2],
      1
    ];
    exports2.UpdateAuthorizerResponse$ = [
      3,
      n05,
      _UARp,
      0,
      [_aNu, _aA],
      [0, 0]
    ];
    exports2.UpdateBillingGroupRequest$ = [
      3,
      n05,
      _UBGR,
      0,
      [_bGN, _bGP, _eV],
      [[0, 1], () => exports2.BillingGroupProperties$, 1],
      2
    ];
    exports2.UpdateBillingGroupResponse$ = [
      3,
      n05,
      _UBGRp,
      0,
      [_ve],
      [1]
    ];
    exports2.UpdateCACertificateParams$ = [
      3,
      n05,
      _UCACP,
      0,
      [_a2],
      [0],
      1
    ];
    exports2.UpdateCACertificateRequest$ = [
      3,
      n05,
      _UCACR,
      0,
      [_cI3, _nS, _nARS, _rCe, _rAR],
      [[0, 1], [0, { [_hQ2]: _nS }], [0, { [_hQ2]: _nARS }], () => exports2.RegistrationConfig$, 2],
      1
    ];
    exports2.UpdateCertificateProviderRequest$ = [
      3,
      n05,
      _UCPR,
      0,
      [_cPN, _lFA, _aDFO],
      [[0, 1], 0, 64 | 0],
      1
    ];
    exports2.UpdateCertificateProviderResponse$ = [
      3,
      n05,
      _UCPRp,
      0,
      [_cPN, _cPA],
      [0, 0]
    ];
    exports2.UpdateCertificateRequest$ = [
      3,
      n05,
      _UCR,
      0,
      [_cI3, _nS],
      [[0, 1], [0, { [_hQ2]: _nS }]],
      2
    ];
    exports2.UpdateCommandRequest$ = [
      3,
      n05,
      _UCRp,
      0,
      [_cIo, _dN, _d, _dep],
      [[0, 1], 0, 0, 2],
      1
    ];
    exports2.UpdateCommandResponse$ = [
      3,
      n05,
      _UCRpd,
      0,
      [_cIo, _dN, _d, _dep, _lUA],
      [0, 0, 0, 2, 4]
    ];
    exports2.UpdateCustomMetricRequest$ = [
      3,
      n05,
      _UCMR,
      0,
      [_mNe, _dN],
      [[0, 1], 0],
      2
    ];
    exports2.UpdateCustomMetricResponse$ = [
      3,
      n05,
      _UCMRp,
      0,
      [_mNe, _mA, _mTe, _dN, _cD, _lMD],
      [0, 0, 0, 0, 4, 4]
    ];
    exports2.UpdateDeviceCertificateParams$ = [
      3,
      n05,
      _UDCP,
      0,
      [_a2],
      [0],
      1
    ];
    exports2.UpdateDimensionRequest$ = [
      3,
      n05,
      _UDR,
      0,
      [_n, _sVt],
      [[0, 1], 64 | 0],
      2
    ];
    exports2.UpdateDimensionResponse$ = [
      3,
      n05,
      _UDRp,
      0,
      [_n, _ar, _ty, _sVt, _cD, _lMD],
      [0, 0, 0, 64 | 0, 4, 4]
    ];
    exports2.UpdateDomainConfigurationRequest$ = [
      3,
      n05,
      _UDCR,
      0,
      [_dCN, _aC, _dCS, _rAC, _tC, _sCC, _aTu, _aP, _cCC],
      [[0, 1], () => exports2.AuthorizerConfig$, 0, 2, () => exports2.TlsConfig$, () => exports2.ServerCertificateConfig$, 0, 0, () => exports2.ClientCertificateConfig$],
      1
    ];
    exports2.UpdateDomainConfigurationResponse$ = [
      3,
      n05,
      _UDCRp,
      0,
      [_dCN, _dCA],
      [0, 0]
    ];
    exports2.UpdateDynamicThingGroupRequest$ = [
      3,
      n05,
      _UDTGR,
      0,
      [_tGNh, _tGP, _eV, _iN, _qS, _qV],
      [[0, 1], () => exports2.ThingGroupProperties$, 1, 0, 0, 0],
      2
    ];
    exports2.UpdateDynamicThingGroupResponse$ = [
      3,
      n05,
      _UDTGRp,
      0,
      [_ve],
      [1]
    ];
    exports2.UpdateEncryptionConfigurationRequest$ = [
      3,
      n05,
      _UECR,
      0,
      [_eTn, _kKA, _kARA],
      [0, 0, 0],
      1
    ];
    exports2.UpdateEncryptionConfigurationResponse$ = [
      3,
      n05,
      _UECRp,
      0,
      [],
      []
    ];
    exports2.UpdateEventConfigurationsRequest$ = [
      3,
      n05,
      _UECRpd,
      0,
      [_eCv],
      [() => EventConfigurations]
    ];
    exports2.UpdateEventConfigurationsResponse$ = [
      3,
      n05,
      _UECRpda,
      0,
      [],
      []
    ];
    exports2.UpdateFleetMetricRequest$ = [
      3,
      n05,
      _UFMR,
      0,
      [_mNe, _iN, _qS, _aTg, _pe, _aF, _d, _qV, _u, _eV],
      [[0, 1], 0, 0, () => exports2.AggregationType$, 1, 0, 0, 0, 0, 1],
      2
    ];
    exports2.UpdateIndexingConfigurationRequest$ = [
      3,
      n05,
      _UICR,
      0,
      [_tIC, _tGIC],
      [() => exports2.ThingIndexingConfiguration$, () => exports2.ThingGroupIndexingConfiguration$]
    ];
    exports2.UpdateIndexingConfigurationResponse$ = [
      3,
      n05,
      _UICRp,
      0,
      [],
      []
    ];
    exports2.UpdateJobRequest$ = [
      3,
      n05,
      _UJR,
      0,
      [_jI, _d, _pUC, _jERC, _aCb, _tCi, _nI, _jERCo],
      [[0, 1], 0, () => exports2.PresignedUrlConfig$, () => exports2.JobExecutionsRolloutConfig$, () => exports2.AbortConfig$, () => exports2.TimeoutConfig$, [0, { [_hQ2]: _nI }], () => exports2.JobExecutionsRetryConfig$],
      1
    ];
    exports2.UpdateMitigationActionRequest$ = [
      3,
      n05,
      _UMAR,
      0,
      [_aN, _rAo, _aPc],
      [[0, 1], 0, () => exports2.MitigationActionParams$],
      1
    ];
    exports2.UpdateMitigationActionResponse$ = [
      3,
      n05,
      _UMARp,
      0,
      [_aAc, _aI2],
      [0, 0]
    ];
    exports2.UpdatePackageConfigurationRequest$ = [
      3,
      n05,
      _UPCR,
      0,
      [_vUBJC, _cT],
      [() => exports2.VersionUpdateByJobsConfig$, [0, { [_hQ2]: _cT, [_iT3]: 1 }]]
    ];
    exports2.UpdatePackageConfigurationResponse$ = [
      3,
      n05,
      _UPCRp,
      0,
      [],
      []
    ];
    exports2.UpdatePackageRequest$ = [
      3,
      n05,
      _UPR,
      0,
      [_pN, _d, _dVN, _uDV, _cT],
      [[0, 1], [() => ResourceDescription, 0], 0, 2, [0, { [_hQ2]: _cT, [_iT3]: 1 }]],
      1
    ];
    exports2.UpdatePackageResponse$ = [
      3,
      n05,
      _UPRp,
      0,
      [],
      []
    ];
    exports2.UpdatePackageVersionRequest$ = [
      3,
      n05,
      _UPVR,
      0,
      [_pN, _vN, _d, _at, _art, _a2, _rec, _cT],
      [[0, 1], [0, 1], [() => ResourceDescription, 0], [() => ResourceAttributes, 0], () => exports2.PackageVersionArtifact$, 0, [() => PackageVersionRecipe, 0], [0, { [_hQ2]: _cT, [_iT3]: 1 }]],
      2
    ];
    exports2.UpdatePackageVersionResponse$ = [
      3,
      n05,
      _UPVRp,
      0,
      [],
      []
    ];
    exports2.UpdateProvisioningTemplateRequest$ = [
      3,
      n05,
      _UPTR,
      0,
      [_tNe, _d, _en, _dVI, _pRA, _pPH, _rPPH],
      [[0, 1], 0, 2, 1, 0, () => exports2.ProvisioningHook$, 2],
      1
    ];
    exports2.UpdateProvisioningTemplateResponse$ = [
      3,
      n05,
      _UPTRp,
      0,
      [],
      []
    ];
    exports2.UpdateRoleAliasRequest$ = [
      3,
      n05,
      _URAR,
      0,
      [_rAol, _rAo, _cDS],
      [[0, 1], 0, 1],
      1
    ];
    exports2.UpdateRoleAliasResponse$ = [
      3,
      n05,
      _URARp,
      0,
      [_rAol, _rAA],
      [0, 0]
    ];
    exports2.UpdateScheduledAuditRequest$ = [
      3,
      n05,
      _USAR,
      0,
      [_sAN, _fr, _dOM, _dOW, _tCN],
      [[0, 1], 0, 0, 0, 64 | 0],
      1
    ];
    exports2.UpdateScheduledAuditResponse$ = [
      3,
      n05,
      _USARp,
      0,
      [_sAAc],
      [0]
    ];
    exports2.UpdateSecurityProfileRequest$ = [
      3,
      n05,
      _USPR,
      0,
      [_sPN, _sPD, _be, _aTl, _aMTR, _aMTRV, _dB, _dAT, _dAMTR, _eV, _mEC, _dMEC],
      [[0, 1], 0, () => Behaviors, () => AlertTargets, 64 | 0, () => AdditionalMetricsToRetainV2List, 2, 2, 2, [1, { [_hQ2]: _eV }], () => exports2.MetricsExportConfig$, 2],
      1
    ];
    exports2.UpdateSecurityProfileResponse$ = [
      3,
      n05,
      _USPRp,
      0,
      [_sPN, _sPA, _sPD, _be, _aTl, _aMTR, _aMTRV, _ve, _cD, _lMD, _mEC],
      [0, 0, 0, () => Behaviors, () => AlertTargets, 64 | 0, () => AdditionalMetricsToRetainV2List, 1, 4, 4, () => exports2.MetricsExportConfig$]
    ];
    exports2.UpdateStreamRequest$ = [
      3,
      n05,
      _USR,
      0,
      [_sIt, _d, _fi, _rAo],
      [[0, 1], 0, () => StreamFiles, 0],
      1
    ];
    exports2.UpdateStreamResponse$ = [
      3,
      n05,
      _USRp,
      0,
      [_sIt, _sAtr, _d, _sVtr],
      [0, 0, 0, 1]
    ];
    exports2.UpdateThingGroupRequest$ = [
      3,
      n05,
      _UTGR,
      0,
      [_tGNh, _tGP, _eV],
      [[0, 1], () => exports2.ThingGroupProperties$, 1],
      2
    ];
    exports2.UpdateThingGroupResponse$ = [
      3,
      n05,
      _UTGRp,
      0,
      [_ve],
      [1]
    ];
    exports2.UpdateThingGroupsForThingRequest$ = [
      3,
      n05,
      _UTGFTR,
      0,
      [_tN, _tGTA, _tGTR, _oDG],
      [0, 64 | 0, 64 | 0, 2]
    ];
    exports2.UpdateThingGroupsForThingResponse$ = [
      3,
      n05,
      _UTGFTRp,
      0,
      [],
      []
    ];
    exports2.UpdateThingRequest$ = [
      3,
      n05,
      _UTR,
      0,
      [_tN, _tTN, _aPt, _eV, _rTT],
      [[0, 1], 0, () => exports2.AttributePayload$, 1, 2],
      1
    ];
    exports2.UpdateThingResponse$ = [
      3,
      n05,
      _UTRp,
      0,
      [],
      []
    ];
    exports2.UpdateThingTypeRequest$ = [
      3,
      n05,
      _UTTR,
      0,
      [_tTN, _tTP],
      [[0, 1], () => exports2.ThingTypeProperties$],
      1
    ];
    exports2.UpdateThingTypeResponse$ = [
      3,
      n05,
      _UTTRp,
      0,
      [],
      []
    ];
    exports2.UpdateTopicRuleDestinationRequest$ = [
      3,
      n05,
      _UTRDR,
      0,
      [_ar, _st],
      [0, 0],
      2
    ];
    exports2.UpdateTopicRuleDestinationResponse$ = [
      3,
      n05,
      _UTRDRp,
      0,
      [],
      []
    ];
    exports2.UserProperty$ = [
      3,
      n05,
      _UP,
      0,
      [_ke, _va],
      [0, 0],
      2
    ];
    exports2.ValidateSecurityProfileBehaviorsRequest$ = [
      3,
      n05,
      _VSPBR,
      0,
      [_be],
      [() => Behaviors],
      1
    ];
    exports2.ValidateSecurityProfileBehaviorsResponse$ = [
      3,
      n05,
      _VSPBRa,
      0,
      [_vali, _vEa],
      [2, () => ValidationErrors]
    ];
    exports2.ValidationError$ = [
      3,
      n05,
      _VEa,
      0,
      [_eMr],
      [0]
    ];
    exports2.VersionUpdateByJobsConfig$ = [
      3,
      n05,
      _VUBJC,
      0,
      [_en, _rAo],
      [2, 0]
    ];
    exports2.ViolationEvent$ = [
      3,
      n05,
      _VEi,
      0,
      [_vI, _tN, _sPN, _b, _mV, _vEAI, _vET, _vS, _vSD, _vETi],
      [0, 0, 0, () => exports2.Behavior$, () => exports2.MetricValue$, () => exports2.ViolationEventAdditionalInfo$, 0, 0, 0, 4]
    ];
    exports2.ViolationEventAdditionalInfo$ = [
      3,
      n05,
      _VEAI,
      0,
      [_cLo],
      [0]
    ];
    exports2.ViolationEventOccurrenceRange$ = [
      3,
      n05,
      _VEOR,
      0,
      [_sT3, _eT],
      [4, 4],
      2
    ];
    exports2.VpcDestinationConfiguration$ = [
      3,
      n05,
      _VDC,
      0,
      [_sIu, _vIp, _rAo, _sG],
      [64 | 0, 0, 0, 64 | 0],
      3
    ];
    exports2.VpcDestinationProperties$ = [
      3,
      n05,
      _VDP,
      0,
      [_sIu, _sG, _vIp, _rAo],
      [64 | 0, 64 | 0, 0, 0]
    ];
    exports2.VpcDestinationSummary$ = [
      3,
      n05,
      _VDS,
      0,
      [_sIu, _sG, _vIp, _rAo],
      [64 | 0, 64 | 0, 0, 0]
    ];
    var __Unit = "unit";
    var AbortCriteriaList = [
      1,
      n05,
      _ACL,
      0,
      () => exports2.AbortCriteria$
    ];
    var ActionList = [
      1,
      n05,
      _AL,
      0,
      () => exports2.Action$
    ];
    var ActiveViolations = [
      1,
      n05,
      _AVc,
      0,
      () => exports2.ActiveViolation$
    ];
    var AdditionalMetricsToRetainList = 64 | 0;
    var AdditionalMetricsToRetainV2List = [
      1,
      n05,
      _AMTRVL,
      0,
      () => exports2.MetricToRetain$
    ];
    var AggregationTypeValues = 64 | 0;
    var AssetPropertyValueList = [
      1,
      n05,
      _APVL,
      0,
      () => exports2.AssetPropertyValue$
    ];
    var AuditFindings = [
      1,
      n05,
      _AFu,
      0,
      () => exports2.AuditFinding$
    ];
    var AuditMitigationActionExecutionMetadataList = [
      1,
      n05,
      _AMAEML,
      0,
      () => exports2.AuditMitigationActionExecutionMetadata$
    ];
    var AuditMitigationActionsTaskMetadataList = [
      1,
      n05,
      _AMATML,
      0,
      () => exports2.AuditMitigationActionsTaskMetadata$
    ];
    var AuditSuppressionList = [
      1,
      n05,
      _ASL,
      0,
      () => exports2.AuditSuppression$
    ];
    var AuditTaskMetadataList = [
      1,
      n05,
      _ATML,
      0,
      () => exports2.AuditTaskMetadata$
    ];
    var AuthInfos = [
      1,
      n05,
      _AIu,
      0,
      () => exports2.AuthInfo$
    ];
    var Authorizers = [
      1,
      n05,
      _Au2,
      0,
      () => exports2.AuthorizerSummary$
    ];
    var AuthResults = [
      1,
      n05,
      _ARu,
      0,
      () => exports2.AuthResult$
    ];
    var AwsJobAbortCriteriaList = [
      1,
      n05,
      _AJACL,
      0,
      () => exports2.AwsJobAbortCriteria$
    ];
    var BehaviorModelTrainingSummaries = [
      1,
      n05,
      _BMTSe,
      0,
      () => exports2.BehaviorModelTrainingSummary$
    ];
    var Behaviors = [
      1,
      n05,
      _Be,
      0,
      () => exports2.Behavior$
    ];
    var BillingGroupNameAndArnList = [
      1,
      n05,
      _BGNAAL,
      0,
      () => exports2.GroupNameAndArn$
    ];
    var Buckets = [
      1,
      n05,
      _Buc,
      0,
      () => exports2.Bucket$
    ];
    var CACertificates = [
      1,
      n05,
      _CACe,
      0,
      () => exports2.CACertificate$
    ];
    var CertificateProviderAccountDefaultForOperations = 64 | 0;
    var CertificateProviders = [
      1,
      n05,
      _CPe,
      0,
      () => exports2.CertificateProviderSummary$
    ];
    var Certificates = [
      1,
      n05,
      _Ce,
      0,
      () => exports2.Certificate$
    ];
    var Cidrs = 64 | 0;
    var CommandExecutionSummaryList = [
      1,
      n05,
      _CESL,
      0,
      () => exports2.CommandExecutionSummary$
    ];
    var CommandParameterList = [
      1,
      n05,
      _CPL,
      0,
      () => exports2.CommandParameter$
    ];
    var CommandParameterValueConditionList = [
      1,
      n05,
      _CPVCL,
      0,
      () => exports2.CommandParameterValueCondition$
    ];
    var CommandParameterValueStringList = 64 | 0;
    var CommandSummaryList = [
      1,
      n05,
      _CSL,
      0,
      () => exports2.CommandSummary$
    ];
    var DestinationPackageVersions = 64 | 0;
    var DetectMitigationActionExecutionList = [
      1,
      n05,
      _DMAEL,
      0,
      () => exports2.DetectMitigationActionExecution$
    ];
    var DetectMitigationActionsTaskSummaryList = [
      1,
      n05,
      _DMATSL,
      0,
      () => exports2.DetectMitigationActionsTaskSummary$
    ];
    var DetectMitigationActionsToExecuteList = 64 | 0;
    var DimensionNames = 64 | 0;
    var DimensionStringValues = 64 | 0;
    var DocumentParameters = [
      1,
      n05,
      _DPo,
      0,
      () => exports2.DocumentParameter$
    ];
    var DomainConfigurations = [
      1,
      n05,
      _DC,
      0,
      () => exports2.DomainConfigurationSummary$
    ];
    var EffectivePolicies = [
      1,
      n05,
      _EPf,
      0,
      () => exports2.EffectivePolicy$
    ];
    var Environments = 64 | 0;
    var Fields = [
      1,
      n05,
      _Fi,
      0,
      () => exports2.Field$
    ];
    var FindingIds = 64 | 0;
    var FleetMetricNameAndArnList = [
      1,
      n05,
      _FMNAAL,
      0,
      () => exports2.FleetMetricNameAndArn$
    ];
    var GeoLocationsFilter = [
      1,
      n05,
      _GLF,
      0,
      () => exports2.GeoLocationTarget$
    ];
    var HeaderList = [
      1,
      n05,
      _HL,
      0,
      () => exports2.HttpActionHeader$
    ];
    var IndexNamesList = 64 | 0;
    var JobExecutionSummaryForJobList = [
      1,
      n05,
      _JESFJL,
      0,
      () => exports2.JobExecutionSummaryForJob$
    ];
    var JobExecutionSummaryForThingList = [
      1,
      n05,
      _JESFTL,
      0,
      () => exports2.JobExecutionSummaryForThing$
    ];
    var JobSummaryList = [
      1,
      n05,
      _JSL,
      0,
      () => exports2.JobSummary$
    ];
    var JobTargets = 64 | 0;
    var JobTemplateSummaryList = [
      1,
      n05,
      _JTSL,
      0,
      () => exports2.JobTemplateSummary$
    ];
    var KafkaHeaders = [
      1,
      n05,
      _KH,
      0,
      () => exports2.KafkaActionHeader$
    ];
    var LogEventConfigurations = [
      1,
      n05,
      _LECo,
      0,
      () => exports2.LogEventConfiguration$
    ];
    var LogTargetConfigurations = [
      1,
      n05,
      _LTCo,
      0,
      () => exports2.LogTargetConfiguration$
    ];
    var MaintenanceWindows = [
      1,
      n05,
      _MWa,
      0,
      () => exports2.MaintenanceWindow$
    ];
    var ManagedJobTemplatesSummaryList = [
      1,
      n05,
      _MJTSL,
      0,
      () => exports2.ManagedJobTemplateSummary$
    ];
    var MetricDatumList = [
      1,
      n05,
      _MDL,
      0,
      () => exports2.MetricDatum$
    ];
    var MetricNames = 64 | 0;
    var MissingContextValues = 64 | 0;
    var MitigationActionIdentifierList = [
      1,
      n05,
      _MAIL,
      0,
      () => exports2.MitigationActionIdentifier$
    ];
    var MitigationActionList = [
      1,
      n05,
      _MAL,
      0,
      () => exports2.MitigationAction$
    ];
    var MitigationActionNameList = 64 | 0;
    var NamedShadowNamesFilter = 64 | 0;
    var NumberList = 64 | 1;
    var OTAUpdateFiles = [
      1,
      n05,
      _OTAUFp,
      0,
      () => exports2.OTAUpdateFile$
    ];
    var OTAUpdatesSummary = [
      1,
      n05,
      _OTAUSp,
      0,
      () => exports2.OTAUpdateSummary$
    ];
    var OutgoingCertificates = [
      1,
      n05,
      _OCu,
      0,
      () => exports2.OutgoingCertificate$
    ];
    var PackageSummaryList = [
      1,
      n05,
      _PSL,
      0,
      () => exports2.PackageSummary$
    ];
    var PackageVersionSummaryList = [
      1,
      n05,
      _PVSL,
      0,
      () => exports2.PackageVersionSummary$
    ];
    var Percentiles = [
      1,
      n05,
      _Pe,
      0,
      () => exports2.PercentPair$
    ];
    var PercentList = 64 | 1;
    var Policies = [
      1,
      n05,
      _Po,
      0,
      () => exports2.Policy$
    ];
    var PolicyDocuments = 64 | 0;
    var PolicyNames = 64 | 0;
    var PolicyTargets = 64 | 0;
    var PolicyVersions = [
      1,
      n05,
      _PVo,
      0,
      () => exports2.PolicyVersion$
    ];
    var Ports = 64 | 1;
    var Principals = 64 | 0;
    var PrincipalThingObjects = [
      1,
      n05,
      _PTOr,
      0,
      () => exports2.PrincipalThingObject$
    ];
    var ProcessingTargetNameList = 64 | 0;
    var PropagatingAttributeList = [
      1,
      n05,
      _PAL,
      0,
      () => exports2.PropagatingAttribute$
    ];
    var Protocols = 64 | 0;
    var ProvisioningTemplateListing = [
      1,
      n05,
      _PTL,
      0,
      () => exports2.ProvisioningTemplateSummary$
    ];
    var ProvisioningTemplateVersionListing = [
      1,
      n05,
      _PTVL,
      0,
      () => exports2.ProvisioningTemplateVersionSummary$
    ];
    var PutAssetPropertyValueEntryList = [
      1,
      n05,
      _PAPVEL,
      0,
      () => exports2.PutAssetPropertyValueEntry$
    ];
    var ReasonForNonComplianceCodes = 64 | 0;
    var RelatedResources = [
      1,
      n05,
      _RRe,
      0,
      () => exports2.RelatedResource$
    ];
    var Resources = 64 | 0;
    var RetryCriteriaList = [
      1,
      n05,
      _RCL,
      0,
      () => exports2.RetryCriteria$
    ];
    var RoleAliases = 64 | 0;
    var S3FileUrlList = 64 | 0;
    var SbomValidationResultSummaryList = [
      1,
      n05,
      _SVRSL,
      0,
      () => exports2.SbomValidationResultSummary$
    ];
    var ScheduledAuditMetadataList = [
      1,
      n05,
      _SAML,
      0,
      () => exports2.ScheduledAuditMetadata$
    ];
    var ScheduledJobRolloutList = [
      1,
      n05,
      _SJRL,
      0,
      () => exports2.ScheduledJobRollout$
    ];
    var SearchableAttributes = 64 | 0;
    var SecurityGroupList = 64 | 0;
    var SecurityProfileIdentifiers = [
      1,
      n05,
      _SPIe,
      0,
      () => exports2.SecurityProfileIdentifier$
    ];
    var SecurityProfileTargetMappings = [
      1,
      n05,
      _SPTMe,
      0,
      () => exports2.SecurityProfileTargetMapping$
    ];
    var SecurityProfileTargets = [
      1,
      n05,
      _SPTe,
      0,
      () => exports2.SecurityProfileTarget$
    ];
    var ServerCertificateArns = 64 | 0;
    var ServerCertificates = [
      1,
      n05,
      _SCe,
      0,
      () => exports2.ServerCertificateSummary$
    ];
    var StreamFiles = [
      1,
      n05,
      _SFt,
      0,
      () => exports2.StreamFile$
    ];
    var StreamsSummary = [
      1,
      n05,
      _SSt,
      0,
      () => exports2.StreamSummary$
    ];
    var StringList = 64 | 0;
    var SubnetIdList = 64 | 0;
    var TagKeyList = 64 | 0;
    var TagList = [
      1,
      n05,
      _TL,
      0,
      () => exports2.Tag$
    ];
    var TargetAuditCheckNames = 64 | 0;
    var Targets = 64 | 0;
    var TargetViolationIdsForDetectMitigationActions = 64 | 0;
    var TaskIdList = 64 | 0;
    var ThingAttributeList = [
      1,
      n05,
      _TAL,
      0,
      () => exports2.ThingAttribute$
    ];
    var ThingDocumentList = [
      1,
      n05,
      _TDL,
      0,
      () => exports2.ThingDocument$
    ];
    var ThingGroupDocumentList = [
      1,
      n05,
      _TGDL,
      0,
      () => exports2.ThingGroupDocument$
    ];
    var ThingGroupList = 64 | 0;
    var ThingGroupNameAndArnList = [
      1,
      n05,
      _TGNAAL,
      0,
      () => exports2.GroupNameAndArn$
    ];
    var ThingGroupNameList = 64 | 0;
    var ThingGroupNames = 64 | 0;
    var ThingNameList = 64 | 0;
    var ThingPrincipalObjects = [
      1,
      n05,
      _TPOh,
      0,
      () => exports2.ThingPrincipalObject$
    ];
    var ThingTypeList = [
      1,
      n05,
      _TTL,
      0,
      () => exports2.ThingTypeDefinition$
    ];
    var TimestreamDimensionList = [
      1,
      n05,
      _TDLi,
      0,
      () => exports2.TimestreamDimension$
    ];
    var TopicRuleDestinationSummaries = [
      1,
      n05,
      _TRDSo,
      0,
      () => exports2.TopicRuleDestinationSummary$
    ];
    var TopicRuleList = [
      1,
      n05,
      _TRL,
      0,
      () => exports2.TopicRuleListItem$
    ];
    var UserProperties = [
      1,
      n05,
      _UPs,
      0,
      () => exports2.UserProperty$
    ];
    var ValidationErrors = [
      1,
      n05,
      _VEal,
      0,
      () => exports2.ValidationError$
    ];
    var ViolationEvents = [
      1,
      n05,
      _VEio,
      0,
      () => exports2.ViolationEvent$
    ];
    var AdditionalParameterMap = 128 | 0;
    var AlertTargets = [
      2,
      n05,
      _ATle,
      0,
      0,
      () => exports2.AlertTarget$
    ];
    var Attributes = 128 | 0;
    var AttributesMap = 128 | 0;
    var AuditCheckConfigurations = [
      2,
      n05,
      _ACCu,
      0,
      0,
      () => exports2.AuditCheckConfiguration$
    ];
    var AuditCheckToActionsMapping = [
      2,
      n05,
      _ACTAM,
      0,
      0,
      64 | 0
    ];
    var AuditCheckToReasonCodeFilter = [
      2,
      n05,
      _ACTRCF,
      0,
      0,
      64 | 0
    ];
    var AuditDetails = [
      2,
      n05,
      _ADu,
      0,
      0,
      () => exports2.AuditCheckDetails$
    ];
    var AuditMitigationActionsTaskStatistics = [
      2,
      n05,
      _AMATS,
      0,
      0,
      () => exports2.TaskStatisticsForAuditCheck$
    ];
    var AuditNotificationTargetConfigurations = [
      2,
      n05,
      _ANTC,
      0,
      0,
      () => exports2.AuditNotificationTarget$
    ];
    var CheckCustomConfiguration = 128 | 0;
    var ClientProperties = 128 | 0;
    var CommandExecutionParameterMap = [
      2,
      n05,
      _CEPM,
      0,
      0,
      () => exports2.CommandParameterValue$
    ];
    var CommandExecutionResultMap = [
      2,
      n05,
      _CERM,
      0,
      0,
      () => exports2.CommandExecutionResult$
    ];
    var DetailsMap = 128 | 0;
    var EventConfigurations = [
      2,
      n05,
      _EC,
      0,
      0,
      () => exports2.Configuration$
    ];
    var HttpHeaders = 128 | 0;
    var ParameterMap = 128 | 0;
    var _Parameters = 128 | 0;
    var PublicKeyMap = 128 | 0;
    var ResourceArns = 128 | 0;
    var ResourceAttributes = [
      2,
      n05,
      _RAe,
      8,
      0,
      0
    ];
    var StringMap = 128 | 0;
    var TagMap = 128 | 0;
    exports2.AssetPropertyVariant$ = [
      4,
      n05,
      _APVs,
      0,
      [_sVtri, _iV, _dVo, _bV],
      [0, 0, 0, 0]
    ];
    exports2.AcceptCertificateTransfer$ = [
      9,
      n05,
      _ACT,
      { [_h4]: ["PATCH", "/accept-certificate-transfer/{certificateId}", 200] },
      () => exports2.AcceptCertificateTransferRequest$,
      () => __Unit
    ];
    exports2.AddThingToBillingGroup$ = [
      9,
      n05,
      _ATTBG,
      { [_h4]: ["PUT", "/billing-groups/addThingToBillingGroup", 200] },
      () => exports2.AddThingToBillingGroupRequest$,
      () => exports2.AddThingToBillingGroupResponse$
    ];
    exports2.AddThingToThingGroup$ = [
      9,
      n05,
      _ATTTG,
      { [_h4]: ["PUT", "/thing-groups/addThingToThingGroup", 200] },
      () => exports2.AddThingToThingGroupRequest$,
      () => exports2.AddThingToThingGroupResponse$
    ];
    exports2.AssociateSbomWithPackageVersion$ = [
      9,
      n05,
      _ASWPV,
      { [_h4]: ["PUT", "/packages/{packageName}/versions/{versionName}/sbom", 200] },
      () => exports2.AssociateSbomWithPackageVersionRequest$,
      () => exports2.AssociateSbomWithPackageVersionResponse$
    ];
    exports2.AssociateTargetsWithJob$ = [
      9,
      n05,
      _ATWJ,
      { [_h4]: ["POST", "/jobs/{jobId}/targets", 200] },
      () => exports2.AssociateTargetsWithJobRequest$,
      () => exports2.AssociateTargetsWithJobResponse$
    ];
    exports2.AttachPolicy$ = [
      9,
      n05,
      _APt,
      { [_h4]: ["PUT", "/target-policies/{policyName}", 200] },
      () => exports2.AttachPolicyRequest$,
      () => __Unit
    ];
    exports2.AttachPrincipalPolicy$ = [
      9,
      n05,
      _APP,
      { [_h4]: ["PUT", "/principal-policies/{policyName}", 200] },
      () => exports2.AttachPrincipalPolicyRequest$,
      () => __Unit
    ];
    exports2.AttachSecurityProfile$ = [
      9,
      n05,
      _ASP,
      { [_h4]: ["PUT", "/security-profiles/{securityProfileName}/targets", 200] },
      () => exports2.AttachSecurityProfileRequest$,
      () => exports2.AttachSecurityProfileResponse$
    ];
    exports2.AttachThingPrincipal$ = [
      9,
      n05,
      _ATP,
      { [_h4]: ["PUT", "/things/{thingName}/principals", 200] },
      () => exports2.AttachThingPrincipalRequest$,
      () => exports2.AttachThingPrincipalResponse$
    ];
    exports2.CancelAuditMitigationActionsTask$ = [
      9,
      n05,
      _CAMAT,
      { [_h4]: ["PUT", "/audit/mitigationactions/tasks/{taskId}/cancel", 200] },
      () => exports2.CancelAuditMitigationActionsTaskRequest$,
      () => exports2.CancelAuditMitigationActionsTaskResponse$
    ];
    exports2.CancelAuditTask$ = [
      9,
      n05,
      _CAT,
      { [_h4]: ["PUT", "/audit/tasks/{taskId}/cancel", 200] },
      () => exports2.CancelAuditTaskRequest$,
      () => exports2.CancelAuditTaskResponse$
    ];
    exports2.CancelCertificateTransfer$ = [
      9,
      n05,
      _CCT,
      { [_h4]: ["PATCH", "/cancel-certificate-transfer/{certificateId}", 200] },
      () => exports2.CancelCertificateTransferRequest$,
      () => __Unit
    ];
    exports2.CancelDetectMitigationActionsTask$ = [
      9,
      n05,
      _CDMAT,
      { [_h4]: ["PUT", "/detect/mitigationactions/tasks/{taskId}/cancel", 200] },
      () => exports2.CancelDetectMitigationActionsTaskRequest$,
      () => exports2.CancelDetectMitigationActionsTaskResponse$
    ];
    exports2.CancelJob$ = [
      9,
      n05,
      _CJ,
      { [_h4]: ["PUT", "/jobs/{jobId}/cancel", 200] },
      () => exports2.CancelJobRequest$,
      () => exports2.CancelJobResponse$
    ];
    exports2.CancelJobExecution$ = [
      9,
      n05,
      _CJE,
      { [_h4]: ["PUT", "/things/{thingName}/jobs/{jobId}/cancel", 200] },
      () => exports2.CancelJobExecutionRequest$,
      () => __Unit
    ];
    exports2.ClearDefaultAuthorizer$ = [
      9,
      n05,
      _CDA,
      { [_h4]: ["DELETE", "/default-authorizer", 200] },
      () => exports2.ClearDefaultAuthorizerRequest$,
      () => exports2.ClearDefaultAuthorizerResponse$
    ];
    exports2.ConfirmTopicRuleDestination$ = [
      9,
      n05,
      _CTRD,
      { [_h4]: ["GET", "/confirmdestination/{confirmationToken+}", 200] },
      () => exports2.ConfirmTopicRuleDestinationRequest$,
      () => exports2.ConfirmTopicRuleDestinationResponse$
    ];
    exports2.CreateAuditSuppression$ = [
      9,
      n05,
      _CAS,
      { [_h4]: ["POST", "/audit/suppressions/create", 200] },
      () => exports2.CreateAuditSuppressionRequest$,
      () => exports2.CreateAuditSuppressionResponse$
    ];
    exports2.CreateAuthorizer$ = [
      9,
      n05,
      _CA2,
      { [_h4]: ["POST", "/authorizer/{authorizerName}", 200] },
      () => exports2.CreateAuthorizerRequest$,
      () => exports2.CreateAuthorizerResponse$
    ];
    exports2.CreateBillingGroup$ = [
      9,
      n05,
      _CBG,
      { [_h4]: ["POST", "/billing-groups/{billingGroupName}", 200] },
      () => exports2.CreateBillingGroupRequest$,
      () => exports2.CreateBillingGroupResponse$
    ];
    exports2.CreateCertificateFromCsr$ = [
      9,
      n05,
      _CCFC,
      { [_h4]: ["POST", "/certificates", 200] },
      () => exports2.CreateCertificateFromCsrRequest$,
      () => exports2.CreateCertificateFromCsrResponse$
    ];
    exports2.CreateCertificateProvider$ = [
      9,
      n05,
      _CCP,
      { [_h4]: ["POST", "/certificate-providers/{certificateProviderName}", 200] },
      () => exports2.CreateCertificateProviderRequest$,
      () => exports2.CreateCertificateProviderResponse$
    ];
    exports2.CreateCommand$ = [
      9,
      n05,
      _CC,
      { [_h4]: ["PUT", "/commands/{commandId}", 200] },
      () => exports2.CreateCommandRequest$,
      () => exports2.CreateCommandResponse$
    ];
    exports2.CreateCustomMetric$ = [
      9,
      n05,
      _CCM,
      { [_h4]: ["POST", "/custom-metric/{metricName}", 200] },
      () => exports2.CreateCustomMetricRequest$,
      () => exports2.CreateCustomMetricResponse$
    ];
    exports2.CreateDimension$ = [
      9,
      n05,
      _CDr,
      { [_h4]: ["POST", "/dimensions/{name}", 200] },
      () => exports2.CreateDimensionRequest$,
      () => exports2.CreateDimensionResponse$
    ];
    exports2.CreateDomainConfiguration$ = [
      9,
      n05,
      _CDC,
      { [_h4]: ["POST", "/domainConfigurations/{domainConfigurationName}", 200] },
      () => exports2.CreateDomainConfigurationRequest$,
      () => exports2.CreateDomainConfigurationResponse$
    ];
    exports2.CreateDynamicThingGroup$ = [
      9,
      n05,
      _CDTG,
      { [_h4]: ["POST", "/dynamic-thing-groups/{thingGroupName}", 200] },
      () => exports2.CreateDynamicThingGroupRequest$,
      () => exports2.CreateDynamicThingGroupResponse$
    ];
    exports2.CreateFleetMetric$ = [
      9,
      n05,
      _CFM,
      { [_h4]: ["PUT", "/fleet-metric/{metricName}", 200] },
      () => exports2.CreateFleetMetricRequest$,
      () => exports2.CreateFleetMetricResponse$
    ];
    exports2.CreateJob$ = [
      9,
      n05,
      _CJr,
      { [_h4]: ["PUT", "/jobs/{jobId}", 200] },
      () => exports2.CreateJobRequest$,
      () => exports2.CreateJobResponse$
    ];
    exports2.CreateJobTemplate$ = [
      9,
      n05,
      _CJT,
      { [_h4]: ["PUT", "/job-templates/{jobTemplateId}", 200] },
      () => exports2.CreateJobTemplateRequest$,
      () => exports2.CreateJobTemplateResponse$
    ];
    exports2.CreateKeysAndCertificate$ = [
      9,
      n05,
      _CKAC,
      { [_h4]: ["POST", "/keys-and-certificate", 200] },
      () => exports2.CreateKeysAndCertificateRequest$,
      () => exports2.CreateKeysAndCertificateResponse$
    ];
    exports2.CreateMitigationAction$ = [
      9,
      n05,
      _CMAr,
      { [_h4]: ["POST", "/mitigationactions/actions/{actionName}", 200] },
      () => exports2.CreateMitigationActionRequest$,
      () => exports2.CreateMitigationActionResponse$
    ];
    exports2.CreateOTAUpdate$ = [
      9,
      n05,
      _COTAU,
      { [_h4]: ["POST", "/otaUpdates/{otaUpdateId}", 200] },
      () => exports2.CreateOTAUpdateRequest$,
      () => exports2.CreateOTAUpdateResponse$
    ];
    exports2.CreatePackage$ = [
      9,
      n05,
      _CPr,
      { [_h4]: ["PUT", "/packages/{packageName}", 200] },
      () => exports2.CreatePackageRequest$,
      () => exports2.CreatePackageResponse$
    ];
    exports2.CreatePackageVersion$ = [
      9,
      n05,
      _CPVr,
      { [_h4]: ["PUT", "/packages/{packageName}/versions/{versionName}", 200] },
      () => exports2.CreatePackageVersionRequest$,
      () => exports2.CreatePackageVersionResponse$
    ];
    exports2.CreatePolicy$ = [
      9,
      n05,
      _CPre,
      { [_h4]: ["POST", "/policies/{policyName}", 200] },
      () => exports2.CreatePolicyRequest$,
      () => exports2.CreatePolicyResponse$
    ];
    exports2.CreatePolicyVersion$ = [
      9,
      n05,
      _CPVre,
      { [_h4]: ["POST", "/policies/{policyName}/version", 200] },
      () => exports2.CreatePolicyVersionRequest$,
      () => exports2.CreatePolicyVersionResponse$
    ];
    exports2.CreateProvisioningClaim$ = [
      9,
      n05,
      _CPC,
      { [_h4]: ["POST", "/provisioning-templates/{templateName}/provisioning-claim", 200] },
      () => exports2.CreateProvisioningClaimRequest$,
      () => exports2.CreateProvisioningClaimResponse$
    ];
    exports2.CreateProvisioningTemplate$ = [
      9,
      n05,
      _CPT,
      { [_h4]: ["POST", "/provisioning-templates", 200] },
      () => exports2.CreateProvisioningTemplateRequest$,
      () => exports2.CreateProvisioningTemplateResponse$
    ];
    exports2.CreateProvisioningTemplateVersion$ = [
      9,
      n05,
      _CPTV,
      { [_h4]: ["POST", "/provisioning-templates/{templateName}/versions", 200] },
      () => exports2.CreateProvisioningTemplateVersionRequest$,
      () => exports2.CreateProvisioningTemplateVersionResponse$
    ];
    exports2.CreateRoleAlias$ = [
      9,
      n05,
      _CRA,
      { [_h4]: ["POST", "/role-aliases/{roleAlias}", 200] },
      () => exports2.CreateRoleAliasRequest$,
      () => exports2.CreateRoleAliasResponse$
    ];
    exports2.CreateScheduledAudit$ = [
      9,
      n05,
      _CSA,
      { [_h4]: ["POST", "/audit/scheduledaudits/{scheduledAuditName}", 200] },
      () => exports2.CreateScheduledAuditRequest$,
      () => exports2.CreateScheduledAuditResponse$
    ];
    exports2.CreateSecurityProfile$ = [
      9,
      n05,
      _CSP,
      { [_h4]: ["POST", "/security-profiles/{securityProfileName}", 200] },
      () => exports2.CreateSecurityProfileRequest$,
      () => exports2.CreateSecurityProfileResponse$
    ];
    exports2.CreateStream$ = [
      9,
      n05,
      _CSr,
      { [_h4]: ["POST", "/streams/{streamId}", 200] },
      () => exports2.CreateStreamRequest$,
      () => exports2.CreateStreamResponse$
    ];
    exports2.CreateThing$ = [
      9,
      n05,
      _CT2,
      { [_h4]: ["POST", "/things/{thingName}", 200] },
      () => exports2.CreateThingRequest$,
      () => exports2.CreateThingResponse$
    ];
    exports2.CreateThingGroup$ = [
      9,
      n05,
      _CTG,
      { [_h4]: ["POST", "/thing-groups/{thingGroupName}", 200] },
      () => exports2.CreateThingGroupRequest$,
      () => exports2.CreateThingGroupResponse$
    ];
    exports2.CreateThingType$ = [
      9,
      n05,
      _CTT,
      { [_h4]: ["POST", "/thing-types/{thingTypeName}", 200] },
      () => exports2.CreateThingTypeRequest$,
      () => exports2.CreateThingTypeResponse$
    ];
    exports2.CreateTopicRule$ = [
      9,
      n05,
      _CTRre,
      { [_h4]: ["POST", "/rules/{ruleName}", 200] },
      () => exports2.CreateTopicRuleRequest$,
      () => __Unit
    ];
    exports2.CreateTopicRuleDestination$ = [
      9,
      n05,
      _CTRDr,
      { [_h4]: ["POST", "/destinations", 200] },
      () => exports2.CreateTopicRuleDestinationRequest$,
      () => exports2.CreateTopicRuleDestinationResponse$
    ];
    exports2.DeleteAccountAuditConfiguration$ = [
      9,
      n05,
      _DAAC,
      { [_h4]: ["DELETE", "/audit/configuration", 200] },
      () => exports2.DeleteAccountAuditConfigurationRequest$,
      () => exports2.DeleteAccountAuditConfigurationResponse$
    ];
    exports2.DeleteAuditSuppression$ = [
      9,
      n05,
      _DAS,
      { [_h4]: ["POST", "/audit/suppressions/delete", 200] },
      () => exports2.DeleteAuditSuppressionRequest$,
      () => exports2.DeleteAuditSuppressionResponse$
    ];
    exports2.DeleteAuthorizer$ = [
      9,
      n05,
      _DA,
      { [_h4]: ["DELETE", "/authorizer/{authorizerName}", 200] },
      () => exports2.DeleteAuthorizerRequest$,
      () => exports2.DeleteAuthorizerResponse$
    ];
    exports2.DeleteBillingGroup$ = [
      9,
      n05,
      _DBG,
      { [_h4]: ["DELETE", "/billing-groups/{billingGroupName}", 200] },
      () => exports2.DeleteBillingGroupRequest$,
      () => exports2.DeleteBillingGroupResponse$
    ];
    exports2.DeleteCACertificate$ = [
      9,
      n05,
      _DCAC,
      { [_h4]: ["DELETE", "/cacertificate/{certificateId}", 200] },
      () => exports2.DeleteCACertificateRequest$,
      () => exports2.DeleteCACertificateResponse$
    ];
    exports2.DeleteCertificate$ = [
      9,
      n05,
      _DCe,
      { [_h4]: ["DELETE", "/certificates/{certificateId}", 200] },
      () => exports2.DeleteCertificateRequest$,
      () => __Unit
    ];
    exports2.DeleteCertificateProvider$ = [
      9,
      n05,
      _DCP,
      { [_h4]: ["DELETE", "/certificate-providers/{certificateProviderName}", 200] },
      () => exports2.DeleteCertificateProviderRequest$,
      () => exports2.DeleteCertificateProviderResponse$
    ];
    exports2.DeleteCommand$ = [
      9,
      n05,
      _DCel,
      { [_h4]: ["DELETE", "/commands/{commandId}", 200] },
      () => exports2.DeleteCommandRequest$,
      () => exports2.DeleteCommandResponse$
    ];
    exports2.DeleteCommandExecution$ = [
      9,
      n05,
      _DCEe,
      { [_h4]: ["DELETE", "/command-executions/{executionId}", 200] },
      () => exports2.DeleteCommandExecutionRequest$,
      () => exports2.DeleteCommandExecutionResponse$
    ];
    exports2.DeleteCustomMetric$ = [
      9,
      n05,
      _DCM,
      { [_h4]: ["DELETE", "/custom-metric/{metricName}", 200] },
      () => exports2.DeleteCustomMetricRequest$,
      () => exports2.DeleteCustomMetricResponse$
    ];
    exports2.DeleteDimension$ = [
      9,
      n05,
      _DD,
      { [_h4]: ["DELETE", "/dimensions/{name}", 200] },
      () => exports2.DeleteDimensionRequest$,
      () => exports2.DeleteDimensionResponse$
    ];
    exports2.DeleteDomainConfiguration$ = [
      9,
      n05,
      _DDC,
      { [_h4]: ["DELETE", "/domainConfigurations/{domainConfigurationName}", 200] },
      () => exports2.DeleteDomainConfigurationRequest$,
      () => exports2.DeleteDomainConfigurationResponse$
    ];
    exports2.DeleteDynamicThingGroup$ = [
      9,
      n05,
      _DDTG,
      { [_h4]: ["DELETE", "/dynamic-thing-groups/{thingGroupName}", 200] },
      () => exports2.DeleteDynamicThingGroupRequest$,
      () => exports2.DeleteDynamicThingGroupResponse$
    ];
    exports2.DeleteFleetMetric$ = [
      9,
      n05,
      _DFM,
      { [_h4]: ["DELETE", "/fleet-metric/{metricName}", 200] },
      () => exports2.DeleteFleetMetricRequest$,
      () => __Unit
    ];
    exports2.DeleteJob$ = [
      9,
      n05,
      _DJ,
      { [_h4]: ["DELETE", "/jobs/{jobId}", 200] },
      () => exports2.DeleteJobRequest$,
      () => __Unit
    ];
    exports2.DeleteJobExecution$ = [
      9,
      n05,
      _DJE,
      { [_h4]: ["DELETE", "/things/{thingName}/jobs/{jobId}/executionNumber/{executionNumber}", 200] },
      () => exports2.DeleteJobExecutionRequest$,
      () => __Unit
    ];
    exports2.DeleteJobTemplate$ = [
      9,
      n05,
      _DJT,
      { [_h4]: ["DELETE", "/job-templates/{jobTemplateId}", 200] },
      () => exports2.DeleteJobTemplateRequest$,
      () => __Unit
    ];
    exports2.DeleteMitigationAction$ = [
      9,
      n05,
      _DMA,
      { [_h4]: ["DELETE", "/mitigationactions/actions/{actionName}", 200] },
      () => exports2.DeleteMitigationActionRequest$,
      () => exports2.DeleteMitigationActionResponse$
    ];
    exports2.DeleteOTAUpdate$ = [
      9,
      n05,
      _DOTAU,
      { [_h4]: ["DELETE", "/otaUpdates/{otaUpdateId}", 200] },
      () => exports2.DeleteOTAUpdateRequest$,
      () => exports2.DeleteOTAUpdateResponse$
    ];
    exports2.DeletePackage$ = [
      9,
      n05,
      _DPe,
      { [_h4]: ["DELETE", "/packages/{packageName}", 200] },
      () => exports2.DeletePackageRequest$,
      () => exports2.DeletePackageResponse$
    ];
    exports2.DeletePackageVersion$ = [
      9,
      n05,
      _DPV,
      { [_h4]: ["DELETE", "/packages/{packageName}/versions/{versionName}", 200] },
      () => exports2.DeletePackageVersionRequest$,
      () => exports2.DeletePackageVersionResponse$
    ];
    exports2.DeletePolicy$ = [
      9,
      n05,
      _DPel,
      { [_h4]: ["DELETE", "/policies/{policyName}", 200] },
      () => exports2.DeletePolicyRequest$,
      () => __Unit
    ];
    exports2.DeletePolicyVersion$ = [
      9,
      n05,
      _DPVe,
      { [_h4]: ["DELETE", "/policies/{policyName}/version/{policyVersionId}", 200] },
      () => exports2.DeletePolicyVersionRequest$,
      () => __Unit
    ];
    exports2.DeleteProvisioningTemplate$ = [
      9,
      n05,
      _DPT,
      { [_h4]: ["DELETE", "/provisioning-templates/{templateName}", 200] },
      () => exports2.DeleteProvisioningTemplateRequest$,
      () => exports2.DeleteProvisioningTemplateResponse$
    ];
    exports2.DeleteProvisioningTemplateVersion$ = [
      9,
      n05,
      _DPTV,
      { [_h4]: ["DELETE", "/provisioning-templates/{templateName}/versions/{versionId}", 200] },
      () => exports2.DeleteProvisioningTemplateVersionRequest$,
      () => exports2.DeleteProvisioningTemplateVersionResponse$
    ];
    exports2.DeleteRegistrationCode$ = [
      9,
      n05,
      _DRC,
      { [_h4]: ["DELETE", "/registrationcode", 200] },
      () => exports2.DeleteRegistrationCodeRequest$,
      () => exports2.DeleteRegistrationCodeResponse$
    ];
    exports2.DeleteRoleAlias$ = [
      9,
      n05,
      _DRA,
      { [_h4]: ["DELETE", "/role-aliases/{roleAlias}", 200] },
      () => exports2.DeleteRoleAliasRequest$,
      () => exports2.DeleteRoleAliasResponse$
    ];
    exports2.DeleteScheduledAudit$ = [
      9,
      n05,
      _DSA,
      { [_h4]: ["DELETE", "/audit/scheduledaudits/{scheduledAuditName}", 200] },
      () => exports2.DeleteScheduledAuditRequest$,
      () => exports2.DeleteScheduledAuditResponse$
    ];
    exports2.DeleteSecurityProfile$ = [
      9,
      n05,
      _DSP,
      { [_h4]: ["DELETE", "/security-profiles/{securityProfileName}", 200] },
      () => exports2.DeleteSecurityProfileRequest$,
      () => exports2.DeleteSecurityProfileResponse$
    ];
    exports2.DeleteStream$ = [
      9,
      n05,
      _DS2,
      { [_h4]: ["DELETE", "/streams/{streamId}", 200] },
      () => exports2.DeleteStreamRequest$,
      () => exports2.DeleteStreamResponse$
    ];
    exports2.DeleteThing$ = [
      9,
      n05,
      _DT,
      { [_h4]: ["DELETE", "/things/{thingName}", 200] },
      () => exports2.DeleteThingRequest$,
      () => exports2.DeleteThingResponse$
    ];
    exports2.DeleteThingGroup$ = [
      9,
      n05,
      _DTG,
      { [_h4]: ["DELETE", "/thing-groups/{thingGroupName}", 200] },
      () => exports2.DeleteThingGroupRequest$,
      () => exports2.DeleteThingGroupResponse$
    ];
    exports2.DeleteThingType$ = [
      9,
      n05,
      _DTT,
      { [_h4]: ["DELETE", "/thing-types/{thingTypeName}", 200] },
      () => exports2.DeleteThingTypeRequest$,
      () => exports2.DeleteThingTypeResponse$
    ];
    exports2.DeleteTopicRule$ = [
      9,
      n05,
      _DTRel,
      { [_h4]: ["DELETE", "/rules/{ruleName}", 200] },
      () => exports2.DeleteTopicRuleRequest$,
      () => __Unit
    ];
    exports2.DeleteTopicRuleDestination$ = [
      9,
      n05,
      _DTRD,
      { [_h4]: ["DELETE", "/destinations/{arn+}", 200] },
      () => exports2.DeleteTopicRuleDestinationRequest$,
      () => exports2.DeleteTopicRuleDestinationResponse$
    ];
    exports2.DeleteV2LoggingLevel$ = [
      9,
      n05,
      _DVLL,
      { [_h4]: ["DELETE", "/v2LoggingLevel", 200] },
      () => exports2.DeleteV2LoggingLevelRequest$,
      () => __Unit
    ];
    exports2.DeprecateThingType$ = [
      9,
      n05,
      _DTTe,
      { [_h4]: ["POST", "/thing-types/{thingTypeName}/deprecate", 200] },
      () => exports2.DeprecateThingTypeRequest$,
      () => exports2.DeprecateThingTypeResponse$
    ];
    exports2.DescribeAccountAuditConfiguration$ = [
      9,
      n05,
      _DAACe,
      { [_h4]: ["GET", "/audit/configuration", 200] },
      () => exports2.DescribeAccountAuditConfigurationRequest$,
      () => exports2.DescribeAccountAuditConfigurationResponse$
    ];
    exports2.DescribeAuditFinding$ = [
      9,
      n05,
      _DAF,
      { [_h4]: ["GET", "/audit/findings/{findingId}", 200] },
      () => exports2.DescribeAuditFindingRequest$,
      () => exports2.DescribeAuditFindingResponse$
    ];
    exports2.DescribeAuditMitigationActionsTask$ = [
      9,
      n05,
      _DAMAT,
      { [_h4]: ["GET", "/audit/mitigationactions/tasks/{taskId}", 200] },
      () => exports2.DescribeAuditMitigationActionsTaskRequest$,
      () => exports2.DescribeAuditMitigationActionsTaskResponse$
    ];
    exports2.DescribeAuditSuppression$ = [
      9,
      n05,
      _DASe,
      { [_h4]: ["POST", "/audit/suppressions/describe", 200] },
      () => exports2.DescribeAuditSuppressionRequest$,
      () => exports2.DescribeAuditSuppressionResponse$
    ];
    exports2.DescribeAuditTask$ = [
      9,
      n05,
      _DAT,
      { [_h4]: ["GET", "/audit/tasks/{taskId}", 200] },
      () => exports2.DescribeAuditTaskRequest$,
      () => exports2.DescribeAuditTaskResponse$
    ];
    exports2.DescribeAuthorizer$ = [
      9,
      n05,
      _DAe,
      { [_h4]: ["GET", "/authorizer/{authorizerName}", 200] },
      () => exports2.DescribeAuthorizerRequest$,
      () => exports2.DescribeAuthorizerResponse$
    ];
    exports2.DescribeBillingGroup$ = [
      9,
      n05,
      _DBGe,
      { [_h4]: ["GET", "/billing-groups/{billingGroupName}", 200] },
      () => exports2.DescribeBillingGroupRequest$,
      () => exports2.DescribeBillingGroupResponse$
    ];
    exports2.DescribeCACertificate$ = [
      9,
      n05,
      _DCACe,
      { [_h4]: ["GET", "/cacertificate/{certificateId}", 200] },
      () => exports2.DescribeCACertificateRequest$,
      () => exports2.DescribeCACertificateResponse$
    ];
    exports2.DescribeCertificate$ = [
      9,
      n05,
      _DCes,
      { [_h4]: ["GET", "/certificates/{certificateId}", 200] },
      () => exports2.DescribeCertificateRequest$,
      () => exports2.DescribeCertificateResponse$
    ];
    exports2.DescribeCertificateProvider$ = [
      9,
      n05,
      _DCPe,
      { [_h4]: ["GET", "/certificate-providers/{certificateProviderName}", 200] },
      () => exports2.DescribeCertificateProviderRequest$,
      () => exports2.DescribeCertificateProviderResponse$
    ];
    exports2.DescribeCustomMetric$ = [
      9,
      n05,
      _DCMe,
      { [_h4]: ["GET", "/custom-metric/{metricName}", 200] },
      () => exports2.DescribeCustomMetricRequest$,
      () => exports2.DescribeCustomMetricResponse$
    ];
    exports2.DescribeDefaultAuthorizer$ = [
      9,
      n05,
      _DDA,
      { [_h4]: ["GET", "/default-authorizer", 200] },
      () => exports2.DescribeDefaultAuthorizerRequest$,
      () => exports2.DescribeDefaultAuthorizerResponse$
    ];
    exports2.DescribeDetectMitigationActionsTask$ = [
      9,
      n05,
      _DDMAT,
      { [_h4]: ["GET", "/detect/mitigationactions/tasks/{taskId}", 200] },
      () => exports2.DescribeDetectMitigationActionsTaskRequest$,
      () => exports2.DescribeDetectMitigationActionsTaskResponse$
    ];
    exports2.DescribeDimension$ = [
      9,
      n05,
      _DDe,
      { [_h4]: ["GET", "/dimensions/{name}", 200] },
      () => exports2.DescribeDimensionRequest$,
      () => exports2.DescribeDimensionResponse$
    ];
    exports2.DescribeDomainConfiguration$ = [
      9,
      n05,
      _DDCe,
      { [_h4]: ["GET", "/domainConfigurations/{domainConfigurationName}", 200] },
      () => exports2.DescribeDomainConfigurationRequest$,
      () => exports2.DescribeDomainConfigurationResponse$
    ];
    exports2.DescribeEncryptionConfiguration$ = [
      9,
      n05,
      _DEC,
      { [_h4]: ["GET", "/encryption-configuration", 200] },
      () => exports2.DescribeEncryptionConfigurationRequest$,
      () => exports2.DescribeEncryptionConfigurationResponse$
    ];
    exports2.DescribeEndpoint$ = [
      9,
      n05,
      _DE,
      { [_h4]: ["GET", "/endpoint", 200] },
      () => exports2.DescribeEndpointRequest$,
      () => exports2.DescribeEndpointResponse$
    ];
    exports2.DescribeEventConfigurations$ = [
      9,
      n05,
      _DECe,
      { [_h4]: ["GET", "/event-configurations", 200] },
      () => exports2.DescribeEventConfigurationsRequest$,
      () => exports2.DescribeEventConfigurationsResponse$
    ];
    exports2.DescribeFleetMetric$ = [
      9,
      n05,
      _DFMe,
      { [_h4]: ["GET", "/fleet-metric/{metricName}", 200] },
      () => exports2.DescribeFleetMetricRequest$,
      () => exports2.DescribeFleetMetricResponse$
    ];
    exports2.DescribeIndex$ = [
      9,
      n05,
      _DI,
      { [_h4]: ["GET", "/indices/{indexName}", 200] },
      () => exports2.DescribeIndexRequest$,
      () => exports2.DescribeIndexResponse$
    ];
    exports2.DescribeJob$ = [
      9,
      n05,
      _DJe,
      { [_h4]: ["GET", "/jobs/{jobId}", 200] },
      () => exports2.DescribeJobRequest$,
      () => exports2.DescribeJobResponse$
    ];
    exports2.DescribeJobExecution$ = [
      9,
      n05,
      _DJEe,
      { [_h4]: ["GET", "/things/{thingName}/jobs/{jobId}", 200] },
      () => exports2.DescribeJobExecutionRequest$,
      () => exports2.DescribeJobExecutionResponse$
    ];
    exports2.DescribeJobTemplate$ = [
      9,
      n05,
      _DJTe,
      { [_h4]: ["GET", "/job-templates/{jobTemplateId}", 200] },
      () => exports2.DescribeJobTemplateRequest$,
      () => exports2.DescribeJobTemplateResponse$
    ];
    exports2.DescribeManagedJobTemplate$ = [
      9,
      n05,
      _DMJT,
      { [_h4]: ["GET", "/managed-job-templates/{templateName}", 200] },
      () => exports2.DescribeManagedJobTemplateRequest$,
      () => exports2.DescribeManagedJobTemplateResponse$
    ];
    exports2.DescribeMitigationAction$ = [
      9,
      n05,
      _DMAe,
      { [_h4]: ["GET", "/mitigationactions/actions/{actionName}", 200] },
      () => exports2.DescribeMitigationActionRequest$,
      () => exports2.DescribeMitigationActionResponse$
    ];
    exports2.DescribeProvisioningTemplate$ = [
      9,
      n05,
      _DPTe,
      { [_h4]: ["GET", "/provisioning-templates/{templateName}", 200] },
      () => exports2.DescribeProvisioningTemplateRequest$,
      () => exports2.DescribeProvisioningTemplateResponse$
    ];
    exports2.DescribeProvisioningTemplateVersion$ = [
      9,
      n05,
      _DPTVe,
      { [_h4]: ["GET", "/provisioning-templates/{templateName}/versions/{versionId}", 200] },
      () => exports2.DescribeProvisioningTemplateVersionRequest$,
      () => exports2.DescribeProvisioningTemplateVersionResponse$
    ];
    exports2.DescribeRoleAlias$ = [
      9,
      n05,
      _DRAe,
      { [_h4]: ["GET", "/role-aliases/{roleAlias}", 200] },
      () => exports2.DescribeRoleAliasRequest$,
      () => exports2.DescribeRoleAliasResponse$
    ];
    exports2.DescribeScheduledAudit$ = [
      9,
      n05,
      _DSAe,
      { [_h4]: ["GET", "/audit/scheduledaudits/{scheduledAuditName}", 200] },
      () => exports2.DescribeScheduledAuditRequest$,
      () => exports2.DescribeScheduledAuditResponse$
    ];
    exports2.DescribeSecurityProfile$ = [
      9,
      n05,
      _DSPe,
      { [_h4]: ["GET", "/security-profiles/{securityProfileName}", 200] },
      () => exports2.DescribeSecurityProfileRequest$,
      () => exports2.DescribeSecurityProfileResponse$
    ];
    exports2.DescribeStream$ = [
      9,
      n05,
      _DSe,
      { [_h4]: ["GET", "/streams/{streamId}", 200] },
      () => exports2.DescribeStreamRequest$,
      () => exports2.DescribeStreamResponse$
    ];
    exports2.DescribeThing$ = [
      9,
      n05,
      _DTe,
      { [_h4]: ["GET", "/things/{thingName}", 200] },
      () => exports2.DescribeThingRequest$,
      () => exports2.DescribeThingResponse$
    ];
    exports2.DescribeThingGroup$ = [
      9,
      n05,
      _DTGe,
      { [_h4]: ["GET", "/thing-groups/{thingGroupName}", 200] },
      () => exports2.DescribeThingGroupRequest$,
      () => exports2.DescribeThingGroupResponse$
    ];
    exports2.DescribeThingRegistrationTask$ = [
      9,
      n05,
      _DTRT,
      { [_h4]: ["GET", "/thing-registration-tasks/{taskId}", 200] },
      () => exports2.DescribeThingRegistrationTaskRequest$,
      () => exports2.DescribeThingRegistrationTaskResponse$
    ];
    exports2.DescribeThingType$ = [
      9,
      n05,
      _DTTes,
      { [_h4]: ["GET", "/thing-types/{thingTypeName}", 200] },
      () => exports2.DescribeThingTypeRequest$,
      () => exports2.DescribeThingTypeResponse$
    ];
    exports2.DetachPolicy$ = [
      9,
      n05,
      _DPet,
      { [_h4]: ["POST", "/target-policies/{policyName}", 200] },
      () => exports2.DetachPolicyRequest$,
      () => __Unit
    ];
    exports2.DetachPrincipalPolicy$ = [
      9,
      n05,
      _DPP,
      { [_h4]: ["DELETE", "/principal-policies/{policyName}", 200] },
      () => exports2.DetachPrincipalPolicyRequest$,
      () => __Unit
    ];
    exports2.DetachSecurityProfile$ = [
      9,
      n05,
      _DSPet,
      { [_h4]: ["DELETE", "/security-profiles/{securityProfileName}/targets", 200] },
      () => exports2.DetachSecurityProfileRequest$,
      () => exports2.DetachSecurityProfileResponse$
    ];
    exports2.DetachThingPrincipal$ = [
      9,
      n05,
      _DTP,
      { [_h4]: ["DELETE", "/things/{thingName}/principals", 200] },
      () => exports2.DetachThingPrincipalRequest$,
      () => exports2.DetachThingPrincipalResponse$
    ];
    exports2.DisableTopicRule$ = [
      9,
      n05,
      _DTRi,
      { [_h4]: ["POST", "/rules/{ruleName}/disable", 200] },
      () => exports2.DisableTopicRuleRequest$,
      () => __Unit
    ];
    exports2.DisassociateSbomFromPackageVersion$ = [
      9,
      n05,
      _DSFPV,
      { [_h4]: ["DELETE", "/packages/{packageName}/versions/{versionName}/sbom", 200] },
      () => exports2.DisassociateSbomFromPackageVersionRequest$,
      () => exports2.DisassociateSbomFromPackageVersionResponse$
    ];
    exports2.EnableTopicRule$ = [
      9,
      n05,
      _ETR,
      { [_h4]: ["POST", "/rules/{ruleName}/enable", 200] },
      () => exports2.EnableTopicRuleRequest$,
      () => __Unit
    ];
    exports2.GetBehaviorModelTrainingSummaries$ = [
      9,
      n05,
      _GBMTS,
      { [_h4]: ["GET", "/behavior-model-training/summaries", 200] },
      () => exports2.GetBehaviorModelTrainingSummariesRequest$,
      () => exports2.GetBehaviorModelTrainingSummariesResponse$
    ];
    exports2.GetBucketsAggregation$ = [
      9,
      n05,
      _GBA,
      { [_h4]: ["POST", "/indices/buckets", 200] },
      () => exports2.GetBucketsAggregationRequest$,
      () => exports2.GetBucketsAggregationResponse$
    ];
    exports2.GetCardinality$ = [
      9,
      n05,
      _GC,
      { [_h4]: ["POST", "/indices/cardinality", 200] },
      () => exports2.GetCardinalityRequest$,
      () => exports2.GetCardinalityResponse$
    ];
    exports2.GetCommand$ = [
      9,
      n05,
      _GCe,
      { [_h4]: ["GET", "/commands/{commandId}", 200] },
      () => exports2.GetCommandRequest$,
      () => exports2.GetCommandResponse$
    ];
    exports2.GetCommandExecution$ = [
      9,
      n05,
      _GCE,
      { [_h4]: ["GET", "/command-executions/{executionId}", 200] },
      () => exports2.GetCommandExecutionRequest$,
      () => exports2.GetCommandExecutionResponse$
    ];
    exports2.GetEffectivePolicies$ = [
      9,
      n05,
      _GEP,
      { [_h4]: ["POST", "/effective-policies", 200] },
      () => exports2.GetEffectivePoliciesRequest$,
      () => exports2.GetEffectivePoliciesResponse$
    ];
    exports2.GetIndexingConfiguration$ = [
      9,
      n05,
      _GIC,
      { [_h4]: ["GET", "/indexing/config", 200] },
      () => exports2.GetIndexingConfigurationRequest$,
      () => exports2.GetIndexingConfigurationResponse$
    ];
    exports2.GetJobDocument$ = [
      9,
      n05,
      _GJD,
      { [_h4]: ["GET", "/jobs/{jobId}/job-document", 200] },
      () => exports2.GetJobDocumentRequest$,
      () => exports2.GetJobDocumentResponse$
    ];
    exports2.GetLoggingOptions$ = [
      9,
      n05,
      _GLO,
      { [_h4]: ["GET", "/loggingOptions", 200] },
      () => exports2.GetLoggingOptionsRequest$,
      () => exports2.GetLoggingOptionsResponse$
    ];
    exports2.GetOTAUpdate$ = [
      9,
      n05,
      _GOTAU,
      { [_h4]: ["GET", "/otaUpdates/{otaUpdateId}", 200] },
      () => exports2.GetOTAUpdateRequest$,
      () => exports2.GetOTAUpdateResponse$
    ];
    exports2.GetPackage$ = [
      9,
      n05,
      _GP,
      { [_h4]: ["GET", "/packages/{packageName}", 200] },
      () => exports2.GetPackageRequest$,
      () => exports2.GetPackageResponse$
    ];
    exports2.GetPackageConfiguration$ = [
      9,
      n05,
      _GPC,
      { [_h4]: ["GET", "/package-configuration", 200] },
      () => exports2.GetPackageConfigurationRequest$,
      () => exports2.GetPackageConfigurationResponse$
    ];
    exports2.GetPackageVersion$ = [
      9,
      n05,
      _GPV,
      { [_h4]: ["GET", "/packages/{packageName}/versions/{versionName}", 200] },
      () => exports2.GetPackageVersionRequest$,
      () => exports2.GetPackageVersionResponse$
    ];
    exports2.GetPercentiles$ = [
      9,
      n05,
      _GPe,
      { [_h4]: ["POST", "/indices/percentiles", 200] },
      () => exports2.GetPercentilesRequest$,
      () => exports2.GetPercentilesResponse$
    ];
    exports2.GetPolicy$ = [
      9,
      n05,
      _GPet,
      { [_h4]: ["GET", "/policies/{policyName}", 200] },
      () => exports2.GetPolicyRequest$,
      () => exports2.GetPolicyResponse$
    ];
    exports2.GetPolicyVersion$ = [
      9,
      n05,
      _GPVe,
      { [_h4]: ["GET", "/policies/{policyName}/version/{policyVersionId}", 200] },
      () => exports2.GetPolicyVersionRequest$,
      () => exports2.GetPolicyVersionResponse$
    ];
    exports2.GetRegistrationCode$ = [
      9,
      n05,
      _GRC2,
      { [_h4]: ["GET", "/registrationcode", 200] },
      () => exports2.GetRegistrationCodeRequest$,
      () => exports2.GetRegistrationCodeResponse$
    ];
    exports2.GetStatistics$ = [
      9,
      n05,
      _GS,
      { [_h4]: ["POST", "/indices/statistics", 200] },
      () => exports2.GetStatisticsRequest$,
      () => exports2.GetStatisticsResponse$
    ];
    exports2.GetThingConnectivityData$ = [
      9,
      n05,
      _GTCD,
      { [_h4]: ["POST", "/things/{thingName}/connectivity-data", 200] },
      () => exports2.GetThingConnectivityDataRequest$,
      () => exports2.GetThingConnectivityDataResponse$
    ];
    exports2.GetTopicRule$ = [
      9,
      n05,
      _GTR,
      { [_h4]: ["GET", "/rules/{ruleName}", 200] },
      () => exports2.GetTopicRuleRequest$,
      () => exports2.GetTopicRuleResponse$
    ];
    exports2.GetTopicRuleDestination$ = [
      9,
      n05,
      _GTRD,
      { [_h4]: ["GET", "/destinations/{arn+}", 200] },
      () => exports2.GetTopicRuleDestinationRequest$,
      () => exports2.GetTopicRuleDestinationResponse$
    ];
    exports2.GetV2LoggingOptions$ = [
      9,
      n05,
      _GVLO,
      { [_h4]: ["GET", "/v2LoggingOptions", 200] },
      () => exports2.GetV2LoggingOptionsRequest$,
      () => exports2.GetV2LoggingOptionsResponse$
    ];
    exports2.ListActiveViolations$ = [
      9,
      n05,
      _LAV,
      { [_h4]: ["GET", "/active-violations", 200] },
      () => exports2.ListActiveViolationsRequest$,
      () => exports2.ListActiveViolationsResponse$
    ];
    exports2.ListAttachedPolicies$ = [
      9,
      n05,
      _LAP,
      { [_h4]: ["POST", "/attached-policies/{target}", 200] },
      () => exports2.ListAttachedPoliciesRequest$,
      () => exports2.ListAttachedPoliciesResponse$
    ];
    exports2.ListAuditFindings$ = [
      9,
      n05,
      _LAF,
      { [_h4]: ["POST", "/audit/findings", 200] },
      () => exports2.ListAuditFindingsRequest$,
      () => exports2.ListAuditFindingsResponse$
    ];
    exports2.ListAuditMitigationActionsExecutions$ = [
      9,
      n05,
      _LAMAE,
      { [_h4]: ["GET", "/audit/mitigationactions/executions", 200] },
      () => exports2.ListAuditMitigationActionsExecutionsRequest$,
      () => exports2.ListAuditMitigationActionsExecutionsResponse$
    ];
    exports2.ListAuditMitigationActionsTasks$ = [
      9,
      n05,
      _LAMAT,
      { [_h4]: ["GET", "/audit/mitigationactions/tasks", 200] },
      () => exports2.ListAuditMitigationActionsTasksRequest$,
      () => exports2.ListAuditMitigationActionsTasksResponse$
    ];
    exports2.ListAuditSuppressions$ = [
      9,
      n05,
      _LAS,
      { [_h4]: ["POST", "/audit/suppressions/list", 200] },
      () => exports2.ListAuditSuppressionsRequest$,
      () => exports2.ListAuditSuppressionsResponse$
    ];
    exports2.ListAuditTasks$ = [
      9,
      n05,
      _LAT,
      { [_h4]: ["GET", "/audit/tasks", 200] },
      () => exports2.ListAuditTasksRequest$,
      () => exports2.ListAuditTasksResponse$
    ];
    exports2.ListAuthorizers$ = [
      9,
      n05,
      _LAi,
      { [_h4]: ["GET", "/authorizers", 200] },
      () => exports2.ListAuthorizersRequest$,
      () => exports2.ListAuthorizersResponse$
    ];
    exports2.ListBillingGroups$ = [
      9,
      n05,
      _LBG,
      { [_h4]: ["GET", "/billing-groups", 200] },
      () => exports2.ListBillingGroupsRequest$,
      () => exports2.ListBillingGroupsResponse$
    ];
    exports2.ListCACertificates$ = [
      9,
      n05,
      _LCAC,
      { [_h4]: ["GET", "/cacertificates", 200] },
      () => exports2.ListCACertificatesRequest$,
      () => exports2.ListCACertificatesResponse$
    ];
    exports2.ListCertificateProviders$ = [
      9,
      n05,
      _LCP,
      { [_h4]: ["GET", "/certificate-providers", 200] },
      () => exports2.ListCertificateProvidersRequest$,
      () => exports2.ListCertificateProvidersResponse$
    ];
    exports2.ListCertificates$ = [
      9,
      n05,
      _LC,
      { [_h4]: ["GET", "/certificates", 200] },
      () => exports2.ListCertificatesRequest$,
      () => exports2.ListCertificatesResponse$
    ];
    exports2.ListCertificatesByCA$ = [
      9,
      n05,
      _LCBCA,
      { [_h4]: ["GET", "/certificates-by-ca/{caCertificateId}", 200] },
      () => exports2.ListCertificatesByCARequest$,
      () => exports2.ListCertificatesByCAResponse$
    ];
    exports2.ListCommandExecutions$ = [
      9,
      n05,
      _LCE,
      { [_h4]: ["POST", "/command-executions", 200] },
      () => exports2.ListCommandExecutionsRequest$,
      () => exports2.ListCommandExecutionsResponse$
    ];
    exports2.ListCommands$ = [
      9,
      n05,
      _LCi,
      { [_h4]: ["GET", "/commands", 200] },
      () => exports2.ListCommandsRequest$,
      () => exports2.ListCommandsResponse$
    ];
    exports2.ListCustomMetrics$ = [
      9,
      n05,
      _LCM,
      { [_h4]: ["GET", "/custom-metrics", 200] },
      () => exports2.ListCustomMetricsRequest$,
      () => exports2.ListCustomMetricsResponse$
    ];
    exports2.ListDetectMitigationActionsExecutions$ = [
      9,
      n05,
      _LDMAE,
      { [_h4]: ["GET", "/detect/mitigationactions/executions", 200] },
      () => exports2.ListDetectMitigationActionsExecutionsRequest$,
      () => exports2.ListDetectMitigationActionsExecutionsResponse$
    ];
    exports2.ListDetectMitigationActionsTasks$ = [
      9,
      n05,
      _LDMAT,
      { [_h4]: ["GET", "/detect/mitigationactions/tasks", 200] },
      () => exports2.ListDetectMitigationActionsTasksRequest$,
      () => exports2.ListDetectMitigationActionsTasksResponse$
    ];
    exports2.ListDimensions$ = [
      9,
      n05,
      _LD,
      { [_h4]: ["GET", "/dimensions", 200] },
      () => exports2.ListDimensionsRequest$,
      () => exports2.ListDimensionsResponse$
    ];
    exports2.ListDomainConfigurations$ = [
      9,
      n05,
      _LDC,
      { [_h4]: ["GET", "/domainConfigurations", 200] },
      () => exports2.ListDomainConfigurationsRequest$,
      () => exports2.ListDomainConfigurationsResponse$
    ];
    exports2.ListFleetMetrics$ = [
      9,
      n05,
      _LFM,
      { [_h4]: ["GET", "/fleet-metrics", 200] },
      () => exports2.ListFleetMetricsRequest$,
      () => exports2.ListFleetMetricsResponse$
    ];
    exports2.ListIndices$ = [
      9,
      n05,
      _LI,
      { [_h4]: ["GET", "/indices", 200] },
      () => exports2.ListIndicesRequest$,
      () => exports2.ListIndicesResponse$
    ];
    exports2.ListJobExecutionsForJob$ = [
      9,
      n05,
      _LJEFJ,
      { [_h4]: ["GET", "/jobs/{jobId}/things", 200] },
      () => exports2.ListJobExecutionsForJobRequest$,
      () => exports2.ListJobExecutionsForJobResponse$
    ];
    exports2.ListJobExecutionsForThing$ = [
      9,
      n05,
      _LJEFT,
      { [_h4]: ["GET", "/things/{thingName}/jobs", 200] },
      () => exports2.ListJobExecutionsForThingRequest$,
      () => exports2.ListJobExecutionsForThingResponse$
    ];
    exports2.ListJobs$ = [
      9,
      n05,
      _LJ,
      { [_h4]: ["GET", "/jobs", 200] },
      () => exports2.ListJobsRequest$,
      () => exports2.ListJobsResponse$
    ];
    exports2.ListJobTemplates$ = [
      9,
      n05,
      _LJT,
      { [_h4]: ["GET", "/job-templates", 200] },
      () => exports2.ListJobTemplatesRequest$,
      () => exports2.ListJobTemplatesResponse$
    ];
    exports2.ListManagedJobTemplates$ = [
      9,
      n05,
      _LMJT,
      { [_h4]: ["GET", "/managed-job-templates", 200] },
      () => exports2.ListManagedJobTemplatesRequest$,
      () => exports2.ListManagedJobTemplatesResponse$
    ];
    exports2.ListMetricValues$ = [
      9,
      n05,
      _LMV,
      { [_h4]: ["GET", "/metric-values", 200] },
      () => exports2.ListMetricValuesRequest$,
      () => exports2.ListMetricValuesResponse$
    ];
    exports2.ListMitigationActions$ = [
      9,
      n05,
      _LMA,
      { [_h4]: ["GET", "/mitigationactions/actions", 200] },
      () => exports2.ListMitigationActionsRequest$,
      () => exports2.ListMitigationActionsResponse$
    ];
    exports2.ListOTAUpdates$ = [
      9,
      n05,
      _LOTAU,
      { [_h4]: ["GET", "/otaUpdates", 200] },
      () => exports2.ListOTAUpdatesRequest$,
      () => exports2.ListOTAUpdatesResponse$
    ];
    exports2.ListOutgoingCertificates$ = [
      9,
      n05,
      _LOC,
      { [_h4]: ["GET", "/certificates-out-going", 200] },
      () => exports2.ListOutgoingCertificatesRequest$,
      () => exports2.ListOutgoingCertificatesResponse$
    ];
    exports2.ListPackages$ = [
      9,
      n05,
      _LP,
      { [_h4]: ["GET", "/packages", 200] },
      () => exports2.ListPackagesRequest$,
      () => exports2.ListPackagesResponse$
    ];
    exports2.ListPackageVersions$ = [
      9,
      n05,
      _LPV,
      { [_h4]: ["GET", "/packages/{packageName}/versions", 200] },
      () => exports2.ListPackageVersionsRequest$,
      () => exports2.ListPackageVersionsResponse$
    ];
    exports2.ListPolicies$ = [
      9,
      n05,
      _LPi,
      { [_h4]: ["GET", "/policies", 200] },
      () => exports2.ListPoliciesRequest$,
      () => exports2.ListPoliciesResponse$
    ];
    exports2.ListPolicyPrincipals$ = [
      9,
      n05,
      _LPP,
      { [_h4]: ["GET", "/policy-principals", 200] },
      () => exports2.ListPolicyPrincipalsRequest$,
      () => exports2.ListPolicyPrincipalsResponse$
    ];
    exports2.ListPolicyVersions$ = [
      9,
      n05,
      _LPVi,
      { [_h4]: ["GET", "/policies/{policyName}/version", 200] },
      () => exports2.ListPolicyVersionsRequest$,
      () => exports2.ListPolicyVersionsResponse$
    ];
    exports2.ListPrincipalPolicies$ = [
      9,
      n05,
      _LPPi,
      { [_h4]: ["GET", "/principal-policies", 200] },
      () => exports2.ListPrincipalPoliciesRequest$,
      () => exports2.ListPrincipalPoliciesResponse$
    ];
    exports2.ListPrincipalThings$ = [
      9,
      n05,
      _LPT,
      { [_h4]: ["GET", "/principals/things", 200] },
      () => exports2.ListPrincipalThingsRequest$,
      () => exports2.ListPrincipalThingsResponse$
    ];
    exports2.ListPrincipalThingsV2$ = [
      9,
      n05,
      _LPTV,
      { [_h4]: ["GET", "/principals/things-v2", 200] },
      () => exports2.ListPrincipalThingsV2Request$,
      () => exports2.ListPrincipalThingsV2Response$
    ];
    exports2.ListProvisioningTemplates$ = [
      9,
      n05,
      _LPTi,
      { [_h4]: ["GET", "/provisioning-templates", 200] },
      () => exports2.ListProvisioningTemplatesRequest$,
      () => exports2.ListProvisioningTemplatesResponse$
    ];
    exports2.ListProvisioningTemplateVersions$ = [
      9,
      n05,
      _LPTVi,
      { [_h4]: ["GET", "/provisioning-templates/{templateName}/versions", 200] },
      () => exports2.ListProvisioningTemplateVersionsRequest$,
      () => exports2.ListProvisioningTemplateVersionsResponse$
    ];
    exports2.ListRelatedResourcesForAuditFinding$ = [
      9,
      n05,
      _LRRFAF,
      { [_h4]: ["GET", "/audit/relatedResources", 200] },
      () => exports2.ListRelatedResourcesForAuditFindingRequest$,
      () => exports2.ListRelatedResourcesForAuditFindingResponse$
    ];
    exports2.ListRoleAliases$ = [
      9,
      n05,
      _LRA,
      { [_h4]: ["GET", "/role-aliases", 200] },
      () => exports2.ListRoleAliasesRequest$,
      () => exports2.ListRoleAliasesResponse$
    ];
    exports2.ListSbomValidationResults$ = [
      9,
      n05,
      _LSVR,
      { [_h4]: ["GET", "/packages/{packageName}/versions/{versionName}/sbom-validation-results", 200] },
      () => exports2.ListSbomValidationResultsRequest$,
      () => exports2.ListSbomValidationResultsResponse$
    ];
    exports2.ListScheduledAudits$ = [
      9,
      n05,
      _LSA,
      { [_h4]: ["GET", "/audit/scheduledaudits", 200] },
      () => exports2.ListScheduledAuditsRequest$,
      () => exports2.ListScheduledAuditsResponse$
    ];
    exports2.ListSecurityProfiles$ = [
      9,
      n05,
      _LSP,
      { [_h4]: ["GET", "/security-profiles", 200] },
      () => exports2.ListSecurityProfilesRequest$,
      () => exports2.ListSecurityProfilesResponse$
    ];
    exports2.ListSecurityProfilesForTarget$ = [
      9,
      n05,
      _LSPFT,
      { [_h4]: ["GET", "/security-profiles-for-target", 200] },
      () => exports2.ListSecurityProfilesForTargetRequest$,
      () => exports2.ListSecurityProfilesForTargetResponse$
    ];
    exports2.ListStreams$ = [
      9,
      n05,
      _LS,
      { [_h4]: ["GET", "/streams", 200] },
      () => exports2.ListStreamsRequest$,
      () => exports2.ListStreamsResponse$
    ];
    exports2.ListTagsForResource$ = [
      9,
      n05,
      _LTFR,
      { [_h4]: ["GET", "/tags", 200] },
      () => exports2.ListTagsForResourceRequest$,
      () => exports2.ListTagsForResourceResponse$
    ];
    exports2.ListTargetsForPolicy$ = [
      9,
      n05,
      _LTFP,
      { [_h4]: ["POST", "/policy-targets/{policyName}", 200] },
      () => exports2.ListTargetsForPolicyRequest$,
      () => exports2.ListTargetsForPolicyResponse$
    ];
    exports2.ListTargetsForSecurityProfile$ = [
      9,
      n05,
      _LTFSP,
      { [_h4]: ["GET", "/security-profiles/{securityProfileName}/targets", 200] },
      () => exports2.ListTargetsForSecurityProfileRequest$,
      () => exports2.ListTargetsForSecurityProfileResponse$
    ];
    exports2.ListThingGroups$ = [
      9,
      n05,
      _LTG,
      { [_h4]: ["GET", "/thing-groups", 200] },
      () => exports2.ListThingGroupsRequest$,
      () => exports2.ListThingGroupsResponse$
    ];
    exports2.ListThingGroupsForThing$ = [
      9,
      n05,
      _LTGFT,
      { [_h4]: ["GET", "/things/{thingName}/thing-groups", 200] },
      () => exports2.ListThingGroupsForThingRequest$,
      () => exports2.ListThingGroupsForThingResponse$
    ];
    exports2.ListThingPrincipals$ = [
      9,
      n05,
      _LTP,
      { [_h4]: ["GET", "/things/{thingName}/principals", 200] },
      () => exports2.ListThingPrincipalsRequest$,
      () => exports2.ListThingPrincipalsResponse$
    ];
    exports2.ListThingPrincipalsV2$ = [
      9,
      n05,
      _LTPV,
      { [_h4]: ["GET", "/things/{thingName}/principals-v2", 200] },
      () => exports2.ListThingPrincipalsV2Request$,
      () => exports2.ListThingPrincipalsV2Response$
    ];
    exports2.ListThingRegistrationTaskReports$ = [
      9,
      n05,
      _LTRTRis,
      { [_h4]: ["GET", "/thing-registration-tasks/{taskId}/reports", 200] },
      () => exports2.ListThingRegistrationTaskReportsRequest$,
      () => exports2.ListThingRegistrationTaskReportsResponse$
    ];
    exports2.ListThingRegistrationTasks$ = [
      9,
      n05,
      _LTRT,
      { [_h4]: ["GET", "/thing-registration-tasks", 200] },
      () => exports2.ListThingRegistrationTasksRequest$,
      () => exports2.ListThingRegistrationTasksResponse$
    ];
    exports2.ListThings$ = [
      9,
      n05,
      _LTi,
      { [_h4]: ["GET", "/things", 200] },
      () => exports2.ListThingsRequest$,
      () => exports2.ListThingsResponse$
    ];
    exports2.ListThingsInBillingGroup$ = [
      9,
      n05,
      _LTIBG,
      { [_h4]: ["GET", "/billing-groups/{billingGroupName}/things", 200] },
      () => exports2.ListThingsInBillingGroupRequest$,
      () => exports2.ListThingsInBillingGroupResponse$
    ];
    exports2.ListThingsInThingGroup$ = [
      9,
      n05,
      _LTITG,
      { [_h4]: ["GET", "/thing-groups/{thingGroupName}/things", 200] },
      () => exports2.ListThingsInThingGroupRequest$,
      () => exports2.ListThingsInThingGroupResponse$
    ];
    exports2.ListThingTypes$ = [
      9,
      n05,
      _LTT,
      { [_h4]: ["GET", "/thing-types", 200] },
      () => exports2.ListThingTypesRequest$,
      () => exports2.ListThingTypesResponse$
    ];
    exports2.ListTopicRuleDestinations$ = [
      9,
      n05,
      _LTRD,
      { [_h4]: ["GET", "/destinations", 200] },
      () => exports2.ListTopicRuleDestinationsRequest$,
      () => exports2.ListTopicRuleDestinationsResponse$
    ];
    exports2.ListTopicRules$ = [
      9,
      n05,
      _LTRis,
      { [_h4]: ["GET", "/rules", 200] },
      () => exports2.ListTopicRulesRequest$,
      () => exports2.ListTopicRulesResponse$
    ];
    exports2.ListV2LoggingLevels$ = [
      9,
      n05,
      _LVLL,
      { [_h4]: ["GET", "/v2LoggingLevel", 200] },
      () => exports2.ListV2LoggingLevelsRequest$,
      () => exports2.ListV2LoggingLevelsResponse$
    ];
    exports2.ListViolationEvents$ = [
      9,
      n05,
      _LVE,
      { [_h4]: ["GET", "/violation-events", 200] },
      () => exports2.ListViolationEventsRequest$,
      () => exports2.ListViolationEventsResponse$
    ];
    exports2.PutVerificationStateOnViolation$ = [
      9,
      n05,
      _PVSOV,
      { [_h4]: ["POST", "/violations/verification-state/{violationId}", 200] },
      () => exports2.PutVerificationStateOnViolationRequest$,
      () => exports2.PutVerificationStateOnViolationResponse$
    ];
    exports2.RegisterCACertificate$ = [
      9,
      n05,
      _RCAC,
      { [_h4]: ["POST", "/cacertificate", 200] },
      () => exports2.RegisterCACertificateRequest$,
      () => exports2.RegisterCACertificateResponse$
    ];
    exports2.RegisterCertificate$ = [
      9,
      n05,
      _RCeg,
      { [_h4]: ["POST", "/certificate/register", 200] },
      () => exports2.RegisterCertificateRequest$,
      () => exports2.RegisterCertificateResponse$
    ];
    exports2.RegisterCertificateWithoutCA$ = [
      9,
      n05,
      _RCWCA,
      { [_h4]: ["POST", "/certificate/register-no-ca", 200] },
      () => exports2.RegisterCertificateWithoutCARequest$,
      () => exports2.RegisterCertificateWithoutCAResponse$
    ];
    exports2.RegisterThing$ = [
      9,
      n05,
      _RT3,
      { [_h4]: ["POST", "/things", 200] },
      () => exports2.RegisterThingRequest$,
      () => exports2.RegisterThingResponse$
    ];
    exports2.RejectCertificateTransfer$ = [
      9,
      n05,
      _RCT,
      { [_h4]: ["PATCH", "/reject-certificate-transfer/{certificateId}", 200] },
      () => exports2.RejectCertificateTransferRequest$,
      () => __Unit
    ];
    exports2.RemoveThingFromBillingGroup$ = [
      9,
      n05,
      _RTFBG,
      { [_h4]: ["PUT", "/billing-groups/removeThingFromBillingGroup", 200] },
      () => exports2.RemoveThingFromBillingGroupRequest$,
      () => exports2.RemoveThingFromBillingGroupResponse$
    ];
    exports2.RemoveThingFromThingGroup$ = [
      9,
      n05,
      _RTFTG,
      { [_h4]: ["PUT", "/thing-groups/removeThingFromThingGroup", 200] },
      () => exports2.RemoveThingFromThingGroupRequest$,
      () => exports2.RemoveThingFromThingGroupResponse$
    ];
    exports2.ReplaceTopicRule$ = [
      9,
      n05,
      _RTRep,
      { [_h4]: ["PATCH", "/rules/{ruleName}", 200] },
      () => exports2.ReplaceTopicRuleRequest$,
      () => __Unit
    ];
    exports2.SearchIndex$ = [
      9,
      n05,
      _SIe,
      { [_h4]: ["POST", "/indices/search", 200] },
      () => exports2.SearchIndexRequest$,
      () => exports2.SearchIndexResponse$
    ];
    exports2.SetDefaultAuthorizer$ = [
      9,
      n05,
      _SDA,
      { [_h4]: ["POST", "/default-authorizer", 200] },
      () => exports2.SetDefaultAuthorizerRequest$,
      () => exports2.SetDefaultAuthorizerResponse$
    ];
    exports2.SetDefaultPolicyVersion$ = [
      9,
      n05,
      _SDPV,
      { [_h4]: ["PATCH", "/policies/{policyName}/version/{policyVersionId}", 200] },
      () => exports2.SetDefaultPolicyVersionRequest$,
      () => __Unit
    ];
    exports2.SetLoggingOptions$ = [
      9,
      n05,
      _SLO,
      { [_h4]: ["POST", "/loggingOptions", 200] },
      () => exports2.SetLoggingOptionsRequest$,
      () => __Unit
    ];
    exports2.SetV2LoggingLevel$ = [
      9,
      n05,
      _SVLL,
      { [_h4]: ["POST", "/v2LoggingLevel", 200] },
      () => exports2.SetV2LoggingLevelRequest$,
      () => __Unit
    ];
    exports2.SetV2LoggingOptions$ = [
      9,
      n05,
      _SVLO,
      { [_h4]: ["POST", "/v2LoggingOptions", 200] },
      () => exports2.SetV2LoggingOptionsRequest$,
      () => __Unit
    ];
    exports2.StartAuditMitigationActionsTask$ = [
      9,
      n05,
      _SAMAT,
      { [_h4]: ["POST", "/audit/mitigationactions/tasks/{taskId}", 200] },
      () => exports2.StartAuditMitigationActionsTaskRequest$,
      () => exports2.StartAuditMitigationActionsTaskResponse$
    ];
    exports2.StartDetectMitigationActionsTask$ = [
      9,
      n05,
      _SDMAT,
      { [_h4]: ["PUT", "/detect/mitigationactions/tasks/{taskId}", 200] },
      () => exports2.StartDetectMitigationActionsTaskRequest$,
      () => exports2.StartDetectMitigationActionsTaskResponse$
    ];
    exports2.StartOnDemandAuditTask$ = [
      9,
      n05,
      _SODAT,
      { [_h4]: ["POST", "/audit/tasks", 200] },
      () => exports2.StartOnDemandAuditTaskRequest$,
      () => exports2.StartOnDemandAuditTaskResponse$
    ];
    exports2.StartThingRegistrationTask$ = [
      9,
      n05,
      _STRT,
      { [_h4]: ["POST", "/thing-registration-tasks", 200] },
      () => exports2.StartThingRegistrationTaskRequest$,
      () => exports2.StartThingRegistrationTaskResponse$
    ];
    exports2.StopThingRegistrationTask$ = [
      9,
      n05,
      _STRTt,
      { [_h4]: ["PUT", "/thing-registration-tasks/{taskId}/cancel", 200] },
      () => exports2.StopThingRegistrationTaskRequest$,
      () => exports2.StopThingRegistrationTaskResponse$
    ];
    exports2.TagResource$ = [
      9,
      n05,
      _TRa,
      { [_h4]: ["POST", "/tags", 200] },
      () => exports2.TagResourceRequest$,
      () => exports2.TagResourceResponse$
    ];
    exports2.TestAuthorization$ = [
      9,
      n05,
      _TAe,
      { [_h4]: ["POST", "/test-authorization", 200] },
      () => exports2.TestAuthorizationRequest$,
      () => exports2.TestAuthorizationResponse$
    ];
    exports2.TestInvokeAuthorizer$ = [
      9,
      n05,
      _TIA,
      { [_h4]: ["POST", "/authorizer/{authorizerName}/test", 200] },
      () => exports2.TestInvokeAuthorizerRequest$,
      () => exports2.TestInvokeAuthorizerResponse$
    ];
    exports2.TransferCertificate$ = [
      9,
      n05,
      _TCr,
      { [_h4]: ["PATCH", "/transfer-certificate/{certificateId}", 200] },
      () => exports2.TransferCertificateRequest$,
      () => exports2.TransferCertificateResponse$
    ];
    exports2.UntagResource$ = [
      9,
      n05,
      _UR,
      { [_h4]: ["POST", "/untag", 200] },
      () => exports2.UntagResourceRequest$,
      () => exports2.UntagResourceResponse$
    ];
    exports2.UpdateAccountAuditConfiguration$ = [
      9,
      n05,
      _UAAC,
      { [_h4]: ["PATCH", "/audit/configuration", 200] },
      () => exports2.UpdateAccountAuditConfigurationRequest$,
      () => exports2.UpdateAccountAuditConfigurationResponse$
    ];
    exports2.UpdateAuditSuppression$ = [
      9,
      n05,
      _UAS,
      { [_h4]: ["PATCH", "/audit/suppressions/update", 200] },
      () => exports2.UpdateAuditSuppressionRequest$,
      () => exports2.UpdateAuditSuppressionResponse$
    ];
    exports2.UpdateAuthorizer$ = [
      9,
      n05,
      _UA,
      { [_h4]: ["PUT", "/authorizer/{authorizerName}", 200] },
      () => exports2.UpdateAuthorizerRequest$,
      () => exports2.UpdateAuthorizerResponse$
    ];
    exports2.UpdateBillingGroup$ = [
      9,
      n05,
      _UBG,
      { [_h4]: ["PATCH", "/billing-groups/{billingGroupName}", 200] },
      () => exports2.UpdateBillingGroupRequest$,
      () => exports2.UpdateBillingGroupResponse$
    ];
    exports2.UpdateCACertificate$ = [
      9,
      n05,
      _UCAC,
      { [_h4]: ["PUT", "/cacertificate/{certificateId}", 200] },
      () => exports2.UpdateCACertificateRequest$,
      () => __Unit
    ];
    exports2.UpdateCertificate$ = [
      9,
      n05,
      _UC,
      { [_h4]: ["PUT", "/certificates/{certificateId}", 200] },
      () => exports2.UpdateCertificateRequest$,
      () => __Unit
    ];
    exports2.UpdateCertificateProvider$ = [
      9,
      n05,
      _UCP,
      { [_h4]: ["PUT", "/certificate-providers/{certificateProviderName}", 200] },
      () => exports2.UpdateCertificateProviderRequest$,
      () => exports2.UpdateCertificateProviderResponse$
    ];
    exports2.UpdateCommand$ = [
      9,
      n05,
      _UCp,
      { [_h4]: ["PATCH", "/commands/{commandId}", 200] },
      () => exports2.UpdateCommandRequest$,
      () => exports2.UpdateCommandResponse$
    ];
    exports2.UpdateCustomMetric$ = [
      9,
      n05,
      _UCM,
      { [_h4]: ["PATCH", "/custom-metric/{metricName}", 200] },
      () => exports2.UpdateCustomMetricRequest$,
      () => exports2.UpdateCustomMetricResponse$
    ];
    exports2.UpdateDimension$ = [
      9,
      n05,
      _UD,
      { [_h4]: ["PATCH", "/dimensions/{name}", 200] },
      () => exports2.UpdateDimensionRequest$,
      () => exports2.UpdateDimensionResponse$
    ];
    exports2.UpdateDomainConfiguration$ = [
      9,
      n05,
      _UDC,
      { [_h4]: ["PUT", "/domainConfigurations/{domainConfigurationName}", 200] },
      () => exports2.UpdateDomainConfigurationRequest$,
      () => exports2.UpdateDomainConfigurationResponse$
    ];
    exports2.UpdateDynamicThingGroup$ = [
      9,
      n05,
      _UDTG,
      { [_h4]: ["PATCH", "/dynamic-thing-groups/{thingGroupName}", 200] },
      () => exports2.UpdateDynamicThingGroupRequest$,
      () => exports2.UpdateDynamicThingGroupResponse$
    ];
    exports2.UpdateEncryptionConfiguration$ = [
      9,
      n05,
      _UEC,
      { [_h4]: ["PATCH", "/encryption-configuration", 200] },
      () => exports2.UpdateEncryptionConfigurationRequest$,
      () => exports2.UpdateEncryptionConfigurationResponse$
    ];
    exports2.UpdateEventConfigurations$ = [
      9,
      n05,
      _UECp,
      { [_h4]: ["PATCH", "/event-configurations", 200] },
      () => exports2.UpdateEventConfigurationsRequest$,
      () => exports2.UpdateEventConfigurationsResponse$
    ];
    exports2.UpdateFleetMetric$ = [
      9,
      n05,
      _UFM,
      { [_h4]: ["PATCH", "/fleet-metric/{metricName}", 200] },
      () => exports2.UpdateFleetMetricRequest$,
      () => __Unit
    ];
    exports2.UpdateIndexingConfiguration$ = [
      9,
      n05,
      _UIC,
      { [_h4]: ["POST", "/indexing/config", 200] },
      () => exports2.UpdateIndexingConfigurationRequest$,
      () => exports2.UpdateIndexingConfigurationResponse$
    ];
    exports2.UpdateJob$ = [
      9,
      n05,
      _UJ,
      { [_h4]: ["PATCH", "/jobs/{jobId}", 200] },
      () => exports2.UpdateJobRequest$,
      () => __Unit
    ];
    exports2.UpdateMitigationAction$ = [
      9,
      n05,
      _UMA,
      { [_h4]: ["PATCH", "/mitigationactions/actions/{actionName}", 200] },
      () => exports2.UpdateMitigationActionRequest$,
      () => exports2.UpdateMitigationActionResponse$
    ];
    exports2.UpdatePackage$ = [
      9,
      n05,
      _UPp,
      { [_h4]: ["PATCH", "/packages/{packageName}", 200] },
      () => exports2.UpdatePackageRequest$,
      () => exports2.UpdatePackageResponse$
    ];
    exports2.UpdatePackageConfiguration$ = [
      9,
      n05,
      _UPC,
      { [_h4]: ["PATCH", "/package-configuration", 200] },
      () => exports2.UpdatePackageConfigurationRequest$,
      () => exports2.UpdatePackageConfigurationResponse$
    ];
    exports2.UpdatePackageVersion$ = [
      9,
      n05,
      _UPV,
      { [_h4]: ["PATCH", "/packages/{packageName}/versions/{versionName}", 200] },
      () => exports2.UpdatePackageVersionRequest$,
      () => exports2.UpdatePackageVersionResponse$
    ];
    exports2.UpdateProvisioningTemplate$ = [
      9,
      n05,
      _UPT,
      { [_h4]: ["PATCH", "/provisioning-templates/{templateName}", 200] },
      () => exports2.UpdateProvisioningTemplateRequest$,
      () => exports2.UpdateProvisioningTemplateResponse$
    ];
    exports2.UpdateRoleAlias$ = [
      9,
      n05,
      _URA,
      { [_h4]: ["PUT", "/role-aliases/{roleAlias}", 200] },
      () => exports2.UpdateRoleAliasRequest$,
      () => exports2.UpdateRoleAliasResponse$
    ];
    exports2.UpdateScheduledAudit$ = [
      9,
      n05,
      _USA,
      { [_h4]: ["PATCH", "/audit/scheduledaudits/{scheduledAuditName}", 200] },
      () => exports2.UpdateScheduledAuditRequest$,
      () => exports2.UpdateScheduledAuditResponse$
    ];
    exports2.UpdateSecurityProfile$ = [
      9,
      n05,
      _USP,
      { [_h4]: ["PATCH", "/security-profiles/{securityProfileName}", 200] },
      () => exports2.UpdateSecurityProfileRequest$,
      () => exports2.UpdateSecurityProfileResponse$
    ];
    exports2.UpdateStream$ = [
      9,
      n05,
      _US,
      { [_h4]: ["PUT", "/streams/{streamId}", 200] },
      () => exports2.UpdateStreamRequest$,
      () => exports2.UpdateStreamResponse$
    ];
    exports2.UpdateThing$ = [
      9,
      n05,
      _UT,
      { [_h4]: ["PATCH", "/things/{thingName}", 200] },
      () => exports2.UpdateThingRequest$,
      () => exports2.UpdateThingResponse$
    ];
    exports2.UpdateThingGroup$ = [
      9,
      n05,
      _UTG,
      { [_h4]: ["PATCH", "/thing-groups/{thingGroupName}", 200] },
      () => exports2.UpdateThingGroupRequest$,
      () => exports2.UpdateThingGroupResponse$
    ];
    exports2.UpdateThingGroupsForThing$ = [
      9,
      n05,
      _UTGFT,
      { [_h4]: ["PUT", "/thing-groups/updateThingGroupsForThing", 200] },
      () => exports2.UpdateThingGroupsForThingRequest$,
      () => exports2.UpdateThingGroupsForThingResponse$
    ];
    exports2.UpdateThingType$ = [
      9,
      n05,
      _UTT,
      { [_h4]: ["PATCH", "/thing-types/{thingTypeName}", 200] },
      () => exports2.UpdateThingTypeRequest$,
      () => exports2.UpdateThingTypeResponse$
    ];
    exports2.UpdateTopicRuleDestination$ = [
      9,
      n05,
      _UTRD,
      { [_h4]: ["PATCH", "/destinations", 200] },
      () => exports2.UpdateTopicRuleDestinationRequest$,
      () => exports2.UpdateTopicRuleDestinationResponse$
    ];
    exports2.ValidateSecurityProfileBehaviors$ = [
      9,
      n05,
      _VSPB,
      { [_h4]: ["POST", "/security-profile-behaviors/validate", 200] },
      () => exports2.ValidateSecurityProfileBehaviorsRequest$,
      () => exports2.ValidateSecurityProfileBehaviorsResponse$
    ];
  }
});

// ../../node_modules/@aws-sdk/client-iot/dist-cjs/runtimeConfig.shared.js
var require_runtimeConfig_shared = __commonJS({
  "../../node_modules/@aws-sdk/client-iot/dist-cjs/runtimeConfig.shared.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.getRuntimeConfig = void 0;
    var httpAuthSchemes_1 = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
    var protocols_1 = (init_protocols2(), __toCommonJS(protocols_exports2));
    var smithy_client_1 = require_dist_cjs34();
    var url_parser_1 = require_dist_cjs18();
    var util_base64_1 = require_dist_cjs10();
    var util_utf8_1 = require_dist_cjs9();
    var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider();
    var endpointResolver_1 = require_endpointResolver();
    var schemas_0_1 = require_schemas_0();
    var getRuntimeConfig9 = (config) => {
      return {
        apiVersion: "2015-05-28",
        base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
        base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
        disableHostPrefix: config?.disableHostPrefix ?? false,
        endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
        extensions: config?.extensions ?? [],
        httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultIoTHttpAuthSchemeProvider,
        httpAuthSchemes: config?.httpAuthSchemes ?? [
          {
            schemeId: "aws.auth#sigv4",
            identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
            signer: new httpAuthSchemes_1.AwsSdkSigV4Signer()
          }
        ],
        logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
        protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
        protocolSettings: config?.protocolSettings ?? {
          defaultNamespace: "com.amazonaws.iot",
          errorTypeRegistries: schemas_0_1.errorTypeRegistries,
          version: "2015-05-28",
          serviceTarget: "AWSIotService"
        },
        serviceId: config?.serviceId ?? "IoT",
        urlParser: config?.urlParser ?? url_parser_1.parseUrl,
        utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
        utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
      };
    };
    exports2.getRuntimeConfig = getRuntimeConfig9;
  }
});

// ../../node_modules/@aws-sdk/client-iot/dist-cjs/runtimeConfig.js
var require_runtimeConfig = __commonJS({
  "../../node_modules/@aws-sdk/client-iot/dist-cjs/runtimeConfig.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.getRuntimeConfig = void 0;
    var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
    var package_json_1 = tslib_1.__importDefault(require_package2());
    var client_1 = (init_client(), __toCommonJS(client_exports));
    var httpAuthSchemes_1 = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
    var credential_provider_node_1 = require_dist_cjs55();
    var util_user_agent_node_1 = require_dist_cjs40();
    var config_resolver_1 = require_dist_cjs26();
    var hash_node_1 = require_dist_cjs41();
    var middleware_retry_1 = require_dist_cjs35();
    var node_config_provider_1 = require_dist_cjs30();
    var node_http_handler_1 = require_dist_cjs13();
    var smithy_client_1 = require_dist_cjs34();
    var util_body_length_node_1 = require_dist_cjs42();
    var util_defaults_mode_node_1 = require_dist_cjs43();
    var util_retry_1 = require_dist_cjs23();
    var runtimeConfig_shared_1 = require_runtimeConfig_shared();
    var getRuntimeConfig9 = (config) => {
      (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
      const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
      const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
      const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
      (0, client_1.emitWarningIfUnsupportedVersion)(process.version);
      const loaderConfig = {
        profile: config?.profile,
        logger: clientSharedValues.logger
      };
      return {
        ...clientSharedValues,
        ...config,
        runtime: "node",
        defaultsMode,
        authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
        bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
        credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
        defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
        maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
        region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
        requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
        retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({
          ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
          default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
        }, config),
        sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
        streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
        useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
        useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
        userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
      };
    };
    exports2.getRuntimeConfig = getRuntimeConfig9;
  }
});

// ../../node_modules/@aws-sdk/client-iot/dist-cjs/index.js
var require_dist_cjs56 = __commonJS({
  "../../node_modules/@aws-sdk/client-iot/dist-cjs/index.js"(exports2) {
    "use strict";
    var middlewareHostHeader = require_dist_cjs3();
    var middlewareLogger = require_dist_cjs4();
    var middlewareRecursionDetection = require_dist_cjs5();
    var middlewareUserAgent = require_dist_cjs24();
    var configResolver = require_dist_cjs26();
    var core = (init_dist_es(), __toCommonJS(dist_es_exports));
    var schema = (init_schema(), __toCommonJS(schema_exports));
    var middlewareContentLength = require_dist_cjs27();
    var middlewareEndpoint = require_dist_cjs32();
    var middlewareRetry = require_dist_cjs35();
    var smithyClient = require_dist_cjs34();
    var httpAuthSchemeProvider = require_httpAuthSchemeProvider();
    var runtimeConfig = require_runtimeConfig();
    var regionConfigResolver = require_dist_cjs45();
    var protocolHttp = require_dist_cjs2();
    var schemas_0 = require_schemas_0();
    var errors = require_errors3();
    var IoTServiceException = require_IoTServiceException();
    var resolveClientEndpointParameters5 = (options) => {
      return Object.assign(options, {
        useDualstackEndpoint: options.useDualstackEndpoint ?? false,
        useFipsEndpoint: options.useFipsEndpoint ?? false,
        defaultSigningName: "iot"
      });
    };
    var commonParams5 = {
      UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
      Endpoint: { type: "builtInParams", name: "endpoint" },
      Region: { type: "builtInParams", name: "region" },
      UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
    };
    var getHttpAuthExtensionConfiguration5 = (runtimeConfig2) => {
      const _httpAuthSchemes = runtimeConfig2.httpAuthSchemes;
      let _httpAuthSchemeProvider = runtimeConfig2.httpAuthSchemeProvider;
      let _credentials = runtimeConfig2.credentials;
      return {
        setHttpAuthScheme(httpAuthScheme) {
          const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
          if (index === -1) {
            _httpAuthSchemes.push(httpAuthScheme);
          } else {
            _httpAuthSchemes.splice(index, 1, httpAuthScheme);
          }
        },
        httpAuthSchemes() {
          return _httpAuthSchemes;
        },
        setHttpAuthSchemeProvider(httpAuthSchemeProvider2) {
          _httpAuthSchemeProvider = httpAuthSchemeProvider2;
        },
        httpAuthSchemeProvider() {
          return _httpAuthSchemeProvider;
        },
        setCredentials(credentials) {
          _credentials = credentials;
        },
        credentials() {
          return _credentials;
        }
      };
    };
    var resolveHttpAuthRuntimeConfig5 = (config) => {
      return {
        httpAuthSchemes: config.httpAuthSchemes(),
        httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
        credentials: config.credentials()
      };
    };
    var resolveRuntimeExtensions5 = (runtimeConfig2, extensions) => {
      const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig2), smithyClient.getDefaultExtensionConfiguration(runtimeConfig2), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig2), getHttpAuthExtensionConfiguration5(runtimeConfig2));
      extensions.forEach((extension) => extension.configure(extensionConfiguration));
      return Object.assign(runtimeConfig2, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig5(extensionConfiguration));
    };
    var IoTClient2 = class extends smithyClient.Client {
      config;
      constructor(...[configuration]) {
        const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
        super(_config_0);
        this.initConfig = _config_0;
        const _config_1 = resolveClientEndpointParameters5(_config_0);
        const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
        const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
        const _config_4 = configResolver.resolveRegionConfig(_config_3);
        const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
        const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
        const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
        const _config_8 = resolveRuntimeExtensions5(_config_7, configuration?.extensions || []);
        this.config = _config_8;
        this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
        this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
        this.middlewareStack.use(middlewareRetry.getOmitRetryHeadersPlugin(this.config));
        this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
        this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
        this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
        this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
        this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
        this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
          httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultIoTHttpAuthSchemeParametersProvider,
          identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
            "aws.auth#sigv4": config.credentials
          })
        }));
        this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
      }
      destroy() {
        super.destroy();
      }
    };
    var AcceptCertificateTransferCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "AcceptCertificateTransfer", {}).n("IoTClient", "AcceptCertificateTransferCommand").sc(schemas_0.AcceptCertificateTransfer$).build() {
    };
    var AddThingToBillingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "AddThingToBillingGroup", {}).n("IoTClient", "AddThingToBillingGroupCommand").sc(schemas_0.AddThingToBillingGroup$).build() {
    };
    var AddThingToThingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "AddThingToThingGroup", {}).n("IoTClient", "AddThingToThingGroupCommand").sc(schemas_0.AddThingToThingGroup$).build() {
    };
    var AssociateSbomWithPackageVersionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "AssociateSbomWithPackageVersion", {}).n("IoTClient", "AssociateSbomWithPackageVersionCommand").sc(schemas_0.AssociateSbomWithPackageVersion$).build() {
    };
    var AssociateTargetsWithJobCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "AssociateTargetsWithJob", {}).n("IoTClient", "AssociateTargetsWithJobCommand").sc(schemas_0.AssociateTargetsWithJob$).build() {
    };
    var AttachPolicyCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "AttachPolicy", {}).n("IoTClient", "AttachPolicyCommand").sc(schemas_0.AttachPolicy$).build() {
    };
    var AttachPrincipalPolicyCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "AttachPrincipalPolicy", {}).n("IoTClient", "AttachPrincipalPolicyCommand").sc(schemas_0.AttachPrincipalPolicy$).build() {
    };
    var AttachSecurityProfileCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "AttachSecurityProfile", {}).n("IoTClient", "AttachSecurityProfileCommand").sc(schemas_0.AttachSecurityProfile$).build() {
    };
    var AttachThingPrincipalCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "AttachThingPrincipal", {}).n("IoTClient", "AttachThingPrincipalCommand").sc(schemas_0.AttachThingPrincipal$).build() {
    };
    var CancelAuditMitigationActionsTaskCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CancelAuditMitigationActionsTask", {}).n("IoTClient", "CancelAuditMitigationActionsTaskCommand").sc(schemas_0.CancelAuditMitigationActionsTask$).build() {
    };
    var CancelAuditTaskCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CancelAuditTask", {}).n("IoTClient", "CancelAuditTaskCommand").sc(schemas_0.CancelAuditTask$).build() {
    };
    var CancelCertificateTransferCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CancelCertificateTransfer", {}).n("IoTClient", "CancelCertificateTransferCommand").sc(schemas_0.CancelCertificateTransfer$).build() {
    };
    var CancelDetectMitigationActionsTaskCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CancelDetectMitigationActionsTask", {}).n("IoTClient", "CancelDetectMitigationActionsTaskCommand").sc(schemas_0.CancelDetectMitigationActionsTask$).build() {
    };
    var CancelJobCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CancelJob", {}).n("IoTClient", "CancelJobCommand").sc(schemas_0.CancelJob$).build() {
    };
    var CancelJobExecutionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CancelJobExecution", {}).n("IoTClient", "CancelJobExecutionCommand").sc(schemas_0.CancelJobExecution$).build() {
    };
    var ClearDefaultAuthorizerCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ClearDefaultAuthorizer", {}).n("IoTClient", "ClearDefaultAuthorizerCommand").sc(schemas_0.ClearDefaultAuthorizer$).build() {
    };
    var ConfirmTopicRuleDestinationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ConfirmTopicRuleDestination", {}).n("IoTClient", "ConfirmTopicRuleDestinationCommand").sc(schemas_0.ConfirmTopicRuleDestination$).build() {
    };
    var CreateAuditSuppressionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateAuditSuppression", {}).n("IoTClient", "CreateAuditSuppressionCommand").sc(schemas_0.CreateAuditSuppression$).build() {
    };
    var CreateAuthorizerCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateAuthorizer", {}).n("IoTClient", "CreateAuthorizerCommand").sc(schemas_0.CreateAuthorizer$).build() {
    };
    var CreateBillingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateBillingGroup", {}).n("IoTClient", "CreateBillingGroupCommand").sc(schemas_0.CreateBillingGroup$).build() {
    };
    var CreateCertificateFromCsrCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateCertificateFromCsr", {}).n("IoTClient", "CreateCertificateFromCsrCommand").sc(schemas_0.CreateCertificateFromCsr$).build() {
    };
    var CreateCertificateProviderCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateCertificateProvider", {}).n("IoTClient", "CreateCertificateProviderCommand").sc(schemas_0.CreateCertificateProvider$).build() {
    };
    var CreateCommandCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateCommand", {}).n("IoTClient", "CreateCommandCommand").sc(schemas_0.CreateCommand$).build() {
    };
    var CreateCustomMetricCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateCustomMetric", {}).n("IoTClient", "CreateCustomMetricCommand").sc(schemas_0.CreateCustomMetric$).build() {
    };
    var CreateDimensionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateDimension", {}).n("IoTClient", "CreateDimensionCommand").sc(schemas_0.CreateDimension$).build() {
    };
    var CreateDomainConfigurationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateDomainConfiguration", {}).n("IoTClient", "CreateDomainConfigurationCommand").sc(schemas_0.CreateDomainConfiguration$).build() {
    };
    var CreateDynamicThingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateDynamicThingGroup", {}).n("IoTClient", "CreateDynamicThingGroupCommand").sc(schemas_0.CreateDynamicThingGroup$).build() {
    };
    var CreateFleetMetricCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateFleetMetric", {}).n("IoTClient", "CreateFleetMetricCommand").sc(schemas_0.CreateFleetMetric$).build() {
    };
    var CreateJobCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateJob", {}).n("IoTClient", "CreateJobCommand").sc(schemas_0.CreateJob$).build() {
    };
    var CreateJobTemplateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateJobTemplate", {}).n("IoTClient", "CreateJobTemplateCommand").sc(schemas_0.CreateJobTemplate$).build() {
    };
    var CreateKeysAndCertificateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateKeysAndCertificate", {}).n("IoTClient", "CreateKeysAndCertificateCommand").sc(schemas_0.CreateKeysAndCertificate$).build() {
    };
    var CreateMitigationActionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateMitigationAction", {}).n("IoTClient", "CreateMitigationActionCommand").sc(schemas_0.CreateMitigationAction$).build() {
    };
    var CreateOTAUpdateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateOTAUpdate", {}).n("IoTClient", "CreateOTAUpdateCommand").sc(schemas_0.CreateOTAUpdate$).build() {
    };
    var CreatePackageCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreatePackage", {}).n("IoTClient", "CreatePackageCommand").sc(schemas_0.CreatePackage$).build() {
    };
    var CreatePackageVersionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreatePackageVersion", {}).n("IoTClient", "CreatePackageVersionCommand").sc(schemas_0.CreatePackageVersion$).build() {
    };
    var CreatePolicyCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreatePolicy", {}).n("IoTClient", "CreatePolicyCommand").sc(schemas_0.CreatePolicy$).build() {
    };
    var CreatePolicyVersionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreatePolicyVersion", {}).n("IoTClient", "CreatePolicyVersionCommand").sc(schemas_0.CreatePolicyVersion$).build() {
    };
    var CreateProvisioningClaimCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateProvisioningClaim", {}).n("IoTClient", "CreateProvisioningClaimCommand").sc(schemas_0.CreateProvisioningClaim$).build() {
    };
    var CreateProvisioningTemplateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateProvisioningTemplate", {}).n("IoTClient", "CreateProvisioningTemplateCommand").sc(schemas_0.CreateProvisioningTemplate$).build() {
    };
    var CreateProvisioningTemplateVersionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateProvisioningTemplateVersion", {}).n("IoTClient", "CreateProvisioningTemplateVersionCommand").sc(schemas_0.CreateProvisioningTemplateVersion$).build() {
    };
    var CreateRoleAliasCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateRoleAlias", {}).n("IoTClient", "CreateRoleAliasCommand").sc(schemas_0.CreateRoleAlias$).build() {
    };
    var CreateScheduledAuditCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateScheduledAudit", {}).n("IoTClient", "CreateScheduledAuditCommand").sc(schemas_0.CreateScheduledAudit$).build() {
    };
    var CreateSecurityProfileCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateSecurityProfile", {}).n("IoTClient", "CreateSecurityProfileCommand").sc(schemas_0.CreateSecurityProfile$).build() {
    };
    var CreateStreamCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateStream", {}).n("IoTClient", "CreateStreamCommand").sc(schemas_0.CreateStream$).build() {
    };
    var CreateThingCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateThing", {}).n("IoTClient", "CreateThingCommand").sc(schemas_0.CreateThing$).build() {
    };
    var CreateThingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateThingGroup", {}).n("IoTClient", "CreateThingGroupCommand").sc(schemas_0.CreateThingGroup$).build() {
    };
    var CreateThingTypeCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateThingType", {}).n("IoTClient", "CreateThingTypeCommand").sc(schemas_0.CreateThingType$).build() {
    };
    var CreateTopicRuleCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateTopicRule", {}).n("IoTClient", "CreateTopicRuleCommand").sc(schemas_0.CreateTopicRule$).build() {
    };
    var CreateTopicRuleDestinationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "CreateTopicRuleDestination", {}).n("IoTClient", "CreateTopicRuleDestinationCommand").sc(schemas_0.CreateTopicRuleDestination$).build() {
    };
    var DeleteAccountAuditConfigurationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteAccountAuditConfiguration", {}).n("IoTClient", "DeleteAccountAuditConfigurationCommand").sc(schemas_0.DeleteAccountAuditConfiguration$).build() {
    };
    var DeleteAuditSuppressionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteAuditSuppression", {}).n("IoTClient", "DeleteAuditSuppressionCommand").sc(schemas_0.DeleteAuditSuppression$).build() {
    };
    var DeleteAuthorizerCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteAuthorizer", {}).n("IoTClient", "DeleteAuthorizerCommand").sc(schemas_0.DeleteAuthorizer$).build() {
    };
    var DeleteBillingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteBillingGroup", {}).n("IoTClient", "DeleteBillingGroupCommand").sc(schemas_0.DeleteBillingGroup$).build() {
    };
    var DeleteCACertificateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteCACertificate", {}).n("IoTClient", "DeleteCACertificateCommand").sc(schemas_0.DeleteCACertificate$).build() {
    };
    var DeleteCertificateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteCertificate", {}).n("IoTClient", "DeleteCertificateCommand").sc(schemas_0.DeleteCertificate$).build() {
    };
    var DeleteCertificateProviderCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteCertificateProvider", {}).n("IoTClient", "DeleteCertificateProviderCommand").sc(schemas_0.DeleteCertificateProvider$).build() {
    };
    var DeleteCommandCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteCommand", {}).n("IoTClient", "DeleteCommandCommand").sc(schemas_0.DeleteCommand$).build() {
    };
    var DeleteCommandExecutionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteCommandExecution", {}).n("IoTClient", "DeleteCommandExecutionCommand").sc(schemas_0.DeleteCommandExecution$).build() {
    };
    var DeleteCustomMetricCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteCustomMetric", {}).n("IoTClient", "DeleteCustomMetricCommand").sc(schemas_0.DeleteCustomMetric$).build() {
    };
    var DeleteDimensionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteDimension", {}).n("IoTClient", "DeleteDimensionCommand").sc(schemas_0.DeleteDimension$).build() {
    };
    var DeleteDomainConfigurationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteDomainConfiguration", {}).n("IoTClient", "DeleteDomainConfigurationCommand").sc(schemas_0.DeleteDomainConfiguration$).build() {
    };
    var DeleteDynamicThingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteDynamicThingGroup", {}).n("IoTClient", "DeleteDynamicThingGroupCommand").sc(schemas_0.DeleteDynamicThingGroup$).build() {
    };
    var DeleteFleetMetricCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteFleetMetric", {}).n("IoTClient", "DeleteFleetMetricCommand").sc(schemas_0.DeleteFleetMetric$).build() {
    };
    var DeleteJobCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteJob", {}).n("IoTClient", "DeleteJobCommand").sc(schemas_0.DeleteJob$).build() {
    };
    var DeleteJobExecutionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteJobExecution", {}).n("IoTClient", "DeleteJobExecutionCommand").sc(schemas_0.DeleteJobExecution$).build() {
    };
    var DeleteJobTemplateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteJobTemplate", {}).n("IoTClient", "DeleteJobTemplateCommand").sc(schemas_0.DeleteJobTemplate$).build() {
    };
    var DeleteMitigationActionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteMitigationAction", {}).n("IoTClient", "DeleteMitigationActionCommand").sc(schemas_0.DeleteMitigationAction$).build() {
    };
    var DeleteOTAUpdateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteOTAUpdate", {}).n("IoTClient", "DeleteOTAUpdateCommand").sc(schemas_0.DeleteOTAUpdate$).build() {
    };
    var DeletePackageCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeletePackage", {}).n("IoTClient", "DeletePackageCommand").sc(schemas_0.DeletePackage$).build() {
    };
    var DeletePackageVersionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeletePackageVersion", {}).n("IoTClient", "DeletePackageVersionCommand").sc(schemas_0.DeletePackageVersion$).build() {
    };
    var DeletePolicyCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeletePolicy", {}).n("IoTClient", "DeletePolicyCommand").sc(schemas_0.DeletePolicy$).build() {
    };
    var DeletePolicyVersionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeletePolicyVersion", {}).n("IoTClient", "DeletePolicyVersionCommand").sc(schemas_0.DeletePolicyVersion$).build() {
    };
    var DeleteProvisioningTemplateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteProvisioningTemplate", {}).n("IoTClient", "DeleteProvisioningTemplateCommand").sc(schemas_0.DeleteProvisioningTemplate$).build() {
    };
    var DeleteProvisioningTemplateVersionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteProvisioningTemplateVersion", {}).n("IoTClient", "DeleteProvisioningTemplateVersionCommand").sc(schemas_0.DeleteProvisioningTemplateVersion$).build() {
    };
    var DeleteRegistrationCodeCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteRegistrationCode", {}).n("IoTClient", "DeleteRegistrationCodeCommand").sc(schemas_0.DeleteRegistrationCode$).build() {
    };
    var DeleteRoleAliasCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteRoleAlias", {}).n("IoTClient", "DeleteRoleAliasCommand").sc(schemas_0.DeleteRoleAlias$).build() {
    };
    var DeleteScheduledAuditCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteScheduledAudit", {}).n("IoTClient", "DeleteScheduledAuditCommand").sc(schemas_0.DeleteScheduledAudit$).build() {
    };
    var DeleteSecurityProfileCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteSecurityProfile", {}).n("IoTClient", "DeleteSecurityProfileCommand").sc(schemas_0.DeleteSecurityProfile$).build() {
    };
    var DeleteStreamCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteStream", {}).n("IoTClient", "DeleteStreamCommand").sc(schemas_0.DeleteStream$).build() {
    };
    var DeleteThingCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteThing", {}).n("IoTClient", "DeleteThingCommand").sc(schemas_0.DeleteThing$).build() {
    };
    var DeleteThingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteThingGroup", {}).n("IoTClient", "DeleteThingGroupCommand").sc(schemas_0.DeleteThingGroup$).build() {
    };
    var DeleteThingTypeCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteThingType", {}).n("IoTClient", "DeleteThingTypeCommand").sc(schemas_0.DeleteThingType$).build() {
    };
    var DeleteTopicRuleCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteTopicRule", {}).n("IoTClient", "DeleteTopicRuleCommand").sc(schemas_0.DeleteTopicRule$).build() {
    };
    var DeleteTopicRuleDestinationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteTopicRuleDestination", {}).n("IoTClient", "DeleteTopicRuleDestinationCommand").sc(schemas_0.DeleteTopicRuleDestination$).build() {
    };
    var DeleteV2LoggingLevelCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeleteV2LoggingLevel", {}).n("IoTClient", "DeleteV2LoggingLevelCommand").sc(schemas_0.DeleteV2LoggingLevel$).build() {
    };
    var DeprecateThingTypeCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DeprecateThingType", {}).n("IoTClient", "DeprecateThingTypeCommand").sc(schemas_0.DeprecateThingType$).build() {
    };
    var DescribeAccountAuditConfigurationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeAccountAuditConfiguration", {}).n("IoTClient", "DescribeAccountAuditConfigurationCommand").sc(schemas_0.DescribeAccountAuditConfiguration$).build() {
    };
    var DescribeAuditFindingCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeAuditFinding", {}).n("IoTClient", "DescribeAuditFindingCommand").sc(schemas_0.DescribeAuditFinding$).build() {
    };
    var DescribeAuditMitigationActionsTaskCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeAuditMitigationActionsTask", {}).n("IoTClient", "DescribeAuditMitigationActionsTaskCommand").sc(schemas_0.DescribeAuditMitigationActionsTask$).build() {
    };
    var DescribeAuditSuppressionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeAuditSuppression", {}).n("IoTClient", "DescribeAuditSuppressionCommand").sc(schemas_0.DescribeAuditSuppression$).build() {
    };
    var DescribeAuditTaskCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeAuditTask", {}).n("IoTClient", "DescribeAuditTaskCommand").sc(schemas_0.DescribeAuditTask$).build() {
    };
    var DescribeAuthorizerCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeAuthorizer", {}).n("IoTClient", "DescribeAuthorizerCommand").sc(schemas_0.DescribeAuthorizer$).build() {
    };
    var DescribeBillingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeBillingGroup", {}).n("IoTClient", "DescribeBillingGroupCommand").sc(schemas_0.DescribeBillingGroup$).build() {
    };
    var DescribeCACertificateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeCACertificate", {}).n("IoTClient", "DescribeCACertificateCommand").sc(schemas_0.DescribeCACertificate$).build() {
    };
    var DescribeCertificateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeCertificate", {}).n("IoTClient", "DescribeCertificateCommand").sc(schemas_0.DescribeCertificate$).build() {
    };
    var DescribeCertificateProviderCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeCertificateProvider", {}).n("IoTClient", "DescribeCertificateProviderCommand").sc(schemas_0.DescribeCertificateProvider$).build() {
    };
    var DescribeCustomMetricCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeCustomMetric", {}).n("IoTClient", "DescribeCustomMetricCommand").sc(schemas_0.DescribeCustomMetric$).build() {
    };
    var DescribeDefaultAuthorizerCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeDefaultAuthorizer", {}).n("IoTClient", "DescribeDefaultAuthorizerCommand").sc(schemas_0.DescribeDefaultAuthorizer$).build() {
    };
    var DescribeDetectMitigationActionsTaskCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeDetectMitigationActionsTask", {}).n("IoTClient", "DescribeDetectMitigationActionsTaskCommand").sc(schemas_0.DescribeDetectMitigationActionsTask$).build() {
    };
    var DescribeDimensionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeDimension", {}).n("IoTClient", "DescribeDimensionCommand").sc(schemas_0.DescribeDimension$).build() {
    };
    var DescribeDomainConfigurationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeDomainConfiguration", {}).n("IoTClient", "DescribeDomainConfigurationCommand").sc(schemas_0.DescribeDomainConfiguration$).build() {
    };
    var DescribeEncryptionConfigurationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeEncryptionConfiguration", {}).n("IoTClient", "DescribeEncryptionConfigurationCommand").sc(schemas_0.DescribeEncryptionConfiguration$).build() {
    };
    var DescribeEndpointCommand2 = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeEndpoint", {}).n("IoTClient", "DescribeEndpointCommand").sc(schemas_0.DescribeEndpoint$).build() {
    };
    var DescribeEventConfigurationsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeEventConfigurations", {}).n("IoTClient", "DescribeEventConfigurationsCommand").sc(schemas_0.DescribeEventConfigurations$).build() {
    };
    var DescribeFleetMetricCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeFleetMetric", {}).n("IoTClient", "DescribeFleetMetricCommand").sc(schemas_0.DescribeFleetMetric$).build() {
    };
    var DescribeIndexCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeIndex", {}).n("IoTClient", "DescribeIndexCommand").sc(schemas_0.DescribeIndex$).build() {
    };
    var DescribeJobCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeJob", {}).n("IoTClient", "DescribeJobCommand").sc(schemas_0.DescribeJob$).build() {
    };
    var DescribeJobExecutionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeJobExecution", {}).n("IoTClient", "DescribeJobExecutionCommand").sc(schemas_0.DescribeJobExecution$).build() {
    };
    var DescribeJobTemplateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeJobTemplate", {}).n("IoTClient", "DescribeJobTemplateCommand").sc(schemas_0.DescribeJobTemplate$).build() {
    };
    var DescribeManagedJobTemplateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeManagedJobTemplate", {}).n("IoTClient", "DescribeManagedJobTemplateCommand").sc(schemas_0.DescribeManagedJobTemplate$).build() {
    };
    var DescribeMitigationActionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeMitigationAction", {}).n("IoTClient", "DescribeMitigationActionCommand").sc(schemas_0.DescribeMitigationAction$).build() {
    };
    var DescribeProvisioningTemplateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeProvisioningTemplate", {}).n("IoTClient", "DescribeProvisioningTemplateCommand").sc(schemas_0.DescribeProvisioningTemplate$).build() {
    };
    var DescribeProvisioningTemplateVersionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeProvisioningTemplateVersion", {}).n("IoTClient", "DescribeProvisioningTemplateVersionCommand").sc(schemas_0.DescribeProvisioningTemplateVersion$).build() {
    };
    var DescribeRoleAliasCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeRoleAlias", {}).n("IoTClient", "DescribeRoleAliasCommand").sc(schemas_0.DescribeRoleAlias$).build() {
    };
    var DescribeScheduledAuditCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeScheduledAudit", {}).n("IoTClient", "DescribeScheduledAuditCommand").sc(schemas_0.DescribeScheduledAudit$).build() {
    };
    var DescribeSecurityProfileCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeSecurityProfile", {}).n("IoTClient", "DescribeSecurityProfileCommand").sc(schemas_0.DescribeSecurityProfile$).build() {
    };
    var DescribeStreamCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeStream", {}).n("IoTClient", "DescribeStreamCommand").sc(schemas_0.DescribeStream$).build() {
    };
    var DescribeThingCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeThing", {}).n("IoTClient", "DescribeThingCommand").sc(schemas_0.DescribeThing$).build() {
    };
    var DescribeThingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeThingGroup", {}).n("IoTClient", "DescribeThingGroupCommand").sc(schemas_0.DescribeThingGroup$).build() {
    };
    var DescribeThingRegistrationTaskCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeThingRegistrationTask", {}).n("IoTClient", "DescribeThingRegistrationTaskCommand").sc(schemas_0.DescribeThingRegistrationTask$).build() {
    };
    var DescribeThingTypeCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DescribeThingType", {}).n("IoTClient", "DescribeThingTypeCommand").sc(schemas_0.DescribeThingType$).build() {
    };
    var DetachPolicyCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DetachPolicy", {}).n("IoTClient", "DetachPolicyCommand").sc(schemas_0.DetachPolicy$).build() {
    };
    var DetachPrincipalPolicyCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DetachPrincipalPolicy", {}).n("IoTClient", "DetachPrincipalPolicyCommand").sc(schemas_0.DetachPrincipalPolicy$).build() {
    };
    var DetachSecurityProfileCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DetachSecurityProfile", {}).n("IoTClient", "DetachSecurityProfileCommand").sc(schemas_0.DetachSecurityProfile$).build() {
    };
    var DetachThingPrincipalCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DetachThingPrincipal", {}).n("IoTClient", "DetachThingPrincipalCommand").sc(schemas_0.DetachThingPrincipal$).build() {
    };
    var DisableTopicRuleCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DisableTopicRule", {}).n("IoTClient", "DisableTopicRuleCommand").sc(schemas_0.DisableTopicRule$).build() {
    };
    var DisassociateSbomFromPackageVersionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "DisassociateSbomFromPackageVersion", {}).n("IoTClient", "DisassociateSbomFromPackageVersionCommand").sc(schemas_0.DisassociateSbomFromPackageVersion$).build() {
    };
    var EnableTopicRuleCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "EnableTopicRule", {}).n("IoTClient", "EnableTopicRuleCommand").sc(schemas_0.EnableTopicRule$).build() {
    };
    var GetBehaviorModelTrainingSummariesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetBehaviorModelTrainingSummaries", {}).n("IoTClient", "GetBehaviorModelTrainingSummariesCommand").sc(schemas_0.GetBehaviorModelTrainingSummaries$).build() {
    };
    var GetBucketsAggregationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetBucketsAggregation", {}).n("IoTClient", "GetBucketsAggregationCommand").sc(schemas_0.GetBucketsAggregation$).build() {
    };
    var GetCardinalityCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetCardinality", {}).n("IoTClient", "GetCardinalityCommand").sc(schemas_0.GetCardinality$).build() {
    };
    var GetCommandCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetCommand", {}).n("IoTClient", "GetCommandCommand").sc(schemas_0.GetCommand$).build() {
    };
    var GetCommandExecutionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetCommandExecution", {}).n("IoTClient", "GetCommandExecutionCommand").sc(schemas_0.GetCommandExecution$).build() {
    };
    var GetEffectivePoliciesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetEffectivePolicies", {}).n("IoTClient", "GetEffectivePoliciesCommand").sc(schemas_0.GetEffectivePolicies$).build() {
    };
    var GetIndexingConfigurationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetIndexingConfiguration", {}).n("IoTClient", "GetIndexingConfigurationCommand").sc(schemas_0.GetIndexingConfiguration$).build() {
    };
    var GetJobDocumentCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetJobDocument", {}).n("IoTClient", "GetJobDocumentCommand").sc(schemas_0.GetJobDocument$).build() {
    };
    var GetLoggingOptionsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetLoggingOptions", {}).n("IoTClient", "GetLoggingOptionsCommand").sc(schemas_0.GetLoggingOptions$).build() {
    };
    var GetOTAUpdateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetOTAUpdate", {}).n("IoTClient", "GetOTAUpdateCommand").sc(schemas_0.GetOTAUpdate$).build() {
    };
    var GetPackageCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetPackage", {}).n("IoTClient", "GetPackageCommand").sc(schemas_0.GetPackage$).build() {
    };
    var GetPackageConfigurationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetPackageConfiguration", {}).n("IoTClient", "GetPackageConfigurationCommand").sc(schemas_0.GetPackageConfiguration$).build() {
    };
    var GetPackageVersionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetPackageVersion", {}).n("IoTClient", "GetPackageVersionCommand").sc(schemas_0.GetPackageVersion$).build() {
    };
    var GetPercentilesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetPercentiles", {}).n("IoTClient", "GetPercentilesCommand").sc(schemas_0.GetPercentiles$).build() {
    };
    var GetPolicyCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetPolicy", {}).n("IoTClient", "GetPolicyCommand").sc(schemas_0.GetPolicy$).build() {
    };
    var GetPolicyVersionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetPolicyVersion", {}).n("IoTClient", "GetPolicyVersionCommand").sc(schemas_0.GetPolicyVersion$).build() {
    };
    var GetRegistrationCodeCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetRegistrationCode", {}).n("IoTClient", "GetRegistrationCodeCommand").sc(schemas_0.GetRegistrationCode$).build() {
    };
    var GetStatisticsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetStatistics", {}).n("IoTClient", "GetStatisticsCommand").sc(schemas_0.GetStatistics$).build() {
    };
    var GetThingConnectivityDataCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetThingConnectivityData", {}).n("IoTClient", "GetThingConnectivityDataCommand").sc(schemas_0.GetThingConnectivityData$).build() {
    };
    var GetTopicRuleCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetTopicRule", {}).n("IoTClient", "GetTopicRuleCommand").sc(schemas_0.GetTopicRule$).build() {
    };
    var GetTopicRuleDestinationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetTopicRuleDestination", {}).n("IoTClient", "GetTopicRuleDestinationCommand").sc(schemas_0.GetTopicRuleDestination$).build() {
    };
    var GetV2LoggingOptionsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "GetV2LoggingOptions", {}).n("IoTClient", "GetV2LoggingOptionsCommand").sc(schemas_0.GetV2LoggingOptions$).build() {
    };
    var ListActiveViolationsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListActiveViolations", {}).n("IoTClient", "ListActiveViolationsCommand").sc(schemas_0.ListActiveViolations$).build() {
    };
    var ListAttachedPoliciesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListAttachedPolicies", {}).n("IoTClient", "ListAttachedPoliciesCommand").sc(schemas_0.ListAttachedPolicies$).build() {
    };
    var ListAuditFindingsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListAuditFindings", {}).n("IoTClient", "ListAuditFindingsCommand").sc(schemas_0.ListAuditFindings$).build() {
    };
    var ListAuditMitigationActionsExecutionsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListAuditMitigationActionsExecutions", {}).n("IoTClient", "ListAuditMitigationActionsExecutionsCommand").sc(schemas_0.ListAuditMitigationActionsExecutions$).build() {
    };
    var ListAuditMitigationActionsTasksCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListAuditMitigationActionsTasks", {}).n("IoTClient", "ListAuditMitigationActionsTasksCommand").sc(schemas_0.ListAuditMitigationActionsTasks$).build() {
    };
    var ListAuditSuppressionsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListAuditSuppressions", {}).n("IoTClient", "ListAuditSuppressionsCommand").sc(schemas_0.ListAuditSuppressions$).build() {
    };
    var ListAuditTasksCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListAuditTasks", {}).n("IoTClient", "ListAuditTasksCommand").sc(schemas_0.ListAuditTasks$).build() {
    };
    var ListAuthorizersCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListAuthorizers", {}).n("IoTClient", "ListAuthorizersCommand").sc(schemas_0.ListAuthorizers$).build() {
    };
    var ListBillingGroupsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListBillingGroups", {}).n("IoTClient", "ListBillingGroupsCommand").sc(schemas_0.ListBillingGroups$).build() {
    };
    var ListCACertificatesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListCACertificates", {}).n("IoTClient", "ListCACertificatesCommand").sc(schemas_0.ListCACertificates$).build() {
    };
    var ListCertificateProvidersCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListCertificateProviders", {}).n("IoTClient", "ListCertificateProvidersCommand").sc(schemas_0.ListCertificateProviders$).build() {
    };
    var ListCertificatesByCACommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListCertificatesByCA", {}).n("IoTClient", "ListCertificatesByCACommand").sc(schemas_0.ListCertificatesByCA$).build() {
    };
    var ListCertificatesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListCertificates", {}).n("IoTClient", "ListCertificatesCommand").sc(schemas_0.ListCertificates$).build() {
    };
    var ListCommandExecutionsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListCommandExecutions", {}).n("IoTClient", "ListCommandExecutionsCommand").sc(schemas_0.ListCommandExecutions$).build() {
    };
    var ListCommandsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListCommands", {}).n("IoTClient", "ListCommandsCommand").sc(schemas_0.ListCommands$).build() {
    };
    var ListCustomMetricsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListCustomMetrics", {}).n("IoTClient", "ListCustomMetricsCommand").sc(schemas_0.ListCustomMetrics$).build() {
    };
    var ListDetectMitigationActionsExecutionsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListDetectMitigationActionsExecutions", {}).n("IoTClient", "ListDetectMitigationActionsExecutionsCommand").sc(schemas_0.ListDetectMitigationActionsExecutions$).build() {
    };
    var ListDetectMitigationActionsTasksCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListDetectMitigationActionsTasks", {}).n("IoTClient", "ListDetectMitigationActionsTasksCommand").sc(schemas_0.ListDetectMitigationActionsTasks$).build() {
    };
    var ListDimensionsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListDimensions", {}).n("IoTClient", "ListDimensionsCommand").sc(schemas_0.ListDimensions$).build() {
    };
    var ListDomainConfigurationsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListDomainConfigurations", {}).n("IoTClient", "ListDomainConfigurationsCommand").sc(schemas_0.ListDomainConfigurations$).build() {
    };
    var ListFleetMetricsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListFleetMetrics", {}).n("IoTClient", "ListFleetMetricsCommand").sc(schemas_0.ListFleetMetrics$).build() {
    };
    var ListIndicesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListIndices", {}).n("IoTClient", "ListIndicesCommand").sc(schemas_0.ListIndices$).build() {
    };
    var ListJobExecutionsForJobCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListJobExecutionsForJob", {}).n("IoTClient", "ListJobExecutionsForJobCommand").sc(schemas_0.ListJobExecutionsForJob$).build() {
    };
    var ListJobExecutionsForThingCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListJobExecutionsForThing", {}).n("IoTClient", "ListJobExecutionsForThingCommand").sc(schemas_0.ListJobExecutionsForThing$).build() {
    };
    var ListJobsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListJobs", {}).n("IoTClient", "ListJobsCommand").sc(schemas_0.ListJobs$).build() {
    };
    var ListJobTemplatesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListJobTemplates", {}).n("IoTClient", "ListJobTemplatesCommand").sc(schemas_0.ListJobTemplates$).build() {
    };
    var ListManagedJobTemplatesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListManagedJobTemplates", {}).n("IoTClient", "ListManagedJobTemplatesCommand").sc(schemas_0.ListManagedJobTemplates$).build() {
    };
    var ListMetricValuesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListMetricValues", {}).n("IoTClient", "ListMetricValuesCommand").sc(schemas_0.ListMetricValues$).build() {
    };
    var ListMitigationActionsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListMitigationActions", {}).n("IoTClient", "ListMitigationActionsCommand").sc(schemas_0.ListMitigationActions$).build() {
    };
    var ListOTAUpdatesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListOTAUpdates", {}).n("IoTClient", "ListOTAUpdatesCommand").sc(schemas_0.ListOTAUpdates$).build() {
    };
    var ListOutgoingCertificatesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListOutgoingCertificates", {}).n("IoTClient", "ListOutgoingCertificatesCommand").sc(schemas_0.ListOutgoingCertificates$).build() {
    };
    var ListPackagesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListPackages", {}).n("IoTClient", "ListPackagesCommand").sc(schemas_0.ListPackages$).build() {
    };
    var ListPackageVersionsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListPackageVersions", {}).n("IoTClient", "ListPackageVersionsCommand").sc(schemas_0.ListPackageVersions$).build() {
    };
    var ListPoliciesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListPolicies", {}).n("IoTClient", "ListPoliciesCommand").sc(schemas_0.ListPolicies$).build() {
    };
    var ListPolicyPrincipalsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListPolicyPrincipals", {}).n("IoTClient", "ListPolicyPrincipalsCommand").sc(schemas_0.ListPolicyPrincipals$).build() {
    };
    var ListPolicyVersionsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListPolicyVersions", {}).n("IoTClient", "ListPolicyVersionsCommand").sc(schemas_0.ListPolicyVersions$).build() {
    };
    var ListPrincipalPoliciesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListPrincipalPolicies", {}).n("IoTClient", "ListPrincipalPoliciesCommand").sc(schemas_0.ListPrincipalPolicies$).build() {
    };
    var ListPrincipalThingsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListPrincipalThings", {}).n("IoTClient", "ListPrincipalThingsCommand").sc(schemas_0.ListPrincipalThings$).build() {
    };
    var ListPrincipalThingsV2Command = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListPrincipalThingsV2", {}).n("IoTClient", "ListPrincipalThingsV2Command").sc(schemas_0.ListPrincipalThingsV2$).build() {
    };
    var ListProvisioningTemplatesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListProvisioningTemplates", {}).n("IoTClient", "ListProvisioningTemplatesCommand").sc(schemas_0.ListProvisioningTemplates$).build() {
    };
    var ListProvisioningTemplateVersionsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListProvisioningTemplateVersions", {}).n("IoTClient", "ListProvisioningTemplateVersionsCommand").sc(schemas_0.ListProvisioningTemplateVersions$).build() {
    };
    var ListRelatedResourcesForAuditFindingCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListRelatedResourcesForAuditFinding", {}).n("IoTClient", "ListRelatedResourcesForAuditFindingCommand").sc(schemas_0.ListRelatedResourcesForAuditFinding$).build() {
    };
    var ListRoleAliasesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListRoleAliases", {}).n("IoTClient", "ListRoleAliasesCommand").sc(schemas_0.ListRoleAliases$).build() {
    };
    var ListSbomValidationResultsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListSbomValidationResults", {}).n("IoTClient", "ListSbomValidationResultsCommand").sc(schemas_0.ListSbomValidationResults$).build() {
    };
    var ListScheduledAuditsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListScheduledAudits", {}).n("IoTClient", "ListScheduledAuditsCommand").sc(schemas_0.ListScheduledAudits$).build() {
    };
    var ListSecurityProfilesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListSecurityProfiles", {}).n("IoTClient", "ListSecurityProfilesCommand").sc(schemas_0.ListSecurityProfiles$).build() {
    };
    var ListSecurityProfilesForTargetCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListSecurityProfilesForTarget", {}).n("IoTClient", "ListSecurityProfilesForTargetCommand").sc(schemas_0.ListSecurityProfilesForTarget$).build() {
    };
    var ListStreamsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListStreams", {}).n("IoTClient", "ListStreamsCommand").sc(schemas_0.ListStreams$).build() {
    };
    var ListTagsForResourceCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListTagsForResource", {}).n("IoTClient", "ListTagsForResourceCommand").sc(schemas_0.ListTagsForResource$).build() {
    };
    var ListTargetsForPolicyCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListTargetsForPolicy", {}).n("IoTClient", "ListTargetsForPolicyCommand").sc(schemas_0.ListTargetsForPolicy$).build() {
    };
    var ListTargetsForSecurityProfileCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListTargetsForSecurityProfile", {}).n("IoTClient", "ListTargetsForSecurityProfileCommand").sc(schemas_0.ListTargetsForSecurityProfile$).build() {
    };
    var ListThingGroupsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListThingGroups", {}).n("IoTClient", "ListThingGroupsCommand").sc(schemas_0.ListThingGroups$).build() {
    };
    var ListThingGroupsForThingCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListThingGroupsForThing", {}).n("IoTClient", "ListThingGroupsForThingCommand").sc(schemas_0.ListThingGroupsForThing$).build() {
    };
    var ListThingPrincipalsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListThingPrincipals", {}).n("IoTClient", "ListThingPrincipalsCommand").sc(schemas_0.ListThingPrincipals$).build() {
    };
    var ListThingPrincipalsV2Command = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListThingPrincipalsV2", {}).n("IoTClient", "ListThingPrincipalsV2Command").sc(schemas_0.ListThingPrincipalsV2$).build() {
    };
    var ListThingRegistrationTaskReportsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListThingRegistrationTaskReports", {}).n("IoTClient", "ListThingRegistrationTaskReportsCommand").sc(schemas_0.ListThingRegistrationTaskReports$).build() {
    };
    var ListThingRegistrationTasksCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListThingRegistrationTasks", {}).n("IoTClient", "ListThingRegistrationTasksCommand").sc(schemas_0.ListThingRegistrationTasks$).build() {
    };
    var ListThingsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListThings", {}).n("IoTClient", "ListThingsCommand").sc(schemas_0.ListThings$).build() {
    };
    var ListThingsInBillingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListThingsInBillingGroup", {}).n("IoTClient", "ListThingsInBillingGroupCommand").sc(schemas_0.ListThingsInBillingGroup$).build() {
    };
    var ListThingsInThingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListThingsInThingGroup", {}).n("IoTClient", "ListThingsInThingGroupCommand").sc(schemas_0.ListThingsInThingGroup$).build() {
    };
    var ListThingTypesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListThingTypes", {}).n("IoTClient", "ListThingTypesCommand").sc(schemas_0.ListThingTypes$).build() {
    };
    var ListTopicRuleDestinationsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListTopicRuleDestinations", {}).n("IoTClient", "ListTopicRuleDestinationsCommand").sc(schemas_0.ListTopicRuleDestinations$).build() {
    };
    var ListTopicRulesCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListTopicRules", {}).n("IoTClient", "ListTopicRulesCommand").sc(schemas_0.ListTopicRules$).build() {
    };
    var ListV2LoggingLevelsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListV2LoggingLevels", {}).n("IoTClient", "ListV2LoggingLevelsCommand").sc(schemas_0.ListV2LoggingLevels$).build() {
    };
    var ListViolationEventsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ListViolationEvents", {}).n("IoTClient", "ListViolationEventsCommand").sc(schemas_0.ListViolationEvents$).build() {
    };
    var PutVerificationStateOnViolationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "PutVerificationStateOnViolation", {}).n("IoTClient", "PutVerificationStateOnViolationCommand").sc(schemas_0.PutVerificationStateOnViolation$).build() {
    };
    var RegisterCACertificateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "RegisterCACertificate", {}).n("IoTClient", "RegisterCACertificateCommand").sc(schemas_0.RegisterCACertificate$).build() {
    };
    var RegisterCertificateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "RegisterCertificate", {}).n("IoTClient", "RegisterCertificateCommand").sc(schemas_0.RegisterCertificate$).build() {
    };
    var RegisterCertificateWithoutCACommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "RegisterCertificateWithoutCA", {}).n("IoTClient", "RegisterCertificateWithoutCACommand").sc(schemas_0.RegisterCertificateWithoutCA$).build() {
    };
    var RegisterThingCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "RegisterThing", {}).n("IoTClient", "RegisterThingCommand").sc(schemas_0.RegisterThing$).build() {
    };
    var RejectCertificateTransferCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "RejectCertificateTransfer", {}).n("IoTClient", "RejectCertificateTransferCommand").sc(schemas_0.RejectCertificateTransfer$).build() {
    };
    var RemoveThingFromBillingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "RemoveThingFromBillingGroup", {}).n("IoTClient", "RemoveThingFromBillingGroupCommand").sc(schemas_0.RemoveThingFromBillingGroup$).build() {
    };
    var RemoveThingFromThingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "RemoveThingFromThingGroup", {}).n("IoTClient", "RemoveThingFromThingGroupCommand").sc(schemas_0.RemoveThingFromThingGroup$).build() {
    };
    var ReplaceTopicRuleCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ReplaceTopicRule", {}).n("IoTClient", "ReplaceTopicRuleCommand").sc(schemas_0.ReplaceTopicRule$).build() {
    };
    var SearchIndexCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "SearchIndex", {}).n("IoTClient", "SearchIndexCommand").sc(schemas_0.SearchIndex$).build() {
    };
    var SetDefaultAuthorizerCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "SetDefaultAuthorizer", {}).n("IoTClient", "SetDefaultAuthorizerCommand").sc(schemas_0.SetDefaultAuthorizer$).build() {
    };
    var SetDefaultPolicyVersionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "SetDefaultPolicyVersion", {}).n("IoTClient", "SetDefaultPolicyVersionCommand").sc(schemas_0.SetDefaultPolicyVersion$).build() {
    };
    var SetLoggingOptionsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "SetLoggingOptions", {}).n("IoTClient", "SetLoggingOptionsCommand").sc(schemas_0.SetLoggingOptions$).build() {
    };
    var SetV2LoggingLevelCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "SetV2LoggingLevel", {}).n("IoTClient", "SetV2LoggingLevelCommand").sc(schemas_0.SetV2LoggingLevel$).build() {
    };
    var SetV2LoggingOptionsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "SetV2LoggingOptions", {}).n("IoTClient", "SetV2LoggingOptionsCommand").sc(schemas_0.SetV2LoggingOptions$).build() {
    };
    var StartAuditMitigationActionsTaskCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "StartAuditMitigationActionsTask", {}).n("IoTClient", "StartAuditMitigationActionsTaskCommand").sc(schemas_0.StartAuditMitigationActionsTask$).build() {
    };
    var StartDetectMitigationActionsTaskCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "StartDetectMitigationActionsTask", {}).n("IoTClient", "StartDetectMitigationActionsTaskCommand").sc(schemas_0.StartDetectMitigationActionsTask$).build() {
    };
    var StartOnDemandAuditTaskCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "StartOnDemandAuditTask", {}).n("IoTClient", "StartOnDemandAuditTaskCommand").sc(schemas_0.StartOnDemandAuditTask$).build() {
    };
    var StartThingRegistrationTaskCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "StartThingRegistrationTask", {}).n("IoTClient", "StartThingRegistrationTaskCommand").sc(schemas_0.StartThingRegistrationTask$).build() {
    };
    var StopThingRegistrationTaskCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "StopThingRegistrationTask", {}).n("IoTClient", "StopThingRegistrationTaskCommand").sc(schemas_0.StopThingRegistrationTask$).build() {
    };
    var TagResourceCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "TagResource", {}).n("IoTClient", "TagResourceCommand").sc(schemas_0.TagResource$).build() {
    };
    var TestAuthorizationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "TestAuthorization", {}).n("IoTClient", "TestAuthorizationCommand").sc(schemas_0.TestAuthorization$).build() {
    };
    var TestInvokeAuthorizerCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "TestInvokeAuthorizer", {}).n("IoTClient", "TestInvokeAuthorizerCommand").sc(schemas_0.TestInvokeAuthorizer$).build() {
    };
    var TransferCertificateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "TransferCertificate", {}).n("IoTClient", "TransferCertificateCommand").sc(schemas_0.TransferCertificate$).build() {
    };
    var UntagResourceCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UntagResource", {}).n("IoTClient", "UntagResourceCommand").sc(schemas_0.UntagResource$).build() {
    };
    var UpdateAccountAuditConfigurationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateAccountAuditConfiguration", {}).n("IoTClient", "UpdateAccountAuditConfigurationCommand").sc(schemas_0.UpdateAccountAuditConfiguration$).build() {
    };
    var UpdateAuditSuppressionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateAuditSuppression", {}).n("IoTClient", "UpdateAuditSuppressionCommand").sc(schemas_0.UpdateAuditSuppression$).build() {
    };
    var UpdateAuthorizerCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateAuthorizer", {}).n("IoTClient", "UpdateAuthorizerCommand").sc(schemas_0.UpdateAuthorizer$).build() {
    };
    var UpdateBillingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateBillingGroup", {}).n("IoTClient", "UpdateBillingGroupCommand").sc(schemas_0.UpdateBillingGroup$).build() {
    };
    var UpdateCACertificateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateCACertificate", {}).n("IoTClient", "UpdateCACertificateCommand").sc(schemas_0.UpdateCACertificate$).build() {
    };
    var UpdateCertificateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateCertificate", {}).n("IoTClient", "UpdateCertificateCommand").sc(schemas_0.UpdateCertificate$).build() {
    };
    var UpdateCertificateProviderCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateCertificateProvider", {}).n("IoTClient", "UpdateCertificateProviderCommand").sc(schemas_0.UpdateCertificateProvider$).build() {
    };
    var UpdateCommandCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateCommand", {}).n("IoTClient", "UpdateCommandCommand").sc(schemas_0.UpdateCommand$).build() {
    };
    var UpdateCustomMetricCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateCustomMetric", {}).n("IoTClient", "UpdateCustomMetricCommand").sc(schemas_0.UpdateCustomMetric$).build() {
    };
    var UpdateDimensionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateDimension", {}).n("IoTClient", "UpdateDimensionCommand").sc(schemas_0.UpdateDimension$).build() {
    };
    var UpdateDomainConfigurationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateDomainConfiguration", {}).n("IoTClient", "UpdateDomainConfigurationCommand").sc(schemas_0.UpdateDomainConfiguration$).build() {
    };
    var UpdateDynamicThingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateDynamicThingGroup", {}).n("IoTClient", "UpdateDynamicThingGroupCommand").sc(schemas_0.UpdateDynamicThingGroup$).build() {
    };
    var UpdateEncryptionConfigurationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateEncryptionConfiguration", {}).n("IoTClient", "UpdateEncryptionConfigurationCommand").sc(schemas_0.UpdateEncryptionConfiguration$).build() {
    };
    var UpdateEventConfigurationsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateEventConfigurations", {}).n("IoTClient", "UpdateEventConfigurationsCommand").sc(schemas_0.UpdateEventConfigurations$).build() {
    };
    var UpdateFleetMetricCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateFleetMetric", {}).n("IoTClient", "UpdateFleetMetricCommand").sc(schemas_0.UpdateFleetMetric$).build() {
    };
    var UpdateIndexingConfigurationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateIndexingConfiguration", {}).n("IoTClient", "UpdateIndexingConfigurationCommand").sc(schemas_0.UpdateIndexingConfiguration$).build() {
    };
    var UpdateJobCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateJob", {}).n("IoTClient", "UpdateJobCommand").sc(schemas_0.UpdateJob$).build() {
    };
    var UpdateMitigationActionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateMitigationAction", {}).n("IoTClient", "UpdateMitigationActionCommand").sc(schemas_0.UpdateMitigationAction$).build() {
    };
    var UpdatePackageCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdatePackage", {}).n("IoTClient", "UpdatePackageCommand").sc(schemas_0.UpdatePackage$).build() {
    };
    var UpdatePackageConfigurationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdatePackageConfiguration", {}).n("IoTClient", "UpdatePackageConfigurationCommand").sc(schemas_0.UpdatePackageConfiguration$).build() {
    };
    var UpdatePackageVersionCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdatePackageVersion", {}).n("IoTClient", "UpdatePackageVersionCommand").sc(schemas_0.UpdatePackageVersion$).build() {
    };
    var UpdateProvisioningTemplateCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateProvisioningTemplate", {}).n("IoTClient", "UpdateProvisioningTemplateCommand").sc(schemas_0.UpdateProvisioningTemplate$).build() {
    };
    var UpdateRoleAliasCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateRoleAlias", {}).n("IoTClient", "UpdateRoleAliasCommand").sc(schemas_0.UpdateRoleAlias$).build() {
    };
    var UpdateScheduledAuditCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateScheduledAudit", {}).n("IoTClient", "UpdateScheduledAuditCommand").sc(schemas_0.UpdateScheduledAudit$).build() {
    };
    var UpdateSecurityProfileCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateSecurityProfile", {}).n("IoTClient", "UpdateSecurityProfileCommand").sc(schemas_0.UpdateSecurityProfile$).build() {
    };
    var UpdateStreamCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateStream", {}).n("IoTClient", "UpdateStreamCommand").sc(schemas_0.UpdateStream$).build() {
    };
    var UpdateThingCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateThing", {}).n("IoTClient", "UpdateThingCommand").sc(schemas_0.UpdateThing$).build() {
    };
    var UpdateThingGroupCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateThingGroup", {}).n("IoTClient", "UpdateThingGroupCommand").sc(schemas_0.UpdateThingGroup$).build() {
    };
    var UpdateThingGroupsForThingCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateThingGroupsForThing", {}).n("IoTClient", "UpdateThingGroupsForThingCommand").sc(schemas_0.UpdateThingGroupsForThing$).build() {
    };
    var UpdateThingTypeCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateThingType", {}).n("IoTClient", "UpdateThingTypeCommand").sc(schemas_0.UpdateThingType$).build() {
    };
    var UpdateTopicRuleDestinationCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "UpdateTopicRuleDestination", {}).n("IoTClient", "UpdateTopicRuleDestinationCommand").sc(schemas_0.UpdateTopicRuleDestination$).build() {
    };
    var ValidateSecurityProfileBehaviorsCommand = class extends smithyClient.Command.classBuilder().ep(commonParams5).m(function(Command, cs, config, o2) {
      return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
    }).s("AWSIotService", "ValidateSecurityProfileBehaviors", {}).n("IoTClient", "ValidateSecurityProfileBehaviorsCommand").sc(schemas_0.ValidateSecurityProfileBehaviors$).build() {
    };
    var paginateGetBehaviorModelTrainingSummaries = core.createPaginator(IoTClient2, GetBehaviorModelTrainingSummariesCommand, "nextToken", "nextToken", "maxResults");
    var paginateListActiveViolations = core.createPaginator(IoTClient2, ListActiveViolationsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListAttachedPolicies = core.createPaginator(IoTClient2, ListAttachedPoliciesCommand, "marker", "nextMarker", "pageSize");
    var paginateListAuditFindings = core.createPaginator(IoTClient2, ListAuditFindingsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListAuditMitigationActionsExecutions = core.createPaginator(IoTClient2, ListAuditMitigationActionsExecutionsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListAuditMitigationActionsTasks = core.createPaginator(IoTClient2, ListAuditMitigationActionsTasksCommand, "nextToken", "nextToken", "maxResults");
    var paginateListAuditSuppressions = core.createPaginator(IoTClient2, ListAuditSuppressionsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListAuditTasks = core.createPaginator(IoTClient2, ListAuditTasksCommand, "nextToken", "nextToken", "maxResults");
    var paginateListAuthorizers = core.createPaginator(IoTClient2, ListAuthorizersCommand, "marker", "nextMarker", "pageSize");
    var paginateListBillingGroups = core.createPaginator(IoTClient2, ListBillingGroupsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListCACertificates = core.createPaginator(IoTClient2, ListCACertificatesCommand, "marker", "nextMarker", "pageSize");
    var paginateListCertificatesByCA = core.createPaginator(IoTClient2, ListCertificatesByCACommand, "marker", "nextMarker", "pageSize");
    var paginateListCertificates = core.createPaginator(IoTClient2, ListCertificatesCommand, "marker", "nextMarker", "pageSize");
    var paginateListCommandExecutions = core.createPaginator(IoTClient2, ListCommandExecutionsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListCommands = core.createPaginator(IoTClient2, ListCommandsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListCustomMetrics = core.createPaginator(IoTClient2, ListCustomMetricsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListDetectMitigationActionsExecutions = core.createPaginator(IoTClient2, ListDetectMitigationActionsExecutionsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListDetectMitigationActionsTasks = core.createPaginator(IoTClient2, ListDetectMitigationActionsTasksCommand, "nextToken", "nextToken", "maxResults");
    var paginateListDimensions = core.createPaginator(IoTClient2, ListDimensionsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListDomainConfigurations = core.createPaginator(IoTClient2, ListDomainConfigurationsCommand, "marker", "nextMarker", "pageSize");
    var paginateListFleetMetrics = core.createPaginator(IoTClient2, ListFleetMetricsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListIndices = core.createPaginator(IoTClient2, ListIndicesCommand, "nextToken", "nextToken", "maxResults");
    var paginateListJobExecutionsForJob = core.createPaginator(IoTClient2, ListJobExecutionsForJobCommand, "nextToken", "nextToken", "maxResults");
    var paginateListJobExecutionsForThing = core.createPaginator(IoTClient2, ListJobExecutionsForThingCommand, "nextToken", "nextToken", "maxResults");
    var paginateListJobs = core.createPaginator(IoTClient2, ListJobsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListJobTemplates = core.createPaginator(IoTClient2, ListJobTemplatesCommand, "nextToken", "nextToken", "maxResults");
    var paginateListManagedJobTemplates = core.createPaginator(IoTClient2, ListManagedJobTemplatesCommand, "nextToken", "nextToken", "maxResults");
    var paginateListMetricValues = core.createPaginator(IoTClient2, ListMetricValuesCommand, "nextToken", "nextToken", "maxResults");
    var paginateListMitigationActions = core.createPaginator(IoTClient2, ListMitigationActionsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListOTAUpdates = core.createPaginator(IoTClient2, ListOTAUpdatesCommand, "nextToken", "nextToken", "maxResults");
    var paginateListOutgoingCertificates = core.createPaginator(IoTClient2, ListOutgoingCertificatesCommand, "marker", "nextMarker", "pageSize");
    var paginateListPackages = core.createPaginator(IoTClient2, ListPackagesCommand, "nextToken", "nextToken", "maxResults");
    var paginateListPackageVersions = core.createPaginator(IoTClient2, ListPackageVersionsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListPolicies = core.createPaginator(IoTClient2, ListPoliciesCommand, "marker", "nextMarker", "pageSize");
    var paginateListPolicyPrincipals = core.createPaginator(IoTClient2, ListPolicyPrincipalsCommand, "marker", "nextMarker", "pageSize");
    var paginateListPrincipalPolicies = core.createPaginator(IoTClient2, ListPrincipalPoliciesCommand, "marker", "nextMarker", "pageSize");
    var paginateListPrincipalThings = core.createPaginator(IoTClient2, ListPrincipalThingsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListPrincipalThingsV2 = core.createPaginator(IoTClient2, ListPrincipalThingsV2Command, "nextToken", "nextToken", "maxResults");
    var paginateListProvisioningTemplates = core.createPaginator(IoTClient2, ListProvisioningTemplatesCommand, "nextToken", "nextToken", "maxResults");
    var paginateListProvisioningTemplateVersions = core.createPaginator(IoTClient2, ListProvisioningTemplateVersionsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListRelatedResourcesForAuditFinding = core.createPaginator(IoTClient2, ListRelatedResourcesForAuditFindingCommand, "nextToken", "nextToken", "maxResults");
    var paginateListRoleAliases = core.createPaginator(IoTClient2, ListRoleAliasesCommand, "marker", "nextMarker", "pageSize");
    var paginateListSbomValidationResults = core.createPaginator(IoTClient2, ListSbomValidationResultsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListScheduledAudits = core.createPaginator(IoTClient2, ListScheduledAuditsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListSecurityProfilesForTarget = core.createPaginator(IoTClient2, ListSecurityProfilesForTargetCommand, "nextToken", "nextToken", "maxResults");
    var paginateListSecurityProfiles = core.createPaginator(IoTClient2, ListSecurityProfilesCommand, "nextToken", "nextToken", "maxResults");
    var paginateListStreams = core.createPaginator(IoTClient2, ListStreamsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListTagsForResource = core.createPaginator(IoTClient2, ListTagsForResourceCommand, "nextToken", "nextToken", "");
    var paginateListTargetsForPolicy = core.createPaginator(IoTClient2, ListTargetsForPolicyCommand, "marker", "nextMarker", "pageSize");
    var paginateListTargetsForSecurityProfile = core.createPaginator(IoTClient2, ListTargetsForSecurityProfileCommand, "nextToken", "nextToken", "maxResults");
    var paginateListThingGroupsForThing = core.createPaginator(IoTClient2, ListThingGroupsForThingCommand, "nextToken", "nextToken", "maxResults");
    var paginateListThingGroups = core.createPaginator(IoTClient2, ListThingGroupsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListThingPrincipals = core.createPaginator(IoTClient2, ListThingPrincipalsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListThingPrincipalsV2 = core.createPaginator(IoTClient2, ListThingPrincipalsV2Command, "nextToken", "nextToken", "maxResults");
    var paginateListThingRegistrationTaskReports = core.createPaginator(IoTClient2, ListThingRegistrationTaskReportsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListThingRegistrationTasks = core.createPaginator(IoTClient2, ListThingRegistrationTasksCommand, "nextToken", "nextToken", "maxResults");
    var paginateListThingsInBillingGroup = core.createPaginator(IoTClient2, ListThingsInBillingGroupCommand, "nextToken", "nextToken", "maxResults");
    var paginateListThingsInThingGroup = core.createPaginator(IoTClient2, ListThingsInThingGroupCommand, "nextToken", "nextToken", "maxResults");
    var paginateListThings = core.createPaginator(IoTClient2, ListThingsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListThingTypes = core.createPaginator(IoTClient2, ListThingTypesCommand, "nextToken", "nextToken", "maxResults");
    var paginateListTopicRuleDestinations = core.createPaginator(IoTClient2, ListTopicRuleDestinationsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListTopicRules = core.createPaginator(IoTClient2, ListTopicRulesCommand, "nextToken", "nextToken", "maxResults");
    var paginateListV2LoggingLevels = core.createPaginator(IoTClient2, ListV2LoggingLevelsCommand, "nextToken", "nextToken", "maxResults");
    var paginateListViolationEvents = core.createPaginator(IoTClient2, ListViolationEventsCommand, "nextToken", "nextToken", "maxResults");
    var commands5 = {
      AcceptCertificateTransferCommand,
      AddThingToBillingGroupCommand,
      AddThingToThingGroupCommand,
      AssociateSbomWithPackageVersionCommand,
      AssociateTargetsWithJobCommand,
      AttachPolicyCommand,
      AttachPrincipalPolicyCommand,
      AttachSecurityProfileCommand,
      AttachThingPrincipalCommand,
      CancelAuditMitigationActionsTaskCommand,
      CancelAuditTaskCommand,
      CancelCertificateTransferCommand,
      CancelDetectMitigationActionsTaskCommand,
      CancelJobCommand,
      CancelJobExecutionCommand,
      ClearDefaultAuthorizerCommand,
      ConfirmTopicRuleDestinationCommand,
      CreateAuditSuppressionCommand,
      CreateAuthorizerCommand,
      CreateBillingGroupCommand,
      CreateCertificateFromCsrCommand,
      CreateCertificateProviderCommand,
      CreateCommandCommand,
      CreateCustomMetricCommand,
      CreateDimensionCommand,
      CreateDomainConfigurationCommand,
      CreateDynamicThingGroupCommand,
      CreateFleetMetricCommand,
      CreateJobCommand,
      CreateJobTemplateCommand,
      CreateKeysAndCertificateCommand,
      CreateMitigationActionCommand,
      CreateOTAUpdateCommand,
      CreatePackageCommand,
      CreatePackageVersionCommand,
      CreatePolicyCommand,
      CreatePolicyVersionCommand,
      CreateProvisioningClaimCommand,
      CreateProvisioningTemplateCommand,
      CreateProvisioningTemplateVersionCommand,
      CreateRoleAliasCommand,
      CreateScheduledAuditCommand,
      CreateSecurityProfileCommand,
      CreateStreamCommand,
      CreateThingCommand,
      CreateThingGroupCommand,
      CreateThingTypeCommand,
      CreateTopicRuleCommand,
      CreateTopicRuleDestinationCommand,
      DeleteAccountAuditConfigurationCommand,
      DeleteAuditSuppressionCommand,
      DeleteAuthorizerCommand,
      DeleteBillingGroupCommand,
      DeleteCACertificateCommand,
      DeleteCertificateCommand,
      DeleteCertificateProviderCommand,
      DeleteCommandCommand,
      DeleteCommandExecutionCommand,
      DeleteCustomMetricCommand,
      DeleteDimensionCommand,
      DeleteDomainConfigurationCommand,
      DeleteDynamicThingGroupCommand,
      DeleteFleetMetricCommand,
      DeleteJobCommand,
      DeleteJobExecutionCommand,
      DeleteJobTemplateCommand,
      DeleteMitigationActionCommand,
      DeleteOTAUpdateCommand,
      DeletePackageCommand,
      DeletePackageVersionCommand,
      DeletePolicyCommand,
      DeletePolicyVersionCommand,
      DeleteProvisioningTemplateCommand,
      DeleteProvisioningTemplateVersionCommand,
      DeleteRegistrationCodeCommand,
      DeleteRoleAliasCommand,
      DeleteScheduledAuditCommand,
      DeleteSecurityProfileCommand,
      DeleteStreamCommand,
      DeleteThingCommand,
      DeleteThingGroupCommand,
      DeleteThingTypeCommand,
      DeleteTopicRuleCommand,
      DeleteTopicRuleDestinationCommand,
      DeleteV2LoggingLevelCommand,
      DeprecateThingTypeCommand,
      DescribeAccountAuditConfigurationCommand,
      DescribeAuditFindingCommand,
      DescribeAuditMitigationActionsTaskCommand,
      DescribeAuditSuppressionCommand,
      DescribeAuditTaskCommand,
      DescribeAuthorizerCommand,
      DescribeBillingGroupCommand,
      DescribeCACertificateCommand,
      DescribeCertificateCommand,
      DescribeCertificateProviderCommand,
      DescribeCustomMetricCommand,
      DescribeDefaultAuthorizerCommand,
      DescribeDetectMitigationActionsTaskCommand,
      DescribeDimensionCommand,
      DescribeDomainConfigurationCommand,
      DescribeEncryptionConfigurationCommand,
      DescribeEndpointCommand: DescribeEndpointCommand2,
      DescribeEventConfigurationsCommand,
      DescribeFleetMetricCommand,
      DescribeIndexCommand,
      DescribeJobCommand,
      DescribeJobExecutionCommand,
      DescribeJobTemplateCommand,
      DescribeManagedJobTemplateCommand,
      DescribeMitigationActionCommand,
      DescribeProvisioningTemplateCommand,
      DescribeProvisioningTemplateVersionCommand,
      DescribeRoleAliasCommand,
      DescribeScheduledAuditCommand,
      DescribeSecurityProfileCommand,
      DescribeStreamCommand,
      DescribeThingCommand,
      DescribeThingGroupCommand,
      DescribeThingRegistrationTaskCommand,
      DescribeThingTypeCommand,
      DetachPolicyCommand,
      DetachPrincipalPolicyCommand,
      DetachSecurityProfileCommand,
      DetachThingPrincipalCommand,
      DisableTopicRuleCommand,
      DisassociateSbomFromPackageVersionCommand,
      EnableTopicRuleCommand,
      GetBehaviorModelTrainingSummariesCommand,
      GetBucketsAggregationCommand,
      GetCardinalityCommand,
      GetCommandCommand,
      GetCommandExecutionCommand,
      GetEffectivePoliciesCommand,
      GetIndexingConfigurationCommand,
      GetJobDocumentCommand,
      GetLoggingOptionsCommand,
      GetOTAUpdateCommand,
      GetPackageCommand,
      GetPackageConfigurationCommand,
      GetPackageVersionCommand,
      GetPercentilesCommand,
      GetPolicyCommand,
      GetPolicyVersionCommand,
      GetRegistrationCodeCommand,
      GetStatisticsCommand,
      GetThingConnectivityDataCommand,
      GetTopicRuleCommand,
      GetTopicRuleDestinationCommand,
      GetV2LoggingOptionsCommand,
      ListActiveViolationsCommand,
      ListAttachedPoliciesCommand,
      ListAuditFindingsCommand,
      ListAuditMitigationActionsExecutionsCommand,
      ListAuditMitigationActionsTasksCommand,
      ListAuditSuppressionsCommand,
      ListAuditTasksCommand,
      ListAuthorizersCommand,
      ListBillingGroupsCommand,
      ListCACertificatesCommand,
      ListCertificateProvidersCommand,
      ListCertificatesCommand,
      ListCertificatesByCACommand,
      ListCommandExecutionsCommand,
      ListCommandsCommand,
      ListCustomMetricsCommand,
      ListDetectMitigationActionsExecutionsCommand,
      ListDetectMitigationActionsTasksCommand,
      ListDimensionsCommand,
      ListDomainConfigurationsCommand,
      ListFleetMetricsCommand,
      ListIndicesCommand,
      ListJobExecutionsForJobCommand,
      ListJobExecutionsForThingCommand,
      ListJobsCommand,
      ListJobTemplatesCommand,
      ListManagedJobTemplatesCommand,
      ListMetricValuesCommand,
      ListMitigationActionsCommand,
      ListOTAUpdatesCommand,
      ListOutgoingCertificatesCommand,
      ListPackagesCommand,
      ListPackageVersionsCommand,
      ListPoliciesCommand,
      ListPolicyPrincipalsCommand,
      ListPolicyVersionsCommand,
      ListPrincipalPoliciesCommand,
      ListPrincipalThingsCommand,
      ListPrincipalThingsV2Command,
      ListProvisioningTemplatesCommand,
      ListProvisioningTemplateVersionsCommand,
      ListRelatedResourcesForAuditFindingCommand,
      ListRoleAliasesCommand,
      ListSbomValidationResultsCommand,
      ListScheduledAuditsCommand,
      ListSecurityProfilesCommand,
      ListSecurityProfilesForTargetCommand,
      ListStreamsCommand,
      ListTagsForResourceCommand,
      ListTargetsForPolicyCommand,
      ListTargetsForSecurityProfileCommand,
      ListThingGroupsCommand,
      ListThingGroupsForThingCommand,
      ListThingPrincipalsCommand,
      ListThingPrincipalsV2Command,
      ListThingRegistrationTaskReportsCommand,
      ListThingRegistrationTasksCommand,
      ListThingsCommand,
      ListThingsInBillingGroupCommand,
      ListThingsInThingGroupCommand,
      ListThingTypesCommand,
      ListTopicRuleDestinationsCommand,
      ListTopicRulesCommand,
      ListV2LoggingLevelsCommand,
      ListViolationEventsCommand,
      PutVerificationStateOnViolationCommand,
      RegisterCACertificateCommand,
      RegisterCertificateCommand,
      RegisterCertificateWithoutCACommand,
      RegisterThingCommand,
      RejectCertificateTransferCommand,
      RemoveThingFromBillingGroupCommand,
      RemoveThingFromThingGroupCommand,
      ReplaceTopicRuleCommand,
      SearchIndexCommand,
      SetDefaultAuthorizerCommand,
      SetDefaultPolicyVersionCommand,
      SetLoggingOptionsCommand,
      SetV2LoggingLevelCommand,
      SetV2LoggingOptionsCommand,
      StartAuditMitigationActionsTaskCommand,
      StartDetectMitigationActionsTaskCommand,
      StartOnDemandAuditTaskCommand,
      StartThingRegistrationTaskCommand,
      StopThingRegistrationTaskCommand,
      TagResourceCommand,
      TestAuthorizationCommand,
      TestInvokeAuthorizerCommand,
      TransferCertificateCommand,
      UntagResourceCommand,
      UpdateAccountAuditConfigurationCommand,
      UpdateAuditSuppressionCommand,
      UpdateAuthorizerCommand,
      UpdateBillingGroupCommand,
      UpdateCACertificateCommand,
      UpdateCertificateCommand,
      UpdateCertificateProviderCommand,
      UpdateCommandCommand,
      UpdateCustomMetricCommand,
      UpdateDimensionCommand,
      UpdateDomainConfigurationCommand,
      UpdateDynamicThingGroupCommand,
      UpdateEncryptionConfigurationCommand,
      UpdateEventConfigurationsCommand,
      UpdateFleetMetricCommand,
      UpdateIndexingConfigurationCommand,
      UpdateJobCommand,
      UpdateMitigationActionCommand,
      UpdatePackageCommand,
      UpdatePackageConfigurationCommand,
      UpdatePackageVersionCommand,
      UpdateProvisioningTemplateCommand,
      UpdateRoleAliasCommand,
      UpdateScheduledAuditCommand,
      UpdateSecurityProfileCommand,
      UpdateStreamCommand,
      UpdateThingCommand,
      UpdateThingGroupCommand,
      UpdateThingGroupsForThingCommand,
      UpdateThingTypeCommand,
      UpdateTopicRuleDestinationCommand,
      ValidateSecurityProfileBehaviorsCommand
    };
    var paginators = {
      paginateGetBehaviorModelTrainingSummaries,
      paginateListActiveViolations,
      paginateListAttachedPolicies,
      paginateListAuditFindings,
      paginateListAuditMitigationActionsExecutions,
      paginateListAuditMitigationActionsTasks,
      paginateListAuditSuppressions,
      paginateListAuditTasks,
      paginateListAuthorizers,
      paginateListBillingGroups,
      paginateListCACertificates,
      paginateListCertificates,
      paginateListCertificatesByCA,
      paginateListCommandExecutions,
      paginateListCommands,
      paginateListCustomMetrics,
      paginateListDetectMitigationActionsExecutions,
      paginateListDetectMitigationActionsTasks,
      paginateListDimensions,
      paginateListDomainConfigurations,
      paginateListFleetMetrics,
      paginateListIndices,
      paginateListJobExecutionsForJob,
      paginateListJobExecutionsForThing,
      paginateListJobs,
      paginateListJobTemplates,
      paginateListManagedJobTemplates,
      paginateListMetricValues,
      paginateListMitigationActions,
      paginateListOTAUpdates,
      paginateListOutgoingCertificates,
      paginateListPackages,
      paginateListPackageVersions,
      paginateListPolicies,
      paginateListPolicyPrincipals,
      paginateListPrincipalPolicies,
      paginateListPrincipalThings,
      paginateListPrincipalThingsV2,
      paginateListProvisioningTemplates,
      paginateListProvisioningTemplateVersions,
      paginateListRelatedResourcesForAuditFinding,
      paginateListRoleAliases,
      paginateListSbomValidationResults,
      paginateListScheduledAudits,
      paginateListSecurityProfiles,
      paginateListSecurityProfilesForTarget,
      paginateListStreams,
      paginateListTagsForResource,
      paginateListTargetsForPolicy,
      paginateListTargetsForSecurityProfile,
      paginateListThingGroups,
      paginateListThingGroupsForThing,
      paginateListThingPrincipals,
      paginateListThingPrincipalsV2,
      paginateListThingRegistrationTaskReports,
      paginateListThingRegistrationTasks,
      paginateListThings,
      paginateListThingsInBillingGroup,
      paginateListThingsInThingGroup,
      paginateListThingTypes,
      paginateListTopicRuleDestinations,
      paginateListTopicRules,
      paginateListV2LoggingLevels,
      paginateListViolationEvents
    };
    var IoT = class extends IoTClient2 {
    };
    smithyClient.createAggregatedClient(commands5, IoT, { paginators });
    var AbortAction = {
      CANCEL: "CANCEL"
    };
    var JobExecutionFailureType = {
      ALL: "ALL",
      FAILED: "FAILED",
      REJECTED: "REJECTED",
      TIMED_OUT: "TIMED_OUT"
    };
    var DynamoKeyType = {
      NUMBER: "NUMBER",
      STRING: "STRING"
    };
    var CannedAccessControlList = {
      AuthenticatedRead: "authenticated-read",
      AwsExecRead: "aws-exec-read",
      BucketOwnerFullControl: "bucket-owner-full-control",
      BucketOwnerRead: "bucket-owner-read",
      LogDeliveryWrite: "log-delivery-write",
      Private: "private",
      PublicRead: "public-read",
      PublicReadWrite: "public-read-write"
    };
    var MessageFormat = {
      JSON: "JSON",
      RAW: "RAW"
    };
    var ActionType = {
      CONNECT: "CONNECT",
      PUBLISH: "PUBLISH",
      RECEIVE: "RECEIVE",
      SUBSCRIBE: "SUBSCRIBE"
    };
    var ComparisonOperator = {
      GREATER_THAN: "greater-than",
      GREATER_THAN_EQUALS: "greater-than-equals",
      IN_CIDR_SET: "in-cidr-set",
      IN_PORT_SET: "in-port-set",
      IN_SET: "in-set",
      LESS_THAN: "less-than",
      LESS_THAN_EQUALS: "less-than-equals",
      NOT_IN_CIDR_SET: "not-in-cidr-set",
      NOT_IN_PORT_SET: "not-in-port-set",
      NOT_IN_SET: "not-in-set"
    };
    var ConfidenceLevel = {
      HIGH: "HIGH",
      LOW: "LOW",
      MEDIUM: "MEDIUM"
    };
    var DimensionValueOperator = {
      IN: "IN",
      NOT_IN: "NOT_IN"
    };
    var VerificationState = {
      BENIGN_POSITIVE: "BENIGN_POSITIVE",
      FALSE_POSITIVE: "FALSE_POSITIVE",
      TRUE_POSITIVE: "TRUE_POSITIVE",
      UNKNOWN: "UNKNOWN"
    };
    var AggregationTypeName = {
      CARDINALITY: "Cardinality",
      PERCENTILES: "Percentiles",
      STATISTICS: "Statistics"
    };
    var AlertTargetType = {
      SNS: "SNS"
    };
    var ApplicationProtocol = {
      DEFAULT: "DEFAULT",
      HTTPS: "HTTPS",
      MQTT_WSS: "MQTT_WSS",
      SECURE_MQTT: "SECURE_MQTT"
    };
    var SbomValidationStatus = {
      FAILED: "FAILED",
      IN_PROGRESS: "IN_PROGRESS",
      SUCCEEDED: "SUCCEEDED"
    };
    var ThingPrincipalType = {
      EXCLUSIVE_THING: "EXCLUSIVE_THING",
      NON_EXCLUSIVE_THING: "NON_EXCLUSIVE_THING"
    };
    var ConfigName = {
      CERT_AGE_THRESHOLD_IN_DAYS: "CERT_AGE_THRESHOLD_IN_DAYS",
      CERT_EXPIRATION_THRESHOLD_IN_DAYS: "CERT_EXPIRATION_THRESHOLD_IN_DAYS"
    };
    var AuditCheckRunStatus = {
      CANCELED: "CANCELED",
      COMPLETED_COMPLIANT: "COMPLETED_COMPLIANT",
      COMPLETED_NON_COMPLIANT: "COMPLETED_NON_COMPLIANT",
      FAILED: "FAILED",
      IN_PROGRESS: "IN_PROGRESS",
      WAITING_FOR_DATA_COLLECTION: "WAITING_FOR_DATA_COLLECTION"
    };
    var ResourceType = {
      ACCOUNT_SETTINGS: "ACCOUNT_SETTINGS",
      CA_CERTIFICATE: "CA_CERTIFICATE",
      CLIENT_ID: "CLIENT_ID",
      COGNITO_IDENTITY_POOL: "COGNITO_IDENTITY_POOL",
      DEVICE_CERTIFICATE: "DEVICE_CERTIFICATE",
      IAM_ROLE: "IAM_ROLE",
      IOT_POLICY: "IOT_POLICY",
      ISSUER_CERTIFICATE: "ISSUER_CERTIFICATE",
      ROLE_ALIAS: "ROLE_ALIAS"
    };
    var AuditFindingSeverity = {
      CRITICAL: "CRITICAL",
      HIGH: "HIGH",
      LOW: "LOW",
      MEDIUM: "MEDIUM"
    };
    var AuditFrequency = {
      BIWEEKLY: "BIWEEKLY",
      DAILY: "DAILY",
      MONTHLY: "MONTHLY",
      WEEKLY: "WEEKLY"
    };
    var AuditMitigationActionsExecutionStatus = {
      CANCELED: "CANCELED",
      COMPLETED: "COMPLETED",
      FAILED: "FAILED",
      IN_PROGRESS: "IN_PROGRESS",
      PENDING: "PENDING",
      SKIPPED: "SKIPPED"
    };
    var AuditMitigationActionsTaskStatus = {
      CANCELED: "CANCELED",
      COMPLETED: "COMPLETED",
      FAILED: "FAILED",
      IN_PROGRESS: "IN_PROGRESS"
    };
    var AuditNotificationType = {
      SNS: "SNS"
    };
    var AuditTaskStatus = {
      CANCELED: "CANCELED",
      COMPLETED: "COMPLETED",
      FAILED: "FAILED",
      IN_PROGRESS: "IN_PROGRESS"
    };
    var AuditTaskType = {
      ON_DEMAND_AUDIT_TASK: "ON_DEMAND_AUDIT_TASK",
      SCHEDULED_AUDIT_TASK: "SCHEDULED_AUDIT_TASK"
    };
    var AuthDecision = {
      ALLOWED: "ALLOWED",
      EXPLICIT_DENY: "EXPLICIT_DENY",
      IMPLICIT_DENY: "IMPLICIT_DENY"
    };
    var AuthenticationType = {
      AWS_SIGV4: "AWS_SIGV4",
      AWS_X509: "AWS_X509",
      CUSTOM_AUTH: "CUSTOM_AUTH",
      CUSTOM_AUTH_X509: "CUSTOM_AUTH_X509",
      DEFAULT: "DEFAULT"
    };
    var AuthorizerStatus = {
      ACTIVE: "ACTIVE",
      INACTIVE: "INACTIVE"
    };
    var AutoRegistrationStatus = {
      DISABLE: "DISABLE",
      ENABLE: "ENABLE"
    };
    var CertificateProviderOperation = {
      CreateCertificateFromCsr: "CreateCertificateFromCsr"
    };
    var CommandParameterType = {
      BINARY: "BINARY",
      BOOLEAN: "BOOLEAN",
      DOUBLE: "DOUBLE",
      INTEGER: "INTEGER",
      LONG: "LONG",
      STRING: "STRING",
      UNSIGNEDLONG: "UNSIGNEDLONG"
    };
    var CommandParameterValueComparisonOperator = {
      EQUALS: "EQUALS",
      GREATER_THAN: "GREATER_THAN",
      GREATER_THAN_EQUALS: "GREATER_THAN_EQUALS",
      IN_RANGE: "IN_RANGE",
      IN_SET: "IN_SET",
      LESS_THAN: "LESS_THAN",
      LESS_THAN_EQUALS: "LESS_THAN_EQUALS",
      NOT_EQUALS: "NOT_EQUALS",
      NOT_IN_RANGE: "NOT_IN_RANGE",
      NOT_IN_SET: "NOT_IN_SET"
    };
    var CommandNamespace = {
      AWSIoT: "AWS-IoT",
      AWSIoTFleetWise: "AWS-IoT-FleetWise"
    };
    var OutputFormat = {
      CBOR: "CBOR",
      JSON: "JSON"
    };
    var CustomMetricType = {
      IP_ADDRESS_LIST: "ip-address-list",
      NUMBER: "number",
      NUMBER_LIST: "number-list",
      STRING_LIST: "string-list"
    };
    var DimensionType = {
      TOPIC_FILTER: "TOPIC_FILTER"
    };
    var ServiceType = {
      CREDENTIAL_PROVIDER: "CREDENTIAL_PROVIDER",
      DATA: "DATA",
      JOBS: "JOBS"
    };
    var FleetMetricUnit = {
      Bits: "Bits",
      BitsSecond: "Bits/Second",
      Bytes: "Bytes",
      BytesSecond: "Bytes/Second",
      Count: "Count",
      CountSecond: "Count/Second",
      Gigabits: "Gigabits",
      GigabitsSecond: "Gigabits/Second",
      Gigabytes: "Gigabytes",
      GigabytesSecond: "Gigabytes/Second",
      Kilobits: "Kilobits",
      KilobitsSecond: "Kilobits/Second",
      Kilobytes: "Kilobytes",
      KilobytesSecond: "Kilobytes/Second",
      Megabits: "Megabits",
      MegabitsSecond: "Megabits/Second",
      Megabytes: "Megabytes",
      MegabytesSecond: "Megabytes/Second",
      Microseconds: "Microseconds",
      Milliseconds: "Milliseconds",
      None: "None",
      Percent: "Percent",
      Seconds: "Seconds",
      Terabits: "Terabits",
      TerabitsSecond: "Terabits/Second",
      Terabytes: "Terabytes",
      TerabytesSecond: "Terabytes/Second"
    };
    var RetryableFailureType = {
      ALL: "ALL",
      FAILED: "FAILED",
      TIMED_OUT: "TIMED_OUT"
    };
    var JobEndBehavior = {
      CANCEL: "CANCEL",
      FORCE_CANCEL: "FORCE_CANCEL",
      STOP_ROLLOUT: "STOP_ROLLOUT"
    };
    var TargetSelection = {
      CONTINUOUS: "CONTINUOUS",
      SNAPSHOT: "SNAPSHOT"
    };
    var LogLevel = {
      DEBUG: "DEBUG",
      DISABLED: "DISABLED",
      ERROR: "ERROR",
      INFO: "INFO",
      WARN: "WARN"
    };
    var PolicyTemplateName = {
      BLANK_POLICY: "BLANK_POLICY"
    };
    var CACertificateUpdateAction = {
      DEACTIVATE: "DEACTIVATE"
    };
    var DeviceCertificateUpdateAction = {
      DEACTIVATE: "DEACTIVATE"
    };
    var AwsJobAbortCriteriaAbortAction = {
      CANCEL: "CANCEL"
    };
    var AwsJobAbortCriteriaFailureType = {
      ALL: "ALL",
      FAILED: "FAILED",
      REJECTED: "REJECTED",
      TIMED_OUT: "TIMED_OUT"
    };
    var Protocol = {
      HTTP: "HTTP",
      MQTT: "MQTT"
    };
    var OTAUpdateStatus = {
      CREATE_COMPLETE: "CREATE_COMPLETE",
      CREATE_FAILED: "CREATE_FAILED",
      CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS",
      CREATE_PENDING: "CREATE_PENDING",
      DELETE_FAILED: "DELETE_FAILED",
      DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS"
    };
    var PackageVersionStatus = {
      DEPRECATED: "DEPRECATED",
      DRAFT: "DRAFT",
      PUBLISHED: "PUBLISHED"
    };
    var TemplateType = {
      FLEET_PROVISIONING: "FLEET_PROVISIONING",
      JITP: "JITP"
    };
    var DayOfWeek = {
      FRI: "FRI",
      MON: "MON",
      SAT: "SAT",
      SUN: "SUN",
      THU: "THU",
      TUE: "TUE",
      WED: "WED"
    };
    var TopicRuleDestinationStatus = {
      DELETING: "DELETING",
      DISABLED: "DISABLED",
      ENABLED: "ENABLED",
      ERROR: "ERROR",
      IN_PROGRESS: "IN_PROGRESS"
    };
    var LogTargetType = {
      CLIENT_ID: "CLIENT_ID",
      DEFAULT: "DEFAULT",
      PRINCIPAL_ID: "PRINCIPAL_ID",
      SOURCE_IP: "SOURCE_IP",
      THING_GROUP: "THING_GROUP"
    };
    var CertificateMode = {
      DEFAULT: "DEFAULT",
      SNI_ONLY: "SNI_ONLY"
    };
    var CACertificateStatus = {
      ACTIVE: "ACTIVE",
      INACTIVE: "INACTIVE"
    };
    var CertificateStatus = {
      ACTIVE: "ACTIVE",
      INACTIVE: "INACTIVE",
      PENDING_ACTIVATION: "PENDING_ACTIVATION",
      PENDING_TRANSFER: "PENDING_TRANSFER",
      REGISTER_INACTIVE: "REGISTER_INACTIVE",
      REVOKED: "REVOKED"
    };
    var DetectMitigationActionsTaskStatus = {
      CANCELED: "CANCELED",
      FAILED: "FAILED",
      IN_PROGRESS: "IN_PROGRESS",
      SUCCESSFUL: "SUCCESSFUL"
    };
    var DomainConfigurationStatus = {
      DISABLED: "DISABLED",
      ENABLED: "ENABLED"
    };
    var DomainType = {
      AWS_MANAGED: "AWS_MANAGED",
      CUSTOMER_MANAGED: "CUSTOMER_MANAGED",
      ENDPOINT: "ENDPOINT"
    };
    var ServerCertificateStatus = {
      INVALID: "INVALID",
      VALID: "VALID"
    };
    var ConfigurationStatus = {
      HEALTHY: "HEALTHY",
      UNHEALTHY: "UNHEALTHY"
    };
    var EncryptionType = {
      AWS_OWNED_KMS_KEY: "AWS_OWNED_KMS_KEY",
      CUSTOMER_MANAGED_KMS_KEY: "CUSTOMER_MANAGED_KMS_KEY"
    };
    var EventType = {
      CA_CERTIFICATE: "CA_CERTIFICATE",
      CERTIFICATE: "CERTIFICATE",
      JOB: "JOB",
      JOB_EXECUTION: "JOB_EXECUTION",
      POLICY: "POLICY",
      THING: "THING",
      THING_GROUP: "THING_GROUP",
      THING_GROUP_HIERARCHY: "THING_GROUP_HIERARCHY",
      THING_GROUP_MEMBERSHIP: "THING_GROUP_MEMBERSHIP",
      THING_TYPE: "THING_TYPE",
      THING_TYPE_ASSOCIATION: "THING_TYPE_ASSOCIATION"
    };
    var IndexStatus = {
      ACTIVE: "ACTIVE",
      BUILDING: "BUILDING",
      REBUILDING: "REBUILDING"
    };
    var JobStatus = {
      CANCELED: "CANCELED",
      COMPLETED: "COMPLETED",
      DELETION_IN_PROGRESS: "DELETION_IN_PROGRESS",
      IN_PROGRESS: "IN_PROGRESS",
      SCHEDULED: "SCHEDULED"
    };
    var JobExecutionStatus = {
      CANCELED: "CANCELED",
      FAILED: "FAILED",
      IN_PROGRESS: "IN_PROGRESS",
      QUEUED: "QUEUED",
      REJECTED: "REJECTED",
      REMOVED: "REMOVED",
      SUCCEEDED: "SUCCEEDED",
      TIMED_OUT: "TIMED_OUT"
    };
    var MitigationActionType = {
      ADD_THINGS_TO_THING_GROUP: "ADD_THINGS_TO_THING_GROUP",
      ENABLE_IOT_LOGGING: "ENABLE_IOT_LOGGING",
      PUBLISH_FINDING_TO_SNS: "PUBLISH_FINDING_TO_SNS",
      REPLACE_DEFAULT_POLICY_VERSION: "REPLACE_DEFAULT_POLICY_VERSION",
      UPDATE_CA_CERTIFICATE: "UPDATE_CA_CERTIFICATE",
      UPDATE_DEVICE_CERTIFICATE: "UPDATE_DEVICE_CERTIFICATE"
    };
    var DynamicGroupStatus = {
      ACTIVE: "ACTIVE",
      BUILDING: "BUILDING",
      REBUILDING: "REBUILDING"
    };
    var Status = {
      Cancelled: "Cancelled",
      Cancelling: "Cancelling",
      Completed: "Completed",
      Failed: "Failed",
      InProgress: "InProgress"
    };
    var ModelStatus = {
      ACTIVE: "ACTIVE",
      EXPIRED: "EXPIRED",
      PENDING_BUILD: "PENDING_BUILD"
    };
    var CommandExecutionStatus = {
      CREATED: "CREATED",
      FAILED: "FAILED",
      IN_PROGRESS: "IN_PROGRESS",
      REJECTED: "REJECTED",
      SUCCEEDED: "SUCCEEDED",
      TIMED_OUT: "TIMED_OUT"
    };
    var FieldType = {
      BOOLEAN: "Boolean",
      NUMBER: "Number",
      STRING: "String"
    };
    var ThingGroupIndexingMode = {
      OFF: "OFF",
      ON: "ON"
    };
    var DeviceDefenderIndexingMode = {
      OFF: "OFF",
      VIOLATIONS: "VIOLATIONS"
    };
    var TargetFieldOrder = {
      LatLon: "LatLon",
      LonLat: "LonLat"
    };
    var NamedShadowIndexingMode = {
      OFF: "OFF",
      ON: "ON"
    };
    var ThingConnectivityIndexingMode = {
      OFF: "OFF",
      STATUS: "STATUS"
    };
    var ThingIndexingMode = {
      OFF: "OFF",
      REGISTRY: "REGISTRY",
      REGISTRY_AND_SHADOW: "REGISTRY_AND_SHADOW"
    };
    var DisconnectReasonValue = {
      AUTH_ERROR: "AUTH_ERROR",
      CLIENT_ERROR: "CLIENT_ERROR",
      CLIENT_INITIATED_DISCONNECT: "CLIENT_INITIATED_DISCONNECT",
      CONNECTION_LOST: "CONNECTION_LOST",
      CUSTOMAUTH_TTL_EXPIRATION: "CUSTOMAUTH_TTL_EXPIRATION",
      DUPLICATE_CLIENTID: "DUPLICATE_CLIENTID",
      FORBIDDEN_ACCESS: "FORBIDDEN_ACCESS",
      MQTT_KEEP_ALIVE_TIMEOUT: "MQTT_KEEP_ALIVE_TIMEOUT",
      NONE: "NONE",
      SERVER_ERROR: "SERVER_ERROR",
      SERVER_INITIATED_DISCONNECT: "SERVER_INITIATED_DISCONNECT",
      THROTTLED: "THROTTLED",
      UNKNOWN: "UNKNOWN",
      WEBSOCKET_TTL_EXPIRATION: "WEBSOCKET_TTL_EXPIRATION"
    };
    var BehaviorCriteriaType = {
      MACHINE_LEARNING: "MACHINE_LEARNING",
      STATIC: "STATIC",
      STATISTICAL: "STATISTICAL"
    };
    var SortOrder = {
      Ascending: "ASCENDING",
      Descending: "DESCENDING"
    };
    var DetectMitigationActionExecutionStatus = {
      FAILED: "FAILED",
      IN_PROGRESS: "IN_PROGRESS",
      SKIPPED: "SKIPPED",
      SUCCESSFUL: "SUCCESSFUL"
    };
    var SbomValidationResult = {
      FAILED: "FAILED",
      SUCCEEDED: "SUCCEEDED"
    };
    var SbomValidationErrorCode = {
      FILE_SIZE_LIMIT_EXCEEDED: "FILE_SIZE_LIMIT_EXCEEDED",
      INCOMPATIBLE_FORMAT: "INCOMPATIBLE_FORMAT"
    };
    var ReportType = {
      ERRORS: "ERRORS",
      RESULTS: "RESULTS"
    };
    var ViolationEventType = {
      ALARM_CLEARED: "alarm-cleared",
      ALARM_INVALIDATED: "alarm-invalidated",
      IN_ALARM: "in-alarm"
    };
    var PackageVersionAction = {
      DEPRECATE: "DEPRECATE",
      PUBLISH: "PUBLISH"
    };
    exports2.$Command = smithyClient.Command;
    exports2.__Client = smithyClient.Client;
    exports2.IoTServiceException = IoTServiceException.IoTServiceException;
    exports2.AbortAction = AbortAction;
    exports2.AcceptCertificateTransferCommand = AcceptCertificateTransferCommand;
    exports2.ActionType = ActionType;
    exports2.AddThingToBillingGroupCommand = AddThingToBillingGroupCommand;
    exports2.AddThingToThingGroupCommand = AddThingToThingGroupCommand;
    exports2.AggregationTypeName = AggregationTypeName;
    exports2.AlertTargetType = AlertTargetType;
    exports2.ApplicationProtocol = ApplicationProtocol;
    exports2.AssociateSbomWithPackageVersionCommand = AssociateSbomWithPackageVersionCommand;
    exports2.AssociateTargetsWithJobCommand = AssociateTargetsWithJobCommand;
    exports2.AttachPolicyCommand = AttachPolicyCommand;
    exports2.AttachPrincipalPolicyCommand = AttachPrincipalPolicyCommand;
    exports2.AttachSecurityProfileCommand = AttachSecurityProfileCommand;
    exports2.AttachThingPrincipalCommand = AttachThingPrincipalCommand;
    exports2.AuditCheckRunStatus = AuditCheckRunStatus;
    exports2.AuditFindingSeverity = AuditFindingSeverity;
    exports2.AuditFrequency = AuditFrequency;
    exports2.AuditMitigationActionsExecutionStatus = AuditMitigationActionsExecutionStatus;
    exports2.AuditMitigationActionsTaskStatus = AuditMitigationActionsTaskStatus;
    exports2.AuditNotificationType = AuditNotificationType;
    exports2.AuditTaskStatus = AuditTaskStatus;
    exports2.AuditTaskType = AuditTaskType;
    exports2.AuthDecision = AuthDecision;
    exports2.AuthenticationType = AuthenticationType;
    exports2.AuthorizerStatus = AuthorizerStatus;
    exports2.AutoRegistrationStatus = AutoRegistrationStatus;
    exports2.AwsJobAbortCriteriaAbortAction = AwsJobAbortCriteriaAbortAction;
    exports2.AwsJobAbortCriteriaFailureType = AwsJobAbortCriteriaFailureType;
    exports2.BehaviorCriteriaType = BehaviorCriteriaType;
    exports2.CACertificateStatus = CACertificateStatus;
    exports2.CACertificateUpdateAction = CACertificateUpdateAction;
    exports2.CancelAuditMitigationActionsTaskCommand = CancelAuditMitigationActionsTaskCommand;
    exports2.CancelAuditTaskCommand = CancelAuditTaskCommand;
    exports2.CancelCertificateTransferCommand = CancelCertificateTransferCommand;
    exports2.CancelDetectMitigationActionsTaskCommand = CancelDetectMitigationActionsTaskCommand;
    exports2.CancelJobCommand = CancelJobCommand;
    exports2.CancelJobExecutionCommand = CancelJobExecutionCommand;
    exports2.CannedAccessControlList = CannedAccessControlList;
    exports2.CertificateMode = CertificateMode;
    exports2.CertificateProviderOperation = CertificateProviderOperation;
    exports2.CertificateStatus = CertificateStatus;
    exports2.ClearDefaultAuthorizerCommand = ClearDefaultAuthorizerCommand;
    exports2.CommandExecutionStatus = CommandExecutionStatus;
    exports2.CommandNamespace = CommandNamespace;
    exports2.CommandParameterType = CommandParameterType;
    exports2.CommandParameterValueComparisonOperator = CommandParameterValueComparisonOperator;
    exports2.ComparisonOperator = ComparisonOperator;
    exports2.ConfidenceLevel = ConfidenceLevel;
    exports2.ConfigName = ConfigName;
    exports2.ConfigurationStatus = ConfigurationStatus;
    exports2.ConfirmTopicRuleDestinationCommand = ConfirmTopicRuleDestinationCommand;
    exports2.CreateAuditSuppressionCommand = CreateAuditSuppressionCommand;
    exports2.CreateAuthorizerCommand = CreateAuthorizerCommand;
    exports2.CreateBillingGroupCommand = CreateBillingGroupCommand;
    exports2.CreateCertificateFromCsrCommand = CreateCertificateFromCsrCommand;
    exports2.CreateCertificateProviderCommand = CreateCertificateProviderCommand;
    exports2.CreateCommandCommand = CreateCommandCommand;
    exports2.CreateCustomMetricCommand = CreateCustomMetricCommand;
    exports2.CreateDimensionCommand = CreateDimensionCommand;
    exports2.CreateDomainConfigurationCommand = CreateDomainConfigurationCommand;
    exports2.CreateDynamicThingGroupCommand = CreateDynamicThingGroupCommand;
    exports2.CreateFleetMetricCommand = CreateFleetMetricCommand;
    exports2.CreateJobCommand = CreateJobCommand;
    exports2.CreateJobTemplateCommand = CreateJobTemplateCommand;
    exports2.CreateKeysAndCertificateCommand = CreateKeysAndCertificateCommand;
    exports2.CreateMitigationActionCommand = CreateMitigationActionCommand;
    exports2.CreateOTAUpdateCommand = CreateOTAUpdateCommand;
    exports2.CreatePackageCommand = CreatePackageCommand;
    exports2.CreatePackageVersionCommand = CreatePackageVersionCommand;
    exports2.CreatePolicyCommand = CreatePolicyCommand;
    exports2.CreatePolicyVersionCommand = CreatePolicyVersionCommand;
    exports2.CreateProvisioningClaimCommand = CreateProvisioningClaimCommand;
    exports2.CreateProvisioningTemplateCommand = CreateProvisioningTemplateCommand;
    exports2.CreateProvisioningTemplateVersionCommand = CreateProvisioningTemplateVersionCommand;
    exports2.CreateRoleAliasCommand = CreateRoleAliasCommand;
    exports2.CreateScheduledAuditCommand = CreateScheduledAuditCommand;
    exports2.CreateSecurityProfileCommand = CreateSecurityProfileCommand;
    exports2.CreateStreamCommand = CreateStreamCommand;
    exports2.CreateThingCommand = CreateThingCommand;
    exports2.CreateThingGroupCommand = CreateThingGroupCommand;
    exports2.CreateThingTypeCommand = CreateThingTypeCommand;
    exports2.CreateTopicRuleCommand = CreateTopicRuleCommand;
    exports2.CreateTopicRuleDestinationCommand = CreateTopicRuleDestinationCommand;
    exports2.CustomMetricType = CustomMetricType;
    exports2.DayOfWeek = DayOfWeek;
    exports2.DeleteAccountAuditConfigurationCommand = DeleteAccountAuditConfigurationCommand;
    exports2.DeleteAuditSuppressionCommand = DeleteAuditSuppressionCommand;
    exports2.DeleteAuthorizerCommand = DeleteAuthorizerCommand;
    exports2.DeleteBillingGroupCommand = DeleteBillingGroupCommand;
    exports2.DeleteCACertificateCommand = DeleteCACertificateCommand;
    exports2.DeleteCertificateCommand = DeleteCertificateCommand;
    exports2.DeleteCertificateProviderCommand = DeleteCertificateProviderCommand;
    exports2.DeleteCommandCommand = DeleteCommandCommand;
    exports2.DeleteCommandExecutionCommand = DeleteCommandExecutionCommand;
    exports2.DeleteCustomMetricCommand = DeleteCustomMetricCommand;
    exports2.DeleteDimensionCommand = DeleteDimensionCommand;
    exports2.DeleteDomainConfigurationCommand = DeleteDomainConfigurationCommand;
    exports2.DeleteDynamicThingGroupCommand = DeleteDynamicThingGroupCommand;
    exports2.DeleteFleetMetricCommand = DeleteFleetMetricCommand;
    exports2.DeleteJobCommand = DeleteJobCommand;
    exports2.DeleteJobExecutionCommand = DeleteJobExecutionCommand;
    exports2.DeleteJobTemplateCommand = DeleteJobTemplateCommand;
    exports2.DeleteMitigationActionCommand = DeleteMitigationActionCommand;
    exports2.DeleteOTAUpdateCommand = DeleteOTAUpdateCommand;
    exports2.DeletePackageCommand = DeletePackageCommand;
    exports2.DeletePackageVersionCommand = DeletePackageVersionCommand;
    exports2.DeletePolicyCommand = DeletePolicyCommand;
    exports2.DeletePolicyVersionCommand = DeletePolicyVersionCommand;
    exports2.DeleteProvisioningTemplateCommand = DeleteProvisioningTemplateCommand;
    exports2.DeleteProvisioningTemplateVersionCommand = DeleteProvisioningTemplateVersionCommand;
    exports2.DeleteRegistrationCodeCommand = DeleteRegistrationCodeCommand;
    exports2.DeleteRoleAliasCommand = DeleteRoleAliasCommand;
    exports2.DeleteScheduledAuditCommand = DeleteScheduledAuditCommand;
    exports2.DeleteSecurityProfileCommand = DeleteSecurityProfileCommand;
    exports2.DeleteStreamCommand = DeleteStreamCommand;
    exports2.DeleteThingCommand = DeleteThingCommand;
    exports2.DeleteThingGroupCommand = DeleteThingGroupCommand;
    exports2.DeleteThingTypeCommand = DeleteThingTypeCommand;
    exports2.DeleteTopicRuleCommand = DeleteTopicRuleCommand;
    exports2.DeleteTopicRuleDestinationCommand = DeleteTopicRuleDestinationCommand;
    exports2.DeleteV2LoggingLevelCommand = DeleteV2LoggingLevelCommand;
    exports2.DeprecateThingTypeCommand = DeprecateThingTypeCommand;
    exports2.DescribeAccountAuditConfigurationCommand = DescribeAccountAuditConfigurationCommand;
    exports2.DescribeAuditFindingCommand = DescribeAuditFindingCommand;
    exports2.DescribeAuditMitigationActionsTaskCommand = DescribeAuditMitigationActionsTaskCommand;
    exports2.DescribeAuditSuppressionCommand = DescribeAuditSuppressionCommand;
    exports2.DescribeAuditTaskCommand = DescribeAuditTaskCommand;
    exports2.DescribeAuthorizerCommand = DescribeAuthorizerCommand;
    exports2.DescribeBillingGroupCommand = DescribeBillingGroupCommand;
    exports2.DescribeCACertificateCommand = DescribeCACertificateCommand;
    exports2.DescribeCertificateCommand = DescribeCertificateCommand;
    exports2.DescribeCertificateProviderCommand = DescribeCertificateProviderCommand;
    exports2.DescribeCustomMetricCommand = DescribeCustomMetricCommand;
    exports2.DescribeDefaultAuthorizerCommand = DescribeDefaultAuthorizerCommand;
    exports2.DescribeDetectMitigationActionsTaskCommand = DescribeDetectMitigationActionsTaskCommand;
    exports2.DescribeDimensionCommand = DescribeDimensionCommand;
    exports2.DescribeDomainConfigurationCommand = DescribeDomainConfigurationCommand;
    exports2.DescribeEncryptionConfigurationCommand = DescribeEncryptionConfigurationCommand;
    exports2.DescribeEndpointCommand = DescribeEndpointCommand2;
    exports2.DescribeEventConfigurationsCommand = DescribeEventConfigurationsCommand;
    exports2.DescribeFleetMetricCommand = DescribeFleetMetricCommand;
    exports2.DescribeIndexCommand = DescribeIndexCommand;
    exports2.DescribeJobCommand = DescribeJobCommand;
    exports2.DescribeJobExecutionCommand = DescribeJobExecutionCommand;
    exports2.DescribeJobTemplateCommand = DescribeJobTemplateCommand;
    exports2.DescribeManagedJobTemplateCommand = DescribeManagedJobTemplateCommand;
    exports2.DescribeMitigationActionCommand = DescribeMitigationActionCommand;
    exports2.DescribeProvisioningTemplateCommand = DescribeProvisioningTemplateCommand;
    exports2.DescribeProvisioningTemplateVersionCommand = DescribeProvisioningTemplateVersionCommand;
    exports2.DescribeRoleAliasCommand = DescribeRoleAliasCommand;
    exports2.DescribeScheduledAuditCommand = DescribeScheduledAuditCommand;
    exports2.DescribeSecurityProfileCommand = DescribeSecurityProfileCommand;
    exports2.DescribeStreamCommand = DescribeStreamCommand;
    exports2.DescribeThingCommand = DescribeThingCommand;
    exports2.DescribeThingGroupCommand = DescribeThingGroupCommand;
    exports2.DescribeThingRegistrationTaskCommand = DescribeThingRegistrationTaskCommand;
    exports2.DescribeThingTypeCommand = DescribeThingTypeCommand;
    exports2.DetachPolicyCommand = DetachPolicyCommand;
    exports2.DetachPrincipalPolicyCommand = DetachPrincipalPolicyCommand;
    exports2.DetachSecurityProfileCommand = DetachSecurityProfileCommand;
    exports2.DetachThingPrincipalCommand = DetachThingPrincipalCommand;
    exports2.DetectMitigationActionExecutionStatus = DetectMitigationActionExecutionStatus;
    exports2.DetectMitigationActionsTaskStatus = DetectMitigationActionsTaskStatus;
    exports2.DeviceCertificateUpdateAction = DeviceCertificateUpdateAction;
    exports2.DeviceDefenderIndexingMode = DeviceDefenderIndexingMode;
    exports2.DimensionType = DimensionType;
    exports2.DimensionValueOperator = DimensionValueOperator;
    exports2.DisableTopicRuleCommand = DisableTopicRuleCommand;
    exports2.DisassociateSbomFromPackageVersionCommand = DisassociateSbomFromPackageVersionCommand;
    exports2.DisconnectReasonValue = DisconnectReasonValue;
    exports2.DomainConfigurationStatus = DomainConfigurationStatus;
    exports2.DomainType = DomainType;
    exports2.DynamicGroupStatus = DynamicGroupStatus;
    exports2.DynamoKeyType = DynamoKeyType;
    exports2.EnableTopicRuleCommand = EnableTopicRuleCommand;
    exports2.EncryptionType = EncryptionType;
    exports2.EventType = EventType;
    exports2.FieldType = FieldType;
    exports2.FleetMetricUnit = FleetMetricUnit;
    exports2.GetBehaviorModelTrainingSummariesCommand = GetBehaviorModelTrainingSummariesCommand;
    exports2.GetBucketsAggregationCommand = GetBucketsAggregationCommand;
    exports2.GetCardinalityCommand = GetCardinalityCommand;
    exports2.GetCommandCommand = GetCommandCommand;
    exports2.GetCommandExecutionCommand = GetCommandExecutionCommand;
    exports2.GetEffectivePoliciesCommand = GetEffectivePoliciesCommand;
    exports2.GetIndexingConfigurationCommand = GetIndexingConfigurationCommand;
    exports2.GetJobDocumentCommand = GetJobDocumentCommand;
    exports2.GetLoggingOptionsCommand = GetLoggingOptionsCommand;
    exports2.GetOTAUpdateCommand = GetOTAUpdateCommand;
    exports2.GetPackageCommand = GetPackageCommand;
    exports2.GetPackageConfigurationCommand = GetPackageConfigurationCommand;
    exports2.GetPackageVersionCommand = GetPackageVersionCommand;
    exports2.GetPercentilesCommand = GetPercentilesCommand;
    exports2.GetPolicyCommand = GetPolicyCommand;
    exports2.GetPolicyVersionCommand = GetPolicyVersionCommand;
    exports2.GetRegistrationCodeCommand = GetRegistrationCodeCommand;
    exports2.GetStatisticsCommand = GetStatisticsCommand;
    exports2.GetThingConnectivityDataCommand = GetThingConnectivityDataCommand;
    exports2.GetTopicRuleCommand = GetTopicRuleCommand;
    exports2.GetTopicRuleDestinationCommand = GetTopicRuleDestinationCommand;
    exports2.GetV2LoggingOptionsCommand = GetV2LoggingOptionsCommand;
    exports2.IndexStatus = IndexStatus;
    exports2.IoT = IoT;
    exports2.IoTClient = IoTClient2;
    exports2.JobEndBehavior = JobEndBehavior;
    exports2.JobExecutionFailureType = JobExecutionFailureType;
    exports2.JobExecutionStatus = JobExecutionStatus;
    exports2.JobStatus = JobStatus;
    exports2.ListActiveViolationsCommand = ListActiveViolationsCommand;
    exports2.ListAttachedPoliciesCommand = ListAttachedPoliciesCommand;
    exports2.ListAuditFindingsCommand = ListAuditFindingsCommand;
    exports2.ListAuditMitigationActionsExecutionsCommand = ListAuditMitigationActionsExecutionsCommand;
    exports2.ListAuditMitigationActionsTasksCommand = ListAuditMitigationActionsTasksCommand;
    exports2.ListAuditSuppressionsCommand = ListAuditSuppressionsCommand;
    exports2.ListAuditTasksCommand = ListAuditTasksCommand;
    exports2.ListAuthorizersCommand = ListAuthorizersCommand;
    exports2.ListBillingGroupsCommand = ListBillingGroupsCommand;
    exports2.ListCACertificatesCommand = ListCACertificatesCommand;
    exports2.ListCertificateProvidersCommand = ListCertificateProvidersCommand;
    exports2.ListCertificatesByCACommand = ListCertificatesByCACommand;
    exports2.ListCertificatesCommand = ListCertificatesCommand;
    exports2.ListCommandExecutionsCommand = ListCommandExecutionsCommand;
    exports2.ListCommandsCommand = ListCommandsCommand;
    exports2.ListCustomMetricsCommand = ListCustomMetricsCommand;
    exports2.ListDetectMitigationActionsExecutionsCommand = ListDetectMitigationActionsExecutionsCommand;
    exports2.ListDetectMitigationActionsTasksCommand = ListDetectMitigationActionsTasksCommand;
    exports2.ListDimensionsCommand = ListDimensionsCommand;
    exports2.ListDomainConfigurationsCommand = ListDomainConfigurationsCommand;
    exports2.ListFleetMetricsCommand = ListFleetMetricsCommand;
    exports2.ListIndicesCommand = ListIndicesCommand;
    exports2.ListJobExecutionsForJobCommand = ListJobExecutionsForJobCommand;
    exports2.ListJobExecutionsForThingCommand = ListJobExecutionsForThingCommand;
    exports2.ListJobTemplatesCommand = ListJobTemplatesCommand;
    exports2.ListJobsCommand = ListJobsCommand;
    exports2.ListManagedJobTemplatesCommand = ListManagedJobTemplatesCommand;
    exports2.ListMetricValuesCommand = ListMetricValuesCommand;
    exports2.ListMitigationActionsCommand = ListMitigationActionsCommand;
    exports2.ListOTAUpdatesCommand = ListOTAUpdatesCommand;
    exports2.ListOutgoingCertificatesCommand = ListOutgoingCertificatesCommand;
    exports2.ListPackageVersionsCommand = ListPackageVersionsCommand;
    exports2.ListPackagesCommand = ListPackagesCommand;
    exports2.ListPoliciesCommand = ListPoliciesCommand;
    exports2.ListPolicyPrincipalsCommand = ListPolicyPrincipalsCommand;
    exports2.ListPolicyVersionsCommand = ListPolicyVersionsCommand;
    exports2.ListPrincipalPoliciesCommand = ListPrincipalPoliciesCommand;
    exports2.ListPrincipalThingsCommand = ListPrincipalThingsCommand;
    exports2.ListPrincipalThingsV2Command = ListPrincipalThingsV2Command;
    exports2.ListProvisioningTemplateVersionsCommand = ListProvisioningTemplateVersionsCommand;
    exports2.ListProvisioningTemplatesCommand = ListProvisioningTemplatesCommand;
    exports2.ListRelatedResourcesForAuditFindingCommand = ListRelatedResourcesForAuditFindingCommand;
    exports2.ListRoleAliasesCommand = ListRoleAliasesCommand;
    exports2.ListSbomValidationResultsCommand = ListSbomValidationResultsCommand;
    exports2.ListScheduledAuditsCommand = ListScheduledAuditsCommand;
    exports2.ListSecurityProfilesCommand = ListSecurityProfilesCommand;
    exports2.ListSecurityProfilesForTargetCommand = ListSecurityProfilesForTargetCommand;
    exports2.ListStreamsCommand = ListStreamsCommand;
    exports2.ListTagsForResourceCommand = ListTagsForResourceCommand;
    exports2.ListTargetsForPolicyCommand = ListTargetsForPolicyCommand;
    exports2.ListTargetsForSecurityProfileCommand = ListTargetsForSecurityProfileCommand;
    exports2.ListThingGroupsCommand = ListThingGroupsCommand;
    exports2.ListThingGroupsForThingCommand = ListThingGroupsForThingCommand;
    exports2.ListThingPrincipalsCommand = ListThingPrincipalsCommand;
    exports2.ListThingPrincipalsV2Command = ListThingPrincipalsV2Command;
    exports2.ListThingRegistrationTaskReportsCommand = ListThingRegistrationTaskReportsCommand;
    exports2.ListThingRegistrationTasksCommand = ListThingRegistrationTasksCommand;
    exports2.ListThingTypesCommand = ListThingTypesCommand;
    exports2.ListThingsCommand = ListThingsCommand;
    exports2.ListThingsInBillingGroupCommand = ListThingsInBillingGroupCommand;
    exports2.ListThingsInThingGroupCommand = ListThingsInThingGroupCommand;
    exports2.ListTopicRuleDestinationsCommand = ListTopicRuleDestinationsCommand;
    exports2.ListTopicRulesCommand = ListTopicRulesCommand;
    exports2.ListV2LoggingLevelsCommand = ListV2LoggingLevelsCommand;
    exports2.ListViolationEventsCommand = ListViolationEventsCommand;
    exports2.LogLevel = LogLevel;
    exports2.LogTargetType = LogTargetType;
    exports2.MessageFormat = MessageFormat;
    exports2.MitigationActionType = MitigationActionType;
    exports2.ModelStatus = ModelStatus;
    exports2.NamedShadowIndexingMode = NamedShadowIndexingMode;
    exports2.OTAUpdateStatus = OTAUpdateStatus;
    exports2.OutputFormat = OutputFormat;
    exports2.PackageVersionAction = PackageVersionAction;
    exports2.PackageVersionStatus = PackageVersionStatus;
    exports2.PolicyTemplateName = PolicyTemplateName;
    exports2.Protocol = Protocol;
    exports2.PutVerificationStateOnViolationCommand = PutVerificationStateOnViolationCommand;
    exports2.RegisterCACertificateCommand = RegisterCACertificateCommand;
    exports2.RegisterCertificateCommand = RegisterCertificateCommand;
    exports2.RegisterCertificateWithoutCACommand = RegisterCertificateWithoutCACommand;
    exports2.RegisterThingCommand = RegisterThingCommand;
    exports2.RejectCertificateTransferCommand = RejectCertificateTransferCommand;
    exports2.RemoveThingFromBillingGroupCommand = RemoveThingFromBillingGroupCommand;
    exports2.RemoveThingFromThingGroupCommand = RemoveThingFromThingGroupCommand;
    exports2.ReplaceTopicRuleCommand = ReplaceTopicRuleCommand;
    exports2.ReportType = ReportType;
    exports2.ResourceType = ResourceType;
    exports2.RetryableFailureType = RetryableFailureType;
    exports2.SbomValidationErrorCode = SbomValidationErrorCode;
    exports2.SbomValidationResult = SbomValidationResult;
    exports2.SbomValidationStatus = SbomValidationStatus;
    exports2.SearchIndexCommand = SearchIndexCommand;
    exports2.ServerCertificateStatus = ServerCertificateStatus;
    exports2.ServiceType = ServiceType;
    exports2.SetDefaultAuthorizerCommand = SetDefaultAuthorizerCommand;
    exports2.SetDefaultPolicyVersionCommand = SetDefaultPolicyVersionCommand;
    exports2.SetLoggingOptionsCommand = SetLoggingOptionsCommand;
    exports2.SetV2LoggingLevelCommand = SetV2LoggingLevelCommand;
    exports2.SetV2LoggingOptionsCommand = SetV2LoggingOptionsCommand;
    exports2.SortOrder = SortOrder;
    exports2.StartAuditMitigationActionsTaskCommand = StartAuditMitigationActionsTaskCommand;
    exports2.StartDetectMitigationActionsTaskCommand = StartDetectMitigationActionsTaskCommand;
    exports2.StartOnDemandAuditTaskCommand = StartOnDemandAuditTaskCommand;
    exports2.StartThingRegistrationTaskCommand = StartThingRegistrationTaskCommand;
    exports2.Status = Status;
    exports2.StopThingRegistrationTaskCommand = StopThingRegistrationTaskCommand;
    exports2.TagResourceCommand = TagResourceCommand;
    exports2.TargetFieldOrder = TargetFieldOrder;
    exports2.TargetSelection = TargetSelection;
    exports2.TemplateType = TemplateType;
    exports2.TestAuthorizationCommand = TestAuthorizationCommand;
    exports2.TestInvokeAuthorizerCommand = TestInvokeAuthorizerCommand;
    exports2.ThingConnectivityIndexingMode = ThingConnectivityIndexingMode;
    exports2.ThingGroupIndexingMode = ThingGroupIndexingMode;
    exports2.ThingIndexingMode = ThingIndexingMode;
    exports2.ThingPrincipalType = ThingPrincipalType;
    exports2.TopicRuleDestinationStatus = TopicRuleDestinationStatus;
    exports2.TransferCertificateCommand = TransferCertificateCommand;
    exports2.UntagResourceCommand = UntagResourceCommand;
    exports2.UpdateAccountAuditConfigurationCommand = UpdateAccountAuditConfigurationCommand;
    exports2.UpdateAuditSuppressionCommand = UpdateAuditSuppressionCommand;
    exports2.UpdateAuthorizerCommand = UpdateAuthorizerCommand;
    exports2.UpdateBillingGroupCommand = UpdateBillingGroupCommand;
    exports2.UpdateCACertificateCommand = UpdateCACertificateCommand;
    exports2.UpdateCertificateCommand = UpdateCertificateCommand;
    exports2.UpdateCertificateProviderCommand = UpdateCertificateProviderCommand;
    exports2.UpdateCommandCommand = UpdateCommandCommand;
    exports2.UpdateCustomMetricCommand = UpdateCustomMetricCommand;
    exports2.UpdateDimensionCommand = UpdateDimensionCommand;
    exports2.UpdateDomainConfigurationCommand = UpdateDomainConfigurationCommand;
    exports2.UpdateDynamicThingGroupCommand = UpdateDynamicThingGroupCommand;
    exports2.UpdateEncryptionConfigurationCommand = UpdateEncryptionConfigurationCommand;
    exports2.UpdateEventConfigurationsCommand = UpdateEventConfigurationsCommand;
    exports2.UpdateFleetMetricCommand = UpdateFleetMetricCommand;
    exports2.UpdateIndexingConfigurationCommand = UpdateIndexingConfigurationCommand;
    exports2.UpdateJobCommand = UpdateJobCommand;
    exports2.UpdateMitigationActionCommand = UpdateMitigationActionCommand;
    exports2.UpdatePackageCommand = UpdatePackageCommand;
    exports2.UpdatePackageConfigurationCommand = UpdatePackageConfigurationCommand;
    exports2.UpdatePackageVersionCommand = UpdatePackageVersionCommand;
    exports2.UpdateProvisioningTemplateCommand = UpdateProvisioningTemplateCommand;
    exports2.UpdateRoleAliasCommand = UpdateRoleAliasCommand;
    exports2.UpdateScheduledAuditCommand = UpdateScheduledAuditCommand;
    exports2.UpdateSecurityProfileCommand = UpdateSecurityProfileCommand;
    exports2.UpdateStreamCommand = UpdateStreamCommand;
    exports2.UpdateThingCommand = UpdateThingCommand;
    exports2.UpdateThingGroupCommand = UpdateThingGroupCommand;
    exports2.UpdateThingGroupsForThingCommand = UpdateThingGroupsForThingCommand;
    exports2.UpdateThingTypeCommand = UpdateThingTypeCommand;
    exports2.UpdateTopicRuleDestinationCommand = UpdateTopicRuleDestinationCommand;
    exports2.ValidateSecurityProfileBehaviorsCommand = ValidateSecurityProfileBehaviorsCommand;
    exports2.VerificationState = VerificationState;
    exports2.ViolationEventType = ViolationEventType;
    exports2.paginateGetBehaviorModelTrainingSummaries = paginateGetBehaviorModelTrainingSummaries;
    exports2.paginateListActiveViolations = paginateListActiveViolations;
    exports2.paginateListAttachedPolicies = paginateListAttachedPolicies;
    exports2.paginateListAuditFindings = paginateListAuditFindings;
    exports2.paginateListAuditMitigationActionsExecutions = paginateListAuditMitigationActionsExecutions;
    exports2.paginateListAuditMitigationActionsTasks = paginateListAuditMitigationActionsTasks;
    exports2.paginateListAuditSuppressions = paginateListAuditSuppressions;
    exports2.paginateListAuditTasks = paginateListAuditTasks;
    exports2.paginateListAuthorizers = paginateListAuthorizers;
    exports2.paginateListBillingGroups = paginateListBillingGroups;
    exports2.paginateListCACertificates = paginateListCACertificates;
    exports2.paginateListCertificates = paginateListCertificates;
    exports2.paginateListCertificatesByCA = paginateListCertificatesByCA;
    exports2.paginateListCommandExecutions = paginateListCommandExecutions;
    exports2.paginateListCommands = paginateListCommands;
    exports2.paginateListCustomMetrics = paginateListCustomMetrics;
    exports2.paginateListDetectMitigationActionsExecutions = paginateListDetectMitigationActionsExecutions;
    exports2.paginateListDetectMitigationActionsTasks = paginateListDetectMitigationActionsTasks;
    exports2.paginateListDimensions = paginateListDimensions;
    exports2.paginateListDomainConfigurations = paginateListDomainConfigurations;
    exports2.paginateListFleetMetrics = paginateListFleetMetrics;
    exports2.paginateListIndices = paginateListIndices;
    exports2.paginateListJobExecutionsForJob = paginateListJobExecutionsForJob;
    exports2.paginateListJobExecutionsForThing = paginateListJobExecutionsForThing;
    exports2.paginateListJobTemplates = paginateListJobTemplates;
    exports2.paginateListJobs = paginateListJobs;
    exports2.paginateListManagedJobTemplates = paginateListManagedJobTemplates;
    exports2.paginateListMetricValues = paginateListMetricValues;
    exports2.paginateListMitigationActions = paginateListMitigationActions;
    exports2.paginateListOTAUpdates = paginateListOTAUpdates;
    exports2.paginateListOutgoingCertificates = paginateListOutgoingCertificates;
    exports2.paginateListPackageVersions = paginateListPackageVersions;
    exports2.paginateListPackages = paginateListPackages;
    exports2.paginateListPolicies = paginateListPolicies;
    exports2.paginateListPolicyPrincipals = paginateListPolicyPrincipals;
    exports2.paginateListPrincipalPolicies = paginateListPrincipalPolicies;
    exports2.paginateListPrincipalThings = paginateListPrincipalThings;
    exports2.paginateListPrincipalThingsV2 = paginateListPrincipalThingsV2;
    exports2.paginateListProvisioningTemplateVersions = paginateListProvisioningTemplateVersions;
    exports2.paginateListProvisioningTemplates = paginateListProvisioningTemplates;
    exports2.paginateListRelatedResourcesForAuditFinding = paginateListRelatedResourcesForAuditFinding;
    exports2.paginateListRoleAliases = paginateListRoleAliases;
    exports2.paginateListSbomValidationResults = paginateListSbomValidationResults;
    exports2.paginateListScheduledAudits = paginateListScheduledAudits;
    exports2.paginateListSecurityProfiles = paginateListSecurityProfiles;
    exports2.paginateListSecurityProfilesForTarget = paginateListSecurityProfilesForTarget;
    exports2.paginateListStreams = paginateListStreams;
    exports2.paginateListTagsForResource = paginateListTagsForResource;
    exports2.paginateListTargetsForPolicy = paginateListTargetsForPolicy;
    exports2.paginateListTargetsForSecurityProfile = paginateListTargetsForSecurityProfile;
    exports2.paginateListThingGroups = paginateListThingGroups;
    exports2.paginateListThingGroupsForThing = paginateListThingGroupsForThing;
    exports2.paginateListThingPrincipals = paginateListThingPrincipals;
    exports2.paginateListThingPrincipalsV2 = paginateListThingPrincipalsV2;
    exports2.paginateListThingRegistrationTaskReports = paginateListThingRegistrationTaskReports;
    exports2.paginateListThingRegistrationTasks = paginateListThingRegistrationTasks;
    exports2.paginateListThingTypes = paginateListThingTypes;
    exports2.paginateListThings = paginateListThings;
    exports2.paginateListThingsInBillingGroup = paginateListThingsInBillingGroup;
    exports2.paginateListThingsInThingGroup = paginateListThingsInThingGroup;
    exports2.paginateListTopicRuleDestinations = paginateListTopicRuleDestinations;
    exports2.paginateListTopicRules = paginateListTopicRules;
    exports2.paginateListV2LoggingLevels = paginateListV2LoggingLevels;
    exports2.paginateListViolationEvents = paginateListViolationEvents;
    Object.prototype.hasOwnProperty.call(schemas_0, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: schemas_0["__proto__"]
    });
    Object.keys(schemas_0).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = schemas_0[k5];
    });
    Object.prototype.hasOwnProperty.call(errors, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", {
      enumerable: true,
      value: errors["__proto__"]
    });
    Object.keys(errors).forEach(function(k5) {
      if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = errors[k5];
    });
  }
});

// aws/Errors.js
var require_Errors = __commonJS({
  "aws/Errors.js"(exports2, module2) {
    "use strict";
    var util = require("util");
    function _isError(obj) {
      return obj && obj.name && obj.message && obj.stack && typeof obj.name === "string" && typeof obj.message === "string" && typeof obj.stack === "string";
    }
    function intoError(err) {
      if (err instanceof Error) {
        return err;
      } else {
        return new Error(err);
      }
    }
    module2.exports.intoError = intoError;
    function toRapidResponse(error3) {
      try {
        if (util.types.isNativeError(error3) || _isError(error3)) {
          return {
            errorType: error3.name,
            errorMessage: error3.message,
            trace: error3.stack.split("\n")
          };
        } else {
          return {
            errorType: typeof error3,
            errorMessage: error3.toString(),
            trace: []
          };
        }
      } catch (_err) {
        return {
          errorType: "handled",
          errorMessage: "callback called with Error argument, but there was a problem while retrieving one or more of its message, name, and stack"
        };
      }
    }
    module2.exports.toRapidResponse = toRapidResponse;
    module2.exports.toFormatted = (error3) => {
      try {
        return "	" + JSON.stringify(error3, (_k, v) => _withEnumerableProperties(v));
      } catch (err) {
        return "	" + JSON.stringify(toRapidResponse(error3));
      }
    };
    function _withEnumerableProperties(error3) {
      if (error3 instanceof Error) {
        let ret = Object.assign(
          {
            errorType: error3.name,
            errorMessage: error3.message,
            code: error3.code
          },
          error3
        );
        if (typeof error3.stack == "string") {
          ret.stack = error3.stack.split("\n");
        }
        return ret;
      } else {
        return error3;
      }
    }
    var errorClasses = [
      class ImportModuleError extends Error {
      },
      class HandlerNotFound extends Error {
      },
      class MalformedHandlerName extends Error {
      },
      class UserCodeSyntaxError extends Error {
      },
      class MalformedStreamingHandler extends Error {
      },
      class InvalidStreamingOperation extends Error {
      },
      class UnhandledPromiseRejection extends Error {
        constructor(reason, promise) {
          super(reason);
          this.reason = reason;
          this.promise = promise;
        }
      }
    ];
    errorClasses.forEach((e5) => {
      module2.exports[e5.name] = e5;
      e5.prototype.name = `Runtime.${e5.name}`;
    });
  }
});

// aws/VerboseLog.js
var require_VerboseLog = __commonJS({
  "aws/VerboseLog.js"(exports2) {
    "use strict";
    var EnvVarName = "AWS_LAMBDA_RUNTIME_VERBOSE";
    var Tag = "RUNTIME";
    var Verbosity = (() => {
      if (!process.env[EnvVarName]) {
        return 0;
      }
      try {
        const verbosity = parseInt(process.env[EnvVarName]);
        return verbosity < 0 ? 0 : verbosity > 3 ? 3 : verbosity;
      } catch (_) {
        return 0;
      }
    })();
    exports2.logger = function(category) {
      return {
        verbose: function() {
          if (Verbosity >= 1) {
            const args = [...arguments].map(
              (arg) => typeof arg === "function" ? arg() : arg
            );
            console.log.apply(null, [Tag, category, ...args]);
          }
        },
        vverbose: function() {
          if (Verbosity >= 2) {
            const args = [...arguments].map(
              (arg) => typeof arg === "function" ? arg() : arg
            );
            console.log.apply(null, [Tag, category, ...args]);
          }
        },
        vvverbose: function() {
          if (Verbosity >= 3) {
            const args = [...arguments].map(
              (arg) => typeof arg === "function" ? arg() : arg
            );
            console.log.apply(null, [Tag, category, ...args]);
          }
        }
      };
    };
  }
});

// aws/HttpResponseStream.js
var require_HttpResponseStream = __commonJS({
  "aws/HttpResponseStream.js"(exports2, module2) {
    "use strict";
    var METADATA_PRELUDE_CONTENT_TYPE = "application/vnd.awslambda.http-integration-response";
    var DELIMITER_LEN = 8;
    var HttpResponseStream = class {
      static from(underlyingStream, prelude) {
        underlyingStream.setContentType(METADATA_PRELUDE_CONTENT_TYPE);
        const metadataPrelude = JSON.stringify(prelude);
        underlyingStream._onBeforeFirstWrite = (write) => {
          write(metadataPrelude);
          write(new Uint8Array(DELIMITER_LEN));
        };
        return underlyingStream;
      }
    };
    module2.exports.HttpResponseStream = HttpResponseStream;
  }
});

// aws/UserFunction.js
var require_UserFunction = __commonJS({
  "aws/UserFunction.js"(exports2, module2) {
    "use strict";
    var path = require("path");
    var fs = require("fs");
    var {
      HandlerNotFound,
      MalformedHandlerName,
      ImportModuleError,
      UserCodeSyntaxError
    } = require_Errors();
    var { verbose: verbose2 } = require_VerboseLog().logger("LOADER");
    var { HttpResponseStream } = require_HttpResponseStream();
    var FUNCTION_EXPR = /^([^.]*)\.(.*)$/;
    var RELATIVE_PATH_SUBSTRING = "..";
    var HANDLER_STREAMING = /* @__PURE__ */ Symbol.for("aws.lambda.runtime.handler.streaming");
    var HANDLER_HIGHWATERMARK = /* @__PURE__ */ Symbol.for(
      "aws.lambda.runtime.handler.streaming.highWaterMark"
    );
    var STREAM_RESPONSE = "response";
    var NoGlobalAwsLambda = process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "1" || process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "true";
    function _moduleRootAndHandler(fullHandlerString) {
      let handlerString = path.basename(fullHandlerString);
      let moduleRoot = fullHandlerString.substring(
        0,
        fullHandlerString.indexOf(handlerString)
      );
      return [moduleRoot, handlerString];
    }
    function _splitHandlerString(handler2) {
      let match = handler2.match(FUNCTION_EXPR);
      if (!match || match.length != 3) {
        throw new MalformedHandlerName("Bad handler");
      }
      return [match[1], match[2]];
    }
    function _resolveHandler(object, nestedProperty) {
      return nestedProperty.split(".").reduce((nested, key) => {
        return nested && nested[key];
      }, object);
    }
    function _tryRequireFile(file, extension) {
      const path2 = file + (extension || "");
      verbose2("Try loading as commonjs:", path2);
      return fs.existsSync(path2) ? require(path2) : void 0;
    }
    async function _tryAwaitImport(file, extension) {
      const path2 = file + (extension || "");
      verbose2("Try loading as esmodule:", path2);
      if (fs.existsSync(path2)) {
        return await import(path2);
      }
      return void 0;
    }
    function _hasFolderPackageJsonTypeModule(folder) {
      if (folder.endsWith("/node_modules")) {
        return false;
      }
      const pj = path.join(folder, "/package.json");
      if (fs.existsSync(pj)) {
        try {
          const pkg = JSON.parse(fs.readFileSync(pj));
          if (pkg) {
            if (pkg.type === "module") {
              verbose2("type: module detected in", pj);
              return true;
            } else {
              verbose2("type: module not detected in", pj);
              return false;
            }
          }
        } catch (e5) {
          console.warn(
            `${pj} cannot be read, it will be ignored for ES module detection purposes.`,
            e5
          );
          return false;
        }
      }
      if (folder === "/") {
        return false;
      }
      return _hasFolderPackageJsonTypeModule(path.resolve(folder, ".."));
    }
    function _hasPackageJsonTypeModule(file) {
      const jsPath = file + ".js";
      return fs.existsSync(jsPath) ? _hasFolderPackageJsonTypeModule(path.resolve(path.dirname(jsPath))) : false;
    }
    async function _tryRequire(appRoot, moduleRoot, module3) {
      verbose2(
        "Try loading as commonjs: ",
        module3,
        " with paths: ,",
        appRoot,
        moduleRoot
      );
      const lambdaStylePath = path.resolve(appRoot, moduleRoot, module3);
      const extensionless = _tryRequireFile(lambdaStylePath);
      if (extensionless) {
        return extensionless;
      }
      const pjHasModule = _hasPackageJsonTypeModule(lambdaStylePath);
      if (!pjHasModule) {
        const loaded2 = _tryRequireFile(lambdaStylePath, ".js");
        if (loaded2) {
          return loaded2;
        }
      }
      const loaded = pjHasModule && await _tryAwaitImport(lambdaStylePath, ".js") || await _tryAwaitImport(lambdaStylePath, ".mjs") || _tryRequireFile(lambdaStylePath, ".cjs");
      if (loaded) {
        return loaded;
      }
      verbose2(
        "Try loading as commonjs: ",
        module3,
        " with path(s): ",
        appRoot,
        moduleRoot
      );
      const nodeStylePath = require.resolve(module3, {
        paths: [appRoot, moduleRoot]
      });
      return require(nodeStylePath);
    }
    async function _loadUserApp(appRoot, moduleRoot, module3) {
      if (!NoGlobalAwsLambda) {
        globalThis.awslambda = {
          streamifyResponse: (handler2, options) => {
            handler2[HANDLER_STREAMING] = STREAM_RESPONSE;
            if (typeof options?.highWaterMark === "number") {
              handler2[HANDLER_HIGHWATERMARK] = parseInt(options.highWaterMark);
            }
            return handler2;
          },
          HttpResponseStream
        };
      }
      try {
        return await _tryRequire(appRoot, moduleRoot, module3);
      } catch (e5) {
        if (e5 instanceof SyntaxError) {
          throw new UserCodeSyntaxError(e5);
        } else if (e5.code !== void 0 && e5.code === "MODULE_NOT_FOUND") {
          verbose2("globalPaths", JSON.stringify(require("module").globalPaths));
          throw new ImportModuleError(e5);
        } else {
          throw e5;
        }
      }
    }
    function _throwIfInvalidHandler(fullHandlerString) {
      if (fullHandlerString.includes(RELATIVE_PATH_SUBSTRING)) {
        throw new MalformedHandlerName(
          `'${fullHandlerString}' is not a valid handler name. Use absolute paths when specifying root directories in handler names.`
        );
      }
    }
    function _isHandlerStreaming(handler2) {
      if (typeof handler2[HANDLER_STREAMING] === "undefined" || handler2[HANDLER_STREAMING] === null || handler2[HANDLER_STREAMING] === false) {
        return false;
      }
      if (handler2[HANDLER_STREAMING] === STREAM_RESPONSE) {
        return STREAM_RESPONSE;
      } else {
        throw new MalformedStreamingHandler(
          "Only response streaming is supported."
        );
      }
    }
    function _highWaterMark(handler2) {
      if (typeof handler2[HANDLER_HIGHWATERMARK] === "undefined" || handler2[HANDLER_HIGHWATERMARK] === null || handler2[HANDLER_HIGHWATERMARK] === false) {
        return void 0;
      }
      const hwm = parseInt(handler2[HANDLER_HIGHWATERMARK]);
      return isNaN(hwm) ? void 0 : hwm;
    }
    module2.exports.load = async function(appRoot, fullHandlerString) {
      _throwIfInvalidHandler(fullHandlerString);
      let [moduleRoot, moduleAndHandler] = _moduleRootAndHandler(fullHandlerString);
      let [module3, handlerPath] = _splitHandlerString(moduleAndHandler);
      let userApp = await _loadUserApp(appRoot, moduleRoot, module3);
      let handlerFunc = _resolveHandler(userApp, handlerPath);
      if (!handlerFunc) {
        throw new HandlerNotFound(
          `${fullHandlerString} is undefined or not exported`
        );
      }
      if (typeof handlerFunc !== "function") {
        throw new HandlerNotFound(`${fullHandlerString} is not a function`);
      }
      return handlerFunc;
    };
    module2.exports.isHandlerFunction = function(value) {
      return typeof value === "function";
    };
    module2.exports.getHandlerMetadata = function(handlerFunc) {
      return {
        streaming: _isHandlerStreaming(handlerFunc),
        highWaterMark: _highWaterMark(handlerFunc)
      };
    };
    module2.exports.STREAM_RESPONSE = STREAM_RESPONSE;
  }
});

// interceptor.ts
var interceptor_exports = {};
__export(interceptor_exports, {
  handler: () => handler
});
module.exports = __toCommonJS(interceptor_exports);
var crypto2 = __toESM(require("crypto"));

// ../ioTService.ts
var iot = __toESM(require_aws_iot_device_sdk(), 1);

// ../utils/splitIoTMessage.ts
function splitMessageToChunks(input) {
  const id = Math.random().toString();
  const json = JSON.stringify(input);
  const parts = [];
  const partSize = 5e4;
  for (let i5 = 0; i5 < json.length; i5 += partSize) {
    parts.push(json.substring(i5, i5 + partSize));
  }
  if (!parts) return [];
  const fragments = parts.map(
    (part, index) => ({
      id,
      index,
      count: parts?.length,
      data: part
    })
  );
  return fragments;
}

// ../ioTService.ts
var import_client_iot = __toESM(require_dist_cjs56(), 1);

// ../../node_modules/chalk/source/vendor/ansi-styles/index.js
var ANSI_BACKGROUND_OFFSET = 10;
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
var styles = {
  modifier: {
    reset: [0, 0],
    // 21 isn't widely supported and 22 does the same thing
    bold: [1, 22],
    dim: [2, 22],
    italic: [3, 23],
    underline: [4, 24],
    overline: [53, 55],
    inverse: [7, 27],
    hidden: [8, 28],
    strikethrough: [9, 29]
  },
  color: {
    black: [30, 39],
    red: [31, 39],
    green: [32, 39],
    yellow: [33, 39],
    blue: [34, 39],
    magenta: [35, 39],
    cyan: [36, 39],
    white: [37, 39],
    // Bright color
    blackBright: [90, 39],
    gray: [90, 39],
    // Alias of `blackBright`
    grey: [90, 39],
    // Alias of `blackBright`
    redBright: [91, 39],
    greenBright: [92, 39],
    yellowBright: [93, 39],
    blueBright: [94, 39],
    magentaBright: [95, 39],
    cyanBright: [96, 39],
    whiteBright: [97, 39]
  },
  bgColor: {
    bgBlack: [40, 49],
    bgRed: [41, 49],
    bgGreen: [42, 49],
    bgYellow: [43, 49],
    bgBlue: [44, 49],
    bgMagenta: [45, 49],
    bgCyan: [46, 49],
    bgWhite: [47, 49],
    // Bright color
    bgBlackBright: [100, 49],
    bgGray: [100, 49],
    // Alias of `bgBlackBright`
    bgGrey: [100, 49],
    // Alias of `bgBlackBright`
    bgRedBright: [101, 49],
    bgGreenBright: [102, 49],
    bgYellowBright: [103, 49],
    bgBlueBright: [104, 49],
    bgMagentaBright: [105, 49],
    bgCyanBright: [106, 49],
    bgWhiteBright: [107, 49]
  }
};
var modifierNames = Object.keys(styles.modifier);
var foregroundColorNames = Object.keys(styles.color);
var backgroundColorNames = Object.keys(styles.bgColor);
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
function assembleStyles() {
  const codes = /* @__PURE__ */ new Map();
  for (const [groupName, group] of Object.entries(styles)) {
    for (const [styleName, style] of Object.entries(group)) {
      styles[styleName] = {
        open: `\x1B[${style[0]}m`,
        close: `\x1B[${style[1]}m`
      };
      group[styleName] = styles[styleName];
      codes.set(style[0], style[1]);
    }
    Object.defineProperty(styles, groupName, {
      value: group,
      enumerable: false
    });
  }
  Object.defineProperty(styles, "codes", {
    value: codes,
    enumerable: false
  });
  styles.color.close = "\x1B[39m";
  styles.bgColor.close = "\x1B[49m";
  styles.color.ansi = wrapAnsi16();
  styles.color.ansi256 = wrapAnsi256();
  styles.color.ansi16m = wrapAnsi16m();
  styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
  styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
  styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
  Object.defineProperties(styles, {
    rgbToAnsi256: {
      value(red, green, blue) {
        if (red === green && green === blue) {
          if (red < 8) {
            return 16;
          }
          if (red > 248) {
            return 231;
          }
          return Math.round((red - 8) / 247 * 24) + 232;
        }
        return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
      },
      enumerable: false
    },
    hexToRgb: {
      value(hex) {
        const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
        if (!matches) {
          return [0, 0, 0];
        }
        let [colorString] = matches;
        if (colorString.length === 3) {
          colorString = [...colorString].map((character) => character + character).join("");
        }
        const integer = Number.parseInt(colorString, 16);
        return [
          /* eslint-disable no-bitwise */
          integer >> 16 & 255,
          integer >> 8 & 255,
          integer & 255
          /* eslint-enable no-bitwise */
        ];
      },
      enumerable: false
    },
    hexToAnsi256: {
      value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
      enumerable: false
    },
    ansi256ToAnsi: {
      value(code) {
        if (code < 8) {
          return 30 + code;
        }
        if (code < 16) {
          return 90 + (code - 8);
        }
        let red;
        let green;
        let blue;
        if (code >= 232) {
          red = ((code - 232) * 10 + 8) / 255;
          green = red;
          blue = red;
        } else {
          code -= 16;
          const remainder = code % 36;
          red = Math.floor(code / 36) / 5;
          green = Math.floor(remainder / 6) / 5;
          blue = remainder % 6 / 5;
        }
        const value = Math.max(red, green, blue) * 2;
        if (value === 0) {
          return 30;
        }
        let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
        if (value === 2) {
          result += 60;
        }
        return result;
      },
      enumerable: false
    },
    rgbToAnsi: {
      value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
      enumerable: false
    },
    hexToAnsi: {
      value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
      enumerable: false
    }
  });
  return styles;
}
var ansiStyles = assembleStyles();
var ansi_styles_default = ansiStyles;

// ../../node_modules/chalk/source/vendor/supports-color/index.js
var import_node_process = __toESM(require("node:process"), 1);
var import_node_os = __toESM(require("node:os"), 1);
var import_node_tty = __toESM(require("node:tty"), 1);
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
  const position = argv.indexOf(prefix + flag);
  const terminatorPosition = argv.indexOf("--");
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
}
var { env } = import_node_process.default;
var flagForceColor;
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
  flagForceColor = 0;
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
  flagForceColor = 1;
}
function envForceColor() {
  if ("FORCE_COLOR" in env) {
    if (env.FORCE_COLOR === "true") {
      return 1;
    }
    if (env.FORCE_COLOR === "false") {
      return 0;
    }
    return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
  }
}
function translateLevel(level) {
  if (level === 0) {
    return false;
  }
  return {
    level,
    hasBasic: true,
    has256: level >= 2,
    has16m: level >= 3
  };
}
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
  const noFlagForceColor = envForceColor();
  if (noFlagForceColor !== void 0) {
    flagForceColor = noFlagForceColor;
  }
  const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
  if (forceColor === 0) {
    return 0;
  }
  if (sniffFlags) {
    if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
      return 3;
    }
    if (hasFlag("color=256")) {
      return 2;
    }
  }
  if ("TF_BUILD" in env && "AGENT_NAME" in env) {
    return 1;
  }
  if (haveStream && !streamIsTTY && forceColor === void 0) {
    return 0;
  }
  const min = forceColor || 0;
  if (env.TERM === "dumb") {
    return min;
  }
  if (import_node_process.default.platform === "win32") {
    const osRelease = import_node_os.default.release().split(".");
    if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
      return Number(osRelease[2]) >= 14931 ? 3 : 2;
    }
    return 1;
  }
  if ("CI" in env) {
    if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
      return 3;
    }
    if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
      return 1;
    }
    return min;
  }
  if ("TEAMCITY_VERSION" in env) {
    return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  }
  if (env.COLORTERM === "truecolor") {
    return 3;
  }
  if (env.TERM === "xterm-kitty") {
    return 3;
  }
  if (env.TERM === "xterm-ghostty") {
    return 3;
  }
  if (env.TERM === "wezterm") {
    return 3;
  }
  if ("TERM_PROGRAM" in env) {
    const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
    switch (env.TERM_PROGRAM) {
      case "iTerm.app": {
        return version >= 3 ? 3 : 2;
      }
      case "Apple_Terminal": {
        return 2;
      }
    }
  }
  if (/-256(color)?$/i.test(env.TERM)) {
    return 2;
  }
  if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
    return 1;
  }
  if ("COLORTERM" in env) {
    return 1;
  }
  return min;
}
function createSupportsColor(stream, options = {}) {
  const level = _supportsColor(stream, {
    streamIsTTY: stream && stream.isTTY,
    ...options
  });
  return translateLevel(level);
}
var supportsColor = {
  stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
  stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
};
var supports_color_default = supportsColor;

// ../../node_modules/chalk/source/utilities.js
function stringReplaceAll(string, substring, replacer) {
  let index = string.indexOf(substring);
  if (index === -1) {
    return string;
  }
  const substringLength = substring.length;
  let endIndex = 0;
  let returnValue = "";
  do {
    returnValue += string.slice(endIndex, index) + substring + replacer;
    endIndex = index + substringLength;
    index = string.indexOf(substring, endIndex);
  } while (index !== -1);
  returnValue += string.slice(endIndex);
  return returnValue;
}
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
  let endIndex = 0;
  let returnValue = "";
  do {
    const gotCR = string[index - 1] === "\r";
    returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
    endIndex = index + 1;
    index = string.indexOf("\n", endIndex);
  } while (index !== -1);
  returnValue += string.slice(endIndex);
  return returnValue;
}

// ../../node_modules/chalk/source/index.js
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
var GENERATOR = /* @__PURE__ */ Symbol("GENERATOR");
var STYLER = /* @__PURE__ */ Symbol("STYLER");
var IS_EMPTY = /* @__PURE__ */ Symbol("IS_EMPTY");
var levelMapping = [
  "ansi",
  "ansi",
  "ansi256",
  "ansi16m"
];
var styles2 = /* @__PURE__ */ Object.create(null);
var applyOptions = (object, options = {}) => {
  if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
    throw new Error("The `level` option should be an integer from 0 to 3");
  }
  const colorLevel = stdoutColor ? stdoutColor.level : 0;
  object.level = options.level === void 0 ? colorLevel : options.level;
};
var chalkFactory = (options) => {
  const chalk2 = (...strings) => strings.join(" ");
  applyOptions(chalk2, options);
  Object.setPrototypeOf(chalk2, createChalk.prototype);
  return chalk2;
};
function createChalk(options) {
  return chalkFactory(options);
}
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
  styles2[styleName] = {
    get() {
      const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
      Object.defineProperty(this, styleName, { value: builder });
      return builder;
    }
  };
}
styles2.visible = {
  get() {
    const builder = createBuilder(this, this[STYLER], true);
    Object.defineProperty(this, "visible", { value: builder });
    return builder;
  }
};
var getModelAnsi = (model, level, type, ...arguments_) => {
  if (model === "rgb") {
    if (level === "ansi16m") {
      return ansi_styles_default[type].ansi16m(...arguments_);
    }
    if (level === "ansi256") {
      return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
    }
    return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
  }
  if (model === "hex") {
    return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
  }
  return ansi_styles_default[type][model](...arguments_);
};
var usedModels = ["rgb", "hex", "ansi256"];
for (const model of usedModels) {
  styles2[model] = {
    get() {
      const { level } = this;
      return function(...arguments_) {
        const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
        return createBuilder(this, styler, this[IS_EMPTY]);
      };
    }
  };
  const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
  styles2[bgModel] = {
    get() {
      const { level } = this;
      return function(...arguments_) {
        const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
        return createBuilder(this, styler, this[IS_EMPTY]);
      };
    }
  };
}
var proto = Object.defineProperties(() => {
}, {
  ...styles2,
  level: {
    enumerable: true,
    get() {
      return this[GENERATOR].level;
    },
    set(level) {
      this[GENERATOR].level = level;
    }
  }
});
var createStyler = (open, close, parent) => {
  let openAll;
  let closeAll;
  if (parent === void 0) {
    openAll = open;
    closeAll = close;
  } else {
    openAll = parent.openAll + open;
    closeAll = close + parent.closeAll;
  }
  return {
    open,
    close,
    openAll,
    closeAll,
    parent
  };
};
var createBuilder = (self2, _styler, _isEmpty) => {
  const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
  Object.setPrototypeOf(builder, proto);
  builder[GENERATOR] = self2;
  builder[STYLER] = _styler;
  builder[IS_EMPTY] = _isEmpty;
  return builder;
};
var applyStyle = (self2, string) => {
  if (self2.level <= 0 || !string) {
    return self2[IS_EMPTY] ? "" : string;
  }
  let styler = self2[STYLER];
  if (styler === void 0) {
    return string;
  }
  const { openAll, closeAll } = styler;
  if (string.includes("\x1B")) {
    while (styler !== void 0) {
      string = stringReplaceAll(string, styler.close, styler.open);
      styler = styler.parent;
    }
  }
  const lfIndex = string.indexOf("\n");
  if (lfIndex !== -1) {
    string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
  }
  return openAll + string + closeAll;
};
Object.defineProperties(createChalk.prototype, styles2);
var chalk = createChalk();
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
var source_default = chalk;

// ../logger.ts
var verboseEnabled = false;
function log(...args) {
  args = args.map((arg) => {
    if (typeof arg === "string") {
      return arg.replace(/\[(.*?)\]/g, (match) => source_default.gray(match));
    }
    return arg;
  });
  console.log(...args);
}
function important(...args) {
  args = args.map((arg) => typeof arg === "string" ? source_default.yellow(arg) : arg);
  console.log(...args);
}
function error2(...args) {
  args = args.map((arg) => typeof arg === "string" ? source_default.red(arg) : arg);
  console.error(...args);
}
function warn(...args) {
  args = args.map((arg) => typeof arg === "string" ? source_default.yellow(arg) : arg);
  console.warn(...args);
}
function info(...args) {
  args = args.map(
    (arg) => typeof arg === "string" ? source_default.greenBright(arg) : arg
  );
  console.info(...args);
}
function verbose(...args) {
  if (verboseEnabled) {
    args = args.map((arg) => typeof arg === "string" ? source_default.grey(arg) : arg);
    console.info(...args);
  }
}
function setVerbose(enabled) {
  verboseEnabled = enabled;
}
function isVerbose() {
  return verboseEnabled;
}
var Logger = {
  log,
  error: error2,
  warn,
  important,
  info,
  verbose,
  setVerbose,
  isVerbose
};

// ../ioTService.ts
var device2;
var chunks = /* @__PURE__ */ new Map();
async function getIoTEndpoint({
  region,
  credentials
}) {
  const iot2 = new import_client_iot.IoTClient({
    region,
    credentials
  });
  const response = await iot2.send(
    new import_client_iot.DescribeEndpointCommand({
      endpointType: "iot:Data-ATS"
    })
  );
  if (!response.endpointAddress)
    throw new Error("IoT Endpoint address not found");
  return response.endpointAddress;
}
var connectedPromiseResolve;
var connectedPromise = new Promise((resolve) => {
  connectedPromiseResolve = resolve;
});
async function connect(props) {
  const credentials = props?.credentialsProvider ? await props.credentialsProvider() : void 0;
  const endpoint = await getIoTEndpoint({
    region: props?.region,
    credentials
  });
  device2 = new iot.device({
    protocol: "wss",
    host: endpoint,
    reconnectPeriod: 1,
    keepalive: 60,
    region: props?.region,
    accessKeyId: credentials?.accessKeyId,
    secretKey: credentials?.secretAccessKey,
    sessionToken: credentials?.sessionToken
  });
  if (props?.topic) {
    device2.subscribe(props.topic, { qos: 1 });
    Logger.verbose("[IoT] Subscribed to topic ", props.topic);
  }
  device2.on("connect", () => {
    Logger.verbose("[IoT] Connected");
    connectedPromiseResolve();
  });
  device2.on("error", (err) => {
    Logger.error("[IoT] Error", err);
  });
  device2.on("close", () => {
    Logger.verbose("[IoT] Closed");
  });
  device2.on("reconnect", () => {
    Logger.verbose("[IoT] Reconnecting...");
  });
  if (props?.onMessage) {
    const messageReceived = (topic2, buffer) => {
      const chunk = JSON.parse(buffer.toString());
      if (!chunk.id) {
        throw new Error("Invalid fragment");
      }
      let pending = chunks.get(chunk.id);
      if (!pending) {
        pending = /* @__PURE__ */ new Map();
        chunks.set(chunk.id, pending);
      }
      pending.set(chunk.index, chunk);
      if (pending.size === chunk.count) {
        const data2 = [...pending.values()].sort((a5, b5) => a5.index - b5.index).map((item) => item.data).join("");
        chunks.delete(chunk.id);
        const evt = JSON.parse(data2);
        props.onMessage(evt);
      }
    };
    device2.on("message", messageReceived);
  }
  await connectedPromise;
  return {
    publish: async (payload2, topic2) => {
      await connectedPromise;
      for (const fragment of splitMessageToChunks(payload2)) {
        await new Promise((r5) => {
          device2.publish(
            topic2,
            JSON.stringify(fragment),
            {
              qos: 1
            },
            () => {
              r5();
            }
          );
        });
      }
    }
  };
}
var IoTService = {
  connect
};

// interceptor.ts
var workerId = crypto2.randomBytes(16).toString("hex");
var topic = `${process.env.LLD_DEBUGGER_ID}/events/${workerId}`;
var ORIGINAL_HANDLER_KEY = "ORIGINAL_HANDLER";
var originalHandlerName = process.env[ORIGINAL_HANDLER_KEY];
var observableInterval = process.env.LLD_OBSERVABLE_INTERVAL ? parseInt(process.env.LLD_OBSERVABLE_INTERVAL) : 0;
var lastObservableInvoke;
if (process.env.LLD_VERBOSE === "true") {
  Logger.setVerbose(true);
  process.env.AWS_LAMBDA_RUNTIME_VERBOSE = "3";
}
async function handler(event, context) {
  if (process.env.LLD_OBSERVABLE_MODE === "true") {
    return await observableMode(context, event);
  } else {
    return await regularMode(context, event);
  }
}
async function regularMode(context, event) {
  let promiseResolve;
  let promiseReject;
  const promise = new Promise((resolve, reject) => {
    promiseResolve = resolve;
    promiseReject = reject;
  });
  const timeout = setTimeout(() => {
    promiseResolve({
      statusCode: 500,
      body: "The function's in live debug mode but it hasn't heard back from your machine yet. If this is the first time you're trying out Lambda Live Debugger on this AWS account, AWS might need around 10 minutes to get everything ready. Hang tight and check back in a bit!"
    });
  }, 5 * 1e3);
  const ioTService = await IoTService.connect({
    onMessage: async (message) => {
      if (Logger.isVerbose()) {
        Logger.verbose("IoT message", message);
      } else {
        Logger.log("IoT message", message.type);
      }
      if (message.type === "PING") {
        if (message.data.workerId === workerId) {
          Logger.log("Pinged by the debugger");
          clearTimeout(timeout);
        }
      }
      if (["SUCCESS", "ERROR"].includes(message.type)) {
        if (message.data.workerId === workerId) {
          clearTimeout(timeout);
        }
      }
      if (message.type === "SUCCESS") {
        promiseResolve(message.data.body);
      }
      if (message.type === "ERROR") {
        const error3 = new Error(message.data?.errorMessage ?? "Unknown error");
        if (message.data?.trace) {
          error3.stack = message.data.trace;
        }
        promiseReject(error3);
      }
    },
    topic
  });
  const payload2 = {
    type: "INVOKE",
    data: {
      workerId,
      requestId: context.awsRequestId,
      functionId: process.env.LLD_FUNCTION_ID,
      deadline: context.getRemainingTimeInMillis(),
      event,
      context,
      env: process.env
    }
  };
  if (Logger.isVerbose()) {
    Logger.verbose(
      `Publishing to IoT ${process.env.LLD_DEBUGGER_ID}/events`,
      payload2
    );
  } else {
    Logger.log(`Publishing to IoT ${process.env.LLD_DEBUGGER_ID}/events`);
  }
  await ioTService.publish(payload2, `${process.env.LLD_DEBUGGER_ID}/events`);
  return promise;
}
async function observableMode(context, event) {
  let regularHandler = void 0;
  if (process.env.LLD_INITIAL_AWS_LAMBDA_EXEC_WRAPPER) {
    try {
      Logger.log(
        `Another extensions exists ${process.env.LLD_INITIAL_AWS_LAMBDA_EXEC_WRAPPER}.`
      );
      const { promisify } = require("util");
      const exec = require("child_process").exec;
      const execAsync = promisify(exec);
      const fs = require("fs/promises");
      const originalScript = await fs.readFile(
        process.env.LLD_INITIAL_AWS_LAMBDA_EXEC_WRAPPER,
        "utf8"
      );
      Logger.verbose("Original script", originalScript);
      const script = `export _HANDLER=${process.env.ORIGINAL_HANDLER}
                      ${originalScript}
                      echo _HANDLER=$_HANDLER`;
      Logger.verbose("Execute script", script);
      const response2 = await execAsync(script);
      Logger.verbose(`Output of the script: ${response2.stdout}`);
      const handlerLine = response2.stdout.split("\n").find((line) => line.startsWith("_HANDLER"));
      const oldHandler = handlerLine.split("=")[1];
      Logger.verbose(`Getting handler "${oldHandler}" for another extension`);
      regularHandler = async () => {
        const handler2 = await getOriginalHandler(oldHandler);
        return await handler2(event, context);
      };
    } catch (e5) {
      Logger.error(
        `Error while running the initial AWS_LAMBDA_EXEC_WRAPPER: ${e5.message}`,
        e5
      );
    }
  }
  if (!regularHandler) {
    regularHandler = async () => {
      const handler2 = await getOriginalHandler(originalHandlerName);
      return await handler2(event, context);
    };
  }
  const observableHandler = async () => {
    if (observableInterval > 0) {
      if (lastObservableInvoke) {
        const diff = Date.now() - lastObservableInvoke;
        if (diff < observableInterval) {
          return;
        }
      }
      lastObservableInvoke = Date.now();
    }
    const ioTService = await IoTService.connect();
    const payload2 = {
      type: "INVOKE",
      data: {
        workerId,
        requestId: context.awsRequestId,
        functionId: process.env.LLD_FUNCTION_ID,
        deadline: context.getRemainingTimeInMillis(),
        event,
        context,
        env: process.env
      }
    };
    if (Logger.isVerbose()) {
      Logger.verbose(
        `Publishing to IoT ${process.env.LLD_DEBUGGER_ID}/events`,
        payload2
      );
    } else {
      Logger.log(`Publishing to IoT ${process.env.LLD_DEBUGGER_ID}/events`);
    }
    await ioTService.publish(payload2, `${process.env.LLD_DEBUGGER_ID}/events`);
  };
  const regularHandlerPromise = regularHandler();
  const observableHandlerPromise = observableHandler();
  await observableHandlerPromise;
  const response = await regularHandlerPromise;
  return response;
}
async function getOriginalHandler(originalHandlerName2) {
  Logger.verbose("Original handler:", originalHandlerName2);
  const { load } = await Promise.resolve().then(() => __toESM(require_UserFunction()));
  if (originalHandlerName2 === void 0)
    throw Error("Missing original handler");
  return load(
    process.env.LAMBDA_TASK_ROOT,
    originalHandlerName2
  );
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  handler
});
/*! Bundled license information:

safe-buffer/index.js:
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
*/
//# sourceMappingURL=interceptor.js.map
