<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/*
  Copyright 2022 Esri

  Licensed under the Apache License, Version 2.0 (the "License");

  you may not use this file except in compliance with the License.

  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software

  distributed under the License is distributed on an "AS IS" BASIS,

  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  See the License for the specific language governing permissions and

  limitations under the License.â€‹
*/
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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" &amp;&amp; b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        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", "esri/widgets/Widget", "esri/widgets/support/widget"], function (require, exports, decorators_1, Widget_1, widget_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    Widget_1 = __importDefault(Widget_1);
    var CSS = {
        base: "esri-interactive-legend-ga-alert",
        optOutButton: "esri-interactive-legend__opt-out-button"
    };
    var Alert = /** @class */ (function (_super) {
        __extends(Alert, _super);
        function Alert(params) {
            var _this = _super.call(this, params) || this;
            _this._alertNode = null;
            _this.state = "nothingDoneYet";
            return _this;
        }
        // @property()
        // @messageBundle("dist/assets/t9n/widgets/Alert/Alert")
        // messages = null;
        Alert.prototype.render = function () {
            var _this = this;
            var _a;
            var theme = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.theme) === "dark"
                ? "calcite-mode-dark"
                : "calcite-mode-light";
            return ((0, widget_1.tsx)("div", { bind: this },
                (0, widget_1.tsx)("calcite-alert", { afterCreate: widget_1.storeNode, bind: this, "data-node-ref": "_alertNode", oncalciteAlertClose: this.handleClose.bind(this), scale: "s", active: true, open: true, class: this.classes(CSS.base, theme) },
                    (0, widget_1.tsx)("div", { slot: "message" },
                        (0, widget_1.tsx)("div", null,
                            (0, widget_1.tsx)("span", { style: "padding:0 5px;", afterCreate: function (container) {
                                    var _a;
                                    container.innerHTML = (_a = _this === null || _this === void 0 ? void 0 : _this.config) === null || _a === void 0 ? void 0 : _a.googleAnalyticsConsentMsg;
                                } }),
                            (0, widget_1.tsx)("calcite-button", { scale: "s", slot: "link", bind: this, onclick: this.handleClick.bind(this), class: CSS.optOutButton }, "Opt In"))))));
        };
        Alert.prototype.handleClick = function () {
            localStorage.setItem("".concat(this.appName), "true");
            this.state = "consentGiven";
        };
        Alert.prototype.handleClose = function () {
            localStorage.setItem("".concat(this.appName), "false");
            this.state = "consentNotGiven";
        };
        __decorate([
            (0, decorators_1.property)()
        ], Alert.prototype, "appName", void 0);
        __decorate([
            (0, decorators_1.property)()
        ], Alert.prototype, "state", void 0);
        __decorate([
            (0, decorators_1.property)()
        ], Alert.prototype, "config", void 0);
        Alert = __decorate([
            (0, decorators_1.subclass)("Alert")
        ], Alert);
        return Alert;
    }(Widget_1.default));
    exports.default = Alert;
});
</pre></body></html>