apollo-elements/apollo-elements

View on GitHub
docs/_assets/_static/apollo-elements-gluon.js.map

Summary

Maintainability
Test Coverage
{
  "version": 3,
  "sources": ["../../../node_modules/ts-invariant/node_modules/tslib/tslib.js", "../../../node_modules/lit-html/src/lib/dom.ts", "../../../node_modules/lit-html/src/lib/template.ts", "../../../node_modules/lit-html/src/lib/modify-template.ts", "../../../node_modules/lit-html/src/lib/directive.ts", "../../../node_modules/lit-html/src/lib/part.ts", "../../../node_modules/lit-html/src/lib/template-instance.ts", "../../../node_modules/lit-html/src/lib/template-result.ts", "../../../node_modules/lit-html/src/lib/parts.ts", "../../../node_modules/lit-html/src/lib/template-factory.ts", "../../../node_modules/lit-html/src/lib/render.ts", "../../../node_modules/lit-html/src/lib/default-template-processor.ts", "../../../node_modules/lit-html/src/lit-html.ts", "../../../node_modules/lit-html/src/lib/shady-render.ts", "../../../node_modules/@gluon/gluon/gluon.js", "../../../node_modules/@open-wc/dedupe-mixin/src/dedupeMixin.js", "../../../packages/core/decorators.ts", "../../../packages/mixins/controller-host-mixin.ts", "../../../packages/core/events.ts", "../../../packages/mixins/apollo-element-mixin.ts", "../../../packages/gluon/apollo-element.ts", "../../../node_modules/ts-invariant/node_modules/tslib/modules/index.js", "../../../node_modules/ts-invariant/src/invariant.ts", "../../../node_modules/@apollo/src/core/networkStatus.ts", "../../../node_modules/@apollo/src/core/index.ts", "../../../packages/core/lib/is-valid-gql.ts", "../../../packages/core/apollo-controller.ts", "../../../packages/core/lib/bound.ts", "../../../packages/core/apollo-query-controller.ts", "../../../packages/mixins/apollo-query-mixin.ts", "../../../packages/gluon/apollo-query.ts", "../../../packages/core/apollo-mutation-controller.ts", "../../../packages/mixins/apollo-mutation-mixin.ts", "../../../packages/gluon/apollo-mutation.ts", "../../../packages/core/apollo-subscription-controller.ts", "../../../packages/mixins/apollo-subscription-mixin.ts", "../../../packages/gluon/apollo-subscription.ts"],
  "sourcesContent": ["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global global, define, System, Reflect, Promise */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __spreadArray;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __createBinding;\r\n(function (factory) {\r\n    var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n    if (typeof define === \"function\" && define.amd) {\r\n        define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n    }\r\n    else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n        factory(createExporter(root, createExporter(module.exports)));\r\n    }\r\n    else {\r\n        factory(createExporter(root));\r\n    }\r\n    function createExporter(exports, previous) {\r\n        if (exports !== root) {\r\n            if (typeof Object.create === \"function\") {\r\n                Object.defineProperty(exports, \"__esModule\", { value: true });\r\n            }\r\n            else {\r\n                exports.__esModule = true;\r\n            }\r\n        }\r\n        return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n    }\r\n})\r\n(function (exporter) {\r\n    var extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n\r\n    __extends = function (d, b) {\r\n        if (typeof b !== \"function\" && b !== null)\r\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n        extendStatics(d, b);\r\n        function __() { this.constructor = d; }\r\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n    };\r\n\r\n    __assign = Object.assign || function (t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n\r\n    __rest = function (s, e) {\r\n        var t = {};\r\n        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n            t[p] = s[p];\r\n        if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n            for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n                if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                    t[p[i]] = s[p[i]];\r\n            }\r\n        return t;\r\n    };\r\n\r\n    __decorate = function (decorators, target, key, desc) {\r\n        var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n        if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n        else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n        return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n    };\r\n\r\n    __param = function (paramIndex, decorator) {\r\n        return function (target, key) { decorator(target, key, paramIndex); }\r\n    };\r\n\r\n    __metadata = function (metadataKey, metadataValue) {\r\n        if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n    };\r\n\r\n    __awaiter = function (thisArg, _arguments, P, generator) {\r\n        function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n        return new (P || (P = Promise))(function (resolve, reject) {\r\n            function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n            function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n            function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n            step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n        });\r\n    };\r\n\r\n    __generator = function (thisArg, body) {\r\n        var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n        return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n        function verb(n) { return function (v) { return step([n, v]); }; }\r\n        function step(op) {\r\n            if (f) throw new TypeError(\"Generator is already executing.\");\r\n            while (_) try {\r\n                if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n                if (y = 0, t) op = [op[0] & 2, t.value];\r\n                switch (op[0]) {\r\n                    case 0: case 1: t = op; break;\r\n                    case 4: _.label++; return { value: op[1], done: false };\r\n                    case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                    case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                    default:\r\n                        if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                        if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                        if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                        if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                        if (t[2]) _.ops.pop();\r\n                        _.trys.pop(); continue;\r\n                }\r\n                op = body.call(thisArg, _);\r\n            } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n            if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n        }\r\n    };\r\n\r\n    __exportStar = function(m, o) {\r\n        for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n    };\r\n\r\n    __createBinding = Object.create ? (function(o, m, k, k2) {\r\n        if (k2 === undefined) k2 = k;\r\n        Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n    }) : (function(o, m, k, k2) {\r\n        if (k2 === undefined) k2 = k;\r\n        o[k2] = m[k];\r\n    });\r\n\r\n    __values = function (o) {\r\n        var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n        if (m) return m.call(o);\r\n        if (o && typeof o.length === \"number\") return {\r\n            next: function () {\r\n                if (o && i >= o.length) o = void 0;\r\n                return { value: o && o[i++], done: !o };\r\n            }\r\n        };\r\n        throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n    };\r\n\r\n    __read = function (o, n) {\r\n        var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n        if (!m) return o;\r\n        var i = m.call(o), r, ar = [], e;\r\n        try {\r\n            while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n        }\r\n        catch (error) { e = { error: error }; }\r\n        finally {\r\n            try {\r\n                if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n            }\r\n            finally { if (e) throw e.error; }\r\n        }\r\n        return ar;\r\n    };\r\n\r\n    /** @deprecated */\r\n    __spread = function () {\r\n        for (var ar = [], i = 0; i < arguments.length; i++)\r\n            ar = ar.concat(__read(arguments[i]));\r\n        return ar;\r\n    };\r\n\r\n    /** @deprecated */\r\n    __spreadArrays = function () {\r\n        for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n        for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n            for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n                r[k] = a[j];\r\n        return r;\r\n    };\r\n\r\n    __spreadArray = function (to, from) {\r\n        for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n            to[j] = from[i];\r\n        return to;\r\n    };\r\n\r\n    __await = function (v) {\r\n        return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n    };\r\n\r\n    __asyncGenerator = function (thisArg, _arguments, generator) {\r\n        if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n        var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n        return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n        function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n        function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n        function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);  }\r\n        function fulfill(value) { resume(\"next\", value); }\r\n        function reject(value) { resume(\"throw\", value); }\r\n        function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n    };\r\n\r\n    __asyncDelegator = function (o) {\r\n        var i, p;\r\n        return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n        function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n    };\r\n\r\n    __asyncValues = function (o) {\r\n        if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n        var m = o[Symbol.asyncIterator], i;\r\n        return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n        function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n        function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n    };\r\n\r\n    __makeTemplateObject = function (cooked, raw) {\r\n        if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n        return cooked;\r\n    };\r\n\r\n    var __setModuleDefault = Object.create ? (function(o, v) {\r\n        Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n    }) : function(o, v) {\r\n        o[\"default\"] = v;\r\n    };\r\n\r\n    __importStar = function (mod) {\r\n        if (mod && mod.__esModule) return mod;\r\n        var result = {};\r\n        if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n        __setModuleDefault(result, mod);\r\n        return result;\r\n    };\r\n\r\n    __importDefault = function (mod) {\r\n        return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n    };\r\n\r\n    __classPrivateFieldGet = function (receiver, state, kind, f) {\r\n        if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n        if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n        return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n    };\r\n\r\n    __classPrivateFieldSet = function (receiver, state, value, kind, f) {\r\n        if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n        if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n        if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n        return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n    };\r\n\r\n    exporter(\"__extends\", __extends);\r\n    exporter(\"__assign\", __assign);\r\n    exporter(\"__rest\", __rest);\r\n    exporter(\"__decorate\", __decorate);\r\n    exporter(\"__param\", __param);\r\n    exporter(\"__metadata\", __metadata);\r\n    exporter(\"__awaiter\", __awaiter);\r\n    exporter(\"__generator\", __generator);\r\n    exporter(\"__exportStar\", __exportStar);\r\n    exporter(\"__createBinding\", __createBinding);\r\n    exporter(\"__values\", __values);\r\n    exporter(\"__read\", __read);\r\n    exporter(\"__spread\", __spread);\r\n    exporter(\"__spreadArrays\", __spreadArrays);\r\n    exporter(\"__spreadArray\", __spreadArray);\r\n    exporter(\"__await\", __await);\r\n    exporter(\"__asyncGenerator\", __asyncGenerator);\r\n    exporter(\"__asyncDelegator\", __asyncDelegator);\r\n    exporter(\"__asyncValues\", __asyncValues);\r\n    exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n    exporter(\"__importStar\", __importStar);\r\n    exporter(\"__importDefault\", __importDefault);\r\n    exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n    exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n});\r\n", "/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\ninterface MaybePolyfilledCe extends CustomElementRegistry {\n  readonly polyfillWrapFlushCallback?: object;\n}\n\n/**\n * True if the custom elements polyfill is in use.\n */\nexport const isCEPolyfill = typeof window !== 'undefined' &&\n    window.customElements != null &&\n    (window.customElements as MaybePolyfilledCe).polyfillWrapFlushCallback !==\n        undefined;\n\n/**\n * Reparents nodes, starting from `start` (inclusive) to `end` (exclusive),\n * into another container (could be the same container), before `before`. If\n * `before` is null, it appends the nodes to the container.\n */\nexport const reparentNodes =\n    (container: Node,\n     start: Node|null,\n     end: Node|null = null,\n     before: Node|null = null): void => {\n      while (start !== end) {\n        const n = start!.nextSibling;\n        container.insertBefore(start!, before);\n        start = n;\n      }\n    };\n\n/**\n * Removes nodes, starting from `start` (inclusive) to `end` (exclusive), from\n * `container`.\n */\nexport const removeNodes =\n    (container: Node, start: Node|null, end: Node|null = null): void => {\n      while (start !== end) {\n        const n = start!.nextSibling;\n        container.removeChild(start!);\n        start = n;\n      }\n    };\n", "/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {TemplateResult} from './template-result.js';\n\n/**\n * An expression marker with embedded unique key to avoid collision with\n * possible text in templates.\n */\nexport const marker = `{{lit-${String(Math.random()).slice(2)}}}`;\n\n/**\n * An expression marker used text-positions, multi-binding attributes, and\n * attributes with markup-like text values.\n */\nexport const nodeMarker = `<!--${marker}-->`;\n\nexport const markerRegex = new RegExp(`${marker}|${nodeMarker}`);\n\n/**\n * Suffix appended to all bound attribute names.\n */\nexport const boundAttributeSuffix = '$lit$';\n\n/**\n * An updatable Template that tracks the location of dynamic parts.\n */\nexport class Template {\n  readonly parts: TemplatePart[] = [];\n  readonly element: HTMLTemplateElement;\n\n  constructor(result: TemplateResult, element: HTMLTemplateElement) {\n    this.element = element;\n\n    const nodesToRemove: Node[] = [];\n    const stack: Node[] = [];\n    // Edge needs all 4 parameters present; IE11 needs 3rd parameter to be null\n    const walker = document.createTreeWalker(\n        element.content,\n        133 /* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */,\n        null,\n        false);\n    // Keeps track of the last index associated with a part. We try to delete\n    // unnecessary nodes, but we never want to associate two different parts\n    // to the same index. They must have a constant node between.\n    let lastPartIndex = 0;\n    let index = -1;\n    let partIndex = 0;\n    const {strings, values: {length}} = result;\n    while (partIndex < length) {\n      const node = walker.nextNode() as Element | Comment | Text | null;\n      if (node === null) {\n        // We've exhausted the content inside a nested template element.\n        // Because we still have parts (the outer for-loop), we know:\n        // - There is a template in the stack\n        // - The walker will find a nextNode outside the template\n        walker.currentNode = stack.pop()!;\n        continue;\n      }\n      index++;\n\n      if (node.nodeType === 1 /* Node.ELEMENT_NODE */) {\n        if ((node as Element).hasAttributes()) {\n          const attributes = (node as Element).attributes;\n          const {length} = attributes;\n          // Per\n          // https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap,\n          // attributes are not guaranteed to be returned in document order.\n          // In particular, Edge/IE can return them out of order, so we cannot\n          // assume a correspondence between part index and attribute index.\n          let count = 0;\n          for (let i = 0; i < length; i++) {\n            if (endsWith(attributes[i].name, boundAttributeSuffix)) {\n              count++;\n            }\n          }\n          while (count-- > 0) {\n            // Get the template literal section leading up to the first\n            // expression in this attribute\n            const stringForPart = strings[partIndex];\n            // Find the attribute name\n            const name = lastAttributeNameRegex.exec(stringForPart)![2];\n            // Find the corresponding attribute\n            // All bound attributes have had a suffix added in\n            // TemplateResult#getHTML to opt out of special attribute\n            // handling. To look up the attribute value we also need to add\n            // the suffix.\n            const attributeLookupName =\n                name.toLowerCase() + boundAttributeSuffix;\n            const attributeValue =\n                (node as Element).getAttribute(attributeLookupName)!;\n            (node as Element).removeAttribute(attributeLookupName);\n            const statics = attributeValue.split(markerRegex);\n            this.parts.push({type: 'attribute', index, name, strings: statics});\n            partIndex += statics.length - 1;\n          }\n        }\n        if ((node as Element).tagName === 'TEMPLATE') {\n          stack.push(node);\n          walker.currentNode = (node as HTMLTemplateElement).content;\n        }\n      } else if (node.nodeType === 3 /* Node.TEXT_NODE */) {\n        const data = (node as Text).data;\n        if (data.indexOf(marker) >= 0) {\n          const parent = node.parentNode!;\n          const strings = data.split(markerRegex);\n          const lastIndex = strings.length - 1;\n          // Generate a new text node for each literal section\n          // These nodes are also used as the markers for node parts\n          for (let i = 0; i < lastIndex; i++) {\n            let insert: Node;\n            let s = strings[i];\n            if (s === '') {\n              insert = createMarker();\n            } else {\n              const match = lastAttributeNameRegex.exec(s);\n              if (match !== null && endsWith(match[2], boundAttributeSuffix)) {\n                s = s.slice(0, match.index) + match[1] +\n                    match[2].slice(0, -boundAttributeSuffix.length) + match[3];\n              }\n              insert = document.createTextNode(s);\n            }\n            parent.insertBefore(insert, node);\n            this.parts.push({type: 'node', index: ++index});\n          }\n          // If there's no text, we must insert a comment to mark our place.\n          // Else, we can trust it will stick around after cloning.\n          if (strings[lastIndex] === '') {\n            parent.insertBefore(createMarker(), node);\n            nodesToRemove.push(node);\n          } else {\n            (node as Text).data = strings[lastIndex];\n          }\n          // We have a part for each match found\n          partIndex += lastIndex;\n        }\n      } else if (node.nodeType === 8 /* Node.COMMENT_NODE */) {\n        if ((node as Comment).data === marker) {\n          const parent = node.parentNode!;\n          // Add a new marker node to be the startNode of the Part if any of\n          // the following are true:\n          //  * We don't have a previousSibling\n          //  * The previousSibling is already the start of a previous part\n          if (node.previousSibling === null || index === lastPartIndex) {\n            index++;\n            parent.insertBefore(createMarker(), node);\n          }\n          lastPartIndex = index;\n          this.parts.push({type: 'node', index});\n          // If we don't have a nextSibling, keep this node so we have an end.\n          // Else, we can remove it to save future costs.\n          if (node.nextSibling === null) {\n            (node as Comment).data = '';\n          } else {\n            nodesToRemove.push(node);\n            index--;\n          }\n          partIndex++;\n        } else {\n          let i = -1;\n          while ((i = (node as Comment).data.indexOf(marker, i + 1)) !== -1) {\n            // Comment node has a binding marker inside, make an inactive part\n            // The binding won't work, but subsequent bindings will\n            // TODO (justinfagnani): consider whether it's even worth it to\n            // make bindings in comments work\n            this.parts.push({type: 'node', index: -1});\n            partIndex++;\n          }\n        }\n      }\n    }\n\n    // Remove text binding nodes after the walk to not disturb the TreeWalker\n    for (const n of nodesToRemove) {\n      n.parentNode!.removeChild(n);\n    }\n  }\n}\n\nconst endsWith = (str: string, suffix: string): boolean => {\n  const index = str.length - suffix.length;\n  return index >= 0 && str.slice(index) === suffix;\n};\n\n/**\n * A placeholder for a dynamic expression in an HTML template.\n *\n * There are two built-in part types: AttributePart and NodePart. NodeParts\n * always represent a single dynamic expression, while AttributeParts may\n * represent as many expressions are contained in the attribute.\n *\n * A Template's parts are mutable, so parts can be replaced or modified\n * (possibly to implement different template semantics). The contract is that\n * parts can only be replaced, not removed, added or reordered, and parts must\n * always consume the correct number of values in their `update()` method.\n *\n * TODO(justinfagnani): That requirement is a little fragile. A\n * TemplateInstance could instead be more careful about which values it gives\n * to Part.update().\n */\nexport type TemplatePart = {\n  readonly type: 'node'; index: number;\n}|{\n  readonly type: 'attribute';\n  index: number;\n  readonly name: string;\n  readonly strings: ReadonlyArray<string>;\n};\n\nexport const isTemplatePartActive = (part: TemplatePart) => part.index !== -1;\n\n// Allows `document.createComment('')` to be renamed for a\n// small manual size-savings.\nexport const createMarker = () => document.createComment('');\n\n/**\n * This regex extracts the attribute name preceding an attribute-position\n * expression. It does this by matching the syntax allowed for attributes\n * against the string literal directly preceding the expression, assuming that\n * the expression is in an attribute-value position.\n *\n * See attributes in the HTML spec:\n * https://www.w3.org/TR/html5/syntax.html#elements-attributes\n *\n * \" \\x09\\x0a\\x0c\\x0d\" are HTML space characters:\n * https://www.w3.org/TR/html5/infrastructure.html#space-characters\n *\n * \"\\0-\\x1F\\x7F-\\x9F\" are Unicode control characters, which includes every\n * space character except \" \".\n *\n * So an attribute is:\n *  * The name: any character except a control character, space character, ('),\n *    (\"), \">\", \"=\", or \"/\"\n *  * Followed by zero or more space characters\n *  * Followed by \"=\"\n *  * Followed by zero or more space characters\n *  * Followed by:\n *    * Any character except space, ('), (\"), \"<\", \">\", \"=\", (`), or\n *    * (\") then any non-(\"), or\n *    * (') then any non-(')\n */\nexport const lastAttributeNameRegex =\n    // eslint-disable-next-line no-control-regex\n    /([ \\x09\\x0a\\x0c\\x0d])([^\\0-\\x1F\\x7F-\\x9F \"'>=/]+)([ \\x09\\x0a\\x0c\\x0d]*=[ \\x09\\x0a\\x0c\\x0d]*(?:[^ \\x09\\x0a\\x0c\\x0d\"'`<>=]*|\"[^\"]*|'[^']*))$/;\n", "/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {isTemplatePartActive, Template, TemplatePart} from './template.js';\n\nconst walkerNodeFilter = 133 /* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */;\n\n/**\n * Removes the list of nodes from a Template safely. In addition to removing\n * nodes from the Template, the Template part indices are updated to match\n * the mutated Template DOM.\n *\n * As the template is walked the removal state is tracked and\n * part indices are adjusted as needed.\n *\n * div\n *   div#1 (remove) <-- start removing (removing node is div#1)\n *     div\n *       div#2 (remove)  <-- continue removing (removing node is still div#1)\n *         div\n * div <-- stop removing since previous sibling is the removing node (div#1,\n * removed 4 nodes)\n */\nexport function removeNodesFromTemplate(\n    template: Template, nodesToRemove: Set<Node>) {\n  const {element: {content}, parts} = template;\n  const walker =\n      document.createTreeWalker(content, walkerNodeFilter, null, false);\n  let partIndex = nextActiveIndexInTemplateParts(parts);\n  let part = parts[partIndex];\n  let nodeIndex = -1;\n  let removeCount = 0;\n  const nodesToRemoveInTemplate = [];\n  let currentRemovingNode: Node|null = null;\n  while (walker.nextNode()) {\n    nodeIndex++;\n    const node = walker.currentNode as Element;\n    // End removal if stepped past the removing node\n    if (node.previousSibling === currentRemovingNode) {\n      currentRemovingNode = null;\n    }\n    // A node to remove was found in the template\n    if (nodesToRemove.has(node)) {\n      nodesToRemoveInTemplate.push(node);\n      // Track node we're removing\n      if (currentRemovingNode === null) {\n        currentRemovingNode = node;\n      }\n    }\n    // When removing, increment count by which to adjust subsequent part indices\n    if (currentRemovingNode !== null) {\n      removeCount++;\n    }\n    while (part !== undefined && part.index === nodeIndex) {\n      // If part is in a removed node deactivate it by setting index to -1 or\n      // adjust the index as needed.\n      part.index = currentRemovingNode !== null ? -1 : part.index - removeCount;\n      // go to the next active part.\n      partIndex = nextActiveIndexInTemplateParts(parts, partIndex);\n      part = parts[partIndex];\n    }\n  }\n  nodesToRemoveInTemplate.forEach((n) => n.parentNode!.removeChild(n));\n}\n\nconst countNodes = (node: Node) => {\n  let count = (node.nodeType === 11 /* Node.DOCUMENT_FRAGMENT_NODE */) ? 0 : 1;\n  const walker = document.createTreeWalker(node, walkerNodeFilter, null, false);\n  while (walker.nextNode()) {\n    count++;\n  }\n  return count;\n};\n\nconst nextActiveIndexInTemplateParts =\n    (parts: TemplatePart[], startIndex = -1) => {\n      for (let i = startIndex + 1; i < parts.length; i++) {\n        const part = parts[i];\n        if (isTemplatePartActive(part)) {\n          return i;\n        }\n      }\n      return -1;\n    };\n\n/**\n * Inserts the given node into the Template, optionally before the given\n * refNode. In addition to inserting the node into the Template, the Template\n * part indices are updated to match the mutated Template DOM.\n */\nexport function insertNodeIntoTemplate(\n    template: Template, node: Node, refNode: Node|null = null) {\n  const {element: {content}, parts} = template;\n  // If there's no refNode, then put node at end of template.\n  // No part indices need to be shifted in this case.\n  if (refNode === null || refNode === undefined) {\n    content.appendChild(node);\n    return;\n  }\n  const walker =\n      document.createTreeWalker(content, walkerNodeFilter, null, false);\n  let partIndex = nextActiveIndexInTemplateParts(parts);\n  let insertCount = 0;\n  let walkerIndex = -1;\n  while (walker.nextNode()) {\n    walkerIndex++;\n    const walkerNode = walker.currentNode as Element;\n    if (walkerNode === refNode) {\n      insertCount = countNodes(node);\n      refNode.parentNode!.insertBefore(node, refNode);\n    }\n    while (partIndex !== -1 && parts[partIndex].index === walkerIndex) {\n      // If we've inserted the node, simply adjust all subsequent parts\n      if (insertCount > 0) {\n        while (partIndex !== -1) {\n          parts[partIndex].index += insertCount;\n          partIndex = nextActiveIndexInTemplateParts(parts, partIndex);\n        }\n        return;\n      }\n      partIndex = nextActiveIndexInTemplateParts(parts, partIndex);\n    }\n  }\n}\n", "/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {Part} from './part.js';\n\nconst directives = new WeakMap<object, true>();\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type DirectiveFactory = (...args: any[]) => object;\n\nexport type DirectiveFn = (part: Part) => void;\n\n/**\n * Brands a function as a directive factory function so that lit-html will call\n * the function during template rendering, rather than passing as a value.\n *\n * A _directive_ is a function that takes a Part as an argument. It has the\n * signature: `(part: Part) => void`.\n *\n * A directive _factory_ is a function that takes arguments for data and\n * configuration and returns a directive. Users of directive usually refer to\n * the directive factory as the directive. For example, \"The repeat directive\".\n *\n * Usually a template author will invoke a directive factory in their template\n * with relevant arguments, which will then return a directive function.\n *\n * Here's an example of using the `repeat()` directive factory that takes an\n * array and a function to render an item:\n *\n * ```js\n * html`<ul><${repeat(items, (item) => html`<li>${item}</li>`)}</ul>`\n * ```\n *\n * When `repeat` is invoked, it returns a directive function that closes over\n * `items` and the template function. When the outer template is rendered, the\n * return directive function is called with the Part for the expression.\n * `repeat` then performs it's custom logic to render multiple items.\n *\n * @param f The directive factory function. Must be a function that returns a\n * function of the signature `(part: Part) => void`. The returned function will\n * be called with the part object.\n *\n * @example\n *\n * import {directive, html} from 'lit-html';\n *\n * const immutable = directive((v) => (part) => {\n *   if (part.value !== v) {\n *     part.setValue(v)\n *   }\n * });\n */\nexport const directive = <F extends DirectiveFactory>(f: F): F =>\n    ((...args: unknown[]) => {\n      const d = f(...args);\n      directives.set(d, true);\n      return d;\n    }) as F;\n\nexport const isDirective = (o: unknown): o is DirectiveFn => {\n  return typeof o === 'function' && directives.has(o);\n};\n", "/**\n * @license\n * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * The Part interface represents a dynamic part of a template instance rendered\n * by lit-html.\n */\nexport interface Part {\n  readonly value: unknown;\n\n  /**\n   * Sets the current part value, but does not write it to the DOM.\n   * @param value The value that will be committed.\n   */\n  setValue(value: unknown): void;\n\n  /**\n   * Commits the current part value, causing it to actually be written to the\n   * DOM.\n   *\n   * Directives are run at the start of `commit`, so that if they call\n   * `part.setValue(...)` synchronously that value will be used in the current\n   * commit, and there's no need to call `part.commit()` within the directive.\n   * If directives set a part value asynchronously, then they must call\n   * `part.commit()` manually.\n   */\n  commit(): void;\n}\n\n/**\n * A sentinel value that signals that a value was handled by a directive and\n * should not be written to the DOM.\n */\nexport const noChange = {};\n\n/**\n * A sentinel value that signals a NodePart to fully clear its content.\n */\nexport const nothing = {};\n", "/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {isCEPolyfill} from './dom.js';\nimport {Part} from './part.js';\nimport {RenderOptions} from './render-options.js';\nimport {TemplateProcessor} from './template-processor.js';\nimport {isTemplatePartActive, Template, TemplatePart} from './template.js';\n\n/**\n * An instance of a `Template` that can be attached to the DOM and updated\n * with new values.\n */\nexport class TemplateInstance {\n  private readonly __parts: Array<Part|undefined> = [];\n  readonly processor: TemplateProcessor;\n  readonly options: RenderOptions;\n  readonly template: Template;\n\n  constructor(\n      template: Template, processor: TemplateProcessor,\n      options: RenderOptions) {\n    this.template = template;\n    this.processor = processor;\n    this.options = options;\n  }\n\n  update(values: readonly unknown[]) {\n    let i = 0;\n    for (const part of this.__parts) {\n      if (part !== undefined) {\n        part.setValue(values[i]);\n      }\n      i++;\n    }\n    for (const part of this.__parts) {\n      if (part !== undefined) {\n        part.commit();\n      }\n    }\n  }\n\n  _clone(): DocumentFragment {\n    // There are a number of steps in the lifecycle of a template instance's\n    // DOM fragment:\n    //  1. Clone - create the instance fragment\n    //  2. Adopt - adopt into the main document\n    //  3. Process - find part markers and create parts\n    //  4. Upgrade - upgrade custom elements\n    //  5. Update - set node, attribute, property, etc., values\n    //  6. Connect - connect to the document. Optional and outside of this\n    //     method.\n    //\n    // We have a few constraints on the ordering of these steps:\n    //  * We need to upgrade before updating, so that property values will pass\n    //    through any property setters.\n    //  * We would like to process before upgrading so that we're sure that the\n    //    cloned fragment is inert and not disturbed by self-modifying DOM.\n    //  * We want custom elements to upgrade even in disconnected fragments.\n    //\n    // Given these constraints, with full custom elements support we would\n    // prefer the order: Clone, Process, Adopt, Upgrade, Update, Connect\n    //\n    // But Safari does not implement CustomElementRegistry#upgrade, so we\n    // can not implement that order and still have upgrade-before-update and\n    // upgrade disconnected fragments. So we instead sacrifice the\n    // process-before-upgrade constraint, since in Custom Elements v1 elements\n    // must not modify their light DOM in the constructor. We still have issues\n    // when co-existing with CEv0 elements like Polymer 1, and with polyfills\n    // that don't strictly adhere to the no-modification rule because shadow\n    // DOM, which may be created in the constructor, is emulated by being placed\n    // in the light DOM.\n    //\n    // The resulting order is on native is: Clone, Adopt, Upgrade, Process,\n    // Update, Connect. document.importNode() performs Clone, Adopt, and Upgrade\n    // in one step.\n    //\n    // The Custom Elements v1 polyfill supports upgrade(), so the order when\n    // polyfilled is the more ideal: Clone, Process, Adopt, Upgrade, Update,\n    // Connect.\n\n    const fragment = isCEPolyfill ?\n        this.template.element.content.cloneNode(true) as DocumentFragment :\n        document.importNode(this.template.element.content, true);\n\n    const stack: Node[] = [];\n    const parts = this.template.parts;\n    // Edge needs all 4 parameters present; IE11 needs 3rd parameter to be null\n    const walker = document.createTreeWalker(\n        fragment,\n        133 /* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */,\n        null,\n        false);\n    let partIndex = 0;\n    let nodeIndex = 0;\n    let part: TemplatePart;\n    let node = walker.nextNode();\n    // Loop through all the nodes and parts of a template\n    while (partIndex < parts.length) {\n      part = parts[partIndex];\n      if (!isTemplatePartActive(part)) {\n        this.__parts.push(undefined);\n        partIndex++;\n        continue;\n      }\n\n      // Progress the tree walker until we find our next part's node.\n      // Note that multiple parts may share the same node (attribute parts\n      // on a single element), so this loop may not run at all.\n      while (nodeIndex < part.index) {\n        nodeIndex++;\n        if (node!.nodeName === 'TEMPLATE') {\n          stack.push(node!);\n          walker.currentNode = (node as HTMLTemplateElement).content;\n        }\n        if ((node = walker.nextNode()) === null) {\n          // We've exhausted the content inside a nested template element.\n          // Because we still have parts (the outer for-loop), we know:\n          // - There is a template in the stack\n          // - The walker will find a nextNode outside the template\n          walker.currentNode = stack.pop()!;\n          node = walker.nextNode();\n        }\n      }\n\n      // We've arrived at our part's node.\n      if (part.type === 'node') {\n        const part = this.processor.handleTextExpression(this.options);\n        part.insertAfterNode(node!.previousSibling!);\n        this.__parts.push(part);\n      } else {\n        this.__parts.push(...this.processor.handleAttributeExpressions(\n            node as Element, part.name, part.strings, this.options));\n      }\n      partIndex++;\n    }\n\n    if (isCEPolyfill) {\n      document.adoptNode(fragment);\n      customElements.upgrade(fragment);\n    }\n    return fragment;\n  }\n}\n", "/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * @module lit-html\n */\n\nimport {reparentNodes} from './dom.js';\nimport {TemplateProcessor} from './template-processor.js';\nimport {boundAttributeSuffix, lastAttributeNameRegex, marker, nodeMarker} from './template.js';\n\ndeclare const trustedTypes: typeof window.trustedTypes;\n/**\n * Our TrustedTypePolicy for HTML which is declared using the html template\n * tag function.\n *\n * That HTML is a developer-authored constant, and is parsed with innerHTML\n * before any untrusted expressions have been mixed in. Therefor it is\n * considered safe by construction.\n */\nconst policy = window.trustedTypes &&\n    trustedTypes!.createPolicy('lit-html', {createHTML: (s) => s});\n\nconst commentMarker = ` ${marker} `;\n\n/**\n * The return type of `html`, which holds a Template and the values from\n * interpolated expressions.\n */\nexport class TemplateResult {\n  readonly strings: TemplateStringsArray;\n  readonly values: readonly unknown[];\n  readonly type: string;\n  readonly processor: TemplateProcessor;\n\n  constructor(\n      strings: TemplateStringsArray, values: readonly unknown[], type: string,\n      processor: TemplateProcessor) {\n    this.strings = strings;\n    this.values = values;\n    this.type = type;\n    this.processor = processor;\n  }\n\n  /**\n   * Returns a string of HTML used to create a `<template>` element.\n   */\n  getHTML(): string {\n    const l = this.strings.length - 1;\n    let html = '';\n    let isCommentBinding = false;\n\n    for (let i = 0; i < l; i++) {\n      const s = this.strings[i];\n      // For each binding we want to determine the kind of marker to insert\n      // into the template source before it's parsed by the browser's HTML\n      // parser. The marker type is based on whether the expression is in an\n      // attribute, text, or comment position.\n      //   * For node-position bindings we insert a comment with the marker\n      //     sentinel as its text content, like <!--{{lit-guid}}-->.\n      //   * For attribute bindings we insert just the marker sentinel for the\n      //     first binding, so that we support unquoted attribute bindings.\n      //     Subsequent bindings can use a comment marker because multi-binding\n      //     attributes must be quoted.\n      //   * For comment bindings we insert just the marker sentinel so we don't\n      //     close the comment.\n      //\n      // The following code scans the template source, but is *not* an HTML\n      // parser. We don't need to track the tree structure of the HTML, only\n      // whether a binding is inside a comment, and if not, if it appears to be\n      // the first binding in an attribute.\n      const commentOpen = s.lastIndexOf('<!--');\n      // We're in comment position if we have a comment open with no following\n      // comment close. Because <-- can appear in an attribute value there can\n      // be false positives.\n      isCommentBinding = (commentOpen > -1 || isCommentBinding) &&\n          s.indexOf('-->', commentOpen + 1) === -1;\n      // Check to see if we have an attribute-like sequence preceding the\n      // expression. This can match \"name=value\" like structures in text,\n      // comments, and attribute values, so there can be false-positives.\n      const attributeMatch = lastAttributeNameRegex.exec(s);\n      if (attributeMatch === null) {\n        // We're only in this branch if we don't have a attribute-like\n        // preceding sequence. For comments, this guards against unusual\n        // attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n        // <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n        // below.\n        html += s + (isCommentBinding ? commentMarker : nodeMarker);\n      } else {\n        // For attributes we use just a marker sentinel, and also append a\n        // $lit$ suffix to the name to opt-out of attribute-specific parsing\n        // that IE and Edge do for style and certain SVG attributes.\n        html += s.substr(0, attributeMatch.index) + attributeMatch[1] +\n            attributeMatch[2] + boundAttributeSuffix + attributeMatch[3] +\n            marker;\n      }\n    }\n    html += this.strings[l];\n    return html;\n  }\n\n  getTemplateElement(): HTMLTemplateElement {\n    const template = document.createElement('template');\n    let value = this.getHTML();\n    if (policy !== undefined) {\n      // this is secure because `this.strings` is a TemplateStringsArray.\n      // TODO: validate this when\n      // https://github.com/tc39/proposal-array-is-template-object is\n      // implemented.\n      value = policy.createHTML(value) as unknown as string;\n    }\n    template.innerHTML = value;\n    return template;\n  }\n}\n\n/**\n * A TemplateResult for SVG fragments.\n *\n * This class wraps HTML in an `<svg>` tag in order to parse its contents in the\n * SVG namespace, then modifies the template to remove the `<svg>` tag so that\n * clones only container the original fragment.\n */\nexport class SVGTemplateResult extends TemplateResult {\n  getHTML(): string {\n    return `<svg>${super.getHTML()}</svg>`;\n  }\n\n  getTemplateElement(): HTMLTemplateElement {\n    const template = super.getTemplateElement();\n    const content = template.content;\n    const svgElement = content.firstChild!;\n    content.removeChild(svgElement);\n    reparentNodes(content, svgElement.firstChild);\n    return template;\n  }\n}\n", "/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {isDirective} from './directive.js';\nimport {removeNodes} from './dom.js';\nimport {noChange, nothing, Part} from './part.js';\nimport {RenderOptions} from './render-options.js';\nimport {TemplateInstance} from './template-instance.js';\nimport {TemplateResult} from './template-result.js';\nimport {createMarker} from './template.js';\n\n// https://tc39.github.io/ecma262/#sec-typeof-operator\nexport type Primitive = null|undefined|boolean|number|string|symbol|bigint;\nexport const isPrimitive = (value: unknown): value is Primitive => {\n  return (\n      value === null ||\n      !(typeof value === 'object' || typeof value === 'function'));\n};\nexport const isIterable = (value: unknown): value is Iterable<unknown> => {\n  return Array.isArray(value) ||\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      !!(value && (value as any)[Symbol.iterator]);\n};\n\n/**\n * Writes attribute values to the DOM for a group of AttributeParts bound to a\n * single attribute. The value is only set once even if there are multiple parts\n * for an attribute.\n */\nexport class AttributeCommitter {\n  readonly element: Element;\n  readonly name: string;\n  readonly strings: ReadonlyArray<string>;\n  readonly parts: ReadonlyArray<AttributePart>;\n  dirty = true;\n\n  constructor(element: Element, name: string, strings: ReadonlyArray<string>) {\n    this.element = element;\n    this.name = name;\n    this.strings = strings;\n    this.parts = [];\n    for (let i = 0; i < strings.length - 1; i++) {\n      (this.parts as AttributePart[])[i] = this._createPart();\n    }\n  }\n\n  /**\n   * Creates a single part. Override this to create a differnt type of part.\n   */\n  protected _createPart(): AttributePart {\n    return new AttributePart(this);\n  }\n\n  protected _getValue(): unknown {\n    const strings = this.strings;\n    const l = strings.length - 1;\n    const parts = this.parts;\n\n    // If we're assigning an attribute via syntax like:\n    //    attr=\"${foo}\"  or  attr=${foo}\n    // but not\n    //    attr=\"${foo} ${bar}\" or attr=\"${foo} baz\"\n    // then we don't want to coerce the attribute value into one long\n    // string. Instead we want to just return the value itself directly,\n    // so that sanitizeDOMValue can get the actual value rather than\n    // String(value)\n    // The exception is if v is an array, in which case we do want to smash\n    // it together into a string without calling String() on the array.\n    //\n    // This also allows trusted values (when using TrustedTypes) being\n    // assigned to DOM sinks without being stringified in the process.\n    if (l === 1 && strings[0] === '' && strings[1] === '') {\n      const v = parts[0].value;\n      if (typeof v === 'symbol') {\n        return String(v);\n      }\n      if (typeof v === 'string' || !isIterable(v)) {\n        return v;\n      }\n    }\n    let text = '';\n\n    for (let i = 0; i < l; i++) {\n      text += strings[i];\n      const part = parts[i];\n      if (part !== undefined) {\n        const v = part.value;\n        if (isPrimitive(v) || !isIterable(v)) {\n          text += typeof v === 'string' ? v : String(v);\n        } else {\n          for (const t of v) {\n            text += typeof t === 'string' ? t : String(t);\n          }\n        }\n      }\n    }\n\n    text += strings[l];\n    return text;\n  }\n\n  commit(): void {\n    if (this.dirty) {\n      this.dirty = false;\n      this.element.setAttribute(this.name, this._getValue() as string);\n    }\n  }\n}\n\n/**\n * A Part that controls all or part of an attribute value.\n */\nexport class AttributePart implements Part {\n  readonly committer: AttributeCommitter;\n  value: unknown = undefined;\n\n  constructor(committer: AttributeCommitter) {\n    this.committer = committer;\n  }\n\n  setValue(value: unknown): void {\n    if (value !== noChange && (!isPrimitive(value) || value !== this.value)) {\n      this.value = value;\n      // If the value is a not a directive, dirty the committer so that it'll\n      // call setAttribute. If the value is a directive, it'll dirty the\n      // committer if it calls setValue().\n      if (!isDirective(value)) {\n        this.committer.dirty = true;\n      }\n    }\n  }\n\n  commit() {\n    while (isDirective(this.value)) {\n      const directive = this.value;\n      this.value = noChange;\n      directive(this);\n    }\n    if (this.value === noChange) {\n      return;\n    }\n    this.committer.commit();\n  }\n}\n\n/**\n * A Part that controls a location within a Node tree. Like a Range, NodePart\n * has start and end locations and can set and update the Nodes between those\n * locations.\n *\n * NodeParts support several value types: primitives, Nodes, TemplateResults,\n * as well as arrays and iterables of those types.\n */\nexport class NodePart implements Part {\n  readonly options: RenderOptions;\n  startNode!: Node;\n  endNode!: Node;\n  value: unknown = undefined;\n  private __pendingValue: unknown = undefined;\n\n  constructor(options: RenderOptions) {\n    this.options = options;\n  }\n\n  /**\n   * Appends this part into a container.\n   *\n   * This part must be empty, as its contents are not automatically moved.\n   */\n  appendInto(container: Node) {\n    this.startNode = container.appendChild(createMarker());\n    this.endNode = container.appendChild(createMarker());\n  }\n\n  /**\n   * Inserts this part after the `ref` node (between `ref` and `ref`'s next\n   * sibling). Both `ref` and its next sibling must be static, unchanging nodes\n   * such as those that appear in a literal section of a template.\n   *\n   * This part must be empty, as its contents are not automatically moved.\n   */\n  insertAfterNode(ref: Node) {\n    this.startNode = ref;\n    this.endNode = ref.nextSibling!;\n  }\n\n  /**\n   * Appends this part into a parent part.\n   *\n   * This part must be empty, as its contents are not automatically moved.\n   */\n  appendIntoPart(part: NodePart) {\n    part.__insert(this.startNode = createMarker());\n    part.__insert(this.endNode = createMarker());\n  }\n\n  /**\n   * Inserts this part after the `ref` part.\n   *\n   * This part must be empty, as its contents are not automatically moved.\n   */\n  insertAfterPart(ref: NodePart) {\n    ref.__insert(this.startNode = createMarker());\n    this.endNode = ref.endNode;\n    ref.endNode = this.startNode;\n  }\n\n  setValue(value: unknown): void {\n    this.__pendingValue = value;\n  }\n\n  commit() {\n    if (this.startNode.parentNode === null) {\n      return;\n    }\n    while (isDirective(this.__pendingValue)) {\n      const directive = this.__pendingValue;\n      this.__pendingValue = noChange;\n      directive(this);\n    }\n    const value = this.__pendingValue;\n    if (value === noChange) {\n      return;\n    }\n    if (isPrimitive(value)) {\n      if (value !== this.value) {\n        this.__commitText(value);\n      }\n    } else if (value instanceof TemplateResult) {\n      this.__commitTemplateResult(value);\n    } else if (value instanceof Node) {\n      this.__commitNode(value);\n    } else if (isIterable(value)) {\n      this.__commitIterable(value);\n    } else if (value === nothing) {\n      this.value = nothing;\n      this.clear();\n    } else {\n      // Fallback, will render the string representation\n      this.__commitText(value);\n    }\n  }\n\n  private __insert(node: Node) {\n    this.endNode.parentNode!.insertBefore(node, this.endNode);\n  }\n\n  private __commitNode(value: Node): void {\n    if (this.value === value) {\n      return;\n    }\n    this.clear();\n    this.__insert(value);\n    this.value = value;\n  }\n\n  private __commitText(value: unknown): void {\n    const node = this.startNode.nextSibling!;\n    value = value == null ? '' : value;\n    // If `value` isn't already a string, we explicitly convert it here in case\n    // it can't be implicitly converted - i.e. it's a symbol.\n    const valueAsString: string =\n        typeof value === 'string' ? value : String(value);\n    if (node === this.endNode.previousSibling &&\n        node.nodeType === 3 /* Node.TEXT_NODE */) {\n      // If we only have a single text node between the markers, we can just\n      // set its value, rather than replacing it.\n      // TODO(justinfagnani): Can we just check if this.value is primitive?\n      (node as Text).data = valueAsString;\n    } else {\n      this.__commitNode(document.createTextNode(valueAsString));\n    }\n    this.value = value;\n  }\n\n  private __commitTemplateResult(value: TemplateResult): void {\n    const template = this.options.templateFactory(value);\n    if (this.value instanceof TemplateInstance &&\n        this.value.template === template) {\n      this.value.update(value.values);\n    } else {\n      // Make sure we propagate the template processor from the TemplateResult\n      // so that we use its syntax extension, etc. The template factory comes\n      // from the render function options so that it can control template\n      // caching and preprocessing.\n      const instance =\n          new TemplateInstance(template, value.processor, this.options);\n      const fragment = instance._clone();\n      instance.update(value.values);\n      this.__commitNode(fragment);\n      this.value = instance;\n    }\n  }\n\n  private __commitIterable(value: Iterable<unknown>): void {\n    // For an Iterable, we create a new InstancePart per item, then set its\n    // value to the item. This is a little bit of overhead for every item in\n    // an Iterable, but it lets us recurse easily and efficiently update Arrays\n    // of TemplateResults that will be commonly returned from expressions like:\n    // array.map((i) => html`${i}`), by reusing existing TemplateInstances.\n\n    // If _value is an array, then the previous render was of an\n    // iterable and _value will contain the NodeParts from the previous\n    // render. If _value is not an array, clear this part and make a new\n    // array for NodeParts.\n    if (!Array.isArray(this.value)) {\n      this.value = [];\n      this.clear();\n    }\n\n    // Lets us keep track of how many items we stamped so we can clear leftover\n    // items from a previous render\n    const itemParts = this.value as NodePart[];\n    let partIndex = 0;\n    let itemPart: NodePart|undefined;\n\n    for (const item of value) {\n      // Try to reuse an existing part\n      itemPart = itemParts[partIndex];\n\n      // If no existing part, create a new one\n      if (itemPart === undefined) {\n        itemPart = new NodePart(this.options);\n        itemParts.push(itemPart);\n        if (partIndex === 0) {\n          itemPart.appendIntoPart(this);\n        } else {\n          itemPart.insertAfterPart(itemParts[partIndex - 1]);\n        }\n      }\n      itemPart.setValue(item);\n      itemPart.commit();\n      partIndex++;\n    }\n\n    if (partIndex < itemParts.length) {\n      // Truncate the parts array so _value reflects the current state\n      itemParts.length = partIndex;\n      this.clear(itemPart && itemPart.endNode);\n    }\n  }\n\n  clear(startNode: Node = this.startNode) {\n    removeNodes(\n        this.startNode.parentNode!, startNode.nextSibling!, this.endNode);\n  }\n}\n\n/**\n * Implements a boolean attribute, roughly as defined in the HTML\n * specification.\n *\n * If the value is truthy, then the attribute is present with a value of\n * ''. If the value is falsey, the attribute is removed.\n */\nexport class BooleanAttributePart implements Part {\n  readonly element: Element;\n  readonly name: string;\n  readonly strings: readonly string[];\n  value: unknown = undefined;\n  private __pendingValue: unknown = undefined;\n\n  constructor(element: Element, name: string, strings: readonly string[]) {\n    if (strings.length !== 2 || strings[0] !== '' || strings[1] !== '') {\n      throw new Error(\n          'Boolean attributes can only contain a single expression');\n    }\n    this.element = element;\n    this.name = name;\n    this.strings = strings;\n  }\n\n  setValue(value: unknown): void {\n    this.__pendingValue = value;\n  }\n\n  commit() {\n    while (isDirective(this.__pendingValue)) {\n      const directive = this.__pendingValue;\n      this.__pendingValue = noChange;\n      directive(this);\n    }\n    if (this.__pendingValue === noChange) {\n      return;\n    }\n    const value = !!this.__pendingValue;\n    if (this.value !== value) {\n      if (value) {\n        this.element.setAttribute(this.name, '');\n      } else {\n        this.element.removeAttribute(this.name);\n      }\n      this.value = value;\n    }\n    this.__pendingValue = noChange;\n  }\n}\n\n/**\n * Sets attribute values for PropertyParts, so that the value is only set once\n * even if there are multiple parts for a property.\n *\n * If an expression controls the whole property value, then the value is simply\n * assigned to the property under control. If there are string literals or\n * multiple expressions, then the strings are expressions are interpolated into\n * a string first.\n */\nexport class PropertyCommitter extends AttributeCommitter {\n  readonly single: boolean;\n\n  constructor(element: Element, name: string, strings: ReadonlyArray<string>) {\n    super(element, name, strings);\n    this.single =\n        (strings.length === 2 && strings[0] === '' && strings[1] === '');\n  }\n\n  protected _createPart(): PropertyPart {\n    return new PropertyPart(this);\n  }\n\n  protected _getValue() {\n    if (this.single) {\n      return this.parts[0].value;\n    }\n    return super._getValue();\n  }\n\n  commit(): void {\n    if (this.dirty) {\n      this.dirty = false;\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      (this.element as any)[this.name] = this._getValue();\n    }\n  }\n}\n\nexport class PropertyPart extends AttributePart {}\n\n// Detect event listener options support. If the `capture` property is read\n// from the options object, then options are supported. If not, then the third\n// argument to add/removeEventListener is interpreted as the boolean capture\n// value so we should only pass the `capture` property.\nlet eventOptionsSupported = false;\n\n// Wrap into an IIFE because MS Edge <= v41 does not support having try/catch\n// blocks right into the body of a module\n(() => {\n  try {\n    const options = {\n      get capture() {\n        eventOptionsSupported = true;\n        return false;\n      }\n    };\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    window.addEventListener('test', options as any, options);\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    window.removeEventListener('test', options as any, options);\n  } catch (_e) {\n    // event options not supported\n  }\n})();\n\ntype EventHandlerWithOptions =\n    EventListenerOrEventListenerObject&Partial<AddEventListenerOptions>;\nexport class EventPart implements Part {\n  readonly element: Element;\n  readonly eventName: string;\n  readonly eventContext?: EventTarget;\n  value: undefined|EventHandlerWithOptions = undefined;\n  private __options?: AddEventListenerOptions;\n  private __pendingValue: undefined|EventHandlerWithOptions = undefined;\n  private readonly __boundHandleEvent: (event: Event) => void;\n\n  constructor(element: Element, eventName: string, eventContext?: EventTarget) {\n    this.element = element;\n    this.eventName = eventName;\n    this.eventContext = eventContext;\n    this.__boundHandleEvent = (e) => this.handleEvent(e);\n  }\n\n  setValue(value: undefined|EventHandlerWithOptions): void {\n    this.__pendingValue = value;\n  }\n\n  commit() {\n    while (isDirective(this.__pendingValue)) {\n      const directive = this.__pendingValue;\n      this.__pendingValue = noChange as EventHandlerWithOptions;\n      directive(this);\n    }\n    if (this.__pendingValue === noChange) {\n      return;\n    }\n\n    const newListener = this.__pendingValue;\n    const oldListener = this.value;\n    const shouldRemoveListener = newListener == null ||\n        oldListener != null &&\n            (newListener.capture !== oldListener.capture ||\n             newListener.once !== oldListener.once ||\n             newListener.passive !== oldListener.passive);\n    const shouldAddListener =\n        newListener != null && (oldListener == null || shouldRemoveListener);\n\n    if (shouldRemoveListener) {\n      this.element.removeEventListener(\n          this.eventName, this.__boundHandleEvent, this.__options);\n    }\n    if (shouldAddListener) {\n      this.__options = getOptions(newListener);\n      this.element.addEventListener(\n          this.eventName, this.__boundHandleEvent, this.__options);\n    }\n    this.value = newListener;\n    this.__pendingValue = noChange as EventHandlerWithOptions;\n  }\n\n  handleEvent(event: Event) {\n    if (typeof this.value === 'function') {\n      this.value.call(this.eventContext || this.element, event);\n    } else {\n      (this.value as EventListenerObject).handleEvent(event);\n    }\n  }\n}\n\n// We copy options because of the inconsistent behavior of browsers when reading\n// the third argument of add/removeEventListener. IE11 doesn't support options\n// at all. Chrome 41 only reads `capture` if the argument is an object.\nconst getOptions = (o: AddEventListenerOptions|undefined) => o &&\n    (eventOptionsSupported ?\n         {capture: o.capture, passive: o.passive, once: o.once} :\n         o.capture as AddEventListenerOptions);\n", "/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {TemplateResult} from './template-result.js';\nimport {marker, Template} from './template.js';\n\n/**\n * A function type that creates a Template from a TemplateResult.\n *\n * This is a hook into the template-creation process for rendering that\n * requires some modification of templates before they're used, like ShadyCSS,\n * which must add classes to elements and remove styles.\n *\n * Templates should be cached as aggressively as possible, so that many\n * TemplateResults produced from the same expression only do the work of\n * creating the Template the first time.\n *\n * Templates are usually cached by TemplateResult.strings and\n * TemplateResult.type, but may be cached by other keys if this function\n * modifies the template.\n *\n * Note that currently TemplateFactories must not add, remove, or reorder\n * expressions, because there is no way to describe such a modification\n * to render() so that values are interpolated to the correct place in the\n * template instances.\n */\nexport type TemplateFactory = (result: TemplateResult) => Template;\n\n/**\n * The default TemplateFactory which caches Templates keyed on\n * result.type and result.strings.\n */\nexport function templateFactory(result: TemplateResult) {\n  let templateCache = templateCaches.get(result.type);\n  if (templateCache === undefined) {\n    templateCache = {\n      stringsArray: new WeakMap<TemplateStringsArray, Template>(),\n      keyString: new Map<string, Template>()\n    };\n    templateCaches.set(result.type, templateCache);\n  }\n\n  let template = templateCache.stringsArray.get(result.strings);\n  if (template !== undefined) {\n    return template;\n  }\n\n  // If the TemplateStringsArray is new, generate a key from the strings\n  // This key is shared between all templates with identical content\n  const key = result.strings.join(marker);\n\n  // Check if we already have a Template for this key\n  template = templateCache.keyString.get(key);\n  if (template === undefined) {\n    // If we have not seen this key before, create a new Template\n    template = new Template(result, result.getTemplateElement());\n    // Cache the Template for this key\n    templateCache.keyString.set(key, template);\n  }\n\n  // Cache all future queries for this TemplateStringsArray\n  templateCache.stringsArray.set(result.strings, template);\n  return template;\n}\n\n/**\n * The first argument to JS template tags retain identity across multiple\n * calls to a tag for the same literal, so we can cache work done per literal\n * in a Map.\n *\n * Safari currently has a bug which occasionally breaks this behavior, so we\n * need to cache the Template at two levels. We first cache the\n * TemplateStringsArray, and if that fails, we cache a key constructed by\n * joining the strings array.\n */\nexport interface TemplateCache {\n  readonly stringsArray: WeakMap<TemplateStringsArray, Template>;\n  readonly keyString: Map<string, Template>;\n}\n\nexport const templateCaches = new Map<string, TemplateCache>();\n", "/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {removeNodes} from './dom.js';\nimport {NodePart} from './parts.js';\nimport {RenderOptions} from './render-options.js';\nimport {templateFactory} from './template-factory.js';\n\nexport const parts = new WeakMap<Node, NodePart>();\n\n/**\n * Renders a template result or other value to a container.\n *\n * To update a container with new values, reevaluate the template literal and\n * call `render` with the new result.\n *\n * @param result Any value renderable by NodePart - typically a TemplateResult\n *     created by evaluating a template tag like `html` or `svg`.\n * @param container A DOM parent to render to. The entire contents are either\n *     replaced, or efficiently updated if the same result type was previous\n *     rendered there.\n * @param options RenderOptions for the entire render tree rendered to this\n *     container. Render options must *not* change between renders to the same\n *     container, as those changes will not effect previously rendered DOM.\n */\nexport const render =\n    (result: unknown,\n     container: Element|DocumentFragment,\n     options?: Partial<RenderOptions>) => {\n      let part = parts.get(container);\n      if (part === undefined) {\n        removeNodes(container, container.firstChild);\n        parts.set(container, part = new NodePart({\n                               templateFactory,\n                               ...options,\n                             }));\n        part.appendInto(container);\n      }\n      part.setValue(result);\n      part.commit();\n    };\n", "/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {Part} from './part.js';\nimport {AttributeCommitter, BooleanAttributePart, EventPart, NodePart, PropertyCommitter} from './parts.js';\nimport {RenderOptions} from './render-options.js';\nimport {TemplateProcessor} from './template-processor.js';\n\n/**\n * Creates Parts when a template is instantiated.\n */\nexport class DefaultTemplateProcessor implements TemplateProcessor {\n  /**\n   * Create parts for an attribute-position binding, given the event, attribute\n   * name, and string literals.\n   *\n   * @param element The element containing the binding\n   * @param name  The attribute name\n   * @param strings The string literals. There are always at least two strings,\n   *   event for fully-controlled bindings with a single expression.\n   */\n  handleAttributeExpressions(\n      element: Element, name: string, strings: string[],\n      options: RenderOptions): ReadonlyArray<Part> {\n    const prefix = name[0];\n    if (prefix === '.') {\n      const committer = new PropertyCommitter(element, name.slice(1), strings);\n      return committer.parts;\n    }\n    if (prefix === '@') {\n      return [new EventPart(element, name.slice(1), options.eventContext)];\n    }\n    if (prefix === '?') {\n      return [new BooleanAttributePart(element, name.slice(1), strings)];\n    }\n    const committer = new AttributeCommitter(element, name, strings);\n    return committer.parts;\n  }\n  /**\n   * Create parts for a text-position binding.\n   * @param templateFactory\n   */\n  handleTextExpression(options: RenderOptions) {\n    return new NodePart(options);\n  }\n}\n\nexport const defaultTemplateProcessor = new DefaultTemplateProcessor();\n", "/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/**\n *\n * Main lit-html module.\n *\n * Main exports:\n *\n * -  [[html]]\n * -  [[svg]]\n * -  [[render]]\n *\n * @packageDocumentation\n */\n\n/**\n * Do not remove this comment; it keeps typedoc from misplacing the module\n * docs.\n */\nimport {defaultTemplateProcessor} from './lib/default-template-processor.js';\nimport {SVGTemplateResult, TemplateResult} from './lib/template-result.js';\n\nexport {DefaultTemplateProcessor, defaultTemplateProcessor} from './lib/default-template-processor.js';\nexport {directive, DirectiveFn, isDirective} from './lib/directive.js';\n// TODO(justinfagnani): remove line when we get NodePart moving methods\nexport {removeNodes, reparentNodes} from './lib/dom.js';\nexport {noChange, nothing, Part} from './lib/part.js';\nexport {AttributeCommitter, AttributePart, BooleanAttributePart, EventPart, isIterable, isPrimitive, NodePart, PropertyCommitter, PropertyPart} from './lib/parts.js';\nexport {RenderOptions} from './lib/render-options.js';\nexport {parts, render} from './lib/render.js';\nexport {templateCaches, templateFactory} from './lib/template-factory.js';\nexport {TemplateInstance} from './lib/template-instance.js';\nexport {TemplateProcessor} from './lib/template-processor.js';\nexport {SVGTemplateResult, TemplateResult} from './lib/template-result.js';\nexport {createMarker, isTemplatePartActive, Template} from './lib/template.js';\n\ndeclare global {\n  interface Window {\n    litHtmlVersions: string[];\n  }\n}\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for lit-html usage.\n// TODO(justinfagnani): inject version number at build time\nif (typeof window !== 'undefined') {\n  (window['litHtmlVersions'] || (window['litHtmlVersions'] = [])).push('1.4.1');\n}\n\n/**\n * Interprets a template literal as an HTML template that can efficiently\n * render to and update a container.\n */\nexport const html = (strings: TemplateStringsArray, ...values: unknown[]) =>\n    new TemplateResult(strings, values, 'html', defaultTemplateProcessor);\n\n/**\n * Interprets a template literal as an SVG template that can efficiently\n * render to and update a container.\n */\nexport const svg = (strings: TemplateStringsArray, ...values: unknown[]) =>\n    new SVGTemplateResult(strings, values, 'svg', defaultTemplateProcessor);\n", "/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * Module to add shady DOM/shady CSS polyfill support to lit-html template\n * rendering. See the [[render]] method for details.\n *\n * @packageDocumentation\n */\n\n/**\n * Do not remove this comment; it keeps typedoc from misplacing the module\n * docs.\n */\nimport {removeNodes} from './dom.js';\nimport {insertNodeIntoTemplate, removeNodesFromTemplate} from './modify-template.js';\nimport {RenderOptions} from './render-options.js';\nimport {parts, render as litRender} from './render.js';\nimport {templateCaches} from './template-factory.js';\nimport {TemplateInstance} from './template-instance.js';\nimport {TemplateResult} from './template-result.js';\nimport {marker, Template} from './template.js';\n\nexport {html, svg, TemplateResult} from '../lit-html.js';\n\n// Get a key to lookup in `templateCaches`.\nconst getTemplateCacheKey = (type: string, scopeName: string) =>\n    `${type}--${scopeName}`;\n\nlet compatibleShadyCSSVersion = true;\n\nif (typeof window.ShadyCSS === 'undefined') {\n  compatibleShadyCSSVersion = false;\n} else if (typeof window.ShadyCSS.prepareTemplateDom === 'undefined') {\n  console.warn(\n      `Incompatible ShadyCSS version detected. ` +\n      `Please update to at least @webcomponents/webcomponentsjs@2.0.2 and ` +\n      `@webcomponents/shadycss@1.3.1.`);\n  compatibleShadyCSSVersion = false;\n}\n\n/**\n * Template factory which scopes template DOM using ShadyCSS.\n * @param scopeName {string}\n */\nexport const shadyTemplateFactory = (scopeName: string) =>\n    (result: TemplateResult) => {\n      const cacheKey = getTemplateCacheKey(result.type, scopeName);\n      let templateCache = templateCaches.get(cacheKey);\n      if (templateCache === undefined) {\n        templateCache = {\n          stringsArray: new WeakMap<TemplateStringsArray, Template>(),\n          keyString: new Map<string, Template>()\n        };\n        templateCaches.set(cacheKey, templateCache);\n      }\n\n      let template = templateCache.stringsArray.get(result.strings);\n      if (template !== undefined) {\n        return template;\n      }\n\n      const key = result.strings.join(marker);\n      template = templateCache.keyString.get(key);\n      if (template === undefined) {\n        const element = result.getTemplateElement();\n        if (compatibleShadyCSSVersion) {\n          window.ShadyCSS!.prepareTemplateDom(element, scopeName);\n        }\n        template = new Template(result, element);\n        templateCache.keyString.set(key, template);\n      }\n      templateCache.stringsArray.set(result.strings, template);\n      return template;\n    };\n\nconst TEMPLATE_TYPES = ['html', 'svg'];\n\n/**\n * Removes all style elements from Templates for the given scopeName.\n */\nconst removeStylesFromLitTemplates = (scopeName: string) => {\n  TEMPLATE_TYPES.forEach((type) => {\n    const templates = templateCaches.get(getTemplateCacheKey(type, scopeName));\n    if (templates !== undefined) {\n      templates.keyString.forEach((template) => {\n        const {element: {content}} = template;\n        // IE 11 doesn't support the iterable param Set constructor\n        const styles = new Set<Element>();\n        Array.from(content.querySelectorAll('style')).forEach((s: Element) => {\n          styles.add(s);\n        });\n        removeNodesFromTemplate(template, styles);\n      });\n    }\n  });\n};\n\nconst shadyRenderSet = new Set<string>();\n\n/**\n * For the given scope name, ensures that ShadyCSS style scoping is performed.\n * This is done just once per scope name so the fragment and template cannot\n * be modified.\n * (1) extracts styles from the rendered fragment and hands them to ShadyCSS\n * to be scoped and appended to the document\n * (2) removes style elements from all lit-html Templates for this scope name.\n *\n * Note, <style> elements can only be placed into templates for the\n * initial rendering of the scope. If <style> elements are included in templates\n * dynamically rendered to the scope (after the first scope render), they will\n * not be scoped and the <style> will be left in the template and rendered\n * output.\n */\nconst prepareTemplateStyles =\n    (scopeName: string, renderedDOM: DocumentFragment, template?: Template) => {\n      shadyRenderSet.add(scopeName);\n      // If `renderedDOM` is stamped from a Template, then we need to edit that\n      // Template's underlying template element. Otherwise, we create one here\n      // to give to ShadyCSS, which still requires one while scoping.\n      const templateElement =\n          !!template ? template.element : document.createElement('template');\n      // Move styles out of rendered DOM and store.\n      const styles = renderedDOM.querySelectorAll('style');\n      const {length} = styles;\n      // If there are no styles, skip unnecessary work\n      if (length === 0) {\n        // Ensure prepareTemplateStyles is called to support adding\n        // styles via `prepareAdoptedCssText` since that requires that\n        // `prepareTemplateStyles` is called.\n        //\n        // ShadyCSS will only update styles containing @apply in the template\n        // given to `prepareTemplateStyles`. If no lit Template was given,\n        // ShadyCSS will not be able to update uses of @apply in any relevant\n        // template. However, this is not a problem because we only create the\n        // template for the purpose of supporting `prepareAdoptedCssText`,\n        // which doesn't support @apply at all.\n        window.ShadyCSS!.prepareTemplateStyles(templateElement, scopeName);\n        return;\n      }\n      const condensedStyle = document.createElement('style');\n      // Collect styles into a single style. This helps us make sure ShadyCSS\n      // manipulations will not prevent us from being able to fix up template\n      // part indices.\n      // NOTE: collecting styles is inefficient for browsers but ShadyCSS\n      // currently does this anyway. When it does not, this should be changed.\n      for (let i = 0; i < length; i++) {\n        const style = styles[i];\n        style.parentNode!.removeChild(style);\n        condensedStyle.textContent! += style.textContent;\n      }\n      // Remove styles from nested templates in this scope.\n      removeStylesFromLitTemplates(scopeName);\n      // And then put the condensed style into the \"root\" template passed in as\n      // `template`.\n      const content = templateElement.content;\n      if (!!template) {\n        insertNodeIntoTemplate(template, condensedStyle, content.firstChild);\n      } else {\n        content.insertBefore(condensedStyle, content.firstChild);\n      }\n      // Note, it's important that ShadyCSS gets the template that `lit-html`\n      // will actually render so that it can update the style inside when\n      // needed (e.g. @apply native Shadow DOM case).\n      window.ShadyCSS!.prepareTemplateStyles(templateElement, scopeName);\n      const style = content.querySelector('style');\n      if (window.ShadyCSS!.nativeShadow && style !== null) {\n        // When in native Shadow DOM, ensure the style created by ShadyCSS is\n        // included in initially rendered output (`renderedDOM`).\n        renderedDOM.insertBefore(style.cloneNode(true), renderedDOM.firstChild);\n      } else if (!!template) {\n        // When no style is left in the template, parts will be broken as a\n        // result. To fix this, we put back the style node ShadyCSS removed\n        // and then tell lit to remove that node from the template.\n        // There can be no style in the template in 2 cases (1) when Shady DOM\n        // is in use, ShadyCSS removes all styles, (2) when native Shadow DOM\n        // is in use ShadyCSS removes the style if it contains no content.\n        // NOTE, ShadyCSS creates its own style so we can safely add/remove\n        // `condensedStyle` here.\n        content.insertBefore(condensedStyle, content.firstChild);\n        const removes = new Set<Node>();\n        removes.add(condensedStyle);\n        removeNodesFromTemplate(template, removes);\n      }\n    };\n\nexport interface ShadyRenderOptions extends Partial<RenderOptions> {\n  scopeName: string;\n}\n\n/**\n * Extension to the standard `render` method which supports rendering\n * to ShadowRoots when the ShadyDOM (https://github.com/webcomponents/shadydom)\n * and ShadyCSS (https://github.com/webcomponents/shadycss) polyfills are used\n * or when the webcomponentsjs\n * (https://github.com/webcomponents/webcomponentsjs) polyfill is used.\n *\n * Adds a `scopeName` option which is used to scope element DOM and stylesheets\n * when native ShadowDOM is unavailable. The `scopeName` will be added to\n * the class attribute of all rendered DOM. In addition, any style elements will\n * be automatically re-written with this `scopeName` selector and moved out\n * of the rendered DOM and into the document `<head>`.\n *\n * It is common to use this render method in conjunction with a custom element\n * which renders a shadowRoot. When this is done, typically the element's\n * `localName` should be used as the `scopeName`.\n *\n * In addition to DOM scoping, ShadyCSS also supports a basic shim for css\n * custom properties (needed only on older browsers like IE11) and a shim for\n * a deprecated feature called `@apply` that supports applying a set of css\n * custom properties to a given location.\n *\n * Usage considerations:\n *\n * * Part values in `<style>` elements are only applied the first time a given\n * `scopeName` renders. Subsequent changes to parts in style elements will have\n * no effect. Because of this, parts in style elements should only be used for\n * values that will never change, for example parts that set scope-wide theme\n * values or parts which render shared style elements.\n *\n * * Note, due to a limitation of the ShadyDOM polyfill, rendering in a\n * custom element's `constructor` is not supported. Instead rendering should\n * either done asynchronously, for example at microtask timing (for example\n * `Promise.resolve()`), or be deferred until the first time the element's\n * `connectedCallback` runs.\n *\n * Usage considerations when using shimmed custom properties or `@apply`:\n *\n * * Whenever any dynamic changes are made which affect\n * css custom properties, `ShadyCSS.styleElement(element)` must be called\n * to update the element. There are two cases when this is needed:\n * (1) the element is connected to a new parent, (2) a class is added to the\n * element that causes it to match different custom properties.\n * To address the first case when rendering a custom element, `styleElement`\n * should be called in the element's `connectedCallback`.\n *\n * * Shimmed custom properties may only be defined either for an entire\n * shadowRoot (for example, in a `:host` rule) or via a rule that directly\n * matches an element with a shadowRoot. In other words, instead of flowing from\n * parent to child as do native css custom properties, shimmed custom properties\n * flow only from shadowRoots to nested shadowRoots.\n *\n * * When using `@apply` mixing css shorthand property names with\n * non-shorthand names (for example `border` and `border-width`) is not\n * supported.\n */\nexport const render =\n    (result: unknown,\n     container: Element|DocumentFragment|ShadowRoot,\n     options: ShadyRenderOptions) => {\n      if (!options || typeof options !== 'object' || !options.scopeName) {\n        throw new Error('The `scopeName` option is required.');\n      }\n      const scopeName = options.scopeName;\n      const hasRendered = parts.has(container);\n      const needsScoping = compatibleShadyCSSVersion &&\n          container.nodeType === 11 /* Node.DOCUMENT_FRAGMENT_NODE */ &&\n          !!(container as ShadowRoot).host;\n      // Handle first render to a scope specially...\n      const firstScopeRender = needsScoping && !shadyRenderSet.has(scopeName);\n      // On first scope render, render into a fragment; this cannot be a single\n      // fragment that is reused since nested renders can occur synchronously.\n      const renderContainer =\n          firstScopeRender ? document.createDocumentFragment() : container;\n      litRender(\n          result,\n          renderContainer,\n          {templateFactory: shadyTemplateFactory(scopeName), ...options} as\n              RenderOptions);\n      // When performing first scope render,\n      // (1) We've rendered into a fragment so that there's a chance to\n      // `prepareTemplateStyles` before sub-elements hit the DOM\n      // (which might cause them to render based on a common pattern of\n      // rendering in a custom element's `connectedCallback`);\n      // (2) Scope the template with ShadyCSS one time only for this scope.\n      // (3) Render the fragment into the container and make sure the\n      // container knows its `part` is the one we just rendered. This ensures\n      // DOM will be re-used on subsequent renders.\n      if (firstScopeRender) {\n        const part = parts.get(renderContainer)!;\n        parts.delete(renderContainer);\n        // ShadyCSS might have style sheets (e.g. from `prepareAdoptedCssText`)\n        // that should apply to `renderContainer` even if the rendered value is\n        // not a TemplateInstance. However, it will only insert scoped styles\n        // into the document if `prepareTemplateStyles` has already been called\n        // for the given scope name.\n        const template = part.value instanceof TemplateInstance ?\n            part.value.template :\n            undefined;\n        prepareTemplateStyles(\n            scopeName, renderContainer as DocumentFragment, template);\n        removeNodes(container, container.firstChild);\n        container.appendChild(renderContainer);\n        parts.set(container, part);\n      }\n      // After elements have hit the DOM, update styling if this is the\n      // initial render to this container.\n      // This is needed whenever dynamic changes are made so it would be\n      // safest to do every render; however, this would regress performance\n      // so we leave it up to the user to call `ShadyCSS.styleElement`\n      // for dynamic changes.\n      if (!hasRendered && needsScoping) {\n        window.ShadyCSS!.styleElement((container as ShadowRoot).host);\n      }\n    };\n", "/**\n * @license\n * MIT License\n *\n * Copyright (c) 2019 Goffert van Gool\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { render } from '../../lit-html/lib/shady-render.js';\nexport { html } from '../../lit-html/lib/shady-render.js';\n\n// Key to store the HTML tag in a custom element class\nconst TAG = Symbol('tag');\n\n// Key to store render status in a custom element instance\nconst NEEDSRENDER = Symbol('needsRender');\n\n// Transforms a camelCased string into a kebab-cased string\nconst camelToKebab = camel => camel.replace(/([a-z](?=[A-Z]))|([A-Z](?=[A-Z][a-z]))/g, '$1$2-').toLowerCase();\n\n// Creates an ID cache in the `$` property of a custom element instance\nconst createIdCache = element => {\n  element.$ = {};\n  element.renderRoot.querySelectorAll('[id]').forEach(node => {\n    element.$[node.id] = node;\n  });\n};\n\n/**\n * A lightweight base class for custom elements\n *\n * Features:\n *\n *  - Determines an appropriate HTML tagname based on an element's class name\n *  - Efficient rendering engine using lit-html (https://github.com/Polymer/lit-html)\n *  - Creates a cache for descendant nodes with an `id` in the `$` property\n */\nexport class GluonElement extends HTMLElement {\n  constructor() {\n    super();\n    this.renderRoot = this.createRenderRoot();\n\n    // This ensures that any properties that are set prior to upgrading this element\n    // have their instance setters called\n    Object.getOwnPropertyNames(this).forEach(property => {\n      const propertyValue = this[property];\n      delete this[property];\n      this[property] = propertyValue;\n    });\n  }\n\n  /**\n   * Returns an open shadowRoot as the default rendering root\n   *\n   * Override this method to provide an alternative rendering root\n   * For example, return `this` to render the template as childNodes\n   */\n  createRenderRoot() {\n    return this.attachShadow({ mode: 'open' });\n  }\n\n  /**\n   * Returns the HTML tagname for elements of this class\n   *\n   * It defaults to the kebab-cased version of the class name. To override,\n   * defined a `static get is()` property on your custom element class, and return\n   * whatever string you want to use for the HTML tagname\n   */\n  static get is() {\n    return (this.hasOwnProperty(TAG) && this[TAG]) || (this[TAG] = camelToKebab(this.name));\n  }\n\n  /**\n   * Called when an element is connected to the DOM\n   *\n   * When an element has a `template`, attach a shadowRoot to the element,\n   * and render the template. Once the template is rendered, creates an ID cache\n   * in the `$` property\n   *\n   * When adding a `connectedCallback` to your custom element, you should call\n   * `super.connectedCallback()` before doing anything other than actions\n   * that alter the result of the template rendering.\n   */\n  connectedCallback() {\n    if ('template' in this) {\n      this.render({ sync: true });\n      createIdCache(this);\n    }\n  }\n\n  /**\n   * Renders the template for this element into the shadowRoot\n   *\n   * @param { sync }: perform a synchronous (blocking) render. The default render\n   *     is asynchronous, and multiple calls to `render()` are batched by default\n   *\n   * @returns a Promise that resolves once template has been rendered\n   */\n  async render({ sync = false } = {}) {\n    this[NEEDSRENDER] = true;\n    if (!sync) {\n      await 0;\n    }\n    if (this[NEEDSRENDER]) {\n      this[NEEDSRENDER] = false;\n      render(this.template, this.renderRoot, { scopeName: this.constructor.is, eventContext: this });\n    }\n  }\n}\n", "const appliedClassMixins = new WeakMap();\n\n/** Vefify if the Mixin was previously applyed\n * @private\n * @param {function} mixin      Mixin being applyed\n * @param {object} superClass   Class receiving the new mixin\n * @returns {boolean}\n */\nfunction wasMixinPreviouslyApplied(mixin, superClass) {\n  let klass = superClass;\n  while (klass) {\n    if (appliedClassMixins.get(klass) === mixin) {\n      return true;\n    }\n    klass = Object.getPrototypeOf(klass);\n  }\n  return false;\n}\n\n/** Apply each mixin in the chain to make sure they are not applied more than once to the final class.\n * @export\n * @param {function} mixin      Mixin to be applyed\n * @returns {object}            Mixed class with mixin applied\n */\nexport function dedupeMixin(mixin) {\n  return superClass => {\n    if (wasMixinPreviouslyApplied(mixin, superClass)) {\n      return superClass;\n    }\n    const mixedClass = mixin(superClass);\n    appliedClassMixins.set(mixedClass, mixin);\n    return mixedClass;\n  };\n}\n", "import type { ReactiveElement, ReactiveControllerHost } from '@lit/reactive-element';\nimport type { ApolloController, ApolloControllerOptions } from './apollo-controller.js';\n\ntype O = ApolloControllerOptions<any, any>; // eslint-disable-line @typescript-eslint/no-explicit-any\ntype Key = string|number|symbol;\n\n/* eslint-disable @typescript-eslint/ban-types */\ntype AnyObj = object;\n/* eslint-enable @typescript-eslint/ban-types */\n\nconst initialProps = new WeakMap<AnyObj, Map<Key, unknown>>();\n\nexport function getInitialProps<T extends AnyObj>(\n  obj: T,\n): Map<keyof T, T[keyof T]> {\n  if (!initialProps.has(obj))\n    initialProps.set(obj, new Map());\n  return initialProps.get(obj) as Map<keyof T, T[keyof T]>;\n}\n\nexport function getInitialProp<T extends AnyObj>(obj: T, key: keyof T): T[keyof T] | undefined {\n  return getInitialProps(obj).get(key);\n}\n\nexport function setInitialProps<T extends AnyObj>(obj: T): void {\n  getInitialProps(obj).forEach((val, key) => obj[key] ??= val);\n}\n\nexport function setInitialProp<T extends AnyObj>(obj: T, key: keyof T, value: T[keyof T]): void {\n  getInitialProps(obj).set(key, value);\n}\n\nexport interface DefineOptions {\n  /** When set to 'options', the controlled property is a member of controller.options */\n  path?: 'options',\n  /** When true, setting the property has no effect */\n  readonly?: boolean,\n  /** Called after setting with the new value */\n  onSet?(x: unknown): void,\n}\n\nfunction defineOnReactiveElement<T extends ReactiveElement & {\n  controller: ApolloController;\n}>(\n  proto: T,\n  name: string & keyof T,\n  opts: DefineOptions\n): void {\n  // Run our property effects\n  defineOnHTMLElement(proto, name, {\n    ...opts,\n    // In addition to any user-defined side-effects,\n    // also notify the ReactiveElement lifecycle\n    onSet(this: T, x: unknown) {\n      const old = this[name];\n      opts?.onSet?.call?.(this, x);/* c8 ignore next */\n      this.requestUpdate(name, old);\n    },\n  });\n  // And also run ReactiveElement's property effects\n  const Class = proto.constructor as typeof ReactiveElement;\n  // @ts-expect-error: i know it's protected\n  Class.createProperty(name, Class.getPropertyOptions(name));\n}\n\nfunction defineOnHTMLElement<T extends HTMLElement & ReactiveControllerHost & {\n  controller: ApolloController;\n  requestUpdate(name?: string, old?: unknown): void;\n}>(\n  proto: T,\n  name: string & keyof T,\n  opts: DefineOptions\n): void {\n  Object.defineProperty(proto, name, {\n    configurable: true,\n    get(this: T) {\n      if (opts.path) { /* c8 ignore next */\n        return (\n            !this.controller ? getInitialProp(this, name)/* c8 ignore next */\n          : this.controller[opts.path][name as keyof O]\n        );\n      } else {\n        return (\n            !this.controller ? getInitialProp(this, name)/* c8 ignore next */\n          : this.controller[name as keyof ApolloController]\n        );\n      }\n    },\n\n    set(this: T, value: T[keyof T]) {\n      if (opts.readonly) return;/* c8 ignore next */\n      const old = this[name as keyof T];\n      if (!this.controller)\n        setInitialProp(this, name, value);/* c8 ignore next */\n      else {\n        if (opts.path)\n          this.controller[opts.path][name as keyof O] = value as O[keyof O];\n        else\n          this.controller[name as keyof ApolloController] = value as any; // eslint-disable-line @typescript-eslint/no-explicit-any\n        if (opts.onSet)\n          opts.onSet.call(this, value);/* c8 ignore next */\n      }\n      this.requestUpdate?.(name, old);\n    },\n  });\n}\n\nfunction isReactiveElement(\n  proto: HTMLElement\n): proto is ReactiveElement {\n  return typeof (proto.constructor as typeof ReactiveElement).createProperty === 'function';\n}\n\n/**\n * @summary Class field decorator for controlled properties\n *\n * Controlled properties are element class fields which defer to and reflect that property on the element's `controller` property, which is a `ReactiveController`.\n *\n * @param  options Options for the controlled field\n */\nexport function controlled(options: DefineOptions = {}) {\n  return function<T extends HTMLElement & ReactiveControllerHost & {\n  controller: ApolloController;\n}>(\n    proto: T,\n    name: string & keyof T\n  ): void {\n    if (isReactiveElement(proto))\n      defineOnReactiveElement(proto, name, options);/* c8 ignore next */\n    else\n      defineOnHTMLElement(proto, name, options);/* c8 ignore next */\n  };\n}\n", "import type { ReactiveController, ReactiveControllerHost } from '@lit/reactive-element';\nimport type { Constructor, CustomElement } from '@apollo-elements/core/types';\nimport type { ControllerHost } from '@apollo-elements/core/types';\n\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\n\nimport { setInitialProps } from '@apollo-elements/core/decorators';\n\nconst INITIALIZED = new WeakMap();\n\nconst microtask = Promise.resolve();\n\nfunction ControllerHostMixinImpl<T extends Constructor<CustomElement>>(\n  superclass: T\n): T & Constructor<ControllerHost> {\n  class ControllerHostElement extends superclass implements ReactiveControllerHost {\n    #controllers = new Set<ReactiveController>();\n\n    #updatePending = false;\n\n    #resolve!: (v: boolean) => void;\n\n    #updateComplete = new Promise(r => {\n      this.#resolve = r;\n    });\n\n    get updateComplete(): Promise<boolean> {\n      // @ts-expect-error: superclass may or may not have it\n      return super.updateComplete ??\n        this.#updateComplete;\n    }\n\n    constructor(...args: any[]) {\n      super(...args);\n      INITIALIZED.set(this, true);\n      this.requestUpdate();\n    }\n\n    private async doUpdate() {\n      this.#updatePending = true;\n      await this.#updateComplete;\n      this.update();\n      this.#updateComplete = new Promise(r => { this.#resolve = r; });\n      microtask.then(() => this.updated());\n    }\n\n    connectedCallback() {\n      // assign props that were set before initialization finished\n      setInitialProps(this);\n      super.connectedCallback?.();/* c8 ignore next */\n      // @ts-expect-error: superclass may or may not have it\n      if (typeof super.addController !== 'function')\n        this.#controllers.forEach(c => c.hostConnected?.());\n      this.#resolve(true);\n    }\n\n    addController(controller: ReactiveController): void {\n      // @ts-expect-error: superclass may or may not have it\n      if (typeof super.addController === 'function') super.addController(controller);/* c8 ignore next */\n      else\n        this.#controllers.add(controller);\n    }\n\n    removeController(controller: ReactiveController): void {\n      // @ts-expect-error: superclass may or may not have it\n      if (typeof super.removeController === 'function') super.removeController(controller);\n      else\n        this.#controllers.delete(controller);\n    }\n\n    requestUpdate(): void {\n      if (!INITIALIZED.get(this)) return;/* c8 ignore next */\n      // @ts-expect-error: superclass may or may not have it\n      if (typeof super.requestUpdate === 'function') return super.requestUpdate();/* c8 ignore next */\n      if (!this.#updatePending)\n        this.doUpdate();\n    }\n\n    update(...args: any[]) {\n      // @ts-expect-error: superclass may or may not have it\n      if (typeof super.update === 'function') super.update(...args);/* c8 ignore next */\n      else\n        this.#controllers.forEach(c => c.hostUpdate?.());/* c8 ignore next */\n    }\n\n    updated(...args: any[]) {\n      // @ts-expect-error: superclass may or may not have it\n      if (typeof super.updated === 'function') super.updated(...args);/* c8 ignore next */\n      else {\n        this.#updatePending = false;\n        this.#controllers.forEach(c => c.hostUpdated?.());/* c8 ignore next */\n        this.#resolve(this.#updatePending);\n      }\n    }\n\n    disconnectedCallback() {\n      super.disconnectedCallback?.();/* c8 ignore next */\n      // @ts-expect-error: superclass may or may not have it\n      if (typeof super.removeController !== 'function')\n        this.#controllers.forEach(c => c.hostDisconnected?.());\n    }\n  }\n\n  return ControllerHostElement as unknown as T & Constructor<ControllerHost>;\n}\n\nexport const ControllerHostMixin =\n  dedupeMixin(ControllerHostMixinImpl);\n", "import type { ApolloController } from './apollo-controller.js';\nimport type { Data } from '@apollo-elements/core/types';\nimport type {\n  ApolloClient,\n  ApolloError,\n  ApolloQueryResult,\n  FetchResult,\n  NormalizedCacheObject,\n} from '@apollo/client/core';\n\ntype ApolloEventType = `apollo-${'controller'|'element'}-${'connected'|'disconnected'}`;\ntype ApolloElementEventType = `apollo-element-${'disconnected'|'connected'}`;\ntype ApolloControllerEventType = `apollo-controller-${'disconnected'|'connected'}`;\n\ninterface ApolloControllerHost extends HTMLElement {\n  controller: ApolloController;\n}\n\nexport type ApolloQueryResultEvent<TData = unknown> =\n  CustomEvent<ApolloQueryResult<TData>>;\n\nexport type ApolloMutationResultEvent<TData = unknown> =\n  CustomEvent<FetchResult<TData>>;\n\nexport type ApolloSubscriptionResultEvent<D = unknown> = CustomEvent<{\n  client: ApolloClient<NormalizedCacheObject>;\n  subscriptionData: {\n    data: Data<D> | null;\n    loading: boolean;\n    error: null;\n  };\n}>;\n\nexport abstract class ApolloEvent<T = ApolloControllerHost> extends CustomEvent<T> {\n  public abstract type: ApolloEventType\n  public declare controller?: ApolloController;\n  constructor(type: ApolloEventType, options?: CustomEventInit) {\n    super(type, { ...options, bubbles: true, composed: true });\n  }\n}\n\n/**\n * @summary Fired when an ApolloElement connects to or disconnects from the DOM\n */\nexport class ApolloElementEvent<T = ApolloControllerHost> extends ApolloEvent<T> {\n  public declare static type: ApolloElementEventType;\n  public declare type: ApolloElementEventType;\n  constructor(type: ApolloElementEventType, detail: T) {\n    super(type, { detail });\n  }\n}\n\nexport abstract class ApolloControllerEvent extends ApolloEvent {\n  public abstract controller: ApolloController;\n  public abstract type: ApolloControllerEventType\n  constructor(type: ApolloControllerEventType) {\n    super(type);\n  }\n}\n\n/**\n * @summary Fired when a controlled element connects to the DOM\n */\nexport class ApolloControllerConnectedEvent extends ApolloControllerEvent {\n  public static type = 'apollo-controller-connected' as const;\n  public declare type: 'apollo-controller-connected';\n  constructor(public controller: ApolloController) {\n    super(ApolloControllerConnectedEvent.type);\n  }\n}\n\n/**\n * @summary Fired when a controlled element disconnects from the DOM\n */\nexport class ApolloControllerDisconnectedEvent extends ApolloControllerEvent {\n  public static type = 'apollo-controller-disconnected' as const;\n  public declare type: 'apollo-controller-disconnected';\n  constructor(public controller: ApolloController) {\n    super(ApolloControllerDisconnectedEvent.type);\n  }\n}\n\ndeclare global {\n  interface HTMLElementEventMap {\n    'apollo-controller-connected': ApolloControllerConnectedEvent;\n    'apollo-controller-disconnected': ApolloControllerDisconnectedEvent;\n    'apollo-element-connected': ApolloElementEvent;\n    'apollo-element-disconnected': ApolloElementEvent;\n    'apollo-error': CustomEvent<ApolloError>;\n    'apollo-mutation-result': ApolloMutationResultEvent;\n    'apollo-query-result': ApolloQueryResultEvent;\n    'apollo-subscription-result': ApolloSubscriptionResultEvent;\n  }\n\n  interface WindowEventMap {\n    'apollo-element-disconnected': ApolloElementEvent;\n    'apollo-controller-disconnected': ApolloControllerDisconnectedEvent;\n  }\n}\n", "import type {\n  ApolloClient,\n  ApolloError,\n  ErrorPolicy,\n  NormalizedCacheObject,\n} from '@apollo/client/core';\n\nimport type {\n  ComponentDocument,\n  Constructor,\n  Data,\n  GraphQLError,\n  MaybeTDN,\n  MaybeVariables,\n  Variables,\n} from '@apollo-elements/core/types';\n\nimport type { ApolloController, ApolloElementElement } from '@apollo-elements/core';\n\nimport { ControllerHostMixin } from './controller-host-mixin.js';\n\nimport { controlled } from '@apollo-elements/core/decorators';\nimport { ApolloElementEvent } from '@apollo-elements/core/events';\n\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\n\ntype MixinInstance<B extends Constructor<HTMLElement>> = B & {\n  new <D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>():\n    ApolloElementElement<D, V>;\n  documentType: 'document'|'mutation'|'query'|'subscription';\n  observedAttributes?: string[];\n}\n\nfunction ApolloElementMixinImplementation<B extends Constructor & {\n  observedAttributes?: string[]\n}>(\n  superclass: B\n): MixinInstance<B> {\n  class ApolloElement<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>\n    extends ControllerHostMixin(superclass) {\n    static documentType: 'document'|'query'|'mutation'|'subscription' = 'document';\n\n    static get observedAttributes(): string[] {\n      return [\n        ...super.observedAttributes ?? [], /* c8 ignore next */ // covered\n        'error-policy',\n        'fetch-policy',\n      ];\n    }\n\n    /** @summary The Apollo Client instance. */\n    @controlled()\n    client: ApolloClient<NormalizedCacheObject> | null = window.__APOLLO_CLIENT__ ?? null; /* c8 ignore next */ // covered\n\n    declare controller: ApolloController<D, V>;\n\n    /**\n     * @summary Operation document.\n     * A GraphQL document containing a single query, mutation, or subscription.\n     * You can set it as a JavaScript property or by appending a GraphQL script to the element (light DOM).\n     */\n    @controlled() document: ComponentDocument<D> | null = null;\n\n    /** @summary Latest data */\n    @controlled() data: Data<D> | null = null;\n\n    /**\n     * @summary Operation variables.\n     * An object that maps from the name of a variable as used in the operation's GraphQL document to that variable's value.\n     */\n    @controlled() variables: Variables<D, V> | null = null;\n\n    /** @summary Latest error. */\n    @controlled() error: Error | ApolloError | null = null;\n\n    /** @summary Latest errors. */\n    @controlled() errors: readonly GraphQLError[] = [];\n\n    /** @summary Whether a request is in-flight. */\n    @controlled() loading = false;\n\n    /** @summary Fetch Policy for the operation. */\n    @controlled({ path: 'options' }) fetchPolicy?: string;\n\n    /** @summary Context passed to the link execution chain. */\n    @controlled({ path: 'options' }) context?: Record<string, unknown>;\n\n    /**\n     * errorPolicy determines the level of events for errors in the execution result. The options are:\n     * - `none` (default): any errors from the request are treated like runtime errors and the observable is stopped (XXX this is default to lower breaking changes going from AC 1.0 => 2.0)\n     * - `ignore`: errors from the request do not stop the observable, but also don't call `next`\n     * - `all`: errors are treated like data and will notify observables\n     * @summary [Error Policy](https://www.apollographql.com/docs/react/api/core/ApolloClient/#ErrorPolicy) for the operation.\n     * @attr error-policy\n     */\n    @controlled({ path: 'options' }) errorPolicy?: ErrorPolicy;\n\n    /** @summary True when the element is connected and ready to receive its GraphQL document */\n    public readyToReceiveDocument = false;\n\n    constructor(...a: any[]) {\n      super(...a);\n      this.requestUpdate();\n    }\n\n    attributeChangedCallback(name: string, oldVal: string, newVal: string): void {\n      type ThisPolicy = `${'error'|'fetch'}Policy`;\n      /* c8 ignore start */ // covered\n      switch (name) {\n        case 'error-policy':\n        case 'fetch-policy': {\n          const prop =\n            name.replace(/-(.)/g, (_, g1) => g1.toUpperCase()) as ThisPolicy;\n          if (this[prop] !== newVal)\n            this[prop] = newVal as this['errorPolicy'];\n        }\n      }\n      super.attributeChangedCallback?.(name, oldVal, newVal);\n      /* c8 ignore stop */\n    }\n\n    connectedCallback(): void {\n      this.readyToReceiveDocument = true;\n      super.connectedCallback();\n      this.dispatchEvent(new ApolloElementEvent('apollo-element-connected', this));\n    }\n\n    disconnectedCallback(): void {\n      this.dispatchEvent(new ApolloElementEvent('apollo-element-disconnected', this));\n      window.dispatchEvent(new ApolloElementEvent('apollo-element-disconnected', this));\n      super.disconnectedCallback?.(); /* c8 ignore start */ // manual testing showed that both cases were hit\n    }\n\n    /**\n     * Lifecycle callback that reacts to changes in the GraphQL document.\n     * @param document The GraphQL document.\n     */\n    protected documentChanged?(document: this['document']): void\n\n    /**\n     * Lifecycle callback that reacts to changes in the operation variables.\n     * @param variables The variables.\n     */\n    protected variablesChanged?(variables: this['variables']): void\n  }\n\n  return ApolloElement as unknown as MixinInstance<B>;\n}\n\n/**\n * `ApolloElementMixin`: class mixin for apollo custom elements.\n */\nexport const ApolloElementMixin =\n  dedupeMixin(ApolloElementMixinImplementation);\n", "import type {\n  Constructor,\n  Data,\n  MaybeTDN,\n  MaybeVariables,\n  Variables,\n} from '@apollo-elements/core/types';\n\nimport { GluonElement } from '@gluon/gluon';\nimport { ApolloElementMixin } from '@apollo-elements/mixins/apollo-element-mixin';\n\nexport { html } from '@gluon/gluon';\n\n/**\n * `ApolloElement`\n *\n * \uD83D\uDE80 Custom element base class for apollo gluon elements.\n *\n * See [`ApolloElementInterface`](https://apolloelements.dev/api/core/interfaces/element) for more information on events\n *\n * @element\n */\nexport class ApolloElement<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>\n  extends ApolloElementMixin(GluonElement as Constructor<GluonElement>)<D, V> {\n  declare context?: Record<string, unknown>;\n\n  declare variables: Variables<D, V> | null;\n\n  declare data: Data<D> | null;\n\n  update(): void {\n    this.render().then(() => super.update());\n  }\n\n  get updateComplete(): Promise<boolean> {\n    return this.render().then(() => true);\n  }\n}\n", "import tslib from '../tslib.js';\r\nconst {\r\n    __extends,\r\n    __assign,\r\n    __rest,\r\n    __decorate,\r\n    __param,\r\n    __metadata,\r\n    __awaiter,\r\n    __generator,\r\n    __exportStar,\r\n    __createBinding,\r\n    __values,\r\n    __read,\r\n    __spread,\r\n    __spreadArrays,\r\n    __spreadArray,\r\n    __await,\r\n    __asyncGenerator,\r\n    __asyncDelegator,\r\n    __asyncValues,\r\n    __makeTemplateObject,\r\n    __importStar,\r\n    __importDefault,\r\n    __classPrivateFieldGet,\r\n    __classPrivateFieldSet,\r\n} = tslib;\r\nexport {\r\n    __extends,\r\n    __assign,\r\n    __rest,\r\n    __decorate,\r\n    __param,\r\n    __metadata,\r\n    __awaiter,\r\n    __generator,\r\n    __exportStar,\r\n    __createBinding,\r\n    __values,\r\n    __read,\r\n    __spread,\r\n    __spreadArrays,\r\n    __spreadArray,\r\n    __await,\r\n    __asyncGenerator,\r\n    __asyncDelegator,\r\n    __asyncValues,\r\n    __makeTemplateObject,\r\n    __importStar,\r\n    __importDefault,\r\n    __classPrivateFieldGet,\r\n    __classPrivateFieldSet,\r\n};\r\n", "const genericMessage = \"Invariant Violation\";\nconst {\n  setPrototypeOf = function (obj: any, proto: any) {\n    obj.__proto__ = proto;\n    return obj;\n  },\n} = Object as any;\n\nexport class InvariantError extends Error {\n  framesToPop = 1;\n  name = genericMessage;\n  constructor(message: string | number = genericMessage) {\n    super(\n      typeof message === \"number\"\n        ? `${genericMessage}: ${message} (see https://github.com/apollographql/invariant-packages)`\n        : message\n    );\n    setPrototypeOf(this, InvariantError.prototype);\n  }\n}\n\nexport function invariant(\n  condition: any,\n  message?: string | number,\n): asserts condition {\n  if (!condition) {\n    throw new InvariantError(message);\n  }\n}\n\nconst verbosityLevels = [\"log\", \"warn\", \"error\", \"silent\"] as const;\ntype VerbosityLevel = (typeof verbosityLevels)[number];\ntype ConsoleMethodName = Exclude<VerbosityLevel, \"silent\">;\nlet verbosityLevel = verbosityLevels.indexOf(\"log\");\n\nfunction wrapConsoleMethod<M extends ConsoleMethodName>(method: M) {\n  return function () {\n    if (verbosityLevels.indexOf(method) >= verbosityLevel) {\n      return console[method].apply(console, arguments as any);\n    }\n  } as (typeof console)[M];\n}\n\nexport namespace invariant {\n  export const log = wrapConsoleMethod(\"log\");\n  export const warn = wrapConsoleMethod(\"warn\");\n  export const error = wrapConsoleMethod(\"error\");\n}\n\nexport function setVerbosity(level: VerbosityLevel): VerbosityLevel {\n  const old = verbosityLevels[verbosityLevel];\n  verbosityLevel = Math.max(0, verbosityLevels.indexOf(level));\n  return old;\n}\n\n// Code that uses ts-invariant with rollup-plugin-invariant may want to\n// import this process stub to avoid errors evaluating process.env.NODE_ENV.\n// However, because most ESM-to-CJS compilers will rewrite the process import\n// as tsInvariant.process, which prevents proper replacement by minifiers, we\n// also export processStub, so you can import { invariant, processStub } from\n// \"ts-invariant\" and assign processStub to a local variable named process.\nexport const processStub: {\n  env: Record<string, any>;\n  [key: string]: any;\n} = (\n  typeof process === \"object\" &&\n  typeof process.env === \"object\"\n) ? process : { env: {} };\n\nexport { processStub as process };\n\nexport default invariant;\n", "/**\n * The current status of a query\u2019s execution in our system.\n */\nexport enum NetworkStatus {\n  /**\n   * The query has never been run before and the query is now currently running. A query will still\n   * have this network status even if a partial data result was returned from the cache, but a\n   * query was dispatched anyway.\n   */\n  loading = 1,\n\n  /**\n   * If `setVariables` was called and a query was fired because of that then the network status\n   * will be `setVariables` until the result of that query comes back.\n   */\n  setVariables = 2,\n\n  /**\n   * Indicates that `fetchMore` was called on this query and that the query created is currently in\n   * flight.\n   */\n  fetchMore = 3,\n\n  /**\n   * Similar to the `setVariables` network status. It means that `refetch` was called on a query\n   * and the refetch request is currently in flight.\n   */\n  refetch = 4,\n\n  /**\n   * Indicates that a polling query is currently in flight. So for example if you are polling a\n   * query every 10 seconds then the network status will switch to `poll` every 10 seconds whenever\n   * a poll request has been sent but not resolved.\n   */\n  poll = 6,\n\n  /**\n   * No request is in flight for this query, and no errors happened. Everything is OK.\n   */\n  ready = 7,\n\n  /**\n   * No request is in flight for this query, but one or more errors were detected.\n   */\n  error = 8,\n}\n\n/**\n * Returns true if there is currently a network request in flight according to a given network\n * status.\n */\nexport function isNetworkRequestInFlight(\n  networkStatus?: NetworkStatus,\n): boolean {\n  return networkStatus ? networkStatus < 7 : false;\n}\n", "/* Core */\n\nexport {\n  ApolloClient,\n  ApolloClientOptions,\n  DefaultOptions,\n  mergeOptions,\n} from './ApolloClient';\nexport {\n  ObservableQuery,\n  FetchMoreOptions,\n  UpdateQueryOptions,\n} from './ObservableQuery';\nexport {\n  QueryOptions,\n  WatchQueryOptions,\n  MutationOptions,\n  SubscriptionOptions,\n  FetchPolicy,\n  WatchQueryFetchPolicy,\n  ErrorPolicy,\n  FetchMoreQueryOptions,\n  SubscribeToMoreOptions,\n  MutationUpdaterFn,\n} from './watchQueryOptions';\nexport { NetworkStatus } from './networkStatus';\nexport * from './types';\nexport {\n  Resolver,\n  FragmentMatcher,\n} from './LocalState';\nexport { isApolloError, ApolloError } from '../errors';\n\n/* Cache */\n\nexport {\n  // All the exports (types and values) from ../cache, minus cacheSlot,\n  // which we want to keep semi-private.\n  Cache,\n  ApolloCache,\n  Transaction,\n  DataProxy,\n  InMemoryCache,\n  InMemoryCacheConfig,\n  MissingFieldError,\n  defaultDataIdFromObject,\n  ReactiveVar,\n  makeVar,\n  TypePolicies,\n  TypePolicy,\n  FieldPolicy,\n  FieldReadFunction,\n  FieldMergeFunction,\n  FieldFunctionOptions,\n  PossibleTypesMap,\n} from '../cache';\n\nexport * from '../cache/inmemory/types';\n\n/* Link */\n\nexport * from '../link/core';\nexport * from '../link/http';\nexport {\n  fromError,\n  toPromise,\n  fromPromise,\n  ServerError,\n  throwServerError,\n} from '../link/utils';\n\n/* Utilities */\n\nexport {\n  Observable,\n  Observer,\n  ObservableSubscription,\n  Reference,\n  isReference,\n  makeReference,\n  StoreObject,\n} from '../utilities';\n\n/* Supporting */\n\n// The verbosity of invariant.{log,warn,error} can be controlled globally\n// (for anyone using the same ts-invariant package) by passing \"log\",\n// \"warn\", \"error\", or \"silent\" to setVerbosity (\"log\" is the default).\n// Note that all invariant.* logging is hidden in production.\nimport { setVerbosity } from \"ts-invariant\";\nexport { setVerbosity as setLogVerbosity }\nsetVerbosity(\"log\");\n\n// Note that importing `gql` by itself, then destructuring\n// additional properties separately before exporting, is intentional.\n// Due to the way the `graphql-tag` library is setup, certain bundlers\n// can't find the properties added to the exported `gql` function without\n// additional guidance (e.g. Rollup - see\n// https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module).\n// Instead of having people that are using bundlers with `@apollo/client` add\n// extra bundler config to help `graphql-tag` exports be found (which would be\n// awkward since they aren't importing `graphql-tag` themselves), this\n// workaround of pulling the extra properties off the `gql` function,\n// then re-exporting them separately, helps keeps bundlers happy without any\n// additional config changes.\nexport {\n  default as gql,\n  resetCaches,\n  disableFragmentWarnings,\n  enableExperimentalFragmentVariables,\n  disableExperimentalFragmentVariables,\n} from 'graphql-tag';\n", "import type { DocumentNode } from '@apollo/client/core';\n\n/**\n * Validates a graphql document node.\n *\n * ```haskell\n * isValidGql :: DocumentNode a => a -> Bool\n * ```\n * @param doc Maybe a DocumentNode\n * @return Whether the argument is a DocumentNode\n */\nexport function isValidGql(doc: unknown): doc is DocumentNode {\n  return !!(\n    doc &&\n    typeof doc === 'object' &&\n    'kind' in doc &&\n    'definitions' in doc\n  );\n}\n", "import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nimport type {\n  ApolloClient,\n  ApolloError,\n  ErrorPolicy,\n  NormalizedCacheObject,\n} from '@apollo/client/core';\n\n\nimport type {\n  ComponentDocument,\n  Data,\n  GraphQLError,\n  MaybeTDN,\n  MaybeVariables,\n  Variables,\n} from '@apollo-elements/core/types';\n\nimport { isValidGql } from './lib/is-valid-gql.js';\n\nimport { ApolloControllerConnectedEvent, ApolloControllerDisconnectedEvent } from './events.js';\n\nexport interface ApolloControllerOptions<D, V> {\n  /** The `ApolloClient` instance for the controller. */\n  client?: ApolloClient<NormalizedCacheObject>;\n  /** Variables for the operation. */\n  variables?: Variables<D, V>;\n  /** Context passed to the link execution chain. */\n  context?: any; // eslint-disable-line @typescript-eslint/no-explicit-any\n  /**\n   * errorPolicy determines the level of events for errors in the execution result. The options are:\n   * - `none` (default): any errors from the request are treated like runtime errors and the observable is stopped (XXX this is default to lower breaking changes going from AC 1.0 => 2.0)\n   * - `ignore`: errors from the request do not stop the observable, but also don't call `next`\n   * - `all`: errors are treated like data and will notify observables\n   * @summary [Error Policy](https://www.apollographql.com/docs/react/api/core/ApolloClient/#ErrorPolicy) for the query.\n   */\n  errorPolicy?: ErrorPolicy;\n  /** When provided, the controller will fall back to this element to fire events */\n  hostElement?: HTMLElement;\n  /** Host update callback */\n  [update]?(properties?: Record<string, unknown>): void;\n}\n\nexport const update = Symbol('update');\n\ninterface ReflectingReactiveControllerHost extends ReactiveControllerHost {\n  [update](properties?: Record<string, unknown>): void;\n}\n\nfunction isReflectingHost(host: ReactiveControllerHost): host is ReflectingReactiveControllerHost {\n  return typeof (host as ReactiveControllerHost & { [update]: unknown })[update] === 'function';\n}\n\nexport abstract class ApolloController<\n  D extends MaybeTDN = MaybeTDN,\n  V = MaybeVariables<D>\n>\nimplements ReactiveController {\n  #options: ApolloControllerOptions<D, V> = {};\n\n  #client: ApolloClient<NormalizedCacheObject> | null = null;\n\n  #document: ComponentDocument<D> | null = null;\n\n  /** @summary The event emitter to use when firing events, usually the host element. */\n  protected emitter: EventTarget;\n\n  called = true;\n\n  /** @summary Latest data for the operation, or `null`. */\n  data: Data<D> | null = null;\n\n  /** @summary Latest error from the operation, or `null`. */\n  error: ApolloError | null = null;\n\n  /** @summary Latest errors from the operation, or `[]`. */\n  errors: readonly GraphQLError[] = [];\n\n  /** @summary Whether a request is in-flight. */\n  loading = false;\n\n  /** @summary Options for the operation and controller. */\n  get options(): ApolloControllerOptions<D, V> {\n    return this.#options;\n  }\n\n  set options(v: ApolloControllerOptions<D, V>) {\n    const u = this.#options[update];\n    this.#options = { [update]: u, ...v };\n  }\n\n  /** @summary The `ApolloClient` instance for this controller. */\n  get client(): ApolloClient<NormalizedCacheObject> | null {\n    return this.#client;\n  }\n\n  set client(v: ApolloClient<NormalizedCacheObject> | null) {\n    this.#client = v;\n    this.clientChanged?.(v); /* c8 ignore next */ // covered\n    this.notify('client');\n  }\n\n  /** @summary The GraphQL document for the operation. */\n  get document(): ComponentDocument<D> | null { return this.#document; }\n\n  set document(document: ComponentDocument<D> | null) {\n    if (document === this.#document)\n      return; /* c8 ignore next */ // covered\n    else if (!document)\n      this.#document = null; /* c8 ignore next */ // covered\n    else if (!isValidGql(document)) { /* c8 ignore next */ // covered\n      const name = (this.constructor.name).replace(/Apollo(\\w+)Controller/, '$1');\n      throw new TypeError(`${name} must be a parsed GraphQL document.`);\n    } else {\n      this.#document = document;\n      this[update]({ document });\n      this.documentChanged?.(document);/* c8 ignore next */\n    }\n  }\n\n  /** @summary Variables for the operation. */\n  get variables(): Variables<D, V> | null {\n    return this.options?.variables ?? null;\n  }\n\n  set variables(variables: Variables<D, V> | null) {\n    if (!variables)\n      delete this.options.variables;/* c8 ignore next */ // covered\n    else if (variables === this.options.variables)\n      return; /* c8 ignore next */ // covered\n    else\n      this.options.variables = variables;\n    this[update]({ variables });\n    this.variablesChanged?.(variables);/* c8 ignore next */\n  }\n\n  constructor(public host: ReactiveControllerHost, options?: ApolloControllerOptions<D, V>) {\n    /* c8 ignore start */ // these are all covered\n    if (host instanceof EventTarget)\n      this.emitter = host;\n    else if (options?.hostElement instanceof EventTarget)\n      this.emitter = options.hostElement;\n    else\n      this.emitter = new EventTarget();\n    this.options = options ?? {};\n    this.client = this.options.client ?? window.__APOLLO_CLIENT__ ?? null;\n    host.addController?.(this);\n    /* c8 ignore stop */\n  }\n\n  /** @summary requests an update on the host. */\n  private [update](properties?: Record<string, unknown>): void {\n    this.host.requestUpdate();\n    /* c8 ignore start */ // these are all covered\n    if (isReflectingHost(this.host))\n      this.host[update](properties);\n    else\n      this.options[update]?.(properties);\n    /* c8 ignore stop */\n  }\n\n  /** @summary callback for when the GraphQL document changes. */\n  protected documentChanged?(document?: ComponentDocument<D> | null): void;\n\n  /** @summary callback for when the GraphQL variables change. */\n  protected variablesChanged?(variables?: Variables<D, V> | null): void;\n\n  /** @summary callback for when the Apollo client changes. */\n  protected clientChanged?(client?: ApolloClient<NormalizedCacheObject> | null): void;\n\n  /** @summary Notifies about updated properties. */\n  protected notify(...keys: (keyof this)[]): void {\n    this[update](Object.fromEntries(keys.map(x => [x, this[x]])));\n  }\n\n  /** @summary Assigns the controller's variables and GraphQL document. */\n  protected init(document: ComponentDocument<D> | null): void {\n    this.variables ??= this.options.variables ?? null;\n    this.document = document;\n  }\n\n  /** @fires {ApolloControllerConnectedEvent} apollo-controller-connected when the controller's host connects to the document. */\n  hostConnected(): void {\n    this.emitter.dispatchEvent(new ApolloControllerConnectedEvent(this));\n  }\n\n  /** @fires {ApolloControllerDisconnectedEvent} apollo-controller-disconnected when the controller's host disconnects from the document. */\n  hostDisconnected(): void {\n    this.emitter.dispatchEvent(new ApolloControllerDisconnectedEvent(this));\n    window.dispatchEvent(new ApolloControllerDisconnectedEvent(this));\n  }\n}\n", "const configurable = true;\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nexport function bound(_: any, key: string, descriptor: PropertyDescriptor): PropertyDescriptor {\n  if (typeof descriptor?.value !== 'function')\n    throw new TypeError(`Only methods can be decorated with @bound. <${key ?? _.name}> is not a method!`); /* c8 ignore next */\n  return {\n    configurable,\n    get() {\n      const value = descriptor.value.bind(this);\n      Object.defineProperty(this, key, { value, configurable, writable: true });\n      return value;\n    },\n  };\n}\n", "import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nimport type {\n  ComponentDocument,\n  Data,\n  FetchMoreParams,\n  MaybeTDN,\n  MaybeVariables,\n  Variables,\n} from '@apollo-elements/core/types';\n\nimport type {\n  ApolloError,\n  ApolloQueryResult,\n  DocumentNode,\n  ObservableQuery,\n  QueryOptions,\n  SubscribeToMoreOptions,\n  SubscriptionOptions,\n  WatchQueryOptions,\n} from '@apollo/client/core';\n\nimport { NetworkStatus } from '@apollo/client/core';\n\nimport { ApolloController, ApolloControllerOptions } from './apollo-controller.js';\n\nimport { bound } from './lib/bound.js';\n\nexport interface ApolloQueryControllerOptions<D, V> extends\n    ApolloControllerOptions<D, V>,\n    Partial<WatchQueryOptions<Variables<D, V>, Data<D>>> {\n  variables?: Variables<D, V>;\n  noAutoSubscribe?: boolean;\n  shouldSubscribe?: (options?: Partial<SubscriptionOptions<Variables<D, V>, Data<D>>>) => boolean;\n  onData?: (data: Data<D>) => void;\n  onError?: (error: Error) => void;\n}\n\nexport class ApolloQueryController<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>\n  extends ApolloController<D, V>\n  implements ReactiveController {\n  private observableQuery?: ObservableQuery<Data<D>, Variables<D, V>>;\n\n  private pollingInterval?: number;\n\n  /** @summary Options to customize the query and to interface with the controller. */ // @ts-expect-error: https://github.com/microsoft/TypeScript/issues/40220\n  declare options: ApolloQueryControllerOptions<D, V>;\n\n  /**\n   * `networkStatus` is useful if you want to display a different loading indicator (or no indicator at all)\n   * depending on your network status as it provides a more detailed view into the state of a network request\n   * on your component than `loading` does. `networkStatus` is an enum with different number values between 1 and 8.\n   * These number values each represent a different network state.\n   *\n   * 1. `loading`: The query has never been run before and the request is now pending. A query will still have this network status even if a result was returned from the cache, but a query was dispatched anyway.\n   * 2. `setVariables`: If a query\u2019s variables change and a network request was fired then the network status will be setVariables until the result of that query comes back. React users will see this when options.variables changes on their queries.\n   * 3. `fetchMore`: Indicates that fetchMore was called on this query and that the network request created is currently in flight.\n   * 4. `refetch`: It means that refetch was called on a query and the refetch request is currently in flight.\n   * 5. Unused.\n   * 6. `poll`: Indicates that a polling query is currently in flight. So for example if you are polling a query every 10 seconds then the network status will switch to poll every 10 seconds whenever a poll request has been sent but not resolved.\n   * 7. `ready`: No request is in flight for this query, and no errors happened. Everything is OK.\n   * 8. `error`: No request is in flight for this query, but one or more errors were detected.\n   *\n   * If the network status is less then 7 then it is equivalent to `loading` being true. In fact you could\n   * replace all of your `loading` checks with `networkStatus < 7` and you would not see a difference.\n   * It is recommended that you use `loading`, however.\n   */\n  networkStatus = NetworkStatus.ready;\n\n  /**\n   * If data was read from the cache with missing fields,\n   * partial will be true. Otherwise, partial will be falsy.\n   *\n   * @summary True when the query returned partial data.\n   */\n  partial = false;\n\n  #hasDisconnected = false;\n\n  #lastQueryDocument?: DocumentNode;\n\n  /** @summary A GraphQL document containing a single query. */\n  get query(): ComponentDocument<D> | null { return this.document; }\n\n  set query(document: ComponentDocument<D> | null) { this.document = document; }\n\n  /** @summary Flags an element that's ready and able to auto-subscribe */\n  public get canAutoSubscribe(): boolean {\n    return (\n      !!this.client &&\n      !!this.document &&\n      !this.options.noAutoSubscribe &&\n      this.shouldSubscribe()\n    );\n  }\n\n  constructor(\n    host: ReactiveControllerHost,\n    query?: ComponentDocument<D> | null,\n    options?: ApolloQueryControllerOptions<D, V>\n  ) {\n    super(host, options);\n    this.init(query ?? null);/* c8 ignore next */\n  }\n\n  /** @summary initializes or reinitializes the query */\n  override hostConnected(): void {\n    super.hostConnected();\n    if (this.#hasDisconnected && this.observableQuery) { /* c8 ignore next */\n      this.observableQuery.reobserve();\n      this.#hasDisconnected = false;\n    } else\n      this.documentChanged(this.query);\n  }\n\n  override hostDisconnected(): void {\n    this.#hasDisconnected = true;\n    super.hostDisconnected();\n  }\n\n  private shouldSubscribe(opts?: Partial<SubscriptionOptions<Variables<D, V>, Data<D>>>): boolean {\n    return this.options.shouldSubscribe?.(opts) ?? true;/* c8 ignore next */\n  }\n\n  /**\n   * Determines whether the element is able to automatically subscribe\n   */\n  private canSubscribe(\n    options?: Partial<SubscriptionOptions<Variables<D, V> | null, Data<D>>>\n  ): boolean {\n    /* c8 ignore next 4 */\n    return (\n      !(this.options.noAutoSubscribe ?? false) &&\n      !!this.client &&\n      !!(options?.query ?? this.document)\n    );\n  }\n\n  /**\n   * Creates an instance of ObservableQuery with the options provided by the element.\n   * - `context` Context to be passed to link execution chain\n   * - `errorPolicy` Specifies the ErrorPolicy to be used for this query\n   * - `fetchPolicy` Specifies the FetchPolicy to be used for this query\n   * - `fetchResults` Whether or not to fetch results\n   * - `metadata` Arbitrary metadata stored in the store with this query. Designed for debugging, developer tools, etc.\n   * - `notifyOnNetworkStatusChange` Whether or not updates to the network status should trigger next on the observer of this query\n   * - `pollInterval` The time interval (in milliseconds) on which this query should be refetched from the server.\n   * - `query` A GraphQL document that consists of a single query to be sent down to the server.\n   * - `variables` A map going from variable name to variable value, where the variables are used within the GraphQL query.\n   */\n  @bound private watchQuery(\n    params?: Partial<WatchQueryOptions<Variables<D, V>, Data<D>>>\n  ): ObservableQuery<Data<D>, Variables<D, V>> {\n    if (!this.client)\n      throw new TypeError('No Apollo client. See https://apolloelements.dev/guides/getting-started/apollo-client/'); /* c8 ignore next */ // covered\n\n    return this.client.watchQuery({\n      // It's better to let Apollo client throw this error\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      query: this.query!,\n      variables: this.variables ?? undefined,\n      context: this.options.context,\n      errorPolicy: this.options.errorPolicy,\n      fetchPolicy: this.options.fetchPolicy,\n      notifyOnNetworkStatusChange: this.options.notifyOnNetworkStatusChange,\n      partialRefetch: this.options.partialRefetch,\n      pollInterval: this.options.pollInterval,\n      returnPartialData: this.options.returnPartialData,\n      nextFetchPolicy: this.options.nextFetchPolicy,\n      ...params,\n    }) as ObservableQuery<Data<D>, Variables<D, V>>;\n  }\n\n  private nextData(result: ApolloQueryResult<Data<D>>): void {\n    this.emitter.dispatchEvent(new CustomEvent('apollo-query-result', { detail: result }));\n    this.data = result.data;\n    this.error = result.error ?? null;/* c8 ignore next */\n    this.errors = result.errors ?? [];\n    this.loading = result.loading ?? false;/* c8 ignore next */\n    this.networkStatus = result.networkStatus;\n    this.partial = result.partial ?? false;\n    this.options.onData?.(result.data);/* c8 ignore next */\n    this.notify('data', 'error', 'errors', 'loading', 'networkStatus', 'partial');\n  }\n\n  private nextError(error: ApolloError): void {\n    this.emitter.dispatchEvent(new CustomEvent('apollo-error', { detail: error }));\n    this.error = error;\n    this.loading = false;\n    this.options.onError?.(error);/* c8 ignore next */\n    this.notify('error', 'loading');\n  }\n\n  protected override clientChanged(): void {\n    if (this.canSubscribe() && this.shouldSubscribe())/* c8 ignore next */\n      this.subscribe();/* c8 ignore next */\n  }\n\n  protected override documentChanged(doc?: ComponentDocument<D> | null): void {\n    const query = doc ?? undefined;/* c8 ignore next */\n    if (doc === this.#lastQueryDocument)\n      return;/* c8 ignore next */\n    if (this.canSubscribe({ query }) && this.shouldSubscribe({ query }))/* c8 ignore next */\n      this.subscribe({ query }); /* c8 ignore next */ // covered\n  }\n\n  protected override variablesChanged(variables?: Variables<D, V>): void {\n    if (this.observableQuery)\n      this.refetch(variables);/* c8 ignore next */\n    else if (this.canSubscribe({ variables }) && this.shouldSubscribe({ variables }))/* c8 ignore next */\n      this.subscribe({ variables });/* c8 ignore next */\n  }\n\n  /**\n   * Exposes the [`ObservableQuery#refetch`](https://www.apollographql.com/docs/react/api/apollo-client.html#ObservableQuery.refetch) method.\n   *\n   * @param variables The new set of variables. If there are missing variables, the previous values of those variables will be used.\n   */\n  @bound public async refetch(variables?: Variables<D, V>): Promise<ApolloQueryResult<Data<D>>> {\n    if (!this.observableQuery)\n      throw new Error('Cannot refetch without an ObservableQuery'); /* c8 ignore next */ // covered\n    return this.observableQuery.refetch(variables as Variables<D, V>);\n  }\n\n  /**\n   * Resets the observableQuery and subscribes.\n   * @param params options for controlling how the subscription subscribes\n   */\n  @bound public subscribe(\n    params?: Partial<WatchQueryOptions<Variables<D, V>, Data<D>>>\n  ): ZenObservable.Subscription {\n    if (this.observableQuery)\n      this.observableQuery.stopPolling(); /* c8 ignore next */ // covered\n\n    this.observableQuery = this.watchQuery({\n      // It's better to let Apollo client throw this error\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      query: this.query!,\n      variables: this.variables ?? undefined,\n      context: this.options.context,\n      errorPolicy: this.options.errorPolicy,\n      fetchPolicy: this.options.fetchPolicy,\n      pollInterval: this.options.pollInterval,\n      notifyOnNetworkStatusChange: this.options.notifyOnNetworkStatusChange,\n      returnPartialData: this.options.returnPartialData,\n      partialRefetch: this.options.partialRefetch,\n      ...params,\n    });\n\n    this.#lastQueryDocument = params?.query ?? this.query ?? undefined;/* c8 ignore next */\n\n    this.loading = true;\n    this.notify('loading');\n\n    return this.observableQuery?.subscribe({\n      next: this.nextData.bind(this),\n      error: this.nextError.bind(this),\n    });\n  }\n\n  /**\n   * Lets you pass a GraphQL subscription and updateQuery function\n   * to subscribe to more updates for your query.\n   *\n   * The `updateQuery` parameter is a function that takes the previous query data,\n   * then a `{ subscriptionData: TSubscriptionResult }` object,\n   * and returns an object with updated query data based on the new results.\n   */\n  @bound public subscribeToMore<TSubscriptionVariables, TSubscriptionData>(\n    options: SubscribeToMoreOptions<Data<D>, TSubscriptionVariables, TSubscriptionData>\n  ): (() => void) | void {\n    return this.observableQuery?.subscribeToMore(options);\n  }\n\n  /**\n   * @summary Executes a Query once and updates the with the result\n   */\n  @bound public async executeQuery(\n    params?: Partial<QueryOptions<Variables<D, V>, Data<D>>>\n  ): Promise<ApolloQueryResult<Data<D>>> {\n    try {\n      if (!this.client)\n        throw new TypeError('No Apollo client. See https://apolloelements.dev/guides/getting-started/apollo-client/'); /* c8 ignore next */ // covered\n\n      this.loading = true;\n      this.notify('loading');\n\n      const result = await this.client.query<Data<D>, Variables<D, V>>({\n        // It's better to let Apollo client throw this error, if needs be\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        query: this.query!, variables: this.variables!,\n        context: this.options.context,\n        errorPolicy: this.options.errorPolicy,\n        fetchPolicy:\n            this.options.fetchPolicy === 'cache-and-network' ? undefined/* c8 ignore next */\n          : this.options.fetchPolicy,\n        notifyOnNetworkStatusChange: this.options.notifyOnNetworkStatusChange,\n        partialRefetch: this.options.partialRefetch,\n        returnPartialData: this.options.returnPartialData,\n        ...params,\n      });\n      if (result) // NB: not sure why, but sometimes this returns undefined\n        this.nextData(result);\n      return result;/* c8 ignore next */\n    } catch (error) {\n      this.nextError(error);\n      throw error;\n    }\n  }\n\n  /**\n   * Exposes the `ObservableQuery#fetchMore` method.\n   * https://www.apollographql.com/docs/react/api/core/ObservableQuery/#ObservableQuery.fetchMore\n   *\n   * The optional `updateQuery` parameter is a function that takes the previous query data,\n   * then a `{ subscriptionData: TSubscriptionResult }` object,\n   * and returns an object with updated query data based on the new results.\n   *\n   * The optional `variables` parameter is an optional new variables object.\n   */\n  @bound public async fetchMore(\n    params?: Partial<FetchMoreParams<D, V>>\n  ): Promise<ApolloQueryResult<Data<D>>> {\n    this.loading = true;\n    this.notify('loading');\n\n    const options = {\n      // It's better to let Apollo client throw this error\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      query: this.query!,\n      context: this.options.context,\n      variables: this.variables,\n      ...params,\n    };\n\n    return (\n      this.observableQuery ??= this.watchQuery(\n        options as WatchQueryOptions<Variables<D, V>, Data<D>>\n      )\n    ).fetchMore({\n      ...options,\n      variables: (options.variables as Variables<D, V>) ?? undefined, /* c8 ignore next */\n    }).then(x => {\n      this.loading = false;\n      this.notify('loading');\n      return x;\n    });\n  }\n\n  /**\n   * @summary Start polling this query\n   * @param ms milliseconds to wait between fetches\n   */\n  @bound public startPolling(ms: number): void {\n    this.pollingInterval = window.setInterval(() => {\n      this.refetch();\n    }, ms);\n  }\n\n  /**\n   * @summary Stop polling this query\n   */\n  @bound public stopPolling(): void {\n    clearInterval(this.pollingInterval);\n  }\n}\n", "import type * as C from '@apollo/client/core';\n\nimport type {\n  ComponentDocument,\n  Constructor,\n  Data,\n  FetchMoreParams,\n  MaybeTDN,\n  MaybeVariables,\n  NextFetchPolicyFunction,\n  Variables,\n} from '@apollo-elements/core/types';\n\nimport type { ApolloQueryElement } from '@apollo-elements/core/types';\n\nimport { NetworkStatus } from '@apollo/client/core';\n\nimport { ApolloElementMixin } from './apollo-element-mixin.js';\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\nimport { controlled } from '@apollo-elements/core/decorators';\n\nimport {\n  ApolloQueryController,\n  ApolloQueryControllerOptions,\n} from '@apollo-elements/core/apollo-query-controller';\n\ntype MixinInstance<B extends Constructor> = B & {\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  new <D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>(...a: any[]):\n    InstanceType<B> & ApolloQueryElement<D, V>;\n  documentType: 'query',\n}\n\n/**\n * `ApolloQueryMixin`: class mixin for apollo-query elements.\n */\nfunction ApolloQueryMixinImpl<B extends Constructor>(superclass: B): MixinInstance<B> {\n  class ApolloQueryElement<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>\n    extends ApolloElementMixin(superclass)<D, V> {\n    static override documentType: 'query' = 'query';\n\n    static override get observedAttributes(): string[] {\n      return [\n        ...super.observedAttributes as string[],\n        'next-fetch-policy',\n        'no-auto-subscribe',\n      ];\n    }\n\n    controller = new ApolloQueryController<D, V>(this, null, {\n      shouldSubscribe: x => this.readyToReceiveDocument && this.shouldSubscribe(x),\n      onData: data => this.onData?.(data), /* c8 ignore next */ // covered\n      onError: error => this.onError?.(error), /* c8 ignore next */ // covered\n    });\n\n    /** @summary The latest query data. */\n    declare data: Data<D> | null;\n\n    /**\n     * An object map from variable name to variable value, where the variables are used within the GraphQL query.\n     *\n     * Setting variables will initiate the query, unless [`noAutoSubscribe`](#noautosubscribe) is also set.\n     *\n     * @summary Query variables.\n     */\n    declare variables: Variables<D, V> | null;\n\n    get options(): ApolloQueryControllerOptions<D, V> {\n      return this.controller.options;\n    }\n\n    set options(options: ApolloQueryControllerOptions<D, V>) {\n      const { onData, onError } = this.controller.options;\n      this.controller.options = {\n        ...options,\n        onData,\n        onError,\n      };\n    }\n\n    /**\n     * If data was read from the cache with missing fields,\n     * partial will be true. Otherwise, partial will be falsy.\n     *\n     * @summary True when the query returned partial data.\n     */\n    @controlled({ readonly: true }) readonly partial = false;\n\n    /**\n     * `networkStatus` is useful if you want to display a different loading indicator (or no indicator at all)\n     * depending on your network status as it provides a more detailed view into the state of a network request\n     * on your component than `loading` does. `networkStatus` is an enum with different number values between 1 and 8.\n     * These number values each represent a different network state.\n     *\n     * 1. `loading`: The query has never been run before and the request is now pending. A query will still have this network status even if a result was returned from the cache, but a query was dispatched anyway.\n     * 2. `setVariables`: If a query\u2019s variables change and a network request was fired then the network status will be setVariables until the result of that query comes back. React users will see this when options.variables changes on their queries.\n     * 3. `fetchMore`: Indicates that fetchMore was called on this query and that the network request created is currently in flight.\n     * 4. `refetch`: It means that refetch was called on a query and the refetch request is currently in flight.\n     * 5. Unused.\n     * 6. `poll`: Indicates that a polling query is currently in flight. So for example if you are polling a query every 10 seconds then the network status will switch to poll every 10 seconds whenever a poll request has been sent but not resolved.\n     * 7. `ready`: No request is in flight for this query, and no errors happened. Everything is OK.\n     * 8. `error`: No request is in flight for this query, but one or more errors were detected.\n     *\n     * If the network status is less then 7 then it is equivalent to `loading` being true. In fact you could\n     * replace all of your `loading` checks with `networkStatus < 7` and you would not see a difference.\n     * It is recommended that you use `loading`, however.\n     */\n    @controlled() networkStatus: NetworkStatus = NetworkStatus.ready;\n\n    /** @summary A GraphQL document containing a single query. */\n    @controlled() query: ComponentDocument<D> | null = null;\n\n    /**\n     * Determines where the client may return a result from. The options are:\n     *\n     * - `cache-first` (default): return result from cache, fetch from network if cached result is not available.\n     * - `cache-and-network`: return result from cache first (if it exists), then return network result once it's available.\n     * - `cache-only`: return result from cache if available, fail otherwise.\n     * - `no-cache`: return result from network, fail if network call doesn't succeed, don't save to cache\n     * - `network-only`: return result from network, fail if network call doesn't succeed, save to cache\n     * - `standby`: only for queries that aren't actively watched, but should be available for refetch and updateQueries.\n     *\n     * @summary The [fetchPolicy](https://www.apollographql.com/docs/react/api/core/ApolloClient/#FetchPolicy) for the query.\n     * @attr fetch-policy\n     */\n    @controlled({ path: 'options' }) fetchPolicy?: C.WatchQueryFetchPolicy;\n\n    /**\n     * If true, perform a query refetch if the query result is marked as being partial,\n     * and the returned data is reset to an empty Object by the Apollo Client QueryManager\n     * (due to a cache miss).\n     *\n     * The default value is false for backwards-compatibility's sake,\n     * but should be changed to true for most use-cases.\n     *\n     * @summary Set to retry any partial query results.\n     */\n    @controlled({ path: 'options' }) partialRefetch?: boolean;\n\n    /**\n     * Opt into receiving partial results from the cache for queries\n     * that are not fully satisfied by the cache.\n     */\n    @controlled({ path: 'options' }) returnPartialData?: boolean;\n\n    /**\n     * When someone chooses cache-and-network or network-only as their\n     * initial FetchPolicy, they often do not want future cache updates to\n     * trigger unconditional network requests, which is what repeatedly\n     * applying the cache-and-network or network-only policies would seem\n     * to imply. Instead, when the cache reports an update after the\n     * initial network request, it may be desirable for subsequent network\n     * requests to be triggered only if the cache result is incomplete.\n     * The nextFetchPolicy option provides a way to update\n     * options.fetchPolicy after the intial network request, without\n     * having to set options.\n     *\n     * @summary Set to prevent subsequent network requests when the fetch policy is `cache-and-network` or `network-only`.\n     * @attr next-fetch-policy\n     */\n    @controlled({\n      path: 'options',\n      onSet(this: ApolloQueryElement, value: ApolloQueryElement['nextFetchPolicy']) {\n        if (value && typeof value !== 'function')\n          this.setAttribute('next-fetch-policy', value); /* c8 ignore next */ // covered\n        else\n          this.removeAttribute('next-fetch-policy');\n      },\n    })\n    nextFetchPolicy?: C.WatchQueryFetchPolicy | NextFetchPolicyFunction<D, V>;\n\n    /**\n     * When true, the component will not automatically subscribe to new data.\n     * Call the `subscribe()` method to do so.\n     * @attr no-auto-subscribe\n     */\n    @controlled({\n      path: 'options',\n      onSet(this: ApolloQueryElement, value: ApolloQueryElement['noAutoSubscribe']) {\n        this.toggleAttribute('no-auto-subscribe', !!value);\n      },\n    })\n    noAutoSubscribe = this.hasAttribute('no-auto-subscribe');\n\n    /**\n     * @summary Whether or not updates to the network status should trigger next on the observer of this query.\n     */\n    @controlled({ path: 'options' }) notifyOnNetworkStatusChange?: boolean;\n\n    /** @summary The time interval (in milliseconds) on which this query should be refetched from the server. */\n    @controlled({ path: 'options' }) pollInterval?: number;\n\n    /**\n     * Optional callback for when a query is completed.\n     * @param data the query data.\n     */\n    onData?(data: Data<D>): void\n\n    /**\n     * Optional callback for when an error occurs.\n     * @param error the error.\n     */\n    onError?(error: Error): void\n\n    /** @summary Flags an element that's ready and able to auto subscribe */\n    @controlled({ readonly: true }) readonly canAutoSubscribe = true;\n\n    override attributeChangedCallback(name: string, oldVal: string, newVal: string): void {\n      super.attributeChangedCallback?.(name, oldVal, newVal);\n      // @ts-expect-error: ts is not tracking the static side\n      if (super.constructor?.observedAttributes?.includes?.(name))\n        return; /* c8 ignore next */ // covered\n\n      switch (name) { /* c8 ignore next */ // covered\n        case 'next-fetch-policy':\n          // to allow for case where this.nextFetchPolicy is undefined\n          // eslint-disable-next-line eqeqeq\n          if (this.nextFetchPolicy != newVal)\n            this.nextFetchPolicy = newVal as C.WatchQueryFetchPolicy; /* c8 ignore next */ // covered\n          break;\n        case 'no-auto-subscribe':\n          this.noAutoSubscribe = newVal != null;\n      }\n    }\n\n    /**\n     * Exposes the [`ObservableQuery#refetch`](https://www.apollographql.com/docs/react/api/apollo-client.html#ObservableQuery.refetch) method.\n     *\n     * @param variables The new set of variables. If there are missing variables, the previous values of those variables will be used..\n     */\n    async refetch(variables: Variables<D, V>): Promise<C.ApolloQueryResult<Data<D>>> {\n      return this.controller.refetch(variables);\n    }\n\n    /**\n     * Determines whether the element should attempt to automatically subscribe i.e. begin querying\n     *\n     * Override to prevent subscribing unless your conditions are met.\n     */\n    shouldSubscribe(\n      options?: Partial<C.SubscriptionOptions<Variables<D, V>, Data<D>>>\n    ): boolean {\n      return (void options, true);\n    }\n\n    /**\n     * Resets the observableQuery and subscribes.\n     * @param params options for controlling how the subscription subscribes\n     */\n    subscribe(\n      params?: Partial<C.SubscriptionOptions<Variables<D, V>, Data<D>>>\n    ): ZenObservable.Subscription {\n      return this.controller.subscribe(params);\n    }\n\n    /**\n     * Lets you pass a GraphQL subscription and updateQuery function\n     * to subscribe to more updates for your query.\n     *\n     * The `updateQuery` parameter is a function that takes the previous query data,\n     * then a `{ subscriptionData: TSubscriptionResult }` object,\n     * and returns an object with updated query data based on the new results.\n     */\n    subscribeToMore<TSubscriptionVariables, TSubscriptionData>(\n      options: C.SubscribeToMoreOptions<Data<D>, TSubscriptionVariables, TSubscriptionData>\n    ): void | (() => void) {\n      return this.controller.subscribeToMore(options);\n    }\n\n    /**\n     * Executes a Query once and updates the component with the result\n     */\n    async executeQuery(\n      params?: Partial<C.QueryOptions<Variables<D, V>, Data<D>>> | undefined\n    ): Promise<C.ApolloQueryResult<Data<D>>> {\n      return this.controller.executeQuery(params);\n    }\n\n    /**\n     * Exposes the `ObservableQuery#fetchMore` method.\n     * https://www.apollographql.com/docs/react/api/core/ObservableQuery/#ObservableQuery.fetchMore\n     *\n     * The optional `updateQuery` parameter is a function that takes the previous query data,\n     * then a `{ subscriptionData: TSubscriptionResult }` object,\n     * and returns an object with updated query data based on the new results.\n     *\n     * The optional `variables` parameter is an optional new variables object.\n     */\n    async fetchMore(\n      params?: Partial<FetchMoreParams<D, V>> | undefined\n    ): Promise<C.ApolloQueryResult<Data<D>>> {\n      return this.controller.fetchMore(params);\n    }\n  }\n\n  return ApolloQueryElement as unknown as MixinInstance<B>;\n}\n\n\nexport const ApolloQueryMixin =\n  dedupeMixin(ApolloQueryMixinImpl);\n", "import type {\n  Constructor,\n  Data,\n  MaybeTDN,\n  MaybeVariables,\n  Variables,\n} from '@apollo-elements/core/types';\n\nimport { ApolloQueryMixin } from '@apollo-elements/mixins/apollo-query-mixin';\nimport { ApolloElement } from './apollo-element.js';\n\nexport { html } from '@gluon/gluon';\n\n/**\n * \uD83D\uDE80 `ApolloQuery`\n *\n * Custom element base class that connects to your Apollo cache.\n *\n * See [`ApolloQueryInterface`](https://apolloelements.dev/api/core/interfaces/query) for more information on events\n *\n * @element\n */\nexport class ApolloQuery<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>\n  extends ApolloQueryMixin(ApolloElement as Constructor<ApolloElement>)<D, V> {\n  /** @summary Latest query data. */\n  declare data: Data<D> | null;\n\n  /**\n   * An object that maps from the name of a variable as used in the query GraphQL document to that variable's value.\n   *\n   * @summary Query variables.\n   */\n  declare variables: Variables<D, V> | null;\n}\n", "import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nimport type {\n  ComponentDocument,\n  Data,\n  MaybeTDN,\n  MaybeVariables,\n  OptimisticResponseType,\n  RefetchQueriesType,\n  Variables,\n} from '@apollo-elements/core/types';\n\nimport type {\n  ApolloError,\n  ErrorPolicy,\n  FetchPolicy,\n  FetchResult,\n  MutationOptions,\n  MutationUpdaterFn,\n} from '@apollo/client/core';\n\nimport { ApolloController, ApolloControllerOptions } from './apollo-controller.js';\n\nimport { bound } from './lib/bound.js';\n\nexport interface ApolloMutationControllerOptions<D, V> extends ApolloControllerOptions<D, V> {\n  /**\n   * An object that maps from the name of a variable as used in the mutation GraphQL document to that variable's value.\n   *\n   * @summary Mutation variables.\n   */\n  variables?: Variables<D, V>,\n  refetchQueries?: RefetchQueriesType<D> | null,\n  context?: Record<string, unknown>,\n  optimisticResponse?: OptimisticResponseType<D, V>,\n  errorPolicy?: ErrorPolicy;\n  fetchPolicy?: Extract<FetchPolicy, 'no-cache'>,\n  awaitRefetchQueries?: boolean,\n  onCompleted?(data: Data<D>|null): void,\n  onError?(error: Error): void,\n  update?(\n    ...p: Parameters<MutationUpdaterFn<Data<D>>>\n  ): ReturnType<MutationUpdaterFn<Data<D>>>,\n  ignoreResults?: boolean,\n}\n\nexport class ApolloMutationController<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>\n  extends ApolloController<D, V> implements ReactiveController {\n  /**\n   * The ID number of the most recent mutation since the element was instantiated.\n   */\n  private mostRecentMutationId = 0;\n\n  // @ts-expect-error: https://github.com/microsoft/TypeScript/issues/40220\n  declare options: ApolloMutationControllerOptions<D, V>;\n\n  called = false;\n\n  get mutation(): ComponentDocument<D> | null { return this.document; }\n\n  set mutation(document: ComponentDocument<D> | null) { this.document = document; }\n\n  constructor(\n    host: ReactiveControllerHost,\n    mutation?: ComponentDocument<D> | null,\n    options?: ApolloMutationControllerOptions<D, V>\n  ) {\n    super(host, options);\n    this.init(mutation ?? null);/* c8 ignore next */\n  }\n\n  /**\n   * @summary Fires a mutation\n   * This resolves a single mutation according to the options specified and returns a Promise which is either resolved with the resulting data or rejected with an error.\n   */\n  @bound public async mutate(\n    params?: Partial<MutationOptions<Data<D>, Variables<D, V>>>\n  ): Promise<FetchResult<Data<D>>> {\n    if (!this.client)\n      throw new TypeError('No Apollo client. See https://apolloelements.dev/guides/getting-started/apollo-client/'); /* c8 ignore next */ // covered\n    const mutationId = this.generateMutationId();\n\n    this.loading = true;\n    this.called = true;\n    this.error = null;\n    this.errors = [];\n    this.data = null;\n    this.notify('called', 'data', 'error', 'errors', 'loading');\n\n    return this.client.mutate<Data<D>, Variables<D, V>>({\n      // It's better to let Apollo client throw this error\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      mutation: this.mutation!,\n\n      awaitRefetchQueries: this.options.awaitRefetchQueries,\n      context: this.options.context,\n      errorPolicy: this.options.errorPolicy,\n      fetchPolicy: this.options.fetchPolicy,\n      optimisticResponse: this.options.optimisticResponse,\n      refetchQueries: this.options.refetchQueries ?? undefined,\n      update: this.options.update,\n      variables: this.variables ?? undefined,\n      ...params,\n    })\n      .then(this.onCompletedMutation.bind(this, mutationId))\n      .catch(this.onMutationError.bind(this, mutationId));\n  }\n\n  /**\n   * Increments and returns the most recent mutation id.\n   */\n  private generateMutationId(): number {\n    this.mostRecentMutationId += 1;\n    return this.mostRecentMutationId;\n  }\n\n  /**\n   * Returns true when an ID matches the most recent mutation id.\n   */\n  private isMostRecentMutation(mutationId: number): boolean {\n    return this.mostRecentMutationId === mutationId;\n  }\n\n  /**\n   * Callback for when a mutation is completed.\n   */\n  private onCompletedMutation(\n    mutationId: number,\n    response: FetchResult<Data<D>>\n  ): FetchResult<Data<D>> {\n    const { data } = response;\n    this.emitter.dispatchEvent(new CustomEvent('apollo-mutation-result', { detail: response }));\n    if (this.isMostRecentMutation(mutationId)) {\n      this.loading = false;\n      if (!this.options.ignoreResults) {\n        this.error = null;\n        this.data = data ?? null;/* c8 ignore next */\n        this.errors = response.errors ?? [];\n        this.options.onCompleted?.(this.data); /* c8 ignore next */\n      }\n      this.notify('data', 'error', 'errors', 'loading');\n    }\n    return response;\n  }\n\n  /**\n   * Callback for when a mutation fails.\n   */\n  private onMutationError(mutationId: number, error: ApolloError): never {\n    this.emitter.dispatchEvent(new CustomEvent('apollo-error', { detail: error }));\n    if (this.isMostRecentMutation(mutationId)) {\n      this.loading = false;\n      this.data = null;\n      this.error = error;\n    }\n    this.options.onError?.(error);\n    this.notify('data', 'error', 'loading');\n    throw error;\n  }\n}\n", "import type * as C from '@apollo/client/core';\n\nimport type {\n  ComponentDocument,\n  Constructor,\n  Data,\n  MaybeTDN,\n  MaybeVariables,\n  OptimisticResponseType,\n  RefetchQueriesType,\n  Variables,\n} from '@apollo-elements/core/types';\n\nimport type { ApolloMutationElement } from '@apollo-elements/core/types';\n\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\n\nimport { ApolloElementMixin } from './apollo-element-mixin.js';\nimport { controlled } from '@apollo-elements/core/decorators';\n\nimport { ApolloMutationController } from '@apollo-elements/core/apollo-mutation-controller';\n\ntype MixinInstance<B extends Constructor> = B & {\n  new <D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>():\n    InstanceType<B> & ApolloMutationElement<D, V>;\n  documentType: 'mutation';\n  observedAttributes?: string[];\n}\n\nfunction ApolloMutationMixinImpl<B extends Constructor>(base: B): B & MixinInstance<B> {\n  class MixedApolloMutationElement<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>\n    extends ApolloElementMixin(base)<D, V> {\n    static override documentType = 'mutation' as const;\n\n    static get observedAttributes(): string[] {\n      return [\n        ...(super.observedAttributes ?? []), /* c8 ignore next */\n        'await-refetch-queries',\n        'refetch-queries',\n      ];\n    }\n\n    controller = new ApolloMutationController<D, V>(this, null, {\n      update: this.updater,\n      onCompleted: data => data && this.onCompleted?.(data),\n      onError: error => this.onError?.(error),\n    });\n\n    @controlled({ readonly: true }) readonly called = false;\n\n    @controlled() mutation: ComponentDocument<D> | null = null;\n\n    @controlled({ path: 'options' }) optimisticResponse?: OptimisticResponseType<D, V>;\n\n    @controlled({ path: 'options' }) refetchQueries: RefetchQueriesType<D> | null = null;\n\n    @controlled({ path: 'options' }) fetchPolicy?: Extract<C.FetchPolicy, 'no-cache'>;\n\n    @controlled({ path: 'options' }) awaitRefetchQueries?: boolean;\n\n    @controlled({ path: 'options' }) ignoreResults = false;\n\n    onCompleted?(_data: Data<D>): void;\n\n    onError?(_error: Error): void;\n\n    updater?(\n      ...params: Parameters<C.MutationUpdaterFn<Data<D>>>\n    ): ReturnType<C.MutationUpdaterFn<Data<D>>>;\n\n    override attributeChangedCallback(name: string, oldVal: string, newVal: string): void {\n      super.attributeChangedCallback?.(name, oldVal, newVal);\n      /* c8 ignore start */\n      // @ts-expect-error: ts is not tracking the static side\n      if ((super.constructor?.observedAttributes ?? []).includes(name))\n        return;\n      /* c8 ignore stop */\n\n      switch (name) { /* c8 ignore next */\n        case 'await-refetch-queries':\n          this.awaitRefetchQueries =\n            this.hasAttribute('await-refetch-queries');\n          break; /* c8 ignore next */\n\n        case 'refetch-queries':\n          this.refetchQueries =\n            !newVal ? null : newVal\n              .split(',')\n              .map(x => x.trim());\n          break; /* c8 ignore next */\n      }\n    }\n\n    /**\n     * This resolves a single mutation according to the options specified and returns a Promise which is either resolved with the resulting data or rejected with an error.\n     */\n    public async mutate(\n      params?: Partial<C.MutationOptions<Data<D>, Variables<D, V>>>\n    ): Promise<C.FetchResult<Data<D>>> {\n      return this.controller.mutate(params);\n    }\n  }\n\n  return MixedApolloMutationElement as MixinInstance<B>;\n}\n\n/**\n * `ApolloMutationMixin`: class mixin for apollo-mutation elements.\n */\nexport const ApolloMutationMixin =\n  dedupeMixin(ApolloMutationMixinImpl);\n", "import type {\n  Constructor,\n  Data,\n  MaybeTDN,\n  MaybeVariables,\n  Variables,\n} from '@apollo-elements/core/types';\n\nimport { ApolloElement } from './apollo-element.js';\nimport { ApolloMutationMixin } from '@apollo-elements/mixins/apollo-mutation-mixin';\n\nexport { html } from '@gluon/gluon';\n\n/**\n * `ApolloMutation`\n *\n * \uD83D\uDC69\u200D\uD83D\uDE80 Custom element base class to issue mutations via your Apollo cache.\n *\n * See [`ApolloMutationInterface`](https://apolloelements.dev/api/core/interfaces/mutation) for more information on events\n *\n * @element\n */\nexport class ApolloMutation<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>\n  extends ApolloMutationMixin(ApolloElement as Constructor<ApolloElement>)<D, V> {\n  /** @summary Latest mutation data. */\n  declare data: Data<D> | null;\n\n  /**\n   * An object that maps from the name of a variable as used in the mutation GraphQL document to that variable's value.\n   *\n   * @summary Mutation variables.\n   */\n  declare variables: Variables<D, V> | null;\n}\n", "import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nimport type {\n  ComponentDocument,\n  Data,\n  MaybeTDN,\n  MaybeVariables,\n  SubscriptionDataOptions,\n  Variables,\n} from '@apollo-elements/core/types';\n\nimport type {\n  ApolloClient,\n  ApolloError,\n  DocumentNode,\n  FetchPolicy,\n  FetchResult,\n  NormalizedCacheObject,\n  Observable,\n  SubscriptionOptions,\n  WatchQueryOptions,\n} from '@apollo/client/core';\n\nimport { ApolloController, ApolloControllerOptions } from './apollo-controller.js';\n\nimport { bound } from './lib/bound.js';\n\nexport interface ApolloSubscriptionControllerOptions<D, V> extends ApolloControllerOptions<D, V>,\n          Partial<WatchQueryOptions<Variables<D, V>, Data<D>>> {\n  variables?: Variables<D, V>,\n  fetchPolicy?: FetchPolicy;\n  noAutoSubscribe?: boolean;\n  shouldSubscribe?: (options?: Partial<SubscriptionOptions<Variables<D, V>, Data<D>>>) => boolean;\n  shouldResubscribe?: boolean;\n  skip?: boolean;\n  onData?: (detail: {\n    client: ApolloClient<NormalizedCacheObject>;\n    subscriptionData: { data: Data<D> | null; loading: boolean; error: null; };\n  }) => void;\n  onComplete?: () => void;\n  onError?: (error: ApolloError) => void;\n}\n\nexport class ApolloSubscriptionController<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>\n  extends ApolloController<D, V>\n  implements ReactiveController {\n  private observable?: Observable<FetchResult<Data<D>>>;\n\n  private observableSubscription?: ZenObservable.Subscription;\n\n  // @ts-expect-error: https://github.com/microsoft/TypeScript/issues/40220\n  declare options: ApolloSubscriptionControllerOptions<D, V>;\n\n  #hasDisconnected = false;\n\n  #lastSubscriptionDocument?: DocumentNode;\n\n  get subscription(): ComponentDocument<D> | null { return this.document; }\n\n  set subscription(document: ComponentDocument<D> | null) { this.document = document; }\n\n  /** Flags an element that's ready and able to auto-subscribe */\n  public get canAutoSubscribe(): boolean {\n    return (\n      !!this.client &&\n      !this.options.noAutoSubscribe &&\n      this.shouldSubscribe()\n    );\n  }\n\n  constructor(\n    host: ReactiveControllerHost,\n    subscription?: ComponentDocument<D> | null,\n    options?: ApolloSubscriptionControllerOptions<D, V>\n  ) {\n    super(host, options);\n    this.init(subscription ?? null);/* c8 ignore next */\n  }\n\n  override hostConnected(): void {\n    super.hostConnected();\n    /* c8 ignore start */ // covered\n    if (this.#hasDisconnected && this.observableSubscription)\n      this.subscribe(); /* c8 ignore stop */\n    else\n      this.documentChanged(this.subscription);\n  }\n\n  override hostDisconnected(): void {\n    this.endSubscription();\n    this.#hasDisconnected = true;\n    super.hostDisconnected();\n  }\n\n  /**\n   * Determines whether the element is able to automatically subscribe\n   */\n  private canSubscribe(\n    options?: Partial<SubscriptionOptions<Variables<D, V> | null, Data<D>>>\n  ): boolean {\n    /* c8 ignore next 4 */\n    return (\n      !this.options.noAutoSubscribe &&\n      !!this.client &&\n      (!this.observable || !!this.options.shouldResubscribe) &&\n      !!(options?.query ?? this.subscription)\n    );\n  }\n\n  private initObservable(params?: Partial<SubscriptionDataOptions<D, V>>): void {\n    const {\n      shouldResubscribe = this.options.shouldResubscribe,\n      client = this.client,\n      skip = this.options.skip,\n      ...rest\n    } = params ?? {}; /* c8 ignore start */ // covered\n\n    if (!client) /* c8 ignore start */ // covered\n      throw new TypeError('No Apollo client. See https://apolloelements.dev/guides/getting-started/apollo-client/');\n\n\n    if ((this.observable && !shouldResubscribe) || skip)\n      return; /* c8 ignore stop */\n\n    const query = params?.subscription ?? this.subscription as DocumentNode; /* c8 ignore next */\n    this.#lastSubscriptionDocument = query;\n    this.observable = client.subscribe({\n      // It's better to let Apollo client throw this error\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      variables: this.variables,\n      context: this.options.context,\n      errorPolicy: this.options.errorPolicy,\n      fetchPolicy: this.options.fetchPolicy,\n      ...rest,\n      query,\n    });\n  }\n\n  /**\n   * Sets `data`, `loading`, and `error` on the instance when new subscription results arrive.\n   */\n  private nextData(result: FetchResult<Data<D>>) {\n    const { data = null, errors } = result;\n    // If we got to this line without a client, it's because of user error\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const client = this.client!;\n    const loading = false;\n    const subscriptionData = { data, loading, error: null };\n    const detail = { client, subscriptionData };\n    this.emitter.dispatchEvent(new CustomEvent('apollo-subscription-result', { detail }));\n    this.data = data;\n    this.error = null;\n    this.errors = errors ?? [];\n    this.loading = loading;\n    this.options.onData?.(detail); /* c8 ignore next */ // covered\n    this.notify('data', 'error', 'errors', 'loading');\n  }\n\n  /**\n   * Sets `error` and `loading` on the instance when the subscription errors.\n   */\n  private nextError(error: ApolloError) {\n    this.emitter.dispatchEvent(new CustomEvent('apollo-error', { detail: error }));\n    this.error = error;\n    this.loading = false;\n    this.options.onError?.(error); /* c8 ignore next */ // covered\n    this.notify('error', 'loading');\n  }\n\n  /**\n   * Shuts down the subscription\n   */\n  private onComplete(): void {\n    this.options.onComplete?.(); /* c8 ignore next */ // covered\n    this.endSubscription();\n    this.notify();\n  }\n\n  private endSubscription() {\n    if (this.observableSubscription)\n      this.observableSubscription.unsubscribe();\n  }\n\n  private shouldSubscribe(opts?: Partial<SubscriptionOptions<Variables<D, V>, Data<D>>>): boolean {\n    return this.options.shouldSubscribe?.(opts) ?? true; /* c8 ignore next */\n  }\n\n  protected override clientChanged(): void {\n    if (this.canSubscribe() && this.shouldSubscribe())/* c8 ignore next */\n      this.subscribe();/* c8 ignore next */\n  }\n\n  protected override documentChanged(doc?: ComponentDocument<D> | null): void {\n    const query = doc ?? undefined;/* c8 ignore next */\n    if (doc === this.#lastSubscriptionDocument)\n      return;/* c8 ignore next */\n    this.cancel();\n    if (this.canSubscribe({ query }) && this.shouldSubscribe({ query })) /* c8 ignore next */\n      this.subscribe();/* c8 ignore next */\n  }\n\n  protected override variablesChanged(variables?: Variables<D, V>): void {\n    this.cancel();\n    if (this.canSubscribe({ variables }) && this.shouldSubscribe({ variables }))/* c8 ignore next */\n      this.subscribe();/* c8 ignore next */\n  }\n\n  /**\n   * @summary Starts the subscription\n   */\n  @bound public subscribe(params?: Partial<SubscriptionDataOptions<D, V>>): void {\n    this.initObservable(params);\n\n    /* c8 ignore start */ // covered\n    const shouldResubscribe = params?.shouldResubscribe ?? this.options.shouldResubscribe;\n    if (this.observableSubscription && !shouldResubscribe) return;\n    /* c8 ignore stop */\n\n    this.loading = true;\n    this.notify('loading');\n\n    this.observableSubscription =\n      this.observable?.subscribe({\n        next: this.nextData.bind(this),\n        error: this.nextError.bind(this),\n        complete: this.onComplete.bind(this),\n      });\n  }\n\n  /**\n   * @summary Ends the subscription\n   */\n  @bound public cancel(): void {\n    this.endSubscription();\n    this.observableSubscription = undefined;\n    this.observable = undefined;\n  }\n}\n", "import type * as C from '@apollo/client/core';\n\nimport type {\n  ComponentDocument,\n  Constructor,\n  Data,\n  MaybeTDN,\n  MaybeVariables,\n  OnSubscriptionDataParams,\n  SubscriptionDataOptions,\n  Variables,\n} from '@apollo-elements/core/types';\n\nimport type { ApolloSubscriptionElement } from '@apollo-elements/core/types';\n\nimport { ApolloSubscriptionController } from '@apollo-elements/core/apollo-subscription-controller';\nimport { ApolloElementMixin } from './apollo-element-mixin.js';\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\nimport { controlled } from '@apollo-elements/core/decorators';\n\ntype MixinInstance<B extends Constructor> = B & {\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  new <D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>(...a: any[]):\n    InstanceType<B> & ApolloSubscriptionElement<D, V>;\n  documentType: 'subscription';\n}\n\nfunction ApolloSubscriptionMixinImpl<B extends Constructor>(superclass: B): MixinInstance<B> {\n  class MixedApolloSubscriptionElement<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>\n    extends ApolloElementMixin(superclass)<D, V> {\n    static override documentType = 'subscription' as const;\n\n    static override get observedAttributes(): string[] {\n      return [\n        ...super.observedAttributes as string[],\n        'no-auto-subscribe',\n      ];\n    }\n\n    /**\n     * Latest subscription data.\n     */\n    declare data: Data<D> | null;\n\n    /**\n     * An object map from variable name to variable value, where the variables are used within the GraphQL subscription.\n     *\n     * Setting variables will initiate the subscription, unless [`noAutoSubscribe`](#noautosubscribe) is also set.\n     *\n     * @summary Subscription variables.\n     */\n    declare variables: Variables<D, V> | null;\n\n    controller = new ApolloSubscriptionController<D, V>(this, null, {\n      shouldSubscribe: x => this.readyToReceiveDocument && this.shouldSubscribe(x),\n      onData: data => this.onSubscriptionData?.(data), /* c8 ignore next */ // covered\n      onComplete: () => this.onSubscriptionComplete?.(), /* c8 ignore next */ // covered\n      onError: error => this.onError?.(error),\n    });\n\n    @controlled() subscription: ComponentDocument<D> | null = null;\n\n    @controlled({ readonly: true }) declare readonly canAutoSubscribe: boolean;\n\n    @controlled({ path: 'options' }) context?: Record<string, unknown>;\n\n    @controlled({ path: 'options' }) fetchPolicy?: C.FetchPolicy;\n\n    @controlled({ path: 'options' }) pollInterval?: number;\n\n    @controlled({\n      path: 'options',\n      onSet(\n        this: ApolloSubscriptionElement,\n        value: ApolloSubscriptionElement['noAutoSubscribe']\n      ) {\n        this.toggleAttribute('no-auto-subscribe', !!value);\n      },\n    })\n    noAutoSubscribe = this.hasAttribute('no-auto-subscribe');\n\n    @controlled({ path: 'options' }) notifyOnNetworkStatusChange?: boolean;\n\n    @controlled({ path: 'options' })\n    shouldResubscribe: SubscriptionDataOptions['shouldResubscribe'] = false;\n\n    @controlled({ path: 'options' }) skip = false;\n\n    onSubscriptionData?(_result: OnSubscriptionDataParams<Data<D>>): void\n\n    onSubscriptionComplete?(): void\n\n    onError?(error: C.ApolloError): void\n\n    public subscribe(params?: Partial<SubscriptionDataOptions<D, V>>): void {\n      return this.controller.subscribe(params);\n    }\n\n    public cancel(): void {\n      return this.controller.cancel();\n    }\n\n    /**\n     * Determines whether the element should attempt to subscribe automatically\n     * Override to prevent subscribing unless your conditions are met\n     * @override\n     */\n    shouldSubscribe(\n      options?: Partial<C.SubscriptionOptions<Variables<D, V>, Data<D>>>\n    ): boolean {\n      return (void options, true);\n    }\n  }\n\n  return MixedApolloSubscriptionElement as unknown as MixinInstance<B>;\n}\n\n/**\n * `ApolloSubscriptionMixin`: class mixin for apollo-subscription elements.\n */\nexport const ApolloSubscriptionMixin =\n  dedupeMixin(ApolloSubscriptionMixinImpl);\n", "import type {\n  Constructor,\n  Data,\n  MaybeTDN,\n  MaybeVariables,\n  Variables,\n} from '@apollo-elements/core/types';\n\nimport { ApolloElement } from './apollo-element.js';\nimport { ApolloSubscriptionMixin } from '@apollo-elements/mixins/apollo-subscription-mixin';\n\nexport { html } from '@gluon/gluon';\n\n/**\n * `ApolloSubscription`\n *\n * \uD83D\uDE80 Custom element base class that updates with an Apollo GraphQL subscription.\n *\n * @element\n *\n * See [`ApolloSubscriptionInterface`](https://apolloelements.dev/api/core/interfaces/subscription) for more information on events\n *\n */\nexport class ApolloSubscription<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>>\n  extends ApolloSubscriptionMixin(ApolloElement as Constructor<ApolloElement>)<D, V> {\n  /** @summary Latest subscription data. */\n  declare data: Data<D> | null;\n\n  /**\n   * An object that maps from the name of a variable as used in the subscription GraphQL document to that variable's value.\n   *\n   * @summary Subscription variables.\n   */\n  declare variables: Variables<D, V> | null;\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAeA,QAAI;A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