(() => {
"use strict";
var __webpack_modules__ = ({
464() {

;// CONCATENATED MODULE: ./packages/anywidget/src/model-proxy.ts
/**
 * This is a trick so that we can cleanup event listeners added
 * by the user-defined function.
 */ var INITIALIZE_MARKER = Symbol("anywidget.initialize");
/**
 * Prunes the view down to the minimum context necessary.
 *
 * Calls to `model.get` and `model.set` automatically add the
 * `context`, so we can gracefully unsubscribe from events
 * added by user-defined hooks.
 */ function model_proxy_modelProxy(model, context) {
    // oxlint-disable-next-line typescript-eslint/no-unsafe-type-assertion -- DOMWidgetModel.get/set/on/off have wider signatures than AnyModel, so bound versions don't narrow cleanly; the shape is structurally compatible
    return {
        get: model.get.bind(model),
        set: model.set.bind(model),
        save_changes: model.save_changes.bind(model),
        send: model.send.bind(model),
        on: function on(name, callback) {
            model.on(name, callback, context);
        },
        off: function off(name, callback) {
            model.off(name, callback, context);
        },
        // The widget_manager type is wider than what we want to expose to
        // developers. In a future version, we will expose a more limited API but
        // that can wait for a minor version bump.
        widget_manager: model.widget_manager
    };
}

;// CONCATENATED MODULE: ./packages/anywidget/src/util.ts
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
    try {
        var info = gen[key](arg);
        var value = info.value;
    } catch (error) {
        reject(error);
        return;
    }
    if (info.done) {
        resolve(value);
    } else {
        Promise.resolve(value).then(_next, _throw);
    }
}
function _async_to_generator(fn) {
    return function() {
        var self = this, args = arguments;
        return new Promise(function(resolve, reject) {
            var gen = fn.apply(self, args);
            function _next(value) {
                asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
            }
            function _throw(err) {
                asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
            }
            _next(undefined);
        });
    };
}
function _instanceof(left, right) {
    "@swc/helpers - instanceof";
    if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
        return !!right[Symbol.hasInstance](left);
    } else {
        return left instanceof right;
    }
}
function _ts_generator(thisArg, body) {
    var f, y, t, _ = {
        label: 0,
        sent: function() {
            if (t[0] & 1) throw t[1];
            return t[1];
        },
        trys: [],
        ops: []
    }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
    return d(g, "next", {
        value: verb(0)
    }), d(g, "throw", {
        value: verb(1)
    }), d(g, "return", {
        value: verb(2)
    }), typeof Symbol === "function" && d(g, Symbol.iterator, {
        value: function() {
            return this;
        }
    }), g;
    function verb(n) {
        return function(v) {
            return step([
                n,
                v
            ]);
        };
    }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while(g && (g = 0, op[0] && (_ = 0)), _)try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [
                op[0] & 2,
                t.value
            ];
            switch(op[0]){
                case 0:
                case 1:
                    t = op;
                    break;
                case 4:
                    _.label++;
                    return {
                        value: op[1],
                        done: false
                    };
                case 5:
                    _.label++;
                    y = op[1];
                    op = [
                        0
                    ];
                    continue;
                case 7:
                    op = _.ops.pop();
                    _.trys.pop();
                    continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
                        _ = 0;
                        continue;
                    }
                    if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
                        _.label = op[1];
                        break;
                    }
                    if (op[0] === 6 && _.label < t[1]) {
                        _.label = t[1];
                        t = op;
                        break;
                    }
                    if (t && _.label < t[2]) {
                        _.label = t[2];
                        _.ops.push(op);
                        break;
                    }
                    if (t[2]) _.ops.pop();
                    _.trys.pop();
                    continue;
            }
            op = body.call(thisArg, _);
        } catch (e) {
            op = [
                6,
                e
            ];
            y = 0;
        } finally{
            f = t = 0;
        }
        if (op[0] & 5) throw op[1];
        return {
            value: op[0] ? op[1] : void 0,
            done: true
        };
    }
}
function util_assert(condition, message) {
    if (!condition) throw new Error(message);
}
function safeCleanup(fn, kind) {
    return _async_to_generator(function() {
        return _ts_generator(this, function(_state) {
            return [
                2,
                Promise.resolve().then(function() {
                    return fn === null || fn === void 0 ? void 0 : fn();
                }).catch(function(e) {
                    return console.warn("[anywidget] error cleaning up ".concat(kind, "."), e);
                })
            ];
        });
    })();
}
/**
 * Cleans up the stack trace at anywidget boundary.
 * You can fully inspect the entire stack trace in the console interactively,
 * but the initial error message is cleaned up to be more user-friendly.
 */ function util_throwAnywidgetError(source) {
    var _ref;
    var _source_stack;
    if (!_instanceof(source, Error)) {
        // Don't know what to do with this.
        throw source;
    }
    var lines = (_ref = (_source_stack = source.stack) === null || _source_stack === void 0 ? void 0 : _source_stack.split("\n")) !== null && _ref !== void 0 ? _ref : [];
    var anywidgetIndex = lines.findIndex(function(line) {
        return line.includes("anywidget");
    });
    var cleanStack = anywidgetIndex === -1 ? lines : lines.slice(0, anywidgetIndex + 1);
    source.stack = cleanStack.join("\n");
    console.error(source);
    throw source;
}
/**
 * Polyfill for {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers Promise.withResolvers}
 *
 * Trevor(2025-03-14): Should be able to remove once more stable across browsers.
 */ function util_promiseWithResolvers() {
    var resolve;
    var reject;
    var promise = new Promise(function(res, rej) {
        resolve = res;
        reject = rej;
    });
    return {
        promise: promise,
        resolve: resolve,
        reject: reject
    };
}

;// CONCATENATED MODULE: ./packages/anywidget/src/binding.ts
function binding_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
    try {
        var info = gen[key](arg);
        var value = info.value;
    } catch (error) {
        reject(error);
        return;
    }
    if (info.done) {
        resolve(value);
    } else {
        Promise.resolve(value).then(_next, _throw);
    }
}
function binding_async_to_generator(fn) {
    return function() {
        var self = this, args = arguments;
        return new Promise(function(resolve, reject) {
            var gen = fn.apply(self, args);
            function _next(value) {
                binding_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
            }
            function _throw(err) {
                binding_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
            }
            _next(undefined);
        });
    };
}
function _check_private_redeclaration(obj, privateCollection) {
    if (privateCollection.has(obj)) {
        throw new TypeError("Cannot initialize the same private elements twice on an object");
    }
}
function _class_apply_descriptor_get(receiver, descriptor) {
    if (descriptor.get) {
        return descriptor.get.call(receiver);
    }
    return descriptor.value;
}
function _class_apply_descriptor_set(receiver, descriptor, value) {
    if (descriptor.set) {
        descriptor.set.call(receiver, value);
    } else {
        if (!descriptor.writable) {
            throw new TypeError("attempted to set read only private field");
        }
        descriptor.value = value;
    }
}
function _class_call_check(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
    }
}
function _class_extract_field_descriptor(receiver, privateMap, action) {
    if (!privateMap.has(receiver)) {
        throw new TypeError("attempted to " + action + " private field on non-instance");
    }
    return privateMap.get(receiver);
}
function _class_private_field_get(receiver, privateMap) {
    var descriptor = _class_extract_field_descriptor(receiver, privateMap, "get");
    return _class_apply_descriptor_get(receiver, descriptor);
}
function _class_private_field_init(obj, privateMap, value) {
    _check_private_redeclaration(obj, privateMap);
    privateMap.set(obj, value);
}
function _class_private_field_set(receiver, privateMap, value) {
    var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set");
    _class_apply_descriptor_set(receiver, descriptor, value);
    return value;
}
function _defineProperties(target, props) {
    for(var i = 0; i < props.length; i++){
        var descriptor = props[i];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, descriptor.key, descriptor);
    }
}
function _create_class(Constructor, protoProps, staticProps) {
    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
    if (staticProps) _defineProperties(Constructor, staticProps);
    return Constructor;
}
function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _type_of(obj) {
    "@swc/helpers - typeof";
    return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
}
function binding_ts_generator(thisArg, body) {
    var f, y, t, _ = {
        label: 0,
        sent: function() {
            if (t[0] & 1) throw t[1];
            return t[1];
        },
        trys: [],
        ops: []
    }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
    return d(g, "next", {
        value: verb(0)
    }), d(g, "throw", {
        value: verb(1)
    }), d(g, "return", {
        value: verb(2)
    }), typeof Symbol === "function" && d(g, Symbol.iterator, {
        value: function() {
            return this;
        }
    }), g;
    function verb(n) {
        return function(v) {
            return step([
                n,
                v
            ]);
        };
    }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while(g && (g = 0, op[0] && (_ = 0)), _)try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [
                op[0] & 2,
                t.value
            ];
            switch(op[0]){
                case 0:
                case 1:
                    t = op;
                    break;
                case 4:
                    _.label++;
                    return {
                        value: op[1],
                        done: false
                    };
                case 5:
                    _.label++;
                    y = op[1];
                    op = [
                        0
                    ];
                    continue;
                case 7:
                    op = _.ops.pop();
                    _.trys.pop();
                    continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
                        _ = 0;
                        continue;
                    }
                    if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
                        _.label = op[1];
                        break;
                    }
                    if (op[0] === 6 && _.label < t[1]) {
                        _.label = t[1];
                        t = op;
                        break;
                    }
                    if (t && _.label < t[2]) {
                        _.label = t[2];
                        _.ops.push(op);
                        break;
                    }
                    if (t[2]) _.ops.pop();
                    _.trys.pop();
                    continue;
            }
            op = body.call(thisArg, _);
        } catch (e) {
            op = [
                6,
                e
            ];
            y = 0;
        } finally{
            f = t = 0;
        }
        if (op[0] & 5) throw op[1];
        return {
            value: op[0] ? op[1] : void 0,
            done: true
        };
    }
}


function isSafeCleanupFunction(x) {
    return typeof x === "function";
}
var binding_controller = /*#__PURE__*/ new WeakMap(), _widgetDef = /*#__PURE__*/ new WeakMap(), _exports = /*#__PURE__*/ new WeakMap(), _model = /*#__PURE__*/ new WeakMap(), _resolvers = /*#__PURE__*/ new WeakMap();
var binding_WidgetBinding = /*#__PURE__*/ function() {
    "use strict";
    function WidgetBinding(model) {
        _class_call_check(this, WidgetBinding);
        _class_private_field_init(this, binding_controller, {
            writable: true,
            value: void 0
        });
        _class_private_field_init(this, _widgetDef, {
            writable: true,
            value: void 0
        });
        _class_private_field_init(this, _exports, {
            writable: true,
            value: void 0
        });
        _class_private_field_init(this, _model, {
            writable: true,
            value: void 0
        });
        _define_property(this, "ready", void 0);
        _class_private_field_init(this, _resolvers, {
            writable: true,
            value: void 0
        });
        _class_private_field_set(this, _model, model);
        _class_private_field_set(this, _resolvers, util_promiseWithResolvers());
        this.ready = _class_private_field_get(this, _resolvers).promise;
    }
    _create_class(WidgetBinding, [
        {
            key: "bind",
            value: function bind(_0, _1) {
                return binding_async_to_generator(function(widgetDef, param) {
                    var experimental, _widgetDef_initialize, _$_class_private_field_get, prevResolvers, signal, model, result;
                    return binding_ts_generator(this, function(_state) {
                        switch(_state.label){
                            case 0:
                                experimental = param.experimental;
                                if (_class_private_field_get(this, _widgetDef) === widgetDef) return [
                                    2
                                ];
                                if (_class_private_field_get(this, _widgetDef) && _class_private_field_get(this, _widgetDef) !== widgetDef) {
                                    ;
                                    (_$_class_private_field_get = _class_private_field_get(this, binding_controller)) === null || _$_class_private_field_get === void 0 ? void 0 : _$_class_private_field_get.abort();
                                    // Settle the old promise so any awaiter that captured `this.ready`
                                    // (e.g. a parent's `host.getWidget` snapshot) unblocks instead of
                                    // hanging until the host's 10s timeout. No-op if already resolved.
                                    prevResolvers = _class_private_field_get(this, _resolvers);
                                    _class_private_field_set(this, _resolvers, util_promiseWithResolvers());
                                    this.ready = _class_private_field_get(this, _resolvers).promise;
                                    prevResolvers.promise.catch(function() {});
                                    prevResolvers.reject(new Error("[anywidget] widget bind aborted by re-bind"));
                                }
                                _class_private_field_set(this, _widgetDef, widgetDef);
                                _class_private_field_set(this, binding_controller, new AbortController());
                                signal = _class_private_field_get(this, binding_controller).signal;
                                model = _class_private_field_get(this, _model);
                                model.off(null, null, INITIALIZE_MARKER);
                                return [
                                    4,
                                    (_widgetDef_initialize = widgetDef.initialize) === null || _widgetDef_initialize === void 0 ? void 0 : _widgetDef_initialize.call(widgetDef, {
                                        model: model_proxy_modelProxy(model, INITIALIZE_MARKER),
                                        signal: signal,
                                        experimental: experimental
                                    })
                                ];
                            case 1:
                                result = _state.sent();
                                if (!signal.aborted) return [
                                    3,
                                    3
                                ];
                                return [
                                    4,
                                    safeCleanup(isSafeCleanupFunction(result) ? result : undefined, "esm update")
                                ];
                            case 2:
                                _state.sent();
                                return [
                                    2
                                ];
                            case 3:
                                if (isSafeCleanupFunction(result)) {
                                    signal.addEventListener("abort", function() {
                                        return safeCleanup(result, "esm update");
                                    });
                                    _class_private_field_set(this, _exports, undefined);
                                } else if ((typeof result === "undefined" ? "undefined" : _type_of(result)) === "object" && result !== null) {
                                    _class_private_field_set(this, _exports, result);
                                } else {
                                    _class_private_field_set(this, _exports, undefined);
                                }
                                _class_private_field_get(this, _resolvers).resolve(_class_private_field_get(this, _exports));
                                return [
                                    2
                                ];
                        }
                    });
                }).apply(this, arguments);
            }
        },
        {
            key: "createView",
            value: function createView(_0, _1) {
                return binding_async_to_generator(function(target, param) {
                    var signal, experimental, host, _$_class_private_field_get, controller, combined, model, cleanup, disposeView;
                    return binding_ts_generator(this, function(_state) {
                        switch(_state.label){
                            case 0:
                                signal = param.signal, experimental = param.experimental, host = param.host;
                                return [
                                    4,
                                    this.ready
                                ];
                            case 1:
                                _state.sent();
                                if (!((_$_class_private_field_get = _class_private_field_get(this, _widgetDef)) === null || _$_class_private_field_get === void 0 ? void 0 : _$_class_private_field_get.render)) return [
                                    2
                                ];
                                controller = new AbortController();
                                combined = AbortSignal.any([
                                    signal,
                                    controller.signal
                                ]);
                                model = _class_private_field_get(this, _model);
                                return [
                                    4,
                                    _class_private_field_get(this, _widgetDef).render({
                                        model: model_proxy_modelProxy(model, target),
                                        el: target.el,
                                        signal: combined,
                                        host: host,
                                        experimental: experimental
                                    })
                                ];
                            case 2:
                                cleanup = _state.sent();
                                disposeView = function disposeView(reason) {
                                    // Clear listeners keyed to this target. For ephemeral `{el}` targets
                                    // (host.getWidget().render), this prevents leaks across re-renders.
                                    model.off(null, null, target);
                                    void safeCleanup(cleanup, reason);
                                };
                                if (combined.aborted) {
                                    disposeView("dispose view - already aborted");
                                    return [
                                        2
                                    ];
                                }
                                combined.addEventListener("abort", function() {
                                    return disposeView("dispose view - aborted");
                                });
                                return [
                                    2
                                ];
                        }
                    });
                }).apply(this, arguments);
            }
        },
        {
            key: "exports",
            get: function get() {
                return _class_private_field_get(this, _exports);
            }
        },
        {
            key: "destroy",
            value: function destroy() {
                var _$_class_private_field_get;
                (_$_class_private_field_get = _class_private_field_get(this, binding_controller)) === null || _$_class_private_field_get === void 0 ? void 0 : _$_class_private_field_get.abort();
                _class_private_field_set(this, binding_controller, undefined);
                _class_private_field_set(this, _widgetDef, undefined);
            }
        }
    ]);
    return WidgetBinding;
}();
var _bindings = /*#__PURE__*/ new WeakMap();
var binding_BindingManager = /*#__PURE__*/ function() {
    "use strict";
    function BindingManager() {
        _class_call_check(this, BindingManager);
        _class_private_field_init(this, _bindings, {
            writable: true,
            value: new Map()
        });
    }
    _create_class(BindingManager, [
        {
            key: "getOrCreate",
            value: function getOrCreate(model) {
                var binding = _class_private_field_get(this, _bindings).get(model);
                if (!binding) {
                    binding = new binding_WidgetBinding(model);
                    _class_private_field_get(this, _bindings).set(model, binding);
                }
                return binding;
            }
        },
        {
            key: "get",
            value: function get(model) {
                return _class_private_field_get(this, _bindings).get(model);
            }
        },
        {
            key: "destroy",
            value: function destroy(model) {
                var binding = _class_private_field_get(this, _bindings).get(model);
                if (binding) {
                    binding.destroy();
                    _class_private_field_get(this, _bindings).delete(model);
                }
            }
        }
    ]);
    return BindingManager;
}();
var binding_BINDINGS = new binding_BindingManager();

;// CONCATENATED MODULE: ./node_modules/.pnpm/@lukeed+uuid@2.0.1/node_modules/@lukeed/uuid/dist/index.mjs
var IDX=256, HEX=[], BUFFER;
while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);

function v4() {
	var i=0, num, out='';

	if (!BUFFER || ((IDX + 16) > 256)) {
		BUFFER = Array(i=256);
		while (i--) BUFFER[i] = 256 * Math.random() | 0;
		i = IDX = 0;
	}

	for (; i < 16; i++) {
		num = BUFFER[IDX + i];
		if (i==6) out += HEX[num & 15 | 64];
		else if (i==8) out += HEX[num & 63 | 128];
		else out += HEX[num];

		if (i & 1 && i > 1 && i < 11) out += '-';
	}

	IDX++;
	return out;
}

;// CONCATENATED MODULE: ./packages/anywidget/src/invoke.ts

function invoke_invoke(model, name, msg) {
    var options = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
    var _options_signal;
    // crypto.randomUUID() is not available in non-secure contexts (i.e., http://)
    // so we use simple (non-secure) polyfill.
    var id = uuid.v4();
    var signal = (_options_signal = options.signal) !== null && _options_signal !== void 0 ? _options_signal : AbortSignal.timeout(3000);
    return new Promise(function(resolve, reject) {
        var _options_buffers;
        if (signal.aborted) {
            reject(signal.reason);
        }
        signal.addEventListener("abort", function() {
            model.off("msg:custom", handler);
            reject(signal.reason);
        });
        function handler(msg, buffers) {
            if (!(msg.id === id)) return;
            resolve([
                msg.response,
                buffers
            ]);
            model.off("msg:custom", handler);
        }
        model.on("msg:custom", handler);
        model.send({
            id: id,
            kind: "anywidget-command",
            name: name,
            msg: msg
        }, undefined, (_options_buffers = options.buffers) !== null && _options_buffers !== void 0 ? _options_buffers : []);
    });
}

;// CONCATENATED MODULE: ./packages/anywidget/src/host.ts
function host_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
    try {
        var info = gen[key](arg);
        var value = info.value;
    } catch (error) {
        reject(error);
        return;
    }
    if (info.done) {
        resolve(value);
    } else {
        Promise.resolve(value).then(_next, _throw);
    }
}
function host_async_to_generator(fn) {
    return function() {
        var self = this, args = arguments;
        return new Promise(function(resolve, reject) {
            var gen = fn.apply(self, args);
            function _next(value) {
                host_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
            }
            function _throw(err) {
                host_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
            }
            _next(undefined);
        });
    };
}
function host_ts_generator(thisArg, body) {
    var f, y, t, _ = {
        label: 0,
        sent: function() {
            if (t[0] & 1) throw t[1];
            return t[1];
        },
        trys: [],
        ops: []
    }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
    return d(g, "next", {
        value: verb(0)
    }), d(g, "throw", {
        value: verb(1)
    }), d(g, "return", {
        value: verb(2)
    }), typeof Symbol === "function" && d(g, Symbol.iterator, {
        value: function() {
            return this;
        }
    }), g;
    function verb(n) {
        return function(v) {
            return step([
                n,
                v
            ]);
        };
    }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while(g && (g = 0, op[0] && (_ = 0)), _)try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [
                op[0] & 2,
                t.value
            ];
            switch(op[0]){
                case 0:
                case 1:
                    t = op;
                    break;
                case 4:
                    _.label++;
                    return {
                        value: op[1],
                        done: false
                    };
                case 5:
                    _.label++;
                    y = op[1];
                    op = [
                        0
                    ];
                    continue;
                case 7:
                    op = _.ops.pop();
                    _.trys.pop();
                    continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
                        _ = 0;
                        continue;
                    }
                    if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
                        _.label = op[1];
                        break;
                    }
                    if (op[0] === 6 && _.label < t[1]) {
                        _.label = t[1];
                        t = op;
                        break;
                    }
                    if (t && _.label < t[2]) {
                        _.label = t[2];
                        _.ops.push(op);
                        break;
                    }
                    if (t[2]) _.ops.pop();
                    _.trys.pop();
                    continue;
            }
            op = body.call(thisArg, _);
        } catch (e) {
            op = [
                6,
                e
            ];
            y = 0;
        } finally{
            f = t = 0;
        }
        if (op[0] & 5) throw op[1];
        return {
            value: op[0] ? op[1] : void 0,
            done: true
        };
    }
}




function host_createHost(model, param) {
    var signal = param.signal;
    var host = {
        getModel: // @ts-expect-error - modelProxy returns AnyModel; generic T is erased at runtime
        function getModel(ref) {
            return host_async_to_generator(function() {
                var modelId, childModel, context;
                return host_ts_generator(this, function(_state) {
                    switch(_state.label){
                        case 0:
                            modelId = parseWidgetRef(ref);
                            return [
                                4,
                                model.widget_manager.get_model(modelId)
                            ];
                        case 1:
                            childModel = _state.sent();
                            context = Symbol("anywidget.host.getModel");
                            signal.addEventListener("abort", function() {
                                return childModel.off(null, null, context);
                            });
                            return [
                                2,
                                modelProxy(childModel, context)
                            ];
                    }
                });
            })();
        },
        getWidget: // @ts-expect-error - generic T is erased at runtime, exports typed as unknown
        function getWidget(ref) {
            return host_async_to_generator(function() {
                var modelId, childModel, childBinding, timer, exports;
                return host_ts_generator(this, function(_state) {
                    switch(_state.label){
                        case 0:
                            modelId = parseWidgetRef(ref);
                            return [
                                4,
                                model.widget_manager.get_model(modelId)
                            ];
                        case 1:
                            childModel = _state.sent();
                            childBinding = BINDINGS.get(childModel);
                            if (!childBinding) {
                                throw new Error("[anywidget] No binding found for widget ".concat(modelId));
                            }
                            return [
                                4,
                                new Promise(function(resolve, reject) {
                                    timer = setTimeout(function() {
                                        return reject(new Error("[anywidget] Timed out waiting for widget ".concat(modelId, " to initialize")));
                                    }, 10000);
                                    childBinding.ready.then(resolve, reject);
                                }).finally(function() {
                                    return clearTimeout(timer);
                                })
                            ];
                        case 2:
                            exports = _state.sent();
                            return [
                                2,
                                {
                                    exports: exports,
                                    render: function render(_0) {
                                        return host_async_to_generator(function(param) {
                                            var el, viewSignal, childViewSignal;
                                            return host_ts_generator(this, function(_state) {
                                                switch(_state.label){
                                                    case 0:
                                                        el = param.el, viewSignal = param.signal;
                                                        childViewSignal = viewSignal !== null && viewSignal !== void 0 ? viewSignal : signal;
                                                        return [
                                                            4,
                                                            childBinding.createView({
                                                                el: el
                                                            }, {
                                                                signal: childViewSignal,
                                                                experimental: {
                                                                    // @ts-expect-error - bind isn't working
                                                                    invoke: invoke.bind(null, childModel)
                                                                },
                                                                host: host
                                                            })
                                                        ];
                                                    case 1:
                                                        _state.sent();
                                                        return [
                                                            2
                                                        ];
                                                }
                                            });
                                        }).apply(this, arguments);
                                    }
                                }
                            ];
                    }
                });
            })();
        }
    };
    return host;
}

;// CONCATENATED MODULE: ./packages/anywidget/src/runtime.ts
function _array_like_to_array(arr, len) {
    if (len == null || len > arr.length) len = arr.length;
    for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
    return arr2;
}
function _array_with_holes(arr) {
    if (Array.isArray(arr)) return arr;
}
function runtime_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
    try {
        var info = gen[key](arg);
        var value = info.value;
    } catch (error) {
        reject(error);
        return;
    }
    if (info.done) {
        resolve(value);
    } else {
        Promise.resolve(value).then(_next, _throw);
    }
}
function runtime_async_to_generator(fn) {
    return function() {
        var self = this, args = arguments;
        return new Promise(function(resolve, reject) {
            var gen = fn.apply(self, args);
            function _next(value) {
                runtime_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
            }
            function _throw(err) {
                runtime_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
            }
            _next(undefined);
        });
    };
}
function runtime_check_private_redeclaration(obj, privateCollection) {
    if (privateCollection.has(obj)) {
        throw new TypeError("Cannot initialize the same private elements twice on an object");
    }
}
function runtime_class_apply_descriptor_get(receiver, descriptor) {
    if (descriptor.get) {
        return descriptor.get.call(receiver);
    }
    return descriptor.value;
}
function runtime_class_apply_descriptor_set(receiver, descriptor, value) {
    if (descriptor.set) {
        descriptor.set.call(receiver, value);
    } else {
        if (!descriptor.writable) {
            throw new TypeError("attempted to set read only private field");
        }
        descriptor.value = value;
    }
}
function runtime_class_call_check(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
    }
}
function runtime_class_extract_field_descriptor(receiver, privateMap, action) {
    if (!privateMap.has(receiver)) {
        throw new TypeError("attempted to " + action + " private field on non-instance");
    }
    return privateMap.get(receiver);
}
function runtime_class_private_field_get(receiver, privateMap) {
    var descriptor = runtime_class_extract_field_descriptor(receiver, privateMap, "get");
    return runtime_class_apply_descriptor_get(receiver, descriptor);
}
function runtime_class_private_field_init(obj, privateMap, value) {
    runtime_check_private_redeclaration(obj, privateMap);
    privateMap.set(obj, value);
}
function runtime_class_private_field_set(receiver, privateMap, value) {
    var descriptor = runtime_class_extract_field_descriptor(receiver, privateMap, "set");
    runtime_class_apply_descriptor_set(receiver, descriptor, value);
    return value;
}
function runtime_defineProperties(target, props) {
    for(var i = 0; i < props.length; i++){
        var descriptor = props[i];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, descriptor.key, descriptor);
    }
}
function runtime_create_class(Constructor, protoProps, staticProps) {
    if (protoProps) runtime_defineProperties(Constructor.prototype, protoProps);
    if (staticProps) runtime_defineProperties(Constructor, staticProps);
    return Constructor;
}
function runtime_define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _iterable_to_array_limit(arr, i) {
    var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
    if (_i == null) return;
    var _arr = [];
    var _n = true;
    var _d = false;
    var _s, _e;
    try {
        for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
            _arr.push(_s.value);
            if (i && _arr.length === i) break;
        }
    } catch (err) {
        _d = true;
        _e = err;
    } finally{
        try {
            if (!_n && _i["return"] != null) _i["return"]();
        } finally{
            if (_d) throw _e;
        }
    }
    return _arr;
}
function _non_iterable_rest() {
    throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _sliced_to_array(arr, i) {
    return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
}
function _unsupported_iterable_to_array(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return _array_like_to_array(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(n);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
}
function runtime_ts_generator(thisArg, body) {
    var f, y, t, _ = {
        label: 0,
        sent: function() {
            if (t[0] & 1) throw t[1];
            return t[1];
        },
        trys: [],
        ops: []
    }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
    return d(g, "next", {
        value: verb(0)
    }), d(g, "throw", {
        value: verb(1)
    }), d(g, "return", {
        value: verb(2)
    }), typeof Symbol === "function" && d(g, Symbol.iterator, {
        value: function() {
            return this;
        }
    }), g;
    function verb(n) {
        return function(v) {
            return step([
                n,
                v
            ]);
        };
    }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while(g && (g = 0, op[0] && (_ = 0)), _)try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [
                op[0] & 2,
                t.value
            ];
            switch(op[0]){
                case 0:
                case 1:
                    t = op;
                    break;
                case 4:
                    _.label++;
                    return {
                        value: op[1],
                        done: false
                    };
                case 5:
                    _.label++;
                    y = op[1];
                    op = [
                        0
                    ];
                    continue;
                case 7:
                    op = _.ops.pop();
                    _.trys.pop();
                    continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
                        _ = 0;
                        continue;
                    }
                    if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
                        _.label = op[1];
                        break;
                    }
                    if (op[0] === 6 && _.label < t[1]) {
                        _.label = t[1];
                        t = op;
                        break;
                    }
                    if (t && _.label < t[2]) {
                        _.label = t[2];
                        _.ops.push(op);
                        break;
                    }
                    if (t[2]) _.ops.pop();
                    _.trys.pop();
                    continue;
            }
            op = body.call(thisArg, _);
        } catch (e) {
            op = [
                6,
                e
            ];
            y = 0;
        } finally{
            f = t = 0;
        }
        if (op[0] & 5) throw op[1];
        return {
            value: op[0] ? op[1] : void 0,
            done: true
        };
    }
}







var // @ts-expect-error - Set synchronously in constructor.
_widgetResult = /*#__PURE__*/ new WeakMap(), _signal = /*#__PURE__*/ new WeakMap();
var runtime_Runtime = /*#__PURE__*/ (/* unused pure expression or super */ null && (function() {
    "use strict";
    function Runtime(model, options) {
        var _this = this;
        runtime_class_call_check(this, Runtime);
        runtime_class_private_field_init(this, _widgetResult, {
            writable: true,
            value: void 0
        });
        runtime_class_private_field_init(this, _signal, {
            writable: true,
            value: void 0
        });
        runtime_define_property(this, "ready", void 0);
        var resolvers = promiseWithResolvers();
        this.ready = resolvers.promise;
        runtime_class_private_field_set(this, _signal, options.signal);
        runtime_class_private_field_get(this, _signal).throwIfAborted();
        runtime_class_private_field_get(this, _signal).addEventListener("abort", function() {
            return dispose();
        });
        AbortSignal.timeout(2000).addEventListener("abort", function() {
            resolvers.reject(new Error("[anywidget] Failed to initialize model."));
        });
        var binding = BINDINGS.getOrCreate(model);
        var experimental = {
            // @ts-expect-error - invoke.bind loses generic type parameter
            invoke: invoke.bind(null, model)
        };
        var dispose = solid.createRoot(function(dispose) {
            // DOMWidgetModel is untyped by trait shape; we know the anywidget traits, so narrow to AnyModel<State> for type-safe `.get()` access
            // oxlint-disable-next-line typescript-eslint/no-unsafe-type-assertion -- see above
            var typedModel = model;
            var id = typedModel.get("_anywidget_id");
            var css = observe(typedModel, "_css", {
                signal: runtime_class_private_field_get(_this, _signal)
            });
            var esm = observe(typedModel, "_esm", {
                signal: runtime_class_private_field_get(_this, _signal)
            });
            var _solid_createSignal = _sliced_to_array(solid.createSignal({
                status: "pending"
            }), 2), widgetResult = _solid_createSignal[0], setWidgetResult = _solid_createSignal[1];
            runtime_class_private_field_set(_this, _widgetResult, widgetResult);
            solid.createEffect(solid.on(css, function() {
                return console.debug("[anywidget] css hot updated: ".concat(id));
            }, {
                defer: true
            }));
            solid.createEffect(solid.on(esm, function() {
                return console.debug("[anywidget] esm hot updated: ".concat(id));
            }, {
                defer: true
            }));
            solid.createEffect(function() {
                return loadCss(css(), id);
            });
            solid.createEffect(function() {
                // Per-effect controller so a stale loadWidget resolution from a
                // previous _esm value cannot overwrite a newer one. Solid fires
                // onCleanup before re-running the effect, aborting the prior load.
                var controller = new AbortController();
                solid.onCleanup(function() {
                    return controller.abort();
                });
                loadWidget(esm(), id).then(function(widget) {
                    return runtime_async_to_generator(function() {
                        return runtime_ts_generator(this, function(_state) {
                            switch(_state.label){
                                case 0:
                                    if (controller.signal.aborted) return [
                                        2
                                    ];
                                    return [
                                        4,
                                        binding.bind(widget, {
                                            experimental: experimental
                                        })
                                    ];
                                case 1:
                                    _state.sent();
                                    if (controller.signal.aborted) return [
                                        2
                                    ];
                                    setWidgetResult({
                                        status: "ready",
                                        data: widget
                                    });
                                    resolvers.resolve();
                                    return [
                                        2
                                    ];
                            }
                        });
                    })();
                }).catch(function(error) {
                    if (controller.signal.aborted) return;
                    setWidgetResult({
                        status: "error",
                        error: error
                    });
                });
            });
            return dispose;
        });
    }
    runtime_create_class(Runtime, [
        {
            key: "createView",
            value: function createView(view, options) {
                return runtime_async_to_generator(function() {
                    var _this, model, signal, binding, experimental, host, dispose;
                    return runtime_ts_generator(this, function(_state) {
                        _this = this;
                        model = view.model;
                        signal = AbortSignal.any([
                            runtime_class_private_field_get(this, _signal),
                            options.signal
                        ]); // either model or view destroyed
                        signal.throwIfAborted();
                        signal.addEventListener("abort", function() {
                            return dispose();
                        });
                        binding = BINDINGS.get(model);
                        assert(binding, "[anywidget] WidgetBinding not found.");
                        experimental = {
                            // @ts-expect-error - invoke.bind loses generic type parameter
                            invoke: invoke.bind(null, model)
                        };
                        host = createHost(model, {
                            signal: signal
                        });
                        dispose = solid.createRoot(function(dispose) {
                            solid.createEffect(function() {
                                // Clear all previous event listeners from this hook.
                                model.off(null, null, view);
                                view.$el.empty();
                                var result = runtime_class_private_field_get(_this, _widgetResult).call(_this);
                                if (result.status === "pending") {
                                    return;
                                }
                                if (result.status === "error") {
                                    throwAnywidgetError(result.error);
                                    return;
                                }
                                var controller = new AbortController();
                                solid.onCleanup(function() {
                                    return controller.abort();
                                });
                                Promise.resolve().then(function() {
                                    return binding.createView(view, {
                                        signal: AbortSignal.any([
                                            signal,
                                            controller.signal
                                        ]),
                                        experimental: experimental,
                                        host: host
                                    });
                                }).catch(function(error) {
                                    return throwAnywidgetError(error);
                                });
                            });
                            return function() {
                                return dispose();
                            };
                        });
                        return [
                            2
                        ];
                    });
                }).call(this);
            }
        }
    ]);
    return Runtime;
}()));

;// CONCATENATED MODULE: ./packages/anywidget/src/widget.ts
function widget_array_like_to_array(arr, len) {
    if (len == null || len > arr.length) len = arr.length;
    for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
    return arr2;
}
function _array_without_holes(arr) {
    if (Array.isArray(arr)) return widget_array_like_to_array(arr);
}
function _assert_this_initialized(self) {
    if (self === void 0) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
    }
    return self;
}
function widget_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
    try {
        var info = gen[key](arg);
        var value = info.value;
    } catch (error) {
        reject(error);
        return;
    }
    if (info.done) {
        resolve(value);
    } else {
        Promise.resolve(value).then(_next, _throw);
    }
}
function widget_async_to_generator(fn) {
    return function() {
        var self = this, args = arguments;
        return new Promise(function(resolve, reject) {
            var gen = fn.apply(self, args);
            function _next(value) {
                widget_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
            }
            function _throw(err) {
                widget_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
            }
            _next(undefined);
        });
    };
}
function _call_super(_this, derived, args) {
    derived = _get_prototype_of(derived);
    return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
}
function widget_check_private_redeclaration(obj, privateCollection) {
    if (privateCollection.has(obj)) {
        throw new TypeError("Cannot initialize the same private elements twice on an object");
    }
}
function widget_class_apply_descriptor_get(receiver, descriptor) {
    if (descriptor.get) {
        return descriptor.get.call(receiver);
    }
    return descriptor.value;
}
function widget_class_call_check(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
    }
}
function widget_class_extract_field_descriptor(receiver, privateMap, action) {
    if (!privateMap.has(receiver)) {
        throw new TypeError("attempted to " + action + " private field on non-instance");
    }
    return privateMap.get(receiver);
}
function widget_class_private_field_get(receiver, privateMap) {
    var descriptor = widget_class_extract_field_descriptor(receiver, privateMap, "get");
    return widget_class_apply_descriptor_get(receiver, descriptor);
}
function widget_class_private_field_init(obj, privateMap, value) {
    widget_check_private_redeclaration(obj, privateMap);
    privateMap.set(obj, value);
}
function widget_defineProperties(target, props) {
    for(var i = 0; i < props.length; i++){
        var descriptor = props[i];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, descriptor.key, descriptor);
    }
}
function widget_create_class(Constructor, protoProps, staticProps) {
    if (protoProps) widget_defineProperties(Constructor.prototype, protoProps);
    if (staticProps) widget_defineProperties(Constructor, staticProps);
    return Constructor;
}
function widget_define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _get(target, property, receiver) {
    if (typeof Reflect !== "undefined" && Reflect.get) {
        _get = Reflect.get;
    } else {
        _get = function get(target, property, receiver) {
            var base = _super_prop_base(target, property);
            if (!base) return;
            var desc = Object.getOwnPropertyDescriptor(base, property);
            if (desc.get) {
                return desc.get.call(receiver || target);
            }
            return desc.value;
        };
    }
    return _get(target, property, receiver || target);
}
function _get_prototype_of(o) {
    _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
        return o.__proto__ || Object.getPrototypeOf(o);
    };
    return _get_prototype_of(o);
}
function _inherits(subClass, superClass) {
    if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function");
    }
    subClass.prototype = Object.create(superClass && superClass.prototype, {
        constructor: {
            value: subClass,
            writable: true,
            configurable: true
        }
    });
    if (superClass) _set_prototype_of(subClass, superClass);
}
function _iterable_to_array(iter) {
    if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
function _non_iterable_spread() {
    throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _possible_constructor_return(self, call) {
    if (call && (widget_type_of(call) === "object" || typeof call === "function")) {
        return call;
    }
    return _assert_this_initialized(self);
}
function _set_prototype_of(o, p) {
    _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
        o.__proto__ = p;
        return o;
    };
    return _set_prototype_of(o, p);
}
function _super_prop_base(object, property) {
    while(!Object.prototype.hasOwnProperty.call(object, property)){
        object = _get_prototype_of(object);
        if (object === null) break;
    }
    return object;
}
function _to_consumable_array(arr) {
    return _array_without_holes(arr) || _iterable_to_array(arr) || widget_unsupported_iterable_to_array(arr) || _non_iterable_spread();
}
function widget_type_of(obj) {
    "@swc/helpers - typeof";
    return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
}
function widget_unsupported_iterable_to_array(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return widget_array_like_to_array(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(n);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return widget_array_like_to_array(o, minLen);
}
function _is_native_reflect_construct() {
    try {
        var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
    } catch (_) {}
    return (_is_native_reflect_construct = function() {
        return !!result;
    })();
}
function widget_ts_generator(thisArg, body) {
    var f, y, t, _ = {
        label: 0,
        sent: function() {
            if (t[0] & 1) throw t[1];
            return t[1];
        },
        trys: [],
        ops: []
    }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
    return d(g, "next", {
        value: verb(0)
    }), d(g, "throw", {
        value: verb(1)
    }), d(g, "return", {
        value: verb(2)
    }), typeof Symbol === "function" && d(g, Symbol.iterator, {
        value: function() {
            return this;
        }
    }), g;
    function verb(n) {
        return function(v) {
            return step([
                n,
                v
            ]);
        };
    }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while(g && (g = 0, op[0] && (_ = 0)), _)try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [
                op[0] & 2,
                t.value
            ];
            switch(op[0]){
                case 0:
                case 1:
                    t = op;
                    break;
                case 4:
                    _.label++;
                    return {
                        value: op[1],
                        done: false
                    };
                case 5:
                    _.label++;
                    y = op[1];
                    op = [
                        0
                    ];
                    continue;
                case 7:
                    op = _.ops.pop();
                    _.trys.pop();
                    continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
                        _ = 0;
                        continue;
                    }
                    if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
                        _.label = op[1];
                        break;
                    }
                    if (op[0] === 6 && _.label < t[1]) {
                        _.label = t[1];
                        t = op;
                        break;
                    }
                    if (t && _.label < t[2]) {
                        _.label = t[2];
                        _.ops.push(op);
                        break;
                    }
                    if (t[2]) _.ops.pop();
                    _.trys.pop();
                    continue;
            }
            op = body.call(thisArg, _);
        } catch (e) {
            op = [
                6,
                e
            ];
            y = 0;
        } finally{
            f = t = 0;
        }
        if (op[0] & 5) throw op[1];
        return {
            value: op[0] ? op[1] : void 0,
            done: true
        };
    }
}



// @ts-expect-error - injected by bundler
var version = "0.11.0";
/* export default */ function src_widget(param) {
    var DOMWidgetModel = param.DOMWidgetModel, DOMWidgetView = param.DOMWidgetView;
    var RUNTIMES = new WeakMap();
    var AnyModel = /*#__PURE__*/ function(DOMWidgetModel) {
        "use strict";
        _inherits(AnyModel, DOMWidgetModel);
        function AnyModel() {
            widget_class_call_check(this, AnyModel);
            return _call_super(this, AnyModel, arguments);
        }
        widget_create_class(AnyModel, [
            {
                key: "initialize",
                value: function initialize() {
                    var _this = this;
                    for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
                        args[_key] = arguments[_key];
                    }
                    var _$_get;
                    (_$_get = _get(_get_prototype_of(AnyModel.prototype), "initialize", this)).call.apply(_$_get, [
                        this
                    ].concat(_to_consumable_array(args)));
                    var controller = new AbortController();
                    this.once("destroy", function() {
                        controller.abort("[anywidget] Runtime destroyed.");
                        BINDINGS.destroy(_this);
                        RUNTIMES.delete(_this);
                    });
                    RUNTIMES.set(this, new Runtime(this, {
                        signal: controller.signal
                    }));
                }
            },
            {
                key: "_handle_comm_msg",
                value: function _handle_comm_msg() {
                    var _this = this;
                    for(var _len = arguments.length, msg = new Array(_len), _key = 0; _key < _len; _key++){
                        msg[_key] = arguments[_key];
                    }
                    var _this1 = this, _superprop_get__handle_comm_msg = function _superprop_get__handle_comm_msg() {
                        return _get(_get_prototype_of(AnyModel.prototype), "_handle_comm_msg", _this);
                    };
                    return widget_async_to_generator(function() {
                        var _superprop_get__handle_comm_msg1, runtime;
                        return widget_ts_generator(this, function(_state) {
                            switch(_state.label){
                                case 0:
                                    runtime = RUNTIMES.get(this);
                                    return [
                                        4,
                                        runtime === null || runtime === void 0 ? void 0 : runtime.ready
                                    ];
                                case 1:
                                    _state.sent();
                                    return [
                                        2,
                                        (_superprop_get__handle_comm_msg1 = _superprop_get__handle_comm_msg()).call.apply(_superprop_get__handle_comm_msg1, [
                                            _this1
                                        ].concat(_to_consumable_array(msg)))
                                    ];
                            }
                        });
                    }).call(this);
                }
            },
            {
                /**
     * We override to support binary trailets because JSON.parse(JSON.stringify())
     * does not properly clone binary data (it just returns an empty object).
     *
     * https://github.com/jupyter-widgets/ipywidgets/blob/47058a373d2c2b3acf101677b2745e14b76dd74b/packages/base/src/widget.ts#L562-L583
     */ key: "serialize",
                value: function serialize(state) {
                    // oxlint-disable-next-line typescript-eslint/no-unsafe-type-assertion -- accessing static `.serializers` on `this.constructor`
                    var serializers = this.constructor.serializers || {};
                    var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
                    try {
                        for(var _iterator = Object.keys(state)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
                            var k = _step.value;
                            try {
                                var _serializers_k, _state_k;
                                var serialize = (_serializers_k = serializers[k]) === null || _serializers_k === void 0 ? void 0 : _serializers_k.serialize;
                                if (serialize) {
                                    state[k] = serialize(state[k], this);
                                } else if (k === "layout" || k === "style") {
                                    // These keys come from ipywidgets, rely on JSON.stringify trick.
                                    state[k] = JSON.parse(JSON.stringify(state[k]));
                                } else {
                                    state[k] = structuredClone(state[k]);
                                }
                                if (typeof ((_state_k = state[k]) === null || _state_k === void 0 ? void 0 : _state_k.toJSON) === "function") {
                                    state[k] = state[k].toJSON();
                                }
                            } catch (e) {
                                console.error("Error serializing widget state attribute: ", k);
                                throw e;
                            }
                        }
                    } catch (err) {
                        _didIteratorError = true;
                        _iteratorError = err;
                    } finally{
                        try {
                            if (!_iteratorNormalCompletion && _iterator.return != null) {
                                _iterator.return();
                            }
                        } finally{
                            if (_didIteratorError) {
                                throw _iteratorError;
                            }
                        }
                    }
                    return state;
                }
            }
        ]);
        return AnyModel;
    }(DOMWidgetModel);
    widget_define_property(AnyModel, "model_name", "AnyModel");
    widget_define_property(AnyModel, "model_module", "anywidget");
    widget_define_property(AnyModel, "model_module_version", version);
    widget_define_property(AnyModel, "view_name", "AnyView");
    widget_define_property(AnyModel, "view_module", "anywidget");
    widget_define_property(AnyModel, "view_module_version", version);
    var _controller = /*#__PURE__*/ new WeakMap();
    var AnyView = /*#__PURE__*/ function(DOMWidgetView) {
        "use strict";
        _inherits(AnyView, DOMWidgetView);
        function AnyView() {
            widget_class_call_check(this, AnyView);
            var _this;
            _this = _call_super(this, AnyView, arguments), widget_class_private_field_init(_this, _controller, {
                writable: true,
                value: new AbortController()
            });
            return _this;
        }
        widget_create_class(AnyView, [
            {
                key: "render",
                value: function render() {
                    return widget_async_to_generator(function() {
                        var runtime;
                        return widget_ts_generator(this, function(_state) {
                            switch(_state.label){
                                case 0:
                                    runtime = RUNTIMES.get(this.model);
                                    assert(runtime, "[anywidget] Runtime not found.");
                                    return [
                                        4,
                                        runtime.createView(this, {
                                            signal: widget_class_private_field_get(this, _controller).signal
                                        })
                                    ];
                                case 1:
                                    _state.sent();
                                    return [
                                        2
                                    ];
                            }
                        });
                    }).call(this);
                }
            },
            {
                key: "remove",
                value: function remove() {
                    widget_class_private_field_get(this, _controller).abort("[anywidget] View destroyed.");
                    _get(_get_prototype_of(AnyView.prototype), "remove", this).call(this);
                }
            }
        ]);
        return AnyView;
    }(DOMWidgetView);
    return {
        AnyModel: AnyModel,
        AnyView: AnyView
    };
}

;// CONCATENATED MODULE: ./packages/anywidget/src/index.js


// @ts-expect-error -- define is a global provided by the notebook runtime.
define(["@jupyter-widgets/base"], create);


},

});
// The module cache
var __webpack_module_cache__ = {};

// The require function
function __webpack_require__(moduleId) {

// Check if module is in cache
var cachedModule = __webpack_module_cache__[moduleId];
if (cachedModule !== undefined) {
return cachedModule.exports;
}
// Create a new module (and put it into the cache)
var module = (__webpack_module_cache__[moduleId] = {
exports: {}
});
// Execute the module function
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);

// Return the exports of the module
return module.exports;

}

// expose the modules object (__webpack_modules__)
__webpack_require__.m = __webpack_modules__;

// expose the module cache
__webpack_require__.c = __webpack_module_cache__;

// webpack/runtime/has_own_property
(() => {
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
})();
// webpack/runtime/rspack_version
(() => {
__webpack_require__.rv = () => ("1.7.11")
})();
// webpack/runtime/sharing
(() => {

__webpack_require__.S = {};
__webpack_require__.initializeSharingData = { scopeToSharingDataMapping: {  }, uniqueName: "@anywidget/monorepo" };
var initPromises = {};
var initTokens = {};
__webpack_require__.I = function(name, initScope) {
	if (!initScope) initScope = [];
	// handling circular init calls
	var initToken = initTokens[name];
	if (!initToken) initToken = initTokens[name] = {};
	if (initScope.indexOf(initToken) >= 0) return;
	initScope.push(initToken);
	// only runs once
	if (initPromises[name]) return initPromises[name];
	// creates a new share scope if needed
	if (!__webpack_require__.o(__webpack_require__.S, name))
		__webpack_require__.S[name] = {};
	// runs all init snippets from all modules reachable
	var scope = __webpack_require__.S[name];
	var warn = function (msg) {
		if (typeof console !== "undefined" && console.warn) console.warn(msg);
	};
	var uniqueName = __webpack_require__.initializeSharingData.uniqueName;
	var register = function (name, version, factory, eager) {
		var versions = (scope[name] = scope[name] || {});
		var activeVersion = versions[version];
		if (
			!activeVersion ||
			(!activeVersion.loaded &&
				(!eager != !activeVersion.eager
					? eager
					: uniqueName > activeVersion.from))
		)
			versions[version] = { get: factory, from: uniqueName, eager: !!eager };
	};
	var initExternal = function (id) {
		var handleError = function (err) {
			warn("Initialization of sharing external failed: " + err);
		};
		try {
			var module = __webpack_require__(id);
			if (!module) return;
			var initFn = function (module) {
				return (
					module &&
					module.init &&
					module.init(__webpack_require__.S[name], initScope)
				);
			};
			if (module.then) return promises.push(module.then(initFn, handleError));
			var initResult = initFn(module);
			if (initResult && initResult.then)
				return promises.push(initResult["catch"](handleError));
		} catch (err) {
			handleError(err);
		}
	};
	var promises = [];
	var scopeToSharingDataMapping = __webpack_require__.initializeSharingData.scopeToSharingDataMapping;
	if (scopeToSharingDataMapping[name]) {
		scopeToSharingDataMapping[name].forEach(function (stage) {
			if (typeof stage === "object") register(stage.name, stage.version, stage.factory, stage.eager);
			else initExternal(stage)
		});
	}
	if (!promises.length) return (initPromises[name] = 1);
	return (initPromises[name] = Promise.all(promises).then(function () {
		return (initPromises[name] = 1);
	}));
};


})();
// webpack/runtime/consumes_loading
(() => {

__webpack_require__.consumesLoadingData = { chunkMapping: {}, moduleIdToConsumeDataMapping: {}, initialConsumes: [] };
var splitAndConvert = function(str) {
  return str.split(".").map(function(item) {
    return +item == item ? +item : item;
  });
};
var parseRange = function(str) {
  // see https://docs.npmjs.com/misc/semver#range-grammar for grammar
  var parsePartial = function(str) {
    var match = /^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(str);
    var ver = match[1] ? [0].concat(splitAndConvert(match[1])) : [0];
    if (match[2]) {
      ver.length++;
      ver.push.apply(ver, splitAndConvert(match[2]));
    }

    // remove trailing any matchers
    let last = ver[ver.length - 1];
    while (
      ver.length &&
      (last === undefined || /^[*xX]$/.test(/** @type {string} */ (last)))
    ) {
      ver.pop();
      last = ver[ver.length - 1];
    }

    return ver;
  };
  var toFixed = function(range) {
    if (range.length === 1) {
      // Special case for "*" is "x.x.x" instead of "="
      return [0];
    } else if (range.length === 2) {
      // Special case for "1" is "1.x.x" instead of "=1"
      return [1].concat(range.slice(1));
    } else if (range.length === 3) {
      // Special case for "1.2" is "1.2.x" instead of "=1.2"
      return [2].concat(range.slice(1));
    } else {
      return [range.length].concat(range.slice(1));
    }
  };
  var negate = function(range) {
    return [-range[0] - 1].concat(range.slice(1));
  };
  var parseSimple = function(str) {
    // simple       ::= primitive | partial | tilde | caret
    // primitive    ::= ( '<' | '>' | '>=' | '<=' | '=' | '!' ) ( ' ' ) * partial
    // tilde        ::= '~' ( ' ' ) * partial
    // caret        ::= '^' ( ' ' ) * partial
    const match = /^(\^|~|<=|<|>=|>|=|v|!)/.exec(str);
    const start = match ? match[0] : "";
    const remainder = parsePartial(
      start.length ? str.slice(start.length).trim() : str.trim()
    );
    switch (start) {
      case "^":
        if (remainder.length > 1 && remainder[1] === 0) {
          if (remainder.length > 2 && remainder[2] === 0) {
            return [3].concat(remainder.slice(1));
          }
          return [2].concat(remainder.slice(1));
        }
        return [1].concat(remainder.slice(1));
      case "~":
        return [2].concat(remainder.slice(1));
      case ">=":
        return remainder;
      case "=":
      case "v":
      case "":
        return toFixed(remainder);
      case "<":
        return negate(remainder);
      case ">": {
        // and( >=, not( = ) ) => >=, =, not, and
        const fixed = toFixed(remainder);
        return [, fixed, 0, remainder, 2];
      }
      case "<=":
        // or( <, = ) => <, =, or
        return [, toFixed(remainder), negate(remainder), 1];
      case "!": {
        // not =
        const fixed = toFixed(remainder);
        return [, fixed, 0];
      }
      default:
        throw new Error("Unexpected start value");
    }
  };
  var combine = function(items, fn) {
    if (items.length === 1) return items[0];
    const arr = [];
    for (const item of items.slice().reverse()) {
      if (0 in item) {
        arr.push(item);
      } else {
        arr.push.apply(arr, item.slice(1));
      }
    }
    return [,].concat(arr, items.slice(1).map(() => fn));
  };
  var parseRange = function(str) {
    // range      ::= hyphen | simple ( ' ' ( ' ' ) * simple ) * | ''
    // hyphen     ::= partial ( ' ' ) * ' - ' ( ' ' ) * partial
    const items = str.split(/\s+-\s+/);
    if (items.length === 1) {
			str = str.trim();
			const items = [];
			const r = /[-0-9A-Za-z]\s+/g;
			var start = 0;
			var match;
			while ((match = r.exec(str))) {
				const end = match.index + 1;
				items.push(parseSimple(str.slice(start, end).trim()));
				start = end;
			}
			items.push(parseSimple(str.slice(start).trim()));
      return combine(items, 2);
    }
    const a = parsePartial(items[0]);
    const b = parsePartial(items[1]);
    // >=a <=b => and( >=a, or( <b, =b ) ) => >=a, <b, =b, or, and
    return [, toFixed(b), negate(b), 1, a, 2];
  };
  var parseLogicalOr = function(str) {
    // range-set  ::= range ( logical-or range ) *
    // logical-or ::= ( ' ' ) * '||' ( ' ' ) *
    const items = str.split(/\s*\|\|\s*/).map(parseRange);
    return combine(items, 1);
  };
  return parseLogicalOr(str);
};
var parseVersion = function(str) {
	var match = /^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(str);
	/** @type {(string|number|undefined|[])[]} */
	var ver = match[1] ? splitAndConvert(match[1]) : [];
	if (match[2]) {
		ver.length++;
		ver.push.apply(ver, splitAndConvert(match[2]));
	}
	if (match[3]) {
		ver.push([]);
		ver.push.apply(ver, splitAndConvert(match[3]));
	}
	return ver;
}
var versionLt = function(a, b) {
	a = parseVersion(a);
	b = parseVersion(b);
	var i = 0;
	for (;;) {
		// a       b  EOA     object  undefined  number  string
		// EOA        a == b  a < b   b < a      a < b   a < b
		// object     b < a   (0)     b < a      a < b   a < b
		// undefined  a < b   a < b   (0)        a < b   a < b
		// number     b < a   b < a   b < a      (1)     a < b
		// string     b < a   b < a   b < a      b < a   (1)
		// EOA end of array
		// (0) continue on
		// (1) compare them via "<"

		// Handles first row in table
		if (i >= a.length) return i < b.length && (typeof b[i])[0] != "u";

		var aValue = a[i];
		var aType = (typeof aValue)[0];

		// Handles first column in table
		if (i >= b.length) return aType == "u";

		var bValue = b[i];
		var bType = (typeof bValue)[0];

		if (aType == bType) {
			if (aType != "o" && aType != "u" && aValue != bValue) {
				return aValue < bValue;
			}
			i++;
		} else {
			// Handles remaining cases
			if (aType == "o" && bType == "n") return true;
			return bType == "s" || aType == "u";
		}
	}
}
var rangeToString = function(range) {
	var fixCount = range[0];
	var str = "";
	if (range.length === 1) {
		return "*";
	} else if (fixCount + 0.5) {
		str +=
			fixCount == 0
				? ">="
				: fixCount == -1
				? "<"
				: fixCount == 1
				? "^"
				: fixCount == 2
				? "~"
				: fixCount > 0
				? "="
				: "!=";
		var needDot = 1;
		for (var i = 1; i < range.length; i++) {
			var item = range[i];
			var t = (typeof item)[0];
			needDot--;
			str +=
				t == "u"
					? // undefined: prerelease marker, add an "-"
					  "-"
					: // number or string: add the item, set flag to add an "." between two of them
					  (needDot > 0 ? "." : "") + ((needDot = 2), item);
		}
		return str;
	} else {
		var stack = [];
		for (var i = 1; i < range.length; i++) {
			var item = range[i];
			stack.push(
				item === 0
					? "not(" + pop() + ")"
					: item === 1
					? "(" + pop() + " || " + pop() + ")"
					: item === 2
					? stack.pop() + " " + stack.pop()
					: rangeToString(item)
			);
		}
		return pop();
	}
	function pop() {
		return stack.pop().replace(/^\((.+)\)$/, "$1");
	}
}
var satisfy = function(range, version) {
	if (0 in range) {
		version = parseVersion(version);
		var fixCount = /** @type {number} */ (range[0]);
		// when negated is set it swill set for < instead of >=
		var negated = fixCount < 0;
		if (negated) fixCount = -fixCount - 1;
		for (var i = 0, j = 1, isEqual = true; ; j++, i++) {
			// cspell:word nequal nequ

			// when isEqual = true:
			// range         version: EOA/object  undefined  number    string
			// EOA                    equal       block      big-ver   big-ver
			// undefined              bigger      next       big-ver   big-ver
			// number                 smaller     block      cmp       big-cmp
			// fixed number           smaller     block      cmp-fix   differ
			// string                 smaller     block      differ    cmp
			// fixed string           smaller     block      small-cmp cmp-fix

			// when isEqual = false:
			// range         version: EOA/object  undefined  number    string
			// EOA                    nequal      block      next-ver  next-ver
			// undefined              nequal      block      next-ver  next-ver
			// number                 nequal      block      next      next
			// fixed number           nequal      block      next      next   (this never happens)
			// string                 nequal      block      next      next
			// fixed string           nequal      block      next      next   (this never happens)

			// EOA end of array
			// equal (version is equal range):
			//   when !negated: return true,
			//   when negated: return false
			// bigger (version is bigger as range):
			//   when fixed: return false,
			//   when !negated: return true,
			//   when negated: return false,
			// smaller (version is smaller as range):
			//   when !negated: return false,
			//   when negated: return true
			// nequal (version is not equal range (> resp <)): return true
			// block (version is in different prerelease area): return false
			// differ (version is different from fixed range (string vs. number)): return false
			// next: continues to the next items
			// next-ver: when fixed: return false, continues to the next item only for the version, sets isEqual=false
			// big-ver: when fixed || negated: return false, continues to the next item only for the version, sets isEqual=false
			// next-nequ: continues to the next items, sets isEqual=false
			// cmp (negated === false): version < range => return false, version > range => next-nequ, else => next
			// cmp (negated === true): version > range => return false, version < range => next-nequ, else => next
			// cmp-fix: version == range => next, else => return false
			// big-cmp: when negated => return false, else => next-nequ
			// small-cmp: when negated => next-nequ, else => return false

			var rangeType = j < range.length ? (typeof range[j])[0] : "";

			var versionValue;
			var versionType;

			// Handles first column in both tables (end of version or object)
			if (
				i >= version.length ||
				((versionValue = version[i]),
				(versionType = (typeof versionValue)[0]) == "o")
			) {
				// Handles nequal
				if (!isEqual) return true;
				// Handles bigger
				if (rangeType == "u") return j > fixCount && !negated;
				// Handles equal and smaller: (range === EOA) XOR negated
				return (rangeType == "") != negated; // equal + smaller
			}

			// Handles second column in both tables (version = undefined)
			if (versionType == "u") {
				if (!isEqual || rangeType != "u") {
					return false;
				}
			}

			// switch between first and second table
			else if (isEqual) {
				// Handle diagonal
				if (rangeType == versionType) {
					if (j <= fixCount) {
						// Handles "cmp-fix" cases
						if (versionValue != range[j]) {
							return false;
						}
					} else {
						// Handles "cmp" cases
						if (negated ? versionValue > range[j] : versionValue < range[j]) {
							return false;
						}
						if (versionValue != range[j]) isEqual = false;
					}
				}

				// Handle big-ver
				else if (rangeType != "s" && rangeType != "n") {
					if (negated || j <= fixCount) return false;
					isEqual = false;
					j--;
				}

				// Handle differ, big-cmp and small-cmp
				else if (j <= fixCount || versionType < rangeType != negated) {
					return false;
				} else {
					isEqual = false;
				}
			} else {
				// Handles all "next-ver" cases in the second table
				if (rangeType != "s" && rangeType != "n") {
					isEqual = false;
					j--;
				}

				// next is applied by default
			}
		}
	}
	/** @type {(boolean | number)[]} */
	var stack = [];
	var p = stack.pop.bind(stack);
	for (var i = 1; i < range.length; i++) {
		var item = /** @type {SemVerRange | 0 | 1 | 2} */ (range[i]);
		stack.push(
			item == 1
				? p() | p()
				: item == 2
				? p() & p()
				: item
				? satisfy(item, version)
				: !p()
		);
	}
	return !!p();
}
var ensureExistence = function(scopeName, key) {
	var scope = __webpack_require__.S[scopeName];
	if(!scope || !__webpack_require__.o(scope, key)) throw new Error("Shared module " + key + " doesn't exist in shared scope " + scopeName);
	return scope;
};
var findVersion = function(scope, key) {
	var versions = scope[key];
	var key = Object.keys(versions).reduce(function(a, b) {
		return !a || versionLt(a, b) ? b : a;
	}, 0);
	return key && versions[key]
};
var findSingletonVersionKey = function(scope, key) {
	var versions = scope[key];
	return Object.keys(versions).reduce(function(a, b) {
		return !a || (!versions[a].loaded && versionLt(a, b)) ? b : a;
	}, 0);
};
var getInvalidSingletonVersionMessage = function(scope, key, version, requiredVersion) {
	return "Unsatisfied version " + version + " from " + (version && scope[key][version].from) + " of shared singleton module " + key + " (required " + rangeToString(requiredVersion) + ")"
};
var getSingleton = function(scope, scopeName, key, requiredVersion) {
	var version = findSingletonVersionKey(scope, key);
	return get(scope[key][version]);
};
var getSingletonVersion = function(scope, scopeName, key, requiredVersion) {
	var version = findSingletonVersionKey(scope, key);
	if (!satisfy(requiredVersion, version)) warn(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));
	return get(scope[key][version]);
};
var getStrictSingletonVersion = function(scope, scopeName, key, requiredVersion) {
	var version = findSingletonVersionKey(scope, key);
	if (!satisfy(requiredVersion, version)) throw new Error(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));
	return get(scope[key][version]);
};
var findValidVersion = function(scope, key, requiredVersion) {
	var versions = scope[key];
	var key = Object.keys(versions).reduce(function(a, b) {
		if (!satisfy(requiredVersion, b)) return a;
		return !a || versionLt(a, b) ? b : a;
	}, 0);
	return key && versions[key]
};
var getInvalidVersionMessage = function(scope, scopeName, key, requiredVersion) {
	var versions = scope[key];
	return "No satisfying version (" + rangeToString(requiredVersion) + ") of shared module " + key + " found in shared scope " + scopeName + ".\n" +
		"Available versions: " + Object.keys(versions).map(function(key) {
		return key + " from " + versions[key].from;
	}).join(", ");
};
var getValidVersion = function(scope, scopeName, key, requiredVersion) {
	var entry = findValidVersion(scope, key, requiredVersion);
	if(entry) return get(entry);
	throw new Error(getInvalidVersionMessage(scope, scopeName, key, requiredVersion));
};
var warn = function(msg) {
	if (typeof console !== "undefined" && console.warn) console.warn(msg);
};
var warnInvalidVersion = function(scope, scopeName, key, requiredVersion) {
	warn(getInvalidVersionMessage(scope, scopeName, key, requiredVersion));
};
var get = function(entry) {
	entry.loaded = 1;
	return entry.get()
};
var init = function(fn) { return function(scopeName, a, b, c) {
	var promise = __webpack_require__.I(scopeName);
	if (promise && promise.then) return promise.then(fn.bind(fn, scopeName, __webpack_require__.S[scopeName], a, b, c));
	return fn(scopeName, __webpack_require__.S[scopeName], a, b, c);
}; };

var load = /*#__PURE__*/ init(function(scopeName, scope, key) {
	ensureExistence(scopeName, key);
	return get(findVersion(scope, key));
});
var loadFallback = /*#__PURE__*/ init(function(scopeName, scope, key, fallback) {
	return scope && __webpack_require__.o(scope, key) ? get(findVersion(scope, key)) : fallback();
});
var loadVersionCheck = /*#__PURE__*/ init(function(scopeName, scope, key, version) {
	ensureExistence(scopeName, key);
	return get(findValidVersion(scope, key, version) || warnInvalidVersion(scope, scopeName, key, version) || findVersion(scope, key));
});
var loadSingleton = /*#__PURE__*/ init(function(scopeName, scope, key) {
	ensureExistence(scopeName, key);
	return getSingleton(scope, scopeName, key);
});
var loadSingletonVersionCheck = /*#__PURE__*/ init(function(scopeName, scope, key, version) {
	ensureExistence(scopeName, key);
	return getSingletonVersion(scope, scopeName, key, version);
});
var loadStrictVersionCheck = /*#__PURE__*/ init(function(scopeName, scope, key, version) {
	ensureExistence(scopeName, key);
	return getValidVersion(scope, scopeName, key, version);
});
var loadStrictSingletonVersionCheck = /*#__PURE__*/ init(function(scopeName, scope, key, version) {
	ensureExistence(scopeName, key);
	return getStrictSingletonVersion(scope, scopeName, key, version);
});
var loadVersionCheckFallback = /*#__PURE__*/ init(function(scopeName, scope, key, version, fallback) {
	if(!scope || !__webpack_require__.o(scope, key)) return fallback();
	return get(findValidVersion(scope, key, version) || warnInvalidVersion(scope, scopeName, key, version) || findVersion(scope, key));
});
var loadSingletonFallback = /*#__PURE__*/ init(function(scopeName, scope, key, fallback) {
	if(!scope || !__webpack_require__.o(scope, key)) return fallback();
	return getSingleton(scope, scopeName, key);
});
var loadSingletonVersionCheckFallback = /*#__PURE__*/ init(function(scopeName, scope, key, version, fallback) {
	if(!scope || !__webpack_require__.o(scope, key)) return fallback();
	return getSingletonVersion(scope, scopeName, key, version);
});
var loadStrictVersionCheckFallback = /*#__PURE__*/ init(function(scopeName, scope, key, version, fallback) {
	var entry = scope && __webpack_require__.o(scope, key) && findValidVersion(scope, key, version);
	return entry ? get(entry) : fallback();
});
var loadStrictSingletonVersionCheckFallback = /*#__PURE__*/ init(function(scopeName, scope, key, version, fallback) {
	if(!scope || !__webpack_require__.o(scope, key)) return fallback();
	return getStrictSingletonVersion(scope, scopeName, key, version);
});
var resolveHandler = function(data) {
	var strict = false
	var singleton = false
	var versionCheck = false
	var fallback = false
	var args = [data.shareScope, data.shareKey];
	if (data.requiredVersion) {
		if (data.strictVersion) strict = true;
		if (data.singleton) singleton = true;
		args.push(parseRange(data.requiredVersion));
		versionCheck = true
	} else if (data.singleton) singleton = true;
	if (data.fallback) {
		fallback = true;
		args.push(data.fallback);
	}
	if (strict && singleton && versionCheck && fallback) return function() { return loadStrictSingletonVersionCheckFallback.apply(null, args); }
	if (strict && versionCheck && fallback) return function() { return loadStrictVersionCheckFallback.apply(null, args); }
	if (singleton && versionCheck && fallback) return function() { return loadSingletonVersionCheckFallback.apply(null, args); }
	if (strict && singleton && versionCheck) return function() { return loadStrictSingletonVersionCheck.apply(null, args); }
	if (singleton && fallback) return function() { return loadSingletonFallback.apply(null, args); }
	if (versionCheck && fallback) return function() { return loadVersionCheckFallback.apply(null, args); }
	if (strict && versionCheck) return function() { return loadStrictVersionCheck.apply(null, args); }
	if (singleton && versionCheck) return function() { return loadSingletonVersionCheck.apply(null, args); }
	if (singleton) return function() { return loadSingleton.apply(null, args); }
	if (versionCheck) return function() { return loadVersionCheck.apply(null, args); }
	if (fallback) return function() { return loadFallback.apply(null, args); }
	return function() { return load.apply(null, args); }
};
var installedModules = {};

})();
// webpack/runtime/rspack_unique_id
(() => {
__webpack_require__.ruid = "bundler=rspack@1.7.11";
})();
// module cache are used so entry inlining is disabled
// startup
// Load entry module and return exports
var __webpack_exports__ = __webpack_require__(464);
})()
;
//# sourceMappingURL=data:application/json;charset=utf-8;base64, 