<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">var __extends = (this &amp;&amp; this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array &amp;&amp; function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this &amp;&amp; this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c &lt; 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" &amp;&amp; typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i &gt;= 0; i--) if (d = decorators[i]) r = (c &lt; 3 ? d(r) : c &gt; 3 ? d(target, key, r) : d(target, key)) || r;
    return c &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(target, key, r), r;
};
var __importDefault = (this &amp;&amp; this.__importDefault) || function (mod) {
    return (mod &amp;&amp; mod.__esModule) ? mod : { "default": mod };
};
define(["require", "exports", "esri/core/accessorSupport/decorators", "./PanelViewModel"], function (require, exports, decorators_1, PanelViewModel_1) {
    "use strict";
    PanelViewModel_1 = __importDefault(PanelViewModel_1);
    var MobilePanelViewModel = /** @class */ (function (_super) {
        __extends(MobilePanelViewModel, _super);
        function MobilePanelViewModel(props) {
            var _this = _super.call(this, props) || this;
            _this.mobilePanel = null;
            return _this;
        }
        MobilePanelViewModel.prototype.expandPanel = function (e) {
            var _a, _b;
            // move height to max height (add a class) then change arrow to down 
            var container = e.target;
            var block = (_b = (_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.parentNode;
            if (!container &amp;&amp; !block)
                return;
            if (container.classList.contains("action-img-expand")) {
                // remove expand and add collapse
                container.classList.add("action-img-collapse");
                container.classList.remove("action-img-expand");
            }
            else {
                container.classList.remove("action-img-collapse");
                container.classList.add("action-img-expand");
            }
            this.mobilePanel.classList.toggle("full");
        };
        MobilePanelViewModel.prototype.closePanel = function (e) {
            var _a, _b;
            // search for mobile block container (full) and remove full class
            var nodes = document.getElementsByClassName("mobile-block-container full");
            for (var index = 0; index &lt; nodes.length; index++) {
                var element = nodes[index];
                var buttonNodes = element.getElementsByClassName("action-img-collapse");
                element.classList.remove("full");
                for (var i = 0; i &lt; buttonNodes.length; index++) {
                    var node = buttonNodes[index];
                    node.classList.remove("action-img-collapse");
                    node.classList.add("action-img-expand");
                }
            }
            // close everything 
            this.actions.forEach(function (action) {
                action.active = false;
            });
            if (this === null || this === void 0 ? void 0 : this.featureList) {
                this.featureList.features = null;
                this.featureList.clearHighlight();
            }
            if (((_b = (_a = this.view) === null || _a === void 0 ? void 0 : _a.popup) === null || _b === void 0 ? void 0 : _b.selectedFeature) &amp;&amp; this.applicationConfig.popupPanel) {
                this.view.popup.clear();
            }
        };
        MobilePanelViewModel.prototype.openPanel = function (e) {
            // open selected 
            var item = e.target;
            var value = item === null || item === void 0 ? void 0 : item.value;
            // open selected close others 
            this.actions.forEach(function (action) {
                if (value === action.name) {
                    action.active = true;
                }
                else { // hide others 
                    action.active = false;
                }
            });
        };
        MobilePanelViewModel.prototype.destroy = function () {
        };
        __decorate([
            decorators_1.property()
        ], MobilePanelViewModel.prototype, "mobilePanel", void 0);
        __decorate([
            decorators_1.property()
        ], MobilePanelViewModel.prototype, "applicationConfig", void 0);
        MobilePanelViewModel = __decorate([
            decorators_1.subclass("esri.demo.PanelViewModel")
        ], MobilePanelViewModel);
        return MobilePanelViewModel;
    }((PanelViewModel_1.default)));
    return MobilePanelViewModel;
});
</pre></body></html>