}
                function d(e, t) {
                    var n = [];
                    if (e.isIfStatement())
                        n = c(e.get("consequent"), n, t),
                        n = c(e.get("alternate"), n, t);
                    else {
                        if (e.isDoExpression() || e.isFor() || e.isWhile() || e.isLabeledStatement())
                            return c(e.get("body"), n, t);
                        if (e.isProgram() || e.isBlockStatement())
                            return p(e.get("body"), t);
                        if (e.isFunction())
                            return d(e.get("body"), t);
                        if (e.isTryStatement())
                            n = c(e.get("block"), n, t),
                            n = c(e.get("handler"), n, t);
                        else {
                            if (e.isCatchClause())
                                return c(e.get("body"), n, t);
                            if (e.isSwitchStatement())
                                return function(e, t, n) {
                                    for (var r = [], i = 0; i < e.length; i++) {
                                        var a, c = d(e[i], n), u = [], l = [], p = (0,
                                        k.Z)(c);
                                        try {
                                            for (p.s(); !(a = p.n()).done; ) {
                                                var h = a.value;
                                                h.type === o && u.push(h),
                                                h.type === s && l.push(h)
                                            }
                                        } catch (f) {
                                            p.e(f)
                                        } finally {
                                            p.f()
                                        }
                                        u.length && (r = u),
                                        t.push.apply(t, l)
                                    }
                                    return t.push.apply(t, (0,
                                    w.Z)(r)),
                                    t
                                }(e.get("cases"), n, t);
                            if (e.isSwitchCase())
                                return p(e.get("consequent"), {
                                    canHaveBreak: !0,
                                    shouldPopulateBreak: !1,
                                    inCaseClause: !0
                                });
                            e.isBreakStatement() ? n.push(function(e) {
                                return {
                                    type: s,
                                    path: e
                                }
                            }(e)) : n.push(function(e) {
                                return {
                                    type: o,
                                    path: e
                                }
                            }(e))
                        }
                    }
                    return n
                }
                return Zx
            }
            var Hx = {};
            Object.defineProperty(Hx, "__esModule", {
                value: !0
            }),
            Hx.addComment = function(e, t, n) {
                Vx(this.node, e, t, n)
            }
            ,
            Hx.addComments = function(e, t) {
                Kx(this.node, e, t)
            }
            ,
            Hx.shareCommentsWithSiblings = function() {
                if ("string" === typeof this.key)
                    return;
                var e = this.node;
                if (!e)
                    return;
                var t = e.trailingComments
                  , n = e.leadingComments;
                if (!t && !n)
                    return;
                var r = this.getSibling(this.key - 1)
                  , i = this.getSibling(this.key + 1)
                  , a = Boolean(r.node)
                  , o = Boolean(i.node);
                a && (n && r.addComments("trailing", Xx(n, r.node.trailingComments)),
                t && !o && r.addComments("trailing", t));
                o && (t && i.addComments("leading", Xx(t, i.node.leadingComments)),
                n && !a && i.addComments("leading", n))
            }
            ;
            var Gx, Yx, Qx, Wx = zi(), Vx = Wx.addComment, Kx = Wx.addComments;
            function Xx(e, t) {
                if (null == t || !t.length)
                    return e;
                var n = new Set(t);
                return e.filter((function(e) {
                    return !n.has(e)
                }
                ))
            }
            function Jx() {
                if (Gx)
                    return vy;
                Gx = 1,
                Object.defineProperty(vy, "__esModule", {
                    value: !0
                }),
                vy.default = vy.SHOULD_STOP = vy.SHOULD_SKIP = vy.REMOVED = void 0;
                var e = Ag
                  , t = Ty
                  , n = nw()
                  , r = Zy()
                  , i = zi()
                  , a = i
                  , o = uy
                  , s = U
                  , c = Fy
                  , u = Gy
                  , l = qT()
                  , p = $T
                  , d = cb
                  , h = ax
                  , f = function() {
                    if (Tx)
                        return bx;
                    Tx = 1,
                    Object.defineProperty(bx, "__esModule", {
                        value: !0
                    }),
                    bx._call = function(e) {
                        if (!e)
                            return !1;
                        var t, n = (0,
                        k.Z)(e);
                        try {
                            for (n.s(); !(t = n.n()).done; ) {
                                var r = t.value;
                                if (r) {
                                    var i = this.node;
                                    if (!i)
                                        return !0;
                                    var a = r.call(this.state, this, this.state);
                                    if (a && "object" === typeof a && "function" === typeof a.then)
                                        throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");
                                    if (a)
                                        throw new Error("Unexpected return value from visitor method ".concat(r));
                                    if (this.node !== i)
                                        return !0;
                                    if (this._traverseFlags > 0)
                                        return !0
                                }
                            }
                        } catch (o) {
                            n.e(o)
                        } finally {
                            n.f()
                        }
                        return !1
                    }
                    ,
                    bx._getQueueContexts = function() {
                        for (var e = this, t = this.contexts; !t.length && (e = e.parentPath); )
                            t = e.contexts;
                        return t
                    }
                    ,
                    bx._resyncKey = function() {
                        if (this.container && this.node !== this.container[this.key]) {
                            if (Array.isArray(this.container)) {
                                for (var e = 0; e < this.container.length; e++)
                                    if (this.container[e] === this.node)
                                        return void this.setKey(e)
                            } else
                                for (var t = 0, n = Object.keys(this.container); t < n.length; t++) {
                                    var r = n[t];
                                    if (this.container[r] === this.node)
                                        return void this.setKey(r)
                                }
                            this.key = null
                        }
                    }
                    ,
                    bx._resyncList = function() {
                        if (this.parent && this.inList) {
                            var e = this.parent[this.listKey];
                            this.container !== e && (this.container = e || null)
                        }
                    }
                    ,
                    bx._resyncParent = function() {
                        this.parentPath && (this.parent = this.parentPath.node)
                    }
                    ,
                    bx._resyncRemoved = function() {
                        null != this.key && this.container && this.container[this.key] === this.node || this._markRemoved()
                    }
                    ,
                    bx.call = function(e) {
                        var t, n = this.opts;
                        return this.debug(e),
                        !(!this.node || !this._call(n[e])) || !!this.node && this._call(null == (t = n[this.node.type]) ? void 0 : t[e])
                    }
                    ,
                    bx.isBlacklisted = bx.isDenylisted = function() {
                        var e, t = null != (e = this.opts.denylist) ? e : this.opts.blacklist;
                        return t && t.indexOf(this.node.type) > -1
                    }
                    ,
                    bx.popContext = function() {
                        this.contexts.pop(),
                        this.contexts.length > 0 ? this.setContext(this.contexts[this.contexts.length - 1]) : this.setContext(void 0)
                    }
                    ,
                    bx.pushContext = function(e) {
                        this.contexts.push(e),
                        this.setContext(e)
                    }
                    ,
                    bx.requeue = function() {
                        var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this;
                        if (!e.removed) {
                            var t, n = this.contexts, r = (0,
                            k.Z)(n);
                            try {
                                for (r.s(); !(t = r.n()).done; )
                                    t.value.maybeQueue(e)
                            } catch (i) {
                                r.e(i)
                            } finally {
                                r.f()
                            }
                        }
                    }
                    ,
                    bx.resync = function() {
                        this.removed || (this._resyncParent(),
                        this._resyncList(),
                        this._resyncKey())
                    }
                    ,
                    bx.setContext = function(e) {
                        return null != this.skipKeys && (this.skipKeys = {}),
                        this._traverseFlags = 0,
                        e && (this.context = e,
                        this.state = e.state,
                        this.opts = e.opts),
                        this.setScope(),
                        this
                    }
                    ,
                    bx.setKey = function(e) {
                        var t;
                        this.key = e,
                        this.node = this.container[this.key],
                        this.type = null == (t = this.node) ? void 0 : t.type
                    }
                    ,
                    bx.setScope = function() {
                        var e, t;
                        if (null == (e = this.opts) || !e.noScope) {
                            var n, r = this.parentPath;
                            for ((("key" === this.key || "decorators" === this.listKey) && r.isMethod() || "discriminant" === this.key && r.isSwitchStatement()) && (r = r.parentPath); r && !n; ) {
                                var i;
                                if (null != (i = r.opts) && i.noScope)
                                    return;
                                n = r.scope,
                                r = r.parentPath
                            }
                            this.scope = this.getScope(n),
                            null == (t = this.scope) || t.init()
                        }
                    }
                    ,
                    bx.setup = function(e, t, n, r) {
                        this.listKey = n,
                        this.container = t,
                        this.parentPath = e || this.parentPath,
                        this.setKey(r)
                    }
                    ,
                    bx.skip = function() {
                        this.shouldSkip = !0
                    }
                    ,
                    bx.skipKey = function(e) {
                        null == this.skipKeys && (this.skipKeys = {}),
                        this.skipKeys[e] = !0
                    }
                    ,
                    bx.stop = function() {
                        this._traverseFlags |= t.SHOULD_SKIP | t.SHOULD_STOP
                    }
                    ,
                    bx.visit = function() {
                        var t, r;
                        if (!this.node)
                            return !1;
                        if (this.isDenylisted())
                            return !1;
                        if (null != (t = (r = this.opts).shouldSkip) && t.call(r, this))
                            return !1;
                        var i = this.context;
                        return this.shouldSkip || this.call("enter") ? (this.debug("Skip..."),
                        this.shouldStop) : (n(this, i),
                        this.debug("Recursing into..."),
                        this.shouldStop = (0,
                        e.traverseNode)(this.node, this.opts, this.scope, this.state, this, this.skipKeys),
                        n(this, i),
                        this.call("exit"),
                        this.shouldStop)
                    }
                    ;
                    var e = qx()
                      , t = Jx();
                    function n(e, t) {
                        e.context !== t && (e.context = t,
                        e.state = t.state,
                        e.opts = t.opts)
                    }
                    return bx
                }()
                  , m = function() {
                    if (Ex)
                        return Ix;
                    Ex = 1,
                    Object.defineProperty(Ix, "__esModule", {
                        value: !0
                    }),
                    Ix._assertUnremoved = function() {
                        if (this.removed)
                            throw this.buildCodeFrameError("NodePath has been removed so is read-only.")
                    }
                    ,
                    Ix._callRemovalHooks = function() {
                        if (this.parentPath) {
                            var t, n = (0,
                            k.Z)(e.hooks);
                            try {
                                for (n.s(); !(t = n.n()).done; )
                                    if ((0,
                                    t.value)(this, this.parentPath))
                                        return !0
                            } catch (r) {
                                n.e(r)
                            } finally {
                                n.f()
                            }
                        }
                    }
                    ,
                    Ix._markRemoved = function() {
                        this._traverseFlags |= n.SHOULD_SKIP | n.REMOVED,
                        this.parent && (0,
                        t.getCachedPaths)(this.hub, this.parent).delete(this.node),
                        this.node = null
                    }
                    ,
                    Ix._remove = function() {
                        Array.isArray(this.container) ? (this.container.splice(this.key, 1),
                        this.updateSiblingKeys(this.key, -1)) : this._replaceWith(null)
                    }
                    ,
                    Ix._removeFromScope = function() {
                        var e = this
                          , t = r(this.node, !1, !1, !0);
                        Object.keys(t).forEach((function(t) {
                            return e.scope.removeBinding(t)
                        }
                        ))
                    }
                    ,
                    Ix.remove = function() {
                        var e;
                        this._assertUnremoved(),
                        this.resync(),
                        null != (e = this.opts) && e.noScope || this._removeFromScope(),
                        this._callRemovalHooks() || (this.shareCommentsWithSiblings(),
                        this._remove()),
                        this._markRemoved()
                    }
                    ;
                    var e = Nx
                      , t = uy
                      , n = Jx()
                      , r = zi().getBindingIdentifiers;
                    return Ix
                }()
                  , g = Bx()
                  , y = Fx()
                  , v = Hx
                  , _ = Mg
                  , A = i.validate
                  , M = t("babel");
                vy.REMOVED = 1,
                vy.SHOULD_STOP = 2,
                vy.SHOULD_SKIP = 4;
                var T = vy.default = function() {
                    function e(t, n) {
                        (0,
                        D.Z)(this, e),
                        this.contexts = [],
                        this.state = null,
                        this.opts = null,
                        this._traverseFlags = 0,
                        this.skipKeys = null,
                        this.parentPath = null,
                        this.container = null,
                        this.listKey = null,
                        this.key = null,
                        this.node = null,
                        this.type = null,
                        this.parent = n,
                        this.hub = t,
                        this.data = null,
                        this.context = null,
                        this.scope = null
                    }
                    return (0,
                    C.Z)(e, [{
                        key: "removed",
                        get: function() {
                            return (1 & this._traverseFlags) > 0
                        },
                        set: function(e) {
                            e ? this._traverseFlags |= 1 : this._traverseFlags &= -2
                        }
                    }, {
                        key: "shouldStop",
                        get: function() {
                            return (2 & this._traverseFlags) > 0
                        },
                        set: function(e) {
                            e ? this._traverseFlags |= 2 : this._traverseFlags &= -3
                        }
                    }, {
                        key: "shouldSkip",
                        get: function() {
                            return (4 & this._traverseFlags) > 0
                        },
                        set: function(e) {
                            e ? this._traverseFlags |= 4 : this._traverseFlags &= -5
                        }
                    }, {
                        key: "getScope",
                        value: function(e) {
                            return this.isScope() ? new r.default(this) : e
                        }
                    }, {
                        key: "setData",
                        value: function(e, t) {
                            return null == this.data && (this.data = Object.create(null)),
                            this.data[e] = t
                        }
                    }, {
                        key: "getData",
                        value: function(e, t) {
                            null == this.data && (this.data = Object.create(null));
                            var n = this.data[e];
                            return void 0 === n && void 0 !== t && (n = this.data[e] = t),
                            n
                        }
                    }, {
                        key: "hasNode",
                        value: function() {
                            return null != this.node
                        }
                    }, {
                        key: "buildCodeFrameError",
                        value: function(e) {
                            var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : SyntaxError;
                            return this.hub.buildError(this.node, e, t)
                        }
                    }, {
                        key: "traverse",
                        value: function(e, t) {
                            (0,
                            n.default)(this.node, e, this.scope, t, this)
                        }
                    }, {
                        key: "set",
                        value: function(e, t) {
                            A(this.node, e, t),
                            this.node[e] = t
                        }
                    }, {
                        key: "getPathLocation",
                        value: function() {
                            var e = []
                              , t = this;
                            do {
                                var n = t.key;
                                t.inList && (n = "".concat(t.listKey, "[").concat(n, "]")),
                                e.unshift(n)
                            } while (t = t.parentPath);
                            return e.join(".")
                        }
                    }, {
                        key: "debug",
                        value: function(e) {
                            M.enabled && M("".concat(this.getPathLocation(), " ").concat(this.type, ": ").concat(e))
                        }
                    }, {
                        key: "toString",
                        value: function() {
                            return (0,
                            s.default)(this.node).code
                        }
                    }, {
                        key: "inList",
                        get: function() {
                            return !!this.listKey
                        },
                        set: function(e) {
                            e || (this.listKey = null)
                        }
                    }, {
                        key: "parentKey",
                        get: function() {
                            return this.listKey || this.key
                        }
                    }], [{
                        key: "get",
                        value: function(t) {
                            var n = t.hub
                              , r = t.parentPath
                              , i = t.parent
                              , a = t.container
                              , s = t.listKey
                              , c = t.key;
                            if (!n && r && (n = r.hub),
                            !i)
                                throw new Error("To get a node path the parent needs to exist");
                            var u = a[c]
                              , l = o.getOrCreateCachedPaths(n, i)
                              , p = l.get(u);
                            return p || (p = new e(n,i),
                            u && l.set(u, p)),
                            p.setup(r, a, s, c),
                            p
                        }
                    }]),
                    e
                }()
                  , b = {
                    findParent: c.findParent,
                    find: c.find,
                    getFunctionParent: c.getFunctionParent,
                    getStatementParent: c.getStatementParent,
                    getEarliestCommonAncestorFrom: c.getEarliestCommonAncestorFrom,
                    getDeepestCommonAncestorFrom: c.getDeepestCommonAncestorFrom,
                    getAncestry: c.getAncestry,
                    isAncestor: c.isAncestor,
                    isDescendant: c.isDescendant,
                    inType: c.inType,
                    getTypeAnnotation: u.getTypeAnnotation,
                    _getTypeAnnotation: u._getTypeAnnotation,
                    isBaseType: u.isBaseType,
                    couldBeBaseType: u.couldBeBaseType,
                    baseTypeStrictlyMatches: u.baseTypeStrictlyMatches,
                    isGenericType: u.isGenericType,
                    replaceWithMultiple: l.replaceWithMultiple,
                    replaceWithSourceString: l.replaceWithSourceString,
                    replaceWith: l.replaceWith,
                    _replaceWith: l._replaceWith,
                    replaceExpressionWithStatements: l.replaceExpressionWithStatements,
                    replaceInline: l.replaceInline,
                    evaluateTruthy: p.evaluateTruthy,
                    evaluate: p.evaluate,
                    toComputedKey: d.toComputedKey,
                    ensureBlock: d.ensureBlock,
                    unwrapFunctionEnvironment: d.unwrapFunctionEnvironment,
                    arrowFunctionToExpression: d.arrowFunctionToExpression,
                    matchesPattern: h.matchesPattern,
                    has: h.has,
                    isStatic: h.isStatic,
                    is: h.is,
                    isnt: h.isnt,
                    equals: h.equals,
                    isNodeType: h.isNodeType,
                    canHaveVariableDeclarationOrExpression: h.canHaveVariableDeclarationOrExpression,
                    canSwapBetweenExpressionAndStatement: h.canSwapBetweenExpressionAndStatement,
                    isCompletionRecord: h.isCompletionRecord,
                    isStatementOrBlock: h.isStatementOrBlock,
                    referencesImport: h.referencesImport,
                    getSource: h.getSource,
                    willIMaybeExecuteBefore: h.willIMaybeExecuteBefore,
                    _guessExecutionStatusRelativeTo: h._guessExecutionStatusRelativeTo,
                    resolve: h.resolve,
                    _resolve: h._resolve,
                    isConstantExpression: h.isConstantExpression,
                    isInStrictMode: h.isInStrictMode,
                    call: f.call,
                    _call: f._call,
                    isDenylisted: f.isDenylisted,
                    isBlacklisted: f.isBlacklisted,
                    visit: f.visit,
                    skip: f.skip,
                    skipKey: f.skipKey,
                    stop: f.stop,
                    setScope: f.setScope,
                    setContext: f.setContext,
                    resync: f.resync,
                    _resyncParent: f._resyncParent,
                    _resyncKey: f._resyncKey,
                    _resyncList: f._resyncList,
                    _resyncRemoved: f._resyncRemoved,
                    popContext: f.popContext,
                    pushContext: f.pushContext,
                    setup: f.setup,
                    setKey: f.setKey,
                    requeue: f.requeue,
                    _getQueueContexts: f._getQueueContexts,
                    remove: m.remove,
                    _removeFromScope: m._removeFromScope,
                    _callRemovalHooks: m._callRemovalHooks,
                    _remove: m._remove,
                    _markRemoved: m._markRemoved,
                    _assertUnremoved: m._assertUnremoved,
                    insertBefore: g.insertBefore,
                    _containerInsert: g._containerInsert,
                    _containerInsertBefore: g._containerInsertBefore,
                    _containerInsertAfter: g._containerInsertAfter,
                    insertAfter: g.insertAfter,
                    updateSiblingKeys: g.updateSiblingKeys,
                    _verifyNodeList: g._verifyNodeList,
                    unshiftContainer: g.unshiftContainer,
                    pushContainer: g.pushContainer,
                    hoist: g.hoist,
                    getOpposite: y.getOpposite,
                    getCompletionRecords: y.getCompletionRecords,
                    getSibling: y.getSibling,
                    getPrevSibling: y.getPrevSibling,
                    getNextSibling: y.getNextSibling,
                    getAllNextSiblings: y.getAllNextSiblings,
                    getAllPrevSiblings: y.getAllPrevSiblings,
                    get: y.get,
                    _getKey: y._getKey,
                    _getPattern: y._getPattern,
                    getBindingIdentifiers: y.getBindingIdentifiers,
                    getOuterBindingIdentifiers: y.getOuterBindingIdentifiers,
                    getBindingIdentifierPaths: y.getBindingIdentifierPaths,
                    getOuterBindingIdentifierPaths: y.getOuterBindingIdentifierPaths,
                    shareCommentsWithSiblings: v.shareCommentsWithSiblings,
                    addComment: v.addComment,
                    addComments: v.addComments
                };
                Object.assign(T.prototype, b),
                T.prototype.arrowFunctionToShadowed = d[String("arrowFunctionToShadowed")],
                T.prototype._guessExecutionStatusRelativeToDifferentFunctions = h._guessExecutionStatusRelativeTo;
                var E, I = (0,
                k.Z)(a.TYPES);
                try {
                    var N = function() {
                        var e = E.value
                          , t = "is".concat(e)
                          , n = a[t];
                        T.prototype[t] = function(e) {
                            return n(this.node, e)
                        }
                        ,
                        T.prototype["assert".concat(e)] = function(t) {
                            if (!n(this.node, t))
                                throw new TypeError("Expected node path of type ".concat(e))
                        }
                    };
                    for (I.s(); !(E = I.n()).done; )
                        N()
                } catch (O) {
                    I.e(O)
                } finally {
                    I.f()
                }
                Object.assign(T.prototype, _);
                for (var S = 0, x = Object.keys(e); S < x.length; S++) {
                    var w = x[S];
                    "_" !== w[0] && (a.TYPES.includes(w) || a.TYPES.push(w))
                }
                return vy
            }
            function qx() {
                if (Qx)
                    return gy;
                Qx = 1,
                Object.defineProperty(gy, "__esModule", {
                    value: !0
                }),
                gy.traverseNode = function(n, r, i, a, o, s, c) {
                    var u = t[n.type];
                    if (!u)
                        return !1;
                    var l = new e.default(i,r,a,o);
                    if (c)
                        return (null == s || !s[o.parentKey]) && l.visitQueue([o]);
                    var p, d = (0,
                    k.Z)(u);
                    try {
                        for (d.s(); !(p = d.n()).done; ) {
                            var h = p.value;
                            if ((null == s || !s[h]) && l.visit(n, h))
                                return !0
                        }
                    } catch (f) {
                        d.e(f)
                    } finally {
                        d.f()
                    }
                    return !1
                }
                ;
                var e = function() {
                    if (Yx)
                        return yy;
                    Yx = 1,
                    Object.defineProperty(yy, "__esModule", {
                        value: !0
                    }),
                    yy.default = void 0;
                    var e = Jx()
                      , t = zi().VISITOR_KEYS
                      , n = function() {
                        function n(e, t, r, i) {
                            (0,
                            D.Z)(this, n),
                            this.queue = null,
                            this.priorityQueue = null,
                            this.parentPath = i,
                            this.scope = e,
                            this.state = r,
                            this.opts = t
                        }
                        return (0,
                        C.Z)(n, [{
                            key: "shouldVisit",
                            value: function(e) {
                                var n = this.opts;
                                if (n.enter || n.exit)
                                    return !0;
                                if (n[e.type])
                                    return !0;
                                var r = t[e.type];
                                if (null == r || !r.length)
                                    return !1;
                                var i, a = (0,
                                k.Z)(r);
                                try {
                                    for (a.s(); !(i = a.n()).done; )
                                        if (e[i.value])
                                            return !0
                                } catch (o) {
                                    a.e(o)
                                } finally {
                                    a.f()
                                }
                                return !1
                            }
                        }, {
                            key: "create",
                            value: function(t, n, r, i) {
                                return e.default.get({
                                    parentPath: this.parentPath,
                                    parent: t,
                                    container: n,
                                    key: r,
                                    listKey: i
                                })
                            }
                        }, {
                            key: "maybeQueue",
                            value: function(e, t) {
                                this.queue && (t ? this.queue.push(e) : this.priorityQueue.push(e))
                            }
                        }, {
                            key: "visitMultiple",
                            value: function(e, t, n) {
                                if (0 === e.length)
                                    return !1;
                                for (var r = [], i = 0; i < e.length; i++) {
                                    var a = e[i];
                                    a && this.shouldVisit(a) && r.push(this.create(t, e, i, n))
                                }
                                return this.visitQueue(r)
                            }
                        }, {
                            key: "visitSingle",
                            value: function(e, t) {
                                return !!this.shouldVisit(e[t]) && this.visitQueue([this.create(e, e, t)])
                            }
                        }, {
                            key: "visitQueue",
                            value: function(e) {
                                this.queue = e,
                                this.priorityQueue = [];
                                for (var t = new WeakSet, n = !1, r = 0; r < e.length; ) {
                                    var i = e[r];
                                    if (r++,
                                    i.resync(),
                                    0 !== i.contexts.length && i.contexts[i.contexts.length - 1] === this || i.pushContext(this),
                                    null !== i.key) {
                                        var a = i.node;
                                        if (!t.has(a)) {
                                            if (a && t.add(a),
                                            i.visit()) {
                                                n = !0;
                                                break
                                            }
                                            if (this.priorityQueue.length && (n = this.visitQueue(this.priorityQueue),
                                            this.priorityQueue = [],
                                            this.queue = e,
                                            n))
                                                break
                                        }
                                    }
                                }
                                for (var o = 0; o < r; o++)
                                    e[o].popContext();
                                return this.queue = null,
                                n
                            }
                        }, {
                            key: "visit",
                            value: function(e, t) {
                                var n = e[t];
                                return !!n && (Array.isArray(n) ? this.visitMultiple(n, e, t) : this.visitSingle(e, t))
                            }
                        }]),
                        n
                    }();
                    return yy.default = n,
                    yy
                }()
                  , t = zi().VISITOR_KEYS;
                return gy
            }
            var $x = {};
            Object.defineProperty($x, "__esModule", {
                value: !0
            }),
            $x.default = void 0;
            var ew, tw = function() {
                function e() {
                    (0,
                    D.Z)(this, e)
                }
                return (0,
                C.Z)(e, [{
                    key: "getCode",
                    value: function() {}
                }, {
                    key: "getScope",
                    value: function() {}
                }, {
                    key: "addHelper",
                    value: function() {
                        throw new Error("Helpers are not supported by the default hub.")
                    }
                }, {
                    key: "buildError",
                    value: function(e, t) {
                        return new (arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : TypeError)(t)
                    }
                }]),
                e
            }();
            function nw() {
                return ew || (ew = 1,
                function(e) {
                    Object.defineProperty(e, "__esModule", {
                        value: !0
                    }),
                    Object.defineProperty(e, "Hub", {
                        enumerable: !0,
                        get: function() {
                            return s.default
                        }
                    }),
                    Object.defineProperty(e, "NodePath", {
                        enumerable: !0,
                        get: function() {
                            return a.default
                        }
                    }),
                    Object.defineProperty(e, "Scope", {
                        enumerable: !0,
                        get: function() {
                            return o.default
                        }
                    }),
                    e.visitors = e.default = void 0;
                    var t = _g;
                    e.visitors = t;
                    var n = zi()
                      , r = uy
                      , i = qx()
                      , a = Jx()
                      , o = Zy()
                      , s = $x
                      , c = n.VISITOR_KEYS
                      , u = n.removeProperties
                      , l = n.traverseFast;
                    function p(e) {
                        var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
                          , r = arguments.length > 2 ? arguments[2] : void 0
                          , a = arguments.length > 3 ? arguments[3] : void 0
                          , o = arguments.length > 4 ? arguments[4] : void 0
                          , s = arguments.length > 5 ? arguments[5] : void 0;
                        if (e) {
                            if (!n.noScope && !r && "Program" !== e.type && "File" !== e.type)
                                throw new Error("You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ".concat(e.type, " node without passing scope and parentPath."));
                            if (!o && s)
                                throw new Error("visitSelf can only be used when providing a NodePath.");
                            c[e.type] && (t.explode(n),
                            (0,
                            i.traverseNode)(e, n, r, a, o, null, s))
                        }
                    }
                    function d(e, t) {
                        e.node.type === t.type && (t.has = !0,
                        e.stop())
                    }
                    e.default = p,
                    p.visitors = t,
                    p.verify = t.verify,
                    p.explode = t.explode,
                    p.cheap = function(e, t) {
                        l(e, t)
                    }
                    ,
                    p.node = function(e, t, n, r, a, o) {
                        (0,
                        i.traverseNode)(e, t, n, r, a, o)
                    }
                    ,
                    p.clearNode = function(e, t) {
                        u(e, t)
                    }
                    ,
                    p.removeProperties = function(e, t) {
                        return l(e, p.clearNode, t),
                        e
                    }
                    ,
                    p.hasType = function(e, t, n) {
                        if (null != n && n.includes(e.type))
                            return !1;
                        if (e.type === t)
                            return !0;
                        var r = {
                            has: !1,
                            type: t
                        };
                        return p(e, {
                            noScope: !0,
                            denylist: n,
                            enter: d
                        }, null, r),
                        r.has
                    }
                    ,
                    p.cache = r
                }(vg)),
                vg
            }
            $x.default = tw;
            var rw, iw = z(nw()), aw = new Uint8Array(16);
            function ow() {
                if (!rw && !(rw = "undefined" !== typeof crypto && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)))
                    throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
                return rw(aw)
            }
            for (var sw = [], cw = 0; cw < 256; ++cw)
                sw.push((cw + 256).toString(16).slice(1));
            var uw = {
                randomUUID: "undefined" !== typeof crypto && crypto.randomUUID && crypto.randomUUID.bind(crypto)
            };
            function lw(e, t, n) {
                if (uw.randomUUID && !t && !e)
                    return uw.randomUUID();
                var r = (e = e || {}).random || (e.rng || ow)();
                if (r[6] = 15 & r[6] | 64,
                r[8] = 63 & r[8] | 128,
                t) {
                    n = n || 0;
                    for (var i = 0; i < 16; ++i)
                        t[n + i] = r[i];
                    return t
                }
                return function(e) {
                    var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
                    return sw[e[t + 0]] + sw[e[t + 1]] + sw[e[t + 2]] + sw[e[t + 3]] + "-" + sw[e[t + 4]] + sw[e[t + 5]] + "-" + sw[e[t + 6]] + sw[e[t + 7]] + "-" + sw[e[t + 8]] + sw[e[t + 9]] + "-" + sw[e[t + 10]] + sw[e[t + 11]] + sw[e[t + 12]] + sw[e[t + 13]] + sw[e[t + 14]] + sw[e[t + 15]]
                }(r)
            }
            var pw = {
                scenes: {
                    scenesDict: {},
                    currentSceneId: "",
                    sortList: [""]
                },
                styles: {
                    stylesDict: {}
                },
                stageSize: {
                    width: 562,
                    height: 900
                },
                variables: {
                    variablesDict: {}
                },
                broadcasts: {
                    broadcastsDict: {}
                },
                actors: {
                    actorsDict: {}
                },
                audios: {
                    audiosDict: {},
                    sortList: [],
                    currentAudioId: ""
                },
                procedures: {
                    proceduresDict: {}
                },
                version: "0.12.0",
                previewUrl: ""
            }
              , dw = /^STRING_(\d+)$/
              , hw = function e(t, n) {
                if ("NumericLiteral" === t.type || "StringLiteral" === t.type)
                    return t.value;
                if ("UnaryExpression" === t.type) {
                    if ("-" === t.operator)
                        return -e(t.argument, n);
                    if ("+" === t.operator)
                        return e(t.argument, n)
                }
                return mw(t, n)
            }
              , fw = {
                AssignmentExpression: function(e, t) {
                    var n = e.left
                      , r = e.right;
                    if ("ArrowFunctionExpression" === r.type && "Identifier" === n.type) {
                        var i = {
                            type: "FunctionDeclaration",
                            id: {
                                type: "Identifier",
                                name: n.name
                            },
                            params: r.params,
                            leadingComments: e.leadingComments,
                            body: r.body,
                            generator: !1,
                            async: !1
                        };
                        return mw(i, t)
                    }
                    if ("MemberExpression" === n.type && "Identifier" === n.object.type) {
                        var a = {
                            type: "replace_list_item"
                        }
                          , o = {
                            type: "BinaryExpression",
                            left: n.property,
                            operator: "+",
                            right: {
                                type: "NumericLiteral",
                                value: 1
                            }
                        }
                          , s = [n.object.name, "\u7b2c", hw(o, t), hw(r, t)]
                          , c = t.configOptions.getJsonConfig(a.type);
                        return t.injectBlock(a, c, s),
                        a
                    }
                    var u = {
                        type: "variables_set"
                    };
                    if ("Identifier" === n.type) {
                        var l = n.name;
                        if (Tw(r, t)) {
                            u.type = "list_copy";
                            var p = t.configOptions.getJsonConfig(u.type);
                            return t.injectBlock(u, p, [hw(r, t), l]),
                            u
                        }
                        var d = [l, hw(r, t)]
                          , h = t.configOptions.getJsonConfig(u.type);
                        t.injectBlock(u, h, d)
                    }
                    return u
                },
                ExpressionStatement: function(e, t) {
                    var n, r = mw(e.expression, t);
                    if (["change_variables", "show_hide_variables", "variables_get", "variables_set"].includes(r.type)) {
                        var i, a = null == (n = r.fields) ? void 0 : n.variable;
                        t.bcmAddedData.variables.forEach((function(e) {
                            e.id === a && (i = e)
                        }
                        )),
                        function(e, t) {
                            if (!t)
                                return;
                            var n = new RegExp("\\".concat(Xd, "(.*)\\").concat(Xd))
                              , r = null == t ? void 0 : t.findIndex((function(e) {
                                return n.test(e.value)
                            }
                            ));
                            if (-1 === r)
                                return;
                            var i = t[r].value.match(n);
                            if (!i || !i[1])
                                return;
                            t.splice(r, 1),
                            e && (e.value = i[1])
                        }(i, e.leadingComments)
                    }
                    return r
                },
                CallExpression: function(e, t) {
                    var n, r, i, a = e.callee;
                    if ("Identifier" === a.type) {
                        var o = a.name
                          , s = t.configOptions.blocksOptions[o];
                        o === Yd && (s = yw(s, t));
                        var c = ""
                          , u = {
                            type: ""
                        };
                        if (!s) {
                            var l = gw(o, t);
                            if (l)
                                s = l.options,
                                u.fields = {
                                    NAME: l.procedure.id
                                };
                            else {
                                c = o;
                                var p = t.findPathByName(o);
                                s = "arguments" === (null == p ? void 0 : p.listKey) ? t.configOptions.blocksOptions.bcm_translator_text_return_value_block : t.configOptions.blocksOptions.bcm_translator_text_execution_block,
                                t.notExistBlocks.push({
                                    name: o,
                                    line: (null == (n = e.loc) ? void 0 : n.start.line) || 0
                                })
                            }
                        }
                        if ("\u51fd\u6570\u89d2\u8272" === a.name) {
                            var d = e.arguments[0]
                              , h = "StringLiteral" === d.type ? d.value : ""
                              , f = t.embedBlocks.get(h) || {}
                              , m = f.id
                              , g = f.paramType;
                            u.mutation = '<mutation id="'.concat(m, '" type="').concat(g, '"></mutation>')
                        }
                        u.type = s.type;
                        var y = []
                          , v = [];
                        e.arguments.forEach((function(e) {
                            "ArrowFunctionExpression" === e.type || "FunctionExpression" === e.type ? y.push(e) : v.push(e)
                        }
                        ));
                        var _ = v.map((function(e) {
                            return hw(e, t)
                        }
                        ))
                          , A = function(e) {
                            var t = Number(e);
                            return Number.isNaN(t) ? 10 : t < 5 ? 5 : t > 20 ? 20 : t
                        }
                          , M = function() {
                            return {
                                mutation: '<mutation sound_color_speed="10" sound_color_pitch="10" sound_color_volume="10"></mutation>',
                                soundType: Jd["\u7537\u58f0"]
                            }
                        };
                        if ("\u8bbe\u7f6e\u8bf4\u8bdd\u97f3\u8272\u4e3a" === o && "StringLiteral" === (null == (r = e.arguments[0]) ? void 0 : r.type)) {
                            var T = function(e) {
                                var t;
                                if ("StringLiteral" !== (null == (t = e.arguments[0]) ? void 0 : t.type))
                                    return M();
                                var n = e.arguments[0].value.trim();
                                if (!n)
                                    return M();
                                var r = n.split("-");
                                if (4 !== r.length)
                                    return M();
                                var i = (0,
                                x.Z)(r, 4)
                                  , a = i[0]
                                  , o = i[1]
                                  , s = i[2]
                                  , c = i[3]
                                  , u = a in Jd ? a : "\u7537\u58f0"
                                  , l = A(o)
                                  , p = A(s)
                                  , d = A(c);
                                return {
                                    mutation: '<mutation sound_color_speed="'.concat(l, '" sound_color_pitch="').concat(p, '" sound_color_volume="').concat(d, '"></mutation>'),
                                    soundType: Jd[u]
                                }
                            }(e)
                              , b = T.mutation
                              , E = T.soundType;
                            s.mutation = b,
                            _[0] = E
                        }
                        "\u8bbe\u7f6e\u8bf4\u8bdd\u97f3\u8272\u4e3a" === o && void 0 === e.arguments[0] && (s.mutation = M().mutation,
                        _[0] = M().soundType);
                        var I = new Set;
                        if (y.forEach((function(e) {
                            (e.params.forEach((function(e) {
                                var n;
                                if ("Identifier" === e.type) {
                                    var r = _.length
                                      , i = s.args[r];
                                    if (i && "input_value" === i.type && i.embedBlock && !i.embedBlock.isShadow) {
                                        u.id = u.id || lw();
                                        var a = dw.test(e.name) && (null == (n = e.name.match(dw)) ? void 0 : n[1]) || e.name;
                                        I.add(a),
                                        t.embedBlocks.set(e.name, {
                                            id: u.id,
                                            paramBlock: i.embedBlock.paramBlock
                                        }),
                                        _.push(a)
                                    }
                                }
                            }
                            )),
                            "BlockStatement" === e.body.type) && t.parsesAstBodys(e.body.body).forEach((function(e) {
                                if (t.configOptions.topBlocks.includes(e.type))
                                    t.extraTopBlocks.push(e);
                                else {
                                    var n = _.length
                                      , r = s.args[n];
                                    r && "input_statement" !== r.type && _.push("\u53c2\u6570"),
                                    _.push(e)
                                }
                            }
                            ))
                        }
                        )),
                        I.forEach((function(e) {
                            t.embedBlocks.delete(e)
                        }
                        )),
                        s.expansionArg) {
                            for (var N = hp(s), S = _.length - N.args.length, w = 0; w < S; w++) {
                                var k = hp(s.expansionArg);
                                k.name = "".concat(k.name).concat(w),
                                N.args.push(k),
                                (null == (i = k.embedBlock) ? void 0 : i.defaultValue) && "string" === typeof _[w] && (_[w] = _[w].toString().replace(k.embedBlock.defaultValue, ""),
                                c += '<arg name="'.concat(k.name).concat(w, '"></arg>'))
                            }
                            s = N,
                            u.mutation = '<mutation items="'.concat(S, '">').concat(c, "</mutation>")
                        }
                        return t.injectBlock(u, s, _),
                        u
                    }
                    if ("MemberExpression" === a.type)
                        return vw(a, e.arguments, t)
                },
                UnaryExpression: function(e, t) {
                    var n = hw(e.argument, t);
                    if ("!" === e.operator) {
                        var r = {
                            type: "logic_negate"
                        }
                          , i = t.configOptions.getJsonConfig(r.type);
                        return t.injectBlock(r, i, [n]),
                        Aw(r)
                    }
                    var a = {
                        type: "math_arithmetic"
                    }
                      , o = [0, e.operator, n]
                      , s = t.configOptions.getJsonConfig(a.type);
                    return t.injectBlock(a, s, o),
                    a
                },
                BinaryExpression: function(e, t) {
                    var n = hw(e.left, t)
                      , r = hw(e.right, t)
                      , i = [n, e.operator, r]
                      , a = {
                        type: "logic_compare"
                    };
                    ["+", "-", "*", "/", "^"].includes(e.operator) && (a.type = "math_arithmetic"),
                    "==" === e.operator && (e.operator = "==="),
                    "%" === e.operator && (a.type = "math_modulo",
                    i = [n, r]);
                    var o = t.configOptions.getJsonConfig(a.type);
                    return t.injectBlock(a, o, i),
                    a
                },
                LogicalExpression: function(e, t) {
                    var n = hw(e.left, t)
                      , r = hw(e.right, t)
                      , i = {
                        type: "logic_operation"
                    }
                      , a = [n, e.operator, r]
                      , o = t.configOptions.getJsonConfig(i.type);
                    return t.injectBlock(i, o, a),
                    i
                },
                UpdateExpression: function(e, t) {
                    var n = e.argument
                      , r = {
                        type: "BinaryExpression",
                        left: n,
                        right: {
                            type: "NumericLiteral",
                            value: 1
                        },
                        operator: "++" === e.operator ? "+" : "-"
                    };
                    if ("Identifier" === n.type) {
                        var i = {
                            type: "variables_set"
                        }
                          , a = [n.name, hw(r, t)]
                          , o = t.configOptions.getJsonConfig(i.type);
                        return t.injectBlock(i, o, a),
                        i
                    }
                    if ("MemberExpression" === n.type && "Identifier" === n.object.type) {
                        var s = {
                            type: "replace_list_item"
                        }
                          , c = [n.object.name, "\u7b2c", hw(n.property, t), hw(r, t)]
                          , u = t.configOptions.getJsonConfig(s.type);
                        return t.injectBlock(s, u, c),
                        s
                    }
                },
                IfStatement: function(e, t) {
                    var n = {
                        type: "controls_if",
                        inputs: {},
                        statements: {},
                        shadows: {}
                    }
                      , r = 0
                      , i = 0;
                    return function e(n, a) {
                        if (a.inputs && a.statements && a.shadows) {
                            var o = n.test
                              , s = n.consequent
                              , c = n.alternate
                              , u = Object.keys(a.inputs).length
                              , l = hw(o, t);
                            if (t.injectInput({
                                inputs: a.inputs,
                                shadows: a.shadows
                            }, l, {
                                type: "input_value",
                                name: "IF".concat(u),
                                check: "Boolean"
                            }),
                            "BlockStatement" === s.type) {
                                var p = t.parsesAstBodys(s.body).filter((function(e) {
                                    return !t.configOptions.topBlocks.includes(e.type) || (t.extraTopBlocks.push(e),
                                    !1)
                                }
                                ))
                                  , d = (0,
                                x.Z)(p, 1)[0];
                                d && (a.statements["DO".concat(u)] = d)
                            }
                            if ("ReturnStatement" === s.type) {
                                var h = mw(s, t);
                                h && (a.statements["DO".concat(u)] = h)
                            }
                            if ("ExpressionStatement" === s.type) {
                                var f = mw(s.expression, t);
                                f && (a.statements["DO".concat(u)] = f)
                            }
                            if ("IfStatement" === (null == c ? void 0 : c.type))
                                return r++,
                                void e(c, a);
                            if ("BlockStatement" === (null == c ? void 0 : c.type)) {
                                i++;
                                var m = t.parsesAstBodys(c.body).filter((function(e) {
                                    return !t.configOptions.topBlocks.includes(e.type) || (t.extraTopBlocks.push(e),
                                    !1)
                                }
                                ))
                                  , g = (0,
                                x.Z)(m, 1)[0];
                                g && (a.statements.ELSE = g)
                            }
                            if ("ExpressionStatement" === (null == c ? void 0 : c.type)) {
                                i++;
                                var y = mw(c.expression, t);
                                y && (a.statements.ELSE = y)
                            }
                        }
                    }(e, n),
                    n.mutation = '<mutation elseif="'.concat(r, '" else="').concat(i, '"></mutation>'),
                    n
                },
                ForStatement: function(e, t) {
                    var n = e.init
                      , r = e.test
                      , i = e.update
                      , a = e.body
                      , o = n ? mw(n, t) : void 0
                      , s = o;
                    o ? (o.next = {
                        type: "repeat_forever_until"
                    },
                    s = o.next) : s = o = {
                        type: "repeat_forever_until"
                    };
                    var c = t.configOptions.getJsonConfig(s.type)
                      , u = [];
                    if (r) {
                        var l = {
                            type: "UnaryExpression",
                            argument: r,
                            operator: "!",
                            prefix: !0
                        };
                        u.push(hw(l, t))
                    }
                    if ("BlockStatement" === a.type) {
                        i && a.body.push({
                            type: "ExpressionStatement",
                            expression: i
                        });
                        var p = t.parsesAstBodys(a.body)
                          , d = (0,
                        x.Z)(p, 1)[0];
                        u.push(d),
                        t.injectBlock(s, c, u)
                    }
                    return o
                },
                WhileStatement: function(e, t) {
                    var n = e.test
                      , r = e.body
                      , i = {
                        type: "repeat_forever_until"
                    }
                      , a = t.configOptions.getJsonConfig(i.type)
                      , o = [];
                    if (n) {
                        var s = hw({
                            type: "UnaryExpression",
                            argument: n,
                            operator: "!",
                            prefix: !0
                        }, t);
                        o.push(s)
                    }
                    if ("BlockStatement" === r.type) {
                        var c = t.parsesAstBodys(r.body)
                          , u = (0,
                        x.Z)(c, 1)[0];
                        o.push(u),
                        t.injectBlock(i, a, o)
                    }
                    return i
                },
                DoWhileStatement: function(e, t) {
                    var n = e.test
                      , r = e.body
                      , i = {
                        type: "repeat_forever_until"
                    }
                      , a = t.configOptions.getJsonConfig(i.type)
                      , o = [];
                    if (n) {
                        var s = {
                            type: "UnaryExpression",
                            argument: n,
                            operator: "!",
                            prefix: !0
                        };
                        o.push(hw(s, t))
                    }
                    if ("BlockStatement" === r.type) {
                        var c = t.parsesAstBodys(r.body)
                          , u = (0,
                        x.Z)(c, 1)[0];
                        o.push(u),
                        t.injectBlock(i, a, o)
                    }
                    return i
                },
                BreakStatement: function() {
                    return {
                        type: "break"
                    }
                },
                Identifier: function(e, t) {
                    var n = t.embedBlocks.get(e.name) || {}
                      , r = n.id
                      , i = n.paramBlock
                      , a = n.paramType
                      , o = n.paramName;
                    if (r && a)
                        return {
                            type: "procedures_2_parameter",
                            fields: {
                                param_name: ph(o || e.name)
                            },
                            mutation: '<mutation id="'.concat(r, '" type="').concat(a, '"></mutation>'),
                            is_output: !0
                        };
                    if (r && i) {
                        var s = {
                            type: i.type,
                            mutation: '<mutation owner_id="'.concat(r, '"></mutation>')
                        }
                          , c = [e.name];
                        return t.injectBlock(s, i, c),
                        s
                    }
                    if (e.name.startsWith(jd))
                        return {
                            type: "script_variables_value",
                            fields: {
                                TEXT: ph(e.name.replace(jd, ""))
                            },
                            is_output: !0
                        };
                    if (t.loadList(e.name)) {
                        var u = {
                            type: "list_get"
                        };
                        return t.injectBlock(u, {
                            type: "list_get",
                            args: [{
                                type: "input_field",
                                bcmPropertyType: "list",
                                name: "list"
                            }]
                        }, [e.name]),
                        u
                    }
                    var l = {
                        type: "variables_get"
                    };
                    return t.injectBlock(l, {
                        type: "variables_get",
                        args: [{
                            type: "input_field",
                            bcmPropertyType: "variable",
                            name: "variable"
                        }]
                    }, [e.name]),
                    l
                },
                FunctionDeclaration: function(e, t) {
                    var n, r, i, a, o, s;
                    if (!(null == (n = e.id) ? void 0 : n.name) || !t.bcmAddedData.procedures.get(e.id.name)) {
                        var c = Cd.NORMAL;
                        if (null == (r = e.id) ? void 0 : r.name.startsWith(Hd))
                            c = Cd.HEXAGONAL;
                        else if (null == (i = e.id) ? void 0 : i.name.startsWith(Gd))
                            c = Cd.ROUND;
                        else {
                            var u = Ew(e);
                            u && (c = u)
                        }
                        var l = {
                            id: lw(),
                            name: (null == (a = e.id) ? void 0 : a.name) || "".concat(Fd, "1"),
                            params: [],
                            type: c,
                            nekoBlockJsonList: [],
                            workspaceScrollXy: {
                                x: 0,
                                y: 0
                            }
                        };
                        t.bcmAddedData.procedures.set(l.name, l);
                        var p = {
                            id: l.id,
                            type: "procedures_2_defnoreturn",
                            deletable: !1,
                            editable: !1,
                            fields: {
                                NAME: l.id
                            },
                            statements: {}
                        }
                          , d = {}
                          , h = {}
                          , f = e.params
                          , m = e.leadingComments
                          , g = ""
                          , y = ""
                          , v = new Set;
                        if (((null == m ? void 0 : m.length) || 0) > f.length && (null == m || m.forEach((function(e, n) {
                            var r = e.value.trim().split(Kd)
                              , i = (0,
                            x.Z)(r, 3)
                              , a = i[0]
                              , o = i[1]
                              , s = i[2];
                            if (o) {
                                y = o;
                                var c = ph(o)
                                  , u = lw()
                                  , p = {
                                    id: u,
                                    type: a,
                                    name: c
                                };
                                if (a === kd.Custom && s)
                                    try {
                                        p.options = JSON.parse(s)
                                    } catch (_) {
                                        throw console.error(_),
                                        Error("\u51fd\u6570\u81ea\u5b9a\u4e49\u53c2\u6570\u683c\u5f0f\u4e0d\u5bf9")
                                    }
                                if (l.params.push(p),
                                "Label" !== a) {
                                    var m = f.find((function(e) {
                                        var t;
                                        return e.name === o || !!dw.test(e.name) && (null == (t = e.name.match(dw)) ? void 0 : t[1]) === o
                                    }
                                    ));
                                    m && (v.add(m.name),
                                    t.embedBlocks.set(m.name, {
                                        id: u,
                                        paramType: a,
                                        paramName: c
                                    })),
                                    d["PARAMS".concat(n)] = {
                                        id: u,
                                        type: "procedures_2_stable_parameter",
                                        deletable: !1,
                                        fields: {
                                            param_name: c,
                                            param_default_value: ""
                                        },
                                        is_output: !0
                                    },
                                    h["PARAMS".concat(n)] = '<shadow type="math_number" visible="visible"><field name="NUM">0</field></shadow>'
                                }
                                g += '<arg id="'.concat(u, '" name="').concat(c, '" type="').concat(a, '"></arg>')
                            }
                        }
                        ))),
                        !y) {
                            var _ = lw();
                            l.params.push({
                                id: _,
                                type: kd.Label,
                                name: (null == (o = e.id) ? void 0 : o.name) || "".concat(Fd, "1")
                            }),
                            h["PARAMS".concat(0)] = '<shadow type="math_number" visible="visible"><field name="NUM">0</field></shadow>',
                            g += '<arg id="'.concat(_, '" name="').concat((null == (s = e.id) ? void 0 : s.name) || "".concat(Fd, "1"), '" type="').concat(kd.Label, '"></arg>'),
                            f.forEach((function(e, n) {
                                if ("Identifier" === e.type) {
                                    var r = lw()
                                      , i = ph(e.name)
                                      , a = bw(e);
                                    a || (a = sh[i] || kd.String),
                                    v.add(e.name),
                                    t.embedBlocks.set(e.name, {
                                        id: r,
                                        paramType: a
                                    }),
                                    l.params.push({
                                        id: r,
                                        type: a,
                                        name: i
                                    }),
                                    d["PARAMS".concat(n + 1)] = {
                                        id: r,
                                        type: "procedures_2_stable_parameter",
                                        deletable: !1,
                                        fields: {
                                            param_name: i,
                                            param_default_value: ""
                                        },
                                        is_output: !0
                                    },
                                    g += '<arg id="'.concat(r, '" name="').concat(i, '" type="').concat(a, '"></arg>'),
                                    h["PARAMS".concat(n + 1)] = '<shadow type="math_number" visible="visible"><field name="NUM">0</field></shadow>'
                                }
                            }
                            ))
                        }
                        p.inputs = d,
                        p.shadows = h,
                        p.mutation = "<mutation>".concat(g, "</mutation>");
                        var A = t.parsesAstBodys(e.body.body).filter((function(e) {
                            return !t.configOptions.topBlocks.includes(e.type) || (t.extraTopBlocks.push(e),
                            !1)
                        }
                        ))
                          , M = (0,
                        x.Z)(A, 1)[0];
                        M && (p.statements = {
                            STACK: M
                        }),
                        l.nekoBlockJsonList = [p],
                        v.forEach((function(e) {
                            t.embedBlocks.delete(e)
                        }
                        ))
                    }
                },
                VariableDeclaration: function(e, t) {
                    var n = e.declarations[0];
                    if ("Identifier" === n.id.type) {
                        var r = {
                            type: "AssignmentExpression",
                            left: n.id,
                            right: n.init || {
                                type: "NumericLiteral",
                                value: 0
                            },
                            operator: "="
                        };
                        return mw(r, t)
                    }
                },
                BooleanLiteral: function(e, t) {
                    var n = {
                        type: "logic_negate"
                    }
                      , r = e.value
                      , i = t.configOptions.getJsonConfig(n.type);
                    return !1 === r && (r = {
                        type: "logic_negate"
                    },
                    t.injectBlock(r, i, [!1])),
                    t.injectBlock(n, i, [r]),
                    n
                },
                ObjectExpression: function() {
                    throw new Error("\u4e0d\u5141\u8bb8\u4f7f\u7528\u5bf9\u8c61\u5b57\u9762\u91cf")
                },
                SequenceExpression: function(e, t) {
                    var n = e.expressions;
                    return mw(n[n.length - 1], t)
                },
                MemberExpression: function(e, t) {
                    return vw(e, [], t)
                },
                ArrayExpression: function(e, t) {
                    var n = {
                        type: "temporary_list"
                    }
                      , r = t.configOptions.getJsonConfig(n.type)
                      , i = hp(r)
                      , a = [];
                    return r.expansionArg && (e.elements.forEach((function(e, n) {
                        var o = hp(r.expansionArg);
                        if (o && (o.name = "".concat(o.name).concat(n),
                        i.args.push(o),
                        e)) {
                            var s = hw(e, t);
                            s && a.push(s)
                        }
                    }
                    )),
                    n.mutation = '<mutation items="'.concat(e.elements.length, '"></mutation>')),
                    t.injectBlock(n, i, a),
                    n
                },
                ReturnStatement: function(e, t) {
                    var n, r = {
                        type: "procedures_2_return_value"
                    }, i = t.findPathByName(Yd), a = null == i ? void 0 : i.findParent((function(e) {
                        return e.isFunctionDeclaration()
                    }
                    )), o = "ROUND";
                    if (a && "FunctionDeclaration" === a.node.type && (null == (n = a.node.id) ? void 0 : n.name)) {
                        var s = a.node.id.name
                          , c = t.bcmAddedData.procedures.get(s) || pd(t.bcm.procedures.proceduresDict, (function(e) {
                            return e.name === s
                        }
                        ));
                        (null == c ? void 0 : c.type) === Cd.HEXAGONAL && (o = "HEXAGONAL")
                    }
                    var u = {
                        type: "procedures_2_return_value",
                        args: [(0,
                        N.Z)({
                            type: "input_value",
                            name: "VALUE",
                            check: "HEXAGONAL" === o ? "Boolean" : "String"
                        }, "HEXAGONAL" === o ? {
                            embedBlock: {
                                blockName: "procedure_boolean",
                                type: "input_field",
                                name: "VALUE",
                                isShadow: !0,
                                options: {
                                    true: "\u6210\u7acb",
                                    false: "\u4e0d\u6210\u7acb"
                                }
                            }
                        } : {})],
                        mutation: '<mutation items="1" type="'.concat(o, '"></mutation>')
                    }
                      , l = [];
                    if (e.argument) {
                        var p = hw(e.argument, t);
                        l.push(p)
                    } else
                        l.push("HEXAGONAL" !== o && "");
                    return r.shadows = {
                        PROCEDURES_2_DEFRETURN_RETURN: "",
                        VALUE: "HEXAGONAL" === o ? '<shadow type="procedure_boolean"><field name="VALUE">false</field></shadow>' : '<shadow type="math_number"><field name="NUM">0</field></shadow>'
                    },
                    t.injectBlock(r, u, l),
                    r
                }
            }
              , mw = function(e, t) {
                var n = e.type
                  , r = fw[n];
                if (!r)
                    throw new Error("\u672a\u77e5\u8282\u70b9:\u3010".concat(n, "\u3011"));
                var i = r(e, t);
                if ("FunctionDeclaration" === e.type)
                    return {
                        type: "procedures_2_defnoreturn"
                    };
                if (!i)
                    throw new Error("\u8282\u70b9\u51fa\u9519:\u3010".concat(n, "\u3011"));
                return i
            }
              , gw = function(e, t) {
                var n = t.bcmAddedData.procedures.get(e) || pd(t.bcm.procedures.proceduresDict, (function(t) {
                    return t.name === e
                }
                )) || hd(t.bcm.procedures.proceduresDict)[Number(e.replace(Fd, "")) - 1];
                if (n) {
                    var r = ""
                      , i = [];
                    return n.params.forEach((function(e) {
                        if (r += '<arg id="'.concat(e.id, '" content="').concat(e.name, '" type="').concat(e.type, '"></arg>'),
                        e.type !== kd.Label) {
                            var t, n;
                            switch (e.type) {
                            case kd.Actor:
                                t = "actor";
                                break;
                            case kd.Audio:
                                n = {
                                    blockName: "get_play_audio",
                                    type: "input_field",
                                    name: "audio_id",
                                    bcmPropertyType: "audio",
                                    isShadow: !0
                                };
                                break;
                            case kd.Variable:
                                t = "variable";
                                break;
                            case kd.List:
                                n = {
                                    blockName: "pure_list_get",
                                    type: "input_field",
                                    name: "list",
                                    bcmPropertyType: "list",
                                    isShadow: !0
                                };
                                break;
                            case kd.Style:
                                n = {
                                    blockName: "get_styles",
                                    type: "input_field",
                                    name: "style_id",
                                    bcmPropertyType: "style",
                                    isShadow: !0
                                };
                                break;
                            case kd.Broadcast:
                                n = {
                                    blockName: "broadcast_input",
                                    type: "input_field",
                                    name: "message",
                                    bcmPropertyType: "broadcast",
                                    isShadow: !0
                                };
                                break;
                            case kd.Ranking:
                                t = "ranking"
                            }
                            if (e.type === kd.Custom)
                                return void i.push({
                                    type: "input_field",
                                    name: e.id
                                });
                            if (n)
                                return void i.push({
                                    type: "input_value",
                                    embedBlock: n,
                                    name: e.id,
                                    check: e.type === kd.Boolean ? "Boolean" : "Number"
                                });
                            if (t)
                                return void i.push({
                                    type: "input_field",
                                    bcmPropertyType: t,
                                    name: e.id
                                });
                            i.push({
                                type: "input_value",
                                name: e.id,
                                check: e.type === kd.Boolean ? "Boolean" : "Number"
                            })
                        }
                    }
                    )),
                    {
                        options: {
                            type: n.type === Cd.NORMAL ? "procedures_2_callnoreturn" : "procedures_2_callreturn",
                            args: i,
                            mutation: '<mutation def_id="'.concat(n.id, '" name="').concat(n.id, '" type="').concat(n.type, '">').concat(r, "</mutation>")
                        },
                        procedure: n
                    }
                }
            }
              , yw = function(e, t) {
                var n, r = t.findPathByName(Yd), i = null == r ? void 0 : r.findParent((function(e) {
                    return e.isFunctionDeclaration()
                }
                ));
                if (i && "FunctionDeclaration" === i.node.type && (null == (n = i.node.id) ? void 0 : n.name)) {
                    var a = i.node.id.name
                      , o = t.bcmAddedData.procedures.get(a) || pd(t.bcm.procedures.proceduresDict, (function(e) {
                        return e.name === a
                    }
                    ));
                    if ((null == o ? void 0 : o.type) === Cd.HEXAGONAL)
                        return {
                            type: "procedures_2_return_value",
                            mutation: '<mutation items="1" type="HEXAGONAL"></mutation>',
                            args: [{
                                type: "input_value",
                                name: "VALUE",
                                check: "String",
                                embedBlock: {
                                    blockName: "procedure_boolean",
                                    type: "input_field",
                                    name: "VALUE",
                                    isShadow: !0,
                                    options: {
                                        true: "\u6210\u7acb",
                                        false: "\u4e0d\u6210\u7acb"
                                    }
                                }
                            }]
                        };
                    (null == o ? void 0 : o.type) === Cd.ROUND && (e.mutation = '<mutation items="1" type="ROUND"></mutation>')
                }
                return e
            };
            var vw = function(e, t, n) {
                var r, i = e.object, a = e.property, o = "";
                if ("Identifier" === i.type ? o = i.name : "StringLiteral" === i.type ? o = i.value : "NumericLiteral" === i.type && (o = i.value.toString()),
                n.loadList(o) || "ArrayExpression" === i.type || "Identifier" === i.type && (null == (r = n.embedBlocks.get(i.name)) ? void 0 : r.paramType) === kd.List) {
                    var s = _w(e, t, n);
                    if (s)
                        return s
                }
                var c = {
                    type: "console_log"
                }
                  , u = "";
                if ("Identifier" === a.type ? u = a.name : "StringLiteral" === a.type && (u = a.value),
                "console" === o) {
                    var l = n.configOptions.getJsonConfig(c.type);
                    return n.injectBlock(c, l, [hw(t[0], n)]),
                    c
                }
                var p = hw(i, n);
                switch (u) {
                case "includes":
                    c.type = "text_contain";
                    var d = n.configOptions.getJsonConfig(c.type);
                    return n.injectBlock(c, d, [p, hw(t[0], n)]),
                    c;
                case "length":
                    c.type = "text_length";
                    var h = n.configOptions.getJsonConfig(c.type);
                    return n.injectBlock(c, h, [p]),
                    c;
                case "toString":
                    if ("ArrayExpression" === i.type)
                        return p;
                    c.type = "convert_type";
                    var f = n.configOptions.getJsonConfig(c.type);
                    return n.injectBlock(c, f, [p, "\u5b57\u7b26\u4e32"]),
                    c;
                case "slice":
                case "substring":
                    c.type = "text_select";
                    var m = n.configOptions.getJsonConfig(c.type)
                      , g = {
                        type: "BinaryExpression",
                        left: t[0],
                        operator: "+",
                        right: {
                            type: "NumericLiteral",
                            value: 1
                        }
                    }
                      , y = hw(g, n)
                      , v = hw(t[1], n);
                    return n.injectBlock(c, m, [p, y, v]),
                    c;
                case "substr":
                    c.type = "text_select";
                    var _ = n.configOptions.getJsonConfig(c.type)
                      , A = {
                        type: "BinaryExpression",
                        left: t[0],
                        operator: "+",
                        right: {
                            type: "NumericLiteral",
                            value: 1
                        }
                    }
                      , M = {
                        type: "BinaryExpression",
                        left: t[1],
                        operator: "+",
                        right: {
                            type: "NumericLiteral",
                            value: 1
                        }
                    }
                      , T = hw(A, n)
                      , b = hw(M, n);
                    return n.injectBlock(c, _, [p, T, b]),
                    c;
                case "split":
                    c.type = "text_split";
                    var E = n.configOptions.getJsonConfig(c.type);
                    return n.injectBlock(c, E, [p, hw(t[0], n)]),
                    c;
                default:
                    0 === t.length && t.push(a),
                    c.type = "text_select";
                    var I = n.configOptions.getJsonConfig(c.type)
                      , N = {
                        type: "BinaryExpression",
                        left: t[0],
                        operator: "+",
                        right: {
                            type: "NumericLiteral",
                            value: 1
                        }
                    }
                      , S = hw(N, n)
                      , x = hp(I);
                    return x.args.pop(),
                    x.mutation = '<mutation items="0"></mutation>',
                    n.injectBlock(c, x, [p, S]),
                    c
                }
            }
              , _w = function(e, t, n) {
                var i = e.object
                  , a = e.property
                  , o = "";
                "Identifier" !== a.type || e.computed ? "StringLiteral" === a.type ? o = a.value : (o = "at",
                t.push(a)) : o = a.name;
                var s = "";
                if ("Identifier" === i.type) {
                    s = i.name;
                    var c = n.embedBlocks.get(i.name) || {}
                      , u = c.id
                      , l = c.paramType;
                    u && l === kd.List && (s = mw(i, n))
                } else {
                    if ("ArrayExpression" !== i.type)
                        return;
                    s = mw(i, n)
                }
                if (qd.includes(o)) {
                    var p = $d[o];
                    if (!p)
                        return;
                    var d = {
                        type: p
                    }
                      , h = n.configOptions.getJsonConfig(d.type)
                      , f = []
                      , m = d;
                    switch (o) {
                    case "push":
                        return t.forEach((function(e, r) {
                            f = [hw(e, n), s],
                            n.injectBlock(m, h, f),
                            r !== t.length - 1 && (m.next = {
                                type: p
                            },
                            m = m.next)
                        }
                        )),
                        d;
                    case "unshift":
                        return f = [hw(t[0], n), s, 1],
                        n.injectBlock(m, h, f),
                        d;
                    case "splice":
                        var g = (0,
                        r.Z)(t)
                          , y = g[0]
                          , v = g[1]
                          , _ = g.slice(2)
                          , A = {
                            type: "BinaryExpression",
                            left: y,
                            operator: "+",
                            right: {
                                type: "NumericLiteral",
                                value: 1
                            }
                        };
                        if ("NumericLiteral" === v.type && v.value > 0) {
                            if (d.type = "delete_list_item",
                            h = n.configOptions.getJsonConfig(d.type),
                            f = [s, "\u7b2c", hw(A, n)],
                            n.injectBlock(m, h, f),
                            v.value > 1) {
                                m.next = {
                                    type: "delete_list_item"
                                },
                                m = m.next;
                                for (var M = 1; M < v.value; M++)
                                    f = [s, "\u7b2c", hw(A, n)],
                                    n.injectBlock(m, h, f),
                                    M < v.value - 1 && (m.next = {
                                        type: "delete_list_item"
                                    },
                                    m = m.next)
                            }
                            _.length > 0 && (m.next = {
                                type: "list_insert_value"
                            },
                            m = m.next)
                        }
                        return _.forEach((function(e, t) {
                            m.type = "list_insert_value",
                            h = n.configOptions.getJsonConfig(m.type);
                            var r = {
                                type: "BinaryExpression",
                                left: y,
                                operator: "+",
                                right: {
                                    type: "NumericLiteral",
                                    value: 1
                                }
                            };
                            f = [hw(e, n), s, hw(r, n)],
                            n.injectBlock(m, h, f),
                            t !== _.length - 1 && (m.next = {
                                type: p
                            },
                            m = m.next)
                        }
                        )),
                        d;
                    case "pop":
                        return f = [s, "\u6700\u540e\u4e00\u9879"],
                        n.injectBlock(m, h, f),
                        d;
                    case "shift":
                        return f = [s, "\u7b2c", 1],
                        n.injectBlock(m, h, f),
                        d;
                    case "slice":
                        var T = (0,
                        x.Z)(t, 2)
                          , b = T[0]
                          , E = T[1];
                        if ("NumericLiteral" !== (null == b ? void 0 : b.type) || "NumericLiteral" !== (null == E ? void 0 : E.type))
                            return "string" === typeof s ? (d.type = "list_get",
                            h = n.configOptions.getJsonConfig(d.type),
                            n.injectBlock(d, h, [s]),
                            d) : s;
                        var I = hp(h);
                        if (h.expansionArg) {
                            for (var N = b.value; N < E.value; N++) {
                                var S = hp(h.expansionArg);
                                S.name = "".concat(S.name).concat(N - b.value),
                                I.args.push(S);
                                var w = {
                                    type: "list_item"
                                }
                                  , k = n.configOptions.getJsonConfig(w.type)
                                  , C = [s, "\u7b2c", N + 1];
                                n.injectBlock(w, k, C),
                                f.push(w)
                            }
                            h = I,
                            d.mutation = '<mutation items="'.concat(E.value - b.value, '"></mutation>')
                        }
                        return n.injectBlock(d, h, f),
                        d;
                    case "indexOf":
                    case "lastIndexOf":
                    case "includes":
                        return f = [s, hw(t[0], n)],
                        n.injectBlock(m, h, f),
                        d;
                    case "length":
                        return f = [s],
                        n.injectBlock(m, h, f),
                        d;
                    case "forEach":
                        var D = t[0];
                        if ("ArrowFunctionExpression" !== D.type && "FunctionExpression" !== D.type)
                            return;
                        var O = D.params[0];
                        if ("Identifier" !== O.type)
                            return;
                        var L = "i" === O.name ? "_".concat(O.name) : "i"
                          , P = {
                            type: "ExpressionStatement",
                            expression: {
                                type: "AssignmentExpression",
                                left: {
                                    type: "Identifier",
                                    name: O.name
                                },
                                operator: "=",
                                right: {
                                    type: "MemberExpression",
                                    object: i,
                                    property: {
                                        type: "Identifier",
                                        name: L
                                    },
                                    computed: !0
                                }
                            }
                        };
                        return O.name = L,
                        D.body.body.unshift(P),
                        mw({
                            type: "CallExpression",
                            callee: {
                                type: "Identifier",
                                name: "\u904d\u5386\u5faa\u73af"
                            },
                            arguments: [{
                                type: "NumericLiteral",
                                value: 0
                            }, {
                                type: "BinaryExpression",
                                left: {
                                    type: "MemberExpression",
                                    object: i,
                                    property: {
                                        type: "Identifier",
                                        name: "length"
                                    },
                                    computed: !1
                                },
                                operator: "-",
                                right: {
                                    type: "NumericLiteral",
                                    value: 1
                                }
                            }, {
                                type: "NumericLiteral",
                                value: 1
                            }, D]
                        }, n);
                    case "join":
                        var j = {
                            type: "list_get"
                        }
                          , R = n.configOptions.getJsonConfig(j.type);
                        return n.injectBlock(j, R, [s]),
                        f = [j, hw(t[0], n)],
                        n.injectBlock(m, h, f),
                        d;
                    case "at":
                        var z = {
                            type: "BinaryExpression",
                            left: t[0],
                            operator: "+",
                            right: {
                                type: "NumericLiteral",
                                value: 1
                            }
                        };
                        return f = [s, "\u7b2c", hw(z, n)],
                        n.injectBlock(m, h, f),
                        d
                    }
                }
            }
              , Aw = function e(t) {
                var n, r, i, a, o;
                return "logic_negate" === t.type && "logic_negate" === (null == (n = t.inputs) ? void 0 : n.logic.type) && "logic_negate" === (null == (i = null == (r = t.inputs) ? void 0 : r.logic.inputs) ? void 0 : i.logic.type) ? e(t = null == (o = null == (a = t.inputs) ? void 0 : a.logic.inputs) ? void 0 : o.logic) : t
            }
              , Mw = function(e) {
                var t;
                return "FunctionDeclaration" === e.type || "VariableDeclaration" === e.type && "ArrowFunctionExpression" === (null == (t = e.declarations[0].init) ? void 0 : t.type)
            }
              , Tw = function(e, t) {
                var n, r;
                if ("ArrayExpression" === e.type)
                    return !0;
                if ("CallExpression" === e.type && "MemberExpression" === e.callee.type) {
                    var i = e.callee
                      , a = i.object
                      , o = i.property
                      , s = "ArrayExpression" === a.type || "Identifier" === a.type && (t.loadList(a.name) || (null == (n = t.embedBlocks.get(a.name)) ? void 0 : n.paramType) === kd.List)
                      , c = s && "Identifier" === o.type && ["slice"].includes(o.name)
                      , u = !s && "Identifier" === o.type && ["split"].includes(o.name);
                    return c || u
                }
                if ("CallExpression" === e.type && "Identifier" === e.callee.type) {
                    var l = e.callee.name
                      , p = t.findFunctionDeclarationPath(l);
                    if (p)
                        return t.bcmAddedData.procedures.get(l) || pd(t.bcm.procedures.proceduresDict, (function(e) {
                            return e.name === l
                        }
                        )) || null == (r = fw.FunctionDeclaration) || r.call(fw, p.node, t),
                        !!p.node.returnType && "ArrayTypeAnnotation" === p.node.returnType.typeAnnotation.type
                }
                return !1
            }
              , bw = function(e) {
                var t = null;
                if (e.typeAnnotation)
                    switch (e.typeAnnotation.typeAnnotation.type) {
                    case "BooleanTypeAnnotation":
                        t = kd.Boolean;
                        break;
                    case "StringTypeAnnotation":
                        t = kd.String;
                        break;
                    case "ArrayTypeAnnotation":
                        t = kd.List
                    }
                return t
            }
              , Ew = function(e) {
                var t = null;
                if (e.returnType)
                    switch (e.returnType.typeAnnotation.type) {
                    case "BooleanTypeAnnotation":
                        t = Cd.HEXAGONAL;
                        break;
                    case "StringTypeAnnotation":
                    case "NumberTypeAnnotation":
                    case "ArrayTypeAnnotation":
                        t = Cd.ROUND
                    }
                return t
            }
              , Iw = function() {
                function e(t, n) {
                    var r = this;
                    (0,
                    D.Z)(this, e),
                    j(this, "rootBlocks", []),
                    j(this, "bcm"),
                    j(this, "currentEntity"),
                    j(this, "ast"),
                    j(this, "configOptions"),
                    j(this, "bcmAddedData", {
                        audios: new Map,
                        actors: new Map,
                        classifyModels: new Map,
                        variables: new Map,
                        lists: new Map,
                        broadcasts: [],
                        procedures: new Map,
                        comments: {},
                        ranking: new Map
                    }),
                    j(this, "hasMergeData", !1),
                    j(this, "notExistBlocks", []),
                    j(this, "extensionTypes", new Set),
                    j(this, "extraTopBlocks", []),
                    j(this, "embedBlocks", new Map),
                    j(this, "checkCode", (function(e) {
                        try {
                            yg(e, {
                                plugins: ["flow"]
                            })
                        } catch (t) {
                            return !1
                        }
                        return !0
                    }
                    )),
                    j(this, "injectBlock", (function(e, t, n) {
                        var i = {}
                          , a = e.fields || {}
                          , o = {};
                        e.type = t.type,
                        e.inputs = i,
                        e.fields = a,
                        e.shadows = o,
                        t.args.forEach((function(t, s) {
                            var c = n[s];
                            "input_statement" !== t.type || (e.statements = {},
                            "object" !== typeof c) ? "input_field" !== t.type ? "input_value" === t.type && (!c && t.defaultValue && (c = hd(t.defaultValue.fields)[0]),
                            void 0 !== c && r.injectInput({
                                inputs: i,
                                shadows: o
                            }, c, t)) : r.injectField(a, (null == c ? void 0 : c.toString()) || "", t) : e.statements[t.name] = c
                        }
                        )),
                        r.configOptions.shadowDict[e.type] && (e.shadows = r.configOptions.shadowDict[e.type]),
                        t.mutation && (e.mutation = t.mutation);
                        var s = r.configOptions.extensionDict[e.type];
                        s && r.extensionTypes.add(s)
                    }
                    )),
                    j(this, "injectField", (function(e, t, n) {
                        if (n.bcmPropertyType) {
                            t = ph(t);
                            var i = r.getBcmProperty(n.bcmPropertyType, t);
                            if (i)
                                return void (e[n.name] = i)
                        }
                        if (n.options && Object.keys(n.options).length > 0) {
                            var a = yd(n.options)[t];
                            if (a)
                                return void (e[n.name] = a);
                            e[n.name] = "?"
                        } else
                            e[n.name] = t;
                        if ("?" !== t) {
                            if ("actor" === n.bcmPropertyType) {
                                var o = r.generateActor(t);
                                return void (e[n.name] = o)
                            }
                            if ("variable" === n.bcmPropertyType) {
                                var s = r.generateVariable(t).id;
                                return void (e[n.name] = s)
                            }
                            if ("list" === n.bcmPropertyType) {
                                var c = r.generateList(t).id;
                                return void (e[n.name] = c)
                            }
                            if ("ranking" === n.bcmPropertyType) {
                                var u = r.generateRanking(t).id;
                                return void (e[n.name] = u)
                            }
                            if ("audio" === n.bcmPropertyType) {
                                var l = r.generateAudio(t).id;
                                e[n.name] = l
                            }
                            if ("classifyModel" === n.bcmPropertyType) {
                                var p = r.generateClassifyModel(t).id;
                                e[n.name] = p
                            }
                        }
                    }
                    )),
                    j(this, "injectInput", (function(e, t, n) {
                        var i = e.inputs
                          , a = e.shadows;
                        if (r.injectBasicShadow(a, n),
                        "object" !== typeof t) {
                            if (n.embedBlock) {
                                var o = {};
                                return r.injectField(o, ph(t.toString()), n.embedBlock),
                                void (i[n.name] = {
                                    type: n.embedBlock.blockName,
                                    is_shadow: n.embedBlock.isShadow,
                                    fields: o,
                                    is_output: !0
                                })
                            }
                            "Boolean" !== n.check ? "String" !== n.check ? i[n.name] = {
                                type: "math_number",
                                is_shadow: !0,
                                fields: n.allowText && "string" === typeof t ? {
                                    TEXT: t.toString()
                                } : {
                                    NUM: t.toString()
                                },
                                is_output: !0
                            } : i[n.name] = {
                                type: "text",
                                is_shadow: !0,
                                fields: {
                                    TEXT: t.toString()
                                },
                                is_output: !0
                            } : i[n.name] = {
                                type: "logic_empty",
                                is_shadow: !0,
                                editable: !1,
                                is_output: !0
                            }
                        } else
                            i[n.name] = t
                    }
                    )),
                    j(this, "getBcmProperty", (function(e, t) {
                        var n, i, a, o, s, c, u;
                        if (u = t,
                        dh.test(u))
                            throw new Error("\u5305\u542b\u975e\u6cd5\u5b57\u7b26");
                        var l, p = r.bcm, d = r.currentEntity;
                        switch (e) {
                        case "actor":
                            l = r.loadActor(t);
                            break;
                        case "style":
                            if (!d)
                                return;
                            return null == d ? void 0 : d.styles[Number(t) - 1];
                        case "scene":
                            return null == (n = pd(p.scenes.scenesDict, (function(e) {
                                return e.screenName === t
                            }
                            ))) ? void 0 : n.id;
                        case "audio":
                            l = null == (i = r.loadAudio(t)) ? void 0 : i.id;
                            break;
                        case "classifyModel":
                            l = null == (a = r.loadClassifyModel(t)) ? void 0 : a.id;
                            break;
                        case "variable":
                            l = null == (o = r.loadVariable(t)) ? void 0 : o.id;
                            break;
                        case "list":
                            l = null == (s = r.loadList(t)) ? void 0 : s.id;
                            break;
                        case "broadcast":
                            l = r.loadBroadcast(t);
                            break;
                        case "ranking":
                            l = null == (c = r.loadRanking(t)) ? void 0 : c.id
                        }
                        return l && (r.hasMergeData = !0),
                        l
                    }
                    )),
                    j(this, "generateVariable", (function(e) {
                        var t;
                        if (e === "".concat(Ld, "?"))
                            return {
                                id: "?",
                                name: "?"
                            };
                        var n = r.loadVariable(e);
                        if (n)
                            return n;
                        var i = r.parsesVariableName(e)
                          , a = i.variableType
                          , o = i.name
                          , s = "actor" === a ? null == (t = r.currentEntity) ? void 0 : t.id : void 0;
                        if (!n) {
                            var c = xd.Variable;
                            "publicCv" === a ? c = xd.PublicCV : "private" === a && (c = xd.LocalVariable),
                            n = {
                                id: lw(),
                                name: o,
                                type: c,
                                currentEntityId: s
                            },
                            r.bcmAddedData.variables.set(o, n)
                        }
                        return n
                    }
                    )),
                    j(this, "generateList", (function(e) {
                        var t, n = r.loadList(e);
                        if (n)
                            return n;
                        var i = r.parsesListName(e)
                          , a = i.listType
                          , o = i.name
                          , s = "actor" === a ? null == (t = r.currentEntity) ? void 0 : t.id : void 0
                          , c = "private" === a ? xd.LocalList : xd.List;
                        return n || (n = {
                            id: lw(),
                            name: o,
                            type: c,
                            currentEntityId: s
                        },
                        r.bcmAddedData.lists.set(o, n)),
                        n
                    }
                    )),
                    j(this, "generateRanking", (function(e) {
                        if (e === "".concat(Qd, "?"))
                            return {
                                id: "?",
                                name: "?"
                            };
                        var t = r.loadRanking(e);
                        if (t)
                            return t;
                        var n = r.parsesRankingName(e)
                          , i = n.name
                          , a = n.sortType;
                        return t = {
                            id: lw(),
                            name: i,
                            sortType: a
                        },
                        r.bcmAddedData.ranking.set(t.name, t),
                        t
                    }
                    )),
                    this.configOptions = new ch(n),
                    this.bcm = t || pw
                }
                return (0,
                C.Z)(e, [{
                    key: "generateBlockJsons",
                    value: function(e, t) {
                        if (this.bcmAddedData.comments = {},
                        this.bcmAddedData.actors.clear(),
                        this.bcmAddedData.audios.clear(),
                        this.bcmAddedData.variables.clear(),
                        this.bcmAddedData.lists.clear(),
                        this.bcmAddedData.broadcasts = [],
                        this.bcmAddedData.procedures.clear(),
                        this.bcmAddedData.classifyModels.clear(),
                        this.bcmAddedData.ranking.clear(),
                        this.hasMergeData = !1,
                        this.notExistBlocks = [],
                        this.extensionTypes.clear(),
                        this.rootBlocks = [],
                        this.extraTopBlocks = [],
                        this.embedBlocks.clear(),
                        t && (this.currentEntity = t),
                        e) {
                            try {
                                var n = yg(e, {
                                    plugins: ["flow"]
                                });
                                this.ast = n
                            } catch (i) {
                                throw new Error("\u8bed\u6cd5\u9519\u8bef: ".concat(i.message))
                            }
                            var r = this;
                            iw(this.ast, {
                                Program: function(e) {
                                    var t = r.parsesAstBodys(e.node.body);
                                    r.rootBlocks = [].concat((0,
                                    w.Z)(t), (0,
                                    w.Z)(r.extraTopBlocks)),
                                    e.skip()
                                }
                            })
                        }
                    }
                }, {
                    key: "injectBasicShadow",
                    value: function(e, t) {
                        if (t.embedBlock && t.embedBlock.isShadow) {
                            var n = t.embedBlock
                              , r = n.blockName
                              , i = n.name;
                            e[t.name] = '<shadow type="'.concat(r, '" visible="visible"><field name="').concat(i, '"></field></shadow>')
                        } else
                            "Boolean" !== t.check ? "String" !== t.check ? e[t.name] = '<shadow type="math_number" visible="visible"><field constraints="-Infinity,Infinity,0," '.concat(t.allowText ? 'allow_text="true"' : "", ' name="NUM">0</field></shadow>') : e[t.name] = '<shadow type="text" visible="visible"><field name="TEXT"></field></shadow>' : e[t.name] = '<empty type="logic_empty" visible="visible" editable="false"></empty>'
                    }
                }, {
                    key: "loadActor",
                    value: function(e) {
                        var t;
                        if ("\u80cc\u666f" === (e = e.substring(0, 20)))
                            return this.bcm.scenes.currentSceneId;
                        var n = this.bcm.scenes.scenesDict[this.bcm.scenes.currentSceneId]
                          , r = pd(this.bcm.actors.actorsDict, (function(t) {
                            return t.name === e && n.actorIds.includes(t.id)
                        }
                        ));
                        return r ? r.id : null == (t = this.bcmAddedData.actors.get(e)) ? void 0 : t.id
                    }
                }, {
                    key: "generateActor",
                    value: function(e) {
                        e = e.substring(0, 20);
                        var t = {
                            id: lw(),
                            name: e
                        };
                        return this.bcmAddedData.actors.set(e, t),
                        t.id
                    }
                }, {
                    key: "loadAudio",
                    value: function(e) {
                        var t = pd(this.bcm.audios.audiosDict, (function(t) {
                            return t.name === e
                        }
                        )) || this.bcmAddedData.audios.get(e);
                        if (t)
                            return t
                    }
                }, {
                    key: "loadClassifyModel",
                    value: function(e) {
                        var t, n = pd(null == (t = this.bcm.classifyModels) ? void 0 : t.classifyModelsDict, (function(t) {
                            return t.name === e
                        }
                        )) || this.bcmAddedData.classifyModels.get(e);
                        if (n)
                            return n
                    }
                }, {
                    key: "generateAudio",
                    value: function(e) {
                        var t = {
                            id: lw(),
                            name: e
                        };
                        return this.bcmAddedData.audios.set(e, t),
                        t
                    }
                }, {
                    key: "generateClassifyModel",
                    value: function(e) {
                        var t = {
                            id: lw(),
                            name: e
                        };
                        return this.bcmAddedData.classifyModels.set(e, t),
                        t
                    }
                }, {
                    key: "loadBroadcast",
                    value: function(e) {
                        return pd(this.bcm.broadcasts.broadcastsDict, (function(t) {
                            return t.includes(e)
                        }
                        )) || this.bcmAddedData.broadcasts.includes(e) || this.bcmAddedData.broadcasts.push(e),
                        e
                    }
                }, {
                    key: "parsesVariableName",
                    value: function(e) {
                        var t = {
                            name: e,
                            variableType: "global"
                        };
                        return e.startsWith(jd) ? (t.name = '{"type":"NEKO_SCRIPT_VARIABLE_TYPE-957f2554-87af","name":"'.concat(ph(e.replace(jd, "")), '"}'),
                        t.variableType = "script") : e.startsWith(Pd) ? (t.name = e.replace(Pd, ""),
                        t.variableType = "actor") : e.startsWith(zd) ? (t.name = e.replace(zd, ""),
                        t.variableType = "private") : e.startsWith(Rd) ? (t.name = e.replace(Rd, ""),
                        t.variableType = "publicCv") : t.name = e.replace(Ld, ""),
                        t
                    }
                }, {
                    key: "parsesListName",
                    value: function(e) {
                        var t = {
                            name: e,
                            listType: "global"
                        };
                        return e.startsWith(Ud) ? (t.name = e.replace(Ud, ""),
                        t.listType = "actor") : e.startsWith(Zd) ? (t.name = e.replace(Zd, ""),
                        t.listType = "private") : t.name = e.replace(Bd, ""),
                        t
                    }
                }, {
                    key: "loadVariable",
                    value: function(e) {
                        var t, n = this.parsesVariableName(e), r = n.variableType, i = n.name;
                        if ("script" === r)
                            return {
                                name: i,
                                id: i
                            };
                        var a = "actor" === r ? null == (t = this.currentEntity) ? void 0 : t.id : void 0;
                        return "publicCv" === r || "private" === r ? pd(this.bcm.variables.variablesDict, (function(e) {
                            return e.name === i && e.type === r
                        }
                        )) || this.bcmAddedData.variables.get(i) : pd(this.bcm.variables.variablesDict, (function(e) {
                            return e.name === i && e.type === xd.Variable && e.currentEntityId === a
                        }
                        )) || this.bcmAddedData.variables.get(i)
                    }
                }, {
                    key: "loadList",
                    value: function(e) {
                        var t, n = this.parsesListName(e), r = n.listType, i = n.name, a = "actor" === r ? null == (t = this.currentEntity) ? void 0 : t.id : void 0, o = "private" === r ? xd.LocalList : xd.List;
                        return pd(this.bcm.variables.variablesDict, (function(e) {
                            return e.name === i && e.type === o && a === e.currentEntityId
                        }
                        )) || this.bcmAddedData.lists.get(i)
                    }
                }, {
                    key: "getScopePath",
                    value: function(e) {
                        if (!this.ast)
                            return null;
                        var t = null;
                        return iw(this.ast, {
                            Scopable: function(n) {
                                n.scope.getBinding(e) && (t = n,
                                n.stop())
                            }
                        }),
                        t
                    }
                }, {
                    key: "findPathByName",
                    value: function(e) {
                        var t = null;
                        return this.ast ? (iw(this.ast, {
                            CallExpression: function(n) {
                                var r = n.node.callee;
                                "Identifier" === r.type && r.name === e && (t = n,
                                n.stop())
                            }
                        }),
                        t) : null
                    }
                }, {
                    key: "findFunctionDeclarationPath",
                    value: function(e) {
                        var t = null;
                        return this.ast ? (iw(this.ast, {
                            FunctionDeclaration: function(n) {
                                var r = n.node.id;
                                r && "Identifier" === r.type && r.name === e && (t = n,
                                n.stop())
                            }
                        }),
                        t) : null
                    }
                }, {
                    key: "parsesAstBodys",
                    value: function(e) {
                        var t = this
                          , n = []
                          , r = {
                            type: ""
                        };
                        return e.sort((function(e, t) {
                            return Mw(e) && !Mw(t) ? -1 : 0
                        }
                        )),
                        e.forEach((function(e) {
                            var i, a, o;
                            try {
                                var s = mw(e, t)
                                  , c = lw();
                                if ((e.leadingComments || e.trailingComments) && "procedures_2_defnoreturn" !== s.type) {
                                    var u = (null == (i = e.leadingComments) ? void 0 : i.filter((function(t) {
                                        var n, r;
                                        return (null == (n = t.loc) ? void 0 : n.start.column) === (null == (r = e.loc) ? void 0 : r.start.column)
                                    }
                                    )).map((function(e) {
                                        return e.value
                                    }
                                    ))) || []
                                      , l = (null == (a = e.trailingComments) ? void 0 : a.filter((function(t) {
                                        var n, r;
                                        return (null == (n = t.loc) ? void 0 : n.start.column) !== (null == (r = e.loc) ? void 0 : r.start.column)
                                    }
                                    )).map((function(e) {
                                        return e.value
                                    }
                                    ))) || []
                                      , p = [].concat((0,
                                    w.Z)(u), (0,
                                    w.Z)(l));
                                    if (p.length > 0) {
                                        var d = p.join("\n")
                                          , h = lw()
                                          , f = {
                                            text: d,
                                            id: h,
                                            pinned: !0,
                                            size: [216, 161],
                                            location: [320, 20],
                                            auto_layout: !0,
                                            color_theme: "BLUE",
                                            parent_id: c
                                        };
                                        s.comment = h,
                                        s.id = c,
                                        t.bcmAddedData.comments[h] = f
                                    }
                                }
                                if ("FunctionDeclaration" === e.type || "procedures_2_defnoreturn" === s.type)
                                    return;
                                if (s.type && [].concat((0,
                                w.Z)(t.configOptions.topBlocks), (0,
                                w.Z)(t.configOptions.returnValues)).includes(s.type)) {
                                    if (["on_running_group_activated", "sprite_on_tap", "on_swipe", "on_keydown", "microbit_button_when", "microbit_logo_when", "microbit_pin_when", "catbit_button_when", "catbit_usb_button_when", "wand_direction_when"].includes(s.type) && s.statements) {
                                        if (s.statements.DO && !s.next)
                                            return s.next = s.statements.DO,
                                            n.push(s),
                                            void delete s.statements;
                                        delete s.statements
                                    }
                                    return void n.push(s)
                                }
                                if (0 === n.length)
                                    return n.push(s),
                                    void (r = s);
                                if (r.type) {
                                    if (r.statements && t.configOptions.topBlocks.includes(r.type))
                                        return n.push(s),
                                        void (r = s);
                                    if (t.configOptions.returnValues.includes(r.type))
                                        return n.push(s),
                                        void (r = s);
                                    r.next ? r.next.next = s : r.next = s
                                } else
                                    n.push(s);
                                r = s.next || s
                            } catch (m) {
                                throw new Error("".concat(m.message, "\n ,\u5728\u7b2c ").concat(null == (o = e.loc) ? void 0 : o.start.line, " \u884c\u51fa\u9519"))
                            }
                        }
                        )),
                        n
                    }
                }, {
                    key: "parsesRankingName",
                    value: function(e) {
                        var t = {
                            name: e,
                            sortType: Dd.Forward
                        };
                        return e.startsWith(Wd) ? t.name = e.replace(Wd, "") : e.startsWith(Vd) ? (t.name = e.replace(Vd, ""),
                        t.sortType = Dd.BackWard) : t.name = e.replace(Qd, ""),
                        t
                    }
                }, {
                    key: "loadRanking",
                    value: function(e) {
                        var t, n = this.parsesRankingName(e), r = n.name, i = n.sortType;
                        return pd(null == (t = this.bcm.rankings) ? void 0 : t.rankingsDict, (function(e) {
                            return e.name === r && e.sortType === i
                        }
                        )) || this.bcmAddedData.ranking.get(r)
                    }
                }]),
                e
            }()
              , Nw = function(e) {
                return e.NORMAL = "NORMAL",
                e.HEXAGONAL = "HEXAGONAL",
                e.ROUND = "ROUND",
                e
            }(Nw || {})
              , Sw = {
                start_on_click: "on_running_group_activated",
                self_on_tap: "sprite_on_tap",
                on_phone_shake: "bcm_translator_text_event_block",
                on_receive_sound: "bcm_translator_text_event_block",
                on_phone_tilt: "bcm_translator_text_event_block",
                on_swipe: "on_swipe",
                when: "when",
                self_listen: "self_listen",
                self_broadcast: "self_broadcast",
                self_broadcast_and_wait: "self_broadcast_and_wait",
                broadcast_input: "broadcast_input",
                on_running_group_activated: "on_running_group_activated",
                switch_to_screen: "switch_to_screen",
                get_current_scene: "get_screens",
                set_scene_transition: "set_screen_transition",
                start_as_a_mirror: "start_as_a_mirror",
                mirror: "mirror",
                dispose: "bcm_translator_text_execution_block",
                dispose_clone: "dispose_clone",
                get_current_clone_index: "get_current_clone_index",
                get_clone_num: "get_clone_num",
                get_clone_index_property: "get_clone_index_property",
                stop: "stop",
                restart: "restart",
                terminate: "terminate",
                style_of_sprite: "style_of_sprite",
                self_change_layer: "bcm_translator_text_execution_block",
                backdrop_on_change: "bcm_translator_text_event_block",
                repeat_forever: "repeat_forever",
                repeat_n_times: "repeat_n_times",
                repeat_forever_until: "repeat_forever_until",
                controls_if: "controls_if",
                break: "break",
                wait: "wait",
                wait_until: "wait_until",
                controls_if_no_else: "controls_if",
                clone: "bcm_translator_text_execution_block",
                self_go_forward: "self_go_forward",
                self_move_specify: "self_move_specify",
                self_move_specify_sprite: "self_move_specify_sprite",
                self_move_to: "self_move_to",
                self_bounce_off_edge: "self_bounce_off_edge",
                self_glide_to: "self_glide_to",
                self_rotate: "self_rotate",
                self_rotate_around: "self_rotate_around",
                self_set_rotation_type: "self_set_rotation_type",
                self_point_towards: "self_point_towards",
                self_face_to: "self_face_to",
                self_face_to_sprite: "self_face_to_sprite",
                self_set_draggable: "self_set_draggable",
                self_set_role_camp: "self_set_role_camp",
                controller_shadow: "math_number_with_dial",
                self_shake: "bcm_translator_text_execution_block",
                set_costume: "set_sprite_style",
                get_current_costume: "get_styles",
                self_prev_next_style: "self_prev_next_style",
                self_translate_animation: "self_stress_animation",
                self_appear: "self_appear",
                self_dialog_wait: "self_dialog_wait",
                self_disappear: "self_appear",
                self_gradually_appear: "self_gradually_appear",
                self_gradually_disappear: "self_gradually_disappear",
                self_gradually_show_hide: "self_gradually_show_hide",
                get_answer: "get_answer",
                set_scale: "set_scale",
                create_stage_dialog: "create_stage_dialog",
                mobile_change_actor_layer: "set_top_bottom_layer",
                self_clear_effects: "clear_all_effects",
                get_choice_or_index: "get_choice_and_index",
                self_flip: "bcm_translator_text_execution_block",
                self_dialog: "self_dialog",
                ask_and_choose: "ask_and_choose",
                self_change_scale_2: "self_change_scale",
                self_set_effect: "self_set_effect",
                self_set_effect_2: "self_set_effect",
                self_change_effect_3: "self_change_effect",
                set_theatre_layer: "set_top_bottom_layer",
                self_ask: "self_ask",
                add_width_height_scale_2: "add_width_height_scale",
                set_width_height_scale: "set_width_height_scale",
                set_entity_show_hide: "bcm_translator_text_execution_block",
                play_audio_2: "play_audio",
                play_audio_and_wait_2: "play_audio_and_wait",
                stop_audio_2: "stop_audio",
                play_words_audio: "play_words_audio",
                play_words_audio_wait: "play_word_audio_wait",
                voice_recognition: "voice_recognition",
                get_voice_answer: "get_voice_answer",
                set_volume_or_rate_2: "bcm_translator_text_execution_block",
                change_volume_or_rate_2: "bcm_translator_text_execution_block",
                self_ask_listen: "bcm_translator_text_execution_block",
                self_ask_record: "bcm_translator_text_execution_block",
                play_ask_record: "bcm_translator_text_execution_block",
                self_pen_down: "self_pen_down",
                clear_drawing: "clear_drawing",
                self_pen_up: "self_pen_up",
                self_change_pen_color_property: "self_set_pen_color_property",
                self_change_pen_color_property_2: "self_change_pen_color_property",
                self_set_pen_color_property: "self_set_pen_color_property",
                self_set_pen_color: "self_set_pen_color",
                self_change_pen_size_2: "self_change_pen_size",
                self_change_pen_size: "self_set_pen_size",
                set_fill_style: "bcm_translator_text_execution_block",
                set_pen_path: "bcm_translator_text_execution_block",
                set_layer_with_pen: "bcm_translator_text_execution_block",
                stamp: "stamp",
                image_stamp: "image_stamp",
                get_audios: "get_play_audio",
                get_whole_audios: "get_stop_audio",
                mouse_down: "mouse_down",
                bump: "bump_into",
                bump_into_color: "bump_into_color",
                get_mouse_info: "get_mouse_info",
                self_out_of_boundary: "out_of_boundary",
                check_screen: "bcm_translator_text_return_boolean_block",
                get_sensing_current_scene: "get_screens",
                get_time: "get_time",
                get_orientation: "get_orientation",
                mobile__set_timer: "set_timer_state",
                coordinate_of_sprite: "coordinate_of_sprite",
                get_3: "appearance_of_sprite",
                get_voice_volume: "get_voice_volume",
                mobile__timer_value: "timer",
                self_distance_to: "distance_to",
                mobile__show_timer: "show_hide_timer",
                get_stage_info: "get_stage_info",
                enable_voice_detection: "bcm_translator_text_execution_block",
                variables_set: "variables_set",
                change_variable: "change_variables",
                show_hide_variable: "show_hide_variables",
                variables_get: "variables_get",
                cloud_variables_set: "variables_set",
                change_cloud_variable: "change_variables",
                show_hide_cloud_variable: "show_hide_variables",
                cloud_variables_get: "variables_get",
                lists_append: "list_append",
                lists_insert_value: "list_insert_value",
                lists_delete: "delete_list_item",
                lists_get_value: "list_item",
                lists_length: "list_length",
                show_hide_list: "show_hide_list",
                lists_copy: "list_copy",
                lists_index_of: "list_index_of",
                lists_is_exist: "list_is_exist",
                lists_replace: "replace_list_item",
                list_get: "list_get",
                lists_get: "pure_list_get",
                cloud_lists_append: "list_append",
                cloud_lists_insert_value: "list_insert_value",
                cloud_lists_delete: "delete_list_item",
                cloud_lists_replace: "replace_list_item",
                cloud_lists_get_value: "list_item",
                cloud_lists_length: "list_length",
                cloud_lists_index_of: "list_index_of",
                cloud_lists_is_exist: "list_is_exist",
                show_hide_cloud_list: "show_hide_list",
                math_arithmetic_common: "math_arithmetic",
                math_arithmetic_power: "math_arithmetic",
                random: "random_num",
                math_number_property: "math_number_property",
                divisible_by: "divisible_by",
                logic_compare: "logic_compare",
                math_modulo: "math_modulo",
                logic_boolean: "logic_boolean",
                logic_operation: "logic_operation",
                logic_negate: "logic_negate",
                math_trig_common: "math_trig",
                math_trig_arc: "math_trig",
                shadow_text: "text_join",
                math_round: "math_round",
                text_length: "text_length",
                text_contain: "text_contain",
                text_split: "text_split",
                text_join: "text_join",
                math_single: "math_function",
                get_split_options: "text",
                convert_type: "convert_type",
                text_select_changeable: "text_select",
                calculate: "bcm_translator_text_return_value_block",
                shadow_number: "shadow_number",
                tell: "tell",
                sync_tell: "sync_tell",
                user_id_get: "user_id_get",
                username_get: "username_get",
                procedures_2_stable_parameter: "procedures_2_stable_parameter",
                procedures_2_callreturn: "procedures_2_callreturn",
                procedures_2_parameter: "procedures_2_parameter",
                procedures_2_callnoreturn: "procedures_2_callnoreturn",
                procedures_2_return_value: "procedures_2_return_value",
                procedures_2_defnoreturn: "procedures_2_defnoreturn",
                default_value: "math_number",
                microbit_when_press_key: "bcm_translator_text_event_block",
                microbit_when_incline: "bcm_translator_text_event_block",
                microbit_when_be_operated: "bcm_translator_text_event_block",
                microbit_display_lattice_image: "bcm_translator_text_execution_block",
                microbit_display_custom_lattice_image: "bcm_translator_text_execution_block",
                microbit_display_text: "bcm_translator_text_execution_block",
                microbit_set_light_intensity: "bcm_translator_text_execution_block",
                microbit_set_xy_light_intensity: "bcm_translator_text_execution_block",
                microbit_turn_off_xy_light: "bcm_translator_text_execution_block",
                microbit_clear_screen: "bcm_translator_text_execution_block",
                microbit_is_press_key: "bcm_translator_text_return_boolean_block",
                microbit_is_incline: "bcm_translator_text_return_boolean_block",
                microbit_get_incline_angle: "bcm_translator_text_return_value_block",
                microbit_get_acceleration: "bcm_translator_text_return_value_block",
                microbit_get_light_intensity: "bcm_translator_text_return_value_block",
                microbit_get_temperature: "bcm_translator_text_return_value_block",
                microbit_get_compass_heading: "bcm_translator_text_return_value_block",
                microbit_get_compass_field_strength: "bcm_translator_text_return_value_block",
                microbit_is_pin_level: "bcm_translator_text_return_boolean_block",
                on_midimusic_play_note: "bcm_translator_text_event_block",
                on_midimusic_play_columns: "bcm_translator_text_event_block",
                play_midimusic: "bcm_translator_text_execution_block",
                play_midimusic_till_end: "bcm_translator_text_execution_block",
                stop_midimusic: "bcm_translator_text_execution_block",
                set_midimusic_instrument: "bcm_translator_text_execution_block",
                set_midimusic_speed: "bcm_translator_text_execution_block",
                play_midimusic_column: "bcm_translator_text_execution_block",
                midimusic_column_tag: "bcm_translator_text_return_value_block",
                get_midis: "bcm_translator_text_return_value_block",
                get_any_midis: "bcm_translator_text_return_value_block",
                get_notes: "bcm_translator_text_return_value_block",
                get_whole_midis: "bcm_translator_text_return_value_block",
                hide_ranking: "bcm_translator_text_execution_block",
                show_ranking: "bcm_translator_text_execution_block",
                is_ranking_show_hide: "bcm_translator_text_return_boolean_block",
                connected_users_get: "bcm_translator_text_return_value_block",
                play_video: "bcm_translator_text_execution_block",
                play_video_until_end: "bcm_translator_text_execution_block",
                continue_pause_video: "bcm_translator_text_execution_block",
                show_hide_video: "bcm_translator_text_execution_block",
                ai_lab_predict_classification: "bcm_translator_text_return_value_block",
                ai_lab_predict_confidence: "bcm_translator_text_return_value_block",
                ai_lab_classify: "bcm_translator_text_return_value_block",
                ai_lab_add_data: "bcm_translator_text_execution_block",
                auto_player_on_ai_ready: "bcm_translator_text_event_block",
                auto_player_run_game_ai: "bcm_translator_text_execution_block",
                auto_player_actor_die: "bcm_translator_text_execution_block",
                auto_player_actor_is_dead: "bcm_translator_text_return_boolean_block",
                auto_player_init_new_model: "bcm_translator_text_execution_block",
                auto_player_use_model_supervised: "bcm_translator_text_execution_block",
                auto_player_use_model_unsupervised: "bcm_translator_text_execution_block",
                auto_player_train_save_restart: "bcm_translator_text_execution_block",
                auto_player_set_feature: "bcm_translator_text_execution_block",
                auto_player_set_action: "bcm_translator_text_execution_block",
                auto_player_make_decision: "bcm_translator_text_execution_block",
                auto_player_record_features_for_action: "bcm_translator_text_execution_block",
                auto_player_record_score_and_delete_actor: "bcm_translator_text_execution_block",
                capture_or_upload_face_pic: "enable_face_detect_by_photo",
                get_face_age: "get_face_detection_result",
                get_emotion_result: "get_face_detection_result",
                get_emotion: "check_emotion",
                get_face_shape_result: "get_face_detection_result",
                get_face_shape: "check_face_shape",
                get_gender: "check_gender",
                get_glasses: "bcm_translator_text_return_boolean_block",
                warp: "warp",
                get_running_device: "bcm_translator_text_return_value_block",
                check_running_device: "bcm_translator_text_return_boolean_block",
                set_camera_status: "open_hide_camera",
                set_camera_opcity: "set_camera_alpha",
                get_camera_data: "bcm_translator_text_return_value_block",
                turn_on_the_qrcode_camera: "bcm_translator_text_execution_block",
                display_recognition_result: "bcm_translator_text_execution_block",
                get_recognition_result: "bcm_translator_text_return_value_block",
                wood_block_set: "bcm_translator_text_execution_block",
                wood_block_get: "bcm_translator_text_return_value_block",
                set_digital_port_status: "bcm_translator_text_execution_block",
                set_pwm_port_value: "bcm_translator_text_execution_block",
                is_digital_port_status: "bcm_translator_text_return_boolean_block",
                get_analog_port_value: "bcm_translator_text_return_value_block",
                servo_motor_angle: "bcm_translator_text_execution_block",
                led_light: "bcm_translator_text_execution_block",
                led_light_intensity: "bcm_translator_text_execution_block",
                dc_single_motor_turn: "bcm_translator_text_execution_block",
                dc_single_motor_speed: "bcm_translator_text_execution_block",
                dc_both_motor_turn: "bcm_translator_text_execution_block",
                dc_both_motor_speed: "bcm_translator_text_execution_block",
                pwm_double_motor: "bcm_translator_text_execution_block",
                buzzer_sound: "bcm_translator_text_execution_block",
                set_buzzer_port_value: "bcm_translator_text_execution_block",
                shake_sensor_intensity: "bcm_translator_text_execution_block",
                set_relay_port_status: "bcm_translator_text_execution_block",
                is_get_sound: "bcm_translator_text_return_boolean_block",
                get_sound_intensity: "bcm_translator_text_return_value_block",
                is_get_light: "bcm_translator_text_return_boolean_block",
                get_light_sensor_intensity: "bcm_translator_text_return_value_block",
                get_fire_sensor_intensity: "bcm_translator_text_return_value_block",
                is_switch_on: "bcm_translator_text_return_boolean_block",
                is_button_pressed: "bcm_translator_text_return_boolean_block",
                is_sensor_touched: "bcm_translator_text_return_boolean_block",
                is_limit_switch_pressed: "bcm_translator_text_return_boolean_block",
                is_sensor_level: "bcm_translator_text_return_boolean_block",
                infrared_sensor_switch: "bcm_translator_text_return_boolean_block",
                is_sensor_get_line: "bcm_translator_text_return_boolean_block",
                is_get_high_temp: "bcm_translator_text_return_boolean_block",
                is_get_magnetic: "bcm_translator_text_return_boolean_block",
                is_color_picked: "bcm_translator_text_return_boolean_block",
                hcsr04_get_distance: "bcm_translator_text_return_value_block",
                dht11_get_temp_humi: "bcm_translator_text_return_value_block",
                get_press_intensity: "bcm_translator_text_return_value_block",
                soil_sensor_get_humi: "bcm_translator_text_return_value_block",
                grayscale_sensor_get: "bcm_translator_text_return_value_block",
                get_potentiometer_turn_angle: "bcm_translator_text_return_value_block",
                get_resistance_intensity: "bcm_translator_text_return_value_block",
                joystick_get_x_value: "bcm_translator_text_return_value_block",
                joystick_get_y_value: "bcm_translator_text_return_value_block",
                is_joystick_pressed: "bcm_translator_text_return_value_block",
                led_light_on: "bcm_translator_text_execution_block",
                car_light_on: "bcm_translator_text_execution_block",
                digital_show: "bcm_translator_text_execution_block",
                buzzer_play_midi: "bcm_translator_text_execution_block",
                fan_speed: "bcm_translator_text_execution_block",
                steering_angle: "bcm_translator_text_execution_block",
                rgb_light_color: "bcm_translator_text_execution_block",
                rgb_light_color_digital: "bcm_translator_text_execution_block",
                weeemake_motor_turn_speed: "bcm_translator_text_execution_block",
                get_distance: "bcm_translator_text_return_value_block",
                sensor_get_light_intensity: "bcm_translator_text_return_value_block",
                sensor_get_sound_intensity: "bcm_translator_text_return_value_block",
                get_temp_humi: "bcm_translator_text_return_value_block",
                weeemake_get_potentiometer_angle: "bcm_translator_text_return_value_block",
                weeemake_get_double_line: "bcm_translator_text_return_value_block",
                weeemake_joystick_get_x_value: "bcm_translator_text_return_value_block",
                weeemake_joystick_get_y_value: "bcm_translator_text_return_value_block",
                is_touch_sensor_switch: "bcm_translator_text_return_boolean_block",
                is_infrared_control: "bcm_translator_text_return_boolean_block",
                weeemake_is_get_sport: "bcm_translator_text_return_boolean_block",
                WIDGET_LVMI_buttonWhen: "bcm_translator_text_event_block",
                WIDGET_LVMI_dongJingTieWhen: "bcm_translator_text_event_block",
                WIDGET_LVMI_doorWindowSensorWhen: "bcm_translator_text_event_block",
                WIDGET_LVMI_bodySensorWhen: "bcm_translator_text_event_block",
                WIDGET_LVMI_cubeWhen: "bcm_translator_text_event_block",
                WIDGET_LVMI_sceneRun: "bcm_translator_text_execution_block",
                WIDGET_LVMI_linkageEnable: "bcm_translator_text_execution_block",
                WIDGET_LVMI_m1sLightSetStatus: "bcm_translator_text_execution_block",
                WIDGET_LVMI_m1sSetBrightness: "bcm_translator_text_execution_block",
                WIDGET_LVMI_m1sSetColor: "bcm_translator_text_execution_block",
                WIDGET_LVMI_buttonIs: "bcm_translator_text_return_boolean_block",
                WIDGET_LVMI_dongJingTieIs: "bcm_translator_text_return_boolean_block",
                WIDGET_LVMI_doorWindowSensorIs: "bcm_translator_text_return_boolean_block",
                WIDGET_LVMI_bodySensorIs: "bcm_translator_text_return_boolean_block",
                WIDGET_LVMI_cubeIs: "bcm_translator_text_return_boolean_block",
                WIDGET_LVMI_tempHumiSensorGet: "bcm_translator_text_return_value_block",
                WIDGET_LVMI_lightSensorGet: "bcm_translator_text_return_value_block",
                on_mobile_slide: "bcm_translator_text_event_block",
                on_mobile_slope: "bcm_translator_text_event_block",
                on_mobile_click_btn: "bcm_translator_text_event_block",
                on_mobile_shake: "bcm_translator_text_event_block",
                get_mobile_slope_value: "bcm_translator_text_return_value_block",
                get_mobile_rocker_value: "bcm_translator_text_return_value_block",
                mobile_vibrate: "bcm_translator_text_execution_block",
                physics2_set_gravity: "bcm_translator_text_execution_block",
                physics2_set_boundary: "bcm_translator_text_execution_block",
                physics2_enable_force: "bcm_translator_text_execution_block",
                physics2_set_actor_as: "bcm_translator_text_execution_block",
                physics2_forbid_bump_with: "bcm_translator_text_execution_block",
                physics2_allow_rotate: "bcm_translator_text_execution_block",
                physics2_set_resilience: "bcm_translator_text_execution_block",
                physics2_set_roughness: "bcm_translator_text_execution_block",
                physics2_set_speed: "bcm_translator_text_execution_block",
                physics2_get_property: "bcm_translator_text_return_value_block",
                physics2_set_mass: "bcm_translator_text_execution_block",
                physics2_set_texture: "bcm_translator_text_execution_block",
                physics2_set_flexibility: "bcm_translator_text_execution_block",
                physics2_set_force: "bcm_translator_text_execution_block",
                physics2_set_force_in_time: "bcm_translator_text_execution_block"
            }
              , xw = {
                backdrop_on_change: "\u5f53\u5c4f\u5e55\u5207\u6362\u5230{value}",
                play_ask_record: "\u64ad\u653e\u5f55\u97f3",
                self_ask_record: "\u8be2\u95ee {text} \u5e76\u5f55\u97f3",
                self_ask_listen: {
                    "zh-hans": "\u8be2\u95ee{text}\u5e76\u8bc6\u522b\u4e3a\u4e2d\u6587",
                    en: "\u8be2\u95ee{text}\u5e76\u8bc6\u522b\u4e3a\u82f1\u6587"
                },
                dispose: "\u5220\u9664\u81ea\u5df1",
                change_volume_or_rate_2: {
                    rate: "\u97f3\u901f",
                    volume: "\u97f3\u91cf",
                    increase: "\u589e\u52a0",
                    decrease: "\u51cf\u5c11"
                },
                set_volume_or_rate_2: {
                    rate: "\u97f3\u901f",
                    volume: "\u97f3\u91cf"
                },
                set_layer_with_pen: {
                    above: "\u5c06\u89d2\u8272\u79fb\u81f3\u753b\u7b14\u56fe\u5c42\u4e0a\u65b9",
                    below: "\u5c06\u89d2\u8272\u79fb\u81f3\u753b\u7b14\u56fe\u5c42\u4e0b\u65b9"
                },
                set_pen_path: {
                    start_point: "\u8bbe\u7f6e\u5f53\u524d\u4e3a\u586b\u5145\u8d77\u70b9",
                    end_point: "\u8bbe\u7f6e\u5f53\u524d\u4e3a\u586b\u5145\u7ec8\u70b9"
                },
                set_entity_show_hide: {
                    grad_show: "\u9010\u6e10\u663e\u793a",
                    grad_hide: "\u9010\u6e10\u9690\u85cf",
                    show: "\u663e\u793a",
                    hide: "\u9690\u85cf"
                },
                self_flip: {
                    0: "\u4e0a\u4e0b\u7ffb\u8f6c",
                    1: "\u5de6\u53f3\u7ffb\u8f6c"
                },
                set_fill_style: "\u8bbe\u7f6e\u586b\u5145\u989c\u8272",
                check_screen: {
                    false: "\u79bb\u5f00\u5c4f\u5e55 {index}",
                    true: "\u7559\u5728\u5c4f\u5e55 {index}"
                },
                enable_voice_detection: {
                    open: "\u5f00\u542f\u58f0\u97f3\u4fa6\u6d4b",
                    close: "\u5173\u95ed\u58f0\u97f3\u4fa6\u6d4b"
                },
                self_change_layer: "\u5c06\u56fe\u5c42\u4e0a\u79fb\u5230 {layer} \u5c42",
                clone: "\u5206\u88c2 {sprite_id} \u5230 x {x} y {y}",
                logic_boolean: {
                    TRUE: "\u6210\u7acb",
                    FALSE: "\u4e0d\u6210\u7acb"
                },
                calculate: "\u6570\u5b66\u8fd0\u7b97 {value}",
                midi__on_play_note: "\u5f53 MIDI \u97f3\u4e50{midi_get}\u64ad\u653e\u97f3\u7b26{midi_get_note}",
                midi__set_program: "\u8bbe\u7f6e MIDI \u97f3\u4e50{midi_get}\u97f3\u8272{program}",
                midi__set_speed_rate: "\u8bbe\u7f6e MIDI \u97f3\u4e50\u64ad\u653e\u901f\u7387{rate}\u500d",
                midi__on_play_section: "\u6bcf\u5f53 MIDI \u97f3\u4e50{midi_get}\u64ad\u653e{column}\u5217\u97f3\u7b26",
                midi__play_section: "\u64ad\u653e MIDI \u97f3\u4e50{midi_get}\u7b2c{column}\u5217\u97f3\u7b26",
                midi__get_section_notes: "MIDI \u97f3\u4e50{midi_get}\u7b2c{column}\u5217\u97f3\u7b26",
                midi__get_playing_column: "MIDI \u97f3\u4e50{midi_get}\u5f53\u524d\u64ad\u653e\u5217\u6570",
                midi__get_bpm: "MIDI \u97f3\u4e50{midi_get}\u8282\u62cd",
                midi_get: "MIDI \u97f3\u4e50",
                midi_get_all: "\u4efb\u610f MIDI \u97f3\u4e50",
                midi_get_note: "\u97f3\u7b26",
                program: "\u97f3\u8272",
                user_id_get: "\u7528\u6237ID",
                username_get: "\u7528\u6237\u540d",
                connected_users_get: "\u5728\u7ebf\u7528\u6237\u6570",
                hide_ranking: "\u9690\u85cf \u6392\u884c\u699c",
                show_ranking: "\u663e\u793a{value}\u6392\u884c\u699c",
                is_ranking_show_hide: {
                    hide: "\u6392\u884c\u699c\u9690\u85cf",
                    show: "\u6392\u884c\u699c\u663e\u793a"
                },
                WIDGET_LVMI_buttonWhen: "\u5f53\u65e0\u7ebf\u5f00\u5173\u68c0\u6d4b\u5230\u88ab{value}\u65f6",
                WIDGET_LVMI_dongJingTieWhen: "\u5f53\u52a8\u9759\u8d34\u68c0\u6d4b\u5230{value}\u65f6",
                WIDGET_LVMI_doorWindowSensorWhen: "\u5f53\u95e8\u7a97\u4f20\u611f\u5668\u68c0\u6d4b\u5230{value}\u65f6",
                WIDGET_LVMI_bodySensorWhen: "\u5f53\u4eba\u4f53\u4f20\u611f\u5668\u68c0\u6d4b\u5230{value}\u65f6",
                WIDGET_LVMI_cubeWhen: "\u5f53\u9b54\u65b9\u63a7\u5236\u5668\u68c0\u6d4b\u5230{value}",
                WIDGET_LVMI_sceneRun: "\u6267\u884c{value}",
                WIDGET_LVMI_linkageEnable: "{value2}{value1}",
                WIDGET_LVMI_m1sLightSetStatus: "M1S\u7f51\u5173\u591c\u706f{value}",
                WIDGET_LVMI_m1sSetBrightness: "M1S\u7f51\u5173\u591c\u706f \u4eae\u5ea6\u4e3a{value}",
                WIDGET_LVMI_m1sSetColor: "M1S\u7f51\u5173\u591c\u706f \u989c\u8272\u4e3a{value}",
                WIDGET_LVMI_buttonIs: "\u65e0\u7ebf\u5f00\u5173\u88ab{value}",
                WIDGET_LVMI_dongJingTieIs: "\u52a8\u9759\u8d34\u68c0\u6d4b\u5230{value}",
                WIDGET_LVMI_doorWindowSensorIs: "\u95e8\u7a97\u4f20\u611f\u5668\u68c0\u6d4b\u5230{value}",
                WIDGET_LVMI_bodySensorIs: "\u4eba\u4f53\u4f20\u611f\u5668\u68c0\u6d4b\u5230{value}\u7ecf\u8fc7",
                WIDGET_LVMI_cubeIs: "\u9b54\u65b9\u63a7\u5236\u5668\u68c0\u6d4b\u5230{value}",
                WIDGET_LVMI_tempHumiSensorGet: "\u6e29\u6e7f\u5ea6\u4f20\u611f\u5668\u68c0\u6d4b\u5230\u7684{value}",
                WIDGET_LVMI_lightSensorGet: "\u5149\u7167\u4f20\u611f\u5668\u68c0\u6d4b\u5230\u7684\u5149\u7167\u5f3a\u5ea6",
                set_digital_port_status: "\u8bbe\u7f6e\u6570\u5b57\u63a5\u53e3{value}\u7684\u7535\u5e73\u72b6\u6001{value1}",
                set_pwm_port_value: "\u8bbe\u7f6ePWM\u63a5\u53e3{value}\u503c\u4e3a{value1}",
                is_digital_port_status: "\u6570\u5b57\u63a5\u53e3{value}\u7684\u7535\u5e73\u72b6\u6001\u4e3a{value1}",
                get_analog_port_value: "\u6a21\u62df\u63a5\u53e3{value}\u7684\u503c",
                servo_motor_angle: "\u8235\u673a{value}\u7684\u89d2\u5ea6{value1}",
                led_light: "LED\u706f{value}{value1}",
                led_light_intensity: "LED\u706f{value}\u4eae\u5ea6\u4e3a{value1}",
                dc_single_motor_turn: "\u5355\u5411\u9a6c\u8fbe{value}{value1}\u8f6c\u52a8",
                dc_single_motor_speed: "\u5355\u5411\u9a6c\u8fbe{value}\u8f6c\u52a8\u901f\u5ea6{value1}",
                dc_both_motor_turn: "\u53cc\u5411\u9a6c\u8fbe{value}{value1}\u8f6c\u52a8",
                dc_both_motor_speed: "\u53cc\u5411\u9a6c\u8fbe{value}\u7684\u8f6c\u52a8\u901f\u5ea6{value1}",
                pwm_double_motor: "\u53cc\u5411\u9a6c\u8fbe{value}{value1}\u8f6c\u52a8\u901f\u5ea6{value2}",
                buzzer_sound: "\u8702\u9e23\u5668{value}{value1}\u53d1\u58f0",
                set_buzzer_port_value: "\u8bbe\u7f6e\u8702\u9e23\u5668\u63a5\u53e3{value}\u7684\u503c{value1}",
                shake_sensor_intensity: "\u632f\u52a8\u6a21\u5757{value}\u7684\u632f\u52a8\u5f3a\u5ea6{value1}",
                set_relay_port_status: "\u8bbe\u7f6e\u7ee7\u7535\u5668\u63a5\u53e3{value}\u7684\u7535\u5e73\u72b6\u6001\u4e3a{value1}",
                is_get_sound: "\u58f0\u63a7{value}\u68c0\u6d4b\u5230\u58f0\u97f3",
                get_sound_intensity: "\u58f0\u5f3a\u4f20\u611f\u5668{value}\u68c0\u6d4b\u5230\u7684\u58f0\u97f3\u5f3a\u5ea6",
                is_get_light: "\u5149\u654f\u89e6\u63a7{value}\u68c0\u6d4b\u5230\u5149",
                get_light_sensor_intensity: "\u5149\u654f\u4f20\u611f\u5668{value}\u68c0\u6d4b\u5230\u7684\u5149\u7167\u5f3a\u5ea6",
                get_fire_sensor_intensity: "\u706b\u7130\u4f20\u611f\u5668{value}\u68c0\u6d4b\u5230\u7684\u706b\u7130\u5f3a\u5ea6",
                is_switch_on: "\u5f00\u5173\u88ab{value}{value1}",
                is_button_pressed: "\u6309\u94ae\u88ab{value}{value1}",
                is_sensor_touched: "\u89e6\u6478\u5f00\u5173\u88ab{value}{value1}",
                is_limit_switch_pressed: "\u9650\u4f4d\u5f00\u5173\u88ab{value}{value1}",
                is_sensor_level: "\u503e\u659c\u4f20\u611f\u5668{value}\u72b6\u6001\u4e3a{value1}",
                infrared_sensor_switch: "\u7ea2\u5916\u907f\u969c\u4f20\u611f\u5668{value}\u68c0\u6d4b\u5230\u969c\u788d",
                is_sensor_get_line: "\u5de1\u7ebf\u4f20\u611f\u5668{value}\u68c0\u6d4b\u5230\u9ed1\u7ebf",
                is_get_high_temp: "\u6e29\u5ea6\u5f00\u5173 {value} \u68c0\u6d4b\u5230\u9ad8\u6e29",
                is_get_magnetic: "\u78c1\u654f\u6a21\u5757 {value} \u68c0\u6d4b\u5230\u78c1\u573a",
                is_color_picked: "\u989c\u8272\u4f20\u611f\u5668{value1}{value2}{value3}\u68c0\u6d4b\u5230\u989c\u8272{value4}",
                hcsr04_get_distance: "HCSR04\u8d85\u58f0\u6ce2\u4f20\u611f\u5668 TRI {value} ECH {value1}\u68c0\u6d4b\u5230\u7684\u8ddd\u79bb",
                dht11_get_temp_humi: "DHT11\u6e29\u6e7f\u5ea6\u4f20\u611f\u5668{value}\u68c0\u6d4b\u5230\u7684\u6e29\u5ea6\u548c\u6e7f\u5ea6",
                get_press_intensity: "\u538b\u529b\u4f20\u611f\u5668{value}\u68c0\u6d4b\u5230\u7684\u6309\u538b\u5f3a\u5ea6",
                soil_sensor_get_humi: "\u571f\u58e4\u6e7f\u5ea6\u4f20\u611f\u5668{value}\u68c0\u6d4b\u5230\u7684\u6e7f\u5ea6",
                grayscale_sensor_get: "\u7070\u5ea6\u4f20\u611f\u5668{value}\u68c0\u6d4b\u5230\u7684\u7070\u5ea6",
                get_potentiometer_turn_angle: "\u7535\u4f4d\u5668{value}\u7684\u65cb\u8f6c\u91cf",
                get_resistance_intensity: "\u6ed1\u52a8\u53d8\u963b\u5668{value}\u7684\u79fb\u52a8\u91cf",
                joystick_get_x_value: "\u6447\u6746{value}\u4e0aX\u8f74\u7684\u503c",
                joystick_get_y_value: "\u6447\u6746{value}\u4e0aY\u8f74\u7684\u503c",
                is_joystick_pressed: "\u6447\u6746{value}\u88ab\u6309\u4e0b",
                led_light_on: "LED\u706f{value}\u7684{value1}",
                car_light_on: "\u8f66\u5c3e\u706f{value}\u7684{value2}",
                digital_show: "\u6570\u7801\u7ba1{value}\u663e\u793a{value}",
                buzzer_play_midi: "\u8702\u9e23\u5668 \u64ad\u653e\u97f3\u8c03{value}\u8282\u62cd\u4e3a{value1}\u62cd",
                fan_speed: "130\u98ce\u6247\u6a21\u5757{value}\u901f\u5ea6\u4e3a{value1}",
                steering_angle: "9g\u8235\u673a{value}\u89d2\u5ea6\u4e3a{value1}",
                rgb_light_color: "RGB\u8d85\u58f0\u6ce2\u4f20\u611f\u5668{value}\u4e0a{value1}\u706f\u989c\u8272\u4e3a{value2}",
                rgb_light_color_digital: "RGB\u8d85\u58f0\u6ce2\u4f20\u611f\u5668{value}\u4e0a{value1}\u706f\u989c\u8272\u4e3a\uff1aR{value2}G{value3}B{value4}",
                weeemake_motor_turn_speed: "\u7535\u673a\u9a6c\u8fbe{value}\u7684\u8f6c\u52a8\u901f\u5ea6\u4e3a{value1}",
                get_distance: "\u8d85\u58f0\u6ce2\u4f20\u611f\u5668{value}\u68c0\u6d4b\u5230\u7684\u8ddd\u79bb",
                sensor_get_light_intensity: "\u5149\u7ebf\u4f20\u611f\u5668 \u68c0\u6d4b\u5230\u7684\u5149\u7167\u5f3a\u5ea6",
                sensor_get_sound_intensity: "\u58f0\u97f3\u4f20\u611f\u5668 \u68c0\u6d4b\u5230\u7684\u58f0\u97f3\u5f3a\u5ea6",
                get_temp_humi: "\u6e29\u6e7f\u5ea6\u4f20\u611f\u5668{value}\u68c0\u6d4b\u5230{value1}",
                weeemake_get_potentiometer_angle: "\u7535\u4f4d\u5668{value}\u7684\u65cb\u8f6c\u91cf",
                weeemake_get_double_line: "\u53cc\u8def\u5de1\u7ebf\u4f20\u611f\u5668{value}{value1}\u68c0\u6d4b\u5230\u7684\u7070\u5ea6",
                weeemake_joystick_get_x_value: "\u6447\u6746{value}\u4e0aX\u8f74\u7684\u503c",
                weeemake_joystick_get_y_value: "\u6447\u6746{value}\u4e0aY\u8f74\u7684\u503c",
                is_touch_sensor_switch: "\u89e6\u6478\u4f20\u611f\u5668{value}\u88ab\u6309\u4e0b",
                is_infrared_control: "\u7ea2\u5916\u9065\u63a7\u5668\u6309\u4e0b{value}",
                weeemake_is_get_sport: "\u4eba\u4f53\u7ea2\u5916\u4f20\u611f\u5668{value}\u68c0\u6d4b\u5230\u8fd0\u52a8",
                set_camera_status: {
                    true: "\u6253\u5f00\u6444\u50cf\u5934",
                    false: "\u5173\u95ed\u6444\u50cf\u5934"
                },
                set_camera_opcity: "\u8bbe\u7f6e\u89c6\u9891\u900f\u660e\u5ea6{value}",
                get_camera_data: {
                    motion: "{entity_id}\u7684\u8fd0\u52a8\u5f3a\u5ea6",
                    direction: "{entity_id}\u7684\u8fd0\u52a8\u65b9\u5411"
                },
                turn_on_the_qrcode_camera: "\u5f00\u542f\u8bbe\u5907\u7684\u6444\u50cf\u5934\uff0c\u626b\u63cf\u4e8c\u7ef4\u7801",
                display_recognition_result: "\u663e\u793a\u4e8c\u7ef4\u7801\u7684\u626b\u63cf\u7ed3\u679c",
                get_recognition_result: "\u4e8c\u7ef4\u7801\u7684\u626b\u63cf\u7ed3\u679c",
                play_video: "\u64ad\u653e\u89c6\u9891{video}",
                play_video_until_end: "\u64ad\u653e\u89c6\u9891{video}\u76f4\u5230\u7ed3\u675f",
                continue_pause_video: {
                    continue: "\u7ee7\u7eed\u89c6\u9891{video}",
                    pause: "\u6682\u505c\u89c6\u9891{video}"
                },
                show_hide_video: {
                    show: "\u663e\u793a\u89c6\u9891{video}",
                    hide: "\u9690\u85cf\u89c6\u9891{video}"
                },
                wood_block_set: "\u6d77\u9f9f\u51fd\u6570{value}",
                wood_block_get: "\u6d77\u9f9f\u51fd\u6570{value}",
                get_glasses: {
                    sun: "\u773c\u955c\u4f69\u6234\u4e3a\u58a8\u955c",
                    common: "\u773c\u955c\u4f69\u6234\u4e3a\u666e\u901a\u773c\u955c",
                    none: "\u773c\u955c\u4f69\u6234\u4e3a\u65e0\u773c\u955c"
                },
                auto_player_on_ai_ready: "\u5f53GameAI\u542f\u52a8\u65f6",
                auto_player_run_game_ai: "\u542f\u52a8GameAI",
                auto_player_actor_die: "AI\u89d2\u8272\u6b7b\u4ea1",
                auto_player_actor_is_dead: "AI\u89d2\u8272\u5df2\u7ecf\u6b7b\u4ea1",
                auto_player_use_model_supervised: "\u8bbe\u7f6e\u81ea\u5df1\u4e3aAI\u89d2\u8272\uff0c\u4f7f\u7528\u6a21\u578b{value}",
                auto_player_init_new_model: "\u521d\u59cb\u5316\u65b0\u7684\u6a21\u578b{value}\u7ed3\u6784\u4e3a\uff1a\u8f93\u5165\u5c42{value1}\uff0c\u8f93\u51fa\u5c42{value2},\uff0c\u9690\u85cf\u5c42{value3}",
                auto_player_use_model_unsupervised: "\u8bbe\u7f6e\u81ea\u5df1\u4e3aAI\u89d2\u8272\uff0c\u6bcf\u8f6e\u8fd0\u884c\u6570\u91cf{value}\uff0c\u4f7f\u7528\u4ee5\u4e0b\u6a21\u578b{value1}",
                auto_player_train_save_restart: "\u5982\u679c\u6240\u6709AI\u89d2\u8272\u6b7b\u4ea1\uff1a\u4f7f\u7528{value}\u4f18\u5316\u6a21\u578b\u5e76\u4fdd\u5b58\u4e3a{value1}, \u91cd\u542fGameAI",
                auto_player_set_feature: "AI\u89d2\u8272\u4f7f\u7528\u7279\u5f81\uff1a{value}{value1}...",
                auto_player_set_action: "AI\u89d2\u8272\u4f7f\u7528\u884c\u4e3a\uff1a{value}{value1}",
                auto_player_make_decision: "AI\u89d2\u8272\u505a\u51fa\u51b3\u7b56",
                auto_player_record_features_for_action: "\u4e3a\u884c\u4e3a\u4e0d\u64cd\u4f5c\u8bb0\u5f55\u5f53\u524d\u7279\u5f81\u503c",
                auto_player_record_score_and_delete_actor: "\u8bb0\u5f55AI\u89d2\u8272\u5f97\u5206:{value}\u5e76\u5220\u9664\u81ea\u5df1",
                get_running_device: "\u8fd0\u884c\u8bbe\u5907",
                check_running_device: {
                    computer: "\u8fd0\u884c\u8bbe\u5907\u4e3a\u7535\u8111",
                    mobile: "\u8fd0\u884c\u8bbe\u5907\u4e3a\u624b\u673a",
                    tablet: "\u8fd0\u884c\u8bbe\u5907\u4e3a\u5e73\u677f\u7535\u8111"
                },
                on_mobile_slide: "\u5f53{value}\u8bc6\u522b\u5230 \u624b\u6307\u5411{value}\u6ed1\u52a8",
                on_mobile_slope: "\u5f53{value}\u5411\u503e\u659c",
                on_mobile_click_btn: "\u5f53{value}\u4e0a{value1}\u6309\u4e0b{value2}",
                on_mobile_shake: "\u5f53{value}\u88ab\u6447\u6643",
                get_mobile_slope_value: "{value}\u503e\u659c{value1}\u5206\u91cf",
                get_mobile_rocker_value: "{value}\u6447\u6746{value1}\u7684\u503c",
                mobile_vibrate: "{value}\u632f\u52a8",
                physics2_set_gravity: "\u8bbe\u7f6e\u5f53\u524d\u5c4f\u5e55\u91cd\u529b\u52a0\u901f\u5ea6\u7684\u5927\u5c0f{value}\u548c\u65b9\u5411{value1}",
                physics2_set_boundary: "\u8bbe\u7f6e\u5f53\u524d\u5c4f\u5e55 \u7269\u7406\u8fb9\u754c\u4e3a {value}",
                physics2_enable_force: "{value}\u5916\u529b\u5f71\u54cd",
                physics2_set_actor_as: "{value}\u7269\u7406\u78b0\u649e",
                physics2_forbid_bump_with: "\u4e0e{value}{value1}",
                physics2_allow_rotate: "{value}\u503e\u5012",
                physics2_set_resilience: "\u8bbe\u7f6e\u78b0\u649e\u65f6\u7684\u5f39\u6027{value}",
                physics2_set_roughness: "\u8bbe\u7f6e\u6469\u64e6\u65f6\u7684\u7c97\u7cd9\u7a0b\u5ea6{value}",
                physics2_set_speed: "\u8bbe\u7f6e\u79fb\u52a8\u901f\u5ea6\u5927\u5c0f{value}\u548c\u65b9\u5411{value1}\u5ea6",
                physics2_get_property: "{value}{value1}",
                physics2_set_mass: "\u8bbe\u7f6e \u81ea\u8eab\u8d28\u91cf{value}",
                physics2_set_texture: "\u8bbe\u7f6e \u81ea\u8eab\u6750\u8d28\u4e3a{value}",
                physics2_set_flexibility: "\u8bbe\u7f6e \u81ea\u8eab\u67d4\u8f6f\u5ea6\u4e3a{value}",
                physics2_set_force: "\u53d7\u5230 \u5927\u5c0f{value}\u65b9\u5411{value1}\u5ea6 \u7684\u63a8\u529b",
                physics2_set_force_in_time: "\u5728{value}\u79d2\u5185\u6301\u7eed\u53d7\u5230 \u5927\u5c0f{value1}\u65b9\u5411{value2}\u5ea6 \u7684\u63a8\u529b",
                on_midimusic_play_note: "\u5f53MIDI\u97f3\u4e50{value}\u64ad\u653e\u5230\u97f3\u7b26{value1}",
                on_midimusic_play_columns: "\u6bcf\u5f53MIDI\u97f3\u4e50{value}\u64ad\u653e{value}\u5217\u97f3\u7b26",
                play_midimusic: "\u64ad\u653eMIDI\u97f3\u4e50{value}",
                stop_midimusic: "\u505c\u6b62{value}MIDI\u97f3\u4e50",
                play_midimusic_till_end: "\u64ad\u653eMIDI\u97f3\u4e50{value}\u76f4\u5230\u7ed3\u675f",
                set_midimusic_instrument: "\u8bbe\u7f6eMIDI\u97f3\u4e50{value}\u7684\u4e50\u5668\u4e3a{value}",
                set_midimusic_speed: "\u8bbe\u7f6eMIDI\u97f3\u4e50\u64ad\u653e\u901f\u7387\u4e3a{value}",
                play_midimusic_column: "\u64ad\u653eMIDI\u97f3\u4e50{value}\u7684\u7b2c{value}\u5217\u97f3\u7b26",
                midimusic_column_tag: "MIDI\u97f3\u4e50\u7684\u7b2c{value}\u5217\u97f3\u7b26{value}",
                self_shake: "\u6296\u52a8{value} \u79d2",
                ai_lab_predict_classification: "\u672a\u547d\u540d\u6a21\u578b: \u9884\u6d4b\u7279\u5f811{value}\u7684 \u5206\u7c7b",
                ai_lab_predict_confidence: "\u672a\u547d\u540d\u6a21\u578b: \u9884\u6d4b\u7279\u5f811{value}\u7684 \u7f6e\u4fe1\u5ea6",
                ai_lab_classify: "\u672a\u547d\u540d\u6a21\u578b: {value}",
                ai_lab_add_data: "\u672a\u547d\u540d\u6a21\u578b: \u6dfb\u52a0\u8bad\u7ec3\u6570\u636e \u7279\u5f811{value} \u5230{value1}",
                microbit_when_press_key: "\u5f53{value}\u6309\u94ae{value1}",
                microbit_when_incline: "\u5f53\u5411{value}\u503e\u659c",
                microbit_when_be_operated: "\u5f53\u88ab{value1}",
                microbit_display_lattice_image: "\u663e\u793a\u56fe\u6848{value}",
                microbit_display_custom_lattice_image: "\u663e\u793a\u81ea\u5b9a\u4e49\u56fe\u6848{value}",
                microbit_display_text: "\u663e\u793a\u6587\u672c{value}",
                microbit_set_light_intensity: "\u8bbe\u7f6e\u4eae\u5ea6{value}",
                microbit_set_xy_light_intensity: "\u70b9\u4eaex{value}y{value1}), \u4eae\u5ea6\u4e3a{value2}",
                microbit_turn_off_xy_light: "\u7184\u706dx{value}y{value1})",
                microbit_clear_screen: "\u6e05\u7a7a\u5c4f\u5e55",
                microbit_is_press_key: "\u6309\u952e{value}\u88ab\u6309\u4e0b",
                microbit_is_incline: "\u5411{value}\u503e\u659c",
                microbit_get_incline_angle: "\u5411{value}\u503e\u659c\u7684\u89d2\u5ea6",
                microbit_get_acceleration: "\u52a0\u901f\u5ea6\u503c{value}",
                microbit_get_light_intensity: "\u4eae\u5ea6\u7ea7\u522b",
                microbit_get_temperature: "\u6e29\u5ea6",
                microbit_get_compass_heading: "\u6307\u5357\u9488 \u89d2\u5ea6",
                microbit_get_compass_field_strength: "\u6307\u5357\u9488\u78c1\u573a\u503c{value}",
                microbit_is_pin_level: "\u5f15\u811a{value}\u7684\u7535\u5e73\u72b6\u6001\u4e3a{value1}"
            }
              , ww = ""
              , kw = function() {
                return lw()
            }
              , Cw = function() {
                function e(t) {
                    (0,
                    D.Z)(this, e),
                    j(this, "kittenBcm"),
                    j(this, "specialFieldValueMap", {
                        sprite: {
                            __self: "--self",
                            __mouse: "--mouse",
                            __pointer: "--mouse",
                            __random: "--random"
                        },
                        sprite1: {
                            __self: "--self",
                            __mouse: "--mouse",
                            __pointer: "--mouse",
                            __random: "--random",
                            __edge: "--edge",
                            __edge_top: "--edge_top",
                            __edge_bottom: "--edge_bottom",
                            __edge_left: "--edge_left",
                            __edge_right: "--edge_right"
                        },
                        sprite2: {
                            __self: "--self",
                            __mouse: "--mouse",
                            __pointer: "--mouse",
                            __random: "--random",
                            __edge: "--edge",
                            __edge_top: "--edge_top",
                            __edge_bottom: "--edge_bottom",
                            __edge_left: "--edge_left",
                            __edge_right: "--edge_right"
                        },
                        type: {
                            say: "talk",
                            select_index: "index",
                            select_content: "content",
                            MULTIPLY: "multiply",
                            POWER: "power",
                            MINUS: "minus",
                            DIVIDE: "divide",
                            ADD: "add",
                            ROUND: "round",
                            ROUNDDOWN: "round_down",
                            ROUNDUP: "round_up",
                            AND: "and",
                            OR: "or"
                        },
                        sound_id: {
                            all: "all_audio"
                        },
                        target: {
                            X: "x",
                            Y: "y",
                            Z: "z",
                            __pointer: "--mouse",
                            __random: "--random"
                        },
                        prev_next: {
                            previous: "prev",
                            next: "next"
                        },
                        layer: {
                            peak: "peak",
                            bottom: "bottom",
                            next_level: "next_layer",
                            previous_level: "prev_layer"
                        },
                        screen_id: {
                            __previous_scene: "prev",
                            __next_scene: "next"
                        },
                        scene: {
                            __previous_scene: "prev",
                            __next_scene: "next"
                        },
                        align: {
                            LEFT: "right",
                            CENTER: "center",
                            RIGHT: "left"
                        },
                        language: {
                            english: "en",
                            chinese: "zh",
                            classical_chinese: "wyw",
                            french: "fra",
                            spanish: "spa",
                            japanese: "jp"
                        },
                        attribute: {
                            0: "x",
                            1: "y",
                            2: "style_index",
                            3: "direction",
                            4: "?",
                            5: "scale",
                            7: "0",
                            8: "1",
                            9: "2",
                            10: "3",
                            11: "4",
                            12: "5",
                            13: "6",
                            14: "?",
                            16: "width",
                            17: "height"
                        },
                        axis: {
                            X: "x",
                            Y: "y",
                            Z: "z"
                        },
                        op: {
                            week_num: "weekday_num",
                            week: "weekday"
                        },
                        TYPE: {
                            first: "any",
                            nth: "any"
                        },
                        OP: {
                            AND: "and",
                            OR: "or",
                            ROOT: "0",
                            ABS: "1",
                            NEG: "2",
                            LN: "3",
                            LOG10: "4",
                            EXP: "5",
                            POW10: "6",
                            SIN: "sin",
                            COS: "cos",
                            TAN: "tan",
                            ASIN: "asin",
                            ACOS: "acos",
                            ATAN: "atan",
                            ADD: "add",
                            MINUS: "minus",
                            MULTIPLY: "multiply",
                            DIVIDE: "divide",
                            POWER: "power",
                            ROUND: "round",
                            ROUNDDOWN: "round_down",
                            ROUNDUP: "round_up"
                        },
                        BOOL: {
                            TRUE: "true",
                            FALSE: "false"
                        },
                        status: {
                            true: "turn_on",
                            false: "turn_off"
                        },
                        actor: {
                            __self: "--self"
                        },
                        lang: {
                            "zh-hans": "zh"
                        }
                    }),
                    this.kittenBcm = t
                }
                return (0,
                C.Z)(e, [{
                    key: "processAppearanceAttribute",
                    value: function(e) {
                        return {
                            0: {
                                name: "coordinate",
                                value: "x"
                            },
                            1: {
                                name: "coordinate",
                                value: "y"
                            },
                            2: {
                                name: "style",
                                value: "style_of_sprite"
                            },
                            3: {
                                name: "appearance",
                                value: "direction"
                            },
                            5: {
                                name: "appearance",
                                value: "scale"
                            },
                            7: {
                                name: "effect",
                                value: "0"
                            },
                            8: {
                                name: "effect",
                                value: "1"
                            },
                            9: {
                                name: "effect",
                                value: "2"
                            },
                            10: {
                                name: "effect",
                                value: "3"
                            },
                            11: {
                                name: "effect",
                                value: "4"
                            },
                            12: {
                                name: "effect",
                                value: "5"
                            },
                            13: {
                                name: "effect",
                                value: "6"
                            },
                            14: {
                                name: "effect",
                                value: "?"
                            },
                            16: {
                                name: "appearance",
                                value: "width"
                            },
                            17: {
                                name: "appearance",
                                value: "height"
                            }
                        }[e]
                    }
                }, {
                    key: "getMappedName",
                    value: function(e, t) {
                        if ("procedures_2_defnoreturn" === e && t.includes("PARAMS")) {
                            var n = parseInt(t.replace("PARAMS", ""));
                            return "PARAMS".concat(n + 1)
                        }
                        var r = {
                            self_change_effect: {
                                steps: "value"
                            },
                            self_change_effect_3: {
                                steps: "value"
                            },
                            set_sprite_style: {
                                index: "style_id"
                            },
                            set_costume: {
                                index: "style_id"
                            },
                            list_length: {
                                VAR: "list"
                            },
                            lists_length: {
                                VAR: "list"
                            },
                            cloud_lists_length: {
                                VAR: "list"
                            },
                            list_index_of: {
                                VAR: "list",
                                VALUE: "list_item_value"
                            },
                            lists_index_of: {
                                VAR: "list",
                                VALUE: "list_item_value"
                            },
                            cloud_lists_index_of: {
                                VAR: "list",
                                VALUE: "list_item_value"
                            },
                            list_append: {
                                VAR: "list",
                                VALUE: "list_item_value"
                            },
                            lists_append: {
                                VAR: "list",
                                VALUE: "list_item_value"
                            },
                            cloud_lists_append: {
                                VAR: "list",
                                VALUE: "list_item_value"
                            },
                            list_insert_value: {
                                VAR: "list",
                                INDEX: "list_index",
                                VALUE: "list_item_value"
                            },
                            lists_insert_value: {
                                VAR: "list",
                                INDEX: "list_index",
                                VALUE: "list_item_value"
                            },
                            cloud_lists_insert_value: {
                                VAR: "list",
                                INDEX: "list_index",
                                VALUE: "list_item_value"
                            },
                            delete_list_item: {
                                VAR: "list",
                                INDEX: "list_index",
                                VALUE: "type"
                            },
                            lists_delete: {
                                VAR: "list",
                                INDEX: "list_index",
                                VALUE: "type"
                            },
                            cloud_lists_delete: {
                                VAR: "list",
                                INDEX: "list_index",
                                VALUE: "type"
                            },
                            replace_list_item: {
                                VAR: "list",
                                INDEX: "list_index",
                                VALUE: "list_item_value"
                            },
                            lists_replace: {
                                VAR: "list",
                                INDEX: "list_index",
                                VALUE: "list_item_value"
                            },
                            cloud_lists_replace: {
                                VAR: "list",
                                INDEX: "list_index",
                                VALUE: "list_item_value"
                            },
                            list_copy: {
                                VALUE: "list",
                                TARGET: "target_list"
                            },
                            lists_copy: {
                                VALUE: "list",
                                TARGET: "target_list"
                            },
                            cloud_lists_copy: {
                                VALUE: "list",
                                TARGET: "target_list"
                            },
                            list_item: {
                                VAR: "list",
                                INDEX: "list_index"
                            },
                            lists_get_value: {
                                VAR: "list",
                                INDEX: "list_index"
                            },
                            cloud_lists_get_value: {
                                VAR: "list",
                                INDEX: "list_index"
                            },
                            list_is_exist: {
                                VAR: "list",
                                VALUE: "list_item_value"
                            },
                            lists_is_exist: {
                                VAR: "list",
                                VALUE: "list_item_value"
                            },
                            cloud_lists_is_exist: {
                                VAR: "list",
                                VALUE: "list_item_value"
                            },
                            math_modulo: {
                                DIVIDEND: "A",
                                DIVISOR: "B"
                            },
                            random_num: {
                                a: "A",
                                b: "B"
                            },
                            random: {
                                a: "A",
                                b: "B"
                            },
                            logic_compare: {
                                a: "A",
                                b: "B"
                            },
                            text_contain: {
                                TEXT1: "A",
                                TEXT2: "B"
                            },
                            switch_to_screen: {
                                screen: "screen_id"
                            },
                            self_listen: {
                                broadcast: "message"
                            },
                            change_variables: {
                                n: "value"
                            },
                            change_variable: {
                                n: "value"
                            },
                            change_cloud_variable: {
                                n: "value"
                            },
                            variables_set: {
                                VALUE: "value"
                            },
                            cloud_variables_set: {
                                VALUE: "value"
                            },
                            math_number_property: {
                                NUMBER_TO_CHECK: "num"
                            },
                            divisible_by: {
                                NUMBER_TO_CHECK: "A",
                                DIVISOR: "B"
                            },
                            convert_type: {
                                original_value: "text"
                            },
                            text_length: {
                                VALUE: "text"
                            },
                            text_select_changeable: {
                                STRING: "text",
                                NUM0: "start_index",
                                NUM1: "end_index"
                            },
                            text_select: {
                                STRING: "text",
                                NUM0: "start_index",
                                NUM1: "end_index"
                            },
                            math_function: {
                                NUM: "num"
                            },
                            math_single: {
                                NUM: "num"
                            },
                            math_trig: {
                                NUM: "num"
                            },
                            math_trig_common: {
                                NUM: "num"
                            },
                            math_trig_arc: {
                                NUM: "num"
                            },
                            math_round: {
                                NUM: "num"
                            },
                            text_join: {
                                VALUE: "ADD0"
                            },
                            shadow_text: {
                                VALUE: "ADD0"
                            },
                            logic_negate: {
                                BOOL: "logic"
                            },
                            set_camera_opcity: {
                                opcity: "camera_alpha"
                            },
                            set_camera_alpha: {
                                opcity: "camera_alpha"
                            },
                            procedures_2_defnoreturn: {
                                PROCEDURES_2_DEFNORETURN_MUTATOR: "PARAMS0"
                            },
                            play_audio: {
                                audio: "audio_id"
                            },
                            play_audio_2: {
                                audio: "audio_id"
                            },
                            play_audio_and_wait: {
                                audio: "audio_id"
                            },
                            play_audio_and_wait_2: {
                                audio: "audio_id"
                            },
                            stop_audio: {
                                audio: "audio_id"
                            },
                            stop_audio_2: {
                                audio: "audio_id"
                            },
                            self_set_effect: {
                                val: "value"
                            },
                            self_set_effect_2: {
                                val: "value"
                            }
                        };
                        return r[e] && r[e][t] ? r[e][t] : t
                    }
                }, {
                    key: "parseBlock",
                    value: function(e) {
                        var t = this
                          , n = e.blocks
                          , r = e.connections
                          , i = function e(i) {
                            var a, o = n[i];
                            if (o) {
                                var s = ww;
                                if ("self_set_position" == o.type && "x" == o.fields.coordinary)
                                    s = "self_set_position_x";
                                else if ("self_set_position" == o.type && "y" == o.fields.coordinary)
                                    s = "self_set_position_y";
                                else if ("self_change_coordinate" == o.type && "x" == o.fields.coordinary)
                                    s = "self_change_coordinate_x";
                                else if ("self_change_coordinate" == o.type && "y" == o.fields.coordinary)
                                    s = "self_change_coordinate_y";
                                else if ("self_glide_coordinate" == o.type && "x" == o.fields.coordinary)
                                    s = "self_glide_coordinate_x";
                                else if ("self_glide_coordinate" == o.type && "y" == o.fields.coordinary)
                                    s = "self_glide_coordinate_y";
                                else if ("self_disappear" === o.type)
                                    s = "self_appear";
                                else if ("terminate" === o.type)
                                    s = "stop";
                                else if ("get_3" === o.type && o.fields.attribute) {
                                    var c = t.processAppearanceAttribute(o.fields.attribute);
                                    c ? (o.fields = (0,
                                    N.Z)((0,
                                    N.Z)({}, o.fields), {}, (0,
                                    S.Z)({}, c.name, c.value)),
                                    s = "".concat(c.name, "_of_sprite")) : (o.fields = (0,
                                    N.Z)((0,
                                    N.Z)({}, o.fields), {}, (0,
                                    S.Z)({}, "appearance", "?")),
                                    s = t.translateBlockType(o.type))
                                } else
                                    "self_appear" === o.type ? (s = t.translateBlockType(o.type),
                                    o.fields = (0,
                                    N.Z)((0,
                                    N.Z)({}, o.fields), {}, {
                                        value: "appear"
                                    })) : "shadow_text" === o.type ? (s = t.translateBlockType(o.type),
                                    o.mutation = '<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>',
                                    o.shadows.MUTATE_BUTTON = ww) : s = t.translateBlockType(o.type);
                                var u = {
                                    type: s,
                                    id: o.id,
                                    location: o.location,
                                    shield: !1,
                                    is_shadow: o.is_shadow || void 0,
                                    mutation: o.mutation
                                };
                                o.type in xw && (u.mutation = t.createMutationForBlockType(o, n));
                                var l = ["bcm_translator_text_execution_block", "bcm_translator_text_event_block"]
                                  , p = ["bcm_translator_text_return_boolean_block", "bcm_translator_text_return_value_block"];
                                if (l.includes(u.type) && (u.disabled = !0,
                                u.shadows = {
                                    TITLE_HEAD: ""
                                }),
                                "self_disappear" === o.type ? (u.fields || (u.fields = {}),
                                u.fields.value = "disappear") : "self_gradually_show_hide" === o.type ? (u.fields || (u.fields = {}),
                                u.fields.show_hide = "hide") : "terminate" === o.type ? (u.fields || (u.fields = {}),
                                u.fields.scope = "0") : "get_face_age" === o.type ? (u.fields || (u.fields = {}),
                                u.fields.type = "age") : "get_emotion_result" === o.type ? (u.fields || (u.fields = {}),
                                u.fields.type = "emotion") : "get_face_shape_result" === o.type && (u.fields || (u.fields = {}),
                                u.fields.type = "faceShape"),
                                Object.keys(o.fields).length > 0) {
                                    u.fields = {};
                                    for (var d = 0, h = Object.entries(o.fields); d < h.length; d++) {
                                        var f = (0,
                                        x.Z)(h[d], 2)
                                          , m = f[0]
                                          , g = f[1]
                                          , y = t.mapFieldName(o.type, m)
                                          , v = t.mapFieldValue(m, g);
                                        u.fields[y] = v
                                    }
                                    if ("cloud_lists_length" === o.type || "cloud_lists_get_value" === o.type || "cloud_lists_delete" === o.type) {
                                        var _ = u.fields.list
                                          , A = {
                                            type: "pure_list_get",
                                            id: kw(),
                                            is_shadow: !0,
                                            fields: {
                                                list: _
                                            },
                                            is_output: !0,
                                            parent_id: i,
                                            shield: !1
                                        };
                                        void 0 === u.inputs && (u.inputs = {}),
                                        u.inputs.list = A,
                                        delete u.fields.list
                                    }
                                }
                                if (!l.includes(u.type) && Object.keys(o.shadows).length > 0) {
                                    u.shadows = {};
                                    for (var M = 0, T = Object.entries(o.shadows); M < T.length; M++) {
                                        var b = (0,
                                        x.Z)(T[M], 2)
                                          , E = b[0]
                                          , I = b[1]
                                          , w = t.getMappedName(o.type, E)
                                          , k = t.transformShadowXml(o.type, I);
                                        u.shadows[w] = k
                                    }
                                }
                                if (o.mutation && "text_select_changeable" === o.type) {
                                    var C = (new DOMParser).parseFromString(o.mutation, "text/xml")
                                      , D = C.documentElement.getAttribute("items");
                                    D && C.documentElement.setAttribute("items", (parseInt(D) - 1).toString()),
                                    u.mutation = (new XMLSerializer).serializeToString(C.documentElement)
                                }
                                for (var O = r[i] || {}, L = 0, P = Object.entries(O); L < P.length; L++) {
                                    var j = (0,
                                    x.Z)(P[L], 2)
                                      , R = j[0]
                                      , z = j[1];
                                    if ("next" === z.type)
                                        u.next = e(R);
                                    else if ("input" === z.type && !p.includes(u.type) && (u.inputs || (u.inputs = {}),
                                    z.input_name)) {
                                        var B = e(R);
                                        if (B) {
                                            B.parent_id = i;
                                            var U = t.getMappedName(u.type, z.input_name);
                                            if (["list_append", "list_insert_value", "delete_list_item", "replace_list_item", "list_index_of", "list_is_exist", "show_hide_list"].includes(u.type) && u.fields) {
                                                var Z = u.fields.list
                                                  , F = {
                                                    type: "pure_list_get",
                                                    id: kw(),
                                                    is_shadow: !0,
                                                    fields: {
                                                        list: Z
                                                    },
                                                    is_output: !0,
                                                    parent_id: i,
                                                    shield: !1
                                                };
                                                u.inputs.list = F,
                                                u.shadows && (u.shadows.list = '<shadow xmlns="http://www.w3.org/1999/xhtml" type="pure_list_get" id="'.concat(F.id, '" visible="visible" inline="true"><field name="list">').concat(null == (a = null == F ? void 0 : F.fields) ? void 0 : a.list, "</field></shadow>")),
                                                delete u.fields.list
                                            }
                                            "on_keydown" === u.type || "sprite_on_tap" === u.type || "on_swipe" === u.type || ["bcm_translator_text_event_block"].includes(u.type) ? u.next = B : "controls_if" === u.type && U.includes("DO") || "controls_if" === u.type && U.includes("ELSE") || "when" === u.type && U.includes("DO") ? (u.statements || (u.statements = {}),
                                            u.statements[U] = B) : "repeat_forever" === u.type && "DO" === U || "start_as_a_mirror" === u.type && "DO" === U || "self_listen" === u.type && "DO" === U || "repeat_n_times" === u.type && "DO" === U || "repeat_forever_until" === u.type && "DO" === U ? (u.statements || (u.statements = {}),
                                            u.statements.DO = B) : u.inputs[U] = B
                                        }
                                    }
                                }
                                return u
                            }
                        }
                          , a = new Set;
                        Object.values(r).forEach((function(e) {
                            Object.keys(e).forEach((function(e) {
                                a.add(e)
                            }
                            ))
                        }
                        ));
                        var o = [];
                        for (var s in n) {
                            if (!a.has(s)) {
                                var c = i(s);
                                c && o.push(c)
                            }
                        }
                        return o
                    }
                }, {
                    key: "mapFieldValue",
                    value: function(e, t) {
                        return this.specialFieldValueMap[e] && this.specialFieldValueMap[e][t] ? this.specialFieldValueMap[e][t] : t
                    }
                }, {
                    key: "mapFieldName",
                    value: function(e, t) {
                        return {
                            sound_id: "audio_id",
                            target: "sprite",
                            is_show: "show_hide",
                            screen: "screen_id",
                            scene: "screen_id",
                            MESSAGE: "message",
                            broadcast: "message",
                            key_event_type: "type",
                            mouse_event_type: "type",
                            sprite2: "sprite1",
                            sprite1: "sprite",
                            position: "type",
                            axis: "target",
                            actions: "type",
                            state: "showHide",
                            op: "time",
                            info: "type",
                            VAR: e.includes("variables") || e.includes("variable") ? "variable" : "list",
                            TYPE: "item",
                            FUNC: "show_hide",
                            PROPERTY: "type",
                            OP: "logic_compare" === e ? "OP" : "type",
                            status: "camera_status",
                            actor: "sprite",
                            self_prev_next_style: "prev_next",
                            prev_or_next: "prev_next",
                            valname: e.includes("variables") || e.includes("variable") ? "variable" : "list",
                            lang: "type"
                        }[t] || t
                    }
                }, {
                    key: "transformShadowXml",
                    value: function(e, t) {
                        if (!t)
                            return ww;
                        var n = (new DOMParser).parseFromString(t, "text/xml").documentElement
                          , r = n.getAttribute("type")
                          , i = this.translateBlockType(r || "");
                        i && n.setAttribute("type", i);
                        for (var a = n.getElementsByTagName("field"), o = 0; o < a.length; o++) {
                            var s = a[o]
                              , c = s.getAttribute("name");
                            if (c) {
                                var u = this.mapFieldName(e, c);
                                u !== c && s.setAttribute("name", u);
                                var l = s.textContent || ww
                                  , p = this.mapFieldValue(c, l);
                                p !== l && (s.textContent = p)
                            }
                        }
                        return (new XMLSerializer).serializeToString(n)
                    }
                }, {
                    key: "translateBlockType",
                    value: function(e) {
                        return Sw[e] || e
                    }
                }, {
                    key: "handleSelfFlip",
                    value: function(e, t) {
                        var n, r = null == (n = e.fields) ? void 0 : n.options;
                        return t[r || 0] || t[0]
                    }
                }, {
                    key: "handleSetEntityShowHide",
                    value: function(e) {
                        var t = e.fields
                          , n = (null == t ? void 0 : t.sprite) || "?"
                          , r = null == t ? void 0 : t.type
                          , i = xw.set_entity_show_hide
                          , a = r && r in i ? i[r] : i.show
                          , o = this.kittenBcm.theatre.groups;
                        return Object.keys(o).includes(n) && (n = "?"),
                        "\u5c06".concat(n).concat(a)
                    }
                }, {
                    key: "handleSelfAskListen",
                    value: function(e) {
                        var t, n, r = e.fields, i = null == r ? void 0 : r.lang, a = xw.self_ask_listen, o = i && i in a ? a[i] : a["zh-hans"];
                        if (null == (t = e.shadows) ? void 0 : t.text) {
                            var s = (null == (n = (new DOMParser).parseFromString(e.shadows.text, "text/xml").querySelector('field[name="TEXT"]')) ? void 0 : n.textContent) || ww;
                            return o.replace("{text}", s)
                        }
                        return o
                    }
                }, {
                    key: "handleSelfAskRecord",
                    value: function(e) {
                        var t, n, r = xw.self_ask_record;
                        if (null == (t = e.shadows) ? void 0 : t.TEXT) {
                            var i = (null == (n = (new DOMParser).parseFromString(e.shadows.TEXT, "text/xml").querySelector('field[name="TEXT"]')) ? void 0 : n.textContent) || ww;
                            return r.replace("{text}", i)
                        }
                        return r
                    }
                }, {
                    key: "handleChangeVolumeOrRate2",
                    value: function(e) {
                        var t, n, r, i, a = e.fields, o = null == a ? void 0 : a.audio_key, s = null == a ? void 0 : a.increase, c = xw.change_volume_or_rate_2, u = o && o in c ? c[o] : c.volume, l = s && s in c ? c[s] : c.increase, p = ww;
                        (null == (t = e.shadows) ? void 0 : t.audio_value) && (p = (null == (n = (new DOMParser).parseFromString(e.shadows.audio_value, "text/xml").querySelector('field[name="NUM"]')) ? void 0 : n.textContent) || ww);
                        var d = ww;
                        (null == (r = e.shadows) ? void 0 : r.audio) && (d = (null == (i = (new DOMParser).parseFromString(e.shadows.audio, "text/xml").querySelector('field[name="sound_id"]')) ? void 0 : i.textContent) || ww);
                        return "\u5c06\u58f0\u97f3".concat(d).concat(u).concat(l).concat(p)
                    }
                }, {
                    key: "handleSetVolumeOrRate2",
                    value: function(e) {
                        var t, n, r, i, a = e.fields, o = null == a ? void 0 : a.audio_key, s = xw.set_volume_or_rate_2, c = o && o in s ? s[o] : s.volume, u = ww;
                        (null == (t = e.shadows) ? void 0 : t.audio_value) && (u = (null == (n = (new DOMParser).parseFromString(e.shadows.audio_value, "text/xml").querySelector('field[name="NUM"]')) ? void 0 : n.textContent) || ww);
                        var l = ww;
                        (null == (r = e.shadows) ? void 0 : r.audio) && (l = (null == (i = (new DOMParser).parseFromString(e.shadows.audio, "text/xml").querySelector('field[name="sound_id"]')) ? void 0 : i.textContent) || ww);
                        return "\u8bbe\u7f6e\u58f0\u97f3".concat(l).concat(c, "\u5927\u5c0f").concat(u)
                    }
                }, {
                    key: "handleSetLayerWithPen",
                    value: function(e) {
                        var t = e.fields
                          , n = null == t ? void 0 : t.position
                          , r = xw.set_layer_with_pen;
                        return n && n in r ? r[n] : r.above
                    }
                }, {
                    key: "handleSetPenPath",
                    value: function(e) {
                        var t = e.fields
                          , n = null == t ? void 0 : t.point
                          , r = xw.set_pen_path;
                        return n && n in r ? r[n] : r.start_point
                    }
                }, {
                    key: "handleSetFillStyle",
                    value: function(e) {
                        var t = e.fields
                          , n = null == t ? void 0 : t.color;
                        return "".concat(xw.set_fill_style).concat(n)
                    }
                }, {
                    key: "handleCheckScreen",
                    value: function(e) {
                        var t, n, r, i = (null == (t = e.fields) ? void 0 : t.is_stay) || "false", a = ww;
                        (null == (n = e.shadows) ? void 0 : n.screen) && (a = (null == (r = (new DOMParser).parseFromString(e.shadows.screen, "text/xml").querySelector('field[name="scene"]')) ? void 0 : r.textContent) || ww);
                        return xw.check_screen[i].replace("{index}", a)
                    }
                }, {
                    key: "handleEnableVoiceDetection",
                    value: function(e) {
                        var t = e.fields
                          , n = null == t ? void 0 : t.state
                          , r = xw.enable_voice_detection;
                        return n && n in r ? r[n] : r.open
                    }
                }, {
                    key: "handleClone",
                    value: function(e) {
                        var t, n, r, i, a, o = (null == (t = e.fields) ? void 0 : t.sprite) || ww, s = "", c = ww;
                        (null == (n = e.shadows) ? void 0 : n.x) && (s = (null == (r = (new DOMParser).parseFromString(e.shadows.x, "text/xml").querySelector('field[name="NUM"]')) ? void 0 : r.textContent) || "0");
                        (null == (i = e.shadows) ? void 0 : i.y) && (c = (null == (a = (new DOMParser).parseFromString(e.shadows.y, "text/xml").querySelector('field[name="NUM"]')) ? void 0 : a.textContent) || "0");
                        return xw.clone.replace("{sprite_id}", o).replace("{x}", s).replace("{y}", c)
                    }
                }, {
                    key: "handleCalculate",
                    value: function(e, t) {
                        var n, r, i = null == (n = e.shadows) ? void 0 : n.input;
                        if (i)
                            try {
                                var a = (new DOMParser).parseFromString(i, "text/xml").documentElement.getAttribute("id");
                                if (!a)
                                    return "\u6570\u5b66\u8fd0\u7b97";
                                var o = t[a]
                                  , s = null == (r = null == o ? void 0 : o.fields) ? void 0 : r.TEXT;
                                if (s)
                                    return "\u6570\u5b66\u8fd0\u7b97 ".concat(s)
                            } catch (c) {
                                console.error("\u89e3\u6790\u6570\u5b66\u8fd0\u7b97\u5931\u8d25", c)
                            }
                        return "\u6570\u5b66\u8fd0\u7b97"
                    }
                }, {
                    key: "handleSetCameraStatus",
                    value: function(e) {
                        var t, n, r = null !== (t = null == (n = e.fields) ? void 0 : n.status) && void 0 !== t ? t : "true";
                        return xw[e.type]["true" === r ? "true" : "false"]
                    }
                }, {
                    key: "handleSetCameraOpcity",
                    value: function(e) {
                        var t, n = null == (t = e.shadows) ? void 0 : t.opcity;
                        if (n)
                            try {
                                var r = (new DOMParser).parseFromString(n, "text/xml").querySelector('field[name="NUM"]')
                                  , i = null == r ? void 0 : r.textContent;
                                if (i)
                                    return "\u8bbe\u7f6e\u89c6\u9891\u900f\u660e\u5ea6 ".concat(i)
                            } catch (a) {
                                console.error("Error parsing XML:", a)
                            }
                        return "\u8bbe\u7f6e\u89c6\u9891\u900f\u660e\u5ea6"
                    }
                }, {
                    key: "handleGetCameraData",
                    value: function(e) {
                        var t, n, r, i, a, o = null !== (t = null == (r = e.fields) ? void 0 : r.target) && void 0 !== t ? t : "__self", s = null !== (n = null == (i = e.fields) ? void 0 : i.action_type) && void 0 !== n ? n : "motion", c = null == (a = xw[e.type]) ? void 0 : a[s];
                        return c ? c.replace("{entity_id}", "__self" === o ? "\u81ea\u5df1" : o) : "\u81ea\u5df1\u4f4d\u7f6e\u7684\u52a8\u4f5c\u5f3a\u5ea6"
                    }
                }, {
                    key: "handleGetGlasses",
                    value: function(e) {
                        var t, n = null == (t = e.fields) ? void 0 : t.glasses;
                        if (n && xw[e.type]) {
                            var r = n;
                            return xw[e.type][r]
                        }
                        return "\u773c\u955c\u4f69\u6234\u4e3a\u58a8\u955c"
                    }
                }, {
                    key: "handleAutoPlayerRecordScoreAndDeleteActor",
                    value: function(e, t) {
                        var n, r = null == (n = e.fields) ? void 0 : n.val_name;
                        return r ? t.replace("{value}", r) : t
                    }
                }, {
                    key: "handleAutoPlayerUseModelSupervised",
                    value: function(e, t) {
                        var n, r = null == (n = e.fields) ? void 0 : n.model_name;
                        return r ? t.replace("{value}", r) : t
                    }
                }, {
                    key: "handleAutoPlayerTrainSaveRestart",
                    value: function(e) {
                        var t, n, r = null == (t = e.fields) ? void 0 : t.algorithm_name, i = null == (n = e.fields) ? void 0 : n.model_name;
                        if (r && i) {
                            var a = ww;
                            switch (r) {
                            case "backPropagation":
                                a = "\u5411\u540e\u4f20\u64ad\u7b97\u6cd5";
                                break;
                            case "evolution":
                                a = "\u9057\u4f20\u7b97\u6cd5";
                                break;
                            default:
                                a = r
                            }
                            return "\u5982\u679c\u6240\u6709AI\u89d2\u8272\u6b7b\u4ea1\uff1a\u4f7f\u7528".concat(a, "\u4f18\u5316\u6a21\u578b\u5e76\u4fdd\u5b58\u4e3a").concat(i, ",\u91cd\u542fGameAI")
                        }
                        return "\u5982\u679c\u6240\u6709AI\u89d2\u8272\u6b7b\u4ea1\uff1a\u4f18\u5316\u6a21\u578b\u5e76\u4fdd\u5b58,\u91cd\u542fGameAI"
                    }
                }, {
                    key: "handleAutoPlayerUseModelUnsupervised",
                    value: function(e, t) {
                        var n, r, i = null == (n = e.fields) ? void 0 : n.actor_num, a = null == (r = e.fields) ? void 0 : r.model_name;
                        return i && a ? t.replace("{value}", i).replace("{value1}", a) : t
                    }
                }, {
                    key: "handleAutoPlayerInitNewModel",
                    value: function(e) {
                        var t, n, r, i, a, o, s, c = (null == (t = e.fields) ? void 0 : t.model_name) || ww, u = "0", l = "0", p = "0";
                        (null == (n = e.shadows) ? void 0 : n.input) && (u = (null == (r = (new DOMParser).parseFromString(e.shadows.input, "text/xml").querySelector('field[name="NUM"]')) ? void 0 : r.textContent) || "0");
                        (null == (i = e.shadows) ? void 0 : i.output) && (l = (null == (a = (new DOMParser).parseFromString(e.shadows.output, "text/xml").querySelector('field[name="NUM"]')) ? void 0 : a.textContent) || "0");
                        (null == (o = e.shadows) ? void 0 : o.LAYER0) && (p = (null == (s = (new DOMParser).parseFromString(e.shadows.LAYER0, "text/xml").querySelector('field[name="NUM"]')) ? void 0 : s.textContent) || "0");
                        return "\u521d\u59cb\u5316\u65b0\u7684\u6a21\u578b".concat(c, "\u7ed3\u6784\u4e3a\uff1a\u8f93\u5165\u5c42").concat(u, "\uff0c\u8f93\u51fa\u5c42").concat(l, ",\u9690\u85cf\u5c42").concat(p)
                    }
                }, {
                    key: "handleCheckRunningDevice",
                    value: function(e) {
                        var t, n = null == (t = e.fields) ? void 0 : t.device, r = {
                            computer: "\u8fd0\u884c\u8bbe\u5907\u4e3a\u7535\u8111",
                            mobile: "\u8fd0\u884c\u8bbe\u5907\u4e3a\u624b\u673a",
                            tablet: "\u8fd0\u884c\u8bbe\u5907\u4e3a\u5e73\u677f\u7535\u8111"
                        };
                        return n && n in r ? r[n] : r.computer
                    }
                }, {
                    key: "handleWoodBlock",
                    value: function(e, t) {
                        var n, r = (null == (n = e.fields) ? void 0 : n.NAME) || ww, i = e.shadows || {}, a = Object.entries(i).filter((function(e) {
                            return (0,
                            x.Z)(e, 1)[0].startsWith("VAR")
                        }
                        )).sort((function(e, t) {
                            return parseInt(e[0].replace("VAR", "")) - parseInt(t[0].replace("VAR", ""))
                        }
                        ));
                        if (a.length > 0) {
                            var o = a.map((function(e, t) {
                                return "{value".concat(t, "}")
                            }
                            )).join("");
                            return "\u6d77\u9f9f\u51fd\u6570".concat(r).concat(o)
                        }
                        return t.replace("{value}", r)
                    }
                }, {
                    key: "handlePlayVideo",
                    value: function(e, t) {
                        var n, r = (null == (n = e.fields) ? void 0 : n.video) || "?";
                        return t.replace("{video}", r)
                    }
                }, {
                    key: "handleContinuePauseVideo",
                    value: function(e) {
                        var t, n, r = (null == (t = e.fields) ? void 0 : t.video) || "?", i = (null == (n = e.fields) ? void 0 : n.option) || "continue";
                        return xw.continue_pause_video[i].replace("{video}", r)
                    }
                }, {
                    key: "handleShowHideVideo",
                    value: function(e) {
                        var t, n, r = (null == (t = e.fields) ? void 0 : t.video) || "?", i = (null == (n = e.fields) ? void 0 : n.display) || "show";
                        return xw.show_hide_video[i].replace("{video}", r)
                    }
                }, {
                    key: "handleRankingShowHide",
                    value: function(e) {
                        var t, n = (null == (t = e.fields) ? void 0 : t.VAL) || "show";
                        return xw.is_ranking_show_hide[n]
                    }
                }, {
                    key: "handleShowRanking",
                    value: function(e) {
                        var t, n = (null == (t = e.fields) ? void 0 : t.VAR) || "?";
                        return "\u663e\u793a".concat(n, "\u6392\u884c\u699c")
                    }
                }, {
                    key: "createMutationForBlockType",
                    value: function(e, t) {
                        var n = xw[e.type];
                        switch (e.type) {
                        case "self_flip":
                            n = this.handleSelfFlip(e, n);
                            break;
                        case "set_entity_show_hide":
                            n = this.handleSetEntityShowHide(e);
                            break;
                        case "self_ask_listen":
                            n = this.handleSelfAskListen(e);
                            break;
                        case "self_ask_record":
                            n = this.handleSelfAskRecord(e);
                            break;
                        case "change_volume_or_rate_2":
                            n = this.handleChangeVolumeOrRate2(e);
                            break;
                        case "set_volume_or_rate_2":
                            n = this.handleSetVolumeOrRate2(e);
                            break;
                        case "set_layer_with_pen":
                            n = this.handleSetLayerWithPen(e);
                            break;
                        case "set_pen_path":
                            n = this.handleSetPenPath(e);
                            break;
                        case "set_fill_style":
                            n = this.handleSetFillStyle(e);
                            break;
                        case "check_screen":
                            n = this.handleCheckScreen(e);
                            break;
                        case "enable_voice_detection":
                            n = this.handleEnableVoiceDetection(e);
                            break;
                        case "clone":
                            n = this.handleClone(e);
                            break;
                        case "calculate":
                            n = this.handleCalculate(e, t);
                            break;
                        case "set_camera_status":
                            n = this.handleSetCameraStatus(e);
                            break;
                        case "set_camera_opcity":
                            n = this.handleSetCameraOpcity(e);
                            break;
                        case "get_camera_data":
                            n = this.handleGetCameraData(e);
                            break;
                        case "get_glasses":
                            n = this.handleGetGlasses(e);
                            break;
                        case "auto_player_record_score_and_delete_actor":
                            n = this.handleAutoPlayerRecordScoreAndDeleteActor(e, n);
                            break;
                        case "auto_player_use_model_supervised":
                            n = this.handleAutoPlayerUseModelSupervised(e, n);
                            break;
                        case "auto_player_train_save_restart":
                            n = this.handleAutoPlayerTrainSaveRestart(e);
                            break;
                        case "auto_player_use_model_unsupervised":
                            n = this.handleAutoPlayerUseModelUnsupervised(e, n);
                            break;
                        case "auto_player_init_new_model":
                            n = this.handleAutoPlayerInitNewModel(e);
                            break;
                        case "check_running_device":
                            n = this.handleCheckRunningDevice(e);
                            break;
                        case "wood_block_get":
                        case "wood_block_set":
                            n = this.handleWoodBlock(e, n);
                            break;
                        case "play_video":
                        case "play_video_until_end":
                            n = this.handlePlayVideo(e, n);
                            break;
                        case "continue_pause_video":
                            n = this.handleContinuePauseVideo(e);
                            break;
                        case "show_hide_video":
                            n = this.handleShowHideVideo(e);
                            break;
                        case "is_ranking_show_hide":
                            n = this.handleRankingShowHide(e);
                            break;
                        case "show_ranking":
                            n = this.handleShowRanking(e)
                        }
                        return '<mutation xmlns="'.concat("http://www.w3.org/1999/xhtml", '" items="0">').concat(n, "</mutation>")
                    }
                }]),
                e
            }()
              , Dw = !1
              , Ow = function e(t) {
                var n;
                if ("procedures_2_return_value" === t.type && (null == (n = t.inputs) ? void 0 : n.VALUE))
                    return t;
                if (t.inputs)
                    for (var r = 0, i = Object.values(t.inputs); r < i.length; r++) {
                        var a = e(i[r]);
                        if (a)
                            return a
                    }
                if (t.statements)
                    for (var o = 0, s = Object.values(t.statements); o < s.length; o++) {
                        var c = e(s[o]);
                        if (c)
                            return c
                    }
                return t.next ? e(t.next) : null
            };
            function Lw(e, t) {
                var n = e.block_data_json
                  , r = function(e) {
                    var t = []
                      , n = [];
                    return e.forEach((function(e) {
                        "procedures_2_defnoreturn" === e.type ? t.push(e) : n.push(e)
                    }
                    )),
                    {
                        procedureBlocks: t,
                        otherBlocks: n
                    }
                }(t.parseBlock({
                    blocks: n.blocks,
                    connections: n.connections,
                    comments: n.comments
                }).filter((function(e) {
                    return "" !== e.type
                }
                )))
                  , i = r.procedureBlocks
                  , a = r.otherBlocks;
                return e.nekoBlockJsonList = a,
                i
            }
            function Pw(e) {
                var t;
                "procedures_2_return_value" !== e.type || (null == (t = e.inputs) ? void 0 : t.VALUE) || (e.inputs = (0,
                N.Z)((0,
                N.Z)({}, e.inputs), {}, {
                    VALUE: {
                        type: "math_number",
                        id: kw(),
                        is_shadow: !0,
                        fields: {
                            NUM: "0"
                        },
                        field_constraints: {
                            NUM: {
                                min: null,
                                max: null,
                                precision: 0,
                                mod: null
                            }
                        },
                        is_output: !0,
                        parent_id: e.id,
                        shield: !1
                    }
                }),
                e.shadows = (0,
                N.Z)((0,
                N.Z)({}, e.shadows), {}, {
                    VALUE: '<shadow type="math_number">\n        <field name="TEXT" constraints="-Infinity,Infinity,0," allow_text="true">0</field>\n      </shadow>'
                })),
                e.inputs && Object.values(e.inputs).forEach(Pw),
                e.statements && Object.values(e.statements).forEach(Pw),
                e.next && Pw(e.next)
            }
            function jw(e) {
                var t, n;
                "procedures_2_return_value" === e.type && (null == (t = e.inputs) || delete t.VALUE,
                null == (n = e.shadows) || delete n.VALUE),
                e.inputs && Object.values(e.inputs).forEach(jw),
                e.statements && Object.values(e.statements).forEach(jw),
                e.next && jw(e.next)
            }
            function Rw(e, t) {
                var n, r, i, a = (null == (n = e.fields) ? void 0 : n.NAME) || "", o = [{
                    id: kw(),
                    type: "Label",
                    name: a
                }];
                if (e.inputs) {
                    Object.entries(e.inputs).filter((function(e) {
                        var t = (0,
                        x.Z)(e, 2)
                          , n = t[0]
                          , r = t[1];
                        return n.startsWith("PARAMS") && "procedures_2_stable_parameter" === r.type
                    }
                    )).sort((function(e, t) {
                        var n = (0,
                        x.Z)(e, 1)[0]
                          , r = (0,
                        x.Z)(t, 1)[0];
                        return parseInt(n.replace("PARAMS", ""), 10) - parseInt(r.replace("PARAMS", ""), 10)
                    }
                    )).forEach((function(e) {
                        var t, n = (0,
                        x.Z)(e, 2), r = (n[0],
                        n[1]);
                        (null == (t = r.fields) ? void 0 : t.param_name) && o.push({
                            id: r.id,
                            type: "String",
                            name: r.fields.param_name
                        })
                    }
                    )),
                    (null == (r = e.inputs) ? void 0 : r.STACK) && (e.statements = {
                        STACK: e.inputs.STACK
                    },
                    delete e.inputs.STACK);
                    (null == (i = null == e ? void 0 : e.statements) ? void 0 : i.STACK) && function e(t) {
                        t.inputs && Object.values(t.inputs).forEach((function(t) {
                            var n;
                            if ("procedures_2_parameter" === t.type) {
                                var r = null == (n = o.find((function(e) {
                                    return e.name === t.fields.param_name
                                }
                                ))) ? void 0 : n.id;
                                r ? (t.mutation = '<mutation xmlns="http://www.w3.org/1999/xhtml" id="'.concat(r, '"></mutation>'),
                                t.is_output = !0) : console.warn("\u627e\u4e0d\u5230\u540d\u4e3a ".concat(t.fields.param_name, " \u7684\u53c2\u6570"))
                            }
                            t.inputs && Object.values(t.inputs).forEach(e),
                            t.statements && Object.values(t.statements).forEach(e),
                            t.next && e(t.next)
                        }
                        )),
                        t.next && e(t.next),
                        t.statements && Object.values(t.statements).forEach(e)
                    }(e.statements.STACK),
                    e.inputs && 0 === Object.keys(e.inputs).length && delete e.inputs
                }
                var s = o.map((function(e) {
                    return '<arg id="'.concat(e.id, '" name="').concat(e.name, '" type="').concat(e.type, '"></arg>')
                }
                )).join("");
                e = function e(t) {
                    var n = Bw(t);
                    return n.inputs && (n.inputs = Md(n.inputs, (function(t) {
                        return e(t)
                    }
                    ))),
                    n.statements && (n.statements = Md(n.statements, (function(t) {
                        return e(t)
                    }
                    ))),
                    n.next && (n.next = e(n.next)),
                    n
                }(e);
                var c = (0,
                N.Z)((0,
                N.Z)({}, e), {}, {
                    mutation: '<mutation xmlns="http://www.w3.org/1999/xhtml">'.concat(s, "</mutation>"),
                    fields: {
                        NAME: e.id
                    },
                    deletable: !1,
                    editable: !1
                });
                if (Ow(e)) {
                    var u = (0,
                    N.Z)((0,
                    N.Z)({}, c), {}, {
                        id: kw()
                    });
                    Pw(u);
                    var l = hp(e);
                    jw(l),
                    t[l.id] = {
                        id: l.id,
                        name: a,
                        type: Nw.NORMAL,
                        params: o,
                        nekoBlockJsonList: [l]
                    },
                    t[u.id] = {
                        id: u.id,
                        name: a,
                        type: Nw.ROUND,
                        params: o,
                        nekoBlockJsonList: [u]
                    }
                } else
                    t[e.id] = {
                        id: e.id,
                        name: a,
                        type: Nw.NORMAL,
                        params: o,
                        nekoBlockJsonList: [c]
                    }
            }
            function zw(e, t) {
                if (e.nekoBlockJsonList) {
                    var n = function e(n) {
                        var r = function(e, t) {
                            var n;
                            if ("procedures_2_callnoreturn" !== e.type && "procedures_2_callreturn" !== e.type)
                                return e;
                            var r = null == (n = e.fields) ? void 0 : n.NAME
                              , i = Object.values(t).find((function(e) {
                                return e.name === r
                            }
                            ));
                            if (!i)
                                return e;
                            var a = (0,
                            N.Z)((0,
                            N.Z)({}, e), {}, {
                                fields: {
                                    NAME: i.id
                                },
                                mutation: '<mutation xmlns="http://www.w3.org/1999/xhtml" def_id="'.concat(i.id, '" name="').concat(i.id, '" type="').concat(i.type, '">'),
                                shadows: {
                                    NAME: ""
                                }
                            });
                            if (i.params) {
                                var o = a.mutation;
                                i.params.forEach((function(e, t) {
                                    if (o += '<arg id="'.concat(e.id, '" content="').concat(e.name, '" type="').concat(e.type, '"></arg>'),
                                    "String" === e.type) {
                                        var n = "ARG".concat(t - 1);
                                        a.shadows[e.id] = '<shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="'.concat(kw(), '" visible="visible"><field constraints="-Infinity,Infinity,0," allow_text="true" name="NUM">0</field></shadow>'),
                                        a.inputs || (a.inputs = {}),
                                        a.inputs && a.inputs[n] && (a.inputs[e.id] = a.inputs[n])
                                    }
                                }
                                )),
                                o += "</mutation>",
                                a.mutation = o
                            }
                            return a
                        }(n = Bw(n), t);
                        return r.inputs && (r.inputs = Md(r.inputs, (function(t) {
                            return e(t)
                        }
                        ))),
                        r.statements && (r.statements = Md(r.statements, (function(t) {
                            return e(t)
                        }
                        ))),
                        r.next && (r.next = e(r.next)),
                        r
                    };
                    e.nekoBlockJsonList = e.nekoBlockJsonList.map((function(e) {
                        return n(e)
                    }
                    ))
                }
            }
            function Bw(e) {
                var t, n, r, i, a, o, s, c, u, l, p;
                if ("shadow_number" === e.type && e.inputs && e.inputs.VALUE) {
                    var d = Bw(e.inputs.VALUE);
                    return "math_number" !== d.type || e.parent_id ? (0,
                    N.Z)((0,
                    N.Z)({}, d), {}, {
                        location: e.location
                    }) : {
                        type: "bcm_translator_text_return_value_block",
                        id: e.id,
                        location: e.location,
                        shield: !1,
                        mutation: '<mutation xmlns="http://www.w3.org/1999/xhtml" items="0">\u5c55\u793a\u6570\u5b57'.concat(e.inputs.VALUE.fields.NUM, "</mutation>"),
                        shadows: e.shadows
                    }
                }
                var h;
                if ("appearance_of_sprite" === e.type && (null == (t = e.fields) ? void 0 : t.attribute) && (h = e.fields.attribute,
                /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(h)))
                    return e.parent_id ? {
                        type: "variables_get",
                        id: e.id,
                        location: e.location,
                        shield: !1,
                        mutation: "",
                        fields: {
                            variable: e.fields.attribute
                        },
                        parent_id: e.parent_id
                    } : {
                        type: "bcm_translator_text_return_value_block",
                        id: e.id,
                        location: e.location,
                        shield: !1,
                        mutation: '<mutation xmlns="http://www.w3.org/1999/xhtml" items="0">\u81ea\u5df1\u7684\u53d8\u91cf'.concat(null == (n = e.fields) ? void 0 : n.attribute, "</mutation>"),
                        shadows: {}
                    };
                ["self_go_forward", "self_move_to", "self_set_position_x", "self_set_position_y", "self_glide_coordinate_x", "self_glide_coordinate_y", "self_glide_to", "self_change_coordinate_x", "self_change_coordinate_y"].includes(e.type) && Dw && ("self_move_to" === e.type || "self_glide_to" === e.type ? ["x", "y"] : ["value", "steps"]).forEach((function(t) {
                    var n, r = null == (n = e.inputs) ? void 0 : n[t];
                    if (r) {
                        var i = kw()
                          , a = {
                            type: "math_arithmetic",
                            id: i,
                            shadows: {
                                A: '<shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="'.concat(kw(), '" visible="visible"><field constraints="-Infinity,Infinity,0," name="NUM">1</field></shadow>'),
                                B: '<shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="'.concat(kw(), '" visible="visible"><field constraints="-Infinity,Infinity,0," name="NUM">1</field></shadow>')
                            },
                            fields: {
                                type: "divide"
                            },
                            is_output: !0,
                            parent_id: e.id,
                            shield: !1,
                            inputs: {
                                A: (0,
                                N.Z)((0,
                                N.Z)({}, r), {}, {
                                    id: kw(),
                                    parent_id: i
                                }),
                                B: {
                                    type: "math_number",
                                    id: kw(),
                                    is_shadow: !0,
                                    fields: {
                                        NUM: "1.3"
                                    },
                                    field_constraints: {
                                        NUM: {
                                            min: null,
                                            max: null,
                                            precision: 0,
                                            mod: null
                                        }
                                    },
                                    is_output: !0,
                                    parent_id: i,
                                    shield: !1
                                }
                            }
                        };
                        e.inputs[t] = a
                    }
                }
                ));
                if ("set_camera_alpha" === e.type) {
                    var f = null == (r = e.inputs) ? void 0 : r.camera_alpha;
                    if (f) {
                        var m = kw()
                          , g = {
                            type: "math_arithmetic",
                            id: m,
                            location: [f.location[0] + 150, f.location[1] + 20],
                            shadows: {
                                A: '<shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="'.concat(kw(), '" visible="visible"><field constraints="-Infinity,Infinity,0," name="NUM">1</field></shadow>'),
                                B: '<shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="'.concat(kw(), '" visible="visible"><field constraints="-Infinity,Infinity,0," name="NUM">1</field></shadow>')
                            },
                            fields: {
                                type: "minus"
                            },
                            is_output: !0,
                            parent_id: e.id,
                            shield: !1,
                            inputs: {
                                A: {
                                    type: "math_number",
                                    id: kw(),
                                    is_shadow: !0,
                                    fields: {
                                        NUM: "100"
                                    },
                                    field_constraints: {
                                        NUM: {
                                            min: null,
                                            max: null,
                                            precision: 0,
                                            mod: null
                                        }
                                    },
                                    is_output: !0,
                                    parent_id: m,
                                    shield: !1
                                },
                                B: (0,
                                N.Z)((0,
                                N.Z)({}, f), {}, {
                                    id: kw(),
                                    parent_id: m
                                })
                            }
                        };
                        e.inputs.camera_alpha = g
                    }
                }
                if ("list_append" === e.type && "first" === (null == (i = e.fields) ? void 0 : i.POS) && (null == (s = null == (o = null == (a = null == e ? void 0 : e.inputs) ? void 0 : a.list_item_value) ? void 0 : o.fields) ? void 0 : s.NUM) && (null == (l = null == (u = null == (c = null == e ? void 0 : e.inputs) ? void 0 : c.list_item_value) ? void 0 : u.fields) ? void 0 : l.list) && (e.type = "bcm_translator_text_execution_block",
                e.disabled = !0,
                e.mutation = '<mutation xmlns="http://www.w3.org/1999/xhtml" items="0">\u6dfb\u52a0  '.concat(e.inputs.list_item_value.fields.NUM, " \u5230 ").concat(e.inputs.list.fields.list, " \u9996\u9879</mutation>"),
                e.shadows = {
                    TITLE_HEAD: ""
                }),
                ("repeat_forever" === e.type || "repeat_n_times" === e.type || "repeat_forever_until" === e.type) && (null == (p = e.statements) ? void 0 : p.DO)) {
                    !function e(t) {
                        t && ("play_words_audio" !== t.type && "play_audio" !== t.type || (t.disabled = !0),
                        t.statements && Object.values(t.statements).forEach(e),
                        t.next && e(t.next))
                    }(e.statements.DO)
                }
                return e
            }
            var Uw = {
                bcm_version: "0.16.2",
                user_db_version: "1",
                qn_path: "https://static.codemao.cn/",
                qn_build_path: "https://kn-cdn.codemao.cn/",
                qn_key_prefix: "nemo/22/res/",
                qn_key_prefix_midi: "nemo/midi/res/2/",
                sentry_dsn: "https://fc87cb4df95f40fc89fbc96995b529d4@sentry.codemao.cn/7",
                stage_size: {
                    portrait: {
                        width: 562,
                        height: 900
                    },
                    landscape: {
                        width: 900,
                        height: 562
                    }
                }
            };
            function Zw() {
                return Uw
            }
            function Fw(e) {
                var t = e.procedures && e.procedures.procedure_dict || {};
                return cd((0,
                N.Z)((0,
                N.Z)((0,
                N.Z)({}, e.actors.actors_dict), e.scenes.scenes_dict), t), (function(e) {
                    e.blocksXML && (e.blocksXML = function(e) {
                        var t = (new DOMParser).parseFromString("<div>".concat(e, "</div>"), "text/xml").firstElementChild;
                        if (!t)
                            return;
                        return cd(t.querySelectorAll('block[type="controls_if"]'), (function(e) {
                            var t, n = "mutation" === (null == (t = null == e ? void 0 : e.firstElementChild) ? void 0 : t.tagName);
                            if (e && !n) {
                                var r = document.createElement("mutation");
                                r.setAttribute("else", "1"),
                                e.insertAdjacentElement("afterbegin", r)
                            }
                        }
                        )),
                        t.innerHTML
                    }(e.blocksXML))
                }
                )),
                {
                    new_bcm: e,
                    new_version: "0.15.0"
                }
            }
            var Hw = Zw();
            function Gw() {
                for (var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", t = e.length, n = [], r = 0; r < 20; r++)
                    n[r] = e.charAt(Math.random() * t);
                return n.join("")
            }
            var Yw = function(e) {
                return function(e) {
                    var t = e.actors.actors_dict;
                    Object.keys(t).forEach((function(e) {
                        var n = t[e];
                        n.rotation && (n.rotation *= -1)
                    }
                    ))
                }(e),
                Qw(e)
            }
              , Qw = function(e) {
                return function(e) {
                    var t = e.procedures && e.procedures.procedure_dict || {}
                      , n = (0,
                    N.Z)((0,
                    N.Z)((0,
                    N.Z)({}, e.actors.actors_dict), e.scenes.scenes_dict), t);
                    cd(n, (function(e) {
                        e.blocksXML && (e.blocksXML = e.blocksXML.replace(/<block([^<]*?) type="audio__stop_all_audios"([^<]*?)>(<field.*?name="audio".*?>.*?<\/field>)?/g, (function(e, t, n) {
                            return '<block type="audio__stop_all_audios"'.concat(t, '><value name="audio"><shadow type="sound_get_all" id="').concat(Gw(), '" inline="true" visible="visible">').concat(n || '<field name="audio">__all_sounds</field>', "</shadow></value>")
                        }
                        )).replace(/<block([^<]*?) type="audio__play_audio"([^<]*?)>(<field.*?name="audio".*?>.*?<\/field>)/g, (function(e, t, n) {
                            return '<block type="audio__play_audio"'.concat(t, '><value name="audio"><shadow type="sound_get" id="').concat(Gw(), '" inline="true" visible="visible">').concat(n, "</shadow></value>")
                        }
                        )).replace(/<block([^<]*?) type="audio__play_audio_and_wait"([^<]*?)>(<field.*?name="audio".*?>.*?<\/field>)/g, (function(e, t, n) {
                            return '<block type="audio__play_audio_and_wait"'.concat(t, '><value name="audio"><shadow type="sound_get" id="').concat(Gw(), '" inline="true" visible="visible">').concat(n, "</shadow></value>")
                        }
                        )))
                    }
                    ))
                }(e),
                function(e) {
                    var t = e.variable.variable_dict;
                    if (!t)
                        return;
                    Object.keys(t).forEach((function(e) {
                        var n = t[e];
                        if (n.position) {
                            var r = Hw.stage_size.portrait;
                            n.position.x = n.position.x - r.width / 2,
                            n.position.y = -n.position.y + r.height / 2
                        }
                    }
                    ))
                }(e),
                {
                    new_bcm: e,
                    new_version: "0.9.4"
                }
            };
            function Ww(e, t) {
                var n = e.split(".")
                  , r = t.split(".");
                if (3 !== n.length || 3 !== r.length)
                    throw new Error("bcm version is illegal");
                for (var i = 0; i < 3; i++)
                    if (n[i] !== r[i])
                        return parseInt(n[i]) < parseInt(r[i]);
                return !1
            }
            function Vw(e) {
                return Ww(e, "0.9.4") ? "0.9.3" : Ww(e, "0.15.0") ? "0.14.0" : e
            }
            var Kw = function(e) {
                return e.DEFAULT = "default",
                e.ICON_MEDAL = "icon_medal",
                e.ICON_HEART = "icon_heart",
                e.ICON_COIN = "icon_coin",
                e.ICON_HOURGLASS = "icon_hourglass",
                e.TEXT = "text",
                e
            }(Kw || {})
              , Xw = function(e) {
                return e.NORMAL = "NORMAL",
                e.HEXAGONAL = "HEXAGONAL",
                e.ROUND = "ROUND",
                e
            }(Xw || {})
              , Jw = {
                x: 100,
                y: 50
            }
              , qw = {
                start_on_click: "on_running_group_activated",
                self_on_tap: "sprite_on_tap",
                on_phone_shake: "bcm_translator_text_event_block",
                on_receive_sound: "bcm_translator_text_event_block",
                on_phone_tilt: "bcm_translator_text_event_block",
                on_swipe: "on_swipe",
                when: "when",
                self_listen: "self_listen",
                self_broadcast: "self_broadcast",
                on_running_group_activated: "on_running_group_activated",
                set_scene_by_index: "switch_to_screen",
                scenes_index_get: "get_screens",
                set_scene_transition: "set_screen_transition",
                start_as_a_mirror: "start_as_a_mirror",
                mirror: "mirror",
                dispose: "dispose_clone",
                get_current_clone_index: "get_current_clone_index",
                get_clone_num: "get_clone_num",
                get_clone_index_property: "get_clone_index_property",
                stop: "stop",
                restart: "restart",
                styles_index_get: "get_styles",
                style_of_sprite: "style_of_sprite",
                repeat_forever: "repeat_forever",
                repeat_n_times: "repeat_n_times",
                repeat_forever_until: "repeat_forever_until",
                controls_if: "controls_if",
                break: "break",
                wait: "wait",
                wait_until: "wait_until",
                controls_if_no_else: "controls_if",
                self_go_forward: "self_go_forward",
                self_move_specify: "self_move_specify",
                self_move_specify_sprite: "self_move_specify_sprite",
                self_move_to: "self_move_to",
                self_set_position_x: "self_set_position_x",
                self_set_position_y: "self_set_position_y",
                self_change_position_x: "self_change_coordinate_x",
                self_change_position_y: "self_change_coordinate_y",
                self_bounce_off_edge: "self_bounce_off_edge",
                self_glide_to: "self_glide_to",
                self_glide_position_x: "self_glide_coordinate_x",
                self_glide_position_y: "self_glide_coordinate_y",
                self_rotate: "self_rotate",
                self_rotate_around: "self_rotate_around",
                self_set_rotation_type: "self_set_rotation_type",
                self_point_towards: "self_point_towards",
                self_face_to: "self_face_to",
                self_face_to_sprite: "self_face_to_sprite",
                self_set_draggable: "self_set_draggable",
                self_set_role_camp: "self_set_role_camp",
                set_costume_by_index: "set_sprite_style",
                self_next_or_previous_style: "self_prev_next_style",
                self_translate_animation: "self_stress_animation",
                self_appear: "self_appear",
                self_dialog_wait: "self_dialog_wait",
                self_disappear: "self_disappear",
                self_gradually_appear: "self_gradually_appear",
                self_gradually_disappear: "self_gradually_disappear",
                self_gradually_show_hide: "self_gradually_show_hide",
                get_answer: "get_answer",
                set_scale: "set_scale",
                show_stage_dialog: "create_stage_dialog",
                mobile_change_actor_layer: "set_top_bottom_layer",
                self_clear_effects: "clear_all_effects",
                get_choice_or_index: "get_choice_and_index",
                self_flip: "bcm_translator_text_execution_block",
                self_dialog: "self_dialog",
                ask_and_choose: "ask_and_choose",
                self_change_scale: "self_change_scale",
                self_set_effect_2: "self_set_effect",
                self_change_effect_2: "self_change_effect",
                self_ask: "self_ask",
                add_width_height_scale: "add_width_height_scale",
                set_width_height_scale: "set_width_height_scale",
                audio__play_audio: "play_audio",
                audio__play_audio_and_wait: "play_audio_and_wait",
                audio__stop_all_audios: "stop_audio",
                audio__play_words_audio: "play_words_audio",
                audio__play_words_audio_wait: "play_word_audio_wait",
                self_pen_down: "self_pen_down",
                clear_drawing: "clear_drawing",
                self_pen_up: "self_pen_up",
                self_set_pen_size: "self_set_pen_size",
                self_change_pen_color_property: "self_change_pen_color_property",
                self_set_pen_color_property: "self_set_pen_color_property",
                self_set_pen_color: "self_set_pen_color",
                self_change_pen_size: "self_change_pen_size",
                set_fill_style: "bcm_translator_text_execution_block",
                set_fill_path: "bcm_translator_text_execution_block",
                stamp: "stamp",
                sound_get: "get_play_audio",
                sound_get_all: "get_stop_audio",
                mouse_down: "mouse_down",
                bump: "bump_into",
                bump_into_color: "bump_into_color",
                get_mouse_info: "get_mouse_info",
                self_out_of_boundary: "out_of_boundary",
                check_sence: "bcm_translator_text_return_boolean_block",
                get_time: "get_time",
                get_orientation: "get_orientation",
                mobile__set_timer: "set_timer_state",
                coordinate_of_sprite: "coordinate_of_sprite",
                mobile__get: "appearance_of_sprite",
                mobile__get_voice_volume: "get_voice_volume",
                mobile__timer_value: "timer",
                self_distance_to: "distance_to",
                mobile__show_timer: "show_hide_timer",
                get_stage_info: "get_stage_info",
                variables_set: "variables_set",
                change_variable: "change_variables",
                show_hide_variable: "show_hide_variables",
                variables_get: "variables_get",
                cloud_variables_set: "variables_set",
                change_cloud_variable: "change_variables",
                show_hide_cloud_variable: "show_hide_variables",
                cloud_variables_get: "variables_get",
                lists_append: "list_append",
                lists_insert_value: "list_insert_value",
                lists_delete: "delete_list_item",
                lists_get_value: "list_item",
                lists_length: "list_length",
                show_hide_list: "show_hide_list",
                lists_copy: "list_copy",
                lists_index_of: "list_index_of",
                lists_is_exist: "list_is_exist",
                lists_replace: "replace_list_item",
                list_get: "list_get",
                lists_get: "pure_list_get",
                math_arithmetic_common: "math_arithmetic",
                math_arithmetic_power: "math_arithmetic",
                random: "random_num",
                math_number_property: "math_number_property",
                divisible_by: "divisible_by",
                logic_compare: "logic_compare",
                math_modulo: "math_modulo",
                logic_boolean: "logic_boolean",
                logic_operation: "logic_operation",
                logic_negate: "logic_negate",
                math_trig_common: "math_trig",
                math_trig_arc: "math_trig",
                mobile__text: "text_join",
                math_round: "math_round",
                text_length: "text_length",
                text_char_at: "text_select",
                text_contain: "text_contain",
                text_split: "text_split",
                text_join: "text_join",
                math_single: "math_function",
                get_split_options: "text",
                microbit_button_when: "microbit_button_when",
                microbit_logo_when: "microbit_logo_when",
                microbit_button_is_pressed: "microbit_button_is_pressed",
                microbit_logo_is_pressed: "microbit_logo_is_pressed",
                microbit_light_level: "microbit_light_level",
                microbit_is_gesture: "microbit_is_gesture",
                microbit_temperature: "microbit_temperature",
                microbit_accelerometer: "microbit_accelerometer",
                microbit_magnetometer: "microbit_magnetometer",
                microbit_rotatio: "microbit_rotatio",
                microbit_sound_level: "microbit_sound_level",
                microbit_compass_heading: "microbit_compass_heading",
                microbit_led_show_text: "microbit_led_show_text",
                microbit_led_show_icon: "microbit_led_show_icon",
                microbit_led_show_custom: "microbit_led_show_custom",
                microbit_led_show_number: "microbit_led_show_number",
                microbit_led_plot_graph: "microbit_led_plot_graph",
                microbit_led_is_plot: "microbit_led_is_plot",
                microbit_led_unplot: "microbit_led_unplot",
                microbit_led_clear: "microbit_led_clear",
                microbit_led_toggle: "microbit_led_toggle",
                microbit_led_plot: "microbit_led_plot",
                microbit_play_melody: "microbit_play_melody",
                microbit_play_tone_by_beats: "microbit_play_tone_by_beats",
                microbit_pause_by_beats: "microbit_pause_by_beats",
                microbit_set_volume: "microbit_set_volume",
                microbit_stop: "microbit_stop",
                microbit_set_bpm: "microbit_set_bpm",
                microbit_get_volume: "microbit_get_volume",
                microbit_change_bpm: "microbit_change_bpm",
                microbit_pin_when: "microbit_pin_when",
                microbit_pin_digital_write: "microbit_pin_digital_write",
                microbit_pin_digital_read: "microbit_pin_digital_read",
                microbit_pin_analog_write: "microbit_pin_analog_write",
                microbit_pin_analog_read: "microbit_pin_analog_read",
                microbit_servo_set_pulse: "microbit_servo_set_pulse",
                microbit_math_map: "microbit_math_map",
                microbit_pin_is_pressed: "microbit_pin_is_pressed",
                microbit_servo_set_angle_360: "microbit_servo_set_angle_270",
                procedures_2_callreturn: "procedures_2_callreturn",
                procedures_2_callnoreturn: "procedures_2_callnoreturn",
                procedures_2_defnoreturn: "procedures_2_defnoreturn",
                procedures_2_parameter: "procedures_2_parameter",
                procedures_2_return_value: "procedures_2_return_value",
                user_id_get: "user_id_get",
                username_get: "username_get",
                show_ranking: "bcm_translator_text_execution_block",
                midi__on_play_note: "bcm_translator_text_event_block",
                midi__set_program: "bcm_translator_text_execution_block",
                midi__set_speed_rate: "bcm_translator_text_execution_block",
                midi__on_play_section: "bcm_translator_text_event_block",
                midi__play_section: "bcm_translator_text_execution_block",
                midi__get_section_notes: "bcm_translator_text_return_value_block",
                midi__get_playing_column: "bcm_translator_text_return_value_block",
                midi__get_bpm: "bcm_translator_text_return_value_block",
                midi_get: "bcm_translator_text_return_value_block",
                midi_get_all: "bcm_translator_text_execution_block",
                midi_get_note: "bcm_translator_text_execution_block",
                program: "bcm_translator_text_return_value_block",
                hide_ranking: "bcm_translator_text_execution_block",
                is_ranking_show_hide: "bcm_translator_text_return_boolean_block",
                connected_users_get: "bcm_translator_text_return_value_block"
            }
              , $w = {
                on_phone_shake: "\u5f53\u624b\u673a\u88ab\u6447\u6643",
                on_phone_tilt: {
                    up: "\u5f53\u624b\u673a\u5411\u4e0a\u503e\u659c",
                    down: "\u5f53\u624b\u673a\u5411\u4e0b\u503e\u659c",
                    left: "\u5f53\u624b\u673a\u5411\u5de6\u503e\u659c",
                    right: "\u5f53\u624b\u673a\u5411\u53f3\u503e\u659c"
                },
                on_receive_sound: "\u5f53\u624b\u673a\u542c\u5230\u58f0\u54cd",
                self_flip: {
                    0: "\u4e0a\u4e0b\u7ffb\u8f6c",
                    1: "\u5de6\u53f3\u7ffb\u8f6c"
                },
                set_fill_style: "\u8bbe\u7f6e\u586b\u5145\u989c\u8272",
                set_fill_path: {
                    base: "\u8bbe\u7f6e\u5f53\u524d\u4e3a\u586b\u5145",
                    start: "\u8bbe\u7f6e\u5f53\u524d\u4e3a\u586b\u5145\u8d77\u70b9",
                    end: "\u8bbe\u7f6e\u5f53\u524d\u4e3a\u586b\u5145\u7ec8\u70b9"
                },
                check_sence: {
                    false: {
                        __previous_scene: "\u79bb\u5f00\u5c4f\u5e55\u4e0a\u4e00\u5c4f",
                        __next_scene: "\u79bb\u5f00\u5c4f\u5e55\u4e0b\u4e00\u5c4f",
                        default: "\u79bb\u5f00\u5c4f\u5e55 {index}"
                    },
                    true: {
                        default: "\u7559\u5728\u5c4f\u5e55 {index}",
                        __previous_scene: "\u7559\u5728\u5c4f\u5e55\u4e0a\u4e00\u5c4f",
                        __next_scene: "\u7559\u5728\u5c4f\u5e55\u4e0b\u4e00\u5c4f"
                    }
                },
                logic_boolean: {
                    TRUE: "\u6210\u7acb",
                    FALSE: "\u4e0d\u6210\u7acb"
                },
                show_ranking: {
                    positive: "\u663e\u793a\u6b63\u5e8f\u4e91\u6392\u884c\u699c",
                    reverse: "\u663e\u793a\u5012\u5e8f\u4e91\u6392\u884c\u699c"
                },
                midi__on_play_note: "\u5f53 MIDI \u97f3\u4e50{midi_get}\u64ad\u653e\u97f3\u7b26{midi_get_note}",
                midi__set_program: "\u8bbe\u7f6e MIDI \u97f3\u4e50{midi_get}\u97f3\u8272{program}",
                midi__set_speed_rate: "\u8bbe\u7f6e MIDI \u97f3\u4e50\u64ad\u653e\u901f\u7387{rate}\u500d",
                midi__on_play_section: "\u6bcf\u5f53 MIDI \u97f3\u4e50{midi_get}\u64ad\u653e{column}\u5217\u97f3\u7b26",
                midi__play_section: "\u64ad\u653e MIDI \u97f3\u4e50{midi_get}\u7b2c{column}\u5217\u97f3\u7b26",
                midi__get_section_notes: "MIDI \u97f3\u4e50{midi_get}\u7b2c{column}\u5217\u97f3\u7b26",
                midi__get_playing_column: "MIDI \u97f3\u4e50{midi_get}\u5f53\u524d\u64ad\u653e\u5217\u6570",
                midi__get_bpm: "MIDI \u97f3\u4e50{midi_get}\u8282\u62cd",
                midi_get: "MIDI \u97f3\u4e50",
                midi_get_all: "\u4efb\u610f MIDI \u97f3\u4e50",
                midi_get_note: "\u97f3\u7b26",
                program: "\u97f3\u8272",
                user_id_get: "\u7528\u6237ID",
                username_get: "\u7528\u6237\u540d",
                connected_users_get: "\u5728\u7ebf\u7528\u6237\u6570",
                hide_ranking: "\u9690\u85cf\u4e91\u6392\u884c\u699c",
                is_ranking_show_hide: "\u4e91\u6392\u884c\u699c\u662f\u5426\u663e\u793a"
            }
              , ek = "http://www.w3.org/1999/xhtml"
              , tk = ""
              , nk = function() {
                return lw()
            }
              , rk = function(e) {
                var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
                  , n = document.createElement(e);
                return Object.entries(t).forEach((function(e) {
                    var t = (0,
                    x.Z)(e, 2)
                      , r = t[0]
                      , i = t[1];
                    return n.setAttribute(r, i)
                }
                )),
                n
            }
              , ik = function() {
                function e(t) {
                    (0,
                    D.Z)(this, e),
                    j(this, "nemoBcm"),
                    j(this, "currentActor"),
                    j(this, "currentProcedure"),
                    j(this, "proceduresDict", {}),
                    j(this, "splitOptions"),
                    j(this, "scenes"),
                    j(this, "specialFieldValueMap"),
                    this.nemoBcm = t,
                    this.splitOptions = null == t ? void 0 : t.split_options,
                    this.scenes = null == t ? void 0 : t.scenes,
                    this.specialFieldValueMap = {
                        sprite: {
                            __self: "--self",
                            __mouse: "--mouse",
                            __pointer: "--mouse",
                            __random: "--random"
                        },
                        sprite1: {
                            __self: "--self",
                            __mouse: "--mouse",
                            __pointer: "--mouse",
                            __random: "--random",
                            __edge: "--edge",
                            __edge_top: "--edge_top",
                            __edge_bottom: "--edge_bottom",
                            __edge_left: "--edge_left",
                            __edge_right: "--edge_right"
                        },
                        type: {
                            say: "talk",
                            select_index: "index",
                            select_content: "content",
                            MULTIPLY: "multiply",
                            POWER: "power",
                            MINUS: "minus",
                            DIVIDE: "divide",
                            ADD: "add",
                            ROUND: "round",
                            ROUNDDOWN: "round_down",
                            ROUNDUP: "round_up",
                            AND: "and",
                            OR: "or",
                            ROOT: "0",
                            ABS: "1",
                            NEG: "2",
                            LN: "3",
                            LOG10: "4",
                            EXP: "5",
                            POW10: "6",
                            SIN: "sin",
                            COS: "cos",
                            TAN: "tan",
                            ACOS: "acos",
                            ASIN: "asin",
                            ATAN: "atan",
                            fadeInOut: "fade_in_out"
                        },
                        op: {
                            ROUNDDOWN: "round_down",
                            ROUNDUP: "round_up",
                            GTE: "gte",
                            LT: "lt",
                            EQ: "eq",
                            NEQ: "neq"
                        },
                        audio_id: {
                            __all_sounds: "all_audio"
                        },
                        target: {
                            X: "x",
                            Y: "y",
                            Z: "z"
                        },
                        prev_next: {
                            previous: "prev",
                            next: "next"
                        },
                        layer: {
                            front: "peak",
                            back: "bottom",
                            backward: "next_layer",
                            forward: "prev_layer"
                        },
                        screen_id: {
                            __previous_scene: "prev",
                            __next_scene: "next"
                        },
                        time: {
                            week: "weekday"
                        },
                        align: {
                            LEFT: "right",
                            CENTER: "center",
                            RIGHT: "left"
                        },
                        BOOL: {
                            TRUE: "true",
                            FALSE: "false"
                        }
                    }
                }
                return (0,
                C.Z)(e, [{
                    key: "mapType",
                    value: function(e) {
                        return qw[e] || e
                    }
                }, {
                    key: "getMappedName",
                    value: function(e, t) {
                        var n = {
                            self_change_effect: {
                                steps: "value"
                            },
                            set_sprite_style: {
                                index: "style_id"
                            },
                            self_set_pen_color_property: {
                                val: "val",
                                value: "val"
                            },
                            list_append: {
                                var: "list",
                                value: "list_item_value"
                            },
                            list_insert_value: {
                                var: "list",
                                index: "list_index",
                                value: "list_item_value"
                            },
                            delete_list_item: {
                                var: "list",
                                index: "list_index",
                                item: "type"
                            },
                            replace_list_item: {
                                var: "list",
                                value: "list_item_value",
                                index: "list_index",
                                item: "type"
                            },
                            list_copy: {
                                value: "list",
                                target: "target_list"
                            },
                            list_item: {
                                var: "list",
                                index: "list_index"
                            },
                            lists_get_value: {
                                var: "list",
                                index: "list_index"
                            },
                            list_length: {
                                var: "list"
                            },
                            lists_length: {
                                var: "list"
                            },
                            list_index_of: {
                                var: "list",
                                value: "list_item_value"
                            },
                            list_is_exist: {
                                var: "list",
                                value: "list_item_value"
                            },
                            math_modulo: {
                                a: "divisor",
                                b: "dividend",
                                dividend: "A",
                                divisor: "B"
                            },
                            random_num: {
                                a: "A",
                                b: "B"
                            },
                            divisible_by: {
                                divisor: "B",
                                number_to_check: "A"
                            },
                            math_arithmetic: {
                                a: "A",
                                b: "B"
                            },
                            math_arithmetic_power: {
                                a: "A",
                                b: "B"
                            },
                            math_number_property: {
                                number_to_check: "num"
                            },
                            logic_compare: {
                                a: "A",
                                b: "B"
                            },
                            logic_operation: {
                                a: "A",
                                b: "B"
                            },
                            text_contain: {
                                text1: "A",
                                text2: "B"
                            },
                            text_select: {
                                char_index: "start_index",
                                string: "text"
                            },
                            microbit_math_map: {
                                tostart: "toStart",
                                fromend: "fromEnd",
                                fromstart: "fromStart",
                                toend: "toEnd"
                            },
                            play_audio: {
                                audio: "audio_id"
                            },
                            stop_audio: {
                                audio: "audio_id"
                            },
                            play_audio_and_wait: {
                                audio: "audio_id"
                            },
                            procedures_2_return_value: {
                                value: "VALUE"
                            },
                            text_join: {
                                text: "ADD0"
                            },
                            text_length: {
                                value: "text"
                            },
                            switch_to_screen: {
                                index: "screen_id"
                            },
                            logic_negate: {
                                bool: "logic"
                            }
                        }
                          , r = {
                            n: "value",
                            val: "value",
                            a: this.getAFieldName(e),
                            b: this.getBFieldName(e)
                        }
                          , i = ["split_text", "text_to_split"]
                          , a = ["add", "if", "choice"];
                        return function(e) {
                            if (i.includes(e))
                                return !0;
                            for (var t = 0, n = a; t < n.length; t++) {
                                var r = n[t];
                                if (e.startsWith(r) && /^\d+$/.test(e.slice(r.length)))
                                    return !0
                            }
                            return !1
                        }(t) ? t.toUpperCase() : n[e] && n[e][t] ? n[e][t] : r[t] || t
                    }
                }, {
                    key: "getSpecialFieldNameMap",
                    value: function(e) {
                        return {
                            VAR: "list_get" === e || "pure_list_get" === e ? "list" : "VAR",
                            beats: "microbit_beats_shadow" === e ? "NUM" : "beats",
                            note: "microbit_beats_shadow" === e ? "NUM" : "note",
                            func: "show_hide",
                            method: "show_hide_variables" === e ? "show_hide" : "method",
                            sprite1: "sprite",
                            sprite2: "sprite1",
                            visible_status: "showHide",
                            timer_action: "type",
                            info: "type",
                            position: "type",
                            axis: "target",
                            type: "replace_list_item" === e || "delete_list_item" === e || "list_item" === e ? "item" : "type",
                            audio: "audio_id",
                            style_change_direction: "prev_next",
                            property: "type",
                            target: "self_move_specify" === e ? "sprite" : "target",
                            valname: "variable",
                            action: "self_stress_animation" === e ? "animation" : "action",
                            index: "get_screens" === e ? "screen_id" : "index",
                            transition: "set_screen_transition" === e ? "type" : "transition",
                            align: "stamp" === e ? "align" : "ALIGN"
                        }
                    }
                }, {
                    key: "getAFieldName",
                    value: function(e) {
                        return "math_modulo" === e ? "divisor" : ["random_num", "divisible_by", "math_arithmetic", "math_arithmetic_power", "logic_compare", "text_contain", "text_char_at"].includes(e) ? "A" : "a"
                    }
                }, {
                    key: "getBFieldName",
                    value: function(e) {
                        return "math_modulo" === e ? "dividend" : ["random_num", "divisible_by", "math_arithmetic", "math_arithmetic_power", "logic_compare", "text_contain"].includes(e) ? "B" : "b"
                    }
                }, {
                    key: "parseLogicCompare",
                    value: function(e, t) {
                        var n = this
                          , r = {}
                          , i = {}
                          , a = this.parseFields(e)
                          , o = this.mapType(e.getAttribute("type") || "");
                        return e.querySelectorAll(":scope > value").forEach((function(a) {
                            var s = a.getAttribute("name") || tk
                              , c = a.querySelector(":scope > empty")
                              , u = a.querySelector(":scope > shadow")
                              , l = a.querySelector(":scope > block")
                              , p = n.getMappedName(o, s.toLowerCase());
                            if (c && !u && !l) {
                                var d = n.handleEmptyElement(c, t, p);
                                Object.assign(r, d.inputs),
                                Object.assign(i, d.shadows)
                            }
                            if (u && n.handleShadowInLogicCompare(u, r, i, p, t),
                            l && p && (r[p] = n.parseBlock(l),
                            ("logic_operation" === n.mapType(e.getAttribute("type") || "") || "logic_negate" === n.mapType(e.getAttribute("type") || "")) && !i[p])) {
                                var h = n.createEmptyXml("logic_empty", r[p].id, {});
                                i[p] = h
                            }
                        }
                        )),
                        {
                            inputs: r,
                            shadows: i,
                            fields: a
                        }
                    }
                }, {
                    key: "parseFields",
                    value: function(e) {
                        var t = this
                          , n = this.mapType(e.getAttribute("type") || tk)
                          , r = this.getSpecialFieldNameMap(n);
                        return Array.from(e.querySelectorAll(":scope > field")).reduce((function(e, i) {
                            var a = i.getAttribute("name") || tk
                              , o = i.textContent || tk
                              , s = "mouse_down" === n ? {
                                sprite: "--screen"
                            } : {}
                              , c = "add_width_height_scale" === n ? {
                                increase: "increase"
                            } : {}
                              , u = "self_change_effect" === n ? {
                                increase: "increase"
                            } : {}
                              , l = t.getProcessedFieldName(a, n, r);
                            if (("appearance_of_sprite" === n || "coordinate_of_sprite" === n) && "attribute" === l)
                                switch (o) {
                                case "0":
                                case "1":
                                case "2":
                                    l = "coordinate";
                                    break;
                                case "3":
                                case "5":
                                    l = "appearance"
                                }
                            return o = t.processFieldValue(l, o, n),
                            t.currentActor || "get_styles" !== n || "style_id" !== l || (l = "NUM"),
                            (0,
                            N.Z)((0,
                            N.Z)((0,
                            N.Z)((0,
                            N.Z)({}, e), {}, (0,
                            S.Z)({}, l, o), s), c), u)
                        }
                        ), {})
                    }
                }, {
                    key: "getProcessedFieldName",
                    value: function(e, t, n) {
                        var r = e.toLowerCase();
                        return "var" === r ? this.getVarFieldName(t) : "op" === r ? this.getOpFieldName(t) : "options" === r && "set_top_bottom_layer" === t ? "layer" : "index" === r && "get_styles" === t ? "style_id" : "mouse_event_type" === r && "mouse_down" === t ? "type" : "NAME" === r && "procedures_2_parameter" === t || "text" === r && "math_number" === t ? "param_name" : "type" === r && "self_stress_animation" === t ? "appear" : n[r] || e
                    }
                }, {
                    key: "getVarFieldName",
                    value: function(e) {
                        return "show_hide_list" === e || "pure_list_get" === e || "list_get" === e ? "list" : "list_get" !== e ? "variable" : "VAR"
                    }
                }, {
                    key: "getOpFieldName",
                    value: function(e) {
                        return ["math_trig_common", "math_trig_arc", "math_trig", "math_arithmetic", "math_arithmetic_power", "logic_operation", "math_round", "math_function"].includes(e) ? "type" : "logic_compare" === e ? "OP" : "time"
                    }
                }, {
                    key: "processFieldValue",
                    value: function(e, t, n) {
                        var r, i;
                        if ("self_rotate_around" === n && "sprite" === e && "__self" === t)
                            return (null == (r = this.currentActor) ? void 0 : r.id) || t;
                        if (this.specialFieldValueMap[e] && this.specialFieldValueMap[e][t])
                            return this.specialFieldValueMap[e][t];
                        if (("replace_list_item" === n || "list_item" === n || "delete_list_item" === n) && "item" === e && "first" === t)
                            return "any";
                        if (["appearance_of_sprite", "coordinate_of_sprite"].includes(n) && ("coordinate" === e || "appearance" === e))
                            return this.processAppearanceAttribute(t);
                        if ("get_clone_index_property" === n && "attribute" === e)
                            return this.processCloneIndexAttribute(t);
                        if ("mouse_down" === n && "mouse_event_type" === e)
                            return "type";
                        if ("get_styles" === n && "style_id" === e) {
                            var a = null == (i = this.currentActor) ? void 0 : i.styles;
                            return a ? a[Number(t) - 1] : t
                        }
                        if ("procedures_2_callreturn" === n && "NAME" === e) {
                            var o = Xw.ROUND
                              , s = Object.values(this.proceduresDict).find((function(e) {
                                return e.name === t && e.type === o
                            }
                            ));
                            return s ? s.id : t
                        }
                        return t
                    }
                }, {
                    key: "processAppearanceAttribute",
                    value: function(e) {
                        var t;
                        return (null == (t = {
                            0: {
                                name: "coordinate",
                                value: "x"
                            },
                            1: {
                                name: "coordinate",
                                value: "y"
                            },
                            2: {
                                name: "coordinate",
                                value: "style_of_sprite"
                            },
                            3: {
                                name: "appearance",
                                value: "direction"
                            },
                            5: {
                                name: "appearance",
                                value: "scale"
                            }
                        }[e]) ? void 0 : t.value) || e
                    }
                }, {
                    key: "processCloneIndexAttribute",
                    value: function(e) {
                        return {
                            0: "x",
                            1: "y",
                            2: "style_index",
                            3: "direction",
                            5: "scale"
                        }[e] || e
                    }
                }, {
                    key: "handleValueElement",
                    value: function(e, t) {
                        var n = e.getAttribute("name") || tk
                          , r = e.querySelector(":scope > empty")
                          , i = e.querySelector(":scope > shadow");
                        return r ? this.handleEmptyElement(r, t, n) : i ? this.handleShadowElement(i, t, n) : {}
                    }
                }, {
                    key: "handleEmptyElement",
                    value: function(e, t, n) {
                        var r = e.nextElementSibling
                          , i = this.mapType((null == e ? void 0 : e.getAttribute("type")) || tk)
                          , a = "logic_negate" === t.type && "BOOL" === n ? "logic" : n;
                        if (e && !r) {
                            var o = this.createEmptyElementResult(e, i, t.id, a);
                            return {
                                inputs: (0,
                                N.Z)({}, o.inputs),
                                shadows: o.shadows ? (0,
                                S.Z)({}, a, o.shadows[a]) : {}
                            }
                        }
                        if (r && "block" === r.tagName.toLowerCase()) {
                            var s = this.mapType(r.getAttribute("type") || tk);
                            if (this.isLogicCompareBlock(s)) {
                                var c = this.handleLogicCompareBlock(r, t, a)
                                  , u = e.getAttribute("id") || nk()
                                  , l = this.parseFields(e)
                                  , p = this.createShadowXml(i, u, l);
                                return {
                                    inputs: (0,
                                    N.Z)({}, c.inputs),
                                    shadows: (0,
                                    S.Z)({}, a, p)
                                }
                            }
                            if (s && this.isMultiParameterBlock(s)) {
                                var d = this.handleMultiParameterBlock(r, t, a)
                                  , h = e.getAttribute("id") || nk()
                                  , f = this.parseFields(e)
                                  , m = this.createShadowXml(i, h, f);
                                return {
                                    inputs: (0,
                                    N.Z)({}, d.inputs),
                                    shadows: (0,
                                    S.Z)({}, a, m)
                                }
                            }
                            if (this.isProcedureBlock(s))
                                return this.handleProcedureBlock(e, a);
                            var g = this.createNestedBlockResult(r, t.id, a)
                              , y = e.getAttribute("id") || nk()
                              , v = this.parseFields(e)
                              , _ = this.createShadowXml(i, y, v);
                            return {
                                inputs: (0,
                                N.Z)({}, g.inputs),
                                shadows: (0,
                                S.Z)({}, a, _)
                            }
                        }
                        return {}
                    }
                }, {
                    key: "createEmptyElementResult",
                    value: function(e, t, n, r) {
                        var i, a, o, s = this.parseFields(e), c = {
                            type: t,
                            id: e.getAttribute("id") || nk(),
                            is_shadow: "shadow" === e.tagName || "logic_empty" === t,
                            fields: s,
                            is_output: !1,
                            parent_id: n,
                            shield: !1
                        };
                        "y" === (null == (i = c.fields) ? void 0 : i.coordinate) || "x" === (null == (a = c.fields) ? void 0 : a.coordinate) ? c.type = "coordinate_of_sprite" : (null == (o = c.fields) ? void 0 : o.coordinate) && (c.type = "style_of_sprite");
                        var u = this.createEmptyXml(t, c.id, s);
                        return {
                            inputs: (0,
                            S.Z)({}, r, c),
                            shadows: (0,
                            S.Z)({}, r, u)
                        }
                    }
                }, {
                    key: "isLogicCompareBlock",
                    value: function(e) {
                        return ["logic_compare", "logic_operation", "math_number_property", "math_modulo", "divisible_by", "math_arithmetic", "random_num", "text_select", "text_length", "math_round", "list_index_of", "math_trig", "math_function", "get_orientation", "get_mouse_info", "get_stage_info", "logic_negate", "text_contain", "list_is_exist", "list_length", "list_item", "get_clone_index_property"].includes(e)
                    }
                }, {
                    key: "isMultiParameterBlock",
                    value: function(e) {
                        return ["text_join", "text_split"].includes(e)
                    }
                }, {
                    key: "handleLogicCompareBlock",
                    value: function(e, t, n) {
                        var r = this.parseLogicCompare(e, t)
                          , i = r.fields
                          , a = r.inputs
                          , o = r.shadows
                          , s = {
                            inputs: (0,
                            S.Z)({}, n, {
                                type: this.mapType(e.getAttribute("type") || tk),
                                id: nk(),
                                fields: i,
                                inputs: a,
                                shadows: o
                            })
                        };
                        return "when" === t.type && (s.shadows = {
                            DO: tk,
                            condition: tk
                        }),
                        "math_number_property" === e.getAttribute("type") && (s.shadows = {
                            condition: '<empty xmlns="'.concat(ek, '" type="').concat(this.mapType(e.getAttribute("type") || tk), '" id="').concat(nk(), '" visible="visible" editable="false"></empty>'),
                            DO: tk
                        }),
                        s
                    }
                }, {
                    key: "createNestedBlockResult",
                    value: function(e, t, n) {
                        var r = this.mapType(e.getAttribute("type") || tk)
                          , i = this.parseBlock(e)
                          , a = "";
                        ((null == e ? void 0 : e.getAttribute("type")) || tk)in $w && (a = this.createMutationForBlockType(e, e.getAttribute("type") || tk));
                        var o = {
                            type: r,
                            id: e.getAttribute("id") || nk(),
                            is_shadow: "shadow" === e.tagName || "logic_empty" === r,
                            fields: this.parseFields(e),
                            is_output: !1,
                            parent_id: t,
                            shield: !1,
                            mutation: a
                        };
                        return "logic_negate" === r && 0 === Object.keys(o.fields || {}).length ? (delete o.fields,
                        {
                            inputs: (0,
                            S.Z)({}, n, i)
                        }) : {
                            inputs: (0,
                            S.Z)({}, n, o)
                        }
                    }
                }, {
                    key: "handleShadowElement",
                    value: function(e, t, n) {
                        var r = e.nextElementSibling
                          , i = r ? this.mapType(r.getAttribute("type") || tk) : null
                          , a = this.mapType(e.getAttribute("type") || tk)
                          , o = e.getAttribute("id") || nk()
                          , s = this.parseFields(e)
                          , c = this.getMappedName(t.type, n.toLowerCase())
                          , u = this.getProcedureId(e, c);
                        if (i && this.isLogicCompareBlock(i)) {
                            var l = this.handleLogicBlock(r, t, u || c)
                              , p = this.createShadowXml(a, o, s);
                            return {
                                inputs: (0,
                                N.Z)({}, l.inputs),
                                shadows: (0,
                                S.Z)({}, u || c, p)
                            }
                        }
                        if (i && this.isMultiParameterBlock(i)) {
                            var d = this.handleMultiParameterBlock(r, t, u || c)
                              , h = this.createShadowXml(a, o, s);
                            return {
                                inputs: (0,
                                N.Z)({}, d.inputs),
                                shadows: (0,
                                S.Z)({}, u || c, h)
                            }
                        }
                        return this.isProcedureBlock(i) ? this.handleProcedureBlock(e, c) : this.handleCommonBlock(e, t, c)
                    }
                }, {
                    key: "isSpecialBlockType",
                    value: function(e) {
                        return null !== e && ["get_answer", "get_choice_and_index", "variables_get", "list_length", "list_item", "get_voice_volume", "get_time", "microbit_temperature", "microbit_light_level", "microbit_sound_level", "microbit_magnetometer", "microbit_accelerometer", "microbit_math_map", "microbit_pin_analog_read", "microbit_compass_heading", "microbit_rotation", "microbit_get_volume", "microbit_pin_digital_read", "distance_to", "random_num", "set_sprite_style", "self_listen", "appearance_of_sprite", "timer", "list_get", "distance_to", "math_single", "text_length", "math_round", "text_join", "text_split", "list_index_of", "coordinate_of_sprite", "bcm_translator_text_return_value_block", "bcm_translator_text_return_boolean_block", "get_current_clone_index", "get_clone_index_property", "get_clone_num", "out_of_boundary", "logic_operation", "logic_boolean", "bump_into_color", "bump_into", "user_id_get", "username_get"].includes(e)
                    }
                }, {
                    key: "handleLogicBlock",
                    value: function(e, t, n) {
                        var r = this.parseLogicCompare(e, t)
                          , i = r.fields
                          , a = r.inputs
                          , o = r.shadows
                          , s = {
                            inputs: (0,
                            S.Z)({}, n, {
                                type: this.mapType(e.getAttribute("type") || tk),
                                id: nk(),
                                fields: i,
                                inputs: a,
                                shadows: o,
                                parent_id: t.id
                            })
                        };
                        return "when" === t.type && (s.shadows = {
                            DO: tk,
                            condition: tk
                        }),
                        "math_number_property" === e.getAttribute("type") && (s.shadows = {
                            condition: '<empty xmlns="'.concat(ek, '" type="').concat(this.mapType(e.getAttribute("type") || tk), '" id="').concat(nk(), '" visible="visible" editable="false"></empty>'),
                            DO: tk
                        }),
                        s
                    }
                }, {
                    key: "handleMultiParameterBlock",
                    value: function(e, t, n) {
                        var r = this.parseLogicCompare(e, t)
                          , i = r.fields
                          , a = r.inputs
                          , o = r.shadows;
                        return {
                            inputs: (0,
                            S.Z)({}, n, {
                                type: this.mapType(e.getAttribute("type") || tk),
                                id: nk(),
                                fields: i,
                                inputs: a,
                                shadows: o,
                                parent_id: t.id,
                                mutation: '<mutation xmlns="http://www.w3.org/1999/xhtml" items="'.concat(Object.keys(a).length, '"></mutation>')
                            })
                        }
                    }
                }, {
                    key: "isProcedureBlock",
                    value: function(e) {
                        return "procedures_2_callreturn" === e || "procedures_2_parameter" === e
                    }
                }, {
                    key: "handleProcedureBlock",
                    value: function(e, t) {
                        var n = this.mapType(e.getAttribute("type") || tk)
                          , r = e.nextElementSibling
                          , i = r ? this.mapType(r.getAttribute("type") || tk) : null
                          , a = this.parseFields(e)
                          , o = "";
                        "procedures_2_callreturn" === i && t.includes("arg") && (o = this.findProcedureId(r, Xw.ROUND));
                        var s = e.getAttribute("id") || nk()
                          , c = n ? this.createShadowXml(n, s, a) : {};
                        return {
                            inputs: (0,
                            S.Z)({}, o || t, this.parseBlock(r)),
                            shadows: (0,
                            S.Z)({}, o || t, c)
                        }
                    }
                }, {
                    key: "handleCommonBlock",
                    value: function(e, t, n) {
                        var r = e.nextElementSibling
                          , i = r ? this.mapType(r.getAttribute("type") || tk) : null
                          , a = e ? this.mapType(e.getAttribute("type") || tk) : null
                          , o = this.parseFields(e)
                          , s = i ? this.parseFields(r) : o
                          , c = this.getProcedureId(e, n)
                          , u = this.createInputDetail(r, t, a, s);
                        this.adjustInputType(u);
                        var l = e.getAttribute("id") || nk()
                          , p = a ? this.createShadowXml(a, l, o) : {};
                        return {
                            inputs: (0,
                            S.Z)({}, c || n, u),
                            shadows: (0,
                            S.Z)({}, c || n, p)
                        }
                    }
                }, {
                    key: "getProcedureId",
                    value: function(e, t) {
                        var n = e.closest("block")
                          , r = this.mapType((null == n ? void 0 : n.getAttribute("type")) || tk);
                        if ("procedures_2_callnoreturn" === r || "procedures_2_callreturn" === r) {
                            var i = "procedures_2_callnoreturn" === r ? Xw.NORMAL : Xw.ROUND;
                            return n ? this.findProcedureId(n, i, t) : ""
                        }
                        return ""
                    }
                }, {
                    key: "createInputDetail",
                    value: function(e, t, n, r) {
                        var i, a, o, s = "", c = this.mapType((null == e ? void 0 : e.getAttribute("type")) || tk);
                        ((null == e ? void 0 : e.getAttribute("type")) || tk)in $w && (s = this.createMutationForBlockType(e, e.getAttribute("type") || tk)),
                        this.currentActor || "get_styles" !== n || (n = "math_number");
                        var u = {
                            type: this.isSpecialBlockType(c) ? c : n || tk,
                            id: (null == e ? void 0 : e.getAttribute("id")) || nk(),
                            inputs: {},
                            fields: r,
                            is_shadow: !this.isSpecialBlockType(c),
                            is_output: !1,
                            parent_id: t.id,
                            shield: !1,
                            mutation: s
                        };
                        return "y" === (null == (i = u.fields) ? void 0 : i.coordinate) || "x" === (null == (a = u.fields) ? void 0 : a.coordinate) ? u.type = "coordinate_of_sprite" : (null == (o = u.fields) ? void 0 : o.coordinate) && (u.type = "style_of_sprite"),
                        u
                    }
                }, {
                    key: "parseBlock",
                    value: function(e) {
                        var t, n, r, i, a, o = this, s = e.getAttribute("type") || tk, c = this.initializeBlockJson(e);
                        return s in $w && (c.mutation = this.createMutationForBlockType(e, s)),
                        this.handleSpecialBlockTypes(c),
                        Array.from(e.children).forEach((function(e) {
                            o.handleChildElement(e, c)
                        }
                        )),
                        "bcm_translator_text_execution_block" !== c.type && "bcm_translator_text_event_block" !== c.type || (c.disabled = !0),
                        "procedures_2_return_value" === c.type && (c.mutation = '<mutation xmlns="http://www.w3.org/1999/xhtml" items="1" type="ROUND"></mutation>',
                        this.currentProcedure[0].parent_type === Xw.NORMAL && (c.inputs = {},
                        c.shadows = {
                            PROCEDURES_2_DEFRETURN_RETURN: ""
                        }),
                        this.currentProcedure[0].parent_type === Xw.ROUND && (c.shadows = (0,
                        N.Z)((0,
                        N.Z)({}, c.shadows), {}, {
                            PROCEDURES_2_DEFRETURN_RETURN: "",
                            VALUE: '<shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="'.concat(nk, '" visible="visible"><field constraints="-Infinity,Infinity,0," name="NUM">0</field></shadow>')
                        }))),
                        "self_stress_animation" !== c.type || "disappear" !== (null == (t = null == c ? void 0 : c.fields) ? void 0 : t.appear) && "appear" !== (null == (n = null == c ? void 0 : c.fields) ? void 0 : n.appear) || (c.type = "self_appear_animation"),
                        "appearance_of_sprite" !== c.type || "y" !== (null == (r = null == c ? void 0 : c.fields) ? void 0 : r.coordinate) && "x" !== (null == (i = null == c ? void 0 : c.fields) ? void 0 : i.coordinate) || (c.type = "coordinate_of_sprite"),
                        "appearance_of_sprite" === c.type && (null == (a = null == c ? void 0 : c.fields) ? void 0 : a.coordinate) && (c.type = "style_of_sprite"),
                        c
                    }
                }, {
                    key: "initializeBlockJson",
                    value: function(e) {
                        return {
                            type: this.mapType(e.getAttribute("type") || tk),
                            id: e.getAttribute("id") || nk(),
                            location: [parseInt(e.getAttribute("x") || "0", 10), parseInt(e.getAttribute("y") || "0", 10)],
                            visible: "visible" === e.getAttribute("visible"),
                            shield: "true" === e.getAttribute("shield"),
                            inline: "true" === e.getAttribute("inline")
                        }
                    }
                }, {
                    key: "createMutationForBlockType",
                    value: function(e, t) {
                        var n = $w[t];
                        switch (t) {
                        case "show_ranking":
                            n = this.handleShowRanking(e, n);
                            break;
                        case "check_sence":
                            n = this.handleCheckSence(e);
                            break;
                        case "on_phone_tilt":
                            n = this.handleOnPhoneTilt(e, n);
                            break;
                        case "set_fill_path":
                            n = this.handleSetFillPath(e, n);
                            break;
                        case "self_flip":
                            n = this.handleSelfFlip(e, n);
                            break;
                        case "midi__on_play_note":
                            n = this.handleMidiOnPlayNote(e, n);
                            break;
                        case "midi__set_program":
                            n = this.handleMidiSetProgram(e, n);
                            break;
                        case "midi__set_speed_rate":
                            n = this.handleMidiSetSpeedRate(e, n);
                            break;
                        case "midi__on_play_section":
                        case "midi__play_section":
                        case "midi__get_section_notes":
                            n = this.handleMidiSection(e, n);
                            break;
                        case "midi__get_playing_column":
                        case "midi__get_bpm":
                            n = this.handleMidiGet(e, n)
                        }
                        return '<mutation xmlns="'.concat(ek, '" items="0">').concat(n, "</mutation>")
                    }
                }, {
                    key: "handleSpecialBlockTypes",
                    value: function(e) {
                        switch (e.type) {
                        case "self_disappear":
                            e.type = "self_appear",
                            e.fields = (0,
                            N.Z)((0,
                            N.Z)({}, e.fields), {}, {
                                value: "disappear"
                            });
                            break;
                        case "self_appear":
                            e.fields = (0,
                            N.Z)((0,
                            N.Z)({}, e.fields), {}, {
                                value: "appear"
                            });
                            break;
                        case "self_gradually_disappear":
                            e.type = "self_gradually_show_hide",
                            e.fields = (0,
                            N.Z)((0,
                            N.Z)({}, e.fields), {}, {
                                show_hide: "hide"
                            });
                            break;
                        case "self_gradually_appear":
                            e.type = "self_gradually_show_hide",
                            e.fields = (0,
                            N.Z)((0,
                            N.Z)({}, e.fields), {}, {
                                show_hide: "show"
                            });
                            break;
                        case "math_arithmetic_power":
                            e.fields = (0,
                            N.Z)((0,
                            N.Z)({}, e.fields), {}, {
                                type: "power"
                            });
                            break;
                        case "self_change_coordinate_x":
                        case "self_change_coordinate_y":
                        case "self_glide_coordinate_x":
                        case "self_glide_coordinate_y":
                        case "self_change_scale":
                            e.fields = (0,
                            N.Z)((0,
                            N.Z)({}, e.fields), {}, {
                                increase: "increase"
                            })
                        }
                    }
                }, {
                    key: "handleChildElement",
                    value: function(e, t) {
                        switch (e.tagName.toLowerCase()) {
                        case "next":
                            this.handleNextElement(e, t);
                            break;
                        case "value":
                            var n = this.handleValueElement(e, t);
                            t.inputs || (t.inputs = {}),
                            Object.assign(t.inputs, n.inputs),
                            n.shadows && (t.shadows || (t.shadows = {}),
                            Object.assign(t.shadows, n.shadows)),
                            n.mutation && (t.mutation = n.mutation);
                            break;
                        case "statement":
                            var r = this.handleStatementElement(e, t);
                            t.statements || (t.statements = {}),
                            Object.assign(t.statements, r.statements);
                            break;
                        case "field":
                            var i = this.handleFieldElement(e, t);
                            t.fields || (t.fields = {}),
                            Object.assign(t.fields, i.fields),
                            t.inputs || (t.inputs = {}),
                            Object.assign(t.inputs, i.inputs),
                            i.mutation && (t.mutation = i.mutation),
                            i.shadows && (t.shadows || (t.shadows = {}),
                            Object.assign(t.shadows, i.shadows));
                            break;
                        case "mutation":
                            var a = this.handleMutationElement(e, t);
                            a.mutation && (t.mutation = a.mutation),
                            a.shadows && (t.shadows || (t.shadows = {}),
                            Object.assign(t.shadows, a.shadows))
                        }
                    }
                }, {
                    key: "transformLegacyAudioBlock",
                    value: function(e) {
                        var t = (new DOMParser).parseFromString(e, "text/xml");
                        return Array.from(t.getElementsByTagName("block")).filter((function(e) {
                            var t = e.querySelector(':scope > field[name="audio"]');
                            return ("audio__play_audio" === e.getAttribute("type") || "audio__play_audio_and_wait" === e.getAttribute("type")) && t
                        }
                        )).forEach((function(e) {
                            var n = e.querySelector(':scope > field[name="audio"]');
                            if (n) {
                                var r = n.textContent || ""
                                  , i = e.querySelector(":scope > next")
                                  , a = t.createElement("value");
                                a.setAttribute("name", "audio");
                                var o = t.createElement("shadow");
                                o.setAttribute("type", "sound_get"),
                                o.setAttribute("id", nk()),
                                o.setAttribute("visible", "visible"),
                                o.setAttribute("inline", "true");
                                var s = t.createElement("field");
                                if (s.setAttribute("name", "audio"),
                                s.textContent = r,
                                o.appendChild(s),
                                a.appendChild(o),
                                e.innerHTML = "",
                                e.appendChild(a),
                                i)
                                    e.appendChild(i);
                                else {
                                    var c = t.createElement("next");
                                    c.setAttribute("last_next_in_stack", "true"),
                                    e.appendChild(c)
                                }
                                e.setAttribute("visible", "visible")
                            }
                        }
                        )),
                        (new XMLSerializer).serializeToString(t)
                    }
                }, {
                    key: "handleNextElement",
                    value: function(e, t) {
                        var n = e.querySelector(":scope > block");
                        if (n) {
                            var r = this.parseBlock(n);
                            r.parent_id = t.id,
                            t.next = r
                        }
                    }
                }, {
                    key: "parseProcedures",
                    value: function(e) {
                        var t = this
                          , n = this.preprocessProcedures(e)
                          , r = {};
                        Object.entries(n).forEach((function(e) {
                            var n = (0,
                            x.Z)(e, 2)
                              , i = n[0]
                              , a = n[1]
                              , o = t.createParams(a);
                            r[i] = {
                                id: a.id,
                                name: a.name,
                                type: a.type || Xw.NORMAL,
                                params: o,
                                nekoBlockJsonList: [],
                                workspaceScrollXy: Jw
                            }
                        }
                        )),
                        this.proceduresDict = r;
                        var i = Md(n, (function(e) {
                            var n = r[e.id]
                              , i = n.params
                              , a = t.parseBlocksXML("<root>".concat(e.blocksXML, "</root>"), i);
                            return t.updateNekoBlockJsonList(a, i, e.id),
                            (0,
                            N.Z)((0,
                            N.Z)({}, n), {}, {
                                nekoBlockJsonList: a
                            })
                        }
                        ));
                        return this.proceduresDict = i,
                        i
                    }
                }, {
                    key: "preprocessProcedures",
                    value: function(e) {
                        var t = this
                          , n = (0,
                        N.Z)({}, e);
                        return Object.values(e).forEach((function(e) {
                            if (e.blocksXML && t.hasReturnBlocks(e.blocksXML)) {
                                var r = (0,
                                N.Z)((0,
                                N.Z)({}, e), {}, {
                                    id: nk(),
                                    type: Xw.ROUND
                                });
                                n[r.id] = r
                            }
                        }
                        )),
                        n
                    }
                }, {
                    key: "hasReturnBlocks",
                    value: function(e) {
                        return (new DOMParser).parseFromString("<root>".concat(e, "</root>"), "text/xml").querySelectorAll('block[type="procedures_2_return_value"]').length > 0
                    }
                }, {
                    key: "createParams",
                    value: function(e) {
                        var t = [{
                            id: nk(),
                            type: "Label",
                            name: e.name,
                            parent_id: e.id,
                            parent_type: e.type || Xw.NORMAL
                        }];
                        return e.params.forEach((function(n) {
                            t.push({
                                id: nk(),
                                type: "String",
                                name: n,
                                parent_id: e.id,
                                parent_type: e.type || Xw.NORMAL
                            })
                        }
                        )),
                        t
                    }
                }, {
                    key: "updateNekoBlockJsonList",
                    value: function(e, t, n) {
                        var r = this;
                        e.forEach((function(e) {
                            if ("procedures_2_defnoreturn" === e.type) {
                                if (e.shadows = {
                                    PROCEDURES_2_DEFNORETURN_DEFINE: "",
                                    PARAMS0: "",
                                    STACK: ""
                                },
                                e.fields && e.fields.NAME) {
                                    var i = e.fields.NAME;
                                    t.find((function(e) {
                                        return e.name === i
                                    }
                                    )) && r.updateBlockWithParam(e, t, n)
                                }
                                e.id = n
                            }
                        }
                        ))
                    }
                }, {
                    key: "updateBlockWithParam",
                    value: function(e, t, n) {
                        var r = '<mutation xmlns="'.concat(ek, '">');
                        t.forEach((function(t, i) {
                            var a = t.name.replace(/ /g, "_");
                            r += '<arg id="'.concat(t.id, '" name="').concat(a, '" type="').concat(t.type, '"></arg>'),
                            i > 0 && (e.shadows && (e.shadows["PARAMS".concat(i)] = '<shadow xmlns="'.concat(ek, '" type="').concat(t.type, '"><field name="VALUE">').concat(t.defaultValue || 0, "</field></shadow>")),
                            e.inputs = (0,
                            N.Z)((0,
                            N.Z)({}, e.inputs), {}, (0,
                            S.Z)({}, "PARAMS".concat(i), {
                                type: "procedures_2_stable_parameter",
                                id: "".concat(t.id),
                                fields: {
                                    param_name: t.name,
                                    param_default_value: ""
                                },
                                is_output: !0,
                                parent_id: n,
                                shield: !1
                            })))
                        }
                        )),
                        r += "</mutation>",
                        e.mutation = r,
                        e.fields && (e.fields.NAME = n)
                    }
                }, {
                    key: "getArgIndex",
                    value: function(e) {
                        var t = e.match(/arg(\d+)/);
                        return t ? parseInt(t[1], 10) : -1
                    }
                }, {
                    key: "findProcedureId",
                    value: function(e, t, n) {
                        var r = e.querySelector("mutation");
                        if (!r)
                            return "";
                        var i = r.getAttribute("name");
                        if (!i)
                            return "";
                        if (!n) {
                            var a = r.querySelector("procedures_2_parameter_shadow");
                            if (!a)
                                return "";
                            var o = a.getAttribute("name");
                            return o ? this.findProcedureParamId(i, o, t) : ""
                        }
                        var s = this.getArgIndex(n);
                        if (-1 === s)
                            return "";
                        var c = r.querySelectorAll("procedures_2_parameter_shadow");
                        if (s >= c.length)
                            return "";
                        var u = c[s].getAttribute("name");
                        return u ? this.findProcedureParamId(i, u, t) : ""
                    }
                }, {
                    key: "findProcedureParamId",
                    value: function(e, t, n) {
                        var r = this.findMatchingProcedureInDict(e, t, n);
                        return r ? r.id : ""
                    }
                }, {
                    key: "findMatchingProcedureInDict",
                    value: function(e, t, n) {
                        var r = Object.values(this.proceduresDict).find((function(t) {
                            return t.name === e && t.type === n
                        }
                        ));
                        if (r)
                            return r.params.find((function(e) {
                                return e.name === t && "String" === e.type
                            }
                            ))
                    }
                }, {
                    key: "findMatchingProcedure",
                    value: function(e, t) {
                        return Object.values(this.proceduresDict).find((function(n) {
                            return n.name === e && n.type === t
                        }
                        ))
                    }
                }, {
                    key: "replaceIdsWithUUID",
                    value: function(e) {
                        var t = this;
                        if (["block", "shadow", "statement", "value"].includes(e.tagName.toLowerCase())) {
                            var n = nk();
                            e.setAttribute("id", n)
                        }
                        Array.from(e.children).forEach((function(e) {
                            return t.replaceIdsWithUUID(e)
                        }
                        ))
                    }
                }, {
                    key: "replaceSplitOptions",
                    value: function(e) {
                        var t = this;
                        this.isSplitTextBlock(e) && this.updateSplitTextOption(e),
                        Array.from(e.children).forEach((function(e) {
                            return t.replaceSplitOptions(e)
                        }
                        ))
                    }
                }, {
                    key: "isSplitTextBlock",
                    value: function(e) {
                        return "block" === e.tagName && "text_split" === e.getAttribute("type")
                    }
                }, {
                    key: "updateSplitTextOption",
                    value: function(e) {
                        var t, n = e.querySelector('value[name="SPLIT_TEXT"]');
                        if (n) {
                            var r = n.querySelector('field[name="option"]');
                            if (r) {
                                var i = r.textContent;
                                if (i) {
                                    var a = null == (t = this.splitOptions.options_dict[i]) ? void 0 : t.name;
                                    a && (r.setAttribute("name", "TEXT"),
                                    r.textContent = "\u7a7a\u683c" === a ? " " : a)
                                }
                            }
                        }
                    }
                }, {
                    key: "transformMathArithmeticPower",
                    value: function(e) {
                        var t = (new DOMParser).parseFromString(e, "text/xml");
                        return t.querySelectorAll('block[type="math_arithmetic_power"]').forEach((function(e) {
                            e.setAttribute("type", "math_arithmetic_common");
                            var t = document.createElement("field");
                            t.setAttribute("name", "OP"),
                            t.textContent = "POWER";
                            var n = e.querySelector("value");
                            n ? e.insertBefore(t, n) : e.appendChild(t)
                        }
                        )),
                        (new XMLSerializer).serializeToString(t)
                    }
                }, {
                    key: "transformServoShadowType",
                    value: function(e) {
                        var t = (new DOMParser).parseFromString(e, "text/xml");
                        return t.querySelectorAll('block[type="microbit_servo_set_angle_360"]').forEach((function(e) {
                            var t = e.querySelector('value[name="angle"] > shadow');
                            if (t && "math_number" === t.getAttribute("type")) {
                                t.setAttribute("type", "math_number_with_servo");
                                var n = t.querySelector('field[name="NUM"]');
                                if (n) {
                                    n.setAttribute("constraints", "-135,135,1,");
                                    var r = parseInt(n.textContent || "0", 10);
                                    r > 135 && (n.textContent = "135"),
                                    r < -135 && (n.textContent = "-135")
                                }
                            }
                        }
                        )),
                        (new XMLSerializer).serializeToString(t)
                    }
                }, {
                    key: "transformMidiOnPlayNoteBlocks",
                    value: function(e) {
                        var t = (new DOMParser).parseFromString(e, "text/xml");
                        return t.querySelectorAll('block[type="midi__on_play_note"], block[type="midi__on_play_section"]').forEach((function(e) {
                            var t, n = e.querySelector('statement[name="DO"]');
                            if (n) {
                                for (var r = document.createElement("next"); n.firstChild; )
                                    r.appendChild(n.firstChild);
                                null == (t = n.parentNode) || t.replaceChild(r, n)
                            }
                        }
                        )),
                        (new XMLSerializer).serializeToString(t)
                    }
                }, {
                    key: "transformDialShadowType",
                    value: function(e) {
                        var t = (new DOMParser).parseFromString(e, "text/xml");
                        return t.querySelectorAll('block[type="self_point_towards"]').forEach((function(e) {
                            var t = e.querySelector('value[name="degrees"] > shadow');
                            t && "math_number" === t.getAttribute("type") && t.setAttribute("type", "math_number_with_dial")
                        }
                        )),
                        (new XMLSerializer).serializeToString(t)
                    }
                }, {
                    key: "transformSelfSetEffect2Blocks",
                    value: function(e) {
                        var t = {
                            0: {
                                min: 0,
                                max: 360,
                                wrap: !0
                            },
                            1: {
                                min: 0,
                                max: 100
                            },
                            2: {
                                min: 0,
                                max: 100
                            },
                            3: {
                                min: 1,
                                max: null
                            },
                            4: {
                                min: 0,
                                max: 100
                            },
                            5: {
                                min: 0,
                                max: 100
                            },
                            6: {
                                min: 0,
                                max: 100
                            }
                        }
                          , n = (new DOMParser).parseFromString(e, "text/xml")
                          , r = function(e) {
                            var n = e.querySelector('field[name="scope"]')
                              , r = n ? Number(n.textContent || "0") : 0
                              , i = e.querySelector('value[name="val"] > shadow');
                            if (i && "math_number" === i.getAttribute("type")) {
                                var a = i.querySelector('field[name="NUM"]');
                                if (a) {
                                    var o = function(e, t) {
                                        if (t.wrap && 360 === t.max && e >= 0 && e <= 360)
                                            return e;
                                        if (t.wrap && t.max) {
                                            if (e < 0) {
                                                for (; e < 0; )
                                                    e += t.max;
                                                return e
                                            }
                                            return e % t.max
                                        }
                                        return e < t.min ? t.min : null !== t.max && e > t.max ? t.max : e
                                    }(Number(a.textContent || "0"), t[r] || t[0]);
                                    a.textContent = o.toString()
                                }
                            }
                        };
                        return n.querySelectorAll('block[type="self_set_effect_2"]').forEach(r),
                        n.querySelectorAll('block[type="self_set_effect"]').forEach(r),
                        (new XMLSerializer).serializeToString(n)
                    }
                }, {
                    key: "replaceSceneIndex",
                    value: function(e) {
                        var t = this;
                        this.isSetSceneByIndexBlock(e) && this.updateSceneIndex(e),
                        Array.from(e.children).forEach((function(e) {
                            return t.replaceSceneIndex(e)
                        }
                        ))
                    }
                }, {
                    key: "isSetSceneByIndexBlock",
                    value: function(e) {
                        return "block" === e.tagName && "set_scene_by_index" === e.getAttribute("type")
                    }
                }, {
                    key: "updateSceneIndex",
                    value: function(e) {
                        var t = e.querySelector('value[name="index"]');
                        if (t) {
                            var n = t.querySelector('field[name="index"]');
                            if (null == n ? void 0 : n.textContent) {
                                var r = parseInt(n.textContent, 10) - 1;
                                r >= 0 && r < this.scenes.scenes_order.length && (n.textContent = this.scenes.scenes_order[r])
                            }
                        }
                    }
                }, {
                    key: "parseBlocksXML",
                    value: function(e, t) {
                        var n = this;
                        !t[0] || t[0].parent_type !== Xw.NORMAL && t[0].parent_type !== Xw.ROUND ? this.currentActor = t : this.currentProcedure = t,
                        e = this.transformServoShadowType(e),
                        e = this.transformMidiOnPlayNoteBlocks(e),
                        e = this.transformDialShadowType(e),
                        e = this.transformMathArithmeticPower(e),
                        e = this.addAlignFieldToStamp(e),
                        e = this.addMutationToControlsIf(e),
                        e = this.addMutationToMobileText(e),
                        e = this.transformLegacyAudioBlock(e),
                        e = this.transformSelfSetEffect2Blocks(e);
                        var r = (new DOMParser).parseFromString(e, "text/xml").documentElement.children;
                        return Array.from(r).forEach((function(e) {
                            n.replaceIdsWithUUID(e),
                            n.replaceSplitOptions(e),
                            n.replaceSceneIndex(e)
                        }
                        )),
                        Array.from(r).map((function(e) {
                            return n.parseBlock(e)
                        }
                        ))
                    }
                }, {
                    key: "addMutationToControlsIf",
                    value: function(e) {
                        var t = (new DOMParser).parseFromString(e, "text/xml");
                        return t.querySelectorAll('block[type="controls_if"]').forEach((function(e) {
                            var t = e.querySelector(":scope > mutation");
                            if (e.querySelector(':scope > statement[name="ELSE"]') && !t) {
                                var n = document.createElement("mutation");
                                n.setAttribute("else", "1"),
                                e.firstChild ? e.insertBefore(n, e.firstChild) : e.appendChild(n)
                            }
                        }
                        )),
                        (new XMLSerializer).serializeToString(t)
                    }
                }, {
                    key: "addAlignFieldToStamp",
                    value: function(e) {
                        var t = (new DOMParser).parseFromString(e, "text/xml");
                        return t.querySelectorAll('block[type="stamp"]').forEach((function(e) {
                            if (!e.querySelector(':scope > field[name="ALIGN"]')) {
                                var t = document.createElement("field");
                                t.setAttribute("name", "ALIGN"),
                                t.textContent = "CENTER";
                                var n = e.querySelector(":scope > mutation");
                                n ? n.insertAdjacentElement("afterend", t) : e.insertBefore(t, e.firstChild)
                            }
                            var r = e.querySelector(":scope > mutation");
                            if (r)
                                r.setAttribute("items", "1");
                            else {
                                var i = document.createElement("mutation");
                                i.setAttribute("items", "1"),
                                e.insertBefore(i, e.firstChild)
                            }
                        }
                        )),
                        (new XMLSerializer).serializeToString(t)
                    }
                }, {
                    key: "addMutationToMobileText",
                    value: function(e) {
                        return e.replace(/(<block type="mobile__text"[^>]*>)/g, '$1<mutation items="1"></mutation>')
                    }
                }, {
                    key: "handleShowRanking",
                    value: function(e, t) {
                        var n = e.querySelector('field[name="direction"]');
                        return t[n ? n.textContent : "positive"] || t.positive
                    }
                }, {
                    key: "handleCheckSence",
                    value: function(e) {
                        var t = e.querySelector(':scope field[name="options"]')
                          , n = t && t.textContent || "false"
                          , r = e.querySelector(':scope value[name="index"] > shadow')
                          , i = r ? r.querySelector('field[name="index"]') : null
                          , a = i && i.textContent || "1"
                          , o = $w.check_sence[n];
                        return "__previous_scene" === a || "__next_scene" === a ? o[a] : o.default.replace("{index}", a)
                    }
                }, {
                    key: "handleOnPhoneTilt",
                    value: function(e, t) {
                        var n = e.querySelector(':scope field[name="type"]');
                        return t[n && n.textContent || "default"] || t.default
                    }
                }, {
                    key: "handleSetFillPath",
                    value: function(e, t) {
                        var n = e.querySelector(':scope field[name="point"]');
                        return t[n && n.textContent || "base"] || t.base
                    }
                }, {
                    key: "handleSelfFlip",
                    value: function(e, t) {
                        var n = e.querySelector(':scope field[name="options"]');
                        return t[n && n.textContent || "0"] || t[0]
                    }
                }, {
                    key: "handleMidiOnPlayNote",
                    value: function(e, t) {
                        var n = this.extractMidiNoteValue(e);
                        return t.replace("{midi_get_note}", n).replace("{midi_get}", "?")
                    }
                }, {
                    key: "handleMidiSetProgram",
                    value: function(e, t) {
                        var n = e.querySelector(':scope field[name="program"]')
                          , r = n && n.textContent || "";
                        return t.replace("{midi_get}", "?").replace("{program}", r)
                    }
                }, {
                    key: "handleMidiSetSpeedRate",
                    value: function(e, t) {
                        var n = this.extractMathNumberValue(e, "rate");
                        return t.replace("{rate}", n)
                    }
                }, {
                    key: "handleMidiSection",
                    value: function(e, t) {
                        var n = this.extractMathNumberValue(e, "column");
                        return t.replace("{midi_get}", "?").replace("{column}", n)
                    }
                }, {
                    key: "handleMidiGet",
                    value: function(e, t) {
                        return t.replace("{midi_get}", "?")
                    }
                }, {
                    key: "handleStatementElement",
                    value: function(e, t) {
                        var n = e.getAttribute("name") || ""
                          , r = e.querySelector(":scope > block")
                          , i = (0,
                        N.Z)((0,
                        N.Z)({}, t), {}, {
                            statements: (0,
                            N.Z)({}, t.statements)
                        });
                        if (r) {
                            var a = this.parseBlock(r);
                            a.parent_id = t.id,
                            i.statements[n] = a,
                            "when" !== t.type || i.shadows || (i.shadows = {
                                DO: "",
                                condition: ""
                            })
                        }
                        return i
                    }
                }, {
                    key: "handleFieldElement",
                    value: function(e, t) {
                        var n = (0,
                        N.Z)((0,
                        N.Z)({}, t), {}, {
                            fields: (0,
                            N.Z)({}, t.fields)
                        })
                          , r = this.parseFields(e.parentElement);
                        return n.fields = (0,
                        N.Z)((0,
                        N.Z)({}, n.fields), r),
                        r.message && this.handleBroadcastField(n, r.message, t.id),
                        this.handleProcedureFields(n, r),
                        n
                    }
                }, {
                    key: "handleMutationElement",
                    value: function(e, t) {
                        var n = (0,
                        N.Z)({}, t);
                        e.setAttribute("xmlns", ek);
                        var r, i = (r = e,
                        (new XMLSerializer).serializeToString(r));
                        return "bcm_translator_text_execution_block" !== n.type && (n.mutation = i),
                        this.isProcedureCallBlock(n.type) && this.handleProcedureCallMutation(e, n),
                        n
                    }
                }, {
                    key: "extractMidiNoteValue",
                    value: function(e) {
                        var t = e.querySelector(':scope value[name="note"] > shadow[type="midi_get_note"]');
                        if (t) {
                            var n = t.querySelector('field[name="note"]');
                            return n && n.textContent || ""
                        }
                        return ""
                    }
                }, {
                    key: "extractMidiGetAllValue",
                    value: function(e) {
                        var t = e.querySelector(':scope value[name="audio"] > shadow[type="midi_get_all"]');
                        if (t) {
                            var n = t.querySelector('field[name="audio"]');
                            return n && "__any_midi" === n.textContent ? "\u4efb\u610f MIDI \u97f3\u4e50" : ""
                        }
                        return ""
                    }
                }, {
                    key: "extractMidiGetValue",
                    value: function(e) {
                        var t = e.querySelector(':scope value[name="audio"] > shadow[type="midi_get"]');
                        if (t) {
                            var n = t.querySelector('field[name="audio"]');
                            return n && n.textContent || ""
                        }
                        return ""
                    }
                }, {
                    key: "extractMathNumberValue",
                    value: function(e, t) {
                        var n = e.querySelector(':scope value[name="'.concat(t, '"] > shadow[type="math_number"]'));
                        if (n) {
                            var r = n.querySelector('field[name="NUM"]');
                            return r && r.textContent || ""
                        }
                        return ""
                    }
                }, {
                    key: "handleShadowInLogicCompare",
                    value: function(e, t, n, r, i) {
                        var a = e.getAttribute("id") || ""
                          , o = this.mapType(e.getAttribute("type") || tk)
                          , s = this.parseFields(e);
                        r && (n[r] = this.createShadowXml(o, a, s),
                        t[r] = this.createShadowInput(o, a, s, i.id),
                        this.adjustInputType(t[r]))
                    }
                }, {
                    key: "transformShadowFieldName",
                    value: function(t, n) {
                        var r = e.SHADOW_FIELD_NAME_MAP[t];
                        if (r)
                            return r;
                        for (var i = 0, a = Object.entries(e.SHADOW_FIELD_NAME_MAP); i < a.length; i++) {
                            var o = (0,
                            x.Z)(a[i], 2)
                              , s = o[0]
                              , c = o[1];
                            if (t.includes(s))
                                return c
                        }
                        return n
                    }
                }, {
                    key: "createShadowXml",
                    value: function(e, t, n) {
                        var r = this
                          , i = rk("shadow", {
                            xmlns: ek,
                            type: e,
                            id: t,
                            visible: "visible"
                        });
                        return Object.entries(n).forEach((function(t) {
                            var n = (0,
                            x.Z)(t, 2)
                              , a = n[0]
                              , o = n[1]
                              , s = r.transformShadowFieldName(e, a)
                              , c = rk("field", {
                                name: s
                            });
                            c.textContent = o,
                            i.appendChild(c)
                        }
                        )),
                        i.outerHTML
                    }
                }, {
                    key: "createEmptyXml",
                    value: function(e, t, n) {
                        var r = rk("empty", {
                            xmlns: ek,
                            type: e,
                            id: t,
                            visible: "visible",
                            editable: "false"
                        });
                        return Object.entries(n).forEach((function(e) {
                            var t = (0,
                            x.Z)(e, 2)
                              , n = t[0]
                              , i = t[1]
                              , a = rk("field", {
                                name: n
                            });
                            a.textContent = i,
                            r.appendChild(a)
                        }
                        )),
                        r.outerHTML
                    }
                }, {
                    key: "createShadowInput",
                    value: function(e, t, n, r) {
                        return {
                            type: e,
                            id: t,
                            is_shadow: !0,
                            fields: n,
                            field_constraints: {
                                NUM: {
                                    min: null,
                                    max: null,
                                    precision: 0,
                                    mod: null
                                }
                            },
                            is_output: !0,
                            parent_id: r,
                            shield: !1
                        }
                    }
                }, {
                    key: "adjustInputType",
                    value: function(e) {
                        var t, n, r;
                        "y" === (null == (t = e.fields) ? void 0 : t.coordinate) || "x" === (null == (n = e.fields) ? void 0 : n.coordinate) ? e.type = "coordinate_of_sprite" : (null == (r = e.fields) ? void 0 : r.coordinate) && (e.type = "style_of_sprite")
                    }
                }, {
                    key: "handleBroadcastField",
                    value: function(e, t, n) {
                        var r;
                        e.inputs = (0,
                        N.Z)((0,
                        N.Z)({}, e.inputs), {}, {
                            message: {
                                type: "broadcast_input",
                                id: nk(),
                                is_shadow: !0,
                                fields: {
                                    message: this.getBroadcastMessage(t)
                                },
                                is_output: !0,
                                parent_id: n,
                                shield: !1
                            }
                        }),
                        e.shadows = {
                            message: '<shadow xmlns="http://www.w3.org/1999/xhtml" type="broadcast_input" id="'.concat(nk(), '" visible="visible"><field name="message">').concat(this.getBroadcastMessage(t), "</field></shadow>")
                        },
                        null == (r = e.fields) || delete r.message
                    }
                }, {
                    key: "getBroadcastMessage",
                    value: function(e) {
                        var t, n, r;
                        return "?" === e ? e : Object.keys(null == (t = this.nemoBcm.broadcast) ? void 0 : t.broadcast_dict).length > 0 ? (null == (r = null == (n = this.nemoBcm.broadcast) ? void 0 : n.broadcast_dict[e]) ? void 0 : r.name) || "?" : e
                    }
                }, {
                    key: "handleProcedureFields",
                    value: function(e, t) {
                        if ("procedures_2_callnoreturn" === e.type || "procedures_2_callreturn" === e.type) {
                            var n = "procedures_2_callreturn" === e.type ? Xw.ROUND : Xw.NORMAL
                              , r = this.findMatchingProcedure(t.NAME, n);
                            r && (e.fields = (0,
                            N.Z)((0,
                            N.Z)({}, e.fields), {}, {
                                NAME: r.id
                            }))
                        }
                        "procedures_2_parameter" !== e.type && "procedures_2_parameter_shadow" !== e.type || this.handleProcedureParameterMutation(e, t, this.currentProcedure[0].name)
                    }
                }, {
                    key: "handleProcedureParameterMutation",
                    value: function(e, t, n) {
                        var r, i;
                        if (null == (i = null == (r = this.currentProcedure) ? void 0 : r[0]) ? void 0 : i.parent_type) {
                            var a = this.currentProcedure[0].parent_type
                              , o = Object.values(this.proceduresDict).find((function(e) {
                                return e.name === n && e.type === a
                            }
                            ));
                            if (o) {
                                var s = o.params.slice(1).find((function(e) {
                                    return "String" === e.type && e.name === t.param_name
                                }
                                ));
                                if (s) {
                                    var c = rk("mutation", {
                                        xmlns: ek,
                                        id: s.id
                                    });
                                    e.mutation = c.outerHTML
                                }
                            }
                        }
                    }
                }, {
                    key: "isProcedureCallBlock",
                    value: function(e) {
                        return "procedures_2_callnoreturn" === e || "procedures_2_callreturn" === e
                    }
                }, {
                    key: "handleProcedureCallMutation",
                    value: function(e, t) {
                        var n = e.getAttribute("name") || ""
                          , r = "procedures_2_callreturn" === t.type ? Xw.ROUND : Xw.NORMAL
                          , i = this.findMatchingProcedure(n, r);
                        i && (t.mutation = this.createProcedureCallMutation(i, e),
                        this.createProcedureShadows(i, t))
                    }
                }, {
                    key: "createProcedureShadows",
                    value: function(e, t) {
                        var n = {};
                        e.params.forEach((function(e) {
                            "Label" === e.type && (n.NAME = "",
                            n[e.id] = "")
                        }
                        )),
                        Object.keys(n).length > 0 && (t.shadows = n)
                    }
                }, {
                    key: "createProcedureCallMutation",
                    value: function(e, t) {
                        var n = rk("mutation", {
                            xmlns: ek,
                            def_id: e.id,
                            name: e.id,
                            type: e.type
                        });
                        if (this.currentActor)
                            e.params.forEach((function(e) {
                                var t = rk("arg", {
                                    id: e.id,
                                    content: e.name,
                                    type: e.type
                                });
                                n.appendChild(t)
                            }
                            ));
                        else {
                            var r = e.params.find((function(e) {
                                return "Label" === e.type
                            }
                            ));
                            if (r) {
                                var i = rk("arg", {
                                    id: r.id,
                                    content: t.getAttribute("name") || "",
                                    type: "Label"
                                });
                                n.appendChild(i)
                            }
                            var a = t.getElementsByTagName("procedures_2_parameter_shadow");
                            Array.from(a).forEach((function(t) {
                                var r = t.getAttribute("name") || ""
                                  , i = e.params.find((function(e) {
                                    return e.name === r && "String" === e.type
                                }
                                ));
                                if (i) {
                                    var a = rk("arg", {
                                        id: i.id,
                                        content: i.name,
                                        type: "String"
                                    });
                                    n.appendChild(a)
                                }
                            }
                            ))
                        }
                        return n.outerHTML
                    }
                }]),
                e
            }();
            j(ik, "SHADOW_FIELD_NAME_MAP", {
                get_play_audio: "audio_id",
                get_stop_audio: "audio_id",
                self_dialog_wait: "text"
            });
            var ak = ik
              , ok = {
                x: 100,
                y: 50
            }
              , sk = 562
              , ck = 900;
            function uk(e, t) {
                var n = t.match(/^(.*?)(\d+)?$/)
                  , r = "";
                return r = n ? n[1] + function(e, t) {
                    for (var n = "", r = 0, i = e.length - 1, a = t.length - 1; i >= 0 || a >= 0 || r > 0; ) {
                        var o = (+e[i] || 0) + (+t[a] || 0) + r;
                        o > 9 ? (r = 1,
                        o -= 10) : r = 0,
                        n = o + n,
                        i--,
                        a--
                    }
                    return n
                }(n[2] || "0", "1") : "".concat(t, "1"),
                e.includes(r) && (r = uk(e, r)),
                r
            }
            function lk(e, t) {
                var n, r, i, a, o, s, c, u = t ? function(e, t) {
                    if (t) {
                        var n = function(e, t) {
                            for (var n = Vw(e), r = Zw().bcm_version, i = {
                                "0.9.3": Yw,
                                "0.14.0": Fw
                            }, a = hp(t); Ww(n, r); ) {
                                var o = i[n];
                                if (!o)
                                    break;
                                var s = o(a);
                                a = s.new_bcm,
                                n = Vw(s.new_version)
                            }
                            return a
                        }(t, e);
                        return n
                    }
                    return e
                }(e, t) : e, l = "https://static.codemao.cn/nemo/22/", p = {
                    scenes: {
                        scenesDict: {},
                        currentSceneId: "",
                        sortList: [""]
                    },
                    styles: {
                        stylesDict: {}
                    },
                    version: "",
                    stageSize: {
                        width: sk,
                        height: ck
                    },
                    variables: {
                        variablesDict: {}
                    },
                    broadcasts: {
                        broadcastsDict: {}
                    },
                    actors: {
                        actorsDict: {}
                    },
                    audios: {
                        audiosDict: {},
                        sortList: [],
                        currentAudioId: ""
                    },
                    procedures: {
                        proceduresDict: {}
                    },
                    previewUrl: ""
                }, d = new ak(u), h = (null == (i = null == u ? void 0 : u.procedures) ? void 0 : i.procedure_dict) && d.parseProcedures(null == (a = null == u ? void 0 : u.procedures) ? void 0 : a.procedure_dict);
                p.procedures.proceduresDict = h,
                p.actors.actorsDict = Md(u.actors.actors_dict, (function(e) {
                    var t = (0,
                    N.Z)((0,
                    N.Z)({}, hp(e)), {}, {
                        locked: e.locked || !1,
                        position: {
                            x: Ad(e.x) || Ad(e.y) ? 0 : e.x,
                            y: Ad(e.x) || Ad(e.y) ? 0 : e.y
                        },
                        scale: Ad(e.scale) ? e.scale : Math.floor(e.scale),
                        currentStyleId: e.current_style_id,
                        nekoBlockJsonList: [],
                        workspaceScrollXy: ok
                    })
                      , n = d.parseBlocksXML("<root>".concat(t.blocksXML, "</root>"), t).filter((function(e) {
                        return "" !== e.type
                    }
                    ));
                    return t.nekoBlockJsonList = n,
                    t
                }
                )),
                p.scenes.scenesDict = Md(u.scenes.scenes_dict, (function(e) {
                    var t = (0,
                    N.Z)((0,
                    N.Z)({}, e), {}, {
                        screenName: "",
                        actorIds: [],
                        currentStyleId: "",
                        nekoBlockJsonList: [],
                        workspaceScrollXy: ok
                    })
                      , n = d.parseBlocksXML("<root>".concat(t.blocksXML, "</root>"), t).filter((function(e) {
                        return "" !== e.type
                    }
                    ));
                    t.nekoBlockJsonList = n,
                    t.name = "\u80cc\u666f";
                    var r = u.scenes.scenes_order.indexOf(t.id) + 1;
                    return t.screenName = "\u5c4f\u5e55".concat(r),
                    e.actors && (t.actorIds = e.actors.slice().reverse()),
                    e.current_style_id && (t.currentStyleId = e.current_style_id),
                    t.workspaceScrollXy = ok,
                    t
                }
                )),
                p.scenes.currentSceneId = u.scenes.scenes_order[0],
                p.scenes.sortList = u.scenes.scenes_order;
                var f = [];
                p.audios.audiosDict = Md(u.audios.sounds, (function(e) {
                    if ("mid" === e.ext)
                        return (0,
                        N.Z)((0,
                        N.Z)({}, e), {}, {
                            id: e.id,
                            name: e.name,
                            url: ""
                        });
                    var t = (0,
                    N.Z)((0,
                    N.Z)({}, e), {}, {
                        id: e.id,
                        name: e.name,
                        url: -1 === e.url.indexOf("https") ? l + e.url : e.url
                    });
                    return f.push(t.id),
                    t
                }
                )),
                p.audios.audiosDict = Sd(p.audios.audiosDict, (function(e) {
                    return void 0 !== e
                }
                )),
                p.audios.sortList = f,
                p.audios.currentAudioId = f.length > 0 ? f[0] : "",
                p.styles.stylesDict = Md(u.styles.styles_dict, (function(e) {
                    var t = (0,
                    N.Z)({}, e);
                    return t.texture && (t.url = l + t.texture),
                    !t.url.endsWith(".webp?imageView2/0/format/png") && t.url.endsWith(".webp") && (t.url = t.url.replace(/\.webp$/, ".webp?imageView2/0/format/png")),
                    t.center_point && (t.centerPoint = t.center_point,
                    delete t.center_point),
                    t
                }
                )),
                p.broadcasts.broadcastsDict = Object.keys(u.broadcast.broadcast_dict).reduce((function(e, t) {
                    var n = u.broadcast.broadcast_dict[t];
                    return e[n.scene] ? e[n.scene].push(n.name) : e[n.scene] = [n.name],
                    e
                }
                ), {});
                var m = []
                  , g = [];
                p.variables.variablesDict = Object.entries(u.variable.variable_dict).reduce((function(e, t) {
                    var n, r, i, a, o = (0,
                    x.Z)(t, 2), s = o[0], c = o[1], l = (null == (n = null == c ? void 0 : c.position) ? void 0 : n.x) || 0, p = (null == (r = null == c ? void 0 : c.position) ? void 0 : r.y) || 0, d = {
                        x: l + ((null == (i = u.stage_size) ? void 0 : i.width) || sk) / 2,
                        y: ((null == (a = u.stage_size) ? void 0 : a.height) || ck) / 2 - p
                    }, h = c.name;
                    "list" === c.type ? (h = g.includes(h) ? uk(g, h) : h,
                    g.push(h)) : (h = m.includes(h) ? uk(m, h) : h,
                    m.push(h));
                    var f = {
                        id: c.id,
                        type: "private" === c.type ? "any" : c.type,
                        name: h,
                        value: "public" === c.type || "private" === c.type ? 0 : c.value,
                        visible: c.visible,
                        position: d || {
                            x: 0,
                            y: 0
                        },
                        isGlobal: c.is_global,
                        createTime: c.create_time || Date.now(),
                        scale: c.scale,
                        style: Kw.DEFAULT,
                        currentEntityId: c.current_entity
                    };
                    return e[s] = f,
                    e
                }
                ), {});
                var y = null !== (n = null == (o = u.stage_size) ? void 0 : o.width) && void 0 !== n ? n : sk
                  , v = null !== (r = null == (s = u.stage_size) ? void 0 : s.height) && void 0 !== r ? r : ck;
                p.stageSize = y > v ? {
                    width: ck,
                    height: sk
                } : {
                    width: sk,
                    height: ck
                };
                if (u.variable.variable_dict.timer && "timer" === u.variable.variable_dict.timer.type) {
                    var _, A = null !== (_ = null == (c = u.stage_size) ? void 0 : c.width) && void 0 !== _ ? _ : sk, M = {
                        x: A - 160 - 20,
                        y: 12
                    };
                    p.timerPosition = M
                }
                var T = u.toolbox;
                if (T) {
                    var b = T.devices;
                    Array.isArray(b) ? p.extension = b : "string" === typeof b && (p.extension = [b])
                }
                var E = "project_name"in u ? u.project_name : "\u65b0\u7684\u4f5c\u54c1";
                return p.projectName = E,
                p
            }
            var pk = function() {
                function e(t, n) {
                    var r = this;
                    (0,
                    D.Z)(this, e),
                    j(this, "bcm"),
                    j(this, "blockParser"),
                    j(this, "parsesScene", (function(e) {
                        var t = e.actorIds.map((function(e) {
                            var t = r.bcm.actors.actorsDict[e];
                            return t ? r.parsesActor(t) : ""
                        }
                        ));
                        return "# ".concat(e.name, ":\n### \u4ee3\u7801:\n```codemao\n").concat(e.nekoBlockJsonList.map((function(e) {
                            return r.blockParser.parse(e)
                        }
                        )).join("\n"), "\n```\n").concat(t.join("\n"), "\n")
                    }
                    )),
                    j(this, "parsesActor", (function(e) {
                        return "## ".concat(e.name, ":\n### \u5c5e\u6027:\n```json\n").concat(JSON.stringify(r.parsesActorProperty(e), null, 2), "\n```\n### \u4ee3\u7801:\n```codemao\n").concat(e.nekoBlockJsonList.map((function(e) {
                            return r.blockParser.parse(e)
                        }
                        )).join("\n\n"), "\n```\n")
                    }
                    )),
                    j(this, "parsesActorProperty", (function(e) {
                        return {
                            "\u89d2\u8272\u540d": e.name,
                            "\u5750\u6807": [Math.floor(e.position.x), Math.floor(e.position.y)],
                            "\u7f29\u653e": Math.floor(100 * e.scale) / 100,
                            "\u65cb\u8f6c": Math.floor(e.rotation || 0)
                        }
                    }
                    )),
                    this.bcm = t,
                    this.blockParser = new Th(t,n)
                }
                return (0,
                C.Z)(e, [{
                    key: "parsesBcmToMarkdown",
                    value: function() {
                        var e = this
                          , t = hd(this.bcm.scenes.sortList, (function(t) {
                            var n = e.bcm.scenes.scenesDict[t];
                            return n ? e.parsesScene(n) : ""
                        }
                        ));
                        return "".concat(t.join("\n"))
                    }
                }]),
                e
            }()
              , dk = function(e, t) {
                return lk(e, t)
            }
              , hk = function(e, t) {
                return new pk(e,t)
            }
              , fk = function(e, t, n) {
                var r = new Iw(e);
                return r.generateBlockJsons(n, t),
                r.rootBlocks
            }
              , mk = function(e) {
                return function(e) {
                    var t, n = new Cw(e), r = {};
                    Dw = e.size.width > e.size.height,
                    Object.values(e.theatre.scenes).forEach((function(e) {
                        Lw(e, n).forEach((function(e) {
                            return Rw(e, r)
                        }
                        ))
                    }
                    )),
                    Object.values(e.theatre.actors).forEach((function(e) {
                        Lw(e, n).forEach((function(e) {
                            return Rw(e, r)
                        }
                        ))
                    }
                    )),
                    e.procedures = {
                        proceduresDict: r
                    },
                    e.theatre.actors = Md(e.theatre.actors, (function(e) {
                        var t = (0,
                        N.Z)((0,
                        N.Z)({}, Id(e, ["block_data_json", "user_change_r_c", "editable_in_tuition_mode"])), hp(e));
                        return zw(t, r),
                        t
                    }
                    )),
                    e.theatre.scenes = Md(e.theatre.scenes, (function(e) {
                        var t = (0,
                        N.Z)((0,
                        N.Z)({}, Id(e, ["block_data_json"])), hp(e));
                        return zw(t, r),
                        t
                    }
                    )),
                    (null == (t = e.toolbox) ? void 0 : t.devices) && (Array.isArray(e.toolbox.devices),
                    e.toolbox.devices);
                    var i = e.broadcasts;
                    return e.broadcasts = {},
                    e.broadcasts.broadcastsDict = i,
                    e
                }(e)
            }
        },