var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb2, mod) => function __require() {
  return mod || (0, cb2[__getOwnPropNames(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));

// node_modules/@microsoft/teams-js/dist/MicrosoftTeams.min.js
var require_MicrosoftTeams_min = __commonJS({
  "node_modules/@microsoft/teams-js/dist/MicrosoftTeams.min.js"(exports, module) {
    !function(e, n) {
      "object" == typeof exports && "object" == typeof module ? module.exports = n() : "function" == typeof define && define.amd ? define("microsoftTeams", [], n) : "object" == typeof exports ? exports.microsoftTeams = n() : e.microsoftTeams = n();
    }(self, function() {
      return (() => {
        var e = { 22: (e2, n2, t2) => {
          var o2 = t2(481), i = t2(426), r = i;
          r.v1 = o2, r.v4 = i, e2.exports = r;
        }, 725: (e2) => {
          for (var n2 = [], t2 = 0; t2 < 256; ++t2) n2[t2] = (t2 + 256).toString(16).substr(1);
          e2.exports = function(e3, t3) {
            var o2 = t3 || 0, i = n2;
            return [i[e3[o2++]], i[e3[o2++]], i[e3[o2++]], i[e3[o2++]], "-", i[e3[o2++]], i[e3[o2++]], "-", i[e3[o2++]], i[e3[o2++]], "-", i[e3[o2++]], i[e3[o2++]], "-", i[e3[o2++]], i[e3[o2++]], i[e3[o2++]], i[e3[o2++]], i[e3[o2++]], i[e3[o2++]]].join("");
          };
        }, 157: (e2) => {
          var n2 = "undefined" != typeof crypto && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || "undefined" != typeof msCrypto && "function" == typeof window.msCrypto.getRandomValues && msCrypto.getRandomValues.bind(msCrypto);
          if (n2) {
            var t2 = new Uint8Array(16);
            e2.exports = function() {
              return n2(t2), t2;
            };
          } else {
            var o2 = new Array(16);
            e2.exports = function() {
              for (var e3, n3 = 0; n3 < 16; n3++) 0 == (3 & n3) && (e3 = 4294967296 * Math.random()), o2[n3] = e3 >>> ((3 & n3) << 3) & 255;
              return o2;
            };
          }
        }, 481: (e2, n2, t2) => {
          var o2, i, r = t2(157), a = t2(725), s = 0, l = 0;
          e2.exports = function(e3, n3, t3) {
            var c = n3 && t3 || 0, u = n3 || [], d = (e3 = e3 || {}).node || o2, f = void 0 !== e3.clockseq ? e3.clockseq : i;
            if (null == d || null == f) {
              var p = r();
              null == d && (d = o2 = [1 | p[0], p[1], p[2], p[3], p[4], p[5]]), null == f && (f = i = 16383 & (p[6] << 8 | p[7]));
            }
            var g = void 0 !== e3.msecs ? e3.msecs : (/* @__PURE__ */ new Date()).getTime(), m = void 0 !== e3.nsecs ? e3.nsecs : l + 1, h = g - s + (m - l) / 1e4;
            if (h < 0 && void 0 === e3.clockseq && (f = f + 1 & 16383), (h < 0 || g > s) && void 0 === e3.nsecs && (m = 0), m >= 1e4) throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
            s = g, l = m, i = f;
            var C = (1e4 * (268435455 & (g += 122192928e5)) + m) % 4294967296;
            u[c++] = C >>> 24 & 255, u[c++] = C >>> 16 & 255, u[c++] = C >>> 8 & 255, u[c++] = 255 & C;
            var w = g / 4294967296 * 1e4 & 268435455;
            u[c++] = w >>> 8 & 255, u[c++] = 255 & w, u[c++] = w >>> 24 & 15 | 16, u[c++] = w >>> 16 & 255, u[c++] = f >>> 8 | 128, u[c++] = 255 & f;
            for (var v = 0; v < 6; ++v) u[c + v] = d[v];
            return n3 || a(u);
          };
        }, 426: (e2, n2, t2) => {
          var o2 = t2(157), i = t2(725);
          e2.exports = function(e3, n3, t3) {
            var r = n3 && t3 || 0;
            "string" == typeof e3 && (n3 = "binary" === e3 ? new Array(16) : null, e3 = null);
            var a = (e3 = e3 || {}).random || (e3.rng || o2)();
            if (a[6] = 15 & a[6] | 64, a[8] = 63 & a[8] | 128, n3) for (var s = 0; s < 16; ++s) n3[r + s] = a[s];
            return n3 || i(a);
          };
        }, 227: (e2, n2, t2) => {
          n2.formatArgs = function(n3) {
            if (n3[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + n3[0] + (this.useColors ? "%c " : " ") + "+" + e2.exports.humanize(this.diff), !this.useColors) return;
            const t3 = "color: " + this.color;
            n3.splice(1, 0, t3, "color: inherit");
            let o3 = 0, i = 0;
            n3[0].replace(/%[a-zA-Z%]/g, (e3) => {
              "%%" !== e3 && (o3++, "%c" === e3 && (i = o3));
            }), n3.splice(i, 0, t3);
          }, n2.save = function(e3) {
            try {
              e3 ? n2.storage.setItem("debug", e3) : n2.storage.removeItem("debug");
            } catch (e4) {
            }
          }, n2.load = function() {
            let e3;
            try {
              e3 = n2.storage.getItem("debug");
            } catch (e4) {
            }
            !e3 && "undefined" != typeof process && "env" in process && (e3 = process.env.DEBUG);
            return e3;
          }, n2.useColors = function() {
            if ("undefined" != typeof window && window.process && ("renderer" === window.process.type || window.process.__nwjs)) return true;
            if ("undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return false;
            return "undefined" != typeof document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || "undefined" != typeof window && window.console && (window.console.firebug || window.console.exception && window.console.table) || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
          }, n2.storage = function() {
            try {
              return localStorage;
            } catch (e3) {
            }
          }(), n2.destroy = /* @__PURE__ */ (() => {
            let e3 = false;
            return () => {
              e3 || (e3 = true, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
            };
          })(), n2.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"], n2.log = console.debug || console.log || (() => {
          }), e2.exports = t2(447)(n2);
          const { formatters: o2 } = e2.exports;
          o2.j = function(e3) {
            try {
              return JSON.stringify(e3);
            } catch (e4) {
              return "[UnexpectedJSONParseError]: " + e4.message;
            }
          };
        }, 447: (e2, n2, t2) => {
          e2.exports = function(e3) {
            function n3(e4) {
              let t3, i2, r, a = null;
              function s(...e5) {
                if (!s.enabled) return;
                const o3 = s, i3 = Number(/* @__PURE__ */ new Date()), r2 = i3 - (t3 || i3);
                o3.diff = r2, o3.prev = t3, o3.curr = i3, t3 = i3, e5[0] = n3.coerce(e5[0]), "string" != typeof e5[0] && e5.unshift("%O");
                let a2 = 0;
                e5[0] = e5[0].replace(/%([a-zA-Z%])/g, (t4, i4) => {
                  if ("%%" === t4) return "%";
                  a2++;
                  const r3 = n3.formatters[i4];
                  if ("function" == typeof r3) {
                    const n4 = e5[a2];
                    t4 = r3.call(o3, n4), e5.splice(a2, 1), a2--;
                  }
                  return t4;
                }), n3.formatArgs.call(o3, e5);
                (o3.log || n3.log).apply(o3, e5);
              }
              return s.namespace = e4, s.useColors = n3.useColors(), s.color = n3.selectColor(e4), s.extend = o2, s.destroy = n3.destroy, Object.defineProperty(s, "enabled", { enumerable: true, configurable: false, get: () => null !== a ? a : (i2 !== n3.namespaces && (i2 = n3.namespaces, r = n3.enabled(e4)), r), set: (e5) => {
                a = e5;
              } }), "function" == typeof n3.init && n3.init(s), s;
            }
            function o2(e4, t3) {
              const o3 = n3(this.namespace + (void 0 === t3 ? ":" : t3) + e4);
              return o3.log = this.log, o3;
            }
            function i(e4) {
              return e4.toString().substring(2, e4.toString().length - 2).replace(/\.\*\?$/, "*");
            }
            return n3.debug = n3, n3.default = n3, n3.coerce = function(e4) {
              if (e4 instanceof Error) return e4.stack || e4.message;
              return e4;
            }, n3.disable = function() {
              const e4 = [...n3.names.map(i), ...n3.skips.map(i).map((e5) => "-" + e5)].join(",");
              return n3.enable(""), e4;
            }, n3.enable = function(e4) {
              let t3;
              n3.save(e4), n3.namespaces = e4, n3.names = [], n3.skips = [];
              const o3 = ("string" == typeof e4 ? e4 : "").split(/[\s,]+/), i2 = o3.length;
              for (t3 = 0; t3 < i2; t3++) o3[t3] && ("-" === (e4 = o3[t3].replace(/\*/g, ".*?"))[0] ? n3.skips.push(new RegExp("^" + e4.substr(1) + "$")) : n3.names.push(new RegExp("^" + e4 + "$")));
            }, n3.enabled = function(e4) {
              if ("*" === e4[e4.length - 1]) return true;
              let t3, o3;
              for (t3 = 0, o3 = n3.skips.length; t3 < o3; t3++) if (n3.skips[t3].test(e4)) return false;
              for (t3 = 0, o3 = n3.names.length; t3 < o3; t3++) if (n3.names[t3].test(e4)) return true;
              return false;
            }, n3.humanize = t2(824), n3.destroy = function() {
              console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
            }, Object.keys(e3).forEach((t3) => {
              n3[t3] = e3[t3];
            }), n3.names = [], n3.skips = [], n3.formatters = {}, n3.selectColor = function(e4) {
              let t3 = 0;
              for (let n4 = 0; n4 < e4.length; n4++) t3 = (t3 << 5) - t3 + e4.charCodeAt(n4), t3 |= 0;
              return n3.colors[Math.abs(t3) % n3.colors.length];
            }, n3.enable(n3.load()), n3;
          };
        }, 824: (e2) => {
          var n2 = 1e3, t2 = 60 * n2, o2 = 60 * t2, i = 24 * o2;
          function r(e3) {
            if (!((e3 = String(e3)).length > 100)) {
              var r2 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e3);
              if (r2) {
                var a2 = parseFloat(r2[1]);
                switch ((r2[2] || "ms").toLowerCase()) {
                  case "years":
                  case "year":
                  case "yrs":
                  case "yr":
                  case "y":
                    return 315576e5 * a2;
                  case "weeks":
                  case "week":
                  case "w":
                    return 6048e5 * a2;
                  case "days":
                  case "day":
                  case "d":
                    return a2 * i;
                  case "hours":
                  case "hour":
                  case "hrs":
                  case "hr":
                  case "h":
                    return a2 * o2;
                  case "minutes":
                  case "minute":
                  case "mins":
                  case "min":
                  case "m":
                    return a2 * t2;
                  case "seconds":
                  case "second":
                  case "secs":
                  case "sec":
                  case "s":
                    return a2 * n2;
                  case "milliseconds":
                  case "millisecond":
                  case "msecs":
                  case "msec":
                  case "ms":
                    return a2;
                  default:
                    return;
                }
              }
            }
          }
          function a(e3) {
            var r2 = Math.abs(e3);
            return r2 >= i ? Math.round(e3 / i) + "d" : r2 >= o2 ? Math.round(e3 / o2) + "h" : r2 >= t2 ? Math.round(e3 / t2) + "m" : r2 >= n2 ? Math.round(e3 / n2) + "s" : e3 + "ms";
          }
          function s(e3) {
            var r2 = Math.abs(e3);
            return r2 >= i ? l(e3, r2, i, "day") : r2 >= o2 ? l(e3, r2, o2, "hour") : r2 >= t2 ? l(e3, r2, t2, "minute") : r2 >= n2 ? l(e3, r2, n2, "second") : e3 + " ms";
          }
          function l(e3, n3, t3, o3) {
            var i2 = n3 >= 1.5 * t3;
            return Math.round(e3 / t3) + " " + o3 + (i2 ? "s" : "");
          }
          e2.exports = function(e3, n3) {
            n3 = n3 || {};
            var t3 = typeof e3;
            if ("string" === t3 && e3.length > 0) return r(e3);
            if ("number" === t3 && isFinite(e3)) return n3.long ? s(e3) : a(e3);
            throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e3));
          };
        } }, n = {};
        function t(o2) {
          var i = n[o2];
          if (void 0 !== i) return i.exports;
          var r = n[o2] = { exports: {} };
          return e[o2](r, r.exports, t), r.exports;
        }
        (() => {
          t.d = (e2, n2) => {
            for (var o2 in n2) t.o(n2, o2) && !t.o(e2, o2) && Object.defineProperty(e2, o2, { enumerable: true, get: n2[o2] });
          };
        })(), (() => {
          t.o = (e2, n2) => Object.prototype.hasOwnProperty.call(e2, n2);
        })(), (() => {
          t.r = (e2) => {
            "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e2, "__esModule", { value: true });
          };
        })();
        var o = {};
        return (() => {
          "use strict";
          t.r(o), t.d(o, { ActionObjectType: () => n2, ChannelType: () => S, ChildAppWindow: () => jn, DialogDimension: () => f, ErrorCode: () => r, FileOpenPreference: () => e2, FrameContexts: () => c, HostClientType: () => s, HostName: () => l, NotificationTypes: () => Be, ParentAppWindow: () => Gn, SecondaryM365ContentIdName: () => i, TaskModuleDimension: () => b, TeamType: () => u, UserSettingTypes: () => je, UserTeamRole: () => d, ViewerActionTypes: () => ze, app: () => $, appEntity: () => It, appInitialization: () => Bn, appInstallDialog: () => sn, authentication: () => T, barCode: () => pn, calendar: () => Mn, call: () => Vn, chat: () => gn, conversations: () => Ge, dialog: () => K, enablePrintCapability: () => Kn, executeDeepLink: () => dt, files: () => yt, geoLocation: () => mn, getContext: () => Xn, getMruTabInstances: () => ct, getTabInstances: () => lt, initialize: () => Jn, initializeWithFrameContext: () => pt, location: () => Rn, logs: () => Ve, mail: () => Nn, media: () => fn, meeting: () => On, meetingRoom: () => St, menus: () => Q, monetization: () => An, navigateBack: () => wt, navigateCrossDomain: () => Ct, navigateToTab: () => ht, notifications: () => bt, openFilePreview: () => an, pages: () => Y, people: () => Dn, print: () => Qn, profile: () => Ln, registerAppButtonClickHandler: () => et, registerAppButtonHoverEnterHandler: () => nt, registerAppButtonHoverLeaveHandler: () => tt, registerBackButtonHandler: () => ot, registerBeforeUnloadHandler: () => rt, registerChangeSettingsHandler: () => st, registerCustomHandler: () => on2, registerFocusEnterHandler: () => at, registerFullScreenHandler: () => Yn, registerOnLoadHandler: () => it, registerOnThemeChangeHandler: () => $n, registerUserSettingsChangeHandler: () => rn, remoteCamera: () => Tt, returnFocus: () => mt, search: () => Hn, sendCustomEvent: () => tn, sendCustomMessage: () => nn, setFrameContext: () => ft, settings: () => zn, shareDeepLink: () => ut, sharing: () => Wn, stageView: () => _n, tasks: () => vt, teams: () => Pt, teamsCore: () => X, uploadCustomApp: () => en, video: () => Un, videoEx: () => Et, webStorage: () => xn });
          var e2, n2, i, r, a, s, l, c, u, d, f, p = "2.3.0", g = "2.0.1", m = "2.0.3", h = "1.9.0", C = "1.8.0", w = ["teams.microsoft.com", "teams.microsoft.us", "gov.teams.microsoft.us", "dod.teams.microsoft.us", "int.teams.microsoft.com", "teams.live.com", "devspaces.skype.com", "ssauth.skype.com", "local.teams.live.com", "local.teams.live.com:8080", "local.teams.office.com", "local.teams.office.com:8080", "msft.spoppe.com", "*.sharepoint.com", "*.sharepoint-df.com", "*.sharepointonline.com", "outlook.office.com", "outlook-sdf.office.com", "outlook.office365.com", "outlook-sdf.office365.com", "*.teams.microsoft.com", "www.office.com", "word.office.com", "excel.office.com", "powerpoint.office.com", "www.officeppe.com", "*.www.office.com"], v = /^https:\/\//, y = function() {
            function e3() {
            }
            return e3.initializeCalled = false, e3.initializeCompleted = false, e3.additionalValidOrigins = [], e3.isFramelessWindow = false, e3.printCapabilityEnabled = false, e3;
          }();
          !function(e3) {
            e3.Inline = "inline", e3.Desktop = "desktop", e3.Web = "web";
          }(e2 || (e2 = {})), function(e3) {
            e3.M365Content = "m365content";
          }(n2 || (n2 = {})), function(e3) {
            e3.DriveId = "driveId", e3.GroupId = "groupId", e3.SiteId = "siteId", e3.UserId = "userId";
          }(i || (i = {})), function(e3) {
            e3[e3.NOT_SUPPORTED_ON_PLATFORM = 100] = "NOT_SUPPORTED_ON_PLATFORM", e3[e3.INTERNAL_ERROR = 500] = "INTERNAL_ERROR", e3[e3.NOT_SUPPORTED_IN_CURRENT_CONTEXT = 501] = "NOT_SUPPORTED_IN_CURRENT_CONTEXT", e3[e3.PERMISSION_DENIED = 1e3] = "PERMISSION_DENIED", e3[e3.NETWORK_ERROR = 2e3] = "NETWORK_ERROR", e3[e3.NO_HW_SUPPORT = 3e3] = "NO_HW_SUPPORT", e3[e3.INVALID_ARGUMENTS = 4e3] = "INVALID_ARGUMENTS", e3[e3.UNAUTHORIZED_USER_OPERATION = 5e3] = "UNAUTHORIZED_USER_OPERATION", e3[e3.INSUFFICIENT_RESOURCES = 6e3] = "INSUFFICIENT_RESOURCES", e3[e3.THROTTLE = 7e3] = "THROTTLE", e3[e3.USER_ABORT = 8e3] = "USER_ABORT", e3[e3.OPERATION_TIMED_OUT = 8001] = "OPERATION_TIMED_OUT", e3[e3.OLD_PLATFORM = 9e3] = "OLD_PLATFORM", e3[e3.FILE_NOT_FOUND = 404] = "FILE_NOT_FOUND", e3[e3.SIZE_EXCEEDED = 1e4] = "SIZE_EXCEEDED";
          }(r || (r = {})), function(e3) {
            e3.GeoLocation = "geolocation", e3.Media = "media";
          }(a || (a = {})), function(e3) {
            e3.desktop = "desktop", e3.web = "web", e3.android = "android", e3.ios = "ios", e3.ipados = "ipados", e3.rigel = "rigel", e3.surfaceHub = "surfaceHub", e3.teamsRoomsWindows = "teamsRoomsWindows", e3.teamsRoomsAndroid = "teamsRoomsAndroid", e3.teamsPhones = "teamsPhones", e3.teamsDisplays = "teamsDisplays";
          }(s || (s = {})), function(e3) {
            e3.office = "Office", e3.outlook = "Outlook", e3.orange = "Orange", e3.teams = "Teams";
          }(l || (l = {})), function(e3) {
            e3.settings = "settings", e3.content = "content", e3.authentication = "authentication", e3.remove = "remove", e3.task = "task", e3.sidePanel = "sidePanel", e3.stage = "stage", e3.meetingStage = "meetingStage";
          }(c || (c = {})), function(e3) {
            e3[e3.Standard = 0] = "Standard", e3[e3.Edu = 1] = "Edu", e3[e3.Class = 2] = "Class", e3[e3.Plc = 3] = "Plc", e3[e3.Staff = 4] = "Staff";
          }(u || (u = {})), function(e3) {
            e3[e3.Admin = 0] = "Admin", e3[e3.User = 1] = "User", e3[e3.Guest = 2] = "Guest";
          }(d || (d = {})), function(e3) {
            e3.Large = "large", e3.Medium = "medium", e3.Small = "small";
          }(f || (f = {}));
          var S, b = f;
          !function(e3) {
            e3.Regular = "Regular", e3.Private = "Private", e3.Shared = "Shared";
          }(S || (S = {}));
          var T, I = { errorCode: r.NOT_SUPPORTED_ON_PLATFORM }, P = t(22);
          function E(e3, n3) {
            if ("*." === e3.substring(0, 2)) {
              var t2 = e3.substring(1);
              if (n3.length > t2.length && n3.split(".").length === t2.split(".").length && n3.substring(n3.length - t2.length) === t2) return true;
            } else if (e3 === n3) return true;
            return false;
          }
          function F(e3) {
            if ("https:" !== e3.protocol) return false;
            var n3 = e3.host;
            if (w.some(function(e4) {
              return E(e4, n3);
            })) return true;
            for (var t2 = 0, o2 = y.additionalValidOrigins; t2 < o2.length; t2++) {
              var i2 = o2[t2];
              if (E("https://" === i2.substring(0, 8) ? i2.substring(8) : i2, n3)) return true;
            }
            return false;
          }
          function k(e3) {
            return function(n3, t2) {
              if (!n3) throw new Error(e3 || t2);
            };
          }
          function R(e3, n3) {
            if ("string" != typeof e3 || "string" != typeof n3) return NaN;
            var t2 = e3.split("."), o2 = n3.split(".");
            function i2(e4) {
              return /^\d+$/.test(e4);
            }
            if (!t2.every(i2) || !o2.every(i2)) return NaN;
            for (; t2.length < o2.length; ) t2.push("0");
            for (; o2.length < t2.length; ) o2.push("0");
            for (var r2 = 0; r2 < t2.length; ++r2) if (Number(t2[r2]) != Number(o2[r2])) return Number(t2[r2]) > Number(o2[r2]) ? 1 : -1;
            return 0;
          }
          function O() {
            return P.v4();
          }
          function A(e3) {
            return Object.keys(e3).forEach(function(n3) {
              "object" == typeof e3[n3] && A(e3[n3]);
            }), Object.freeze(e3);
          }
          function M(e3, n3) {
            for (var t2 = [], o2 = 2; o2 < arguments.length; o2++) t2[o2 - 2] = arguments[o2];
            var i2 = e3.apply(void 0, t2);
            return i2.then(function(e4) {
              n3 && n3(void 0, e4);
            }).catch(function(e4) {
              n3 && n3(e4);
            }), i2;
          }
          function N(e3, n3) {
            for (var t2 = [], o2 = 2; o2 < arguments.length; o2++) t2[o2 - 2] = arguments[o2];
            var i2 = e3.apply(void 0, t2);
            return i2.then(function() {
              n3 && n3(null);
            }).catch(function(e4) {
              n3 && n3(e4);
            }), i2;
          }
          function D(e3, n3) {
            for (var t2 = [], o2 = 2; o2 < arguments.length; o2++) t2[o2 - 2] = arguments[o2];
            var i2 = e3.apply(void 0, t2);
            return i2.then(function(e4) {
              n3 && n3(null, e4);
            }).catch(function(e4) {
              n3 && n3(e4, null);
            }), i2;
          }
          function L(e3, n3, t2) {
            return new Promise(function(o2, i2) {
              var r2 = setTimeout(i2, n3, t2);
              e3().then(function(e4) {
                clearTimeout(r2), o2(e4);
              }).catch(function(e4) {
                clearTimeout(r2), i2(e4);
              });
            });
          }
          function U(e3) {
            var n3 = new URL("https://teams.microsoft.com/l/entity/" + encodeURIComponent(e3.appId) + "/" + encodeURIComponent(e3.pageId));
            return e3.webUrl && n3.searchParams.append("webUrl", e3.webUrl), (e3.channelId || e3.subPageId) && n3.searchParams.append("context", JSON.stringify({ channelId: e3.channelId, subEntityId: e3.subPageId })), n3.toString();
          }
          function H() {
            for (var e3 = [], n3 = 0; n3 < arguments.length; n3++) e3[n3] = arguments[n3];
            if (!y.initializeCalled) throw new Error("The library has not yet been initialized");
            if (y.frameContext && e3 && e3.length > 0) {
              for (var t2 = false, o2 = 0; o2 < e3.length; o2++) if (e3[o2] === y.frameContext) {
                t2 = true;
                break;
              }
              if (!t2) throw new Error("This call is only allowed in following contexts: " + JSON.stringify(e3) + '. Current context: "' + y.frameContext + '".');
            }
          }
          function W(e3) {
            void 0 === e3 && (e3 = g);
            var n3 = R(y.clientSupportedSDKVersion, e3);
            return !isNaN(n3) && n3 >= 0;
          }
          function _4() {
            return y.hostClientType == s.android || y.hostClientType == s.ios;
          }
          function x(e3) {
            if (void 0 === e3 && (e3 = g), !_4()) throw { errorCode: r.NOT_SUPPORTED_ON_PLATFORM };
            if (!W(e3)) throw { errorCode: r.OLD_PLATFORM };
          }
          function V(e3) {
            var n3 = y.additionalValidOrigins.concat(e3.filter(function(e4) {
              return "string" == typeof e4 && v.test(e4);
            })), t2 = {};
            n3 = n3.filter(function(e4) {
              return !t2[e4] && (t2[e4] = true, true);
            }), y.additionalValidOrigins = n3;
          }
          !function(e3) {
            var n3, t2, o2;
            function i2(e4) {
              return new Promise(function(t3, o3) {
                if (y.hostClientType === s.desktop || y.hostClientType === s.android || y.hostClientType === s.ios || y.hostClientType === s.rigel || y.hostClientType === s.teamsRoomsWindows || y.hostClientType === s.teamsRoomsAndroid || y.hostClientType === s.teamsPhones || y.hostClientType === s.teamsDisplays) {
                  var i3 = document.createElement("a");
                  i3.href = e4.url, t3(Fe("authentication.authenticate", [i3.href, e4.width, e4.height, e4.isExternal]).then(function(e5) {
                    var n4 = e5[0], t4 = e5[1];
                    if (n4) return t4;
                    throw new Error(t4);
                  }));
                } else n3 = { success: t3, fail: o3 }, u2(e4);
              });
            }
            function r2(e4) {
              return new Promise(function(n4) {
                n4(Fe("authentication.getAuthToken", [null == e4 ? void 0 : e4.resources, null == e4 ? void 0 : e4.claims, null == e4 ? void 0 : e4.silent]));
              }).then(function(e5) {
                var n4 = e5[0], t3 = e5[1];
                if (n4) return t3;
                throw new Error(t3);
              });
            }
            function a2() {
              return new Promise(function(e4) {
                e4(Fe("authentication.getUser"));
              }).then(function(e4) {
                var n4 = e4[0], t3 = e4[1];
                if (n4) return t3;
                throw new Error(t3);
              });
            }
            function l2() {
              d2();
              try {
                ve.childWindow && ve.childWindow.close();
              } finally {
                ve.childWindow = null, ve.childOrigin = null;
              }
            }
            function u2(e4) {
              l2();
              var n4 = e4.width || 600, t3 = e4.height || 400;
              n4 = Math.min(n4, ve.currentWindow.outerWidth - 400), t3 = Math.min(t3, ve.currentWindow.outerHeight - 200);
              var o3 = document.createElement("a");
              o3.href = e4.url.replace("{oauthRedirectMethod}", "web");
              var i3 = void 0 !== ve.currentWindow.screenLeft ? ve.currentWindow.screenLeft : ve.currentWindow.screenX, r3 = void 0 !== ve.currentWindow.screenTop ? ve.currentWindow.screenTop : ve.currentWindow.screenY;
              i3 += ve.currentWindow.outerWidth / 2 - n4 / 2, r3 += ve.currentWindow.outerHeight / 2 - t3 / 2, ve.childWindow = ve.currentWindow.open(o3.href, "_blank", "toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top=" + r3 + ", left=" + i3 + ", width=" + n4 + ", height=" + t3), ve.childWindow ? f2() : g2("FailedToOpenWindow");
            }
            function d2() {
              t2 && (clearInterval(t2), t2 = 0), ue("initialize"), ue("navigateCrossDomain");
            }
            function f2() {
              d2(), t2 = ve.currentWindow.setInterval(function() {
                if (!ve.childWindow || ve.childWindow.closed) g2("CancelledByUser");
                else {
                  var e4 = ve.childOrigin;
                  try {
                    ve.childOrigin = "*", Qe("ping");
                  } finally {
                    ve.childOrigin = e4;
                  }
                }
              }, 100), ce("initialize", function() {
                return [c.authentication, y.hostClientType];
              }), ce("navigateCrossDomain", function() {
                return false;
              });
            }
            function p2(e4) {
              try {
                n3 && n3.success(e4);
              } finally {
                n3 = null, l2();
              }
            }
            function g2(e4) {
              try {
                n3 && n3.fail(new Error(e4));
              } finally {
                n3 = null, l2();
              }
            }
            function m2(e4, n4, t3) {
              if (e4) {
                var o3 = document.createElement("a");
                o3.href = decodeURIComponent(e4), o3.host && o3.host !== window.location.host && "outlook.office.com" === o3.host && o3.search.indexOf("client_type=Win32_Outlook") > -1 && (n4 && "result" === n4 && (t3 && (o3.href = h2(o3.href, "result", t3)), ve.currentWindow.location.assign(h2(o3.href, "authSuccess", ""))), n4 && "reason" === n4 && (t3 && (o3.href = h2(o3.href, "reason", t3)), ve.currentWindow.location.assign(h2(o3.href, "authFailure", ""))));
              }
            }
            function h2(e4, n4, t3) {
              var o3 = e4.indexOf("#"), i3 = -1 === o3 ? "#" : e4.substr(o3);
              return i3 = i3 + "&" + n4 + ("" !== t3 ? "=" + t3 : ""), (e4 = -1 === o3 ? e4 : e4.substr(0, o3)) + i3;
            }
            e3.initialize = function() {
              ce("authentication.authenticate.success", p2, false), ce("authentication.authenticate.failure", g2, false);
            }, e3.registerAuthenticationHandlers = function(e4) {
              o2 = e4;
            }, e3.authenticate = function(e4) {
              var n4 = void 0 !== e4, t3 = n4 ? e4 : o2;
              if (!t3) throw new Error("No parameters are provided for authentication");
              return H(c.content, c.sidePanel, c.settings, c.remove, c.task, c.stage, c.meetingStage), i2(t3).then(function(e5) {
                try {
                  return t3 && t3.successCallback ? (t3.successCallback(e5), "") : e5;
                } finally {
                  n4 || (o2 = null);
                }
              }).catch(function(e5) {
                try {
                  if (t3 && t3.failureCallback) return t3.failureCallback(e5.message), "";
                  throw e5;
                } finally {
                  n4 || (o2 = null);
                }
              });
            }, e3.getAuthToken = function(e4) {
              return H(), r2(e4).then(function(n4) {
                return e4 && e4.successCallback ? (e4.successCallback(n4), "") : n4;
              }).catch(function(n4) {
                if (e4 && e4.failureCallback) return e4.failureCallback(n4.message), "";
                throw n4;
              });
            }, e3.getUser = function(e4) {
              return H(), a2().then(function(n4) {
                return e4 && e4.successCallback ? (e4.successCallback(n4), null) : n4;
              }).catch(function(n4) {
                if (e4 && e4.failureCallback) return e4.failureCallback(n4.message), null;
                throw n4;
              });
            }, e3.notifySuccess = function(e4, n4) {
              m2(n4, "result", e4), H(c.authentication), Re("authentication.authenticate.success", [e4]), Je(ve.parentWindow, function() {
                return setTimeout(function() {
                  return ve.currentWindow.close();
                }, 200);
              });
            }, e3.notifyFailure = function(e4, n4) {
              m2(n4, "reason", e4), H(c.authentication), Re("authentication.authenticate.failure", [e4]), Je(ve.parentWindow, function() {
                return setTimeout(function() {
                  return ve.currentWindow.close();
                }, 200);
              });
            };
          }(T || (T = {}));
          var B = function() {
            return B = Object.assign || function(e3) {
              for (var n3, t2 = 1, o2 = arguments.length; t2 < o2; t2++) for (var i2 in n3 = arguments[t2]) Object.prototype.hasOwnProperty.call(n3, i2) && (e3[i2] = n3[i2]);
              return e3;
            }, B.apply(this, arguments);
          }, z = { apiVersion: 1, supports: { appInstallDialog: void 0, barCode: void 0, calendar: void 0, call: void 0, chat: void 0, webStorage: void 0, conversations: void 0, dialog: { bot: void 0, update: void 0 }, geoLocation: { map: void 0 }, location: void 0, logs: void 0, mail: void 0, meetingRoom: void 0, menus: void 0, monetization: void 0, notifications: void 0, pages: { appButton: void 0, tabs: void 0, config: void 0, backStack: void 0, fullTrust: void 0 }, people: void 0, permissions: void 0, profile: void 0, remoteCamera: void 0, search: void 0, sharing: void 0, stageView: void 0, teams: { fullTrust: { joinedTeams: void 0 } }, teamsCore: void 0, video: void 0 } }, j = { appInstallDialog: {}, appEntity: {}, call: {}, chat: {}, conversations: {}, dialog: { bot: {}, update: {} }, logs: {}, meetingRoom: {}, menus: {}, monetization: {}, notifications: {}, pages: { appButton: {}, tabs: {}, config: {}, backStack: {}, fullTrust: {} }, remoteCamera: {}, sharing: {}, stageView: {}, teams: { fullTrust: {} }, teamsCore: {}, video: {} }, G = [s.desktop, s.web, s.android, s.ios, s.rigel, s.surfaceHub, s.teamsRoomsWindows, s.teamsRoomsAndroid, s.teamsPhones, s.teamsDisplays], q = { "1.9.0": [{ capability: { location: {} }, hostClientTypes: G }], "2.0.0": [{ capability: { people: {} }, hostClientTypes: G }], "2.0.1": [{ capability: { teams: { fullTrust: { joinedTeams: {} } } }, hostClientTypes: [s.android, s.desktop, s.ios, s.teamsRoomsAndroid, s.teamsPhones, s.teamsDisplays, s.web] }, { capability: { webStorage: {} }, hostClientTypes: [s.desktop] }], "2.0.5": [{ capability: { webStorage: {} }, hostClientTypes: [s.android, s.desktop, s.ios] }] };
          function Z(e3) {
            var n3 = B({}, j);
            return Object.keys(q).forEach(function(t2) {
              R(e3, t2) >= 0 && q[t2].forEach(function(e4) {
                e4.hostClientTypes.includes(y.hostClientType) && (n3 = B(B({}, n3), e4.capability));
              });
            }), { apiVersion: 1, isLegacyTeams: true, supports: n3 };
          }
          function J(e3) {
            z = A(e3);
          }
          var K, Q, X, $, Y;
          function ee(e3) {
            return { actionInfo: e3.actionInfo, app: { locale: e3.locale, sessionId: e3.appSessionId ? e3.appSessionId : "", theme: e3.theme ? e3.theme : "default", iconPositionVertical: e3.appIconPosition, osLocaleInfo: e3.osLocaleInfo, parentMessageId: e3.parentMessageId, userClickTime: e3.userClickTime, userFileOpenPreference: e3.userFileOpenPreference, host: { name: e3.hostName ? e3.hostName : l.teams, clientType: e3.hostClientType ? e3.hostClientType : s.web, sessionId: e3.sessionId ? e3.sessionId : "", ringId: e3.ringId }, appLaunchId: e3.appLaunchId }, page: { id: e3.entityId, frameContext: e3.frameContext ? e3.frameContext : y.frameContext, subPageId: e3.subEntityId, isFullScreen: e3.isFullScreen, isMultiWindow: e3.isMultiWindow, sourceOrigin: e3.sourceOrigin }, user: { id: e3.userObjectId, displayName: e3.userDisplayName, isCallingAllowed: e3.isCallingAllowed, isPSTNCallingAllowed: e3.isPSTNCallingAllowed, licenseType: e3.userLicenseType, loginHint: e3.loginHint, userPrincipalName: e3.userPrincipalName, tenant: e3.tid ? { id: e3.tid, teamsSku: e3.tenantSKU } : void 0 }, channel: e3.channelId ? { id: e3.channelId, displayName: e3.channelName, relativeUrl: e3.channelRelativeUrl, membershipType: e3.channelType, defaultOneNoteSectionId: e3.defaultOneNoteSectionId, ownerGroupId: e3.hostTeamGroupId, ownerTenantId: e3.hostTeamTenantId } : void 0, chat: e3.chatId ? { id: e3.chatId } : void 0, meeting: e3.meetingId ? { id: e3.meetingId } : void 0, sharepoint: e3.sharepoint, team: e3.teamId ? { internalId: e3.teamId, displayName: e3.teamName, type: e3.teamType, groupId: e3.groupId, templateId: e3.teamTemplateId, isArchived: e3.isTeamArchived, userRole: e3.userTeamRole } : void 0, sharePointSite: e3.teamSiteUrl || e3.teamSiteDomain || e3.teamSitePath || e3.mySitePath || e3.mySiteDomain ? { teamSiteUrl: e3.teamSiteUrl, teamSiteDomain: e3.teamSiteDomain, teamSitePath: e3.teamSitePath, teamSiteId: e3.teamSiteId, mySitePath: e3.mySitePath, mySiteDomain: e3.mySiteDomain } : void 0 };
          }
          !function(e3) {
            var n3 = [];
            function t2(e4) {
              y.frameContext && (y.frameContext === c.task ? n3.push(e4) : ue("messageForChild"));
            }
            function o2() {
              return !!z.supports.dialog;
            }
            function i2(e4) {
              return { url: e4.url, height: e4.size ? e4.size.height : f.Small, width: e4.size ? e4.size.width : f.Small, title: e4.title, fallbackUrl: e4.fallbackUrl };
            }
            function r2(e4) {
              return { url: e4.url, height: e4.size ? e4.size.height : f.Small, width: e4.size ? e4.size.width : f.Small, title: e4.title, fallbackUrl: e4.fallbackUrl, completionBotId: e4.completionBotId };
            }
            e3.initialize = function() {
              ce("messageForChild", t2, false);
            }, e3.open = function(e4, n4, t3) {
              if (H(c.content, c.sidePanel, c.meetingStage), !o2()) throw I;
              t3 && ce("messageForParent", t3), Re("tasks.startTask", [i2(e4)], function(e5, t4) {
                null == n4 || n4({ err: e5, result: t4 }), ue("messageForParent");
              });
            }, e3.submit = function(e4, n4) {
              if (H(c.content, c.sidePanel, c.task, c.meetingStage), !o2()) throw I;
              Re("tasks.completeTask", [e4, n4 ? Array.isArray(n4) ? n4 : [n4] : []]);
            }, e3.sendMessageToParentFromDialog = function(e4) {
              if (H(c.task), !o2()) throw I;
              Re("messageForParent", [e4]);
            }, e3.sendMessageToDialog = function(e4) {
              if (H(c.content, c.sidePanel, c.meetingStage), !o2()) throw I;
              Re("messageForChild", [e4]);
            }, e3.registerOnMessageFromParent = function(e4) {
              if (H(c.task), !o2()) throw I;
              for (ue("messageForChild"), ce("messageForChild", e4), n3.reverse(); n3.length > 0; ) {
                e4(n3.pop());
              }
            }, e3.isSupported = o2, function(e4) {
              function n4() {
                return !!z.supports.dialog && !!z.supports.dialog.update;
              }
              e4.resize = function(e5) {
                if (H(c.content, c.sidePanel, c.task, c.meetingStage), !n4()) throw I;
                Re("tasks.updateTask", [e5]);
              }, e4.isSupported = n4;
            }(e3.update || (e3.update = {})), function(e4) {
              function n4() {
                return !!z.supports.dialog && !!z.supports.dialog.bot;
              }
              e4.open = function(e5, t3, o3) {
                if (H(c.content, c.sidePanel, c.meetingStage), !n4()) throw I;
                o3 && ce("messageForParent", o3), Re("tasks.startTask", [r2(e5)], function(e6, n5) {
                  null == t3 || t3({ err: e6, result: n5 }), ue("messageForParent");
                });
              }, e4.isSupported = n4;
            }(e3.bot || (e3.bot = {})), e3.getDialogInfoFromUrlDialogInfo = i2, e3.getDialogInfoFromBotUrlDialogInfo = r2;
          }(K || (K = {})), function(e3) {
            !function(e4) {
              e4[e4.ifRoom = 0] = "ifRoom", e4[e4.overflowOnly = 1] = "overflowOnly";
            }(e3.DisplayMode || (e3.DisplayMode = {}));
            var n3, t2, o2, i2 = /* @__PURE__ */ function() {
              return function() {
                this.enabled = true, this.selected = false;
              };
            }();
            function r2(e4) {
              o2 && o2(e4) || (H(), Re("viewConfigItemPress", [e4]));
            }
            function a2(e4) {
              n3 && n3(e4) || (H(), Re("handleNavBarMenuItemPress", [e4]));
            }
            function s2(e4) {
              t2 && t2(e4) || (H(), Re("handleActionMenuItemPress", [e4]));
            }
            function l2() {
              return !!z.supports.menus;
            }
            e3.MenuItem = i2, function(e4) {
              e4.dropDown = "dropDown", e4.popOver = "popOver";
            }(e3.MenuListType || (e3.MenuListType = {})), e3.initialize = function() {
              ce("navBarMenuItemPress", a2, false), ce("actionMenuItemPress", s2, false), ce("setModuleView", r2, false);
            }, e3.setUpViews = function(e4, n4) {
              if (H(), !l2()) throw I;
              o2 = n4, Re("setUpViews", [e4]);
            }, e3.setNavBarMenu = function(e4, t3) {
              if (H(), !l2()) throw I;
              n3 = t3, Re("setNavBarMenu", [e4]);
            }, e3.showActionMenu = function(e4, n4) {
              if (H(), !l2()) throw I;
              t2 = n4, Re("showActionMenu", [e4]);
            }, e3.isSupported = l2;
          }(Q || (Q = {})), function(e3) {
            function n3() {
              window.print();
            }
            function t2(e4, n4) {
              H(), n4 && n4(), pe(e4);
            }
            function o2(e4, n4) {
              H(), n4 && n4(), me(e4);
            }
            function i2() {
              return !!z.supports.teamsCore;
            }
            e3.enablePrintCapability = function() {
              if (!y.printCapabilityEnabled) {
                if (H(), !i2()) throw I;
                y.printCapabilityEnabled = true, document.addEventListener("keydown", function(e4) {
                  (e4.ctrlKey || e4.metaKey) && 80 === e4.keyCode && (n3(), e4.cancelBubble = true, e4.preventDefault(), e4.stopImmediatePropagation());
                });
              }
            }, e3.print = n3, e3.registerOnLoadHandler = function(e4) {
              t2(e4, function() {
                if (!i2()) throw I;
              });
            }, e3.registerOnLoadHandlerHelper = t2, e3.registerBeforeUnloadHandler = function(e4) {
              o2(e4, function() {
                if (!i2()) throw I;
              });
            }, e3.registerBeforeUnloadHandlerHelper = o2, e3.isSupported = i2;
          }(X || (X = {})), function(e3) {
            e3.Messages = { AppLoaded: "appInitialization.appLoaded", Success: "appInitialization.success", Failure: "appInitialization.failure", ExpectedFailure: "appInitialization.expectedFailure" }, function(e4) {
              e4.AuthFailed = "AuthFailed", e4.Timeout = "Timeout", e4.Other = "Other";
            }(e3.FailedReason || (e3.FailedReason = {})), function(e4) {
              e4.PermissionError = "PermissionError", e4.NotFound = "NotFound", e4.Throttling = "Throttling", e4.Offline = "Offline", e4.Other = "Other";
            }(e3.ExpectedFailureReason || (e3.ExpectedFailureReason = {})), e3.isInitialized = function() {
              return y.initializeCalled;
            }, e3.getFrameContext = function() {
              return y.frameContext;
            };
            function n3(e4) {
              return new Promise(function(n4) {
                y.initializeCalled || (y.initializeCalled = true, ae(), y.initializePromise = Se(e4).then(function(e5) {
                  var n5 = e5.context, t3 = e5.clientType, o2 = e5.runtimeConfig, i2 = e5.clientSupportedSDKVersion, r2 = void 0 === i2 ? g : i2;
                  y.frameContext = n5, y.hostClientType = t3, y.clientSupportedSDKVersion = r2;
                  try {
                    if (!(a2 = JSON.parse(o2)) || !a2.apiVersion) throw new Error("Received runtime config is invalid");
                    o2 && J(a2);
                  } catch (e6) {
                    if (!(e6 instanceof SyntaxError)) throw e6;
                    try {
                      isNaN(R(o2, g)) || (y.clientSupportedSDKVersion = o2);
                      var a2 = JSON.parse(r2);
                      r2 && J(a2);
                    } catch (e7) {
                      if (!(e7 instanceof SyntaxError)) throw e7;
                      J(Z(y.clientSupportedSDKVersion));
                    }
                  }
                  y.initializeCompleted = true;
                }), T.initialize(), Q.initialize(), Y.config.initialize(), K.initialize()), Array.isArray(e4) && V(e4), n4(y.initializePromise);
              });
            }
            function t2(e4) {
              H(), de(e4);
            }
            e3.initialize = function(e4) {
              return L(function() {
                return n3(e4);
              }, 5e3, new Error("SDK initialization timed out."));
            }, e3._initialize = function(e4) {
              ve.currentWindow = e4;
            }, e3._uninitialize = function() {
              y.initializeCalled && (y.frameContext && (t2(null), Y.backStack.registerBackButtonHandler(null), Y.registerFullScreenHandler(null), X.registerBeforeUnloadHandler(null), X.registerOnLoadHandler(null), Ve.registerGetLogHandler(null)), y.frameContext === c.settings && Y.config.registerOnSaveHandler(null), y.frameContext === c.remove && Y.config.registerOnRemoveHandler(null), y.initializeCalled = false, y.initializeCompleted = false, y.initializePromise = null, y.additionalValidOrigins = [], y.frameContext = null, y.hostClientType = null, y.isFramelessWindow = false, be());
            }, e3.getContext = function() {
              return new Promise(function(e4) {
                H(), e4(Te("getContext"));
              }).then(function(e4) {
                return ee(e4);
              });
            }, e3.notifyAppLoaded = function() {
              H(), Re(e3.Messages.AppLoaded, [p]);
            }, e3.notifySuccess = function() {
              H(), Re(e3.Messages.Success, [p]);
            }, e3.notifyFailure = function(n4) {
              H(), Re(e3.Messages.Failure, [n4.reason, n4.message]);
            }, e3.notifyExpectedFailure = function(n4) {
              H(), Re(e3.Messages.ExpectedFailure, [n4.reason, n4.message]);
            }, e3.registerOnThemeChangeHandler = t2, e3.openLink = function(e4) {
              return new Promise(function(n4) {
                H(c.content, c.sidePanel, c.settings, c.task, c.stage, c.meetingStage), n4(Ie("executeDeepLink", e4));
              });
            };
          }($ || ($ = {})), function(e3) {
            function n3(e4) {
              if (H(c.content), !t2()) throw I;
              Re("setFrameContext", [e4]);
            }
            function t2() {
              return !!z.supports.pages;
            }
            e3.returnFocus = function(e4) {
              if (H(), !t2()) throw I;
              Re("returnFocus", [e4]);
            }, e3.registerFocusEnterHandler = function(e4) {
              if (H(), !t2()) throw I;
              ce("focusEnter", e4);
            }, e3.registerFocusEnterHandlerHelper = function(e4, n4) {
              H(), n4 && n4(), ce("focusEnter", e4);
            }, e3.setCurrentFrame = n3, e3.initializeWithFrameContext = function(e4, t3, o2) {
              $.initialize(o2).then(function() {
                return t3 && t3();
              }), n3(e4);
            }, e3.getConfig = function() {
              return new Promise(function(e4) {
                if (H(c.content, c.settings, c.remove, c.sidePanel), !t2()) throw I;
                e4(Te("settings.getSettings"));
              });
            }, e3.navigateCrossDomain = function(e4) {
              return new Promise(function(n4) {
                if (H(c.content, c.sidePanel, c.settings, c.remove, c.task, c.stage, c.meetingStage), !t2()) throw I;
                n4(Pe("navigateCrossDomain", "Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.", e4));
              });
            }, e3.navigateToApp = function(e4) {
              return new Promise(function(n4) {
                if (H(c.content, c.sidePanel, c.settings, c.task, c.stage, c.meetingStage), !t2()) throw I;
                z.isLegacyTeams ? n4(Ie("executeDeepLink", U(e4))) : n4(Ie("pages.navigateToApp", e4));
              });
            }, e3.shareDeepLink = function(e4) {
              if (H(c.content, c.sidePanel, c.meetingStage), !t2()) throw I;
              Re("shareDeepLink", [e4.subPageId, e4.subPageLabel, e4.subPageWebUrl]);
            }, e3.registerFullScreenHandler = function(e4) {
              if (H(), !t2()) throw I;
              ce("fullScreenChange", e4);
            }, e3.registerFullScreenHandlerHelper = function(e4, n4) {
              H(), n4 && n4(), ce("fullScreenChange", e4);
            }, e3.isSupported = t2, function(e4) {
              function n4() {
                return !!z.supports.pages && !!z.supports.pages.tabs;
              }
              e4.navigateToTab = function(e5) {
                return new Promise(function(t3) {
                  if (H(), !n4()) throw I;
                  t3(Pe("navigateToTab", "Invalid internalTabInstanceId and/or channelId were/was provided", e5));
                });
              }, e4.getTabInstances = function(e5) {
                return new Promise(function(t3) {
                  if (H(), !n4()) throw I;
                  t3(Te("getTabInstances", e5));
                });
              }, e4.getMruTabInstances = function(e5) {
                return new Promise(function(t3) {
                  if (H(), !n4()) throw I;
                  t3(Te("getMruTabInstances", e5));
                });
              }, e4.isSupported = n4;
            }(e3.tabs || (e3.tabs = {})), function(e4) {
              var n4, t3;
              function o2(e5, t4) {
                H(c.settings), t4 && t4(), n4 = e5, e5 && Re("registerHandler", ["save"]);
              }
              function i2(e5, n5) {
                H(c.remove, c.settings), n5 && n5(), t3 = e5, e5 && Re("registerHandler", ["remove"]);
              }
              function r2(e5) {
                var t4 = new s2(e5);
                n4 ? n4(t4) : t4.notifySuccess();
              }
              function a2(e5, n5) {
                H(c.content), n5 && n5(), ce("changeSettings", e5);
              }
              e4.initialize = function() {
                ce("settings.save", r2, false), ce("settings.remove", l2, false);
              }, e4.setValidityState = function(e5) {
                if (H(c.settings, c.remove), !d2()) throw I;
                Re("settings.setValidityState", [e5]);
              }, e4.setConfig = function(e5) {
                return new Promise(function(n5) {
                  if (H(c.content, c.settings, c.sidePanel), !d2()) throw I;
                  n5(Ie("settings.setSettings", e5));
                });
              }, e4.registerOnSaveHandler = function(e5) {
                o2(e5, function() {
                  if (!d2()) throw I;
                });
              }, e4.registerOnSaveHandlerHelper = o2, e4.registerOnRemoveHandler = function(e5) {
                i2(e5, function() {
                  if (!d2()) throw I;
                });
              }, e4.registerOnRemoveHandlerHelper = i2, e4.registerChangeConfigHandler = function(e5) {
                a2(e5, function() {
                  if (!d2()) throw I;
                });
              }, e4.registerChangeConfigHandlerHelper = a2;
              var s2 = function() {
                function e5(e6) {
                  this.notified = false, this.result = e6 || {};
                }
                return e5.prototype.notifySuccess = function() {
                  this.ensureNotNotified(), Re("settings.save.success"), this.notified = true;
                }, e5.prototype.notifyFailure = function(e6) {
                  this.ensureNotNotified(), Re("settings.save.failure", [e6]), this.notified = true;
                }, e5.prototype.ensureNotNotified = function() {
                  if (this.notified) throw new Error("The SaveEvent may only notify success or failure once.");
                }, e5;
              }();
              function l2() {
                var e5 = new u2();
                t3 ? t3(e5) : e5.notifySuccess();
              }
              var u2 = function() {
                function e5() {
                  this.notified = false;
                }
                return e5.prototype.notifySuccess = function() {
                  this.ensureNotNotified(), Re("settings.remove.success"), this.notified = true;
                }, e5.prototype.notifyFailure = function(e6) {
                  this.ensureNotNotified(), Re("settings.remove.failure", [e6]), this.notified = true;
                }, e5.prototype.ensureNotNotified = function() {
                  if (this.notified) throw new Error("The removeEvent may only notify success or failure once.");
                }, e5;
              }();
              function d2() {
                return !!z.supports.pages && !!z.supports.pages.config;
              }
              e4.isSupported = d2;
            }(e3.config || (e3.config = {})), function(e4) {
              var n4;
              function t3() {
                return new Promise(function(e5) {
                  if (H(), !r2()) throw I;
                  e5(Pe("navigateBack", "Back navigation is not supported in the current client or context."));
                });
              }
              function o2(e5, t4) {
                H(), t4 && t4(), n4 = e5, e5 && Re("registerHandler", ["backButton"]);
              }
              function i2() {
                n4 && n4() || t3();
              }
              function r2() {
                return !!z.supports.pages && !!z.supports.pages.backStack;
              }
              e4._initialize = function() {
                ce("backButtonPress", i2, false);
              }, e4.navigateBack = t3, e4.registerBackButtonHandler = function(e5) {
                o2(e5, function() {
                  if (!r2()) throw I;
                });
              }, e4.registerBackButtonHandlerHelper = o2, e4.isSupported = r2;
            }(e3.backStack || (e3.backStack = {})), function(e4) {
              function n4() {
                return !!z.supports.pages && !!z.supports.pages.fullTrust;
              }
              e4.enterFullscreen = function() {
                if (H(c.content), !n4()) throw I;
                Re("enterFullscreen", []);
              }, e4.exitFullscreen = function() {
                if (H(c.content), !n4()) throw I;
                Re("exitFullscreen", []);
              }, e4.isSupported = n4;
            }(e3.fullTrust || (e3.fullTrust = {})), function(e4) {
              function n4(e5, n5) {
                H(c.content), n5 && n5(), ce("appButtonClick", e5);
              }
              function t3(e5, n5) {
                H(c.content), n5 && n5(), ce("appButtonHoverEnter", e5);
              }
              function o2(e5, n5) {
                H(c.content), n5 && n5(), ce("appButtonHoverLeave", e5);
              }
              function i2() {
                return !!z.supports.pages && !!z.supports.pages.appButton;
              }
              e4.onClick = function(e5) {
                n4(e5, function() {
                  if (!i2()) throw I;
                });
              }, e4.onClickHelper = n4, e4.onHoverEnter = function(e5) {
                t3(e5, function() {
                  if (!i2()) throw I;
                });
              }, e4.onHoverEnterHelper = t3, e4.onHoverLeave = function(e5) {
                o2(e5, function() {
                  if (!i2()) throw I;
                });
              }, e4.onHoverLeaveHelper = o2, e4.isSupported = i2;
            }(e3.appButton || (e3.appButton = {}));
          }(Y || (Y = {}));
          var ne = (0, t(227).debug)("teamsJs");
          function te(e3) {
            return ne.extend(e3);
          }
          var oe = function(e3, n3, t2) {
            if (t2 || 2 === arguments.length) for (var o2, i2 = 0, r2 = n3.length; i2 < r2; i2++) !o2 && i2 in n3 || (o2 || (o2 = Array.prototype.slice.call(n3, 0, i2)), o2[i2] = n3[i2]);
            return e3.concat(o2 || Array.prototype.slice.call(n3));
          }, ie = te("handlers"), re = function() {
            function e3() {
            }
            return e3.handlers = {}, e3;
          }();
          function ae() {
            re.handlers.themeChange = fe, re.handlers.load = ge, re.handlers.beforeUnload = he, Y.backStack._initialize();
          }
          var se = ie.extend("callHandler");
          function le(e3, n3) {
            var t2 = re.handlers[e3];
            return t2 ? (se("Invoking the registered handler for message %s with arguments %o", e3, n3), [true, t2.apply(this, n3)]) : (se("Handler for action message %s not found.", e3), [false, void 0]);
          }
          function ce(e3, n3, t2, o2) {
            void 0 === t2 && (t2 = true), void 0 === o2 && (o2 = []), n3 ? (re.handlers[e3] = n3, t2 && Re("registerHandler", oe([e3], o2, true))) : delete re.handlers[e3];
          }
          function ue(e3) {
            delete re.handlers[e3];
          }
          function de(e3) {
            re.themeChangeHandler = e3, e3 && Re("registerHandler", ["themeChange"]);
          }
          function fe(e3) {
            re.themeChangeHandler && re.themeChangeHandler(e3), ve.childWindow && Qe("themeChange", [e3]);
          }
          function pe(e3) {
            re.loadHandler = e3, e3 && Re("registerHandler", ["load"]);
          }
          function ge(e3) {
            re.loadHandler && re.loadHandler(e3), ve.childWindow && Qe("load", [e3]);
          }
          function me(e3) {
            re.beforeUnloadHandler = e3, e3 && Re("registerHandler", ["beforeUnload"]);
          }
          function he() {
            var e3 = function() {
              Re("readyToUnload", []);
            };
            re.beforeUnloadHandler && re.beforeUnloadHandler(e3) || e3();
          }
          var Ce = function(e3, n3, t2) {
            if (t2 || 2 === arguments.length) for (var o2, i2 = 0, r2 = n3.length; i2 < r2; i2++) !o2 && i2 in n3 || (o2 || (o2 = Array.prototype.slice.call(n3, 0, i2)), o2[i2] = n3[i2]);
            return e3.concat(o2 || Array.prototype.slice.call(n3));
          }, we = te("communication"), ve = /* @__PURE__ */ function() {
            return function() {
            };
          }(), ye = function() {
            function e3() {
            }
            return e3.parentMessageQueue = [], e3.childMessageQueue = [], e3.nextMessageId = 0, e3.callbacks = {}, e3.promiseCallbacks = {}, e3;
          }();
          function Se(e3) {
            if (ye.messageListener = function(e4) {
              return Me(e4);
            }, ve.currentWindow = ve.currentWindow || window, ve.parentWindow = ve.currentWindow.parent !== ve.currentWindow.self ? ve.currentWindow.parent : ve.currentWindow.opener, (ve.parentWindow || e3) && ve.currentWindow.addEventListener("message", ye.messageListener, false), !ve.parentWindow) {
              var n3 = ve.currentWindow;
              if (!n3.nativeInterface) return Promise.reject(new Error("Initialization Failed. No Parent window found."));
              y.isFramelessWindow = true, n3.onNativeMessage = Ue;
            }
            try {
              return ve.parentOrigin = "*", Fe("initialize", [p]).then(function(e4) {
                return { context: e4[0], clientType: e4[1], runtimeConfig: e4[2], clientSupportedSDKVersion: e4[3] };
              });
            } finally {
              ve.parentOrigin = null;
            }
          }
          function be() {
            ve.currentWindow.removeEventListener("message", ye.messageListener, false), ve.parentWindow = null, ve.parentOrigin = null, ve.childWindow = null, ve.childOrigin = null, ye.parentMessageQueue = [], ye.childMessageQueue = [], ye.nextMessageId = 0, ye.callbacks = {};
          }
          function Te(e3) {
            for (var n3 = [], t2 = 1; t2 < arguments.length; t2++) n3[t2 - 1] = arguments[t2];
            return Fe(e3, n3).then(function(e4) {
              return e4[0];
            });
          }
          function Ie(e3) {
            for (var n3 = [], t2 = 1; t2 < arguments.length; t2++) n3[t2 - 1] = arguments[t2];
            return Fe(e3, n3).then(function(e4) {
              var n4 = e4[0], t3 = e4[1];
              if (!n4) throw new Error(t3);
            });
          }
          function Pe(e3, n3) {
            for (var t2 = [], o2 = 2; o2 < arguments.length; o2++) t2[o2 - 2] = arguments[o2];
            return Fe(e3, t2).then(function(e4) {
              var t3 = e4[0], o3 = e4[1];
              if (!t3) throw new Error(o3 || n3);
            });
          }
          function Ee(e3) {
            for (var n3 = [], t2 = 1; t2 < arguments.length; t2++) n3[t2 - 1] = arguments[t2];
            return Fe(e3, n3).then(function(e4) {
              var n4 = e4[0], t3 = e4[1];
              if (n4) throw n4;
              return t3;
            });
          }
          function Fe(e3, n3) {
            return void 0 === n3 && (n3 = void 0), new Promise(function(t2) {
              t2(ke(Ae(e3, n3).id));
            });
          }
          function ke(e3) {
            return new Promise(function(n3) {
              ye.promiseCallbacks[e3] = n3;
            });
          }
          function Re(e3, n3, t2) {
            var o2;
            n3 instanceof Function ? t2 = n3 : n3 instanceof Array && (o2 = n3);
            var i2 = Ae(e3, o2);
            t2 && (ye.callbacks[i2.id] = t2);
          }
          var Oe = we.extend("sendMessageToParentHelper");
          function Ae(e3, n3) {
            var t2 = Oe, o2 = ve.parentWindow, i2 = Xe(e3, n3);
            if (t2("Message %i information: %o", i2.id, { actionName: e3, args: n3 }), y.isFramelessWindow) ve.currentWindow && ve.currentWindow.nativeInterface && (t2("Sending message %i to parent via framelessPostMessage interface", i2.id), ve.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(i2)));
            else {
              var r2 = xe(o2);
              o2 && r2 ? (t2("Sending message %i to parent via postMessage", i2.id), o2.postMessage(i2, r2)) : (t2("Adding message %i to parent message queue", i2.id), _e(o2).push(i2));
            }
            return i2;
          }
          function Me(e3) {
            if (e3 && e3.data && "object" == typeof e3.data) {
              var n3 = e3.source || e3.originalEvent && e3.originalEvent.source, t2 = e3.origin || e3.originalEvent && e3.originalEvent.origin;
              Ne(n3, t2) && (De(n3, t2), n3 === ve.parentWindow ? Ue(e3) : n3 === ve.childWindow && We(e3));
            }
          }
          function Ne(e3, n3) {
            return (!ve.currentWindow || e3 !== ve.currentWindow) && (!!(ve.currentWindow && ve.currentWindow.location && n3 && n3 === ve.currentWindow.location.origin) || F(new URL(n3)));
          }
          function De(e3, n3) {
            y.isFramelessWindow || ve.parentWindow && !ve.parentWindow.closed && e3 !== ve.parentWindow ? ve.childWindow && !ve.childWindow.closed && e3 !== ve.childWindow || (ve.childWindow = e3, ve.childOrigin = n3) : (ve.parentWindow = e3, ve.parentOrigin = n3), ve.parentWindow && ve.parentWindow.closed && (ve.parentWindow = null, ve.parentOrigin = null), ve.childWindow && ve.childWindow.closed && (ve.childWindow = null, ve.childOrigin = null), Ze(ve.parentWindow), Ze(ve.childWindow);
          }
          var Le = we.extend("handleParentMessage");
          function Ue(e3) {
            var n3 = Le;
            if ("id" in e3.data && "number" == typeof e3.data.id) {
              var t2 = e3.data, o2 = ye.callbacks[t2.id];
              n3("Received a response from parent for message %i", t2.id), o2 && (n3("Invoking the registered callback for message %i with arguments %o", t2.id, t2.args), o2.apply(null, Ce(Ce([], t2.args, true), [t2.isPartialResponse], false)), He(e3) || (n3("Removing registered callback for message %i", t2.id), delete ye.callbacks[t2.id]));
              var i2 = ye.promiseCallbacks[t2.id];
              i2 && (n3("Invoking the registered promise callback for message %i with arguments %o", t2.id, t2.args), i2(t2.args), n3("Removing registered promise callback for message %i", t2.id), delete ye.promiseCallbacks[t2.id]);
            } else if ("func" in e3.data && "string" == typeof e3.data.func) {
              n3("Received an action message %s from parent", (t2 = e3.data).func), le(t2.func, t2.args);
            } else n3("Received an unknown message: %O", e3);
          }
          function He(e3) {
            return true === e3.data.isPartialResponse;
          }
          function We(e3) {
            if ("id" in e3.data && "func" in e3.data) {
              var n3 = e3.data, t2 = le(n3.func, n3.args), o2 = t2[0], i2 = t2[1];
              o2 && void 0 !== i2 ? Ke(n3.id, Array.isArray(i2) ? i2 : [i2]) : Re(n3.func, n3.args, function() {
                for (var e4 = [], t3 = 0; t3 < arguments.length; t3++) e4[t3] = arguments[t3];
                if (ve.childWindow) {
                  var o3 = e4.pop();
                  Ke(n3.id, e4, o3);
                }
              });
            }
          }
          function _e(e3) {
            return e3 === ve.parentWindow ? ye.parentMessageQueue : e3 === ve.childWindow ? ye.childMessageQueue : [];
          }
          function xe(e3) {
            return e3 === ve.parentWindow ? ve.parentOrigin : e3 === ve.childWindow ? ve.childOrigin : null;
          }
          var Ve, Be, ze, je, Ge, qe = we.extend("flushMessageQueue");
          function Ze(e3) {
            for (var n3 = xe(e3), t2 = _e(e3), o2 = e3 == ve.parentWindow ? "parent" : "child"; e3 && n3 && t2.length > 0; ) {
              var i2 = t2.shift();
              qe("Flushing message %i from " + o2 + " message queue via postMessage.", i2.id), e3.postMessage(i2, n3);
            }
          }
          function Je(e3, n3) {
            var t2 = ve.currentWindow.setInterval(function() {
              0 === _e(e3).length && (clearInterval(t2), n3());
            }, 100);
          }
          function Ke(e3, n3, t2) {
            var o2 = ve.childWindow, i2 = $e(e3, n3, t2), r2 = xe(o2);
            o2 && r2 && o2.postMessage(i2, r2);
          }
          function Qe(e3, n3) {
            var t2 = ve.childWindow, o2 = Ye(e3, n3), i2 = xe(t2);
            t2 && i2 ? t2.postMessage(o2, i2) : _e(t2).push(o2);
          }
          function Xe(e3, n3) {
            return { id: ye.nextMessageId++, func: e3, timestamp: Date.now(), args: n3 || [] };
          }
          function $e(e3, n3, t2) {
            return { id: e3, args: n3 || [], isPartialResponse: t2 };
          }
          function Ye(e3, n3) {
            return { func: e3, args: n3 || [] };
          }
          function en(e3, n3) {
            H(), Re("uploadCustomApp", [e3], n3 || k());
          }
          function nn(e3, n3, t2) {
            H(), Re(e3, n3, t2);
          }
          function tn(e3, n3) {
            if (H(), !ve.childWindow) throw new Error("The child window has not yet been initialized or is not present");
            Qe(e3, n3);
          }
          function on2(e3, n3) {
            var t2 = this;
            H(), ce(e3, function() {
              for (var e4 = [], o2 = 0; o2 < arguments.length; o2++) e4[o2] = arguments[o2];
              return n3.apply(t2, e4);
            });
          }
          function rn(e3, n3) {
            H(), ce("userSettingsChange", n3, true, [e3]);
          }
          function an(e3) {
            H(c.content, c.task), Re("openFilePreview", [e3.entityId, e3.title, e3.description, e3.type, e3.objectUrl, e3.downloadUrl, e3.webPreviewUrl, e3.webEditUrl, e3.baseUrl, e3.editFile, e3.subEntityId, e3.viewerAction, e3.fileOpenPreference, e3.conversationId]);
          }
          !function(e3) {
            function n3() {
              return !!z.supports.logs;
            }
            e3.registerGetLogHandler = function(e4) {
              if (H(), !n3()) throw I;
              e4 ? ce("log.request", function() {
                Re("log.receive", [e4()]);
              }) : ue("log.request");
            }, e3.isSupported = n3;
          }(Ve || (Ve = {})), function(e3) {
            e3.fileDownloadStart = "fileDownloadStart", e3.fileDownloadComplete = "fileDownloadComplete";
          }(Be || (Be = {})), function(e3) {
            e3.view = "view", e3.edit = "edit", e3.editNew = "editNew";
          }(ze || (ze = {})), function(e3) {
            e3.fileOpenPreference = "fileOpenPreference", e3.theme = "theme";
          }(je || (je = {})), function(e3) {
            function n3() {
              return !!z.supports.conversations;
            }
            e3.openConversation = function(e4) {
              return new Promise(function(t2) {
                if (H(c.content), !n3()) throw I;
                var o2 = Ie("conversations.openConversation", { title: e4.title, subEntityId: e4.subEntityId, conversationId: e4.conversationId, channelId: e4.channelId, entityId: e4.entityId });
                e4.onStartConversation && ce("startConversation", function(n4, t3, o3, i2) {
                  return e4.onStartConversation({ subEntityId: n4, conversationId: t3, channelId: o3, entityId: i2 });
                }), e4.onCloseConversation && ce("closeConversation", function(n4, t3, o3, i2) {
                  return e4.onCloseConversation({ subEntityId: n4, conversationId: t3, channelId: o3, entityId: i2 });
                }), t2(o2);
              });
            }, e3.closeConversation = function() {
              if (H(c.content), !n3()) throw I;
              Re("conversations.closeConversation"), ue("startConversation"), ue("closeConversation");
            }, e3.getChatMembers = function() {
              return new Promise(function(e4) {
                if (H(), !n3()) throw I;
                e4(Te("getChatMembers"));
              });
            }, e3.isSupported = n3;
          }(Ge || (Ge = {}));
          var sn;
          function ln(e3, n3, t2) {
            if (0 === e3.length) throw new Error("Must have at least one user when creating a chat deep link");
            return "https://teams.microsoft.com/l/chat/0/0?" + ("users=" + e3.map(function(e4) {
              return encodeURIComponent(e4);
            }).join(",")) + (void 0 === n3 ? "" : "&topicName=" + encodeURIComponent(n3)) + (void 0 === t2 ? "" : "&message=" + encodeURIComponent(t2));
          }
          function cn(e3, n3, t2) {
            if (0 === e3.length) throw new Error("Must have at least one target when creating a call deep link");
            return "https://teams.microsoft.com/l/call/0/0?" + ("users=" + e3.map(function(e4) {
              return encodeURIComponent(e4);
            }).join(",")) + (void 0 === n3 ? "" : "&withVideo=" + encodeURIComponent(n3)) + (void 0 === t2 ? "" : "&source=" + encodeURIComponent(t2));
          }
          function un(e3, n3, t2, o2, i2) {
            return "https://teams.microsoft.com/l/meeting/new?" + (void 0 === e3 ? "" : "attendees=" + e3.map(function(e4) {
              return encodeURIComponent(e4);
            }).join(",")) + (void 0 === n3 ? "" : "&startTime=" + encodeURIComponent(n3)) + (void 0 === t2 ? "" : "&endTime=" + encodeURIComponent(t2)) + (void 0 === o2 ? "" : "&subject=" + encodeURIComponent(o2)) + (void 0 === i2 ? "" : "&content=" + encodeURIComponent(i2));
          }
          function dn(e3) {
            if (!e3) throw new Error("App ID must be set when creating an app install dialog deep link");
            return "https://teams.microsoft.com/l/app/" + encodeURIComponent(e3);
          }
          !function(e3) {
            function n3() {
              return !!z.supports.appInstallDialog;
            }
            e3.openAppInstallDialog = function(e4) {
              return new Promise(function(t2) {
                if (H(c.content, c.sidePanel, c.settings, c.task, c.stage, c.meetingStage), !n3()) throw new Error("Not supported");
                z.isLegacyTeams ? t2(Ie("executeDeepLink", dn(e4.appId))) : (Re("appInstallDialog.openAppInstallDialog", [e4]), t2());
              });
            }, e3.isSupported = n3;
          }(sn || (sn = {}));
          var fn, pn, gn, mn, hn = /* @__PURE__ */ function() {
            var e3 = function(n3, t2) {
              return e3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e4, n4) {
                e4.__proto__ = n4;
              } || function(e4, n4) {
                for (var t3 in n4) Object.prototype.hasOwnProperty.call(n4, t3) && (e4[t3] = n4[t3]);
              }, e3(n3, t2);
            };
            return function(n3, t2) {
              if ("function" != typeof t2 && null !== t2) throw new TypeError("Class extends value " + String(t2) + " is not a constructor or null");
              function o2() {
                this.constructor = n3;
              }
              e3(n3, t2), n3.prototype = null === t2 ? Object.create(t2) : (o2.prototype = t2.prototype, new o2());
            };
          }();
          function Cn(e3, n3) {
            if (null == e3 || null == n3 || e3.length <= 0) return null;
            var t2, o2 = 1;
            return e3.sort(function(e4, n4) {
              return e4.sequence > n4.sequence ? 1 : -1;
            }), e3.forEach(function(e4) {
              e4.sequence == o2 && (t2 = t2 ? new Blob([t2, e4.file], { type: n3 }) : new Blob([e4.file], { type: n3 }), o2++);
            }), t2;
          }
          function wn(e3, n3) {
            if (null == e3 || null == n3) return null;
            for (var t2 = atob(e3.chunk), o2 = new Array(t2.length), i2 = 0; i2 < t2.length; i2++) o2[i2] = t2.charCodeAt(i2);
            var r2 = new Uint8Array(o2), a2 = new Blob([r2], { type: n3 });
            return { sequence: e3.chunkSequence, file: a2 };
          }
          function vn(e3) {
            Tn(e3) ? x("2.0.2") : In(e3) ? x(m) : bn(e3) && x("2.0.4");
          }
          function yn(e3) {
            return !(e3.mediaType != fn.MediaType.Video || !e3.videoProps || !e3.videoProps.videoController);
          }
          function Sn(e3) {
            return !(null == e3 || e3.maxMediaCount > 10);
          }
          function bn(e3) {
            var n3;
            return !((null == e3 ? void 0 : e3.mediaType) != fn.MediaType.Image || !(null === (n3 = null == e3 ? void 0 : e3.imageProps) || void 0 === n3 ? void 0 : n3.imageOutputFormats));
          }
          function Tn(e3) {
            return !(!e3 || e3.mediaType != fn.MediaType.VideoAndImage && !e3.videoAndImageProps);
          }
          function In(e3) {
            return !(!e3 || e3.mediaType != fn.MediaType.Video || !e3.videoProps || e3.videoProps.isFullScreenMode);
          }
          function Pn(e3, n3, t2) {
            return null != e3 && null != n3 && n3 == fn.FileFormat.ID && null != t2;
          }
          function En(e3) {
            return !(null == e3 || e3.length <= 0 || e3.length > 10);
          }
          function Fn(e3) {
            return !e3 || !(null === e3.timeOutIntervalInSec || e3.timeOutIntervalInSec <= 0 || e3.timeOutIntervalInSec > 60);
          }
          function kn(e3) {
            if (e3) {
              if (e3.title && "string" != typeof e3.title) return false;
              if (e3.setSelected && "object" != typeof e3.setSelected) return false;
              if (e3.openOrgWideSearchInChatOrChannel && "boolean" != typeof e3.openOrgWideSearchInChatOrChannel) return false;
              if (e3.singleSelect && "boolean" != typeof e3.singleSelect) return false;
            }
            return true;
          }
          !function(e3) {
            !function(e4) {
              e4.Base64 = "base64", e4.ID = "id";
            }(e3.FileFormat || (e3.FileFormat = {}));
            var n3 = /* @__PURE__ */ function() {
              return function() {
              };
            }();
            e3.File = n3, e3.captureImage = function(e4) {
              if (!e4) throw new Error("[captureImage] Callback cannot be null");
              H(c.content, c.task), y.isFramelessWindow ? W("1.7.0") ? Re("captureImage", e4) : e4({ errorCode: r.OLD_PLATFORM }, void 0) : e4({ errorCode: r.NOT_SUPPORTED_ON_PLATFORM }, void 0);
            };
            var t2 = function(e4) {
              function n4(n5) {
                void 0 === n5 && (n5 = null);
                var t3 = e4.call(this) || this;
                return n5 && (t3.content = n5.content, t3.format = n5.format, t3.mimeType = n5.mimeType, t3.name = n5.name, t3.preview = n5.preview, t3.size = n5.size), t3;
              }
              return hn(n4, e4), n4.prototype.getMedia = function(e5) {
                if (!e5) throw new Error("[get Media] Callback cannot be null");
                (H(c.content, c.task), W(C)) ? Pn(this.mimeType, this.format, this.content) ? W("2.0.0") ? this.getMediaViaCallback(e5) : this.getMediaViaHandler(e5) : e5({ errorCode: r.INVALID_ARGUMENTS }, null) : e5({ errorCode: r.OLD_PLATFORM }, null);
              }, n4.prototype.getMediaViaCallback = function(e5) {
                var n5 = { mediaMimeType: this.mimeType, assembleAttachment: [] };
                Re("getMedia", [this.content], function(t3) {
                  if (e5) if (t3 && t3.error) e5(t3.error, null);
                  else if (t3 && t3.mediaChunk) if (t3.mediaChunk.chunkSequence <= 0) {
                    var o3 = Cn(n5.assembleAttachment, n5.mediaMimeType);
                    e5(t3.error, o3);
                  } else {
                    var i3 = wn(t3.mediaChunk, n5.mediaMimeType);
                    n5.assembleAttachment.push(i3);
                  }
                  else e5({ errorCode: r.INTERNAL_ERROR, message: "data received is null" }, null);
                });
              }, n4.prototype.getMediaViaHandler = function(e5) {
                var n5 = O(), t3 = { mediaMimeType: this.mimeType, assembleAttachment: [] }, o3 = [n5, this.content];
                this.content && e5 && Re("getMedia", o3), ce("getMedia" + n5, function(o4) {
                  if (e5) {
                    var i3 = JSON.parse(o4);
                    if (i3.error) e5(i3.error, null), ue("getMedia" + n5);
                    else if (i3.mediaChunk) if (i3.mediaChunk.chunkSequence <= 0) {
                      var a3 = Cn(t3.assembleAttachment, t3.mediaMimeType);
                      e5(i3.error, a3), ue("getMedia" + n5);
                    } else {
                      var s2 = wn(i3.mediaChunk, t3.mediaMimeType);
                      t3.assembleAttachment.push(s2);
                    }
                    else e5({ errorCode: r.INTERNAL_ERROR, message: "data received is null" }, null), ue("getMedia" + n5);
                  }
                });
              }, n4;
            }(n3);
            e3.Media = t2;
            var o2, i2, a2 = function(e4) {
              function n4() {
                return null !== e4 && e4.apply(this, arguments) || this;
              }
              return hn(n4, e4), n4.prototype.getMediaType = function() {
                return i2.Video;
              }, n4.prototype.notifyEventToApp = function(e5) {
                if (this.controllerCallback) switch (e5) {
                  case o2.StartRecording:
                    if (this.controllerCallback.onRecordingStarted) {
                      this.controllerCallback.onRecordingStarted();
                      break;
                    }
                }
              }, n4;
            }(function() {
              function e4(e5) {
                this.controllerCallback = e5;
              }
              return e4.prototype.notifyEventToHost = function(e5, n4) {
                H(c.content, c.task);
                try {
                  x(m);
                } catch (e6) {
                  return void (n4 && n4(e6));
                }
                Re("media.controller", [{ mediaType: this.getMediaType(), mediaControllerEvent: e5 }], function(e6) {
                  n4 && n4(e6);
                });
              }, e4.prototype.stop = function(e5) {
                this.notifyEventToHost(o2.StopRecording, e5);
              }, e4;
            }());
            e3.VideoController = a2, function(e4) {
              e4[e4.StartRecording = 1] = "StartRecording", e4[e4.StopRecording = 2] = "StopRecording";
            }(o2 = e3.MediaControllerEvent || (e3.MediaControllerEvent = {})), function(e4) {
              e4[e4.Photo = 1] = "Photo", e4[e4.Document = 2] = "Document", e4[e4.Whiteboard = 3] = "Whiteboard", e4[e4.BusinessCard = 4] = "BusinessCard";
            }(e3.CameraStartMode || (e3.CameraStartMode = {})), function(e4) {
              e4[e4.Camera = 1] = "Camera", e4[e4.Gallery = 2] = "Gallery";
            }(e3.Source || (e3.Source = {})), function(e4) {
              e4[e4.Image = 1] = "Image", e4[e4.Video = 2] = "Video", e4[e4.VideoAndImage = 3] = "VideoAndImage", e4[e4.Audio = 4] = "Audio";
            }(i2 = e3.MediaType || (e3.MediaType = {})), function(e4) {
              e4[e4.ID = 1] = "ID", e4[e4.URL = 2] = "URL";
            }(e3.ImageUriType || (e3.ImageUriType = {})), function(e4) {
              e4[e4.IMAGE = 1] = "IMAGE", e4[e4.PDF = 2] = "PDF";
            }(e3.ImageOutputFormats || (e3.ImageOutputFormats = {})), e3.selectMedia = function(e4, n4) {
              if (!n4) throw new Error("[select Media] Callback cannot be null");
              if (H(c.content, c.task), W(C)) {
                try {
                  vn(e4);
                } catch (e5) {
                  return void n4(e5, null);
                }
                if (Sn(e4)) {
                  Re("selectMedia", [e4], function(o4, i4, r2) {
                    if (r2) yn(e4) && e4.videoProps.videoController.notifyEventToApp(r2);
                    else if (i4) {
                      for (var a3 = [], s2 = 0, l2 = i4; s2 < l2.length; s2++) {
                        var c2 = l2[s2];
                        a3.push(new t2(c2));
                      }
                      n4(o4, a3);
                    } else n4(o4, null);
                  });
                } else {
                  var o3 = { errorCode: r.INVALID_ARGUMENTS };
                  n4(o3, null);
                }
              } else {
                var i3 = { errorCode: r.OLD_PLATFORM };
                n4(i3, null);
              }
            }, e3.viewImages = function(e4, n4) {
              if (!n4) throw new Error("[view images] Callback cannot be null");
              H(c.content, c.task), W(C) ? En(e4) ? Re("viewImages", [e4], n4) : n4({ errorCode: r.INVALID_ARGUMENTS }) : n4({ errorCode: r.OLD_PLATFORM });
            }, e3.scanBarCode = function(e4, n4) {
              if (!e4) throw new Error("[media.scanBarCode] Callback cannot be null");
              H(c.content, c.task), y.hostClientType !== s.desktop && y.hostClientType !== s.web && y.hostClientType !== s.rigel && y.hostClientType !== s.teamsRoomsWindows && y.hostClientType !== s.teamsRoomsAndroid && y.hostClientType !== s.teamsPhones && y.hostClientType !== s.teamsDisplays ? W("1.9.0") ? Fn(n4) ? Re("media.scanBarCode", [n4], e4) : e4({ errorCode: r.INVALID_ARGUMENTS }, null) : e4({ errorCode: r.OLD_PLATFORM }, null) : e4({ errorCode: r.NOT_SUPPORTED_ON_PLATFORM }, null);
            };
          }(fn || (fn = {})), function(e3) {
            function n3() {
              return !(!z.supports.barCode || !z.supports.permissions);
            }
            e3.scanBarCode = function(e4) {
              return new Promise(function(t2) {
                if (H(c.content, c.task), !n3()) throw I;
                if (!Fn(e4)) throw { errorCode: r.INVALID_ARGUMENTS };
                t2(Ee("media.scanBarCode", e4));
              });
            }, e3.hasPermission = function() {
              if (H(c.content, c.task), !n3()) throw I;
              var e4 = a.Media;
              return new Promise(function(n4) {
                n4(Ee("permissions.has", e4));
              });
            }, e3.requestPermission = function() {
              if (H(c.content, c.task), !n3()) throw I;
              var e4 = a.Media;
              return new Promise(function(n4) {
                n4(Ee("permissions.request", e4));
              });
            }, e3.isSupported = n3;
          }(pn || (pn = {})), function(e3) {
            function n3(e4) {
              return new Promise(function(n4) {
                if (H(c.content, c.task), !t2()) throw I;
                z.isLegacyTeams ? n4(Ie("executeDeepLink", ln([e4.user], void 0, e4.message))) : n4(Ie("chat.openChat", { members: e4.user, message: e4.message }));
              });
            }
            function t2() {
              return !!z.supports.chat;
            }
            e3.openChat = n3, e3.openGroupChat = function(e4) {
              return new Promise(function(o2) {
                if (e4.users.length < 1) throw Error("OpenGroupChat Failed: No users specified");
                if (1 === e4.users.length) {
                  n3({ user: e4.users[0], message: e4.message });
                } else {
                  if (H(c.content, c.task), !t2()) throw I;
                  if (z.isLegacyTeams) o2(Ie("executeDeepLink", ln(e4.users, e4.topic, e4.message)));
                  else o2(Ie("chat.openChat", { members: e4.users, message: e4.message, topic: e4.topic }));
                }
              });
            }, e3.isSupported = t2;
          }(gn || (gn = {})), function(e3) {
            function n3() {
              return !(!z.supports.geoLocation || !z.supports.permissions);
            }
            e3.getCurrentLocation = function() {
              if (H(c.content, c.task), !n3()) throw I;
              return Ee("location.getLocation", { allowChooseLocation: false, showMap: false });
            }, e3.hasPermission = function() {
              if (H(c.content, c.task), !n3()) throw I;
              var e4 = a.GeoLocation;
              return new Promise(function(n4) {
                n4(Ee("permissions.has", e4));
              });
            }, e3.requestPermission = function() {
              if (H(c.content, c.task), !n3()) throw I;
              var e4 = a.GeoLocation;
              return new Promise(function(n4) {
                n4(Ee("permissions.request", e4));
              });
            }, e3.isSupported = n3, function(e4) {
              function n4() {
                return !!(z.supports.geoLocation && z.supports.geoLocation.map && z.supports.permissions);
              }
              e4.chooseLocation = function() {
                if (H(c.content, c.task), !n4()) throw I;
                return Ee("location.getLocation", { allowChooseLocation: true, showMap: true });
              }, e4.showLocation = function(e5) {
                if (H(c.content, c.task), !n4()) throw I;
                if (!e5) throw { errorCode: r.INVALID_ARGUMENTS };
                return Ee("location.showLocation", e5);
              }, e4.isSupported = n4;
            }(e3.map || (e3.map = {}));
          }(mn || (mn = {}));
          var Rn, On, An, Mn, Nn, Dn, Ln, Un, Hn, Wn, _n, xn, Vn, Bn, zn, jn = function() {
            function e3() {
            }
            return e3.prototype.postMessage = function(e4, n3) {
              H(), Re("messageForChild", [e4], n3 || k());
            }, e3.prototype.addEventListener = function(e4, n3) {
              H(), "message" === e4 && ce("messageForParent", n3);
            }, e3;
          }(), Gn = function() {
            function e3() {
            }
            return Object.defineProperty(e3, "Instance", { get: function() {
              return this._instance || (this._instance = new this());
            }, enumerable: false, configurable: true }), e3.prototype.postMessage = function(e4, n3) {
              H(c.task), Re("messageForParent", [e4], n3 || k());
            }, e3.prototype.addEventListener = function(e4, n3) {
              H(c.task), "message" === e4 && ce("messageForChild", n3);
            }, e3;
          }();
          function qn(e3) {
            return e3 ? e3.modality && "string" != typeof e3.modality ? [false, "modality must be a string"] : e3.targetElementBoundingRect && "object" == typeof e3.targetElementBoundingRect ? e3.triggerType && "string" == typeof e3.triggerType ? Zn(e3.persona) : [false, "triggerType must be a valid string"] : [false, "targetElementBoundingRect must be a DOMRect"] : [false, "A request object is required"];
          }
          function Zn(e3) {
            return e3 ? e3.displayName && "string" != typeof e3.displayName ? [false, "displayName must be a string"] : e3.identifiers && "object" == typeof e3.identifiers ? e3.identifiers.AadObjectId || e3.identifiers.Smtp || e3.identifiers.Upn ? e3.identifiers.AadObjectId && "string" != typeof e3.identifiers.AadObjectId ? [false, "AadObjectId identifier must be a string"] : e3.identifiers.Smtp && "string" != typeof e3.identifiers.Smtp ? [false, "Smtp identifier must be a string"] : e3.identifiers.Upn && "string" != typeof e3.identifiers.Upn ? [false, "Upn identifier must be a string"] : [true, void 0] : [false, "at least one valid identifier must be provided"] : [false, "persona identifiers object must be provided"] : [false, "persona object must be provided"];
          }
          function Jn(e3, n3) {
            $.initialize(n3).then(function() {
              e3 && e3();
            });
          }
          function Kn() {
            X.enablePrintCapability();
          }
          function Qn() {
            X.print();
          }
          function Xn(e3) {
            H(), $.getContext().then(function(n3) {
              e3 && e3(gt(n3));
            });
          }
          function $n(e3) {
            $.registerOnThemeChangeHandler(e3);
          }
          function Yn(e3) {
            Y.registerFullScreenHandlerHelper(e3);
          }
          function et(e3) {
            Y.appButton.onClickHelper(e3);
          }
          function nt(e3) {
            Y.appButton.onHoverEnterHelper(e3);
          }
          function tt(e3) {
            Y.appButton.onHoverLeaveHelper(e3);
          }
          function ot(e3) {
            Y.backStack.registerBackButtonHandlerHelper(e3);
          }
          function it(e3) {
            X.registerOnLoadHandlerHelper(e3);
          }
          function rt(e3) {
            X.registerBeforeUnloadHandlerHelper(e3);
          }
          function at(e3) {
            Y.registerFocusEnterHandlerHelper(e3);
          }
          function st(e3) {
            Y.config.registerChangeConfigHandlerHelper(e3);
          }
          function lt(e3, n3) {
            H(), Y.tabs.getTabInstances(n3).then(function(n4) {
              e3(n4);
            });
          }
          function ct(e3, n3) {
            H(), Y.tabs.getMruTabInstances(n3).then(function(n4) {
              e3(n4);
            });
          }
          function ut(e3) {
            Y.shareDeepLink({ subPageId: e3.subEntityId, subPageLabel: e3.subEntityLabel, subPageWebUrl: e3.subEntityWebUrl });
          }
          function dt(e3, n3) {
            H(c.content, c.sidePanel, c.settings, c.task, c.stage, c.meetingStage), n3 = n3 || k(), $.openLink(e3).then(function() {
              n3(true);
            }).catch(function(e4) {
              n3(false, e4.message);
            });
          }
          function ft(e3) {
            Y.setCurrentFrame(e3);
          }
          function pt(e3, n3, t2) {
            Y.initializeWithFrameContext(e3, n3, t2);
          }
          function gt(e3) {
            return { actionInfo: e3.actionInfo, locale: e3.app.locale, appSessionId: e3.app.sessionId, theme: e3.app.theme, appIconPosition: e3.app.iconPositionVertical, osLocaleInfo: e3.app.osLocaleInfo, parentMessageId: e3.app.parentMessageId, userClickTime: e3.app.userClickTime, userFileOpenPreference: e3.app.userFileOpenPreference, appLaunchId: e3.app.appLaunchId, hostClientType: e3.app.host.clientType, sessionId: e3.app.host.sessionId, ringId: e3.app.host.ringId, entityId: e3.page.id, frameContext: e3.page.frameContext, subEntityId: e3.page.subPageId, isFullScreen: e3.page.isFullScreen, isMultiWindow: e3.page.isMultiWindow, sourceOrigin: e3.page.sourceOrigin, userObjectId: void 0 !== e3.user ? e3.user.id : void 0, isCallingAllowed: void 0 !== e3.user ? e3.user.isCallingAllowed : void 0, isPSTNCallingAllowed: void 0 !== e3.user ? e3.user.isPSTNCallingAllowed : void 0, userLicenseType: void 0 !== e3.user ? e3.user.licenseType : void 0, loginHint: void 0 !== e3.user ? e3.user.loginHint : void 0, userPrincipalName: void 0 !== e3.user ? e3.user.userPrincipalName : void 0, tid: void 0 !== e3.user && void 0 !== e3.user.tenant ? e3.user.tenant.id : void 0, tenantSKU: void 0 !== e3.user && void 0 !== e3.user.tenant ? e3.user.tenant.teamsSku : void 0, channelId: void 0 !== e3.channel ? e3.channel.id : void 0, channelName: void 0 !== e3.channel ? e3.channel.displayName : void 0, channelRelativeUrl: void 0 !== e3.channel ? e3.channel.relativeUrl : void 0, channelType: void 0 !== e3.channel ? e3.channel.membershipType : void 0, defaultOneNoteSectionId: void 0 !== e3.channel ? e3.channel.defaultOneNoteSectionId : void 0, hostTeamGroupId: void 0 !== e3.channel ? e3.channel.ownerGroupId : void 0, hostTeamTenantId: void 0 !== e3.channel ? e3.channel.ownerTenantId : void 0, chatId: void 0 !== e3.chat ? e3.chat.id : void 0, meetingId: void 0 !== e3.meeting ? e3.meeting.id : void 0, sharepoint: e3.sharepoint, teamId: void 0 !== e3.team ? e3.team.internalId : void 0, teamName: void 0 !== e3.team ? e3.team.displayName : void 0, teamType: void 0 !== e3.team ? e3.team.type : void 0, groupId: void 0 !== e3.team ? e3.team.groupId : void 0, teamTemplateId: void 0 !== e3.team ? e3.team.templateId : void 0, isTeamArchived: void 0 !== e3.team ? e3.team.isArchived : void 0, userTeamRole: void 0 !== e3.team ? e3.team.userRole : void 0, teamSiteUrl: void 0 !== e3.sharePointSite ? e3.sharePointSite.teamSiteUrl : void 0, teamSiteDomain: void 0 !== e3.sharePointSite ? e3.sharePointSite.teamSiteDomain : void 0, teamSitePath: void 0 !== e3.sharePointSite ? e3.sharePointSite.teamSitePath : void 0, teamSiteId: void 0 !== e3.sharePointSite ? e3.sharePointSite.teamSiteId : void 0, mySitePath: void 0 !== e3.sharePointSite ? e3.sharePointSite.mySitePath : void 0, mySiteDomain: void 0 !== e3.sharePointSite ? e3.sharePointSite.mySiteDomain : void 0 };
          }
          function mt(e3) {
            Y.returnFocus(e3);
          }
          function ht(e3, n3) {
            H(), n3 = n3 || k(), Y.tabs.navigateToTab(e3).then(function() {
              n3(true);
            }).catch(function(e4) {
              n3(false, e4.message);
            });
          }
          function Ct(e3, n3) {
            H(c.content, c.sidePanel, c.settings, c.remove, c.task, c.stage, c.meetingStage), n3 = n3 || k(), Y.navigateCrossDomain(e3).then(function() {
              n3(true);
            }).catch(function(e4) {
              n3(false, e4.message);
            });
          }
          function wt(e3) {
            H(), e3 = e3 || k(), Y.backStack.navigateBack().then(function() {
              e3(true);
            }).catch(function(n3) {
              e3(false, n3.message);
            });
          }
          !function(e3) {
            function n3() {
              return !!z.supports.location;
            }
            e3.getLocation = function(e4, t2) {
              if (!t2) throw new Error("[location.getLocation] Callback cannot be null");
              if (H(c.content, c.task), !W(h)) throw { errorCode: r.OLD_PLATFORM };
              if (!e4) throw { errorCode: r.INVALID_ARGUMENTS };
              if (!n3()) throw I;
              Re("location.getLocation", [e4], t2);
            }, e3.showLocation = function(e4, t2) {
              if (!t2) throw new Error("[location.showLocation] Callback cannot be null");
              if (H(c.content, c.task), !W(h)) throw { errorCode: r.OLD_PLATFORM };
              if (!e4) throw { errorCode: r.INVALID_ARGUMENTS };
              if (!n3()) throw I;
              Re("location.showLocation", [e4], t2);
            }, e3.isSupported = n3;
          }(Rn || (Rn = {})), function(e3) {
            !function(e4) {
              e4.like = "like", e4.heart = "heart", e4.laugh = "laugh", e4.surprised = "surprised", e4.applause = "applause";
            }(e3.MeetingReactionType || (e3.MeetingReactionType = {})), function(e4) {
              e4.Unknown = "Unknown", e4.Adhoc = "Adhoc", e4.Scheduled = "Scheduled", e4.Recurring = "Recurring", e4.Broadcast = "Broadcast", e4.MeetNow = "MeetNow";
            }(e3.MeetingType || (e3.MeetingType = {})), function(e4) {
              e4.OneOnOneCall = "oneOnOneCall", e4.GroupCall = "groupCall";
            }(e3.CallType || (e3.CallType = {})), e3.getIncomingClientAudioState = function(e4) {
              if (!e4) throw new Error("[get incoming client audio state] Callback cannot be null");
              H(c.sidePanel, c.meetingStage), Re("getIncomingClientAudioState", e4);
            }, e3.toggleIncomingClientAudio = function(e4) {
              if (!e4) throw new Error("[toggle incoming client audio] Callback cannot be null");
              H(c.sidePanel, c.meetingStage), Re("toggleIncomingClientAudio", e4);
            }, e3.getMeetingDetails = function(e4) {
              if (!e4) throw new Error("[get meeting details] Callback cannot be null");
              H(c.sidePanel, c.meetingStage, c.settings, c.content), Re("meeting.getMeetingDetails", e4);
            }, e3.getAuthenticationTokenForAnonymousUser = function(e4) {
              if (!e4) throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");
              H(c.sidePanel, c.meetingStage), Re("meeting.getAuthenticationTokenForAnonymousUser", e4);
            }, e3.getLiveStreamState = function(e4) {
              if (!e4) throw new Error("[get live stream state] Callback cannot be null");
              H(c.sidePanel), Re("meeting.getLiveStreamState", e4);
            }, e3.requestStartLiveStreaming = function(e4, n3, t2) {
              if (!e4) throw new Error("[request start live streaming] Callback cannot be null");
              H(c.sidePanel), Re("meeting.requestStartLiveStreaming", [n3, t2], e4);
            }, e3.requestStopLiveStreaming = function(e4) {
              if (!e4) throw new Error("[request stop live streaming] Callback cannot be null");
              H(c.sidePanel), Re("meeting.requestStopLiveStreaming", e4);
            }, e3.registerLiveStreamChangedHandler = function(e4) {
              if (!e4) throw new Error("[register live stream changed handler] Handler cannot be null");
              H(c.sidePanel), ce("meeting.liveStreamChanged", e4);
            }, e3.shareAppContentToStage = function(e4, n3) {
              if (!e4) throw new Error("[share app content to stage] Callback cannot be null");
              H(c.sidePanel, c.meetingStage), Re("meeting.shareAppContentToStage", [n3], e4);
            }, e3.getAppContentStageSharingCapabilities = function(e4) {
              if (!e4) throw new Error("[get app content stage sharing capabilities] Callback cannot be null");
              H(c.sidePanel, c.meetingStage), Re("meeting.getAppContentStageSharingCapabilities", e4);
            }, e3.stopSharingAppContentToStage = function(e4) {
              if (!e4) throw new Error("[stop sharing app content to stage] Callback cannot be null");
              H(c.sidePanel, c.meetingStage), Re("meeting.stopSharingAppContentToStage", e4);
            }, e3.getAppContentStageSharingState = function(e4) {
              if (!e4) throw new Error("[get app content stage sharing state] Callback cannot be null");
              H(c.sidePanel, c.meetingStage), Re("meeting.getAppContentStageSharingState", e4);
            }, e3.registerSpeakingStateChangeHandler = function(e4) {
              if (!e4) throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");
              H(c.sidePanel, c.meetingStage), ce("meeting.speakingStateChanged", e4);
            }, e3.registerRaiseHandStateChangedHandler = function(e4) {
              if (!e4) throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");
              H(c.sidePanel, c.meetingStage), ce("meeting.raiseHandStateChanged", e4);
            }, e3.registerMeetingReactionReceivedHandler = function(e4) {
              if (!e4) throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");
              H(c.sidePanel, c.meetingStage), ce("meeting.meetingReactionReceived", e4);
            };
          }(On || (On = {})), function(e3) {
            function n3() {
              return !!z.supports.monetization;
            }
            e3.openPurchaseExperience = function(e4, t2) {
              var o2, i2;
              return "function" == typeof e4 ? (o2 = e4, i2 = t2) : i2 = e4, H(c.content), D(function() {
                return new Promise(function(e5) {
                  if (!n3()) throw I;
                  e5(Ee("monetization.openPurchaseExperience", i2));
                });
              }, o2);
            }, e3.isSupported = n3;
          }(An || (An = {})), function(e3) {
            function n3() {
              return !!z.supports.calendar;
            }
            e3.openCalendarItem = function(e4) {
              return new Promise(function(t2) {
                if (H(c.content), !n3()) throw new Error("Not supported");
                if (!e4.itemId || !e4.itemId.trim()) throw new Error("Must supply an itemId to openCalendarItem");
                t2(Ie("calendar.openCalendarItem", e4));
              });
            }, e3.composeMeeting = function(e4) {
              return new Promise(function(t2) {
                if (H(c.content), !n3()) throw new Error("Not supported");
                z.isLegacyTeams ? t2(Ie("executeDeepLink", un(e4.attendees, e4.startTime, e4.endTime, e4.subject, e4.content))) : t2(Ie("calendar.composeMeeting", e4));
              });
            }, e3.isSupported = n3;
          }(Mn || (Mn = {})), function(e3) {
            function n3() {
              return !!z.supports.mail;
            }
            e3.openMailItem = function(e4) {
              return new Promise(function(t2) {
                if (H(c.content), !n3()) throw new Error("Not supported");
                if (!e4.itemId || !e4.itemId.trim()) throw new Error("Must supply an itemId to openMailItem");
                t2(Ie("mail.openMailItem", e4));
              });
            }, e3.composeMail = function(e4) {
              return new Promise(function(t2) {
                if (H(c.content), !n3()) throw new Error("Not supported");
                t2(Ie("mail.composeMail", e4));
              });
            }, e3.isSupported = n3, function(e4) {
              e4.New = "new", e4.Reply = "reply", e4.ReplyAll = "replyAll", e4.Forward = "forward";
            }(e3.ComposeMailType || (e3.ComposeMailType = {}));
          }(Nn || (Nn = {})), function(e3) {
            function n3(e4) {
              return new Promise(function(n4) {
                if (!W("2.0.0")) throw { errorCode: r.OLD_PLATFORM };
                if (!kn(e4)) throw { errorCode: r.INVALID_ARGUMENTS };
                if (!t2()) throw I;
                n4(Ee("people.selectPeople", e4));
              });
            }
            function t2() {
              return !!z.supports.people;
            }
            e3.selectPeople = function(e4, t3) {
              var o2, i2, r2;
              return H(c.content, c.task, c.settings), "function" == typeof e4 ? (i2 = (o2 = [e4, t3])[0], r2 = o2[1]) : r2 = e4, M(n3, i2, r2);
            }, e3.isSupported = t2;
          }(Dn || (Dn = {})), function(e3) {
            e3.showProfile = function(e4) {
              return H(c.content), new Promise(function(n3) {
                var t2 = qn(e4), o2 = t2[0], i2 = t2[1];
                if (!o2) throw { errorCode: r.INVALID_ARGUMENTS, message: i2 };
                n3(Ee("profile.showProfile", { modality: e4.modality, persona: e4.persona, triggerType: e4.triggerType, targetRectangle: { x: e4.targetElementBoundingRect.x, y: e4.targetElementBoundingRect.y, width: e4.targetElementBoundingRect.width, height: e4.targetElementBoundingRect.height } }));
              });
            }, e3.isSupported = function() {
              return !!z.supports.profile;
            };
          }(Ln || (Ln = {})), function(e3) {
            function n3(e4) {
              Re("video.videoFrameProcessed", [e4]);
            }
            function t2(e4) {
              Re("video.notifyError", [e4]);
            }
            function o2() {
              return !!z.supports.video;
            }
            !function(e4) {
              e4[e4.NV12 = 0] = "NV12";
            }(e3.VideoFrameFormat || (e3.VideoFrameFormat = {})), function(e4) {
              e4[e4.EffectChanged = 0] = "EffectChanged", e4[e4.EffectDisabled = 1] = "EffectDisabled";
            }(e3.EffectChangeType || (e3.EffectChangeType = {})), e3.registerForVideoFrame = function(e4, i2) {
              if (H(c.sidePanel), !o2()) throw I;
              ce("video.newVideoFrame", function(o3) {
                if (o3) {
                  var i3 = o3.timestamp;
                  e4(o3, function() {
                    n3(i3);
                  }, t2);
                }
              }, false), Re("video.registerForVideoFrame", [i2]);
            }, e3.notifySelectedVideoEffectChanged = function(e4, n4) {
              if (H(c.sidePanel), !o2()) throw I;
              Re("video.videoEffectChanged", [e4, n4]);
            }, e3.registerForVideoEffect = function(e4) {
              if (H(c.sidePanel), !o2()) throw I;
              ce("video.effectParameterChange", e4, false), Re("video.registerForVideoEffect");
            }, e3.isSupported = o2;
          }(Un || (Un = {})), function(e3) {
            var n3 = "search.queryChange", t2 = "search.queryClose", o2 = "search.queryExecute";
            function i2() {
              return !!z.supports.search;
            }
            e3.registerHandlers = function(e4, r2, a2) {
              if (H(c.content), !i2()) throw I;
              ce(t2, e4), ce(o2, r2), a2 && ce(n3, a2);
            }, e3.unregisterHandlers = function() {
              if (H(c.content), !i2()) throw I;
              Re("search.unregister"), ue(n3), ue(t2), ue(o2);
            }, e3.isSupported = i2;
          }(Hn || (Hn = {})), function(e3) {
            function n3(n4) {
              return new Promise(function(t3) {
                if (!a2()) throw I;
                t3(Ee(e3.SharingAPIMessages.shareWebContent, n4));
              });
            }
            function t2(e4) {
              if (!(e4 && e4.content && e4.content.length)) throw { errorCode: r.INVALID_ARGUMENTS, message: "Shared content is missing" };
            }
            function o2(e4) {
              if (e4.content.some(function(e5) {
                return !e5.type;
              })) throw { errorCode: r.INVALID_ARGUMENTS, message: "Shared content type cannot be undefined" };
              if (e4.content.some(function(n4) {
                return n4.type !== e4.content[0].type;
              })) throw { errorCode: r.INVALID_ARGUMENTS, message: "Shared content must be of the same type" };
            }
            function i2(e4) {
              if ("URL" !== e4.content[0].type) throw { errorCode: r.INVALID_ARGUMENTS, message: "Content type is unsupported" };
              if (e4.content.some(function(e5) {
                return !e5.url;
              })) throw { errorCode: r.INVALID_ARGUMENTS, message: "URLs are required for URL content types" };
            }
            function a2() {
              return !!z.supports.sharing;
            }
            e3.SharingAPIMessages = { shareWebContent: "sharing.shareWebContent" }, e3.shareWebContent = function(e4, r2) {
              try {
                t2(e4), o2(e4), i2(e4);
              } catch (e5) {
                return N(function() {
                  return Promise.reject(e5);
                }, r2);
              }
              return H(c.content, c.sidePanel, c.task, c.stage, c.meetingStage), N(n3, r2, e4);
            }, e3.isSupported = a2;
          }(Wn || (Wn = {})), function(e3) {
            function n3() {
              return !!z.supports.stageView;
            }
            e3.open = function(e4) {
              return new Promise(function(t2) {
                if (H(c.content), !n3()) throw I;
                if (!e4) throw new Error("[stageView.open] Stage view params cannot be null");
                t2(Ee("stageView.open", e4));
              });
            }, e3.isSupported = n3;
          }(_n || (_n = {})), function(e3) {
            function n3() {
              return !!z.supports.webStorage;
            }
            e3.isWebStorageClearedOnUserLogOut = function() {
              return H(), n3();
            }, e3.isSupported = n3;
          }(xn || (xn = {})), function(e3) {
            var n3;
            function t2() {
              return !!z.supports.call;
            }
            !function(e4) {
              e4.Unknown = "unknown", e4.Audio = "audio", e4.Video = "video", e4.VideoBasedScreenSharing = "videoBasedScreenSharing", e4.Data = "data";
            }(n3 = e3.CallModalities || (e3.CallModalities = {})), e3.startCall = function(e4) {
              return new Promise(function(o2) {
                var i2;
                if (H(c.content, c.task), !t2()) throw I;
                if (!z.isLegacyTeams) return Re("call.startCall", [e4], o2);
                o2(Ee("executeDeepLink", cn(e4.targets, null === (i2 = e4.requestedModalities) || void 0 === i2 ? void 0 : i2.includes(n3.Video), e4.source)));
              });
            }, e3.isSupported = t2;
          }(Vn || (Vn = {})), function(e3) {
            e3.Messages = $.Messages, e3.FailedReason = $.FailedReason, e3.ExpectedFailureReason = $.ExpectedFailureReason, e3.notifyAppLoaded = function() {
              $.notifyAppLoaded();
            }, e3.notifySuccess = function() {
              $.notifySuccess();
            }, e3.notifyFailure = function(e4) {
              $.notifyFailure(e4);
            }, e3.notifyExpectedFailure = function(e4) {
              $.notifyExpectedFailure(e4);
            };
          }(Bn || (Bn = {})), function(e3) {
            e3.setValidityState = function(e4) {
              Y.config.setValidityState(e4);
            }, e3.getSettings = function(e4) {
              H(c.content, c.settings, c.remove, c.sidePanel), Y.getConfig().then(function(n3) {
                e4(n3);
              });
            }, e3.setSettings = function(e4, n3) {
              H(c.content, c.settings, c.sidePanel), n3 = n3 || k(), Y.config.setConfig(e4).then(function() {
                n3(true);
              }).catch(function(e5) {
                n3(false, e5.message);
              });
            }, e3.registerOnSaveHandler = function(e4) {
              Y.config.registerOnSaveHandlerHelper(e4);
            }, e3.registerOnRemoveHandler = function(e4) {
              Y.config.registerOnRemoveHandlerHelper(e4);
            };
          }(zn || (zn = {}));
          var vt, yt, St, bt, Tt, It, Pt, Et, Ft = function(e3, n3) {
            var t2 = {};
            for (var o2 in e3) Object.prototype.hasOwnProperty.call(e3, o2) && n3.indexOf(o2) < 0 && (t2[o2] = e3[o2]);
            if (null != e3 && "function" == typeof Object.getOwnPropertySymbols) {
              var i2 = 0;
              for (o2 = Object.getOwnPropertySymbols(e3); i2 < o2.length; i2++) n3.indexOf(o2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(e3, o2[i2]) && (t2[o2[i2]] = e3[o2[i2]]);
            }
            return t2;
          };
          !function(e3) {
            function n3(e4) {
              return { url: e4.url, size: { height: e4.height ? e4.height : b.Small, width: e4.width ? e4.width : b.Small }, title: e4.title, fallbackUrl: e4.fallbackUrl };
            }
            function t2(e4) {
              return { url: e4.url, size: { height: e4.height ? e4.height : b.Small, width: e4.width ? e4.width : b.Small }, title: e4.title, fallbackUrl: e4.fallbackUrl, completionBotId: e4.completionBotId };
            }
            function o2(e4) {
              return e4.height = e4.height ? e4.height : b.Small, e4.width = e4.width ? e4.width : b.Small, e4;
            }
            e3.startTask = function(e4, o3) {
              var i2 = o3 ? function(e5) {
                return o3(e5.err, e5.result);
              } : void 0;
              return void 0 !== e4.card || void 0 === e4.url ? (H(c.content, c.sidePanel, c.meetingStage), Re("tasks.startTask", [e4], o3)) : void 0 !== e4.completionBotId ? K.bot.open(t2(e4), i2) : K.open(n3(e4), i2), new jn();
            }, e3.updateTask = function(e4) {
              (e4 = o2(e4)).width, e4.height;
              var n4 = Ft(e4, ["width", "height"]);
              if (Object.keys(n4).length) throw new Error("resize requires a TaskInfo argument containing only width and height");
              K.update.resize(e4);
            }, e3.submitTask = function(e4, n4) {
              K.submit(e4, n4);
            }, e3.getUrlDialogInfoFromTaskInfo = n3, e3.getBotUrlDialogInfoFromTaskInfo = t2, e3.getDefaultSizeIfNotProvided = o2;
          }(vt || (vt = {})), function(e3) {
            function n3(e4, n4) {
              return { errorCode: e4, message: n4 };
            }
            !function(e4) {
              e4.Dropbox = "DROPBOX", e4.Box = "BOX", e4.Sharefile = "SHAREFILE", e4.GoogleDrive = "GOOGLEDRIVE", e4.Egnyte = "EGNYTE", e4.SharePoint = "SharePoint";
            }(e3.CloudStorageProvider || (e3.CloudStorageProvider = {})), function(e4) {
              e4[e4.Sharepoint = 0] = "Sharepoint", e4[e4.WopiIntegration = 1] = "WopiIntegration", e4[e4.Google = 2] = "Google", e4[e4.OneDrive = 3] = "OneDrive", e4[e4.Recent = 4] = "Recent", e4[e4.Aggregate = 5] = "Aggregate", e4[e4.FileSystem = 6] = "FileSystem", e4[e4.Search = 7] = "Search", e4[e4.AllFiles = 8] = "AllFiles", e4[e4.SharedWithMe = 9] = "SharedWithMe";
            }(e3.CloudStorageProviderType || (e3.CloudStorageProviderType = {})), function(e4) {
              e4.ClassMaterials = "classMaterials";
            }(e3.SpecialDocumentLibraryType || (e3.SpecialDocumentLibraryType = {})), function(e4) {
              e4.Readonly = "readonly";
            }(e3.DocumentLibraryAccessType || (e3.DocumentLibraryAccessType = {})), function(e4) {
              e4.Downloaded = "Downloaded", e4.Downloading = "Downloading", e4.Failed = "Failed";
            }(e3.FileDownloadStatus || (e3.FileDownloadStatus = {})), function(e4) {
              e4.Download = "DOWNLOAD", e4.Upload = "UPLOAD", e4.Delete = "DELETE";
            }(e3.CloudStorageProviderFileAction || (e3.CloudStorageProviderFileAction = {})), e3.getCloudStorageFolders = function(e4, n4) {
              if (H(c.content), !e4 || 0 === e4.length) throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");
              if (!n4) throw new Error("[files.getCloudStorageFolders] Callback cannot be null");
              Re("files.getCloudStorageFolders", [e4], n4);
            }, e3.addCloudStorageFolder = function(e4, n4) {
              if (H(c.content), !e4 || 0 === e4.length) throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");
              if (!n4) throw new Error("[files.addCloudStorageFolder] Callback cannot be null");
              Re("files.addCloudStorageFolder", [e4], n4);
            }, e3.deleteCloudStorageFolder = function(e4, n4, t2) {
              if (H(c.content), !e4) throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");
              if (!n4) throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");
              if (!t2) throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");
              Re("files.deleteCloudStorageFolder", [e4, n4], t2);
            }, e3.getCloudStorageFolderContents = function(e4, n4, t2) {
              if (H(c.content), !e4 || !n4) throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");
              if (!t2) throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");
              if ("isSubdirectory" in e4 && !e4.isSubdirectory) throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");
              Re("files.getCloudStorageFolderContents", [e4, n4], t2);
            }, e3.openCloudStorageFile = function(e4, n4, t2) {
              if (H(c.content), !e4 || !n4) throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");
              if (e4.isSubdirectory) throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");
              Re("files.openCloudStorageFile", [e4, n4, t2]);
            }, e3.getExternalProviders = function(e4, n4) {
              if (void 0 === e4 && (e4 = false), H(c.content), !n4) throw new Error("[files.getExternalProviders] Callback cannot be null");
              Re("files.getExternalProviders", [e4], n4);
            }, e3.copyMoveFiles = function(e4, n4, t2, o2, i2, r2) {
              if (void 0 === i2 && (i2 = false), H(c.content), !e4 || 0 === e4.length) throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");
              if (!n4) throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");
              if (!t2) throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");
              if (!o2) throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");
              if (!r2) throw new Error("[files.copyMoveFiles] callback cannot be null");
              Re("files.copyMoveFiles", [e4, n4, t2, o2, i2], r2);
            }, e3.getFileDownloads = function(e4) {
              if (H(c.content), !e4) throw new Error("[files.getFileDownloads] Callback cannot be null");
              Re("files.getFileDownloads", [], e4);
            }, e3.openDownloadFolder = function(e4, n4) {
              if (void 0 === e4 && (e4 = void 0), H(c.content), !n4) throw new Error("[files.openDownloadFolder] Callback cannot be null");
              Re("files.openDownloadFolder", [e4], n4);
            }, e3.addCloudStorageProvider = function(e4) {
              if (H(c.content), !e4) throw n3(r.INVALID_ARGUMENTS, "[files.addCloudStorageProvider] callback cannot be null");
              Re("files.addCloudStorageProvider", [], e4);
            }, e3.removeCloudStorageProvider = function(e4, t2) {
              if (H(c.content), !t2) throw n3(r.INVALID_ARGUMENTS, "[files.removeCloudStorageProvider] callback cannot be null");
              if (!e4 || !e4.content) throw n3(r.INVALID_ARGUMENTS, "[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");
              Re("files.removeCloudStorageProvider", [e4], t2);
            }, e3.addCloudStorageProviderFile = function(e4, t2) {
              if (H(c.content), !t2) throw n3(r.INVALID_ARGUMENTS, "[files.addCloudStorageProviderFile] callback cannot be null");
              if (!e4 || !e4.content) throw n3(r.INVALID_ARGUMENTS, "[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");
              Re("files.addCloudStorageProviderFile", [e4], t2);
            }, e3.renameCloudStorageProviderFile = function(e4, t2) {
              if (H(c.content), !t2) throw n3(r.INVALID_ARGUMENTS, "[files.renameCloudStorageProviderFile] callback cannot be null");
              if (!e4 || !e4.content) throw n3(r.INVALID_ARGUMENTS, "[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");
              Re("files.renameCloudStorageProviderFile", [e4], t2);
            }, e3.deleteCloudStorageProviderFile = function(e4, t2) {
              if (H(c.content), !t2) throw n3(r.INVALID_ARGUMENTS, "[files.deleteCloudStorageProviderFile] callback cannot be null");
              if (!(e4 && e4.content && e4.content.itemList && e4.content.itemList.length > 0)) throw n3(r.INVALID_ARGUMENTS, "[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");
              Re("files.deleteCloudStorageProviderFile", [e4], t2);
            }, e3.downloadCloudStorageProviderFile = function(e4, t2) {
              if (H(c.content), !t2) throw n3(r.INVALID_ARGUMENTS, "[files.downloadCloudStorageProviderFile] callback cannot be null");
              if (!(e4 && e4.content && e4.content.itemList && e4.content.itemList.length > 0)) throw n3(r.INVALID_ARGUMENTS, "[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");
              Re("files.downloadCloudStorageProviderFile", [e4], t2);
            }, e3.uploadCloudStorageProviderFile = function(e4, t2) {
              if (H(c.content), !t2) throw n3(r.INVALID_ARGUMENTS, "[files.uploadCloudStorageProviderFile] callback cannot be null");
              if (!(e4 && e4.content && e4.content.itemList && e4.content.itemList.length > 0)) throw n3(r.INVALID_ARGUMENTS, "[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");
              if (!e4.content.destinationFolder) throw n3(r.INVALID_ARGUMENTS, "[files.uploadCloudStorageProviderFile] Invalid destination folder details");
              Re("files.uploadCloudStorageProviderFile", [e4], t2);
            }, e3.registerCloudStorageProviderListChangeHandler = function(e4) {
              if (H(), !e4) throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");
              ce("files.cloudStorageProviderListChange", e4);
            }, e3.registerCloudStorageProviderContentChangeHandler = function(e4) {
              if (H(), !e4) throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");
              ce("files.cloudStorageProviderContentChange", e4);
            };
          }(yt || (yt = {})), function(e3) {
            function n3() {
              return !!z.supports.meetingRoom;
            }
            e3.getPairedMeetingRoomInfo = function() {
              return new Promise(function(e4) {
                if (H(), !n3()) throw I;
                e4(Ee("meetingRoom.getPairedMeetingRoomInfo"));
              });
            }, e3.sendCommandToPairedMeetingRoom = function(e4) {
              return new Promise(function(t2) {
                if (!e4 || 0 == e4.length) throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");
                if (H(), !n3()) throw I;
                t2(Ee("meetingRoom.sendCommandToPairedMeetingRoom", e4));
              });
            }, e3.registerMeetingRoomCapabilitiesUpdateHandler = function(e4) {
              if (!e4) throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");
              if (H(), !n3()) throw I;
              ce("meetingRoom.meetingRoomCapabilitiesUpdate", function(n4) {
                H(), e4(n4);
              });
            }, e3.registerMeetingRoomStatesUpdateHandler = function(e4) {
              if (!e4) throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");
              if (H(), !n3()) throw I;
              ce("meetingRoom.meetingRoomStatesUpdate", function(n4) {
                H(), e4(n4);
              });
            }, e3.isSupported = n3;
          }(St || (St = {})), function(e3) {
            function n3() {
              return !!z.supports.notifications;
            }
            e3.showNotification = function(e4) {
              if (H(c.content), !n3()) throw I;
              Re("notifications.showNotification", [e4]);
            }, e3.isSupported = n3;
          }(bt || (bt = {})), function(e3) {
            function n3() {
              return !!z.supports.remoteCamera;
            }
            !function(e4) {
              e4.Reset = "Reset", e4.ZoomIn = "ZoomIn", e4.ZoomOut = "ZoomOut", e4.PanLeft = "PanLeft", e4.PanRight = "PanRight", e4.TiltUp = "TiltUp", e4.TiltDown = "TiltDown";
            }(e3.ControlCommand || (e3.ControlCommand = {})), function(e4) {
              e4[e4.CommandResetError = 0] = "CommandResetError", e4[e4.CommandZoomInError = 1] = "CommandZoomInError", e4[e4.CommandZoomOutError = 2] = "CommandZoomOutError", e4[e4.CommandPanLeftError = 3] = "CommandPanLeftError", e4[e4.CommandPanRightError = 4] = "CommandPanRightError", e4[e4.CommandTiltUpError = 5] = "CommandTiltUpError", e4[e4.CommandTiltDownError = 6] = "CommandTiltDownError", e4[e4.SendDataError = 7] = "SendDataError";
            }(e3.ErrorReason || (e3.ErrorReason = {})), function(e4) {
              e4[e4.None = 0] = "None", e4[e4.ControlDenied = 1] = "ControlDenied", e4[e4.ControlNoResponse = 2] = "ControlNoResponse", e4[e4.ControlBusy = 3] = "ControlBusy", e4[e4.AckTimeout = 4] = "AckTimeout", e4[e4.ControlTerminated = 5] = "ControlTerminated", e4[e4.ControllerTerminated = 6] = "ControllerTerminated", e4[e4.DataChannelError = 7] = "DataChannelError", e4[e4.ControllerCancelled = 8] = "ControllerCancelled", e4[e4.ControlDisabled = 9] = "ControlDisabled", e4[e4.ControlTerminatedToAllowOtherController = 10] = "ControlTerminatedToAllowOtherController";
            }(e3.SessionTerminatedReason || (e3.SessionTerminatedReason = {})), e3.getCapableParticipants = function(e4) {
              if (!e4) throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");
              if (H(c.sidePanel), !n3()) throw I;
              Re("remoteCamera.getCapableParticipants", e4);
            }, e3.requestControl = function(e4, t2) {
              if (!e4) throw new Error("[remoteCamera.requestControl] Participant cannot be null");
              if (!t2) throw new Error("[remoteCamera.requestControl] Callback cannot be null");
              if (H(c.sidePanel), !n3()) throw I;
              Re("remoteCamera.requestControl", [e4], t2);
            }, e3.sendControlCommand = function(e4, t2) {
              if (!e4) throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");
              if (!t2) throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");
              if (H(c.sidePanel), !n3()) throw I;
              Re("remoteCamera.sendControlCommand", [e4], t2);
            }, e3.terminateSession = function(e4) {
              if (!e4) throw new Error("[remoteCamera.terminateSession] Callback cannot be null");
              if (H(c.sidePanel), !n3()) throw I;
              Re("remoteCamera.terminateSession", e4);
            }, e3.registerOnCapableParticipantsChangeHandler = function(e4) {
              if (!e4) throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");
              if (H(c.sidePanel), !n3()) throw I;
              ce("remoteCamera.capableParticipantsChange", e4);
            }, e3.registerOnErrorHandler = function(e4) {
              if (!e4) throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");
              if (H(c.sidePanel), !n3()) throw I;
              ce("remoteCamera.handlerError", e4);
            }, e3.registerOnDeviceStateChangeHandler = function(e4) {
              if (!e4) throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");
              if (H(c.sidePanel), !n3()) throw I;
              ce("remoteCamera.deviceStateChange", e4);
            }, e3.registerOnSessionStatusChangeHandler = function(e4) {
              if (!e4) throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");
              if (H(c.sidePanel), !n3()) throw I;
              ce("remoteCamera.sessionStatusChange", e4);
            }, e3.isSupported = n3;
          }(Tt || (Tt = {})), function(e3) {
            function n3() {
              return !!z.supports.appEntity;
            }
            e3.selectAppEntity = function(e4, t2, o2, i2) {
              if (H(c.content), !n3()) throw I;
              if (!e4 || 0 == e4.length) throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");
              if (!i2) throw new Error("[appEntity.selectAppEntity] Callback cannot be null");
              Re("appEntity.selectAppEntity", [e4, t2, o2], i2);
            }, e3.isSupported = n3;
          }(It || (It = {})), function(e3) {
            function n3() {
              return !!z.supports.teams;
            }
            !function(e4) {
              e4[e4.Regular = 0] = "Regular", e4[e4.Private = 1] = "Private", e4[e4.Shared = 2] = "Shared";
            }(e3.ChannelType || (e3.ChannelType = {})), e3.getTeamChannels = function(e4, t2) {
              if (H(c.content), !n3()) throw I;
              if (!e4) throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");
              if (!t2) throw new Error("[teams.getTeamChannels] Callback cannot be null");
              Re("teams.getTeamChannels", [e4], t2);
            }, e3.refreshSiteUrl = function(e4, t2) {
              if (H(), !n3()) throw I;
              if (!e4) throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");
              if (!t2) throw new Error("[teams.refreshSiteUrl] Callback cannot be null");
              Re("teams.refreshSiteUrl", [e4], t2);
            }, e3.isSupported = n3, function(e4) {
              function n4() {
                return !!z.supports.teams && !!z.supports.teams.fullTrust;
              }
              !function(e5) {
                function n5() {
                  return !!z.supports.teams && (!!z.supports.teams.fullTrust && !!z.supports.teams.fullTrust.joinedTeams);
                }
                e5.getUserJoinedTeams = function(e6) {
                  return new Promise(function(t2) {
                    if (H(), !n5()) throw I;
                    if ((y.hostClientType === s.android || y.hostClientType === s.teamsRoomsAndroid || y.hostClientType === s.teamsPhones || y.hostClientType === s.teamsDisplays) && !W("2.0.1")) {
                      var o2 = { errorCode: r.OLD_PLATFORM };
                      throw new Error(JSON.stringify(o2));
                    }
                    t2(Te("getUserJoinedTeams", e6));
                  });
                }, e5.isSupported = n5;
              }(e4.joinedTeams || (e4.joinedTeams = {})), e4.getConfigSetting = function(e5) {
                return new Promise(function(t2) {
                  if (H(), !n4()) throw I;
                  t2(Te("getConfigSetting", e5));
                });
              }, e4.isSupported = n4;
            }(e3.fullTrust || (e3.fullTrust = {}));
          }(Pt || (Pt = {})), function(e3) {
            function n3() {
              return Un.isSupported();
            }
            function t2(e4) {
              Re("video.videoFrameProcessed", [e4]);
            }
            function o2(e4) {
              Re("video.notifyError", [e4]);
            }
            e3.registerForVideoFrame = function(e4, i2) {
              if (H(c.sidePanel), !n3()) throw I;
              ce("video.newVideoFrame", function(n4) {
                if (n4) {
                  var i3 = n4.timestamp;
                  e4(n4, function() {
                    t2(i3);
                  }, o2);
                }
              }, false), Re("video.registerForVideoFrame", [i2]);
            }, e3.notifySelectedVideoEffectChanged = function(e4, t3, o3) {
              if (H(c.sidePanel), !n3()) throw I;
              Re("video.videoEffectChanged", [e4, t3, o3]);
            }, e3.registerForVideoEffect = function(e4) {
              if (H(c.sidePanel), !n3()) throw I;
              ce("video.effectParameterChange", e4, false), Re("video.registerForVideoEffect");
            }, e3.updatePersonalizedEffects = function(e4) {
              if (H(c.sidePanel), !Un.isSupported()) throw I;
              Re("video.personalizedEffectsChanged", [e4]);
            }, e3.isSupported = n3;
          }(Et || (Et = {}));
        })(), o;
      })();
    });
  }
});

// node_modules/solid-js/dist/solid.js
var sharedConfig = {
  context: void 0,
  registry: void 0
};
function setHydrateContext(context) {
  sharedConfig.context = context;
}
function nextHydrateContext() {
  return {
    ...sharedConfig.context,
    id: `${sharedConfig.context.id}${sharedConfig.context.count++}-`,
    count: 0
  };
}
var equalFn = (a, b) => a === b;
var $PROXY = Symbol("solid-proxy");
var $TRACK = Symbol("solid-track");
var $DEVCOMP = Symbol("solid-dev-component");
var signalOptions = {
  equals: equalFn
};
var ERROR = null;
var runEffects = runQueue;
var STALE = 1;
var PENDING = 2;
var UNOWNED = {
  owned: null,
  cleanups: null,
  context: null,
  owner: null
};
var NO_INIT = {};
var Owner = null;
var Transition = null;
var Scheduler = null;
var ExternalSourceConfig = null;
var Listener = null;
var Updates = null;
var Effects = null;
var ExecCount = 0;
function createRoot(fn, detachedOwner) {
  const listener = Listener, owner = Owner, unowned = fn.length === 0, current = detachedOwner === void 0 ? owner : detachedOwner, root2 = unowned ? UNOWNED : {
    owned: null,
    cleanups: null,
    context: current ? current.context : null,
    owner: current
  }, updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root2)));
  Owner = root2;
  Listener = null;
  try {
    return runUpdates(updateFn, true);
  } finally {
    Listener = listener;
    Owner = owner;
  }
}
function createSignal(value, options) {
  options = options ? Object.assign({}, signalOptions, options) : signalOptions;
  const s = {
    value,
    observers: null,
    observerSlots: null,
    comparator: options.equals || void 0
  };
  const setter = (value2) => {
    if (typeof value2 === "function") {
      if (Transition && Transition.running && Transition.sources.has(s)) value2 = value2(s.tValue);
      else value2 = value2(s.value);
    }
    return writeSignal(s, value2);
  };
  return [readSignal.bind(s), setter];
}
function createComputed(fn, value, options) {
  const c = createComputation(fn, value, true, STALE);
  if (Scheduler && Transition && Transition.running) Updates.push(c);
  else updateComputation(c);
}
function createRenderEffect(fn, value, options) {
  const c = createComputation(fn, value, false, STALE);
  if (Scheduler && Transition && Transition.running) Updates.push(c);
  else updateComputation(c);
}
function createEffect(fn, value, options) {
  runEffects = runUserEffects;
  const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
  if (s) c.suspense = s;
  if (!options || !options.render) c.user = true;
  Effects ? Effects.push(c) : updateComputation(c);
}
function createMemo(fn, value, options) {
  options = options ? Object.assign({}, signalOptions, options) : signalOptions;
  const c = createComputation(fn, value, true, 0);
  c.observers = null;
  c.observerSlots = null;
  c.comparator = options.equals || void 0;
  if (Scheduler && Transition && Transition.running) {
    c.tState = STALE;
    Updates.push(c);
  } else updateComputation(c);
  return readSignal.bind(c);
}
function isPromise(v) {
  return v && typeof v === "object" && "then" in v;
}
function createResource(pSource, pFetcher, pOptions) {
  let source;
  let fetcher;
  let options;
  if (arguments.length === 2 && typeof pFetcher === "object" || arguments.length === 1) {
    source = true;
    fetcher = pSource;
    options = pFetcher || {};
  } else {
    source = pSource;
    fetcher = pFetcher;
    options = pOptions || {};
  }
  let pr = null, initP = NO_INIT, id = null, loadedUnderTransition = false, scheduled = false, resolved = "initialValue" in options, dynamic = typeof source === "function" && createMemo(source);
  const contexts = /* @__PURE__ */ new Set(), [value, setValue] = (options.storage || createSignal)(options.initialValue), [error, setError] = createSignal(void 0), [track, trigger] = createSignal(void 0, {
    equals: false
  }), [state, setState] = createSignal(resolved ? "ready" : "unresolved");
  if (sharedConfig.context) {
    id = `${sharedConfig.context.id}${sharedConfig.context.count++}`;
    let v;
    if (options.ssrLoadFrom === "initial") initP = options.initialValue;
    else if (sharedConfig.load && (v = sharedConfig.load(id))) initP = v;
  }
  function loadEnd(p, v, error2, key) {
    if (pr === p) {
      pr = null;
      key !== void 0 && (resolved = true);
      if ((p === initP || v === initP) && options.onHydrated)
        queueMicrotask(
          () => options.onHydrated(key, {
            value: v
          })
        );
      initP = NO_INIT;
      if (Transition && p && loadedUnderTransition) {
        Transition.promises.delete(p);
        loadedUnderTransition = false;
        runUpdates(() => {
          Transition.running = true;
          completeLoad(v, error2);
        }, false);
      } else completeLoad(v, error2);
    }
    return v;
  }
  function completeLoad(v, err) {
    runUpdates(() => {
      if (err === void 0) setValue(() => v);
      setState(err !== void 0 ? "errored" : resolved ? "ready" : "unresolved");
      setError(err);
      for (const c of contexts.keys()) c.decrement();
      contexts.clear();
    }, false);
  }
  function read() {
    const c = SuspenseContext && useContext(SuspenseContext), v = value(), err = error();
    if (err !== void 0 && !pr) throw err;
    if (Listener && !Listener.user && c) {
      createComputed(() => {
        track();
        if (pr) {
          if (c.resolved && Transition && loadedUnderTransition) Transition.promises.add(pr);
          else if (!contexts.has(c)) {
            c.increment();
            contexts.add(c);
          }
        }
      });
    }
    return v;
  }
  function load(refetching = true) {
    if (refetching !== false && scheduled) return;
    scheduled = false;
    const lookup = dynamic ? dynamic() : source;
    loadedUnderTransition = Transition && Transition.running;
    if (lookup == null || lookup === false) {
      loadEnd(pr, untrack(value));
      return;
    }
    if (Transition && pr) Transition.promises.delete(pr);
    const p = initP !== NO_INIT ? initP : untrack(
      () => fetcher(lookup, {
        value: value(),
        refetching
      })
    );
    if (!isPromise(p)) {
      loadEnd(pr, p, void 0, lookup);
      return p;
    }
    pr = p;
    if ("value" in p) {
      if (p.status === "success") loadEnd(pr, p.value, void 0, lookup);
      else loadEnd(pr, void 0, void 0, lookup);
      return p;
    }
    scheduled = true;
    queueMicrotask(() => scheduled = false);
    runUpdates(() => {
      setState(resolved ? "refreshing" : "pending");
      trigger();
    }, false);
    return p.then(
      (v) => loadEnd(p, v, void 0, lookup),
      (e) => loadEnd(p, void 0, castError(e), lookup)
    );
  }
  Object.defineProperties(read, {
    state: {
      get: () => state()
    },
    error: {
      get: () => error()
    },
    loading: {
      get() {
        const s = state();
        return s === "pending" || s === "refreshing";
      }
    },
    latest: {
      get() {
        if (!resolved) return read();
        const err = error();
        if (err && !pr) throw err;
        return value();
      }
    }
  });
  if (dynamic) createComputed(() => load(false));
  else load(false);
  return [
    read,
    {
      refetch: load,
      mutate: setValue
    }
  ];
}
function untrack(fn) {
  if (!ExternalSourceConfig && Listener === null) return fn();
  const listener = Listener;
  Listener = null;
  try {
    if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);
    return fn();
  } finally {
    Listener = listener;
  }
}
function on(deps, fn, options) {
  const isArray = Array.isArray(deps);
  let prevInput;
  let defer = options && options.defer;
  return (prevValue) => {
    let input;
    if (isArray) {
      input = Array(deps.length);
      for (let i = 0; i < deps.length; i++) input[i] = deps[i]();
    } else input = deps();
    if (defer) {
      defer = false;
      return prevValue;
    }
    const result2 = untrack(() => fn(input, prevInput, prevValue));
    prevInput = input;
    return result2;
  };
}
function onMount(fn) {
  createEffect(() => untrack(fn));
}
function onCleanup(fn) {
  if (Owner === null) ;
  else if (Owner.cleanups === null) Owner.cleanups = [fn];
  else Owner.cleanups.push(fn);
  return fn;
}
function getListener() {
  return Listener;
}
function getOwner() {
  return Owner;
}
function runWithOwner(o, fn) {
  const prev = Owner;
  const prevListener = Listener;
  Owner = o;
  Listener = null;
  try {
    return runUpdates(fn, true);
  } catch (err) {
    handleError(err);
  } finally {
    Owner = prev;
    Listener = prevListener;
  }
}
function startTransition(fn) {
  if (Transition && Transition.running) {
    fn();
    return Transition.done;
  }
  const l = Listener;
  const o = Owner;
  return Promise.resolve().then(() => {
    Listener = l;
    Owner = o;
    let t;
    if (Scheduler || SuspenseContext) {
      t = Transition || (Transition = {
        sources: /* @__PURE__ */ new Set(),
        effects: [],
        promises: /* @__PURE__ */ new Set(),
        disposed: /* @__PURE__ */ new Set(),
        queue: /* @__PURE__ */ new Set(),
        running: true
      });
      t.done || (t.done = new Promise((res) => t.resolve = res));
      t.running = true;
    }
    runUpdates(fn, false);
    Listener = Owner = null;
    return t ? t.done : void 0;
  });
}
var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
function createContext(defaultValue, options) {
  const id = Symbol("context");
  return {
    id,
    Provider: createProvider(id),
    defaultValue
  };
}
function useContext(context) {
  return Owner && Owner.context && Owner.context[context.id] !== void 0 ? Owner.context[context.id] : context.defaultValue;
}
function children(fn) {
  const children2 = createMemo(fn);
  const memo = createMemo(() => resolveChildren(children2()));
  memo.toArray = () => {
    const c = memo();
    return Array.isArray(c) ? c : c != null ? [c] : [];
  };
  return memo;
}
var SuspenseContext;
function readSignal() {
  const runningTransition = Transition && Transition.running;
  if (this.sources && (runningTransition ? this.tState : this.state)) {
    if ((runningTransition ? this.tState : this.state) === STALE) updateComputation(this);
    else {
      const updates = Updates;
      Updates = null;
      runUpdates(() => lookUpstream(this), false);
      Updates = updates;
    }
  }
  if (Listener) {
    const sSlot = this.observers ? this.observers.length : 0;
    if (!Listener.sources) {
      Listener.sources = [this];
      Listener.sourceSlots = [sSlot];
    } else {
      Listener.sources.push(this);
      Listener.sourceSlots.push(sSlot);
    }
    if (!this.observers) {
      this.observers = [Listener];
      this.observerSlots = [Listener.sources.length - 1];
    } else {
      this.observers.push(Listener);
      this.observerSlots.push(Listener.sources.length - 1);
    }
  }
  if (runningTransition && Transition.sources.has(this)) return this.tValue;
  return this.value;
}
function writeSignal(node, value, isComp) {
  let current = Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value;
  if (!node.comparator || !node.comparator(current, value)) {
    if (Transition) {
      const TransitionRunning = Transition.running;
      if (TransitionRunning || !isComp && Transition.sources.has(node)) {
        Transition.sources.add(node);
        node.tValue = value;
      }
      if (!TransitionRunning) node.value = value;
    } else node.value = value;
    if (node.observers && node.observers.length) {
      runUpdates(() => {
        for (let i = 0; i < node.observers.length; i += 1) {
          const o = node.observers[i];
          const TransitionRunning = Transition && Transition.running;
          if (TransitionRunning && Transition.disposed.has(o)) continue;
          if (TransitionRunning ? !o.tState : !o.state) {
            if (o.pure) Updates.push(o);
            else Effects.push(o);
            if (o.observers) markDownstream(o);
          }
          if (!TransitionRunning) o.state = STALE;
          else o.tState = STALE;
        }
        if (Updates.length > 1e6) {
          Updates = [];
          if (false) ;
          throw new Error();
        }
      }, false);
    }
  }
  return value;
}
function updateComputation(node) {
  if (!node.fn) return;
  cleanNode(node);
  const time = ExecCount;
  runComputation(
    node,
    Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value,
    time
  );
  if (Transition && !Transition.running && Transition.sources.has(node)) {
    queueMicrotask(() => {
      runUpdates(() => {
        Transition && (Transition.running = true);
        Listener = Owner = node;
        runComputation(node, node.tValue, time);
        Listener = Owner = null;
      }, false);
    });
  }
}
function runComputation(node, value, time) {
  let nextValue;
  const owner = Owner, listener = Listener;
  Listener = Owner = node;
  try {
    nextValue = node.fn(value);
  } catch (err) {
    if (node.pure) {
      if (Transition && Transition.running) {
        node.tState = STALE;
        node.tOwned && node.tOwned.forEach(cleanNode);
        node.tOwned = void 0;
      } else {
        node.state = STALE;
        node.owned && node.owned.forEach(cleanNode);
        node.owned = null;
      }
    }
    node.updatedAt = time + 1;
    return handleError(err);
  } finally {
    Listener = listener;
    Owner = owner;
  }
  if (!node.updatedAt || node.updatedAt <= time) {
    if (node.updatedAt != null && "observers" in node) {
      writeSignal(node, nextValue, true);
    } else if (Transition && Transition.running && node.pure) {
      Transition.sources.add(node);
      node.tValue = nextValue;
    } else node.value = nextValue;
    node.updatedAt = time;
  }
}
function createComputation(fn, init, pure, state = STALE, options) {
  const c = {
    fn,
    state,
    updatedAt: null,
    owned: null,
    sources: null,
    sourceSlots: null,
    cleanups: null,
    value: init,
    owner: Owner,
    context: Owner ? Owner.context : null,
    pure
  };
  if (Transition && Transition.running) {
    c.state = 0;
    c.tState = state;
  }
  if (Owner === null) ;
  else if (Owner !== UNOWNED) {
    if (Transition && Transition.running && Owner.pure) {
      if (!Owner.tOwned) Owner.tOwned = [c];
      else Owner.tOwned.push(c);
    } else {
      if (!Owner.owned) Owner.owned = [c];
      else Owner.owned.push(c);
    }
  }
  if (ExternalSourceConfig && c.fn) {
    const [track, trigger] = createSignal(void 0, {
      equals: false
    });
    const ordinary = ExternalSourceConfig.factory(c.fn, trigger);
    onCleanup(() => ordinary.dispose());
    const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());
    const inTransition = ExternalSourceConfig.factory(c.fn, triggerInTransition);
    c.fn = (x) => {
      track();
      return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);
    };
  }
  return c;
}
function runTop(node) {
  const runningTransition = Transition && Transition.running;
  if ((runningTransition ? node.tState : node.state) === 0) return;
  if ((runningTransition ? node.tState : node.state) === PENDING) return lookUpstream(node);
  if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
  const ancestors = [node];
  while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
    if (runningTransition && Transition.disposed.has(node)) return;
    if (runningTransition ? node.tState : node.state) ancestors.push(node);
  }
  for (let i = ancestors.length - 1; i >= 0; i--) {
    node = ancestors[i];
    if (runningTransition) {
      let top = node, prev = ancestors[i + 1];
      while ((top = top.owner) && top !== prev) {
        if (Transition.disposed.has(top)) return;
      }
    }
    if ((runningTransition ? node.tState : node.state) === STALE) {
      updateComputation(node);
    } else if ((runningTransition ? node.tState : node.state) === PENDING) {
      const updates = Updates;
      Updates = null;
      runUpdates(() => lookUpstream(node, ancestors[0]), false);
      Updates = updates;
    }
  }
}
function runUpdates(fn, init) {
  if (Updates) return fn();
  let wait = false;
  if (!init) Updates = [];
  if (Effects) wait = true;
  else Effects = [];
  ExecCount++;
  try {
    const res = fn();
    completeUpdates(wait);
    return res;
  } catch (err) {
    if (!wait) Effects = null;
    Updates = null;
    handleError(err);
  }
}
function completeUpdates(wait) {
  if (Updates) {
    if (Scheduler && Transition && Transition.running) scheduleQueue(Updates);
    else runQueue(Updates);
    Updates = null;
  }
  if (wait) return;
  let res;
  if (Transition) {
    if (!Transition.promises.size && !Transition.queue.size) {
      const sources = Transition.sources;
      const disposed = Transition.disposed;
      Effects.push.apply(Effects, Transition.effects);
      res = Transition.resolve;
      for (const e2 of Effects) {
        "tState" in e2 && (e2.state = e2.tState);
        delete e2.tState;
      }
      Transition = null;
      runUpdates(() => {
        for (const d of disposed) cleanNode(d);
        for (const v of sources) {
          v.value = v.tValue;
          if (v.owned) {
            for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]);
          }
          if (v.tOwned) v.owned = v.tOwned;
          delete v.tValue;
          delete v.tOwned;
          v.tState = 0;
        }
        setTransPending(false);
      }, false);
    } else if (Transition.running) {
      Transition.running = false;
      Transition.effects.push.apply(Transition.effects, Effects);
      Effects = null;
      setTransPending(true);
      return;
    }
  }
  const e = Effects;
  Effects = null;
  if (e.length) runUpdates(() => runEffects(e), false);
  if (res) res();
}
function runQueue(queue) {
  for (let i = 0; i < queue.length; i++) runTop(queue[i]);
}
function scheduleQueue(queue) {
  for (let i = 0; i < queue.length; i++) {
    const item = queue[i];
    const tasks = Transition.queue;
    if (!tasks.has(item)) {
      tasks.add(item);
      Scheduler(() => {
        tasks.delete(item);
        runUpdates(() => {
          Transition.running = true;
          runTop(item);
        }, false);
        Transition && (Transition.running = false);
      });
    }
  }
}
function runUserEffects(queue) {
  let i, userLength = 0;
  for (i = 0; i < queue.length; i++) {
    const e = queue[i];
    if (!e.user) runTop(e);
    else queue[userLength++] = e;
  }
  if (sharedConfig.context) {
    if (sharedConfig.count) {
      sharedConfig.effects || (sharedConfig.effects = []);
      sharedConfig.effects.push(...queue.slice(0, userLength));
      return;
    } else if (sharedConfig.effects) {
      queue = [...sharedConfig.effects, ...queue];
      userLength += sharedConfig.effects.length;
      delete sharedConfig.effects;
    }
    setHydrateContext();
  }
  for (i = 0; i < userLength; i++) runTop(queue[i]);
}
function lookUpstream(node, ignore) {
  const runningTransition = Transition && Transition.running;
  if (runningTransition) node.tState = 0;
  else node.state = 0;
  for (let i = 0; i < node.sources.length; i += 1) {
    const source = node.sources[i];
    if (source.sources) {
      const state = runningTransition ? source.tState : source.state;
      if (state === STALE) {
        if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount))
          runTop(source);
      } else if (state === PENDING) lookUpstream(source, ignore);
    }
  }
}
function markDownstream(node) {
  const runningTransition = Transition && Transition.running;
  for (let i = 0; i < node.observers.length; i += 1) {
    const o = node.observers[i];
    if (runningTransition ? !o.tState : !o.state) {
      if (runningTransition) o.tState = PENDING;
      else o.state = PENDING;
      if (o.pure) Updates.push(o);
      else Effects.push(o);
      o.observers && markDownstream(o);
    }
  }
}
function cleanNode(node) {
  let i;
  if (node.sources) {
    while (node.sources.length) {
      const source = node.sources.pop(), index = node.sourceSlots.pop(), obs = source.observers;
      if (obs && obs.length) {
        const n = obs.pop(), s = source.observerSlots.pop();
        if (index < obs.length) {
          n.sourceSlots[s] = index;
          obs[index] = n;
          source.observerSlots[index] = s;
        }
      }
    }
  }
  if (Transition && Transition.running && node.pure) {
    if (node.tOwned) {
      for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]);
      delete node.tOwned;
    }
    reset(node, true);
  } else if (node.owned) {
    for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]);
    node.owned = null;
  }
  if (node.cleanups) {
    for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i]();
    node.cleanups = null;
  }
  if (Transition && Transition.running) node.tState = 0;
  else node.state = 0;
}
function reset(node, top) {
  if (!top) {
    node.tState = 0;
    Transition.disposed.add(node);
  }
  if (node.owned) {
    for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]);
  }
}
function castError(err) {
  if (err instanceof Error) return err;
  return new Error(typeof err === "string" ? err : "Unknown error", {
    cause: err
  });
}
function runErrors(err, fns, owner) {
  try {
    for (const f of fns) f(err);
  } catch (e) {
    handleError(e, owner && owner.owner || null);
  }
}
function handleError(err, owner = Owner) {
  const fns = ERROR && owner && owner.context && owner.context[ERROR];
  const error = castError(err);
  if (!fns) throw error;
  if (Effects)
    Effects.push({
      fn() {
        runErrors(error, fns, owner);
      },
      state: STALE
    });
  else runErrors(error, fns, owner);
}
function resolveChildren(children2) {
  if (typeof children2 === "function" && !children2.length) return resolveChildren(children2());
  if (Array.isArray(children2)) {
    const results = [];
    for (let i = 0; i < children2.length; i++) {
      const result2 = resolveChildren(children2[i]);
      Array.isArray(result2) ? results.push.apply(results, result2) : results.push(result2);
    }
    return results;
  }
  return children2;
}
function createProvider(id, options) {
  return function provider(props) {
    let res;
    createRenderEffect(
      () => res = untrack(() => {
        Owner.context = {
          ...Owner.context,
          [id]: props.value
        };
        return children(() => props.children);
      }),
      void 0
    );
    return res;
  };
}
var FALLBACK = Symbol("fallback");
function dispose(d) {
  for (let i = 0; i < d.length; i++) d[i]();
}
function mapArray(list, mapFn, options = {}) {
  let items = [], mapped = [], disposers = [], len = 0, indexes = mapFn.length > 1 ? [] : null;
  onCleanup(() => dispose(disposers));
  return () => {
    let newItems = list() || [], i, j;
    newItems[$TRACK];
    return untrack(() => {
      let newLen = newItems.length, newIndices, newIndicesNext, temp, tempdisposers, tempIndexes, start, end, newEnd, item;
      if (newLen === 0) {
        if (len !== 0) {
          dispose(disposers);
          disposers = [];
          items = [];
          mapped = [];
          len = 0;
          indexes && (indexes = []);
        }
        if (options.fallback) {
          items = [FALLBACK];
          mapped[0] = createRoot((disposer) => {
            disposers[0] = disposer;
            return options.fallback();
          });
          len = 1;
        }
      } else if (len === 0) {
        mapped = new Array(newLen);
        for (j = 0; j < newLen; j++) {
          items[j] = newItems[j];
          mapped[j] = createRoot(mapper);
        }
        len = newLen;
      } else {
        temp = new Array(newLen);
        tempdisposers = new Array(newLen);
        indexes && (tempIndexes = new Array(newLen));
        for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++) ;
        for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {
          temp[newEnd] = mapped[end];
          tempdisposers[newEnd] = disposers[end];
          indexes && (tempIndexes[newEnd] = indexes[end]);
        }
        newIndices = /* @__PURE__ */ new Map();
        newIndicesNext = new Array(newEnd + 1);
        for (j = newEnd; j >= start; j--) {
          item = newItems[j];
          i = newIndices.get(item);
          newIndicesNext[j] = i === void 0 ? -1 : i;
          newIndices.set(item, j);
        }
        for (i = start; i <= end; i++) {
          item = items[i];
          j = newIndices.get(item);
          if (j !== void 0 && j !== -1) {
            temp[j] = mapped[i];
            tempdisposers[j] = disposers[i];
            indexes && (tempIndexes[j] = indexes[i]);
            j = newIndicesNext[j];
            newIndices.set(item, j);
          } else disposers[i]();
        }
        for (j = start; j < newLen; j++) {
          if (j in temp) {
            mapped[j] = temp[j];
            disposers[j] = tempdisposers[j];
            if (indexes) {
              indexes[j] = tempIndexes[j];
              indexes[j](j);
            }
          } else mapped[j] = createRoot(mapper);
        }
        mapped = mapped.slice(0, len = newLen);
        items = newItems.slice(0);
      }
      return mapped;
    });
    function mapper(disposer) {
      disposers[j] = disposer;
      if (indexes) {
        const [s, set] = createSignal(j);
        indexes[j] = set;
        return mapFn(newItems[j], s);
      }
      return mapFn(newItems[j]);
    }
  };
}
var hydrationEnabled = false;
function createComponent(Comp, props) {
  if (hydrationEnabled) {
    if (sharedConfig.context) {
      const c = sharedConfig.context;
      setHydrateContext(nextHydrateContext());
      const r = untrack(() => Comp(props || {}));
      setHydrateContext(c);
      return r;
    }
  }
  return untrack(() => Comp(props || {}));
}
function trueFn() {
  return true;
}
var propTraps = {
  get(_4, property2, receiver) {
    if (property2 === $PROXY) return receiver;
    return _4.get(property2);
  },
  has(_4, property2) {
    if (property2 === $PROXY) return true;
    return _4.has(property2);
  },
  set: trueFn,
  deleteProperty: trueFn,
  getOwnPropertyDescriptor(_4, property2) {
    return {
      configurable: true,
      enumerable: true,
      get() {
        return _4.get(property2);
      },
      set: trueFn,
      deleteProperty: trueFn
    };
  },
  ownKeys(_4) {
    return _4.keys();
  }
};
function resolveSource(s) {
  return !(s = typeof s === "function" ? s() : s) ? {} : s;
}
function resolveSources() {
  for (let i = 0, length = this.length; i < length; ++i) {
    const v = this[i]();
    if (v !== void 0) return v;
  }
}
function mergeProps(...sources) {
  let proxy = false;
  for (let i = 0; i < sources.length; i++) {
    const s = sources[i];
    proxy = proxy || !!s && $PROXY in s;
    sources[i] = typeof s === "function" ? (proxy = true, createMemo(s)) : s;
  }
  if (proxy) {
    return new Proxy(
      {
        get(property2) {
          for (let i = sources.length - 1; i >= 0; i--) {
            const v = resolveSource(sources[i])[property2];
            if (v !== void 0) return v;
          }
        },
        has(property2) {
          for (let i = sources.length - 1; i >= 0; i--) {
            if (property2 in resolveSource(sources[i])) return true;
          }
          return false;
        },
        keys() {
          const keys2 = [];
          for (let i = 0; i < sources.length; i++)
            keys2.push(...Object.keys(resolveSource(sources[i])));
          return [...new Set(keys2)];
        }
      },
      propTraps
    );
  }
  const sourcesMap = {};
  const defined = /* @__PURE__ */ Object.create(null);
  for (let i = sources.length - 1; i >= 0; i--) {
    const source = sources[i];
    if (!source) continue;
    const sourceKeys = Object.getOwnPropertyNames(source);
    for (let i2 = sourceKeys.length - 1; i2 >= 0; i2--) {
      const key = sourceKeys[i2];
      if (key === "__proto__" || key === "constructor") continue;
      const desc = Object.getOwnPropertyDescriptor(source, key);
      if (!defined[key]) {
        defined[key] = desc.get ? {
          enumerable: true,
          configurable: true,
          get: resolveSources.bind(sourcesMap[key] = [desc.get.bind(source)])
        } : desc.value !== void 0 ? desc : void 0;
      } else {
        const sources2 = sourcesMap[key];
        if (sources2) {
          if (desc.get) sources2.push(desc.get.bind(source));
          else if (desc.value !== void 0) sources2.push(() => desc.value);
        }
      }
    }
  }
  const target = {};
  const definedKeys = Object.keys(defined);
  for (let i = definedKeys.length - 1; i >= 0; i--) {
    const key = definedKeys[i], desc = defined[key];
    if (desc && desc.get) Object.defineProperty(target, key, desc);
    else target[key] = desc ? desc.value : void 0;
  }
  return target;
}
function lazy(fn) {
  let comp;
  let p;
  const wrap2 = (props) => {
    const ctx = sharedConfig.context;
    if (ctx) {
      const [s, set] = createSignal();
      sharedConfig.count || (sharedConfig.count = 0);
      sharedConfig.count++;
      (p || (p = fn())).then((mod) => {
        setHydrateContext(ctx);
        sharedConfig.count--;
        set(() => mod.default);
        setHydrateContext();
      });
      comp = s;
    } else if (!comp) {
      const [s] = createResource(() => (p || (p = fn())).then((mod) => mod.default));
      comp = s;
    }
    let Comp;
    return createMemo(
      () => (Comp = comp()) && untrack(() => {
        if (false) ;
        if (!ctx) return Comp(props);
        const c = sharedConfig.context;
        setHydrateContext(ctx);
        const r = Comp(props);
        setHydrateContext(c);
        return r;
      })
    );
  };
  wrap2.preload = () => p || ((p = fn()).then((mod) => comp = () => mod.default), p);
  return wrap2;
}
var narrowedError = (name) => `Stale read from <${name}>.`;
function For(props) {
  const fallback = "fallback" in props && {
    fallback: () => props.fallback
  };
  return createMemo(mapArray(() => props.each, props.children, fallback || void 0));
}
function Show(props) {
  const keyed = props.keyed;
  const condition = createMemo(() => props.when, void 0, {
    equals: (a, b) => keyed ? a === b : !a === !b
  });
  return createMemo(
    () => {
      const c = condition();
      if (c) {
        const child = props.children;
        const fn = typeof child === "function" && child.length > 0;
        return fn ? untrack(
          () => child(
            keyed ? c : () => {
              if (!untrack(condition)) throw narrowedError("Show");
              return props.when;
            }
          )
        ) : child;
      }
      return props.fallback;
    },
    void 0,
    void 0
  );
}
function Switch(props) {
  let keyed = false;
  const equals2 = (a, b) => (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
  const conditions = children(() => props.children), evalConditions = createMemo(
    () => {
      let conds = conditions();
      if (!Array.isArray(conds)) conds = [conds];
      for (let i = 0; i < conds.length; i++) {
        const c = conds[i].when;
        if (c) {
          keyed = !!conds[i].keyed;
          return [i, c, conds[i]];
        }
      }
      return [-1];
    },
    void 0,
    {
      equals: equals2
    }
  );
  return createMemo(
    () => {
      const [index, when, cond] = evalConditions();
      if (index < 0) return props.fallback;
      const c = cond.children;
      const fn = typeof c === "function" && c.length > 0;
      return fn ? untrack(
        () => c(
          keyed ? when : () => {
            if (untrack(evalConditions)[0] !== index) throw narrowedError("Match");
            return cond.when;
          }
        )
      ) : c;
    },
    void 0,
    void 0
  );
}
function Match(props) {
  return props;
}
var Errors;
function resetErrorBoundaries() {
  Errors && [...Errors].forEach((fn) => fn());
}
var SuspenseListContext = createContext();

// node_modules/solid-js/web/dist/web.js
var booleans = [
  "allowfullscreen",
  "async",
  "autofocus",
  "autoplay",
  "checked",
  "controls",
  "default",
  "disabled",
  "formnovalidate",
  "hidden",
  "indeterminate",
  "inert",
  "ismap",
  "loop",
  "multiple",
  "muted",
  "nomodule",
  "novalidate",
  "open",
  "playsinline",
  "readonly",
  "required",
  "reversed",
  "seamless",
  "selected"
];
var Properties = /* @__PURE__ */ new Set([
  "className",
  "value",
  "readOnly",
  "formNoValidate",
  "isMap",
  "noModule",
  "playsInline",
  ...booleans
]);
function reconcileArrays(parentNode, a, b) {
  let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after2 = a[aEnd - 1].nextSibling, map2 = null;
  while (aStart < aEnd || bStart < bEnd) {
    if (a[aStart] === b[bStart]) {
      aStart++;
      bStart++;
      continue;
    }
    while (a[aEnd - 1] === b[bEnd - 1]) {
      aEnd--;
      bEnd--;
    }
    if (aEnd === aStart) {
      const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after2;
      while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
    } else if (bEnd === bStart) {
      while (aStart < aEnd) {
        if (!map2 || !map2.has(a[aStart])) a[aStart].remove();
        aStart++;
      }
    } else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
      const node = a[--aEnd].nextSibling;
      parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);
      parentNode.insertBefore(b[--bEnd], node);
      a[aEnd] = b[bEnd];
    } else {
      if (!map2) {
        map2 = /* @__PURE__ */ new Map();
        let i = bStart;
        while (i < bEnd) map2.set(b[i], i++);
      }
      const index = map2.get(a[aStart]);
      if (index != null) {
        if (bStart < index && index < bEnd) {
          let i = aStart, sequence = 1, t;
          while (++i < aEnd && i < bEnd) {
            if ((t = map2.get(a[i])) == null || t !== index + sequence) break;
            sequence++;
          }
          if (sequence > index - bStart) {
            const node = a[aStart];
            while (bStart < index) parentNode.insertBefore(b[bStart++], node);
          } else parentNode.replaceChild(b[bStart++], a[aStart++]);
        } else aStart++;
      } else a[aStart++].remove();
    }
  }
}
var $$EVENTS = "_$DX_DELEGATE";
function render(code, element, init, options = {}) {
  let disposer;
  createRoot((dispose2) => {
    disposer = dispose2;
    element === document ? code() : insert(element, code(), element.firstChild ? null : void 0, init);
  }, options.owner);
  return () => {
    disposer();
    element.textContent = "";
  };
}
function template(html, isCE, isSVG) {
  let node;
  const create2 = () => {
    const t = document.createElement("template");
    t.innerHTML = html;
    return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
  };
  const fn = isCE ? () => untrack(() => document.importNode(node || (node = create2()), true)) : () => (node || (node = create2())).cloneNode(true);
  fn.cloneNode = fn;
  return fn;
}
function delegateEvents(eventNames, document2 = window.document) {
  const e = document2[$$EVENTS] || (document2[$$EVENTS] = /* @__PURE__ */ new Set());
  for (let i = 0, l = eventNames.length; i < l; i++) {
    const name = eventNames[i];
    if (!e.has(name)) {
      e.add(name);
      document2.addEventListener(name, eventHandler);
    }
  }
}
function setAttribute(node, name, value) {
  if (!!sharedConfig.context && node.isConnected) return;
  if (value == null) node.removeAttribute(name);
  else node.setAttribute(name, value);
}
function insert(parent, accessor, marker, initial2) {
  if (marker !== void 0 && !initial2) initial2 = [];
  if (typeof accessor !== "function") return insertExpression(parent, accessor, initial2, marker);
  createRenderEffect((current) => insertExpression(parent, accessor(), current, marker), initial2);
}
function eventHandler(e) {
  const key = `$$${e.type}`;
  let node = e.composedPath && e.composedPath()[0] || e.target;
  if (e.target !== node) {
    Object.defineProperty(e, "target", {
      configurable: true,
      value: node
    });
  }
  Object.defineProperty(e, "currentTarget", {
    configurable: true,
    get() {
      return node || document;
    }
  });
  if (sharedConfig.registry && !sharedConfig.done) sharedConfig.done = _$HY.done = true;
  while (node) {
    const handler = node[key];
    if (handler && !node.disabled) {
      const data = node[`${key}Data`];
      data !== void 0 ? handler.call(node, data, e) : handler.call(node, e);
      if (e.cancelBubble) return;
    }
    node = node._$host || node.parentNode || node.host;
  }
}
function insertExpression(parent, value, current, marker, unwrapArray) {
  const hydrating = !!sharedConfig.context && parent.isConnected;
  if (hydrating) {
    !current && (current = [...parent.childNodes]);
    let cleaned = [];
    for (let i = 0; i < current.length; i++) {
      const node = current[i];
      if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();
      else cleaned.push(node);
    }
    current = cleaned;
  }
  while (typeof current === "function") current = current();
  if (value === current) return current;
  const t = typeof value, multi = marker !== void 0;
  parent = multi && current[0] && current[0].parentNode || parent;
  if (t === "string" || t === "number") {
    if (hydrating) return current;
    if (t === "number") value = value.toString();
    if (multi) {
      let node = current[0];
      if (node && node.nodeType === 3) {
        node.data !== value && (node.data = value);
      } else node = document.createTextNode(value);
      current = cleanChildren(parent, current, marker, node);
    } else {
      if (current !== "" && typeof current === "string") {
        current = parent.firstChild.data = value;
      } else current = parent.textContent = value;
    }
  } else if (value == null || t === "boolean") {
    if (hydrating) return current;
    current = cleanChildren(parent, current, marker);
  } else if (t === "function") {
    createRenderEffect(() => {
      let v = value();
      while (typeof v === "function") v = v();
      current = insertExpression(parent, v, current, marker);
    });
    return () => current;
  } else if (Array.isArray(value)) {
    const array = [];
    const currentArray = current && Array.isArray(current);
    if (normalizeIncomingArray(array, value, current, unwrapArray)) {
      createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
      return () => current;
    }
    if (hydrating) {
      if (!array.length) return current;
      if (marker === void 0) return [...parent.childNodes];
      let node = array[0];
      let nodes = [node];
      while ((node = node.nextSibling) !== marker) nodes.push(node);
      return current = nodes;
    }
    if (array.length === 0) {
      current = cleanChildren(parent, current, marker);
      if (multi) return current;
    } else if (currentArray) {
      if (current.length === 0) {
        appendNodes(parent, array, marker);
      } else reconcileArrays(parent, current, array);
    } else {
      current && cleanChildren(parent);
      appendNodes(parent, array);
    }
    current = array;
  } else if (value.nodeType) {
    if (hydrating && value.parentNode) return current = multi ? [value] : value;
    if (Array.isArray(current)) {
      if (multi) return current = cleanChildren(parent, current, marker, value);
      cleanChildren(parent, current, null, value);
    } else if (current == null || current === "" || !parent.firstChild) {
      parent.appendChild(value);
    } else parent.replaceChild(value, parent.firstChild);
    current = value;
  } else ;
  return current;
}
function normalizeIncomingArray(normalized, array, current, unwrap) {
  let dynamic = false;
  for (let i = 0, len = array.length; i < len; i++) {
    let item = array[i], prev = current && current[normalized.length], t;
    if (item == null || item === true || item === false) ;
    else if ((t = typeof item) === "object" && item.nodeType) {
      normalized.push(item);
    } else if (Array.isArray(item)) {
      dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
    } else if (t === "function") {
      if (unwrap) {
        while (typeof item === "function") item = item();
        dynamic = normalizeIncomingArray(
          normalized,
          Array.isArray(item) ? item : [item],
          Array.isArray(prev) ? prev : [prev]
        ) || dynamic;
      } else {
        normalized.push(item);
        dynamic = true;
      }
    } else {
      const value = String(item);
      if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);
      else normalized.push(document.createTextNode(value));
    }
  }
  return dynamic;
}
function appendNodes(parent, array, marker = null) {
  for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
}
function cleanChildren(parent, current, marker, replacement) {
  if (marker === void 0) return parent.textContent = "";
  const node = replacement || document.createTextNode("");
  if (current.length) {
    let inserted = false;
    for (let i = current.length - 1; i >= 0; i--) {
      const el = current[i];
      if (node !== el) {
        const isParent = el.parentNode === parent;
        if (!inserted && !i)
          isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
        else isParent && el.remove();
      } else inserted = true;
    }
  } else parent.insertBefore(node, marker);
  return [node];
}
var voidFn = () => void 0;
var RequestContext = Symbol();
var isServer = false;

// node_modules/@solidjs/router/dist/index.js
function createBeforeLeave() {
  let listeners = /* @__PURE__ */ new Set();
  function subscribe(listener) {
    listeners.add(listener);
    return () => listeners.delete(listener);
  }
  let ignore = false;
  function confirm(to, options) {
    if (ignore) return !(ignore = false);
    const e = {
      to,
      options,
      defaultPrevented: false,
      preventDefault: () => e.defaultPrevented = true
    };
    for (const l of listeners) l.listener({
      ...e,
      from: l.location,
      retry: (force) => {
        force && (ignore = true);
        l.navigate(to, {
          ...options,
          resolve: false
        });
      }
    });
    return !e.defaultPrevented;
  }
  return {
    subscribe,
    confirm
  };
}
var depth;
function saveCurrentDepth() {
  if (!window.history.state || window.history.state._depth == null) {
    window.history.replaceState({
      ...window.history.state,
      _depth: window.history.length - 1
    }, "");
  }
  depth = window.history.state._depth;
}
if (!isServer) {
  saveCurrentDepth();
}
function keepDepth(state) {
  return {
    ...state,
    _depth: window.history.state && window.history.state._depth
  };
}
function notifyIfNotBlocked(notify, block) {
  let ignore = false;
  return () => {
    const prevDepth = depth;
    saveCurrentDepth();
    const delta = prevDepth == null ? null : depth - prevDepth;
    if (ignore) {
      ignore = false;
      return;
    }
    if (delta && block(delta)) {
      ignore = true;
      window.history.go(-delta);
    } else {
      notify();
    }
  };
}
var hasSchemeRegex = /^(?:[a-z0-9]+:)?\/\//i;
var trimPathRegex = /^\/+|(\/)\/+$/g;
var mockBase = "http://sr";
function normalizePath(path, omitSlash = false) {
  const s = path.replace(trimPathRegex, "$1");
  return s ? omitSlash || /^[?#]/.test(s) ? s : "/" + s : "";
}
function resolvePath(base, path, from) {
  if (hasSchemeRegex.test(path)) {
    return void 0;
  }
  const basePath = normalizePath(base);
  const fromPath = from && normalizePath(from);
  let result2 = "";
  if (!fromPath || path.startsWith("/")) {
    result2 = basePath;
  } else if (fromPath.toLowerCase().indexOf(basePath.toLowerCase()) !== 0) {
    result2 = basePath + fromPath;
  } else {
    result2 = fromPath;
  }
  return (result2 || "/") + normalizePath(path, !result2);
}
function invariant(value, message) {
  if (value == null) {
    throw new Error(message);
  }
  return value;
}
function joinPaths(from, to) {
  return normalizePath(from).replace(/\/*(\*.*)?$/g, "") + normalizePath(to);
}
function extractSearchParams(url) {
  const params = {};
  url.searchParams.forEach((value, key) => {
    params[key] = value;
  });
  return params;
}
function createMatcher(path, partial2, matchFilters) {
  const [pattern, splat] = path.split("/*", 2);
  const segments = pattern.split("/").filter(Boolean);
  const len = segments.length;
  return (location) => {
    const locSegments = location.split("/").filter(Boolean);
    const lenDiff = locSegments.length - len;
    if (lenDiff < 0 || lenDiff > 0 && splat === void 0 && !partial2) {
      return null;
    }
    const match = {
      path: len ? "" : "/",
      params: {}
    };
    const matchFilter = (s) => matchFilters === void 0 ? void 0 : matchFilters[s];
    for (let i = 0; i < len; i++) {
      const segment = segments[i];
      const locSegment = locSegments[i];
      const dynamic = segment[0] === ":";
      const key = dynamic ? segment.slice(1) : segment;
      if (dynamic && matchSegment(locSegment, matchFilter(key))) {
        match.params[key] = locSegment;
      } else if (dynamic || !matchSegment(locSegment, segment)) {
        return null;
      }
      match.path += `/${locSegment}`;
    }
    if (splat) {
      const remainder = lenDiff ? locSegments.slice(-lenDiff).join("/") : "";
      if (matchSegment(remainder, matchFilter(splat))) {
        match.params[splat] = remainder;
      } else {
        return null;
      }
    }
    return match;
  };
}
function matchSegment(input, filter2) {
  const isEqual2 = (s) => s.localeCompare(input, void 0, {
    sensitivity: "base"
  }) === 0;
  if (filter2 === void 0) {
    return true;
  } else if (typeof filter2 === "string") {
    return isEqual2(filter2);
  } else if (typeof filter2 === "function") {
    return filter2(input);
  } else if (Array.isArray(filter2)) {
    return filter2.some(isEqual2);
  } else if (filter2 instanceof RegExp) {
    return filter2.test(input);
  }
  return false;
}
function scoreRoute(route) {
  const [pattern, splat] = route.pattern.split("/*", 2);
  const segments = pattern.split("/").filter(Boolean);
  return segments.reduce((score, segment) => score + (segment.startsWith(":") ? 2 : 3), segments.length - (splat === void 0 ? 0 : 1));
}
function createMemoObject(fn) {
  const map2 = /* @__PURE__ */ new Map();
  const owner = getOwner();
  return new Proxy({}, {
    get(_4, property2) {
      if (!map2.has(property2)) {
        runWithOwner(owner, () => map2.set(property2, createMemo(() => fn()[property2])));
      }
      return map2.get(property2)();
    },
    getOwnPropertyDescriptor() {
      return {
        enumerable: true,
        configurable: true
      };
    },
    ownKeys() {
      return Reflect.ownKeys(fn());
    }
  });
}
function mergeSearchString(search, params) {
  const merged = new URLSearchParams(search);
  Object.entries(params).forEach(([key, value]) => {
    if (value == null || value === "") {
      merged.delete(key);
    } else {
      merged.set(key, String(value));
    }
  });
  const s = merged.toString();
  return s ? `?${s}` : "";
}
function expandOptionals(pattern) {
  let match = /(\/?\:[^\/]+)\?/.exec(pattern);
  if (!match) return [pattern];
  let prefix = pattern.slice(0, match.index);
  let suffix = pattern.slice(match.index + match[0].length);
  const prefixes = [prefix, prefix += match[1]];
  while (match = /^(\/\:[^\/]+)\?/.exec(suffix)) {
    prefixes.push(prefix += match[1]);
    suffix = suffix.slice(match[0].length);
  }
  return expandOptionals(suffix).reduce((results, expansion) => [...results, ...prefixes.map((p) => p + expansion)], []);
}
var MAX_REDIRECTS = 100;
var RouterContextObj = createContext();
var RouteContextObj = createContext();
var useRouter = () => invariant(useContext(RouterContextObj), "<A> and 'use' router primitives can be only used inside a Route.");
var useNavigate = () => useRouter().navigatorFactory();
var useLocation = () => useRouter().location;
var useParams = () => useRouter().params;
var useSearchParams = () => {
  const location = useLocation();
  const navigate = useNavigate();
  const setSearchParams = (params, options) => {
    const searchString = untrack(() => location.pathname + mergeSearchString(location.search, params) + location.hash);
    navigate(searchString, {
      scroll: false,
      resolve: false,
      ...options
    });
  };
  return [location.query, setSearchParams];
};
function createRoutes(routeDef, base = "") {
  const {
    component,
    load,
    children: children2,
    info
  } = routeDef;
  const isLeaf = !children2 || Array.isArray(children2) && !children2.length;
  const shared = {
    key: routeDef,
    component,
    load,
    info
  };
  return asArray(routeDef.path).reduce((acc, originalPath) => {
    for (const expandedPath of expandOptionals(originalPath)) {
      const path = joinPaths(base, expandedPath);
      let pattern = isLeaf ? path : path.split("/*", 1)[0];
      pattern = pattern.split("/").map((s) => {
        return s.startsWith(":") || s.startsWith("*") ? s : encodeURIComponent(s);
      }).join("/");
      acc.push({
        ...shared,
        originalPath,
        pattern,
        matcher: createMatcher(pattern, !isLeaf, routeDef.matchFilters)
      });
    }
    return acc;
  }, []);
}
function createBranch(routes, index = 0) {
  return {
    routes,
    score: scoreRoute(routes[routes.length - 1]) * 1e4 - index,
    matcher(location) {
      const matches = [];
      for (let i = routes.length - 1; i >= 0; i--) {
        const route = routes[i];
        const match = route.matcher(location);
        if (!match) {
          return null;
        }
        matches.unshift({
          ...match,
          route
        });
      }
      return matches;
    }
  };
}
function asArray(value) {
  return Array.isArray(value) ? value : [value];
}
function createBranches(routeDef, base = "", stack = [], branches = []) {
  const routeDefs = asArray(routeDef);
  for (let i = 0, len = routeDefs.length; i < len; i++) {
    const def = routeDefs[i];
    if (def && typeof def === "object") {
      if (!def.hasOwnProperty("path")) def.path = "";
      const routes = createRoutes(def, base);
      for (const route of routes) {
        stack.push(route);
        const isEmptyArray = Array.isArray(def.children) && def.children.length === 0;
        if (def.children && !isEmptyArray) {
          createBranches(def.children, route.pattern, stack, branches);
        } else {
          const branch = createBranch([...stack], branches.length);
          branches.push(branch);
        }
        stack.pop();
      }
    }
  }
  return stack.length ? branches : branches.sort((a, b) => b.score - a.score);
}
function getRouteMatches(branches, location) {
  for (let i = 0, len = branches.length; i < len; i++) {
    const match = branches[i].matcher(location);
    if (match) {
      return match;
    }
  }
  return [];
}
function createLocation(path, state) {
  const origin = new URL(mockBase);
  const url = createMemo((prev) => {
    const path_ = path();
    try {
      return new URL(path_, origin);
    } catch (err) {
      console.error(`Invalid path ${path_}`);
      return prev;
    }
  }, origin, {
    equals: (a, b) => a.href === b.href
  });
  const pathname = createMemo(() => url().pathname);
  const search = createMemo(() => url().search, true);
  const hash = createMemo(() => url().hash);
  const key = () => "";
  return {
    get pathname() {
      return pathname();
    },
    get search() {
      return search();
    },
    get hash() {
      return hash();
    },
    get state() {
      return state();
    },
    get key() {
      return key();
    },
    query: createMemoObject(on(search, () => extractSearchParams(url())))
  };
}
var intent;
function getIntent() {
  return intent;
}
var inLoadFn = false;
function getInLoadFn() {
  return inLoadFn;
}
function setInLoadFn(value) {
  inLoadFn = value;
}
function createRouterContext(integration, branches, getContext, options = {}) {
  const {
    signal: [source, setSource],
    utils = {}
  } = integration;
  const parsePath = utils.parsePath || ((p) => p);
  const renderPath = utils.renderPath || ((p) => p);
  const beforeLeave = utils.beforeLeave || createBeforeLeave();
  const basePath = resolvePath("", options.base || "");
  if (basePath === void 0) {
    throw new Error(`${basePath} is not a valid base path`);
  } else if (basePath && !source().value) {
    setSource({
      value: basePath,
      replace: true,
      scroll: false
    });
  }
  const [isRouting, setIsRouting] = createSignal(false);
  const start = async (callback) => {
    setIsRouting(true);
    try {
      await startTransition(callback);
    } finally {
      setIsRouting(false);
    }
  };
  const [reference, setReference] = createSignal(source().value);
  const [state, setState] = createSignal(source().state);
  const location = createLocation(reference, state);
  const referrers = [];
  const submissions = createSignal(isServer ? initFromFlash() : []);
  const matches = createMemo(() => {
    if (typeof options.transformUrl === "function") {
      return getRouteMatches(branches(), options.transformUrl(location.pathname));
    }
    return getRouteMatches(branches(), location.pathname);
  });
  const params = createMemoObject(() => {
    const m = matches();
    const params2 = {};
    for (let i = 0; i < m.length; i++) {
      Object.assign(params2, m[i].params);
    }
    return params2;
  });
  const baseRoute = {
    pattern: basePath,
    path: () => basePath,
    outlet: () => null,
    resolvePath(to) {
      return resolvePath(basePath, to);
    }
  };
  createRenderEffect(() => {
    const {
      value,
      state: state2
    } = source();
    untrack(() => {
      start(() => {
        intent = "native";
        if (value !== reference()) setReference(value);
        setState(state2);
        resetErrorBoundaries();
        submissions[1]([]);
      }).then(() => {
        intent = void 0;
      });
    });
  });
  return {
    base: baseRoute,
    location,
    params,
    isRouting,
    renderPath,
    parsePath,
    navigatorFactory,
    matches,
    beforeLeave,
    preloadRoute,
    singleFlight: options.singleFlight === void 0 ? true : options.singleFlight,
    submissions
  };
  function navigateFromRoute(route, to, options2) {
    untrack(() => {
      if (typeof to === "number") {
        if (!to) ;
        else if (utils.go) {
          utils.go(to);
        } else {
          console.warn("Router integration does not support relative routing");
        }
        return;
      }
      const {
        replace,
        resolve,
        scroll,
        state: nextState
      } = {
        replace: false,
        resolve: true,
        scroll: true,
        ...options2
      };
      const resolvedTo = resolve ? route.resolvePath(to) : resolvePath("", to);
      if (resolvedTo === void 0) {
        throw new Error(`Path '${to}' is not a routable path`);
      } else if (referrers.length >= MAX_REDIRECTS) {
        throw new Error("Too many redirects");
      }
      const current = reference();
      if (resolvedTo !== current || nextState !== state()) {
        if (isServer) {
          const e = voidFn();
          e && (e.response = {
            status: 302,
            headers: new Headers({
              Location: resolvedTo
            })
          });
          setSource({
            value: resolvedTo,
            replace,
            scroll,
            state: nextState
          });
        } else if (beforeLeave.confirm(resolvedTo, options2)) {
          const len = referrers.push({
            value: current,
            replace,
            scroll,
            state: state()
          });
          start(() => {
            intent = "navigate";
            setReference(resolvedTo);
            setState(nextState);
            resetErrorBoundaries();
            submissions[1]([]);
          }).then(() => {
            if (referrers.length === len) {
              intent = void 0;
              navigateEnd({
                value: resolvedTo,
                state: nextState
              });
            }
          });
        }
      }
    });
  }
  function navigatorFactory(route) {
    route = route || useContext(RouteContextObj) || baseRoute;
    return (to, options2) => navigateFromRoute(route, to, options2);
  }
  function navigateEnd(next) {
    const first2 = referrers[0];
    if (first2) {
      if (next.value !== first2.value || next.state !== first2.state) {
        setSource({
          ...next,
          replace: first2.replace,
          scroll: first2.scroll
        });
      }
      referrers.length = 0;
    }
  }
  function preloadRoute(url, preloadData) {
    const matches2 = getRouteMatches(branches(), url.pathname);
    const prevIntent = intent;
    intent = "preload";
    for (let match in matches2) {
      const {
        route,
        params: params2
      } = matches2[match];
      route.component && route.component.preload && route.component.preload();
      const {
        load
      } = route;
      inLoadFn = true;
      preloadData && load && runWithOwner(getContext(), () => load({
        params: params2,
        location: {
          pathname: url.pathname,
          search: url.search,
          hash: url.hash,
          query: extractSearchParams(url),
          state: null,
          key: ""
        },
        intent: "preload"
      }));
      inLoadFn = false;
    }
    intent = prevIntent;
  }
  function initFromFlash() {
    const e = voidFn();
    return e && e.router && e.router.submission ? [e.router.submission] : [];
  }
}
function createRouteContext(router, parent, outlet, match) {
  const {
    base,
    location,
    params
  } = router;
  const {
    pattern,
    component,
    load
  } = match().route;
  const path = createMemo(() => match().path);
  component && component.preload && component.preload();
  inLoadFn = true;
  const data = load ? load({
    params,
    location,
    intent: intent || "initial"
  }) : void 0;
  inLoadFn = false;
  const route = {
    parent,
    pattern,
    path,
    outlet: () => component ? createComponent(component, {
      params,
      location,
      data,
      get children() {
        return outlet();
      }
    }) : outlet(),
    resolvePath(to) {
      return resolvePath(base.path(), to, path());
    }
  };
  return route;
}
var createRouterComponent = (router) => (props) => {
  const {
    base
  } = props;
  const routeDefs = children(() => props.children);
  const branches = createMemo(() => createBranches(routeDefs(), props.base || ""));
  let context;
  const routerState = createRouterContext(router, branches, () => context, {
    base,
    singleFlight: props.singleFlight,
    transformUrl: props.transformUrl
  });
  router.create && router.create(routerState);
  return createComponent(RouterContextObj.Provider, {
    value: routerState,
    get children() {
      return createComponent(Root, {
        routerState,
        get root() {
          return props.root;
        },
        get load() {
          return props.rootLoad;
        },
        get children() {
          return [createMemo(() => (context = getOwner()) && null), createComponent(Routes, {
            routerState,
            get branches() {
              return branches();
            }
          })];
        }
      });
    }
  });
};
function Root(props) {
  const location = props.routerState.location;
  const params = props.routerState.params;
  const data = createMemo(() => props.load && untrack(() => {
    setInLoadFn(true);
    props.load({
      params,
      location,
      intent: getIntent() || "initial"
    });
    setInLoadFn(false);
  }));
  return createComponent(Show, {
    get when() {
      return props.root;
    },
    keyed: true,
    get fallback() {
      return props.children;
    },
    children: (Root2) => createComponent(Root2, {
      params,
      location,
      get data() {
        return data();
      },
      get children() {
        return props.children;
      }
    })
  });
}
function Routes(props) {
  if (isServer) {
    const e = voidFn();
    if (e && e.router && e.router.dataOnly) {
      dataOnly(e, props.routerState, props.branches);
      return;
    }
    e && ((e.router || (e.router = {})).matches || (e.router.matches = props.routerState.matches().map(({
      route,
      path,
      params
    }) => ({
      path: route.originalPath,
      pattern: route.pattern,
      match: path,
      params,
      info: route.info
    }))));
  }
  const disposers = [];
  let root2;
  const routeStates = createMemo(on(props.routerState.matches, (nextMatches, prevMatches, prev) => {
    let equal = prevMatches && nextMatches.length === prevMatches.length;
    const next = [];
    for (let i = 0, len = nextMatches.length; i < len; i++) {
      const prevMatch = prevMatches && prevMatches[i];
      const nextMatch = nextMatches[i];
      if (prev && prevMatch && nextMatch.route.key === prevMatch.route.key) {
        next[i] = prev[i];
      } else {
        equal = false;
        if (disposers[i]) {
          disposers[i]();
        }
        createRoot((dispose2) => {
          disposers[i] = dispose2;
          next[i] = createRouteContext(props.routerState, next[i - 1] || props.routerState.base, createOutlet(() => routeStates()[i + 1]), () => props.routerState.matches()[i]);
        });
      }
    }
    disposers.splice(nextMatches.length).forEach((dispose2) => dispose2());
    if (prev && equal) {
      return prev;
    }
    root2 = next[0];
    return next;
  }));
  return createOutlet(() => routeStates() && root2)();
}
var createOutlet = (child) => {
  return () => createComponent(Show, {
    get when() {
      return child();
    },
    keyed: true,
    children: (child2) => createComponent(RouteContextObj.Provider, {
      value: child2,
      get children() {
        return child2.outlet();
      }
    })
  });
};
var Route = (props) => {
  const childRoutes = children(() => props.children);
  return mergeProps(props, {
    get children() {
      return childRoutes();
    }
  });
};
function dataOnly(event, routerState, branches) {
  const url = new URL(event.request.url);
  const prevMatches = getRouteMatches(branches, new URL(event.router.previousUrl || event.request.url).pathname);
  const matches = getRouteMatches(branches, url.pathname);
  for (let match = 0; match < matches.length; match++) {
    if (!prevMatches[match] || matches[match].route !== prevMatches[match].route) event.router.dataOnly = true;
    const {
      route,
      params
    } = matches[match];
    route.load && route.load({
      params,
      location: routerState.location,
      intent: "preload"
    });
  }
}
function intercept([value, setValue], get2, set) {
  return [get2 ? () => get2(value()) : value, set ? (v) => setValue(set(v)) : setValue];
}
function querySelector(selector) {
  if (selector === "#") {
    return null;
  }
  try {
    return document.querySelector(selector);
  } catch (e) {
    return null;
  }
}
function createRouter(config) {
  let ignore = false;
  const wrap2 = (value) => typeof value === "string" ? {
    value
  } : value;
  const signal = intercept(createSignal(wrap2(config.get()), {
    equals: (a, b) => a.value === b.value && a.state === b.state
  }), void 0, (next) => {
    !ignore && config.set(next);
    return next;
  });
  config.init && onCleanup(config.init((value = config.get()) => {
    ignore = true;
    signal[1](wrap2(value));
    ignore = false;
  }));
  return createRouterComponent({
    signal,
    create: config.create,
    utils: config.utils
  });
}
function bindEvent(target, type, handler) {
  target.addEventListener(type, handler);
  return () => target.removeEventListener(type, handler);
}
function scrollToHash(hash, fallbackTop) {
  const el = querySelector(`#${hash}`);
  if (el) {
    el.scrollIntoView();
  } else if (fallbackTop) {
    window.scrollTo(0, 0);
  }
}
function getPath(url) {
  const u = new URL(url);
  return u.pathname + u.search;
}
function StaticRouter(props) {
  let e;
  const url = props.url || (e = voidFn()) && getPath(e.request.url) || "";
  const obj = {
    value: props.transformUrl ? props.transformUrl(url) : url
  };
  return createRouterComponent({
    signal: [() => obj, (next) => Object.assign(obj, next)]
  })(props);
}
var LocationHeader = "Location";
var PRELOAD_TIMEOUT = 5e3;
var CACHE_TIMEOUT = 18e4;
var cacheMap = /* @__PURE__ */ new Map();
if (!isServer) {
  setInterval(() => {
    const now = Date.now();
    for (let [k, v] of cacheMap.entries()) {
      if (!v[3].count && now - v[0] > CACHE_TIMEOUT) {
        cacheMap.delete(k);
      }
    }
  }, 3e5);
}
function getCache() {
  if (!isServer) return cacheMap;
  const req = voidFn();
  if (!req) throw new Error("Cannot find cache context");
  return (req.router || (req.router = {})).cache || (req.router.cache = /* @__PURE__ */ new Map());
}
function cache(fn, name) {
  if (fn.GET) fn = fn.GET;
  const cachedFn = (...args) => {
    const cache2 = getCache();
    const intent2 = getIntent();
    const inLoadFn2 = getInLoadFn();
    const owner = getOwner();
    const navigate = owner ? useNavigate() : void 0;
    const now = Date.now();
    const key = name + hashKey(args);
    let cached = cache2.get(key);
    let tracking;
    if (isServer) {
      const e = voidFn();
      if (e) {
        const dataOnly2 = (e.router || (e.router = {})).dataOnly;
        if (dataOnly2) {
          const data = e && (e.router.data || (e.router.data = {}));
          if (data && key in data) return data[key];
          if (Array.isArray(dataOnly2) && !dataOnly2.includes(key)) {
            data[key] = void 0;
            return Promise.resolve();
          }
        }
      }
    }
    if (getListener() && !isServer) {
      tracking = true;
      onCleanup(() => cached[3].count--);
    }
    if (cached && cached[0] && (isServer || intent2 === "native" || cached[3].count || Date.now() - cached[0] < PRELOAD_TIMEOUT)) {
      if (tracking) {
        cached[3].count++;
        cached[3][0]();
      }
      if (cached[2] === "preload" && intent2 !== "preload") {
        cached[0] = now;
      }
      let res2 = cached[1];
      if (!inLoadFn2) {
        res2 = "then" in cached[1] ? cached[1].then(handleResponse(false), handleResponse(true)) : handleResponse(false)(cached[1]);
        !isServer && intent2 === "navigate" && startTransition(() => cached[3][1](cached[0]));
      } else "then" in res2 && res2.catch(() => {
      });
      return res2;
    }
    let res = !isServer && sharedConfig.context && sharedConfig.has(key) ? sharedConfig.load(key) : fn(...args);
    if (cached) {
      cached[0] = now;
      cached[1] = res;
      cached[2] = intent2;
      !isServer && intent2 === "navigate" && startTransition(() => cached[3][1](cached[0]));
    } else {
      cache2.set(key, cached = [now, res, intent2, createSignal(now)]);
      cached[3].count = 0;
    }
    if (tracking) {
      cached[3].count++;
      cached[3][0]();
    }
    if (isServer) {
      const e = voidFn();
      if (e && e.router.dataOnly) return e.router.data[key] = res;
    }
    if (!inLoadFn2) {
      res = "then" in res ? res.then(handleResponse(false), handleResponse(true)) : handleResponse(false)(res);
    } else "then" in res && res.catch(() => {
    });
    if (isServer && sharedConfig.context && sharedConfig.context.async && !sharedConfig.context.noHydrate) {
      const e = voidFn();
      (!e || !e.serverOnly) && sharedConfig.context.serialize(key, res);
    }
    return res;
    function handleResponse(error) {
      return async (v) => {
        if (v instanceof Response) {
          if (v.headers.has("Location")) {
            if (navigate) {
              startTransition(() => {
                let url = v.headers.get(LocationHeader);
                if (url && url.startsWith("/")) {
                  navigate(url, {
                    replace: true
                  });
                } else if (!isServer && url) {
                  window.location.href = url;
                }
              });
            }
            return;
          }
          if (v.customBody) v = await v.customBody();
        }
        if (error) throw v;
        return v;
      };
    }
  };
  cachedFn.keyFor = (...args) => name + hashKey(args);
  cachedFn.key = name;
  return cachedFn;
}
cache.set = (key, value) => {
  const cache2 = getCache();
  const now = Date.now();
  let cached = cache2.get(key);
  if (cached) {
    cached[0] = now;
    cached[1] = value;
    cached[2] = "preload";
  } else {
    cache2.set(key, cached = [now, value, , createSignal(now)]);
    cached[3].count = 0;
  }
};
cache.clear = () => getCache().clear();
function hashKey(args) {
  return JSON.stringify(args, (_4, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result2, key) => {
    result2[key] = val[key];
    return result2;
  }, {}) : val);
}
function isPlainObject(obj) {
  let proto;
  return obj != null && typeof obj === "object" && (!(proto = Object.getPrototypeOf(obj)) || proto === Object.prototype);
}
var actions = /* @__PURE__ */ new Map();
function setupNativeEvents(preload = true, explicitLinks = false, actionBase = "/_server", transformUrl) {
  return (router) => {
    const basePath = router.base.path();
    const navigateFromRoute = router.navigatorFactory(router.base);
    let preloadTimeout = {};
    function isSvg(el) {
      return el.namespaceURI === "http://www.w3.org/2000/svg";
    }
    function handleAnchor(evt) {
      if (evt.defaultPrevented || evt.button !== 0 || evt.metaKey || evt.altKey || evt.ctrlKey || evt.shiftKey) return;
      const a = evt.composedPath().find((el) => el instanceof Node && el.nodeName.toUpperCase() === "A");
      if (!a || explicitLinks && !a.hasAttribute("link")) return;
      const svg = isSvg(a);
      const href = svg ? a.href.baseVal : a.href;
      const target = svg ? a.target.baseVal : a.target;
      if (target || !href && !a.hasAttribute("state")) return;
      const rel = (a.getAttribute("rel") || "").split(/\s+/);
      if (a.hasAttribute("download") || rel && rel.includes("external")) return;
      const url = svg ? new URL(href, document.baseURI) : new URL(href);
      if (url.origin !== window.location.origin || basePath && url.pathname && !url.pathname.toLowerCase().startsWith(basePath.toLowerCase())) return;
      return [a, url];
    }
    function handleAnchorClick(evt) {
      const res = handleAnchor(evt);
      if (!res) return;
      const [a, url] = res;
      const to = router.parsePath(url.pathname + url.search + url.hash);
      const state = a.getAttribute("state");
      evt.preventDefault();
      navigateFromRoute(to, {
        resolve: false,
        replace: a.hasAttribute("replace"),
        scroll: !a.hasAttribute("noscroll"),
        state: state && JSON.parse(state)
      });
    }
    function handleAnchorPreload(evt) {
      const res = handleAnchor(evt);
      if (!res) return;
      const [a, url] = res;
      if (typeof transformUrl === "function") {
        url.pathname = transformUrl(url.pathname);
      }
      if (!preloadTimeout[url.pathname]) router.preloadRoute(url, a.getAttribute("preload") !== "false");
    }
    function handleAnchorIn(evt) {
      const res = handleAnchor(evt);
      if (!res) return;
      const [a, url] = res;
      if (typeof transformUrl === "function") {
        url.pathname = transformUrl(url.pathname);
      }
      if (preloadTimeout[url.pathname]) return;
      preloadTimeout[url.pathname] = setTimeout(() => {
        router.preloadRoute(url, a.getAttribute("preload") !== "false");
        delete preloadTimeout[url.pathname];
      }, 200);
    }
    function handleAnchorOut(evt) {
      const res = handleAnchor(evt);
      if (!res) return;
      const [, url] = res;
      if (typeof transformUrl === "function") {
        url.pathname = transformUrl(url.pathname);
      }
      if (preloadTimeout[url.pathname]) {
        clearTimeout(preloadTimeout[url.pathname]);
        delete preloadTimeout[url.pathname];
      }
    }
    function handleFormSubmit(evt) {
      if (evt.defaultPrevented) return;
      let actionRef = evt.submitter && evt.submitter.hasAttribute("formaction") ? evt.submitter.getAttribute("formaction") : evt.target.getAttribute("action");
      if (!actionRef) return;
      if (!actionRef.startsWith("https://action/")) {
        const url = new URL(actionRef, mockBase);
        actionRef = router.parsePath(url.pathname + url.search);
        if (!actionRef.startsWith(actionBase)) return;
      }
      if (evt.target.method.toUpperCase() !== "POST") throw new Error("Only POST forms are supported for Actions");
      const handler = actions.get(actionRef);
      if (handler) {
        evt.preventDefault();
        const data = new FormData(evt.target);
        if (evt.submitter && evt.submitter.name) data.append(evt.submitter.name, evt.submitter.value);
        handler.call({
          r: router,
          f: evt.target
        }, data);
      }
    }
    delegateEvents(["click", "submit"]);
    document.addEventListener("click", handleAnchorClick);
    if (preload) {
      document.addEventListener("mouseover", handleAnchorIn);
      document.addEventListener("mouseout", handleAnchorOut);
      document.addEventListener("focusin", handleAnchorPreload);
      document.addEventListener("touchstart", handleAnchorPreload);
    }
    document.addEventListener("submit", handleFormSubmit);
    onCleanup(() => {
      document.removeEventListener("click", handleAnchorClick);
      if (preload) {
        document.removeEventListener("mouseover", handleAnchorIn);
        document.removeEventListener("mouseout", handleAnchorOut);
        document.removeEventListener("focusin", handleAnchorPreload);
        document.removeEventListener("touchstart", handleAnchorPreload);
      }
      document.removeEventListener("submit", handleFormSubmit);
    });
  };
}
function Router(props) {
  if (isServer) return StaticRouter(props);
  const getSource = () => {
    const url = window.location.pathname + window.location.search;
    return {
      value: props.transformUrl ? props.transformUrl(url) + window.location.hash : url + window.location.hash,
      state: window.history.state
    };
  };
  const beforeLeave = createBeforeLeave();
  return createRouter({
    get: getSource,
    set({
      value,
      replace,
      scroll,
      state
    }) {
      if (replace) {
        window.history.replaceState(keepDepth(state), "", value);
      } else {
        window.history.pushState(state, "", value);
      }
      scrollToHash(window.location.hash.slice(1), scroll);
      saveCurrentDepth();
    },
    init: (notify) => bindEvent(window, "popstate", notifyIfNotBlocked(notify, (delta) => {
      if (delta && delta < 0) {
        return !beforeLeave.confirm(delta);
      } else {
        const s = getSource();
        return !beforeLeave.confirm(s.value, {
          state: s.state
        });
      }
    })),
    create: setupNativeEvents(props.preload, props.explicitLinks, props.actionBase, props.transformUrl),
    utils: {
      go: (delta) => window.history.go(delta),
      beforeLeave
    }
  })(props);
}

// src/kantree/integrations/microsoft365/msteams/static/msteams-integration.jsx
var microsoftTeams = __toESM(require_MicrosoftTeams_min());

// public/app/utils/api.js
var Api = class {
  constructor(baseUrl = "", options = {}, errorHandlers = []) {
    this.baseUrl = baseUrl;
    this.options = options || {};
    this.errorHandlers = errorHandlers;
    this.options.headers = new Headers(this.options.headers || {});
  }
  setAuthToken(token) {
    if (token) {
      this.options.headers.set("Authorization", `Bearer ${token}`);
    } else {
      this.options.headers.delete("Authorization");
    }
  }
  registerErrorHandler(fn) {
    this.errorHandlers.push(fn);
  }
  /**
   * Generate a URL for an endpoint. Params will be used to fill in the path params.
   * The baseUrl will be prepended to the endpoint.
   *
   * const [url, params] = api.url('/endpoint/:id', {id: 1, query: 'foo'}, true)
   */
  url(endpoint, params, returnLeftoverParams = false) {
    let url = this.baseUrl + endpoint;
    let leftovers = {};
    let urlParams = [];
    let m;
    const urlParamsRegexp = /:([a-z0-9_]+)/ig;
    while ((m = urlParamsRegexp.exec(url)) !== null) {
      urlParams.push(m[1]);
    }
    for (let [key, value] of Object.entries(params || {})) {
      if (urlParams.includes(key)) {
        url = url.replace(":" + key, value);
      } else {
        leftovers[key] = value;
      }
    }
    if (url.includes(":")) {
      throw Error("Missing parameters to build full api url");
    }
    if (returnLeftoverParams) {
      return [url, leftovers];
    }
    return url;
  }
  /**
   * Use fetch() to call a remote URL.
   * The baseUrl will be prepended to the endpoint.
   * Options are the same as fetch and will be merged with the instance's options.
   * GET requests will use search params, all other methods will be serialized as JSON in the body.
   *
   * Returns a promise with the JSON response (unless options.disableJsonParsing is true).
   * A tuple [data, response] can also be returned with options.resolveWithResponse
   * Rejects on error with an ApiErrorResponse
   *
   * When an error occurs, global error handlers will be triggered unless options.ignoreErrorHandlers is true.
   */
  call(endpoint, method, params, options) {
    let url;
    [url, params] = this.url(endpoint, params, true);
    const headers = mergeHeaders(this.options.headers, options?.headers);
    options = Object.assign({}, this.options, options || {}, { method, headers });
    if (Object.keys(params).length) {
      if (method === "GET") {
        const serializer = new URLSearchParams();
        for (const [key, value] of Object.entries(params)) {
          if (Array.isArray(value)) {
            for (const item of value) {
              serializer.append(key, item);
            }
          } else if (value || value === 0 || value === "") {
            serializer.set(key, value);
          }
        }
        url += "?" + serializer.toString();
      } else {
        options.headers.set("Content-Type", "application/json");
        options.body = JSON.stringify(params);
      }
    }
    return fetch(url, options).then((response) => {
      if (response.ok) {
        if (options.disableJsonParsing || !response.headers.get("Content-Type").includes("application/json")) {
          return response;
        }
        return response.json().then((data) => options.resolveWithResponse ? [data, response] : data);
      }
      if (!options.ignoreErrorHandlers) {
        return this.triggerErrorHandlers(response, options.ignoreErrorHandlers);
      }
      return Promise.reject(new ApiResponseError(response));
    });
  }
  triggerErrorHandlers(response, resolveWithResponse) {
    return Promise.all(this.errorHandlers.map((fn) => fn(response))).then(() => resolveWithResponse ? [null, response] : null).catch(() => Promise.reject(new ApiResponseError(response)));
  }
  endpoint(url) {
    return new ApiEndpoint(this, url);
  }
};
function mergeHeaders(h1, h2) {
  h1 = new Headers(h1 || {});
  h2 = new Headers(h2 || {});
  for (let [k, v] of h2) {
    h1.set(k, v);
  }
  return h1;
}
var ApiResponseError = class extends Error {
  constructor(response) {
    super();
    this.response = response;
  }
  get status() {
    return this.response.status;
  }
  json() {
    return this.response.json();
  }
};
var ApiEndpoint = class {
  constructor(api2, endpoint) {
    this.api = api2;
    this.endpoint = endpoint;
  }
  url(params) {
    return this.api.url(this.endpoint, params);
  }
  call(method, params, options) {
    return this.api.call(this.endpoint, method, params, options);
  }
  get(params, options) {
    return this.call("GET", params, options);
  }
  post(params, options) {
    return this.call("POST", params, options);
  }
  put(params, options) {
    return this.call("PUT", params, options);
  }
  patch(params, options) {
    return this.call("PATCH", params, options);
  }
  delete(params, options) {
    return this.call("DELETE", params, options);
  }
};

// public/app/api.js
var api = new Api();
api.eu_vat = {};
api.eu_vat.get_vat_rate = api.endpoint("/api/1.0/eu-vat/rates/:country_code");
api.eu_vat.validate_vat_number = api.endpoint("/api/1.0/eu-vat/validate-vat-number");
api.eu_vat.get_exchange_rate = api.endpoint("/api/1.0/eu-vat/exchange-rates/:country_code/:src_currency");
api.eu_vat.get_exchange_rate = api.endpoint("/api/1.0/eu-vat/exchange-rates/:country_code");
api.eu_vat.check = api.endpoint("/api/1.0/eu-vat/check");
api.config = {};
api.config.get_config = api.endpoint("/api/1.0/config");
api.config.get_terms = api.endpoint("/api/1.0/terms");
api.config.list_ai_providers = api.endpoint("/api/1.0/ai-providers");
api.config.get_changelog = api.endpoint("/api/1.0/changelog");
api.attr_types = {};
api.attr_types.list_attr_types = api.endpoint("/api/1.0/attribute-types");
api.attr_types.get_attr_type = api.endpoint("/api/1.0/attribute-types/:name");
api.automation_types = {};
api.automation_types.list_automation_events = api.endpoint("/api/1.0/automation-types/events");
api.automation_types.list_automation_actions = api.endpoint("/api/1.0/automation-types/actions");
api.automation_types.list_automation_queries = api.endpoint("/api/1.0/automation-types/queries");
api.integrations = {};
api.integrations.list_integrations = api.endpoint("/api/1.0/integrations");
api.integrations.get_integration = api.endpoint("/api/1.0/integrations/:name");
api.third_party_account_providers = {};
api.third_party_account_providers.list_third_party_account_providers = api.endpoint("/api/1.0/third-party-account-providers");
api.chart_types = {};
api.chart_types.list_charts = api.endpoint("/api/1.0/charts");
api.chart_types.get_chart_info = api.endpoint("/api/1.0/charts/:name");
api.async_job = {};
api.async_job.get = api.endpoint("/api/1.0/async/:id");
api.kql = {};
api.kql.parse_filter = api.endpoint("/api/1.0/kql/parse-filter");
api.kql.validate = api.endpoint("/api/1.0/kql/validate");
api.kql.list_kql_special_card_attrs = api.endpoint("/api/1.0/kql/autocomplete/special-card-attrs");
api.kql.list_kql_functions = api.endpoint("/api/1.0/kql/autocomplete/functions");
api.kql.list_kql_cond_functions = api.endpoint("/api/1.0/kql/autocomplete/cond-functions");
api.kql.kql_ask = api.endpoint("/api/1.0/kql/ask");
api.user = {};
api.user.get_user = api.endpoint("/api/1.0/users/:user_id");
api.user.get_info = api.endpoint("/api/1.0/me");
api.user.get_full_info = api.endpoint("/api/1.0/me/full");
api.user.can_be_deleted = api.endpoint("/api/1.0/me/can-delete");
api.user.update = api.endpoint("/api/1.0/me");
api.user.update_user_password = api.endpoint("/api/1.0/password");
api.user.enable_two_factor_auth = api.endpoint("/api/1.0/2fa");
api.user.disable_two_factor_auth = api.endpoint("/api/1.0/2fa");
api.user.accept_terms = api.endpoint("/api/1.0/accept-terms");
api.user.delete = api.endpoint("/api/1.0/me");
api.user.logout_all_devices = api.endpoint("/api/1.0/logout-all-devices");
api.user.mark_as_onboarded = api.endpoint("/api/1.0/mark-as-onboarded");
api.user.mark_release_version_as_read = api.endpoint("/api/1.0/mark-release-version-as-read");
api.user.dismiss_system_message = api.endpoint("/api/1.0/dismiss-system-message");
api.user.list_app_context_content = api.endpoint("/api/1.0/projects/grouped");
api.user.list_app_context_content = api.endpoint("/api/1.0/app-context");
api.user.list_favorites = api.endpoint("/api/1.0/pins");
api.user.list_favorites = api.endpoint("/api/1.0/favorites");
api.user.list_projects = api.endpoint("/api/1.0/projects");
api.user.list_shared_projects = api.endpoint("/api/1.0/projects/shared");
api.user.list_all_projects = api.endpoint("/api/1.0/projects/all");
api.user.create_project = api.endpoint("/api/1.0/projects");
api.user.get_unread_notifications = api.endpoint("/api/1.0/unread-notifications");
api.user.list_notifications = api.endpoint("/api/1.0/notifications");
api.user.clear_notifications = api.endpoint("/api/1.0/notifications");
api.user.get_inbox_feed = api.endpoint("/api/1.0/inbox");
api.user.list_requests = api.endpoint("/api/1.0/requests");
api.user.list_templates = api.endpoint("/api/1.0/templates");
api.user.list_models = api.endpoint("/api/1.0/models");
api.user.list_group_types = api.endpoint("/api/1.0/group-types");
api.user.list_request_forms = api.endpoint("/api/1.0/request-forms");
api.user.list_roles = api.endpoint("/api/1.0/roles");
api.user.list_reminders = api.endpoint("/api/1.0/reminders");
api.user.ping = api.endpoint("/api/1.0/ping");
api.user.update_dashboard = api.endpoint("/api/1.0/dashboard");
api.user.update_app_params = api.endpoint("/api/1.0/app-params");
api.user.list_api_keys = api.endpoint("/api/1.0/api-keys");
api.user.create_api_key = api.endpoint("/api/1.0/api-keys");
api.user.revoke_api_key = api.endpoint("/api/1.0/api-keys");
api.user.get_calendar_url = api.endpoint("/api/1.0/calendar-url");
api.user.list_third_party_accounts = api.endpoint("/api/1.0/third-party-accounts");
api.user.remove_third_party_account = api.endpoint("/api/1.0/third-party-accounts/:provider");
api.user.autocomplete_invites = api.endpoint("/api/1.0/autocomplete-invites");
api.user.contact_support = api.endpoint("/api/1.0/support");
api.user.send_email_validation = api.endpoint("/api/1.0/send-email-validation");
api.user_calendar = {};
api.user_calendar.get = api.endpoint("/api/1.0/ical/users/:token/events.ics");
api.user_calendar.get_query = api.endpoint("/api/1.0/ical/users/:token/query.ics");
api.user_calendar.get_org = api.endpoint("/api/1.0/ical/users/:token/org.ics");
api.assistant = {};
api.assistant.ask_assistant = api.endpoint("/api/1.0/assistant");
api.assistant.confirm_assistant = api.endpoint("/api/1.0/assistant/confirm");
api.search = {};
api.search.search = api.endpoint("/api/1.0/search");
api.search.get_calendar_url = api.endpoint("/api/1.0/search/ical-url");
api.search.list_group_by_possibilities = api.endpoint("/api/1.0/search/group-by-list");
api.search.list_group_by_groups = api.endpoint("/api/1.0/search/group-by-groups");
api.search.list_filterable_fields = api.endpoint("/api/1.0/search/filterable-fields");
api.search.list_groups = api.endpoint("/api/1.0/search/groups");
api.views = {};
api.views.list_global_views = api.endpoint("/api/1.0/views");
api.views.list_my_work_views = api.endpoint("/api/1.0/views/my-work");
api.views.get_view = api.endpoint("/api/1.0/views/:view_id");
api.views.create_view = api.endpoint("/api/1.0/views");
api.views.update_view = api.endpoint("/api/1.0/views/:view_id");
api.views.reorder_view = api.endpoint("/api/1.0/views/:view_id/reorder");
api.views.favorite_view = api.endpoint("/api/1.0/views/:view_id/favorite");
api.views.unfavorite_view = api.endpoint("/api/1.0/views/:view_id/favorite");
api.views.delete_view = api.endpoint("/api/1.0/views/:view_id");
api.roles = {};
api.roles.create = api.endpoint("/api/1.0/roles");
api.roles.get = api.endpoint("/api/1.0/roles/:role_id");
api.roles.update = api.endpoint("/api/1.0/roles/:role_id");
api.roles.update_project_permissions = api.endpoint("/api/1.0/roles/:role_id/project-permissions");
api.roles.duplicate = api.endpoint("/api/1.0/roles/:role_id/duplicate");
api.roles.get_available_actions = api.endpoint("/api/1.0/roles/available-actions");
api.roles.add_permission = api.endpoint("/api/1.0/roles/:role_id/permissions");
api.roles.update_permission = api.endpoint("/api/1.0/roles/:role_id/permissions/:permission_id");
api.roles.upsert_permission = api.endpoint("/api/1.0/roles/:role_id/permissions");
api.roles.delete_permission = api.endpoint("/api/1.0/roles/:role_id/permissions/:permission_id");
api.roles.reset = api.endpoint("/api/1.0/roles/:role_id/reset");
api.roles.delete = api.endpoint("/api/1.0/roles/:role_id");
api.card_group_types = {};
api.card_group_types.create = api.endpoint("/api/1.0/group-types");
api.card_group_types.get = api.endpoint("/api/1.0/group-types/:type_id");
api.card_group_types.get_groups = api.endpoint("/api/1.0/group-types/:type_id/groups");
api.card_group_types.update = api.endpoint("/api/1.0/group-types/:type_id");
api.card_group_types.delete = api.endpoint("/api/1.0/group-types/:type_id");
api.card_group_types.list_enabled_in_projects = api.endpoint("/api/1.0/group-types/:type_id/projects");
api.log_types = {};
api.log_types.list_attributes = api.endpoint("/api/1.0/log-types/:type_id/attributes");
api.log_types.create_attributes = api.endpoint("/api/1.0/log-types/:type_id/attributes");
api.log_types.update_attributes = api.endpoint("/api/1.0/log-types/:type_id/attributes");
api.log_types.update_attribute_containers = api.endpoint("/api/1.0/log-types/:type_id/attributes/containers");
api.log_types.clear_attributes = api.endpoint("/api/1.0/log-types/:type_id/attributes");
api.log_types.get_attribute = api.endpoint("/api/1.0/log-types/:type_id/attributes/:attr_id");
api.log_types.update_attribute = api.endpoint("/api/1.0/log-types/:type_id/attributes/:attr_id");
api.log_types.move_attribute = api.endpoint("/api/1.0/log-types/:type_id/attributes/:attr_id/move");
api.log_types.get_attribute_choices = api.endpoint("/api/1.0/log-types/:type_id/attributes/:attr_id/choices");
api.log_types.change_owner = api.endpoint("/api/1.0/log-types/:type_id/attributes/:attr_id/change-owner");
api.log_types.delete_attribute = api.endpoint("/api/1.0/log-types/:type_id/attributes/:attr_id");
api.log_types.create_log_type = api.endpoint("/api/1.0/log-types");
api.log_types.update_log_type = api.endpoint("/api/1.0/log-types/:type_id");
api.log_types.delete_log_type = api.endpoint("/api/1.0/log-types/:type_id");
api.log_types.get_log_type = api.endpoint("/api/1.0/log-types/:type_id");
api.log_types.list_logs = api.endpoint("/api/1.0/log-types/:type_id/logs");
api.log_types.export_logs = api.endpoint("/api/1.0/log-types/:type_id/export");
api.card_models = {};
api.card_models.list_attributes = api.endpoint("/api/1.0/models/:model_id/attributes");
api.card_models.create_attributes = api.endpoint("/api/1.0/models/:model_id/attributes");
api.card_models.update_attributes = api.endpoint("/api/1.0/models/:model_id/attributes");
api.card_models.update_attribute_containers = api.endpoint("/api/1.0/models/:model_id/attributes/containers");
api.card_models.clear_attributes = api.endpoint("/api/1.0/models/:model_id/attributes");
api.card_models.get_attribute = api.endpoint("/api/1.0/models/:model_id/attributes/:attr_id");
api.card_models.update_attribute = api.endpoint("/api/1.0/models/:model_id/attributes/:attr_id");
api.card_models.move_attribute = api.endpoint("/api/1.0/models/:model_id/attributes/:attr_id/move");
api.card_models.get_attribute_choices = api.endpoint("/api/1.0/models/:model_id/attributes/:attr_id/choices");
api.card_models.change_owner = api.endpoint("/api/1.0/models/:model_id/attributes/:attr_id/change-owner");
api.card_models.delete_attribute = api.endpoint("/api/1.0/models/:model_id/attributes/:attr_id");
api.card_models.create_model = api.endpoint("/api/1.0/models");
api.card_models.get_model = api.endpoint("/api/1.0/models/:model_id");
api.card_models.update_model = api.endpoint("/api/1.0/models/:model_id");
api.card_models.share_model = api.endpoint("/api/1.0/models/:model_id/share");
api.card_models.make_model_private = api.endpoint("/api/1.0/models/:model_id/make-private");
api.card_models.copy_model = api.endpoint("/api/1.0/models/:model_id/copy");
api.card_models.delete_model = api.endpoint("/api/1.0/models/:model_id");
api.card_models.list_enabled_model_in_projects = api.endpoint("/api/1.0/models/:model_id/projects");
api.card_models.update_attribute_containers = api.endpoint("/api/1.0/models/:model_id/attribute-containers/:project_id");
api.card_models.update_attribute_containers = api.endpoint("/api/1.0/models/:model_id/attributes/containers/:project_id");
api.card_models.move_attribute = api.endpoint("/api/1.0/models/:model_id/attributes/:attr_id/move/:project_id");
api.request_form = {};
api.request_form.get_request_form = api.endpoint("/api/1.0/request-forms/:request_form_id");
api.request_form.post_request = api.endpoint("/api/1.0/request-forms/:request_form_id");
api.request_form.list_field_choices = api.endpoint("/api/1.0/request-forms/:request_form_id/field-choices/:field_id");
api.request = {};
api.request.get_request = api.endpoint("/api/1.0/requests/:request_token");
api.request.post_comment = api.endpoint("/api/1.0/requests/:request_token/comments");
api.request.update_request_fields = api.endpoint("/api/1.0/requests/:request_token");
api.projects = {};
api.projects.list_attributes = api.endpoint("/api/1.0/projects/:project_id/attributes");
api.projects.create_attributes = api.endpoint("/api/1.0/projects/:project_id/attributes");
api.projects.update_attributes = api.endpoint("/api/1.0/projects/:project_id/attributes");
api.projects.update_attribute_containers = api.endpoint("/api/1.0/projects/:project_id/attributes/containers");
api.projects.clear_attributes = api.endpoint("/api/1.0/projects/:project_id/attributes");
api.projects.get_attribute = api.endpoint("/api/1.0/projects/:project_id/attributes/:attr_id");
api.projects.update_attribute = api.endpoint("/api/1.0/projects/:project_id/attributes/:attr_id");
api.projects.move_attribute = api.endpoint("/api/1.0/projects/:project_id/attributes/:attr_id/move");
api.projects.get_attribute_choices = api.endpoint("/api/1.0/projects/:project_id/attributes/:attr_id/choices");
api.projects.change_owner = api.endpoint("/api/1.0/projects/:project_id/attributes/:attr_id/change-owner");
api.projects.delete_attribute = api.endpoint("/api/1.0/projects/:project_id/attributes/:attr_id");
api.projects.get_project = api.endpoint("/api/1.0/projects/:project_id");
api.projects.update_project = api.endpoint("/api/1.0/projects/:project_id");
api.projects.update_project_access = api.endpoint("/api/1.0/projects/:project_id/access");
api.projects.get_project_guide = api.endpoint("/api/1.0/projects/:project_id/guide");
api.projects.update_project_guide = api.endpoint("/api/1.0/projects/:project_id/guide");
api.projects.archive_project = api.endpoint("/api/1.0/projects/:project_id/archive");
api.projects.restore_project = api.endpoint("/api/1.0/projects/:project_id/archive");
api.projects.delete_project = api.endpoint("/api/1.0/projects/:project_id");
api.projects.copy_project = api.endpoint("/api/1.0/projects/:project_id/copy");
api.projects.relocate_project_to_other_org = api.endpoint("/api/1.0/projects/:project_id/relocate-to-other-org");
api.projects.convert_project_to_card = api.endpoint("/api/1.0/projects/:project_id/convert-to-card");
api.projects.list_cards = api.endpoint("/api/1.0/projects/:project_id/cards");
api.projects.query_project = api.endpoint("/api/1.0/projects/:project_id/query");
api.projects.get_card_by_ref = api.endpoint("/api/1.0/projects/:project_id/cards/:ref");
api.projects.get_board = api.endpoint("/api/1.0/projects/:project_id/board/:ref");
api.projects.get_board = api.endpoint("/api/1.0/projects/:project_id/board");
api.projects.list_activities = api.endpoint("/api/1.0/projects/:project_id/activities");
api.projects.list_roles = api.endpoint("/api/1.0/projects/:project_id/roles");
api.projects.list_reminders_for_user = api.endpoint("/api/1.0/projects/:project_id/reminders");
api.projects.export_project = api.endpoint("/api/1.0/projects/:project_id/export");
api.projects.export_project_stream = api.endpoint("/api/1.0/projects/:project_id/export/stream");
api.projects.export_project_json = api.endpoint("/api/1.0/projects/:project_id/export/json");
api.projects.export_activities = api.endpoint("/api/1.0/projects/:project_id/activities/export");
api.projects.export_pii_report = api.endpoint("/api/1.0/projects/:project_id/pii-report");
api.projects.batch_card_actions = api.endpoint("/api/1.0/projects/:project_id/batch");
api.projects.batch_dates = api.endpoint("/api/1.0/projects/:project_id/batch/dates");
api.projects.get_attribute_choices = api.endpoint("/api/1.0/projects/:project_id/attributes/:attr_id/choices");
api.projects.get_ai_config = api.endpoint("/api/1.0/projects/:project_id/ai");
api.projects.update_ai_config = api.endpoint("/api/1.0/projects/:project_id/ai");
api.share_objects = {};
api.share_objects.get = api.endpoint("/api/1.0/share/:token");
api.share_objects.create = api.endpoint("/api/1.0/share");
api.share_objects.update = api.endpoint("/api/1.0/share/:token");
api.share_objects.add_form = api.endpoint("/api/1.0/share/:token/forms");
api.share_objects.remove_form = api.endpoint("/api/1.0/share/:token/forms");
api.share_objects.delete = api.endpoint("/api/1.0/share/:token");
api.share_objects.list_cards = api.endpoint("/api/1.0/share/:token/cards");
api.reporting = {};
api.reporting.get_project_chart_data = api.endpoint("/api/1.0/projects/:project_id/charts/:name");
api.reporting.get_portfolio_chart_data = api.endpoint("/api/1.0/projects/:project_id/portfolio/charts/:name");
api.reporting.get_chart_data = api.endpoint("/api/1.0/charts/:name");
api.importers = {};
api.importers.list_available = api.endpoint("/api/1.0/importers");
api.importers.authorize = api.endpoint("/api/1.0/importers/:name/authorize");
api.importers.list_projects = api.endpoint("/api/1.0/importers/:name/projects");
api.importers.discover = api.endpoint("/api/1.0/importers/:name/discover");
api.importers.import_project = api.endpoint("/api/1.0/importers/:name/import");
api.template_library = {};
api.template_library.list_templates = api.endpoint("/api/1.0/template-library");
api.template_library.list_used = api.endpoint("/api/1.0/template-library/used");
api.template_library.list_from_user = api.endpoint("/api/1.0/template-library/user");
api.template_library.list_from_org = api.endpoint("/api/1.0/template-library/organizations/:org_id");
api.template_library.list_featured = api.endpoint("/api/1.0/template-library/featured");
api.template_library.list_tags = api.endpoint("/api/1.0/template-library/tags");
api.billing = {};
api.billing.create_setup_intent = api.endpoint("/api/1.0/billing/setup-intent");
api.billing.get_account = api.endpoint("/api/1.0/billing/:account_id");
api.billing.update_account = api.endpoint("/api/1.0/billing/:account_id");
api.billing.cancel_account = api.endpoint("/api/1.0/billing/:account_id/cancel");
api.billing.revert_cancel_account = api.endpoint("/api/1.0/billing/:account_id/cancel");
api.billing.list_invoices = api.endpoint("/api/1.0/billing/:account_id/invoices");
api.billing.get_next_invoice_amount = api.endpoint("/api/1.0/billing/:account_id/next-invoice-amount");
api.billing.get_seat_price = api.endpoint("/api/1.0/billing/:account_id/seat-price");
api.pricing = {};
api.pricing.get_pricing = api.endpoint("/api/1.0/pricing/:country");
api.pricing.get_pricing = api.endpoint("/api/1.0/pricing");
api.organizations = {};
api.organizations.list_attributes = api.endpoint("/api/1.0/organizations/:org_id/attributes");
api.organizations.create_attributes = api.endpoint("/api/1.0/organizations/:org_id/attributes");
api.organizations.update_attributes = api.endpoint("/api/1.0/organizations/:org_id/attributes");
api.organizations.update_attribute_containers = api.endpoint("/api/1.0/organizations/:org_id/attributes/containers");
api.organizations.clear_attributes = api.endpoint("/api/1.0/organizations/:org_id/attributes");
api.organizations.get_attribute = api.endpoint("/api/1.0/organizations/:org_id/attributes/:attr_id");
api.organizations.update_attribute = api.endpoint("/api/1.0/organizations/:org_id/attributes/:attr_id");
api.organizations.move_attribute = api.endpoint("/api/1.0/organizations/:org_id/attributes/:attr_id/move");
api.organizations.get_attribute_choices = api.endpoint("/api/1.0/organizations/:org_id/attributes/:attr_id/choices");
api.organizations.change_owner = api.endpoint("/api/1.0/organizations/:org_id/attributes/:attr_id/change-owner");
api.organizations.delete_attribute = api.endpoint("/api/1.0/organizations/:org_id/attributes/:attr_id");
api.organizations.list_orgs = api.endpoint("/api/1.0/organizations");
api.organizations.create_org = api.endpoint("/api/1.0/organizations");
api.organizations.get_org = api.endpoint("/api/1.0/organizations/:org_id");
api.organizations.update_org = api.endpoint("/api/1.0/organizations/:org_id");
api.organizations.enable_org_invite_link = api.endpoint("/api/1.0/organizations/:org_id/invite-link");
api.organizations.disable_org_invite_link = api.endpoint("/api/1.0/organizations/:org_id/invite-link");
api.organizations.delete_org = api.endpoint("/api/1.0/organizations/:org_id");
api.organizations.list_featured_items = api.endpoint("/api/1.0/organizations/:org_id/featured-items");
api.organizations.add_featured_item = api.endpoint("/api/1.0/organizations/:org_id/featured-items");
api.organizations.remove_featured_item = api.endpoint("/api/1.0/organizations/:org_id/featured-items/:item_id");
api.organizations.list_models = api.endpoint("/api/1.0/organizations/:org_id/models");
api.organizations.list_group_types = api.endpoint("/api/1.0/organizations/:org_id/group-types");
api.organizations.list_log_types = api.endpoint("/api/1.0/organizations/:org_id/log-types");
api.organizations.list_request_forms = api.endpoint("/api/1.0/organizations/:org_id/request-forms");
api.organizations.search = api.endpoint("/api/1.0/organizations/:org_id/search");
api.organizations.list_roles = api.endpoint("/api/1.0/organizations/:org_id/roles");
api.organizations.get_calendar_url = api.endpoint("/api/1.0/organizations/:org_id/calendar-url");
api.organizations.get_pii_data = api.endpoint("/api/1.0/organizations/:org_id/pii/data");
api.organizations.export_pii_report = api.endpoint("/api/1.0/organizations/:org_id/pii/report");
api.organizations.export = api.endpoint("/api/1.0/organizations/:org_id/export");
api.organizations.list_updates = api.endpoint("/api/1.0/organizations/:org_id/updates");
api.organizations.post_update = api.endpoint("/api/1.0/organizations/:org_id/updates");
api.organizations.get_ai_config = api.endpoint("/api/1.0/organizations/:org_id/ai");
api.organizations.update_ai_config = api.endpoint("/api/1.0/organizations/:org_id/ai");
api.organizations.list_projects = api.endpoint("/api/1.0/organizations/:org_id/projects");
api.organizations.list_all_projects = api.endpoint("/api/1.0/organizations/:org_id/projects/all");
api.organizations.list_archived_projects = api.endpoint("/api/1.0/organizations/:org_id/projects/archived");
api.organizations.create_project = api.endpoint("/api/1.0/organizations/:org_id/projects");
api.organizations.list_templates = api.endpoint("/api/1.0/organizations/:org_id/templates");
api.organizations.create_template = api.endpoint("/api/1.0/organizations/:org_id/templates");
api.organizations.list_portfolios = api.endpoint("/api/1.0/organizations/:org_id/portfolios");
api.organizations.create_portfolio = api.endpoint("/api/1.0/organizations/:org_id/portfolios");
api.organization_top_level_card_attrs = {};
api.organization_top_level_card_attrs.list_attributes = api.endpoint("/api/1.0/organizations/:org_id/top-level-card-attributes");
api.organization_top_level_card_attrs.create_attributes = api.endpoint("/api/1.0/organizations/:org_id/top-level-card-attributes");
api.organization_top_level_card_attrs.update_attributes = api.endpoint("/api/1.0/organizations/:org_id/top-level-card-attributes");
api.organization_top_level_card_attrs.update_attribute_containers = api.endpoint("/api/1.0/organizations/:org_id/top-level-card-attributes/containers");
api.organization_top_level_card_attrs.clear_attributes = api.endpoint("/api/1.0/organizations/:org_id/top-level-card-attributes");
api.organization_top_level_card_attrs.get_attribute = api.endpoint("/api/1.0/organizations/:org_id/top-level-card-attributes/:attr_id");
api.organization_top_level_card_attrs.update_attribute = api.endpoint("/api/1.0/organizations/:org_id/top-level-card-attributes/:attr_id");
api.organization_top_level_card_attrs.move_attribute = api.endpoint("/api/1.0/organizations/:org_id/top-level-card-attributes/:attr_id/move");
api.organization_top_level_card_attrs.get_attribute_choices = api.endpoint("/api/1.0/organizations/:org_id/top-level-card-attributes/:attr_id/choices");
api.organization_top_level_card_attrs.change_owner = api.endpoint("/api/1.0/organizations/:org_id/top-level-card-attributes/:attr_id/change-owner");
api.organization_top_level_card_attrs.delete_attribute = api.endpoint("/api/1.0/organizations/:org_id/top-level-card-attributes/:attr_id");
api.org_integrations = {};
api.org_integrations.list_integrations = api.endpoint("/api/1.0/organizations/:org_id/integrations");
api.org_integrations.create_integration = api.endpoint("/api/1.0/organizations/:org_id/integrations");
api.org_integrations.authorize_integration = api.endpoint("/api/1.0/organizations/:org_id/integrations/authorize/:name");
api.org_integrations.authorize_integration_callback = api.endpoint("/api/1.0/organizations/:org_id/integrations/authorize/:name/callback");
api.org_integrations.get_integration = api.endpoint("/api/1.0/organizations/:org_id/integrations/:instance_id");
api.org_integrations.reauthorize_integration = api.endpoint("/api/1.0/organizations/:org_id/integrations/:instance_id/authorize");
api.org_integrations.reauthorize_integration_callback = api.endpoint("/api/1.0/organizations/:org_id/integrations/:instance_id/authorize-callback");
api.org_integrations.clear_integration_error = api.endpoint("/api/1.0/organizations/:org_id/integrations/:instance_id/error");
api.org_integrations.remove_integration = api.endpoint("/api/1.0/organizations/:org_id/integrations/:instance_id");
api.org_members = {};
api.org_members.invite = api.endpoint("/api/1.0/organizations/:org_id/invites");
api.org_members.list_invites = api.endpoint("/api/1.0/organizations/:org_id/invites");
api.org_members.add_user = api.endpoint("/api/1.0/organizations/:org_id/members");
api.org_members.list_members = api.endpoint("/api/1.0/organizations/:org_id/members");
api.org_members.update_member_permission = api.endpoint("/api/1.0/organizations/:org_id/members/:member_id");
api.org_members.remove_member = api.endpoint("/api/1.0/organizations/:org_id/members/:member_id");
api.teams = {};
api.teams.list_teams = api.endpoint("/api/1.0/organizations/:org_id/teams");
api.teams.create_team = api.endpoint("/api/1.0/organizations/:org_id/teams");
api.teams.get_team = api.endpoint("/api/1.0/organizations/:org_id/teams/:team_id");
api.teams.update_team = api.endpoint("/api/1.0/organizations/:org_id/teams/:team_id");
api.teams.delete_team = api.endpoint("/api/1.0/organizations/:org_id/teams/:team_id");
api.teams.list_team_members = api.endpoint("/api/1.0/organizations/:org_id/teams/:team_id/members");
api.teams.add_team_member = api.endpoint("/api/1.0/organizations/:org_id/teams/:team_id/members");
api.teams.update_team_member = api.endpoint("/api/1.0/organizations/:org_id/teams/:team_id/members/:org_member_id");
api.teams.remove_team_member = api.endpoint("/api/1.0/organizations/:org_id/teams/:team_id/members/:org_member_id");
api.teams.list_projects = api.endpoint("/api/1.0/organizations/:org_id/teams/:team_id/projects");
api.project_export_templates = {};
api.project_export_templates.list_templates = api.endpoint("/api/1.0/projects/:project_id/export-templates");
api.project_export_templates.create_template = api.endpoint("/api/1.0/projects/:project_id/export-templates");
api.project_export_templates.update_template = api.endpoint("/api/1.0/projects/:project_id/export-templates/:template_id");
api.project_export_templates.delete_template = api.endpoint("/api/1.0/projects/:project_id/export-templates/:template_id");
api.project_group_types = {};
api.project_group_types.list_group_types_in_project = api.endpoint("/api/1.0/projects/:project_id/group-types");
api.project_group_types.create_group_type_in_project = api.endpoint("/api/1.0/projects/:project_id/group-types");
api.project_group_types.enable_group_type = api.endpoint("/api/1.0/projects/:project_id/group-types");
api.project_group_types.get_group_type = api.endpoint("/api/1.0/projects/:project_id/group-types/:type_id");
api.project_group_types.disable_or_delete_group_type = api.endpoint("/api/1.0/projects/:project_id/group-types/:type_id");
api.project_integrations = {};
api.project_integrations.list_available_integrations = api.endpoint("/api/1.0/projects/:project_id/available-integrations");
api.project_integrations.list_integrations = api.endpoint("/api/1.0/projects/:project_id/integrations");
api.project_integrations.activate_integration = api.endpoint("/api/1.0/projects/:project_id/integrations");
api.project_integrations.update_integration = api.endpoint("/api/1.0/projects/:project_id/integrations/:instance_id");
api.project_integrations.remove_integration = api.endpoint("/api/1.0/projects/:project_id/integrations/:instance_id");
api.project_log_types = {};
api.project_log_types.list_enabled_log_types = api.endpoint("/api/1.0/projects/:project_id/log-types");
api.project_log_types.enable_log_type = api.endpoint("/api/1.0/projects/:project_id/log-types");
api.project_log_types.get_log_type = api.endpoint("/api/1.0/projects/:project_id/log-types/:type_id");
api.project_log_types.disable_or_delete_log_type = api.endpoint("/api/1.0/projects/:project_id/log-types/:type_id");
api.project_log_types.list_logs = api.endpoint("/api/1.0/projects/:project_id/log-types/:type_id/logs");
api.project_log_types.list_attribute_choices = api.endpoint("/api/1.0/projects/:project_id/log-types/:type_id/attribute-choices/:type_name");
api.project_members = {};
api.project_members.join_project = api.endpoint("/api/1.0/projects/:project_id/join");
api.project_members.leave_project = api.endpoint("/api/1.0/projects/:project_id/leave");
api.project_members.invite = api.endpoint("/api/1.0/projects/:project_id/invites");
api.project_members.add_user = api.endpoint("/api/1.0/projects/:project_id/members");
api.project_members.update_member = api.endpoint("/api/1.0/projects/:project_id/members/:member_id");
api.project_members.remove_member = api.endpoint("/api/1.0/projects/:project_id/members/:member_id");
api.project_members.list_invites = api.endpoint("/api/1.0/projects/:project_id/invites");
api.project_members.list_members = api.endpoint("/api/1.0/projects/:project_id/members");
api.project_models = {};
api.project_models.list_enabled_models = api.endpoint("/api/1.0/projects/:project_id/models");
api.project_models.enable_model = api.endpoint("/api/1.0/projects/:project_id/models");
api.project_models.get_model = api.endpoint("/api/1.0/projects/:project_id/models/:model_id");
api.project_models.disable_or_delete_model = api.endpoint("/api/1.0/projects/:project_id/models/:model_id");
api.project_models.copy_model = api.endpoint("/api/1.0/projects/:project_id/models/:model_id/copy");
api.project_recurring_cards = {};
api.project_recurring_cards.list_recurring_cards = api.endpoint("/api/1.0/projects/:project_id/recurring_cards");
api.project_recurring_cards.create_recurring_card = api.endpoint("/api/1.0/projects/:project_id/recurring_cards");
api.project_recurring_cards.update_recurring_card = api.endpoint("/api/1.0/projects/:project_id/recurring_cards/:recurring_id");
api.project_recurring_cards.remove_recurring_card = api.endpoint("/api/1.0/projects/:project_id/recurring_cards/:recurring_id");
api.project_request_forms = {};
api.project_request_forms.list_request_forms = api.endpoint("/api/1.0/projects/:project_id/request-forms");
api.project_request_forms.get_request_form = api.endpoint("/api/1.0/projects/:project_id/request-forms/:request_form_id");
api.project_request_forms.get_request_form_requests = api.endpoint("/api/1.0/projects/:project_id/request-forms/:request_form_id/requests");
api.project_request_forms.create_request_form = api.endpoint("/api/1.0/projects/:project_id/request-forms");
api.project_request_forms.update_request_form = api.endpoint("/api/1.0/projects/:project_id/request-forms/:request_form_id");
api.project_request_forms.copy_request_form = api.endpoint("/api/1.0/projects/:project_id/request-forms/:request_form_id/copy");
api.project_request_forms.delete_request_form = api.endpoint("/api/1.0/projects/:project_id/request-forms/:request_form_id");
api.project_views = {};
api.project_views.list_views = api.endpoint("/api/1.0/projects/:project_id/views");
api.project_views.get_view = api.endpoint("/api/1.0/projects/:project_id/views/:view_id");
api.project_views.create_view = api.endpoint("/api/1.0/projects/:project_id/views");
api.project_views.update_view = api.endpoint("/api/1.0/projects/:project_id/views/:view_id");
api.project_views.reorder_view = api.endpoint("/api/1.0/projects/:project_id/views/:view_id/reorder");
api.project_views.delete_view = api.endpoint("/api/1.0/projects/:project_id/views/:view_id");
api.project_views.list_view_categories = api.endpoint("/api/1.0/projects/:project_id/views/categories");
api.project_views.create_view_category = api.endpoint("/api/1.0/projects/:project_id/views/categories");
api.project_views.update_view_category = api.endpoint("/api/1.0/projects/:project_id/views/categories/:category_id");
api.project_views.reorder_view_category = api.endpoint("/api/1.0/projects/:project_id/views/categories/:category_id/reorder");
api.project_views.delete_view_category = api.endpoint("/api/1.0/projects/:project_id/views/categories/:category_id");
api.project_webhooks = {};
api.project_webhooks.list_webhooks = api.endpoint("/api/1.0/projects/:project_id/webhooks");
api.project_webhooks.get_webhook = api.endpoint("/api/1.0/projects/:project_id/webhooks/:webhook_id");
api.project_webhooks.create_webhook = api.endpoint("/api/1.0/projects/:project_id/webhooks");
api.project_webhooks.update_webhook = api.endpoint("/api/1.0/projects/:project_id/webhooks/:webhook_id");
api.project_webhooks.delete_webhook = api.endpoint("/api/1.0/projects/:project_id/webhooks/:webhook_id");
api.project_automations = {};
api.project_automations.list_automation_rules = api.endpoint("/api/1.0/projects/:project_id/automations");
api.project_automations.create_automation_rule = api.endpoint("/api/1.0/projects/:project_id/automations");
api.project_automations.get_automation_rule = api.endpoint("/api/1.0/projects/:project_id/automations/:rule_id");
api.project_automations.create_automation_rule_run_token = api.endpoint("/api/1.0/projects/:project_id/automations/:rule_id/run-token");
api.project_automations.invalidate_all_automation_rule_run_tokens = api.endpoint("/api/1.0/projects/:project_id/automations/:rule_id/invalidate-all-run-tokens");
api.project_automations.get_automation_states = api.endpoint("/api/1.0/projects/:project_id/automations/:rule_id/states");
api.project_automations.get_automation_error_states = api.endpoint("/api/1.0/projects/:project_id/automations/:rule_id/states/errors");
api.project_automations.clear_all_automation_error_states = api.endpoint("/api/1.0/projects/:project_id/automations/:rule_id/states/errors");
api.project_automations.get_automation_activities = api.endpoint("/api/1.0/projects/:project_id/automations/:rule_id/activities");
api.project_automations.trigger_automation_rule = api.endpoint("/api/1.0/projects/:project_id/automations/:rule_id/trigger");
api.project_automations.update_automation_rule = api.endpoint("/api/1.0/projects/:project_id/automations/:rule_id");
api.project_automations.delete_automation_rule = api.endpoint("/api/1.0/projects/:project_id/automations/:rule_id");
api.project_automations.copy_automation_rule = api.endpoint("/api/1.0/projects/:project_id/automations/:rule_id/copy");
api.project_automations.add_toolbar_action = api.endpoint("/api/1.0/projects/:project_id/automations/toolbars");
api.project_automations.remove_toolbar_action = api.endpoint("/api/1.0/projects/:project_id/automations/toolbars/actions/:rule_id");
api.project_automations.remove_toolbar = api.endpoint("/api/1.0/projects/:project_id/automations/toolbars");
api.project_automations.list_toolbar_actions = api.endpoint("/api/1.0/projects/:project_id/automations/toolbars/actions");
api.project_files = {};
api.project_files.list_files = api.endpoint("/api/1.0/projects/:project_id/files");
api.project_files.get_file = api.endpoint("/api/1.0/projects/:project_id/files/:file_id");
api.project_files.upload_file = api.endpoint("/api/1.0/projects/:project_id/files");
api.project_portfolio = {};
api.project_portfolio.list_portfolio_projects = api.endpoint("/api/1.0/projects/:project_id/portfolio/projects");
api.project_portfolio.add_project_to_portfolio = api.endpoint("/api/1.0/projects/:project_id/portfolio/projects");
api.project_portfolio.set_portfolio_projects = api.endpoint("/api/1.0/projects/:project_id/portfolio/projects");
api.project_portfolio.remove_project_from_portfolio = api.endpoint("/api/1.0/projects/:project_id/portfolio/projects/:portfolio_project_id");
api.project_portfolio.search = api.endpoint("/api/1.0/projects/:project_id/portfolio/search");
api.project_portfolio.list_group_by_possibilities = api.endpoint("/api/1.0/projects/:project_id/portfolio/group-by-list");
api.project_portfolio.list_group_by_groups = api.endpoint("/api/1.0/projects/:project_id/portfolio/group-by-groups");
api.project_portfolio.list_filterable_fields = api.endpoint("/api/1.0/projects/:project_id/portfolio/filterable-fields");
api.cards = {};
api.cards.get_attributes = api.endpoint("/api/1.0/cards/:card_id/attributes");
api.cards.get_attribute = api.endpoint("/api/1.0/cards/:card_id/attributes/:attr_id");
api.cards.get_attribute_value = api.endpoint("/api/1.0/cards/:card_id/attributes/:attr_id/value");
api.cards.list_attribute_choices = api.endpoint("/api/1.0/cards/:card_id/attributes/:attr_id/choices");
api.cards.set_attributes = api.endpoint("/api/1.0/cards/:card_id/attributes");
api.cards.clear_attributes = api.endpoint("/api/1.0/cards/:card_id/attributes");
api.cards.set_attribute = api.endpoint("/api/1.0/cards/:card_id/attributes/:attr_id");
api.cards.append_attribute = api.endpoint("/api/1.0/cards/:card_id/attributes/:attr_id/append");
api.cards.pop_attribute = api.endpoint("/api/1.0/cards/:card_id/attributes/:attr_id/pop");
api.cards.clear_attribute = api.endpoint("/api/1.0/cards/:card_id/attributes/:attr_id");
api.cards.get_card = api.endpoint("/api/1.0/cards/:card_id");
api.cards.remove_board = api.endpoint("/api/1.0/cards/:card_id/board");
api.cards.get_change_history = api.endpoint("/api/1.0/cards/:card_id/history");
api.cards.update = api.endpoint("/api/1.0/cards/:card_id");
api.cards.set_state = api.endpoint("/api/1.0/cards/:card_id/state");
api.cards.list_states = api.endpoint("/api/1.0/cards/:card_id/states");
api.cards.delete = api.endpoint("/api/1.0/cards/:card_id");
api.cards.get_self_attributes = api.endpoint("/api/1.0/cards/:card_id/self-attributes");
api.cards.update_self_attributes = api.endpoint("/api/1.0/cards/:card_id/self-attributes");
api.cards.switch_model = api.endpoint("/api/1.0/cards/:card_id/model");
api.cards.relocate = api.endpoint("/api/1.0/cards/:card_id/relocate");
api.cards.copy = api.endpoint("/api/1.0/cards/:card_id/copy");
api.cards.convert_to_project = api.endpoint("/api/1.0/cards/:card_id/convert-to-project");
api.cards.add_to_group = api.endpoint("/api/1.0/cards/:card_id/add-to-group");
api.cards.remove_from_group = api.endpoint("/api/1.0/cards/:card_id/remove-from-group");
api.cards.switch_group = api.endpoint("/api/1.0/cards/:card_id/switch-group");
api.cards.remove_from_group_type = api.endpoint("/api/1.0/cards/:card_id/remove-from-group-type");
api.cards.archive = api.endpoint("/api/1.0/cards/:card_id/archive");
api.cards.restore = api.endpoint("/api/1.0/cards/:card_id/archive");
api.cards.get_subscription = api.endpoint("/api/1.0/cards/:card_id/subscription");
api.cards.subscribe = api.endpoint("/api/1.0/cards/:card_id/subscription");
api.cards.unsubscribe = api.endpoint("/api/1.0/cards/:card_id/subscription");
api.cards.favorite = api.endpoint("/api/1.0/cards/:card_id/pin");
api.cards.favorite = api.endpoint("/api/1.0/cards/:card_id/favorite");
api.cards.unfavorite = api.endpoint("/api/1.0/cards/:card_id/pin");
api.cards.unfavorite = api.endpoint("/api/1.0/cards/:card_id/favorite");
api.cards.create_child = api.endpoint("/api/1.0/cards/:card_id/children");
api.cards.list_children = api.endpoint("/api/1.0/cards/:card_id/children");
api.cards.list_archived_children = api.endpoint("/api/1.0/cards/:card_id/children/archived");
api.cards.list_descendants = api.endpoint("/api/1.0/cards/:card_id/descendants");
api.cards.list_archived_descendants = api.endpoint("/api/1.0/cards/:card_id/descendants/archived");
api.cards.get_hierarchy = api.endpoint("/api/1.0/cards/:card_id/hierarchy");
api.cards.list_reminders = api.endpoint("/api/1.0/cards/:card_id/reminders");
api.cards.matches = api.endpoint("/api/1.0/cards/:card_id/matches");
api.cards.check_valid_groups = api.endpoint("/api/1.0/cards/:card_id/valid-in-groups");
api.cards.get_card_request = api.endpoint("/api/1.0/cards/:card_id/request");
api.cards.create_card_request = api.endpoint("/api/1.0/cards/:card_id/request");
api.cards.delete_card_request = api.endpoint("/api/1.0/cards/:card_id/request");
api.cards.query_card = api.endpoint("/api/1.0/cards/:card_id/query");
api.cards.list_card_automation_states = api.endpoint("/api/1.0/cards/:card_id/automation-states");
api.cards.cancel_card_automation_state = api.endpoint("/api/1.0/cards/:card_id/automation-states/:state_id");
api.calendar = {};
api.calendar.get_url = api.endpoint("/api/1.0/cards/:card_id/calendar/url");
api.calendar.get_calendar = api.endpoint("/api/1.0/ical/:token/events.ics");
api.card_groups = {};
api.card_groups.list_all = api.endpoint("/api/1.0/cards/:card_id/groups");
api.card_groups.list_archived = api.endpoint("/api/1.0/cards/:card_id/groups/archived");
api.card_groups.create_group = api.endpoint("/api/1.0/cards/:card_id/groups");
api.card_groups.toggle_all_flow_indicators = api.endpoint("/api/1.0/cards/:card_id/groups/toggle-flow-indicators");
api.card_groups.get = api.endpoint("/api/1.0/cards/:card_id/groups/:group_id");
api.card_groups.update = api.endpoint("/api/1.0/cards/:card_id/groups/:group_id");
api.card_groups.list_cards = api.endpoint("/api/1.0/cards/:card_id/groups/:group_id/cards");
api.card_groups.list_archived_cards = api.endpoint("/api/1.0/cards/:card_id/groups/:group_id/archives");
api.card_groups.relocate = api.endpoint("/api/1.0/cards/:card_id/groups/:group_id/relocate");
api.card_groups.archive = api.endpoint("/api/1.0/cards/:card_id/groups/:group_id/archive");
api.card_groups.restore = api.endpoint("/api/1.0/cards/:card_id/groups/:group_id/archive");
api.card_groups.get_subscription = api.endpoint("/api/1.0/cards/:card_id/groups/:group_id/subscription");
api.card_groups.subscribe = api.endpoint("/api/1.0/cards/:card_id/groups/:group_id/subscription");
api.card_groups.unsubscribe = api.endpoint("/api/1.0/cards/:card_id/groups/:group_id/subscription");
api.card_groups.delete = api.endpoint("/api/1.0/cards/:card_id/groups/:group_id");
api.card_groups.set_cards_state = api.endpoint("/api/1.0/cards/:card_id/groups/:group_id/set-cards-state");
api.card_reminders = {};
api.card_reminders.create_reminder = api.endpoint("/api/1.0/cards/:card_id/reminders");
api.card_reminders.delete_reminder = api.endpoint("/api/1.0/cards/:card_id/reminders/:reminder_id");
api.card_stream = {};
api.card_stream.list_stream = api.endpoint("/api/1.0/cards/:card_id/stream");
api.card_stream.list_activities = api.endpoint("/api/1.0/cards/:card_id/activities");
api.card_stream.create_activity = api.endpoint("/api/1.0/cards/:card_id/activities");
api.card_stream.list_comments = api.endpoint("/api/1.0/cards/:card_id/comments");
api.card_stream.post_comment = api.endpoint("/api/1.0/cards/:card_id/comments");
api.card_stream.get_comment = api.endpoint("/api/1.0/cards/:card_id/comments/:comment_id");
api.card_stream.edit_comment = api.endpoint("/api/1.0/cards/:card_id/comments/:comment_id");
api.card_stream.delete_comment = api.endpoint("/api/1.0/cards/:card_id/comments/:comment_id");
api.card_stream.pin_comment = api.endpoint("/api/1.0/cards/:card_id/comments/:comment_id/pin");
api.card_stream.get_pinned_comment = api.endpoint("/api/1.0/cards/:card_id/comments/pinned");
api.card_stream.unpin_comment = api.endpoint("/api/1.0/cards/:card_id/comments/pinned");
api.card_stream.upload_file = api.endpoint("/api/1.0/cards/:card_id/comments/upload_file");
api.card_stream.list_logs = api.endpoint("/api/1.0/cards/:card_id/logs");
api.card_stream.add_log = api.endpoint("/api/1.0/cards/:card_id/logs");
api.card_stream.get_log = api.endpoint("/api/1.0/cards/:card_id/logs/:log_id");
api.card_stream.edit_log = api.endpoint("/api/1.0/cards/:card_id/logs/:log_id");
api.card_stream.delete_log = api.endpoint("/api/1.0/cards/:card_id/logs/:log_id");
api.admin = {};
api.admin.get_admin_config = api.endpoint("/api/1.0/admin/config");
api.admin.get_stats = api.endpoint("/api/1.0/admin/stats");
api.admin.list_organizations = api.endpoint("/api/1.0/admin/organizations");
api.admin.export_organizations = api.endpoint("/api/1.0/admin/organizations.xlsx");
api.admin.export_organizations_memberships = api.endpoint("/api/1.0/admin/organizations-memberships.xlsx");
api.admin.create_org = api.endpoint("/api/1.0/admin/organizations");
api.admin.update_org = api.endpoint("/api/1.0/admin/organizations/:org_id");
api.admin.bulk_delete_orgs = api.endpoint("/api/1.0/admin/organizations");
api.admin.list_users = api.endpoint("/api/1.0/admin/users");
api.admin.export_users = api.endpoint("/api/1.0/admin/users.xlsx");
api.admin.get_user = api.endpoint("/api/1.0/admin/users/:user_id");
api.admin.list_user_projects = api.endpoint("/api/1.0/admin/users/:user_id/projects");
api.admin.list_user_org_memberships = api.endpoint("/api/1.0/admin/users/:user_id/org-memberships");
api.admin.create_user = api.endpoint("/api/1.0/admin/users");
api.admin.update_user = api.endpoint("/api/1.0/admin/users/:user_id");
api.admin.bulk_update_users = api.endpoint("/api/1.0/admin/users");
api.admin.delete_user = api.endpoint("/api/1.0/admin/users/:user_id");
api.admin.bulk_delete_users = api.endpoint("/api/1.0/admin/users");
api.admin.bulk_import_users_csv = api.endpoint("/api/1.0/admin/bulk/users/import");
api.admin.bulk_delete_users_csv = api.endpoint("/api/1.0/admin/bulk/users/delete");
api.admin.reset_password = api.endpoint("/api/1.0/admin/users/:user_id/reset-password");
api.admin.logout_user = api.endpoint("/api/1.0/admin/users/:user_id/logout");
api.admin.disable_2fa = api.endpoint("/api/1.0/admin/users/:user_id/disable-2fa");
api.admin.delete_project = api.endpoint("/api/1.0/admin/users/:user_id/projects/:project_id");
api.admin.import_org_from_file = api.endpoint("/api/1.0/admin/import-org-from-file");
api.admin.import_org_from_url = api.endpoint("/api/1.0/admin/import-org-from-url");
api.admin.create_org_billing_account = api.endpoint("/api/1.0/admin/organizations/:org_id/billing");
api.admin.update_billing_account = api.endpoint("/api/1.0/admin/billing/:account_id");
api.admin.delete_billing_account = api.endpoint("/api/1.0/admin/billing/:account_id");
api.admin.create_stripe_customer = api.endpoint("/api/1.0/admin/billing/:account_id/stripe-customer");
api.admin.force_update_stripe = api.endpoint("/api/1.0/admin/billing/:account_id/force-update-stripe");
api.admin.force_update_from_stripe = api.endpoint("/api/1.0/admin/billing/:account_id/force-update-from-stripe");
api.admin.charge_stripe_invoice_items = api.endpoint("/api/1.0/admin/billing/:account_id/charge-stripe-invoice-items");
api.admin.get_logs = api.endpoint("/api/1.0/admin/logs");
api.oauth = {};
api.oauth.list_apps = api.endpoint("/api/1.0/oauth-apps");
api.oauth.create_app = api.endpoint("/api/1.0/oauth-apps");
api.oauth.update_app = api.endpoint("/api/1.0/oauth-apps/:app_id");
api.oauth.delete_app = api.endpoint("/api/1.0/oauth-apps/:app_id");
api.emailing_templates = {};
api.emailing_templates.list_email_templates = api.endpoint("/api/1.0/projects/:project_id/email-templates");
api.emailing_templates.get_email_template = api.endpoint("/api/1.0/projects/:project_id/email-templates/:email_template_id");
api.emailing_templates.create_email_template = api.endpoint("/api/1.0/projects/:project_id/email-templates");
api.emailing_templates.update_email_template = api.endpoint("/api/1.0/projects/:project_id/email-templates/:email_template_id");
api.emailing_templates.delete_email_template = api.endpoint("/api/1.0/projects/:project_id/email-templates/:email_template_id");
api.emailing_templates.send_test_email = api.endpoint("/api/1.0/projects/:project_id/email-templates/:email_template_id/test");
api.emailing_templates.list_template_markers = api.endpoint("/api/1.0/projects/:project_id/email-templates/template-markers");
api.emailing_templates.get_smtp_connection = api.endpoint("/api/1.0/projects/:project_id/email-templates/smtp-connection");
api.emailing_templates.configure_smtp_connection = api.endpoint("/api/1.0/projects/:project_id/email-templates/smtp-connection");
api.sso = {};
api.sso.update_sso_config = api.endpoint("/api/1.0/organizations/:org_id/sso");
api.sso.setup_sso_provider = api.endpoint("/api/1.0/organizations/:org_id/sso/setup");
api.sso.clear_sso_config = api.endpoint("/api/1.0/organizations/:org_id/sso");
api.sso.get_sso_config = api.endpoint("/api/1.0/organizations/:org_id/sso");
api.sso.get_available_providers = api.endpoint("/api/1.0/organizations/:org_id/sso/providers");
api.google_integration = {};
api.google_integration.get_tokens = api.endpoint("/api/1.0/google-integration/tokens");
var api_default = api;

// node_modules/underscore/modules/index.js
var modules_exports = {};
__export(modules_exports, {
  VERSION: () => VERSION,
  after: () => after,
  all: () => every,
  allKeys: () => allKeys,
  any: () => some,
  assign: () => extendOwn_default,
  before: () => before,
  bind: () => bind_default,
  bindAll: () => bindAll_default,
  chain: () => chain,
  chunk: () => chunk,
  clone: () => clone,
  collect: () => map,
  compact: () => compact,
  compose: () => compose,
  constant: () => constant,
  contains: () => contains,
  countBy: () => countBy_default,
  create: () => create,
  debounce: () => debounce,
  default: () => underscore_array_methods_default,
  defaults: () => defaults_default,
  defer: () => defer_default,
  delay: () => delay_default,
  detect: () => find,
  difference: () => difference_default,
  drop: () => rest,
  each: () => each,
  escape: () => escape_default,
  every: () => every,
  extend: () => extend_default,
  extendOwn: () => extendOwn_default,
  filter: () => filter,
  find: () => find,
  findIndex: () => findIndex_default,
  findKey: () => findKey,
  findLastIndex: () => findLastIndex_default,
  findWhere: () => findWhere,
  first: () => first,
  flatten: () => flatten2,
  foldl: () => reduce_default,
  foldr: () => reduceRight_default,
  forEach: () => each,
  functions: () => functions,
  get: () => get,
  groupBy: () => groupBy_default,
  has: () => has2,
  head: () => first,
  identity: () => identity,
  include: () => contains,
  includes: () => contains,
  indexBy: () => indexBy_default,
  indexOf: () => indexOf_default,
  initial: () => initial,
  inject: () => reduce_default,
  intersection: () => intersection,
  invert: () => invert,
  invoke: () => invoke_default,
  isArguments: () => isArguments_default,
  isArray: () => isArray_default,
  isArrayBuffer: () => isArrayBuffer_default,
  isBoolean: () => isBoolean,
  isDataView: () => isDataView_default,
  isDate: () => isDate_default,
  isElement: () => isElement,
  isEmpty: () => isEmpty,
  isEqual: () => isEqual,
  isError: () => isError_default,
  isFinite: () => isFinite2,
  isFunction: () => isFunction_default,
  isMap: () => isMap_default,
  isMatch: () => isMatch,
  isNaN: () => isNaN2,
  isNull: () => isNull,
  isNumber: () => isNumber_default,
  isObject: () => isObject,
  isRegExp: () => isRegExp_default,
  isSet: () => isSet_default,
  isString: () => isString_default,
  isSymbol: () => isSymbol_default,
  isTypedArray: () => isTypedArray_default,
  isUndefined: () => isUndefined,
  isWeakMap: () => isWeakMap_default,
  isWeakSet: () => isWeakSet_default,
  iteratee: () => iteratee,
  keys: () => keys,
  last: () => last,
  lastIndexOf: () => lastIndexOf_default,
  map: () => map,
  mapObject: () => mapObject,
  matcher: () => matcher,
  matches: () => matcher,
  max: () => max,
  memoize: () => memoize,
  methods: () => functions,
  min: () => min,
  mixin: () => mixin,
  negate: () => negate,
  noop: () => noop,
  now: () => now_default,
  object: () => object,
  omit: () => omit_default,
  once: () => once_default,
  pairs: () => pairs,
  partial: () => partial_default,
  partition: () => partition_default,
  pick: () => pick_default,
  pluck: () => pluck,
  property: () => property,
  propertyOf: () => propertyOf,
  random: () => random,
  range: () => range,
  reduce: () => reduce_default,
  reduceRight: () => reduceRight_default,
  reject: () => reject,
  rest: () => rest,
  restArguments: () => restArguments,
  result: () => result,
  sample: () => sample,
  select: () => filter,
  shuffle: () => shuffle,
  size: () => size,
  some: () => some,
  sortBy: () => sortBy,
  sortedIndex: () => sortedIndex,
  tail: () => rest,
  take: () => first,
  tap: () => tap,
  template: () => template2,
  templateSettings: () => templateSettings_default,
  throttle: () => throttle,
  times: () => times,
  toArray: () => toArray,
  toPath: () => toPath,
  transpose: () => unzip,
  unescape: () => unescape_default,
  union: () => union_default,
  uniq: () => uniq,
  unique: () => uniq,
  uniqueId: () => uniqueId,
  unzip: () => unzip,
  values: () => values,
  where: () => where,
  without: () => without_default,
  wrap: () => wrap,
  zip: () => zip_default
});

// node_modules/underscore/modules/_setup.js
var VERSION = "1.13.4";
var root = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || Function("return this")() || {};
var ArrayProto = Array.prototype;
var ObjProto = Object.prototype;
var SymbolProto = typeof Symbol !== "undefined" ? Symbol.prototype : null;
var push = ArrayProto.push;
var slice = ArrayProto.slice;
var toString = ObjProto.toString;
var hasOwnProperty = ObjProto.hasOwnProperty;
var supportsArrayBuffer = typeof ArrayBuffer !== "undefined";
var supportsDataView = typeof DataView !== "undefined";
var nativeIsArray = Array.isArray;
var nativeKeys = Object.keys;
var nativeCreate = Object.create;
var nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
var _isNaN = isNaN;
var _isFinite = isFinite;
var hasEnumBug = !{ toString: null }.propertyIsEnumerable("toString");
var nonEnumerableProps = [
  "valueOf",
  "isPrototypeOf",
  "toString",
  "propertyIsEnumerable",
  "hasOwnProperty",
  "toLocaleString"
];
var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;

// node_modules/underscore/modules/restArguments.js
function restArguments(func, startIndex) {
  startIndex = startIndex == null ? func.length - 1 : +startIndex;
  return function() {
    var length = Math.max(arguments.length - startIndex, 0), rest2 = Array(length), index = 0;
    for (; index < length; index++) {
      rest2[index] = arguments[index + startIndex];
    }
    switch (startIndex) {
      case 0:
        return func.call(this, rest2);
      case 1:
        return func.call(this, arguments[0], rest2);
      case 2:
        return func.call(this, arguments[0], arguments[1], rest2);
    }
    var args = Array(startIndex + 1);
    for (index = 0; index < startIndex; index++) {
      args[index] = arguments[index];
    }
    args[startIndex] = rest2;
    return func.apply(this, args);
  };
}

// node_modules/underscore/modules/isObject.js
function isObject(obj) {
  var type = typeof obj;
  return type === "function" || type === "object" && !!obj;
}

// node_modules/underscore/modules/isNull.js
function isNull(obj) {
  return obj === null;
}

// node_modules/underscore/modules/isUndefined.js
function isUndefined(obj) {
  return obj === void 0;
}

// node_modules/underscore/modules/isBoolean.js
function isBoolean(obj) {
  return obj === true || obj === false || toString.call(obj) === "[object Boolean]";
}

// node_modules/underscore/modules/isElement.js
function isElement(obj) {
  return !!(obj && obj.nodeType === 1);
}

// node_modules/underscore/modules/_tagTester.js
function tagTester(name) {
  var tag = "[object " + name + "]";
  return function(obj) {
    return toString.call(obj) === tag;
  };
}

// node_modules/underscore/modules/isString.js
var isString_default = tagTester("String");

// node_modules/underscore/modules/isNumber.js
var isNumber_default = tagTester("Number");

// node_modules/underscore/modules/isDate.js
var isDate_default = tagTester("Date");

// node_modules/underscore/modules/isRegExp.js
var isRegExp_default = tagTester("RegExp");

// node_modules/underscore/modules/isError.js
var isError_default = tagTester("Error");

// node_modules/underscore/modules/isSymbol.js
var isSymbol_default = tagTester("Symbol");

// node_modules/underscore/modules/isArrayBuffer.js
var isArrayBuffer_default = tagTester("ArrayBuffer");

// node_modules/underscore/modules/isFunction.js
var isFunction = tagTester("Function");
var nodelist = root.document && root.document.childNodes;
if (typeof /./ != "function" && typeof Int8Array != "object" && typeof nodelist != "function") {
  isFunction = function(obj) {
    return typeof obj == "function" || false;
  };
}
var isFunction_default = isFunction;

// node_modules/underscore/modules/_hasObjectTag.js
var hasObjectTag_default = tagTester("Object");

// node_modules/underscore/modules/_stringTagBug.js
var hasStringTagBug = supportsDataView && hasObjectTag_default(new DataView(new ArrayBuffer(8)));
var isIE11 = typeof Map !== "undefined" && hasObjectTag_default(/* @__PURE__ */ new Map());

// node_modules/underscore/modules/isDataView.js
var isDataView = tagTester("DataView");
function ie10IsDataView(obj) {
  return obj != null && isFunction_default(obj.getInt8) && isArrayBuffer_default(obj.buffer);
}
var isDataView_default = hasStringTagBug ? ie10IsDataView : isDataView;

// node_modules/underscore/modules/isArray.js
var isArray_default = nativeIsArray || tagTester("Array");

// node_modules/underscore/modules/_has.js
function has(obj, key) {
  return obj != null && hasOwnProperty.call(obj, key);
}

// node_modules/underscore/modules/isArguments.js
var isArguments = tagTester("Arguments");
(function() {
  if (!isArguments(arguments)) {
    isArguments = function(obj) {
      return has(obj, "callee");
    };
  }
})();
var isArguments_default = isArguments;

// node_modules/underscore/modules/isFinite.js
function isFinite2(obj) {
  return !isSymbol_default(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
}

// node_modules/underscore/modules/isNaN.js
function isNaN2(obj) {
  return isNumber_default(obj) && _isNaN(obj);
}

// node_modules/underscore/modules/constant.js
function constant(value) {
  return function() {
    return value;
  };
}

// node_modules/underscore/modules/_createSizePropertyCheck.js
function createSizePropertyCheck(getSizeProperty) {
  return function(collection) {
    var sizeProperty = getSizeProperty(collection);
    return typeof sizeProperty == "number" && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
  };
}

// node_modules/underscore/modules/_shallowProperty.js
function shallowProperty(key) {
  return function(obj) {
    return obj == null ? void 0 : obj[key];
  };
}

// node_modules/underscore/modules/_getByteLength.js
var getByteLength_default = shallowProperty("byteLength");

// node_modules/underscore/modules/_isBufferLike.js
var isBufferLike_default = createSizePropertyCheck(getByteLength_default);

// node_modules/underscore/modules/isTypedArray.js
var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
function isTypedArray(obj) {
  return nativeIsView ? nativeIsView(obj) && !isDataView_default(obj) : isBufferLike_default(obj) && typedArrayPattern.test(toString.call(obj));
}
var isTypedArray_default = supportsArrayBuffer ? isTypedArray : constant(false);

// node_modules/underscore/modules/_getLength.js
var getLength_default = shallowProperty("length");

// node_modules/underscore/modules/_collectNonEnumProps.js
function emulatedSet(keys2) {
  var hash = {};
  for (var l = keys2.length, i = 0; i < l; ++i) hash[keys2[i]] = true;
  return {
    contains: function(key) {
      return hash[key] === true;
    },
    push: function(key) {
      hash[key] = true;
      return keys2.push(key);
    }
  };
}
function collectNonEnumProps(obj, keys2) {
  keys2 = emulatedSet(keys2);
  var nonEnumIdx = nonEnumerableProps.length;
  var constructor = obj.constructor;
  var proto = isFunction_default(constructor) && constructor.prototype || ObjProto;
  var prop = "constructor";
  if (has(obj, prop) && !keys2.contains(prop)) keys2.push(prop);
  while (nonEnumIdx--) {
    prop = nonEnumerableProps[nonEnumIdx];
    if (prop in obj && obj[prop] !== proto[prop] && !keys2.contains(prop)) {
      keys2.push(prop);
    }
  }
}

// node_modules/underscore/modules/keys.js
function keys(obj) {
  if (!isObject(obj)) return [];
  if (nativeKeys) return nativeKeys(obj);
  var keys2 = [];
  for (var key in obj) if (has(obj, key)) keys2.push(key);
  if (hasEnumBug) collectNonEnumProps(obj, keys2);
  return keys2;
}

// node_modules/underscore/modules/isEmpty.js
function isEmpty(obj) {
  if (obj == null) return true;
  var length = getLength_default(obj);
  if (typeof length == "number" && (isArray_default(obj) || isString_default(obj) || isArguments_default(obj))) return length === 0;
  return getLength_default(keys(obj)) === 0;
}

// node_modules/underscore/modules/isMatch.js
function isMatch(object2, attrs) {
  var _keys = keys(attrs), length = _keys.length;
  if (object2 == null) return !length;
  var obj = Object(object2);
  for (var i = 0; i < length; i++) {
    var key = _keys[i];
    if (attrs[key] !== obj[key] || !(key in obj)) return false;
  }
  return true;
}

// node_modules/underscore/modules/underscore.js
function _(obj) {
  if (obj instanceof _) return obj;
  if (!(this instanceof _)) return new _(obj);
  this._wrapped = obj;
}
_.VERSION = VERSION;
_.prototype.value = function() {
  return this._wrapped;
};
_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
_.prototype.toString = function() {
  return String(this._wrapped);
};

// node_modules/underscore/modules/_toBufferView.js
function toBufferView(bufferSource) {
  return new Uint8Array(
    bufferSource.buffer || bufferSource,
    bufferSource.byteOffset || 0,
    getByteLength_default(bufferSource)
  );
}

// node_modules/underscore/modules/isEqual.js
var tagDataView = "[object DataView]";
function eq(a, b, aStack, bStack) {
  if (a === b) return a !== 0 || 1 / a === 1 / b;
  if (a == null || b == null) return false;
  if (a !== a) return b !== b;
  var type = typeof a;
  if (type !== "function" && type !== "object" && typeof b != "object") return false;
  return deepEq(a, b, aStack, bStack);
}
function deepEq(a, b, aStack, bStack) {
  if (a instanceof _) a = a._wrapped;
  if (b instanceof _) b = b._wrapped;
  var className = toString.call(a);
  if (className !== toString.call(b)) return false;
  if (hasStringTagBug && className == "[object Object]" && isDataView_default(a)) {
    if (!isDataView_default(b)) return false;
    className = tagDataView;
  }
  switch (className) {
    // These types are compared by value.
    case "[object RegExp]":
    // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
    case "[object String]":
      return "" + a === "" + b;
    case "[object Number]":
      if (+a !== +a) return +b !== +b;
      return +a === 0 ? 1 / +a === 1 / b : +a === +b;
    case "[object Date]":
    case "[object Boolean]":
      return +a === +b;
    case "[object Symbol]":
      return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
    case "[object ArrayBuffer]":
    case tagDataView:
      return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
  }
  var areArrays = className === "[object Array]";
  if (!areArrays && isTypedArray_default(a)) {
    var byteLength = getByteLength_default(a);
    if (byteLength !== getByteLength_default(b)) return false;
    if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
    areArrays = true;
  }
  if (!areArrays) {
    if (typeof a != "object" || typeof b != "object") return false;
    var aCtor = a.constructor, bCtor = b.constructor;
    if (aCtor !== bCtor && !(isFunction_default(aCtor) && aCtor instanceof aCtor && isFunction_default(bCtor) && bCtor instanceof bCtor) && ("constructor" in a && "constructor" in b)) {
      return false;
    }
  }
  aStack = aStack || [];
  bStack = bStack || [];
  var length = aStack.length;
  while (length--) {
    if (aStack[length] === a) return bStack[length] === b;
  }
  aStack.push(a);
  bStack.push(b);
  if (areArrays) {
    length = a.length;
    if (length !== b.length) return false;
    while (length--) {
      if (!eq(a[length], b[length], aStack, bStack)) return false;
    }
  } else {
    var _keys = keys(a), key;
    length = _keys.length;
    if (keys(b).length !== length) return false;
    while (length--) {
      key = _keys[length];
      if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
    }
  }
  aStack.pop();
  bStack.pop();
  return true;
}
function isEqual(a, b) {
  return eq(a, b);
}

// node_modules/underscore/modules/allKeys.js
function allKeys(obj) {
  if (!isObject(obj)) return [];
  var keys2 = [];
  for (var key in obj) keys2.push(key);
  if (hasEnumBug) collectNonEnumProps(obj, keys2);
  return keys2;
}

// node_modules/underscore/modules/_methodFingerprint.js
function ie11fingerprint(methods) {
  var length = getLength_default(methods);
  return function(obj) {
    if (obj == null) return false;
    var keys2 = allKeys(obj);
    if (getLength_default(keys2)) return false;
    for (var i = 0; i < length; i++) {
      if (!isFunction_default(obj[methods[i]])) return false;
    }
    return methods !== weakMapMethods || !isFunction_default(obj[forEachName]);
  };
}
var forEachName = "forEach";
var hasName = "has";
var commonInit = ["clear", "delete"];
var mapTail = ["get", hasName, "set"];
var mapMethods = commonInit.concat(forEachName, mapTail);
var weakMapMethods = commonInit.concat(mapTail);
var setMethods = ["add"].concat(commonInit, forEachName, hasName);

// node_modules/underscore/modules/isMap.js
var isMap_default = isIE11 ? ie11fingerprint(mapMethods) : tagTester("Map");

// node_modules/underscore/modules/isWeakMap.js
var isWeakMap_default = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester("WeakMap");

// node_modules/underscore/modules/isSet.js
var isSet_default = isIE11 ? ie11fingerprint(setMethods) : tagTester("Set");

// node_modules/underscore/modules/isWeakSet.js
var isWeakSet_default = tagTester("WeakSet");

// node_modules/underscore/modules/values.js
function values(obj) {
  var _keys = keys(obj);
  var length = _keys.length;
  var values2 = Array(length);
  for (var i = 0; i < length; i++) {
    values2[i] = obj[_keys[i]];
  }
  return values2;
}

// node_modules/underscore/modules/pairs.js
function pairs(obj) {
  var _keys = keys(obj);
  var length = _keys.length;
  var pairs2 = Array(length);
  for (var i = 0; i < length; i++) {
    pairs2[i] = [_keys[i], obj[_keys[i]]];
  }
  return pairs2;
}

// node_modules/underscore/modules/invert.js
function invert(obj) {
  var result2 = {};
  var _keys = keys(obj);
  for (var i = 0, length = _keys.length; i < length; i++) {
    result2[obj[_keys[i]]] = _keys[i];
  }
  return result2;
}

// node_modules/underscore/modules/functions.js
function functions(obj) {
  var names = [];
  for (var key in obj) {
    if (isFunction_default(obj[key])) names.push(key);
  }
  return names.sort();
}

// node_modules/underscore/modules/_createAssigner.js
function createAssigner(keysFunc, defaults) {
  return function(obj) {
    var length = arguments.length;
    if (defaults) obj = Object(obj);
    if (length < 2 || obj == null) return obj;
    for (var index = 1; index < length; index++) {
      var source = arguments[index], keys2 = keysFunc(source), l = keys2.length;
      for (var i = 0; i < l; i++) {
        var key = keys2[i];
        if (!defaults || obj[key] === void 0) obj[key] = source[key];
      }
    }
    return obj;
  };
}

// node_modules/underscore/modules/extend.js
var extend_default = createAssigner(allKeys);

// node_modules/underscore/modules/extendOwn.js
var extendOwn_default = createAssigner(keys);

// node_modules/underscore/modules/defaults.js
var defaults_default = createAssigner(allKeys, true);

// node_modules/underscore/modules/_baseCreate.js
function ctor() {
  return function() {
  };
}
function baseCreate(prototype) {
  if (!isObject(prototype)) return {};
  if (nativeCreate) return nativeCreate(prototype);
  var Ctor = ctor();
  Ctor.prototype = prototype;
  var result2 = new Ctor();
  Ctor.prototype = null;
  return result2;
}

// node_modules/underscore/modules/create.js
function create(prototype, props) {
  var result2 = baseCreate(prototype);
  if (props) extendOwn_default(result2, props);
  return result2;
}

// node_modules/underscore/modules/clone.js
function clone(obj) {
  if (!isObject(obj)) return obj;
  return isArray_default(obj) ? obj.slice() : extend_default({}, obj);
}

// node_modules/underscore/modules/tap.js
function tap(obj, interceptor) {
  interceptor(obj);
  return obj;
}

// node_modules/underscore/modules/toPath.js
function toPath(path) {
  return isArray_default(path) ? path : [path];
}
_.toPath = toPath;

// node_modules/underscore/modules/_toPath.js
function toPath2(path) {
  return _.toPath(path);
}

// node_modules/underscore/modules/_deepGet.js
function deepGet(obj, path) {
  var length = path.length;
  for (var i = 0; i < length; i++) {
    if (obj == null) return void 0;
    obj = obj[path[i]];
  }
  return length ? obj : void 0;
}

// node_modules/underscore/modules/get.js
function get(object2, path, defaultValue) {
  var value = deepGet(object2, toPath2(path));
  return isUndefined(value) ? defaultValue : value;
}

// node_modules/underscore/modules/has.js
function has2(obj, path) {
  path = toPath2(path);
  var length = path.length;
  for (var i = 0; i < length; i++) {
    var key = path[i];
    if (!has(obj, key)) return false;
    obj = obj[key];
  }
  return !!length;
}

// node_modules/underscore/modules/identity.js
function identity(value) {
  return value;
}

// node_modules/underscore/modules/matcher.js
function matcher(attrs) {
  attrs = extendOwn_default({}, attrs);
  return function(obj) {
    return isMatch(obj, attrs);
  };
}

// node_modules/underscore/modules/property.js
function property(path) {
  path = toPath2(path);
  return function(obj) {
    return deepGet(obj, path);
  };
}

// node_modules/underscore/modules/_optimizeCb.js
function optimizeCb(func, context, argCount) {
  if (context === void 0) return func;
  switch (argCount == null ? 3 : argCount) {
    case 1:
      return function(value) {
        return func.call(context, value);
      };
    // The 2-argument case is omitted because we’re not using it.
    case 3:
      return function(value, index, collection) {
        return func.call(context, value, index, collection);
      };
    case 4:
      return function(accumulator, value, index, collection) {
        return func.call(context, accumulator, value, index, collection);
      };
  }
  return function() {
    return func.apply(context, arguments);
  };
}

// node_modules/underscore/modules/_baseIteratee.js
function baseIteratee(value, context, argCount) {
  if (value == null) return identity;
  if (isFunction_default(value)) return optimizeCb(value, context, argCount);
  if (isObject(value) && !isArray_default(value)) return matcher(value);
  return property(value);
}

// node_modules/underscore/modules/iteratee.js
function iteratee(value, context) {
  return baseIteratee(value, context, Infinity);
}
_.iteratee = iteratee;

// node_modules/underscore/modules/_cb.js
function cb(value, context, argCount) {
  if (_.iteratee !== iteratee) return _.iteratee(value, context);
  return baseIteratee(value, context, argCount);
}

// node_modules/underscore/modules/mapObject.js
function mapObject(obj, iteratee2, context) {
  iteratee2 = cb(iteratee2, context);
  var _keys = keys(obj), length = _keys.length, results = {};
  for (var index = 0; index < length; index++) {
    var currentKey = _keys[index];
    results[currentKey] = iteratee2(obj[currentKey], currentKey, obj);
  }
  return results;
}

// node_modules/underscore/modules/noop.js
function noop() {
}

// node_modules/underscore/modules/propertyOf.js
function propertyOf(obj) {
  if (obj == null) return noop;
  return function(path) {
    return get(obj, path);
  };
}

// node_modules/underscore/modules/times.js
function times(n, iteratee2, context) {
  var accum = Array(Math.max(0, n));
  iteratee2 = optimizeCb(iteratee2, context, 1);
  for (var i = 0; i < n; i++) accum[i] = iteratee2(i);
  return accum;
}

// node_modules/underscore/modules/random.js
function random(min2, max2) {
  if (max2 == null) {
    max2 = min2;
    min2 = 0;
  }
  return min2 + Math.floor(Math.random() * (max2 - min2 + 1));
}

// node_modules/underscore/modules/now.js
var now_default = Date.now || function() {
  return (/* @__PURE__ */ new Date()).getTime();
};

// node_modules/underscore/modules/_createEscaper.js
function createEscaper(map2) {
  var escaper = function(match) {
    return map2[match];
  };
  var source = "(?:" + keys(map2).join("|") + ")";
  var testRegexp = RegExp(source);
  var replaceRegexp = RegExp(source, "g");
  return function(string) {
    string = string == null ? "" : "" + string;
    return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
  };
}

// node_modules/underscore/modules/_escapeMap.js
var escapeMap_default = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#x27;",
  "`": "&#x60;"
};

// node_modules/underscore/modules/escape.js
var escape_default = createEscaper(escapeMap_default);

// node_modules/underscore/modules/_unescapeMap.js
var unescapeMap_default = invert(escapeMap_default);

// node_modules/underscore/modules/unescape.js
var unescape_default = createEscaper(unescapeMap_default);

// node_modules/underscore/modules/templateSettings.js
var templateSettings_default = _.templateSettings = {
  evaluate: /<%([\s\S]+?)%>/g,
  interpolate: /<%=([\s\S]+?)%>/g,
  escape: /<%-([\s\S]+?)%>/g
};

// node_modules/underscore/modules/template.js
var noMatch = /(.)^/;
var escapes = {
  "'": "'",
  "\\": "\\",
  "\r": "r",
  "\n": "n",
  "\u2028": "u2028",
  "\u2029": "u2029"
};
var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
function escapeChar(match) {
  return "\\" + escapes[match];
}
var bareIdentifier = /^\s*(\w|\$)+\s*$/;
function template2(text, settings, oldSettings) {
  if (!settings && oldSettings) settings = oldSettings;
  settings = defaults_default({}, settings, _.templateSettings);
  var matcher2 = RegExp([
    (settings.escape || noMatch).source,
    (settings.interpolate || noMatch).source,
    (settings.evaluate || noMatch).source
  ].join("|") + "|$", "g");
  var index = 0;
  var source = "__p+='";
  text.replace(matcher2, function(match, escape, interpolate, evaluate, offset) {
    source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
    index = offset + match.length;
    if (escape) {
      source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
    } else if (interpolate) {
      source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
    } else if (evaluate) {
      source += "';\n" + evaluate + "\n__p+='";
    }
    return match;
  });
  source += "';\n";
  var argument = settings.variable;
  if (argument) {
    if (!bareIdentifier.test(argument)) throw new Error(
      "variable is not a bare identifier: " + argument
    );
  } else {
    source = "with(obj||{}){\n" + source + "}\n";
    argument = "obj";
  }
  source = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + source + "return __p;\n";
  var render2;
  try {
    render2 = new Function(argument, "_", source);
  } catch (e) {
    e.source = source;
    throw e;
  }
  var template3 = function(data) {
    return render2.call(this, data, _);
  };
  template3.source = "function(" + argument + "){\n" + source + "}";
  return template3;
}

// node_modules/underscore/modules/result.js
function result(obj, path, fallback) {
  path = toPath2(path);
  var length = path.length;
  if (!length) {
    return isFunction_default(fallback) ? fallback.call(obj) : fallback;
  }
  for (var i = 0; i < length; i++) {
    var prop = obj == null ? void 0 : obj[path[i]];
    if (prop === void 0) {
      prop = fallback;
      i = length;
    }
    obj = isFunction_default(prop) ? prop.call(obj) : prop;
  }
  return obj;
}

// node_modules/underscore/modules/uniqueId.js
var idCounter = 0;
function uniqueId(prefix) {
  var id = ++idCounter + "";
  return prefix ? prefix + id : id;
}

// node_modules/underscore/modules/chain.js
function chain(obj) {
  var instance = _(obj);
  instance._chain = true;
  return instance;
}

// node_modules/underscore/modules/_executeBound.js
function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
  if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
  var self2 = baseCreate(sourceFunc.prototype);
  var result2 = sourceFunc.apply(self2, args);
  if (isObject(result2)) return result2;
  return self2;
}

// node_modules/underscore/modules/partial.js
var partial = restArguments(function(func, boundArgs) {
  var placeholder = partial.placeholder;
  var bound = function() {
    var position = 0, length = boundArgs.length;
    var args = Array(length);
    for (var i = 0; i < length; i++) {
      args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
    }
    while (position < arguments.length) args.push(arguments[position++]);
    return executeBound(func, bound, this, this, args);
  };
  return bound;
});
partial.placeholder = _;
var partial_default = partial;

// node_modules/underscore/modules/bind.js
var bind_default = restArguments(function(func, context, args) {
  if (!isFunction_default(func)) throw new TypeError("Bind must be called on a function");
  var bound = restArguments(function(callArgs) {
    return executeBound(func, bound, context, this, args.concat(callArgs));
  });
  return bound;
});

// node_modules/underscore/modules/_isArrayLike.js
var isArrayLike_default = createSizePropertyCheck(getLength_default);

// node_modules/underscore/modules/_flatten.js
function flatten(input, depth2, strict, output) {
  output = output || [];
  if (!depth2 && depth2 !== 0) {
    depth2 = Infinity;
  } else if (depth2 <= 0) {
    return output.concat(input);
  }
  var idx = output.length;
  for (var i = 0, length = getLength_default(input); i < length; i++) {
    var value = input[i];
    if (isArrayLike_default(value) && (isArray_default(value) || isArguments_default(value))) {
      if (depth2 > 1) {
        flatten(value, depth2 - 1, strict, output);
        idx = output.length;
      } else {
        var j = 0, len = value.length;
        while (j < len) output[idx++] = value[j++];
      }
    } else if (!strict) {
      output[idx++] = value;
    }
  }
  return output;
}

// node_modules/underscore/modules/bindAll.js
var bindAll_default = restArguments(function(obj, keys2) {
  keys2 = flatten(keys2, false, false);
  var index = keys2.length;
  if (index < 1) throw new Error("bindAll must be passed function names");
  while (index--) {
    var key = keys2[index];
    obj[key] = bind_default(obj[key], obj);
  }
  return obj;
});

// node_modules/underscore/modules/memoize.js
function memoize(func, hasher) {
  var memoize2 = function(key) {
    var cache2 = memoize2.cache;
    var address = "" + (hasher ? hasher.apply(this, arguments) : key);
    if (!has(cache2, address)) cache2[address] = func.apply(this, arguments);
    return cache2[address];
  };
  memoize2.cache = {};
  return memoize2;
}

// node_modules/underscore/modules/delay.js
var delay_default = restArguments(function(func, wait, args) {
  return setTimeout(function() {
    return func.apply(null, args);
  }, wait);
});

// node_modules/underscore/modules/defer.js
var defer_default = partial_default(delay_default, _, 1);

// node_modules/underscore/modules/throttle.js
function throttle(func, wait, options) {
  var timeout, context, args, result2;
  var previous = 0;
  if (!options) options = {};
  var later = function() {
    previous = options.leading === false ? 0 : now_default();
    timeout = null;
    result2 = func.apply(context, args);
    if (!timeout) context = args = null;
  };
  var throttled = function() {
    var _now = now_default();
    if (!previous && options.leading === false) previous = _now;
    var remaining = wait - (_now - previous);
    context = this;
    args = arguments;
    if (remaining <= 0 || remaining > wait) {
      if (timeout) {
        clearTimeout(timeout);
        timeout = null;
      }
      previous = _now;
      result2 = func.apply(context, args);
      if (!timeout) context = args = null;
    } else if (!timeout && options.trailing !== false) {
      timeout = setTimeout(later, remaining);
    }
    return result2;
  };
  throttled.cancel = function() {
    clearTimeout(timeout);
    previous = 0;
    timeout = context = args = null;
  };
  return throttled;
}

// node_modules/underscore/modules/debounce.js
function debounce(func, wait, immediate) {
  var timeout, previous, args, result2, context;
  var later = function() {
    var passed = now_default() - previous;
    if (wait > passed) {
      timeout = setTimeout(later, wait - passed);
    } else {
      timeout = null;
      if (!immediate) result2 = func.apply(context, args);
      if (!timeout) args = context = null;
    }
  };
  var debounced = restArguments(function(_args) {
    context = this;
    args = _args;
    previous = now_default();
    if (!timeout) {
      timeout = setTimeout(later, wait);
      if (immediate) result2 = func.apply(context, args);
    }
    return result2;
  });
  debounced.cancel = function() {
    clearTimeout(timeout);
    timeout = args = context = null;
  };
  return debounced;
}

// node_modules/underscore/modules/wrap.js
function wrap(func, wrapper) {
  return partial_default(wrapper, func);
}

// node_modules/underscore/modules/negate.js
function negate(predicate) {
  return function() {
    return !predicate.apply(this, arguments);
  };
}

// node_modules/underscore/modules/compose.js
function compose() {
  var args = arguments;
  var start = args.length - 1;
  return function() {
    var i = start;
    var result2 = args[start].apply(this, arguments);
    while (i--) result2 = args[i].call(this, result2);
    return result2;
  };
}

// node_modules/underscore/modules/after.js
function after(times2, func) {
  return function() {
    if (--times2 < 1) {
      return func.apply(this, arguments);
    }
  };
}

// node_modules/underscore/modules/before.js
function before(times2, func) {
  var memo;
  return function() {
    if (--times2 > 0) {
      memo = func.apply(this, arguments);
    }
    if (times2 <= 1) func = null;
    return memo;
  };
}

// node_modules/underscore/modules/once.js
var once_default = partial_default(before, 2);

// node_modules/underscore/modules/findKey.js
function findKey(obj, predicate, context) {
  predicate = cb(predicate, context);
  var _keys = keys(obj), key;
  for (var i = 0, length = _keys.length; i < length; i++) {
    key = _keys[i];
    if (predicate(obj[key], key, obj)) return key;
  }
}

// node_modules/underscore/modules/_createPredicateIndexFinder.js
function createPredicateIndexFinder(dir) {
  return function(array, predicate, context) {
    predicate = cb(predicate, context);
    var length = getLength_default(array);
    var index = dir > 0 ? 0 : length - 1;
    for (; index >= 0 && index < length; index += dir) {
      if (predicate(array[index], index, array)) return index;
    }
    return -1;
  };
}

// node_modules/underscore/modules/findIndex.js
var findIndex_default = createPredicateIndexFinder(1);

// node_modules/underscore/modules/findLastIndex.js
var findLastIndex_default = createPredicateIndexFinder(-1);

// node_modules/underscore/modules/sortedIndex.js
function sortedIndex(array, obj, iteratee2, context) {
  iteratee2 = cb(iteratee2, context, 1);
  var value = iteratee2(obj);
  var low = 0, high = getLength_default(array);
  while (low < high) {
    var mid = Math.floor((low + high) / 2);
    if (iteratee2(array[mid]) < value) low = mid + 1;
    else high = mid;
  }
  return low;
}

// node_modules/underscore/modules/_createIndexFinder.js
function createIndexFinder(dir, predicateFind, sortedIndex2) {
  return function(array, item, idx) {
    var i = 0, length = getLength_default(array);
    if (typeof idx == "number") {
      if (dir > 0) {
        i = idx >= 0 ? idx : Math.max(idx + length, i);
      } else {
        length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
      }
    } else if (sortedIndex2 && idx && length) {
      idx = sortedIndex2(array, item);
      return array[idx] === item ? idx : -1;
    }
    if (item !== item) {
      idx = predicateFind(slice.call(array, i, length), isNaN2);
      return idx >= 0 ? idx + i : -1;
    }
    for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
      if (array[idx] === item) return idx;
    }
    return -1;
  };
}

// node_modules/underscore/modules/indexOf.js
var indexOf_default = createIndexFinder(1, findIndex_default, sortedIndex);

// node_modules/underscore/modules/lastIndexOf.js
var lastIndexOf_default = createIndexFinder(-1, findLastIndex_default);

// node_modules/underscore/modules/find.js
function find(obj, predicate, context) {
  var keyFinder = isArrayLike_default(obj) ? findIndex_default : findKey;
  var key = keyFinder(obj, predicate, context);
  if (key !== void 0 && key !== -1) return obj[key];
}

// node_modules/underscore/modules/findWhere.js
function findWhere(obj, attrs) {
  return find(obj, matcher(attrs));
}

// node_modules/underscore/modules/each.js
function each(obj, iteratee2, context) {
  iteratee2 = optimizeCb(iteratee2, context);
  var i, length;
  if (isArrayLike_default(obj)) {
    for (i = 0, length = obj.length; i < length; i++) {
      iteratee2(obj[i], i, obj);
    }
  } else {
    var _keys = keys(obj);
    for (i = 0, length = _keys.length; i < length; i++) {
      iteratee2(obj[_keys[i]], _keys[i], obj);
    }
  }
  return obj;
}

// node_modules/underscore/modules/map.js
function map(obj, iteratee2, context) {
  iteratee2 = cb(iteratee2, context);
  var _keys = !isArrayLike_default(obj) && keys(obj), length = (_keys || obj).length, results = Array(length);
  for (var index = 0; index < length; index++) {
    var currentKey = _keys ? _keys[index] : index;
    results[index] = iteratee2(obj[currentKey], currentKey, obj);
  }
  return results;
}

// node_modules/underscore/modules/_createReduce.js
function createReduce(dir) {
  var reducer = function(obj, iteratee2, memo, initial2) {
    var _keys = !isArrayLike_default(obj) && keys(obj), length = (_keys || obj).length, index = dir > 0 ? 0 : length - 1;
    if (!initial2) {
      memo = obj[_keys ? _keys[index] : index];
      index += dir;
    }
    for (; index >= 0 && index < length; index += dir) {
      var currentKey = _keys ? _keys[index] : index;
      memo = iteratee2(memo, obj[currentKey], currentKey, obj);
    }
    return memo;
  };
  return function(obj, iteratee2, memo, context) {
    var initial2 = arguments.length >= 3;
    return reducer(obj, optimizeCb(iteratee2, context, 4), memo, initial2);
  };
}

// node_modules/underscore/modules/reduce.js
var reduce_default = createReduce(1);

// node_modules/underscore/modules/reduceRight.js
var reduceRight_default = createReduce(-1);

// node_modules/underscore/modules/filter.js
function filter(obj, predicate, context) {
  var results = [];
  predicate = cb(predicate, context);
  each(obj, function(value, index, list) {
    if (predicate(value, index, list)) results.push(value);
  });
  return results;
}

// node_modules/underscore/modules/reject.js
function reject(obj, predicate, context) {
  return filter(obj, negate(cb(predicate)), context);
}

// node_modules/underscore/modules/every.js
function every(obj, predicate, context) {
  predicate = cb(predicate, context);
  var _keys = !isArrayLike_default(obj) && keys(obj), length = (_keys || obj).length;
  for (var index = 0; index < length; index++) {
    var currentKey = _keys ? _keys[index] : index;
    if (!predicate(obj[currentKey], currentKey, obj)) return false;
  }
  return true;
}

// node_modules/underscore/modules/some.js
function some(obj, predicate, context) {
  predicate = cb(predicate, context);
  var _keys = !isArrayLike_default(obj) && keys(obj), length = (_keys || obj).length;
  for (var index = 0; index < length; index++) {
    var currentKey = _keys ? _keys[index] : index;
    if (predicate(obj[currentKey], currentKey, obj)) return true;
  }
  return false;
}

// node_modules/underscore/modules/contains.js
function contains(obj, item, fromIndex, guard) {
  if (!isArrayLike_default(obj)) obj = values(obj);
  if (typeof fromIndex != "number" || guard) fromIndex = 0;
  return indexOf_default(obj, item, fromIndex) >= 0;
}

// node_modules/underscore/modules/invoke.js
var invoke_default = restArguments(function(obj, path, args) {
  var contextPath, func;
  if (isFunction_default(path)) {
    func = path;
  } else {
    path = toPath2(path);
    contextPath = path.slice(0, -1);
    path = path[path.length - 1];
  }
  return map(obj, function(context) {
    var method = func;
    if (!method) {
      if (contextPath && contextPath.length) {
        context = deepGet(context, contextPath);
      }
      if (context == null) return void 0;
      method = context[path];
    }
    return method == null ? method : method.apply(context, args);
  });
});

// node_modules/underscore/modules/pluck.js
function pluck(obj, key) {
  return map(obj, property(key));
}

// node_modules/underscore/modules/where.js
function where(obj, attrs) {
  return filter(obj, matcher(attrs));
}

// node_modules/underscore/modules/max.js
function max(obj, iteratee2, context) {
  var result2 = -Infinity, lastComputed = -Infinity, value, computed;
  if (iteratee2 == null || typeof iteratee2 == "number" && typeof obj[0] != "object" && obj != null) {
    obj = isArrayLike_default(obj) ? obj : values(obj);
    for (var i = 0, length = obj.length; i < length; i++) {
      value = obj[i];
      if (value != null && value > result2) {
        result2 = value;
      }
    }
  } else {
    iteratee2 = cb(iteratee2, context);
    each(obj, function(v, index, list) {
      computed = iteratee2(v, index, list);
      if (computed > lastComputed || computed === -Infinity && result2 === -Infinity) {
        result2 = v;
        lastComputed = computed;
      }
    });
  }
  return result2;
}

// node_modules/underscore/modules/min.js
function min(obj, iteratee2, context) {
  var result2 = Infinity, lastComputed = Infinity, value, computed;
  if (iteratee2 == null || typeof iteratee2 == "number" && typeof obj[0] != "object" && obj != null) {
    obj = isArrayLike_default(obj) ? obj : values(obj);
    for (var i = 0, length = obj.length; i < length; i++) {
      value = obj[i];
      if (value != null && value < result2) {
        result2 = value;
      }
    }
  } else {
    iteratee2 = cb(iteratee2, context);
    each(obj, function(v, index, list) {
      computed = iteratee2(v, index, list);
      if (computed < lastComputed || computed === Infinity && result2 === Infinity) {
        result2 = v;
        lastComputed = computed;
      }
    });
  }
  return result2;
}

// node_modules/underscore/modules/toArray.js
var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
function toArray(obj) {
  if (!obj) return [];
  if (isArray_default(obj)) return slice.call(obj);
  if (isString_default(obj)) {
    return obj.match(reStrSymbol);
  }
  if (isArrayLike_default(obj)) return map(obj, identity);
  return values(obj);
}

// node_modules/underscore/modules/sample.js
function sample(obj, n, guard) {
  if (n == null || guard) {
    if (!isArrayLike_default(obj)) obj = values(obj);
    return obj[random(obj.length - 1)];
  }
  var sample2 = toArray(obj);
  var length = getLength_default(sample2);
  n = Math.max(Math.min(n, length), 0);
  var last2 = length - 1;
  for (var index = 0; index < n; index++) {
    var rand = random(index, last2);
    var temp = sample2[index];
    sample2[index] = sample2[rand];
    sample2[rand] = temp;
  }
  return sample2.slice(0, n);
}

// node_modules/underscore/modules/shuffle.js
function shuffle(obj) {
  return sample(obj, Infinity);
}

// node_modules/underscore/modules/sortBy.js
function sortBy(obj, iteratee2, context) {
  var index = 0;
  iteratee2 = cb(iteratee2, context);
  return pluck(map(obj, function(value, key, list) {
    return {
      value,
      index: index++,
      criteria: iteratee2(value, key, list)
    };
  }).sort(function(left, right) {
    var a = left.criteria;
    var b = right.criteria;
    if (a !== b) {
      if (a > b || a === void 0) return 1;
      if (a < b || b === void 0) return -1;
    }
    return left.index - right.index;
  }), "value");
}

// node_modules/underscore/modules/_group.js
function group(behavior, partition) {
  return function(obj, iteratee2, context) {
    var result2 = partition ? [[], []] : {};
    iteratee2 = cb(iteratee2, context);
    each(obj, function(value, index) {
      var key = iteratee2(value, index, obj);
      behavior(result2, value, key);
    });
    return result2;
  };
}

// node_modules/underscore/modules/groupBy.js
var groupBy_default = group(function(result2, value, key) {
  if (has(result2, key)) result2[key].push(value);
  else result2[key] = [value];
});

// node_modules/underscore/modules/indexBy.js
var indexBy_default = group(function(result2, value, key) {
  result2[key] = value;
});

// node_modules/underscore/modules/countBy.js
var countBy_default = group(function(result2, value, key) {
  if (has(result2, key)) result2[key]++;
  else result2[key] = 1;
});

// node_modules/underscore/modules/partition.js
var partition_default = group(function(result2, value, pass) {
  result2[pass ? 0 : 1].push(value);
}, true);

// node_modules/underscore/modules/size.js
function size(obj) {
  if (obj == null) return 0;
  return isArrayLike_default(obj) ? obj.length : keys(obj).length;
}

// node_modules/underscore/modules/_keyInObj.js
function keyInObj(value, key, obj) {
  return key in obj;
}

// node_modules/underscore/modules/pick.js
var pick_default = restArguments(function(obj, keys2) {
  var result2 = {}, iteratee2 = keys2[0];
  if (obj == null) return result2;
  if (isFunction_default(iteratee2)) {
    if (keys2.length > 1) iteratee2 = optimizeCb(iteratee2, keys2[1]);
    keys2 = allKeys(obj);
  } else {
    iteratee2 = keyInObj;
    keys2 = flatten(keys2, false, false);
    obj = Object(obj);
  }
  for (var i = 0, length = keys2.length; i < length; i++) {
    var key = keys2[i];
    var value = obj[key];
    if (iteratee2(value, key, obj)) result2[key] = value;
  }
  return result2;
});

// node_modules/underscore/modules/omit.js
var omit_default = restArguments(function(obj, keys2) {
  var iteratee2 = keys2[0], context;
  if (isFunction_default(iteratee2)) {
    iteratee2 = negate(iteratee2);
    if (keys2.length > 1) context = keys2[1];
  } else {
    keys2 = map(flatten(keys2, false, false), String);
    iteratee2 = function(value, key) {
      return !contains(keys2, key);
    };
  }
  return pick_default(obj, iteratee2, context);
});

// node_modules/underscore/modules/initial.js
function initial(array, n, guard) {
  return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
}

// node_modules/underscore/modules/first.js
function first(array, n, guard) {
  if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
  if (n == null || guard) return array[0];
  return initial(array, array.length - n);
}

// node_modules/underscore/modules/rest.js
function rest(array, n, guard) {
  return slice.call(array, n == null || guard ? 1 : n);
}

// node_modules/underscore/modules/last.js
function last(array, n, guard) {
  if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
  if (n == null || guard) return array[array.length - 1];
  return rest(array, Math.max(0, array.length - n));
}

// node_modules/underscore/modules/compact.js
function compact(array) {
  return filter(array, Boolean);
}

// node_modules/underscore/modules/flatten.js
function flatten2(array, depth2) {
  return flatten(array, depth2, false);
}

// node_modules/underscore/modules/difference.js
var difference_default = restArguments(function(array, rest2) {
  rest2 = flatten(rest2, true, true);
  return filter(array, function(value) {
    return !contains(rest2, value);
  });
});

// node_modules/underscore/modules/without.js
var without_default = restArguments(function(array, otherArrays) {
  return difference_default(array, otherArrays);
});

// node_modules/underscore/modules/uniq.js
function uniq(array, isSorted, iteratee2, context) {
  if (!isBoolean(isSorted)) {
    context = iteratee2;
    iteratee2 = isSorted;
    isSorted = false;
  }
  if (iteratee2 != null) iteratee2 = cb(iteratee2, context);
  var result2 = [];
  var seen = [];
  for (var i = 0, length = getLength_default(array); i < length; i++) {
    var value = array[i], computed = iteratee2 ? iteratee2(value, i, array) : value;
    if (isSorted && !iteratee2) {
      if (!i || seen !== computed) result2.push(value);
      seen = computed;
    } else if (iteratee2) {
      if (!contains(seen, computed)) {
        seen.push(computed);
        result2.push(value);
      }
    } else if (!contains(result2, value)) {
      result2.push(value);
    }
  }
  return result2;
}

// node_modules/underscore/modules/union.js
var union_default = restArguments(function(arrays) {
  return uniq(flatten(arrays, true, true));
});

// node_modules/underscore/modules/intersection.js
function intersection(array) {
  var result2 = [];
  var argsLength = arguments.length;
  for (var i = 0, length = getLength_default(array); i < length; i++) {
    var item = array[i];
    if (contains(result2, item)) continue;
    var j;
    for (j = 1; j < argsLength; j++) {
      if (!contains(arguments[j], item)) break;
    }
    if (j === argsLength) result2.push(item);
  }
  return result2;
}

// node_modules/underscore/modules/unzip.js
function unzip(array) {
  var length = array && max(array, getLength_default).length || 0;
  var result2 = Array(length);
  for (var index = 0; index < length; index++) {
    result2[index] = pluck(array, index);
  }
  return result2;
}

// node_modules/underscore/modules/zip.js
var zip_default = restArguments(unzip);

// node_modules/underscore/modules/object.js
function object(list, values2) {
  var result2 = {};
  for (var i = 0, length = getLength_default(list); i < length; i++) {
    if (values2) {
      result2[list[i]] = values2[i];
    } else {
      result2[list[i][0]] = list[i][1];
    }
  }
  return result2;
}

// node_modules/underscore/modules/range.js
function range(start, stop, step) {
  if (stop == null) {
    stop = start || 0;
    start = 0;
  }
  if (!step) {
    step = stop < start ? -1 : 1;
  }
  var length = Math.max(Math.ceil((stop - start) / step), 0);
  var range2 = Array(length);
  for (var idx = 0; idx < length; idx++, start += step) {
    range2[idx] = start;
  }
  return range2;
}

// node_modules/underscore/modules/chunk.js
function chunk(array, count) {
  if (count == null || count < 1) return [];
  var result2 = [];
  var i = 0, length = array.length;
  while (i < length) {
    result2.push(slice.call(array, i, i += count));
  }
  return result2;
}

// node_modules/underscore/modules/_chainResult.js
function chainResult(instance, obj) {
  return instance._chain ? _(obj).chain() : obj;
}

// node_modules/underscore/modules/mixin.js
function mixin(obj) {
  each(functions(obj), function(name) {
    var func = _[name] = obj[name];
    _.prototype[name] = function() {
      var args = [this._wrapped];
      push.apply(args, arguments);
      return chainResult(this, func.apply(_, args));
    };
  });
  return _;
}

// node_modules/underscore/modules/underscore-array-methods.js
each(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function(name) {
  var method = ArrayProto[name];
  _.prototype[name] = function() {
    var obj = this._wrapped;
    if (obj != null) {
      method.apply(obj, arguments);
      if ((name === "shift" || name === "splice") && obj.length === 0) {
        delete obj[0];
      }
    }
    return chainResult(this, obj);
  };
});
each(["concat", "join", "slice"], function(name) {
  var method = ArrayProto[name];
  _.prototype[name] = function() {
    var obj = this._wrapped;
    if (obj != null) obj = method.apply(obj, arguments);
    return chainResult(this, obj);
  };
});
var underscore_array_methods_default = _;

// node_modules/underscore/modules/index-default.js
var _2 = mixin(modules_exports);
_2._ = _2;

// public/app/utils/solid.ts
function asyncComponent(func) {
  return lazy(async (...args) => {
    const render2 = await func(...args);
    return { default: render2 };
  });
}

// src/kantree/integrations/microsoft365/msteams/static/msteams-integration.jsx
var _tmpl$ = /* @__PURE__ */ template(`<div class="loader"><div class="loader-inner ball-clip-rotate"><div></div></div></div>`, 6);
var _tmpl$2 = /* @__PURE__ */ template(`<div></div>`, 2);
var _tmpl$3 = /* @__PURE__ */ template(`<div id="login-screen"><img src="/static/assets/logo-black.png"><h1></h1><button></button></div>`, 7);
var _tmpl$4 = /* @__PURE__ */ template(`<h1></h1>`, 2);
var _tmpl$5 = /* @__PURE__ */ template(`<select></select>`, 2);
var _tmpl$6 = /* @__PURE__ */ template(`<p><label><input type="radio" name="addselection" value="workspace"></label></p>`, 5);
var _tmpl$7 = /* @__PURE__ */ template(`<p><label><input type="radio" name="addselection" value="view"></label></p>`, 5);
var _tmpl$8 = /* @__PURE__ */ template(`<div id="tab-config-screen"></div>`, 2);
var _tmpl$9 = /* @__PURE__ */ template(`<optgroup></optgroup>`, 2);
var _tmpl$10 = /* @__PURE__ */ template(`<option></option>`, 2);
var _tmpl$11 = /* @__PURE__ */ template(`<div><span> <em></em></span><button></button></div>`, 8);
var _tmpl$12 = /* @__PURE__ */ template(`<div id="kantree-app-frame"><iframe></iframe></div>`, 4);
var KANTREE_SESSION_KEY = "kantree-msteams-token";
var TRANSLATIONS = {
  "fr": {
    "You are now connected, this window will close shortly.": "Vous \xEAtes maintenant connect\xE9, cette fen\xEAtre va se fermer automatiquement.",
    "Connect to your Kantree account to continue": "Connectez-vous \xE0 votre compte Kantree pour continuer",
    "Connect": "Connexion",
    "An error occured": "Une erreur est survenue",
    "Shared": "Partag\xE9",
    "Personal": "Personel",
    "Select a workspace": "S\xE9lectionnez un workspace",
    "You haven't joined any workspaces in your Kantree account.": "Vous n'avez pas rejoint de Workspace dans votre compte Kantree.",
    "What do you wish to add to your team:": "Que souhaitez-vous ajouter \xE0 votre \xE9quipe:",
    "Add the full workspace (a Kantree account with rights to access the workspace will be needed)": "Ajouter le workspace entier (un compte Kantree avec les droits ad\xE9quats sera n\xE9cessaire)",
    "Add a single view using a shared link (read only without Kantree account)": "Ajouter une seule vue via un lien de partage (lecture seule sans compte Kantree)",
    "No category": "Pas de cat\xE9gorie",
    "You are logged in to Kantree for Microsoft Teams as": "Vous \xEAtes connect\xE9 \xE0 Kantree pour Microsoft Teams en tant que",
    "Logout": "Se d\xE9connecter"
  }
};
function detectLocale() {
  return new URL(document.location).searchParams.get("locale") || (window.navigator?.language || "").substring(0, 2) || "en";
}
var [currentUser, setCurrentUser] = createSignal(null);
var [currentLocale, setCurrentLocale] = createSignal(detectLocale());
function _3(text) {
  if (currentLocale() === "en") {
    return text;
  }
  if (TRANSLATIONS?.[currentLocale()]?.[text]) {
    return TRANSLATIONS[currentLocale()][text];
  }
  return text;
}
function externalUrl(path) {
  return `https://${document.location.hostname}${path}`;
}
function routeUrl(path, external = false) {
  const url = `/integrations/msteams/tab${path}`;
  return external ? externalUrl(url) : url;
}
function Loader() {
  return _tmpl$.cloneNode(true);
}
function ShowLoader(props) {
  return createComponent(Switch, {
    get fallback() {
      return createComponent(Loader, {});
    },
    get children() {
      return createComponent(Match, {
        get when() {
          return props.when;
        },
        get children() {
          return props.children;
        }
      });
    }
  });
}
function AuthEnd() {
  const [params] = useSearchParams();
  microsoftTeams.authentication.notifySuccess(params.access_token, "");
  return (() => {
    const _el$2 = _tmpl$2.cloneNode(true);
    insert(_el$2, () => _3("You are now connected, this window will close shortly."));
    return _el$2;
  })();
}
function LoginScreen(props) {
  async function handleLoginClick() {
    const url = routeUrl(`/auth?oauthRedirectMethod={oauthRedirectMethod}&authId={authId}`, true);
    const accessToken = await microsoftTeams.authentication.authenticate({
      url,
      isExternal: false
    });
    if (accessToken) {
      localStorage.setItem(KANTREE_SESSION_KEY, accessToken);
    }
    props.success();
  }
  return (() => {
    const _el$3 = _tmpl$3.cloneNode(true), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
    insert(_el$5, () => _3("Connect to your Kantree account to continue"));
    _el$6.$$click = handleLoginClick;
    insert(_el$6, () => _3("Connect"));
    return _el$3;
  })();
}
var RequireAuth = (props) => {
  const fetchUserInfo = async () => {
    try {
      const accessToken = localStorage.getItem(KANTREE_SESSION_KEY);
      if (accessToken) {
        api_default.setAuthToken(accessToken);
        window.kantreeAccessToken = accessToken;
        const userInfo = await api_default.user.get_info.get();
        setCurrentUser(userInfo);
        setCurrentLocale(userInfo.locale);
      } else {
        setCurrentUser(false);
        setCurrentLocale(detectLocale());
      }
    } catch (e) {
      setCurrentUser(false);
      setCurrentLocale(detectLocale());
    }
  };
  onMount(() => fetchUserInfo());
  return createComponent(Switch, {
    get fallback() {
      return createComponent(Loader, {});
    },
    get children() {
      return [createComponent(Match, {
        get when() {
          return currentUser();
        },
        get children() {
          return props.children;
        }
      }), createComponent(Match, {
        get when() {
          return currentUser() === false;
        },
        get children() {
          return createComponent(LoginScreen, {
            success: fetchUserInfo
          });
        }
      })];
    }
  });
};
function TabConfig() {
  const [loaded, setLoaded] = createSignal(false);
  const [workspaceOptions, setWorkspaceOptions] = createSignal([]);
  const [selectedWorkspace, setSelectedWorkspace] = createSignal();
  const [addSelection, setAddSelection] = createSignal("workspace");
  const [viewOptions, setViewOptions] = createSignal([]);
  const [selectedView, setSelectedView] = createSignal();
  let workspacesById = {};
  let viewsById = {};
  onMount(async () => {
    microsoftTeams.pages.config.registerOnSaveHandler(async (saveEvent) => {
      try {
        let websiteUrl, contentUrl, entityId, suggestedDisplayName;
        if (addSelection() === "view") {
          const sharing = await api_default.share_objects.create.post({
            project_id: selectedWorkspace().id,
            object_type: "view",
            object_id: selectedView().id
          });
          websiteUrl = externalUrl(`/share/${sharing.token}`);
          contentUrl = routeUrl(`/view/${sharing.token}`, true);
          entityId = `kantree-tab-${selectedWorkspace().id}-${sharing.token}`;
          suggestedDisplayName = `Kantree - ${selectedView().name}`;
        } else {
          websiteUrl = externalUrl(`/p/${selectedWorkspace().slug}`);
          contentUrl = routeUrl(`/ws/${selectedWorkspace().slug}`, true);
          entityId = `kantree-tab-${selectedWorkspace().id}`;
          suggestedDisplayName = `Kantree - ${selectedWorkspace().title}`;
        }
        await microsoftTeams.pages.config.setConfig({
          websiteUrl,
          contentUrl,
          entityId,
          suggestedDisplayName
        });
        saveEvent.notifySuccess();
      } catch (e) {
        saveEvent.notifyFailure(_3("An error occured"));
      }
    });
    const r = await api_default.user.list_app_context_content.get();
    const options = [];
    for (const [key, label] of [["shared", _3("Shared")], ["user", _3("Personal")]]) {
      if (r[key] && r[key].length) {
        options.push({
          label,
          projects: r[key]
        });
      }
    }
    for (const [org, projects, teams] of r.orgs) {
      const noTeamProjects = projects.filter((p) => !p.team);
      if (noTeamProjects.length) {
        options.push({
          label: org.name,
          projects: noTeamProjects
        });
      }
      for (const team of teams) {
        const teamProjects = projects.filter((p) => p.team?.id === team.id);
        if (teamProjects.length) {
          options.push({
            label: `${org.name} / ${team.name}`,
            projects: teamProjects
          });
        }
      }
    }
    workspacesById = {};
    setSelectedWorkspace(null);
    for (const group2 of options) {
      group2.projects.sort((a, b) => a.title.localeCompare(b.title));
      for (const project of group2.projects) {
        workspacesById[project.id] = project;
        if (!selectedWorkspace()) {
          setSelectedWorkspace(project);
        }
      }
    }
    setWorkspaceOptions(options);
    setAddSelection("workspace");
    setLoaded(true);
  });
  createEffect(async () => {
    if (!selectedWorkspace()) {
      return;
    }
    const r = await api_default.projects.get_board.get({
      project_id: selectedWorkspace().id
    });
    const categories = {
      0: {
        label: _3("No category"),
        views: []
      }
    };
    for (const category of r.view_categories) {
      categories[category.id] = {
        label: category.name,
        views: []
      };
    }
    for (const view of r.views) {
      categories[view.category_id || 0].views.push(view);
    }
    viewsById = {};
    setSelectedView(null);
    const options = Object.values(categories).map((c) => {
      c.views.sort((a, b) => a.name.localeCompare(b.name));
      for (const view of c.views) {
        viewsById[view.id] = view;
        if (!selectedView()) {
          setSelectedView(view);
        }
      }
      return c;
    });
    options.sort((a, b) => a.label.localeCompare(b.label));
    setViewOptions(options);
  });
  createEffect(() => {
    microsoftTeams.pages.config.setValidityState(!!selectedWorkspace() && (addSelection() !== "view" || !!selectedView()));
  });
  return createComponent(ShowLoader, {
    get when() {
      return loaded();
    },
    get children() {
      const _el$7 = _tmpl$8.cloneNode(true);
      insert(_el$7, createComponent(Show, {
        get when() {
          return workspaceOptions().length > 0;
        },
        get children() {
          return [(() => {
            const _el$8 = _tmpl$4.cloneNode(true);
            insert(_el$8, () => _3("Select a workspace"));
            return _el$8;
          })(), (() => {
            const _el$9 = _tmpl$5.cloneNode(true);
            _el$9.$$input = (e) => setSelectedWorkspace(workspacesById[parseInt(e.target.value)]);
            insert(_el$9, createComponent(For, {
              get each() {
                return workspaceOptions();
              },
              children: (group2) => (() => {
                const _el$19 = _tmpl$9.cloneNode(true);
                insert(_el$19, createComponent(For, {
                  get each() {
                    return group2.projects;
                  },
                  children: (ws) => (() => {
                    const _el$20 = _tmpl$10.cloneNode(true);
                    insert(_el$20, () => ws.title);
                    createRenderEffect(() => _el$20.value = ws.id);
                    return _el$20;
                  })()
                }));
                createRenderEffect(() => setAttribute(_el$19, "label", group2.label));
                return _el$19;
              })()
            }));
            createRenderEffect(() => _el$9.value = selectedWorkspace()?.id);
            return _el$9;
          })(), (() => {
            const _el$10 = _tmpl$4.cloneNode(true);
            insert(_el$10, () => _3("What do you wish to add to your team:"));
            return _el$10;
          })(), (() => {
            const _el$11 = _tmpl$6.cloneNode(true), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild;
            _el$13.addEventListener("change", (e) => setAddSelection(e.target.value));
            insert(_el$12, () => _3("Add the full workspace (a Kantree account with rights to access the workspace will be needed)"), null);
            createRenderEffect(() => _el$13.checked = addSelection() === "workspace");
            return _el$11;
          })(), (() => {
            const _el$14 = _tmpl$7.cloneNode(true), _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild;
            _el$16.addEventListener("change", (e) => setAddSelection(e.target.value));
            insert(_el$15, () => _3("Add a single view using a shared link (read only but no Kantree account will be needed)"), null);
            createRenderEffect(() => _el$16.checked = addSelection() === "view");
            return _el$14;
          })(), createComponent(Show, {
            get when() {
              return addSelection() === "view";
            },
            get children() {
              return createComponent(ShowLoader, {
                get when() {
                  return viewOptions().length;
                },
                get children() {
                  const _el$17 = _tmpl$5.cloneNode(true);
                  _el$17.$$input = (e) => setSelectedView(viewsById[parseInt(e.target.value)]);
                  insert(_el$17, createComponent(For, {
                    get each() {
                      return viewOptions();
                    },
                    children: (group2) => (() => {
                      const _el$21 = _tmpl$9.cloneNode(true);
                      insert(_el$21, createComponent(For, {
                        get each() {
                          return group2.views;
                        },
                        children: (view) => (() => {
                          const _el$22 = _tmpl$10.cloneNode(true);
                          insert(_el$22, () => view.name);
                          createRenderEffect(() => _el$22.value = view.id);
                          return _el$22;
                        })()
                      }));
                      createRenderEffect(() => setAttribute(_el$21, "label", group2.label));
                      return _el$21;
                    })()
                  }));
                  createRenderEffect(() => _el$17.value = selectedView()?.id);
                  return _el$17;
                }
              });
            }
          })];
        }
      }), null);
      insert(_el$7, createComponent(Show, {
        get when() {
          return workspaceOptions().length === 0;
        },
        get children() {
          const _el$18 = _tmpl$2.cloneNode(true);
          insert(_el$18, () => _3("You haven't joined any workspaces in your Kantree account."));
          return _el$18;
        }
      }), null);
      return _el$7;
    }
  });
}
function KantreeContainer(props) {
  const handleLogoutClick = () => {
    localStorage.removeItem(KANTREE_SESSION_KEY);
    setCurrentUser(false);
  };
  return (() => {
    const _el$23 = _tmpl$12.cloneNode(true), _el$24 = _el$23.firstChild;
    insert(_el$23, createComponent(Show, {
      get when() {
        return currentUser();
      },
      get children() {
        const _el$25 = _tmpl$11.cloneNode(true), _el$26 = _el$25.firstChild, _el$27 = _el$26.firstChild, _el$28 = _el$27.nextSibling, _el$29 = _el$26.nextSibling;
        insert(_el$26, () => _3("You are logged in to Kantree for Microsoft Teams as"), _el$27);
        insert(_el$28, () => currentUser().display_name);
        _el$29.$$click = handleLogoutClick;
        insert(_el$29, () => _3("Logout"));
        return _el$25;
      }
    }), null);
    createRenderEffect(() => setAttribute(_el$24, "src", props.url));
    return _el$23;
  })();
}
function WorkspaceContainer() {
  const params = useParams();
  return createComponent(RequireAuth, {
    get children() {
      return createComponent(KantreeContainer, {
        get url() {
          return externalUrl(`/p/${params.slug}`);
        }
      });
    }
  });
}
function ViewContainer() {
  const params = useParams();
  return createComponent(KantreeContainer, {
    get url() {
      return externalUrl(`/share/${params.token}`);
    }
  });
}
function InboxContainer() {
  return createComponent(RequireAuth, {
    get children() {
      return createComponent(KantreeContainer, {
        get url() {
          return externalUrl("/inbox");
        }
      });
    }
  });
}
var App = asyncComponent(async () => {
  await microsoftTeams.app.initialize();
  return () => createComponent(Router, {
    get children() {
      return [createComponent(Route, {
        get path() {
          return routeUrl("/config");
        },
        component: () => createComponent(RequireAuth, {
          get children() {
            return createComponent(TabConfig, {});
          }
        })
      }), createComponent(Route, {
        get path() {
          return routeUrl("/auth-end");
        },
        component: AuthEnd
      }), createComponent(Route, {
        get path() {
          return routeUrl("/ws/:slug");
        },
        component: WorkspaceContainer
      }), createComponent(Route, {
        get path() {
          return routeUrl("/view/:token");
        },
        component: ViewContainer
      }), createComponent(Route, {
        get path() {
          return routeUrl("/personal");
        },
        component: InboxContainer
      })];
    }
  });
});
render(App, document.getElementById("app"));
delegateEvents(["click", "input"]);
