import CJS_COMPAT_NODE_URL from 'node:url';
import CJS_COMPAT_NODE_PATH from 'node:path';
import CJS_COMPAT_NODE_MODULE from "node:module";

const __filename = CJS_COMPAT_NODE_URL.fileURLToPath(import.meta.url);
const __dirname = CJS_COMPAT_NODE_PATH.dirname(__filename);
const require = CJS_COMPAT_NODE_MODULE.createRequire(import.meta.url);
// ------------------------------------------------------------
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
// ------------------------------------------------------------
import {
  a as i
} from "./chunk-HRN2KQZP.js";

// ../node_modules/yocto-queue/index.js
var s = class {
  static {
    i(this, "Node");
  }
  value;
  next;
  constructor(e) {
    this.value = e;
  }
}, h = class {
  static {
    i(this, "Queue");
  }
  #e;
  #t;
  #i;
  constructor() {
    this.clear();
  }
  enqueue(e) {
    let t = new s(e);
    this.#e ? (this.#t.next = t, this.#t = t) : (this.#e = t, this.#t = t), this.#i++;
  }
  dequeue() {
    let e = this.#e;
    if (e)
      return this.#e = this.#e.next, this.#i--, e.value;
  }
  peek() {
    if (this.#e)
      return this.#e.value;
  }
  clear() {
    this.#e = void 0, this.#t = void 0, this.#i = 0;
  }
  get size() {
    return this.#i;
  }
  *[Symbol.iterator]() {
    let e = this.#e;
    for (; e; )
      yield e.value, e = e.next;
  }
  *drain() {
    for (; this.#e; )
      yield this.dequeue();
  }
};

export {
  h as a
};
